From 291d29fb01093807248d211187acfe5882118200 Mon Sep 17 00:00:00 2001 From: tt-a1i <53142663+tt-a1i@users.noreply.github.com> Date: Sat, 7 Nov 2026 01:48:07 +0800 Subject: [PATCH 1/2] feat(web): preserve source identity in review and plan references --- tests/web/composer-drafts.spec.ts | 72 ++++++++++++ tests/web/plan-card.spec.ts | 61 ++++++++++ tests/web/review-panel.spec.ts | 52 +++++++++ web/dist/app-MermaidPreview.js | 10 +- web/dist/app-abnfDiagram-O67JEVCF.js | 2 +- web/dist/app-architectureDiagram-NJMV4G6O.js | 6 +- web/dist/app-blockDiagram-BEXU5L5S.js | 8 +- web/dist/app-c4Diagram-YGBWAQC7.js | 2 +- web/dist/app-chunk-3FUC2YCW.js | 2 +- web/dist/app-chunk-7INBJB4K.js | 40 +++---- web/dist/app-chunk-7M6MHVWA.js | 10 +- web/dist/app-chunk-GNY47TPC.js | 4 +- web/dist/app-chunk-UA2S7LBM.js | 2 +- web/dist/app-chunk-Z7XXMR3K.js | 6 +- web/dist/app-classDiagram-v2-NBCMYWYE.js | 8 +- web/dist/app-dagre-6A5THRUB.js | 4 +- web/dist/app-diagram-22UHCM2B.js | 14 +-- web/dist/app-diagram-3UASUU5V.js | 2 +- web/dist/app-diagram-ATOU4E4O.js | 6 +- web/dist/app-diagram-CDSNMT55.js | 4 +- web/dist/app-ebnfDiagram-ZINNZB2B.js | 2 +- web/dist/app-elk-276RUBZZ.js | 4 +- web/dist/app-erDiagram-OPXOYQCR.js | 4 +- web/dist/app-flowDiagram-KWPJA3E3.js | 2 +- web/dist/app-kanban-definition-PNTS6WVX.js | 10 +- web/dist/app-mindmap-definition-NLK3R4M7.js | 4 +- web/dist/app-pegDiagram-GJSIUBJH.js | 2 +- web/dist/app-railroadDiagram-XR7U4H2S.js | 2 +- web/dist/app-requirementDiagram-PLB6GJNP.js | 4 +- web/dist/app-sequenceDiagram-PO4LG4MO.js | 10 +- web/dist/app-stateDiagram-v2-GCMORJYK.js | 4 +- web/dist/app-swimlanes-2SLR337P.js | 2 +- web/dist/app-swimlanesDiagram-TC7HE7FX.js | 2 +- web/dist/app-usecaseDiagram-POWQR4AR.js | 4 +- web/dist/app.js | 66 +++++------ web/dist/build-info.json | 2 +- web/dist/styles.css | 2 +- web/ui/src/app/App.tsx | 22 +++- web/ui/src/features/composer/Composer.tsx | 37 ++++-- .../src/features/review/DiffCodePreview.tsx | 6 + web/ui/src/features/review/ReviewPanel.tsx | 9 ++ .../src/features/review/review-reference.ts | 19 +++ web/ui/src/features/transcript/PlanCard.tsx | 108 ++++++++++++++---- web/ui/src/features/transcript/Transcript.tsx | 6 + web/ui/src/i18n.ts | 10 ++ web/ui/src/styles.css | 6 +- 46 files changed, 504 insertions(+), 160 deletions(-) create mode 100644 web/ui/src/features/review/review-reference.ts diff --git a/tests/web/composer-drafts.spec.ts b/tests/web/composer-drafts.spec.ts index 76a11f270..4cbf39231 100644 --- a/tests/web/composer-drafts.spec.ts +++ b/tests/web/composer-drafts.spec.ts @@ -1201,3 +1201,75 @@ it("does not write over unread storage after an initial read failure, and hydrat view.select("B"); expect(view.input.value).toBe("B from before"); }); + +it("keeps cited review identity and excerpt in the draft across later renders and bounds long excerpts", async () => { + const view = setup(); + const source = { + repositoryRoot: "/workspace", + comparison: "unstaged" as const, + revision: "displayed-v1", + }; + view.update({ + addSourcesRequest: { + sessionId: "A", + path: "/workspace/a.jsonl", + revision: 1, + feedback: { + filePath: "src/old.ts", + side: "old", + line: 8, + code: "old text", + source, + }, + }, + }); + const cited = view.input.value; + expect(cited).toContain(JSON.stringify(source)); + expect(cited).toContain("> old text"); + view.update({ snapshot: { ...snapshot(), cursor: 2 } }); + expect(view.input.value).toBe(cited); + view.update({ + addSourcesRequest: { + sessionId: "A", + path: "/workspace/a.jsonl", + revision: 2, + feedback: { + kind: "plan", + sessionId: "A", + sessionPath: "/workspace/a.jsonl", + entryId: "result-entry", + toolCallId: "plan-call", + text: "x".repeat(9000), + }, + }, + }); + expect(view.input.value).toContain('"entryId":"result-entry"'); + expect(view.input.value).toContain('"toolCallId":"plan-call"'); + expect(view.input.value).toContain("x".repeat(8000)); + expect(view.input.value).not.toContain("x".repeat(8001)); + expect(view.input.value).toContain(i18n.t("sourceFeedbackTruncated")); + expect(view.sendPrompt).not.toHaveBeenCalled(); + const submitted = view.input.value; + fireEvent.click(screen.getByRole("button", { name: i18n.t("send") })); + await waitFor(() => expect(view.sendPrompt).toHaveBeenCalledWith(submitted)); +}); + +it("rejects plan text whose own Session identity differs from its draft request", () => { + const view = setup(); + view.update({ + addSourcesRequest: { + sessionId: "A", + path: "/workspace/a.jsonl", + revision: 1, + feedback: { + kind: "plan", + sessionId: "B", + sessionPath: "/workspace/b.jsonl", + entryId: "result-entry", + text: "wrong session", + }, + }, + }); + expect(view.input.value).toBe(""); + expect(view.sendPrompt).not.toHaveBeenCalled(); +}); diff --git a/tests/web/plan-card.spec.ts b/tests/web/plan-card.spec.ts index 46c986406..df043d669 100644 --- a/tests/web/plan-card.spec.ts +++ b/tests/web/plan-card.spec.ts @@ -15,6 +15,8 @@ import { type WebLiveMessage, type WebSnapshot, } from "../../web/protocol/types.ts"; +import type { PlanTextReference } from "../../web/ui/src/features/review/review-reference.ts"; +import { PlanCard } from "../../web/ui/src/features/transcript/PlanCard.tsx"; import { Transcript } from "../../web/ui/src/features/transcript/Transcript.tsx"; import { i18n } from "../../web/ui/src/i18n.ts"; @@ -65,6 +67,7 @@ function transcript( messages: WebLiveMessage[], live: WebLiveMessage[] = [], active = true, + onReferencePlan?: (reference: PlanTextReference) => void, ) { const snapshot: WebSnapshot = { protocolVersion: 1, @@ -108,6 +111,7 @@ function transcript( thinkingDurations: {}, scrollToBottom: 0, onResend: async () => true, + onReferencePlan, }), ); } @@ -370,3 +374,60 @@ it("collapses without approving and copies the actual plan with explicit copy fe vi.unstubAllGlobals(); } }); + +it("references selected plan text with its result identity and clears selection for a replacement result", () => { + const onReference = vi.fn(); + const plan = result("# Plan\n\nSelected paragraph."); + const node = (message: WebLiveMessage, sessionPath = "/tmp/session") => + createElement( + I18nextProvider, + { i18n }, + createElement(PlanCard, { + result: message, + sessionId: "session", + sessionPath, + entryId: "result-entry", + onReference, + }), + ); + const view = render(node(plan)); + const button = screen.getByRole("button", { + name: i18n.t("planCardReference"), + }) as HTMLButtonElement; + expect(button.disabled).toBe(true); + const paragraph = screen.getByText("Selected paragraph."); + const range = document.createRange(); + range.selectNodeContents(paragraph); + window.getSelection()?.removeAllRanges(); + window.getSelection()?.addRange(range); + fireEvent.mouseUp(paragraph); + expect(onReference).not.toHaveBeenCalled(); + expect(button.disabled).toBe(false); + fireEvent.click(button); + expect(onReference).toHaveBeenCalledExactlyOnceWith({ + kind: "plan", + sessionId: "session", + sessionPath: "/tmp/session", + entryId: "result-entry", + toolCallId: "plan-1", + text: "Selected paragraph.", + }); + view.rerender(node(result("# Plan\n\nRevised paragraph."))); + expect(button.disabled).toBe(true); + expect(screen.getByText(i18n.t("planCardNotApproval"))).toBeTruthy(); + view.rerender(node(plan, "/tmp/copied-session")); + expect(button.disabled).toBe(true); +}); + +it("offers plan references through the transcript only for the controlled Session", () => { + const callback = vi.fn(); + const view = render(transcript([call, result()], [], false, callback)); + expect( + screen.queryByRole("button", { name: i18n.t("planCardReference") }), + ).toBeNull(); + view.rerender(transcript([call, result()], [], true, callback)); + expect( + screen.getByRole("button", { name: i18n.t("planCardReference") }), + ).toBeTruthy(); + expect(callback).not.toHaveBeenCalled(); +}); diff --git a/tests/web/review-panel.spec.ts b/tests/web/review-panel.spec.ts index 6dcc18fa8..0a616b74f 100644 --- a/tests/web/review-panel.spec.ts +++ b/tests/web/review-panel.spec.ts @@ -1197,3 +1197,55 @@ it("keeps hidden diff reads and focus dormant, then cancels a read when hidden a rerender(node(true, "new-file.ts")); expect(readFile).toHaveBeenCalledTimes(2); }); + +it("references the pinned displayed review revision after a newer summary arrives", async () => { + const quote = vi.fn(); + const node = (revision: string) => + withI18n( + createElement(ReviewPanel, { + review: { + result: { ok: true, snapshot: { ...snapshot, revision } }, + loading: false, + error: null, + refresh: async () => {}, + }, + initialFilePath: snapshot.files[0]!.path, + onClose: () => {}, + onReferenceLine: quote, + }), + ); + const view = render(node("displayed-v1")); + await act(async () => {}); + view.rerender(node("latest-v2")); + fireEvent.click( + screen.getByRole("button", { + name: i18n.t("reviewSelectNewLine", { line: 1 }), + }), + ); + fireEvent.click( + screen.getByRole("button", { name: i18n.t("reviewQuoteLine") }), + ); + expect(quote).toHaveBeenLastCalledWith( + expect.objectContaining({ + source: { + repositoryRoot: snapshot.repositoryRoot, + comparison: snapshot.comparison, + revision: "displayed-v1", + }, + }), + ); + fireEvent.click(screen.getByRole("button", { name: "Show latest diff" })); + fireEvent.click( + screen.getByRole("button", { + name: i18n.t("reviewSelectNewLine", { line: 1 }), + }), + ); + fireEvent.click( + screen.getByRole("button", { name: i18n.t("reviewQuoteLine") }), + ); + expect(quote).toHaveBeenLastCalledWith( + expect.objectContaining({ + source: expect.objectContaining({ revision: "latest-v2" }), + }), + ); +}); diff --git a/web/dist/app-MermaidPreview.js b/web/dist/app-MermaidPreview.js index e38a406ce..ad29af2fc 100644 --- a/web/dist/app-MermaidPreview.js +++ b/web/dist/app-MermaidPreview.js @@ -1,11 +1,11 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["app-c4Diagram-YGBWAQC7.js","app-chunk-Y2CYZVJY.js","app-src.js","app-rolldown-runtime.js","app-chunk-O7XYJQB3.js","app-preload-helper.js","app-purify.es.js","app-chunk-ZIGJFQKS.js","app-dist.js","app-chunk-742MDFTN.js","app-chunk-MBY4JIJT.js","app-chunk-7PRAP22T.js","app-chunk-7INBJB4K.js","app-chunk-J5ZVWO5B.js","app-rough.esm.js","app-chunk-GWA4HPMP.js","app-flowDiagram-KWPJA3E3.js","app-chunk-5DYCD2WN.js","app-chunk-Z7XXMR3K.js","app-line.js","app-path.js","app-array.js","app-chunk-XXDRQBXY.js","app-chunk-WEXAMYUT.js","app-chunk-UA2S7LBM.js","app-chunk-GNY47TPC.js","app-chunk-DUW6YSOI.js","app-chunk-LNGE3PJU.js","app-chunk-7M6MHVWA.js","app-channel.js","app-chunk-5VM5RSS4.js","app-diagram-22UHCM2B.js","app-swimlanesDiagram-TC7HE7FX.js","app-erDiagram-OPXOYQCR.js","app-gitGraphDiagram-X574FWY7.js","app-chunk-JWPE2WC7.js","app-mermaid-parser.core.js","app-chunk-FOHPRMQF.js","app-chunk-6AZGARVD.js","app-chunk-6TQVIW2G.js","app-chunk-6EIED4P4.js","app-chunk-KI3K4JFJ.js","app-chunk-5V3GS4D5.js","app-chunk-UY3FDG6J.js","app-chunk-3Z5EZCMW.js","app-chunk-I5DQTOEV.js","app-chunk-OUJLGHUK.js","app-chunk-XHIXRSVI.js","app-chunk-2ZTRR5NV.js","app-chunk-747NJXEK.js","app-chunk-IH6LHLGP.js","app-chunk-6K3QC6MW.js","app-chunk-ICYGCRZG.js","app-chunk-2Q5K7J3B.js","app-ganttDiagram-FUAMR5RP.js","app-linear.js","app-defaultLocale.js","app-init.js","app-infoDiagram-VRGFBTTK.js","app-chunk-6AEJRKK7.js","app-pieDiagram-5QR66LMP.js","app-ordinal.js","app-arc.js","app-quadrantDiagram-O4NWA36T.js","app-xychartDiagram-PMCCYNJV.js","app-requirementDiagram-PLB6GJNP.js","app-sequenceDiagram-PO4LG4MO.js","app-classDiagram-v2-NBCMYWYE.js","app-stateDiagram-v2-GCMORJYK.js","app-journeyDiagram-ZHPQQLJL.js","app-timeline-definition-EJHVYXUP.js","app-mindmap-definition-NLK3R4M7.js","app-kanban-definition-PNTS6WVX.js","app-sankeyDiagram-IPEJSGJF.js","app-diagram-MLGK6HIB.js","app-diagram-MPIPVDR6.js","app-blockDiagram-BEXU5L5S.js","app-graphlib.js","app-diagram-CDSNMT55.js","app-architectureDiagram-NJMV4G6O.js","app-cytoscape.esm.js","app-diagram-ATOU4E4O.js","app-ishikawaDiagram-OU5B5YK6.js","app-vennDiagram-UO4OBE2U.js","app-diagram-3UASUU5V.js","app-usecaseDiagram-POWQR4AR.js","app-wardleyDiagram-VNRHLVJA.js","app-cynefinDiagram-VND7K2PF.js","app-railroadDiagram-XR7U4H2S.js","app-chunk-GTNCS2PH.js","app-ebnfDiagram-ZINNZB2B.js","app-abnfDiagram-O67JEVCF.js","app-pegDiagram-GJSIUBJH.js"])))=>i.map(i=>d[i]); -import{i as e}from"./app-rolldown-runtime.js";import{n as t,t as n}from"./app-jsx-runtime.js";import{t as r}from"./app-preload-helper.js";import{a as i,t as a}from"./app-useTranslation.js";import{n as o,r as s,t as c}from"./app-x.js";import{t as l}from"./app-purify.es.js";import{n as u}from"./app-chunk-Y2CYZVJY.js";import{h as d,m as f,p}from"./app-src.js";import{$ as m,C as h,E as g,I as _,J as v,K as y,L as b,N as x,P as S,Q as C,S as w,T as ee,V as te,W as ne,Z as T,_ as re,b as E,c as ie,f as ae,g as oe,l as D,m as O,n as se,p as ce,r as le,t as ue,u as de}from"./app-chunk-O7XYJQB3.js";import{S as fe,a as pe,f as me,g as k,h as he,i as ge,o as _e,v as ve,x as ye,y as be}from"./app-chunk-ZIGJFQKS.js";import{t as xe}from"./app-chunk-6AEJRKK7.js";import{r as Se}from"./app-chunk-742MDFTN.js";import{a as Ce}from"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import"./app-chunk-UA2S7LBM.js";import{n as we}from"./app-chunk-GNY47TPC.js";import{n as Te,t as Ee}from"./app-chunk-LNGE3PJU.js";var De=i(`expand`,[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]);function Oe(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function ke(e){if(e==null)return!0;if(ye(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!fe(e)&&!ve(e)&&!be(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 Oe(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var Ae=`comm`,je=`rule`,Me=`decl`,Ne=`@import`,Pe=`@namespace`,Fe=`@keyframes`,Ie=`@layer`,Le=Math.abs,A=String.fromCharCode;function Re(e){return e.trim()}function ze(e,t,n){return e.replace(t,n)}function j(e,t){return e.charCodeAt(t)|0}function M(e,t,n){return e.slice(t,n)}function N(e){return e.length}function Be(e){return e.length}function P(e,t){return t.push(e),e}var F=1,I=1,Ve=0,L=0,R=0,z=``;function B(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:F,column:I,length:o,return:``,siblings:s}}function He(){return R}function Ue(){return R=L>0?j(z,--L):0,I--,R===10&&(I=1,F--),R}function V(){return R=L2||G(R)>3?``:` `}function Je(e,t){for(;--t&&V()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return W(e,U()+(t<6&&H()==32&&V()==32))}function Ye(e){for(;V();)switch(R){case e:return L;case 34:case 39:e!==34&&e!==39&&Ye(R);break;case 40:e===41&&Ye(e);break;case 92:V();break}return L}function Xe(e,t){for(;V()&&e+R!==57&&(e+R!==84||H()!==47););return`/*`+W(t,L-1)+`*`+A(e===47?e:V())}function Ze(e){for(;!G(H());)V();return W(e,L)}function Qe(e){return Ge(K(``,null,null,null,[``],e=We(e),0,[0],e))}function K(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=V()){case 40:m!=108&&j(w,d-1)==58?(v++,w+=`(`):w+=Ke(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=Ke(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=A(y);break}w+=qe(m);break;case 92:w+=Je(U()-1,7);continue;case 47:switch(H()){case 42:case 47:P(et(Xe(V(),U()),t,n,c),c),(G(m||1)==5||G(H()||1)==5)&&N(w)&&M(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=N(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=A(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=ze(w,/\f/g,``)),p>0&&(N(w)-d||h===0)&&P(p>32?tt(w+`;`,r,n,d-1,c):tt(ze(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(P(C=$e(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)K(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(j(w,3)===110)break;case 108:if(j(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?K(e,C,C,r&&P($e(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):K(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+N(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&Ue()==125)continue}switch(w+=A(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(N(w)-1)*_,_=1;break;case 64:H()===45&&(w+=Ke(V())),f=H(),u=d=N(b=w+=Ze(U())),y++;break;case 45:m===45&&N(w)==2&&(h=0)}}return a}function $e(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Be(p),h=0,g=0,_=0;h0?p[v]+` `+y:ze(y,/&\f/g,p[v])))&&(c[_++]=b);return B(e,t,n,i===0?je:s,c,l,u,d)}function et(e,t,n,r){return B(e,t,n,Ae,A(He()),M(e,2,-2),0,r)}function tt(e,t,n,r,i){return B(e,t,n,Me,M(e,0,r),M(e,r+1,-1),r,i)}function nt(e,t){for(var n=``,r=0;r/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-c4Diagram-YGBWAQC7.js`);return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));return{id:at,diagram:e}},`loader`)},st=`flowchart-v2`,ct={id:st,detector:u(e=>/^\s*(graph|flowchart)/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-flowDiagram-KWPJA3E3.js`);return{diagram:e}},__vite__mapDeps([16,2,3,1,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,15,22,23,24,25,26,27,28,29,30]));return{id:st,diagram:e}},`loader`)},lt=`agentflow`,ut={id:lt,detector:u(e=>/^\s*agentflow-beta\b/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-22UHCM2B.js`);return{diagram:e}},__vite__mapDeps([31,6,1,2,3,4,5,29,7,8,9,10,30,11,13,12,14,17,18,19,20,21,15,22,23,24,25,26,27]));return{id:lt,diagram:e}},`loader`)},dt=`swimlane`,ft={id:dt,detector:u(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-swimlanesDiagram-TC7HE7FX.js`);return{diagram:e}},__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,15,22,23,24,25,26,27,28,29,30]));return{id:dt,diagram:e}},`loader`)},pt=`er`,mt={id:pt,detector:u(e=>/^\s*erDiagram/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-erDiagram-OPXOYQCR.js`);return{diagram:e}},__vite__mapDeps([33,1,2,3,4,5,6,29,7,8,9,10,11,13,12,14,17,18,19,20,21,22,23,24,25,26]));return{id:pt,diagram:e}},`loader`)},ht=`gitGraph`,gt={id:ht,detector:u(e=>/^\s*gitGraph/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-gitGraphDiagram-X574FWY7.js`);return{diagram:e}},__vite__mapDeps([34,1,2,3,4,5,6,7,8,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53]));return{id:ht,diagram:e}},`loader`)},_t=`gantt`,vt={id:_t,detector:u(e=>/^\s*gantt/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-ganttDiagram-FUAMR5RP.js`);return{diagram:e}},__vite__mapDeps([54,3,1,2,4,5,6,55,56,57,8,7]));return{id:_t,diagram:e}},`loader`)},yt=`info`,bt={id:yt,detector:u(e=>/^\s*info/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-infoDiagram-VRGFBTTK.js`);return{diagram:e}},__vite__mapDeps([58,1,2,3,4,5,6,59,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:yt,diagram:e}},`loader`)},xt=`pie`,St={id:xt,detector:u(e=>/^\s*pie/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-pieDiagram-5QR66LMP.js`);return{diagram:e}},__vite__mapDeps([60,1,2,3,4,5,6,61,57,20,8,62,21,7,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:xt,diagram:e}},`loader`)},Ct=`quadrantChart`,wt={id:Ct,detector:u(e=>/^\s*quadrantChart/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-quadrantDiagram-O4NWA36T.js`);return{diagram:e}},__vite__mapDeps([63,1,2,3,4,5,6,55,56,57]));return{id:Ct,diagram:e}},`loader`)},Tt=`xychart`,Et={id:Tt,detector:u(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-xychartDiagram-PMCCYNJV.js`);return{diagram:e}},__vite__mapDeps([64,1,2,3,4,5,6,55,56,57,61,7,8,19,20,21,59,9,10]));return{id:Tt,diagram:e}},`loader`)},Dt=`requirement`,Ot={id:Dt,detector:u(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-requirementDiagram-PLB6GJNP.js`);return{diagram:e}},__vite__mapDeps([65,1,2,3,4,5,6,7,8,9,10,11,13,12,14,17,18,19,20,21,22,23,24,25,26]));return{id:Dt,diagram:e}},`loader`)},kt=`sequence`,At={id:kt,detector:u(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-sequenceDiagram-PO4LG4MO.js`);return{diagram:e}},__vite__mapDeps([66,1,2,3,4,5,6,8,7,15,27,53]));return{id:kt,diagram:e}},`loader`)},jt=`classDiagram`,Mt={id:jt,detector:u(e=>/^\s*classDiagram/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-classDiagram-v2-NBCMYWYE.js`);return{diagram:e}},__vite__mapDeps([67,6,1,2,3,4,5,7,8,9,10,30,11,13,12,14,17,18,19,20,21,15,22,23,24,25,26]));return{id:jt,diagram:e}},`loader`)},Nt=`stateDiagram`,Pt={id:Nt,detector:u(e=>/^\s*stateDiagram/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-stateDiagram-v2-GCMORJYK.js`);return{diagram:e}},__vite__mapDeps([68,6,1,2,3,4,5,7,8,9,10,11,13,12,14,17,18,19,20,21,15,22,23,24,25,26]));return{id:Nt,diagram:e}},`loader`)},Ft=`journey`,It={id:Ft,detector:u(e=>/^\s*journey/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-journeyDiagram-ZHPQQLJL.js`);return{diagram:e}},__vite__mapDeps([69,1,2,3,4,5,6,62,20,8,30,15]));return{id:Ft,diagram:e}},`loader`)},Lt={draw:u((e,t,n)=>{f.debug(`rendering svg for syntax error -`);let r=xe(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),ie(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},Rt=Lt,zt={db:{},renderer:Lt,parser:{parse:u(()=>{},`parse`)}},Bt=`flowchart-elk`,Vt={id:Bt,detector:u((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout=`elk`,!0):!1,`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-flowDiagram-KWPJA3E3.js`);return{diagram:e}},__vite__mapDeps([16,2,3,1,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,15,22,23,24,25,26,27,28,29,30]));return{id:Bt,diagram:e}},`loader`)},Ht=`timeline`,Ut={id:Ht,detector:u(e=>/^\s*timeline/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-timeline-definition-EJHVYXUP.js`);return{diagram:e}},__vite__mapDeps([70,1,2,3,4,5,6,62,20,8,7,59,13]));return{id:Ht,diagram:e}},`loader`)},Wt=`mindmap`,Gt={id:Wt,detector:u(e=>/^\s*mindmap/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-mindmap-definition-NLK3R4M7.js`);return{diagram:e}},__vite__mapDeps([71,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,26]));return{id:Wt,diagram:e}},`loader`)},Kt=`kanban`,qt={id:Kt,detector:u(e=>/^\s*kanban/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-kanban-definition-PNTS6WVX.js`);return{diagram:e}},__vite__mapDeps([72,1,2,3,4,5,6,7,8,59,9,10,30,11,12,13,14,17,24,27]));return{id:Kt,diagram:e}},`loader`)},Jt=`sankey`,Yt={id:Jt,detector:u(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-sankeyDiagram-IPEJSGJF.js`);return{diagram:e}},__vite__mapDeps([73,1,2,3,4,5,6,61,57]));return{id:Jt,diagram:e}},`loader`)},Xt=`packet`,Zt={id:Xt,detector:u(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-MLGK6HIB.js`);return{diagram:e}},__vite__mapDeps([74,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:Xt,diagram:e}},`loader`)},Qt=`radar`,$t={id:Qt,detector:u(e=>/^\s*radar-beta/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-MPIPVDR6.js`);return{diagram:e}},__vite__mapDeps([75,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:Qt,diagram:e}},`loader`)},en=`block`,tn={id:en,detector:u(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-blockDiagram-BEXU5L5S.js`);return{diagram:e}},__vite__mapDeps([76,1,2,3,4,5,6,29,7,8,9,10,30,26,11,13,12,14,17,18,19,20,21,77]));return{id:en,diagram:e}},`loader`)},nn=`treeView`,rn={id:nn,detector:u(e=>/^\s*treeView-beta/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-CDSNMT55.js`);return{diagram:e}},__vite__mapDeps([78,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,9,53]));return{id:nn,diagram:e}},`loader`)},an=`architecture`,on={id:an,detector:u(e=>/^\s*architecture/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-architectureDiagram-NJMV4G6O.js`);return{diagram:e}},__vite__mapDeps([79,3,1,2,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,9,10,80]));return{id:an,diagram:e}},`loader`)},sn=`eventmodeling`,cn={id:sn,detector:u(e=>/^\s*eventmodeling/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-ATOU4E4O.js`);return{diagram:e}},__vite__mapDeps([81,37,1,2,3,4,5,6,7,8,35,36,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:sn,diagram:e}},`loader`)},ln=`ishikawa`,un={id:ln,detector:u(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-ishikawaDiagram-OU5B5YK6.js`);return{diagram:e}},__vite__mapDeps([82,1,2,3,4,5,6,7,8,59,14]));return{id:ln,diagram:e}},`loader`)},dn=`venn`,fn={id:dn,detector:u(e=>/^\s*venn-beta/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-vennDiagram-UO4OBE2U.js`);return{diagram:e}},__vite__mapDeps([83,1,2,3,4,5,6,7,8,59,14]));return{id:dn,diagram:e}},`loader`)},pn=`treemap`,mn={id:pn,detector:u(e=>/^\s*treemap/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-3UASUU5V.js`);return{diagram:e}},__vite__mapDeps([84,1,2,3,4,5,6,61,57,56,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,11,23]));return{id:pn,diagram:e}},`loader`)},hn=`usecase`,gn={id:hn,detector:u(e=>/^\s*usecase-beta(?:\s|$)/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-usecaseDiagram-POWQR4AR.js`);return{diagram:e}},__vite__mapDeps([85,1,2,3,4,5,6,7,8,9,10,11,13,12,14,17,18,19,20,21,22,23,24,25,26]));return{id:hn,diagram:e}},`loader`)},_n=`wardley`,vn={id:_n,detector:u(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-wardleyDiagram-VNRHLVJA.js`);return{diagram:e}},__vite__mapDeps([86,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:_n,diagram:e}},`loader`)},yn=`cynefin`,bn={id:yn,detector:u(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-cynefinDiagram-VND7K2PF.js`);return{diagram:e}},__vite__mapDeps([87,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:yn,diagram:e}},`loader`)},xn=`railroad`,Sn={id:xn,detector:u(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-railroadDiagram-XR7U4H2S.js`);return{diagram:e}},__vite__mapDeps([88,46,37,1,2,3,4,5,6,59,89,35,36,38,39,40,41,42,43,44,45,47,48,49,50,51,52]));return{id:xn,diagram:e}},`loader`)},Cn=`railroadEbnf`,wn={id:Cn,detector:u(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-ebnfDiagram-ZINNZB2B.js`);return{diagram:e}},__vite__mapDeps([90,48,37,1,2,3,4,5,6,59,89,35,36,38,39,40,41,42,43,44,45,46,47,49,50,51,52]));return{id:Cn,diagram:e}},`loader`)},Tn=`railroadAbnf`,En={id:Tn,detector:u(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-abnfDiagram-O67JEVCF.js`);return{diagram:e}},__vite__mapDeps([91,47,37,1,2,3,4,5,6,59,89,35,36,38,39,40,41,42,43,44,45,46,48,49,50,51,52]));return{id:Tn,diagram:e}},`loader`)},Dn=`railroadPeg`,On={id:Dn,detector:u(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-pegDiagram-GJSIUBJH.js`);return{diagram:e}},__vite__mapDeps([92,49,37,1,2,3,4,5,6,59,89,35,36,38,39,40,41,42,43,44,45,46,47,48,50,51,52]));return{id:Dn,diagram:e}},`loader`)},kn=!1,q=u(()=>{kn||(kn=!0,x(`error`,zt,e=>e.toLowerCase().trim()===`error`),x(`---`,{db:{clear:u(()=>{},`clear`)},styles:{},renderer:{draw:u(()=>{},`draw`)},parser:{parse:u(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:u(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),S(Vt,Gt,on),S(ut,ot,qt,Mt,mt,vt,bt,St,Ot,At,ft,ct,Ut,gt,Pt,It,wt,Yt,Zt,Et,tn,cn,rn,$t,un,mn,Sn,wn,En,On,fn,vn,bn,gn))},`addDiagrams`),An=u(async()=>{f.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(O).map(async([e,{detector:t,loader:n}])=>{if(n)try{w(e)}catch{try{let{diagram:e,id:r}=await n();x(r,e,t)}catch(t){throw f.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete O[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){f.error(`Failed to load ${e.length} external diagrams`);for(let t of e)f.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),jn=`graphics-document document`;function Mn(e,t){e.attr(`role`,jn),t!==``&&e.attr(`aria-roledescription`,t)}u(Mn,`setA11yDiagramInfo`);function Nn(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}u(Nn,`addSVGa11yTitleDescription`);var J=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{u(this,`Diagram`)}static async fromText(t,n={}){let r=typeof t==`string`?{raw:t,cleaned:t}:t,i=E(),a=ce(r.cleaned,i);try{w(a)}catch{let e=h(a);if(!e)throw new ue(`Diagram ${a} not found.`);let{id:t,diagram:n}=await e();x(t,n)}let{db:o,parser:s,renderer:c,init:l}=w(a);s.parser&&(s.parser.yy=o),o.clear?.(),l?.(i),n.title&&o.setDiagramTitle?.(n.title);let u=r.cleaned;if(o.preserveCommentsWhenParsing&&r.withComments){let e=i.maxTextSize??ae.maxTextSize;r.withComments.length>e?f.warn(`Comment-preserving source exceeds maxTextSize (${r.withComments.length} > ${e}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):u=r.withComments}let d=_e(u)+` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["app-c4Diagram-YGBWAQC7.js","app-chunk-Y2CYZVJY.js","app-src.js","app-rolldown-runtime.js","app-chunk-O7XYJQB3.js","app-preload-helper.js","app-purify.es.js","app-chunk-ZIGJFQKS.js","app-dist.js","app-chunk-7PRAP22T.js","app-chunk-742MDFTN.js","app-chunk-MBY4JIJT.js","app-chunk-7INBJB4K.js","app-chunk-J5ZVWO5B.js","app-rough.esm.js","app-chunk-GWA4HPMP.js","app-flowDiagram-KWPJA3E3.js","app-chunk-LNGE3PJU.js","app-chunk-5DYCD2WN.js","app-chunk-UA2S7LBM.js","app-chunk-Z7XXMR3K.js","app-line.js","app-path.js","app-array.js","app-chunk-GNY47TPC.js","app-chunk-DUW6YSOI.js","app-chunk-XXDRQBXY.js","app-chunk-WEXAMYUT.js","app-chunk-7M6MHVWA.js","app-channel.js","app-chunk-5VM5RSS4.js","app-diagram-22UHCM2B.js","app-swimlanesDiagram-TC7HE7FX.js","app-erDiagram-OPXOYQCR.js","app-gitGraphDiagram-X574FWY7.js","app-chunk-JWPE2WC7.js","app-mermaid-parser.core.js","app-chunk-FOHPRMQF.js","app-chunk-6AZGARVD.js","app-chunk-6TQVIW2G.js","app-chunk-6EIED4P4.js","app-chunk-KI3K4JFJ.js","app-chunk-5V3GS4D5.js","app-chunk-UY3FDG6J.js","app-chunk-3Z5EZCMW.js","app-chunk-I5DQTOEV.js","app-chunk-OUJLGHUK.js","app-chunk-XHIXRSVI.js","app-chunk-2ZTRR5NV.js","app-chunk-747NJXEK.js","app-chunk-IH6LHLGP.js","app-chunk-6K3QC6MW.js","app-chunk-ICYGCRZG.js","app-chunk-2Q5K7J3B.js","app-ganttDiagram-FUAMR5RP.js","app-linear.js","app-defaultLocale.js","app-init.js","app-infoDiagram-VRGFBTTK.js","app-chunk-6AEJRKK7.js","app-pieDiagram-5QR66LMP.js","app-ordinal.js","app-arc.js","app-quadrantDiagram-O4NWA36T.js","app-xychartDiagram-PMCCYNJV.js","app-requirementDiagram-PLB6GJNP.js","app-sequenceDiagram-PO4LG4MO.js","app-classDiagram-v2-NBCMYWYE.js","app-stateDiagram-v2-GCMORJYK.js","app-journeyDiagram-ZHPQQLJL.js","app-timeline-definition-EJHVYXUP.js","app-mindmap-definition-NLK3R4M7.js","app-kanban-definition-PNTS6WVX.js","app-sankeyDiagram-IPEJSGJF.js","app-diagram-MLGK6HIB.js","app-diagram-MPIPVDR6.js","app-blockDiagram-BEXU5L5S.js","app-graphlib.js","app-diagram-CDSNMT55.js","app-architectureDiagram-NJMV4G6O.js","app-cytoscape.esm.js","app-diagram-ATOU4E4O.js","app-ishikawaDiagram-OU5B5YK6.js","app-vennDiagram-UO4OBE2U.js","app-diagram-3UASUU5V.js","app-usecaseDiagram-POWQR4AR.js","app-wardleyDiagram-VNRHLVJA.js","app-cynefinDiagram-VND7K2PF.js","app-railroadDiagram-XR7U4H2S.js","app-chunk-GTNCS2PH.js","app-ebnfDiagram-ZINNZB2B.js","app-abnfDiagram-O67JEVCF.js","app-pegDiagram-GJSIUBJH.js"])))=>i.map(i=>d[i]); +import{i as e}from"./app-rolldown-runtime.js";import{n as t,t as n}from"./app-jsx-runtime.js";import{t as r}from"./app-preload-helper.js";import{a as i,t as a}from"./app-useTranslation.js";import{n as o,r as s,t as c}from"./app-x.js";import{t as l}from"./app-purify.es.js";import{n as u}from"./app-chunk-Y2CYZVJY.js";import{h as d,m as f,p}from"./app-src.js";import{$ as m,C as h,E as g,I as _,J as v,K as y,L as b,N as x,P as S,Q as C,S as w,T as ee,V as te,W as ne,Z as T,_ as re,b as E,c as ie,f as ae,g as oe,l as D,m as O,n as se,p as ce,r as le,t as ue,u as de}from"./app-chunk-O7XYJQB3.js";import{S as fe,a as pe,f as me,g as k,h as he,i as ge,o as _e,v as ve,x as ye,y as be}from"./app-chunk-ZIGJFQKS.js";import{t as xe}from"./app-chunk-6AEJRKK7.js";import{n as Se,t as Ce}from"./app-chunk-LNGE3PJU.js";import"./app-chunk-7PRAP22T.js";import{r as we}from"./app-chunk-742MDFTN.js";import{a as Te}from"./app-chunk-MBY4JIJT.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{n as Ee}from"./app-chunk-GNY47TPC.js";var De=i(`expand`,[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]);function Oe(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function ke(e){if(e==null)return!0;if(ye(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!fe(e)&&!ve(e)&&!be(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 Oe(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var Ae=`comm`,je=`rule`,Me=`decl`,Ne=`@import`,Pe=`@namespace`,Fe=`@keyframes`,Ie=`@layer`,Le=Math.abs,A=String.fromCharCode;function Re(e){return e.trim()}function ze(e,t,n){return e.replace(t,n)}function j(e,t){return e.charCodeAt(t)|0}function M(e,t,n){return e.slice(t,n)}function N(e){return e.length}function Be(e){return e.length}function P(e,t){return t.push(e),e}var F=1,I=1,Ve=0,L=0,R=0,z=``;function B(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:F,column:I,length:o,return:``,siblings:s}}function He(){return R}function Ue(){return R=L>0?j(z,--L):0,I--,R===10&&(I=1,F--),R}function V(){return R=L2||G(R)>3?``:` `}function Je(e,t){for(;--t&&V()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return W(e,U()+(t<6&&H()==32&&V()==32))}function Ye(e){for(;V();)switch(R){case e:return L;case 34:case 39:e!==34&&e!==39&&Ye(R);break;case 40:e===41&&Ye(e);break;case 92:V();break}return L}function Xe(e,t){for(;V()&&e+R!==57&&(e+R!==84||H()!==47););return`/*`+W(t,L-1)+`*`+A(e===47?e:V())}function Ze(e){for(;!G(H());)V();return W(e,L)}function Qe(e){return Ge(K(``,null,null,null,[``],e=We(e),0,[0],e))}function K(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=V()){case 40:m!=108&&j(w,d-1)==58?(v++,w+=`(`):w+=Ke(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=Ke(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=A(y);break}w+=qe(m);break;case 92:w+=Je(U()-1,7);continue;case 47:switch(H()){case 42:case 47:P(et(Xe(V(),U()),t,n,c),c),(G(m||1)==5||G(H()||1)==5)&&N(w)&&M(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=N(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=A(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=ze(w,/\f/g,``)),p>0&&(N(w)-d||h===0)&&P(p>32?tt(w+`;`,r,n,d-1,c):tt(ze(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(P(C=$e(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)K(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(j(w,3)===110)break;case 108:if(j(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?K(e,C,C,r&&P($e(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):K(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+N(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&Ue()==125)continue}switch(w+=A(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(N(w)-1)*_,_=1;break;case 64:H()===45&&(w+=Ke(V())),f=H(),u=d=N(b=w+=Ze(U())),y++;break;case 45:m===45&&N(w)==2&&(h=0)}}return a}function $e(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Be(p),h=0,g=0,_=0;h0?p[v]+` `+y:ze(y,/&\f/g,p[v])))&&(c[_++]=b);return B(e,t,n,i===0?je:s,c,l,u,d)}function et(e,t,n,r){return B(e,t,n,Ae,A(He()),M(e,2,-2),0,r)}function tt(e,t,n,r,i){return B(e,t,n,Me,M(e,0,r),M(e,r+1,-1),r,i)}function nt(e,t){for(var n=``,r=0;r/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-c4Diagram-YGBWAQC7.js`);return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));return{id:at,diagram:e}},`loader`)},st=`flowchart-v2`,ct={id:st,detector:u(e=>/^\s*(graph|flowchart)/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-flowDiagram-KWPJA3E3.js`);return{diagram:e}},__vite__mapDeps([16,2,3,1,4,5,6,7,8,17,9,10,11,12,13,14,18,19,20,21,22,23,24,25,15,26,27,28,29,30]));return{id:st,diagram:e}},`loader`)},lt=`agentflow`,ut={id:lt,detector:u(e=>/^\s*agentflow-beta\b/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-22UHCM2B.js`);return{diagram:e}},__vite__mapDeps([31,6,1,2,3,4,5,29,7,8,17,9,10,11,13,12,14,18,19,20,21,22,23,24,25,30,15,26,27]));return{id:lt,diagram:e}},`loader`)},dt=`swimlane`,ft={id:dt,detector:u(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-swimlanesDiagram-TC7HE7FX.js`);return{diagram:e}},__vite__mapDeps([32,1,2,3,4,5,6,7,8,17,9,10,11,12,13,14,18,19,20,21,22,23,24,25,15,26,27,28,29,30]));return{id:dt,diagram:e}},`loader`)},pt=`er`,mt={id:pt,detector:u(e=>/^\s*erDiagram/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-erDiagram-OPXOYQCR.js`);return{diagram:e}},__vite__mapDeps([33,1,2,3,4,5,6,29,7,8,9,10,11,13,12,14,18,19,20,21,22,23,24,25,26,27]));return{id:pt,diagram:e}},`loader`)},ht=`gitGraph`,gt={id:ht,detector:u(e=>/^\s*gitGraph/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-gitGraphDiagram-X574FWY7.js`);return{diagram:e}},__vite__mapDeps([34,1,2,3,4,5,6,7,8,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53]));return{id:ht,diagram:e}},`loader`)},_t=`gantt`,vt={id:_t,detector:u(e=>/^\s*gantt/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-ganttDiagram-FUAMR5RP.js`);return{diagram:e}},__vite__mapDeps([54,3,1,2,4,5,6,55,56,57,8,7]));return{id:_t,diagram:e}},`loader`)},yt=`info`,bt={id:yt,detector:u(e=>/^\s*info/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-infoDiagram-VRGFBTTK.js`);return{diagram:e}},__vite__mapDeps([58,1,2,3,4,5,6,59,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:yt,diagram:e}},`loader`)},xt=`pie`,St={id:xt,detector:u(e=>/^\s*pie/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-pieDiagram-5QR66LMP.js`);return{diagram:e}},__vite__mapDeps([60,1,2,3,4,5,6,61,57,22,8,62,23,7,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:xt,diagram:e}},`loader`)},Ct=`quadrantChart`,wt={id:Ct,detector:u(e=>/^\s*quadrantChart/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-quadrantDiagram-O4NWA36T.js`);return{diagram:e}},__vite__mapDeps([63,1,2,3,4,5,6,55,56,57]));return{id:Ct,diagram:e}},`loader`)},Tt=`xychart`,Et={id:Tt,detector:u(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-xychartDiagram-PMCCYNJV.js`);return{diagram:e}},__vite__mapDeps([64,1,2,3,4,5,6,55,56,57,61,7,8,21,22,23,59,10,11]));return{id:Tt,diagram:e}},`loader`)},Dt=`requirement`,Ot={id:Dt,detector:u(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-requirementDiagram-PLB6GJNP.js`);return{diagram:e}},__vite__mapDeps([65,1,2,3,4,5,6,7,8,9,10,11,13,12,14,18,19,20,21,22,23,24,25,26,27]));return{id:Dt,diagram:e}},`loader`)},kt=`sequence`,At={id:kt,detector:u(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-sequenceDiagram-PO4LG4MO.js`);return{diagram:e}},__vite__mapDeps([66,1,2,3,4,5,6,8,7,17,15,53]));return{id:kt,diagram:e}},`loader`)},jt=`classDiagram`,Mt={id:jt,detector:u(e=>/^\s*classDiagram/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-classDiagram-v2-NBCMYWYE.js`);return{diagram:e}},__vite__mapDeps([67,6,1,2,3,4,5,7,8,9,10,11,13,12,14,18,19,20,21,22,23,24,25,30,15,26,27]));return{id:jt,diagram:e}},`loader`)},Nt=`stateDiagram`,Pt={id:Nt,detector:u(e=>/^\s*stateDiagram/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-stateDiagram-v2-GCMORJYK.js`);return{diagram:e}},__vite__mapDeps([68,6,1,2,3,4,5,7,8,9,10,11,13,12,14,18,19,20,21,22,23,24,25,15,26,27]));return{id:Nt,diagram:e}},`loader`)},Ft=`journey`,It={id:Ft,detector:u(e=>/^\s*journey/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-journeyDiagram-ZHPQQLJL.js`);return{diagram:e}},__vite__mapDeps([69,1,2,3,4,5,6,62,22,8,30,15]));return{id:Ft,diagram:e}},`loader`)},Lt={draw:u((e,t,n)=>{f.debug(`rendering svg for syntax error +`);let r=xe(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),ie(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},Rt=Lt,zt={db:{},renderer:Lt,parser:{parse:u(()=>{},`parse`)}},Bt=`flowchart-elk`,Vt={id:Bt,detector:u((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout=`elk`,!0):!1,`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-flowDiagram-KWPJA3E3.js`);return{diagram:e}},__vite__mapDeps([16,2,3,1,4,5,6,7,8,17,9,10,11,12,13,14,18,19,20,21,22,23,24,25,15,26,27,28,29,30]));return{id:Bt,diagram:e}},`loader`)},Ht=`timeline`,Ut={id:Ht,detector:u(e=>/^\s*timeline/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-timeline-definition-EJHVYXUP.js`);return{diagram:e}},__vite__mapDeps([70,1,2,3,4,5,6,62,22,8,7,59,13]));return{id:Ht,diagram:e}},`loader`)},Wt=`mindmap`,Gt={id:Wt,detector:u(e=>/^\s*mindmap/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-mindmap-definition-NLK3R4M7.js`);return{diagram:e}},__vite__mapDeps([71,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27]));return{id:Wt,diagram:e}},`loader`)},Kt=`kanban`,qt={id:Kt,detector:u(e=>/^\s*kanban/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-kanban-definition-PNTS6WVX.js`);return{diagram:e}},__vite__mapDeps([72,1,2,3,4,5,6,7,8,59,17,9,10,11,12,13,14,18,19,30]));return{id:Kt,diagram:e}},`loader`)},Jt=`sankey`,Yt={id:Jt,detector:u(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-sankeyDiagram-IPEJSGJF.js`);return{diagram:e}},__vite__mapDeps([73,1,2,3,4,5,6,61,57]));return{id:Jt,diagram:e}},`loader`)},Xt=`packet`,Zt={id:Xt,detector:u(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-MLGK6HIB.js`);return{diagram:e}},__vite__mapDeps([74,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:Xt,diagram:e}},`loader`)},Qt=`radar`,$t={id:Qt,detector:u(e=>/^\s*radar-beta/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-MPIPVDR6.js`);return{diagram:e}},__vite__mapDeps([75,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:Qt,diagram:e}},`loader`)},en=`block`,tn={id:en,detector:u(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-blockDiagram-BEXU5L5S.js`);return{diagram:e}},__vite__mapDeps([76,1,2,3,4,5,6,29,7,8,25,9,10,11,13,12,14,18,20,21,22,23,30,77]));return{id:en,diagram:e}},`loader`)},nn=`treeView`,rn={id:nn,detector:u(e=>/^\s*treeView-beta/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-CDSNMT55.js`);return{diagram:e}},__vite__mapDeps([78,1,2,3,4,5,6,7,8,59,10,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53]));return{id:nn,diagram:e}},`loader`)},an=`architecture`,on={id:an,detector:u(e=>/^\s*architecture/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-architectureDiagram-NJMV4G6O.js`);return{diagram:e}},__vite__mapDeps([79,3,1,2,4,5,6,7,8,59,10,11,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,80]));return{id:an,diagram:e}},`loader`)},sn=`eventmodeling`,cn={id:sn,detector:u(e=>/^\s*eventmodeling/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-ATOU4E4O.js`);return{diagram:e}},__vite__mapDeps([81,1,2,3,4,5,6,7,8,37,35,36,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:sn,diagram:e}},`loader`)},ln=`ishikawa`,un={id:ln,detector:u(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-ishikawaDiagram-OU5B5YK6.js`);return{diagram:e}},__vite__mapDeps([82,1,2,3,4,5,6,7,8,59,14]));return{id:ln,diagram:e}},`loader`)},dn=`venn`,fn={id:dn,detector:u(e=>/^\s*venn-beta/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-vennDiagram-UO4OBE2U.js`);return{diagram:e}},__vite__mapDeps([83,1,2,3,4,5,6,7,8,59,14]));return{id:dn,diagram:e}},`loader`)},pn=`treemap`,mn={id:pn,detector:u(e=>/^\s*treemap/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-diagram-3UASUU5V.js`);return{diagram:e}},__vite__mapDeps([84,1,2,3,4,5,6,61,57,56,7,8,59,9,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,27]));return{id:pn,diagram:e}},`loader`)},hn=`usecase`,gn={id:hn,detector:u(e=>/^\s*usecase-beta(?:\s|$)/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-usecaseDiagram-POWQR4AR.js`);return{diagram:e}},__vite__mapDeps([85,1,2,3,4,5,6,7,8,9,10,11,13,12,14,18,19,20,21,22,23,24,25,26,27]));return{id:hn,diagram:e}},`loader`)},_n=`wardley`,vn={id:_n,detector:u(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-wardleyDiagram-VNRHLVJA.js`);return{diagram:e}},__vite__mapDeps([86,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:_n,diagram:e}},`loader`)},yn=`cynefin`,bn={id:yn,detector:u(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-cynefinDiagram-VND7K2PF.js`);return{diagram:e}},__vite__mapDeps([87,1,2,3,4,5,6,7,8,59,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]));return{id:yn,diagram:e}},`loader`)},xn=`railroad`,Sn={id:xn,detector:u(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-railroadDiagram-XR7U4H2S.js`);return{diagram:e}},__vite__mapDeps([88,1,2,3,4,5,6,59,46,37,89,35,36,38,39,40,41,42,43,44,45,47,48,49,50,51,52]));return{id:xn,diagram:e}},`loader`)},Cn=`railroadEbnf`,wn={id:Cn,detector:u(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-ebnfDiagram-ZINNZB2B.js`);return{diagram:e}},__vite__mapDeps([90,1,2,3,4,5,6,59,48,37,89,35,36,38,39,40,41,42,43,44,45,46,47,49,50,51,52]));return{id:Cn,diagram:e}},`loader`)},Tn=`railroadAbnf`,En={id:Tn,detector:u(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-abnfDiagram-O67JEVCF.js`);return{diagram:e}},__vite__mapDeps([91,1,2,3,4,5,6,59,47,37,89,35,36,38,39,40,41,42,43,44,45,46,48,49,50,51,52]));return{id:Tn,diagram:e}},`loader`)},Dn=`railroadPeg`,On={id:Dn,detector:u(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:u(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./app-pegDiagram-GJSIUBJH.js`);return{diagram:e}},__vite__mapDeps([92,1,2,3,4,5,6,59,49,37,89,35,36,38,39,40,41,42,43,44,45,46,47,48,50,51,52]));return{id:Dn,diagram:e}},`loader`)},kn=!1,q=u(()=>{kn||(kn=!0,x(`error`,zt,e=>e.toLowerCase().trim()===`error`),x(`---`,{db:{clear:u(()=>{},`clear`)},styles:{},renderer:{draw:u(()=>{},`draw`)},parser:{parse:u(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:u(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),S(Vt,Gt,on),S(ut,ot,qt,Mt,mt,vt,bt,St,Ot,At,ft,ct,Ut,gt,Pt,It,wt,Yt,Zt,Et,tn,cn,rn,$t,un,mn,Sn,wn,En,On,fn,vn,bn,gn))},`addDiagrams`),An=u(async()=>{f.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(O).map(async([e,{detector:t,loader:n}])=>{if(n)try{w(e)}catch{try{let{diagram:e,id:r}=await n();x(r,e,t)}catch(t){throw f.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete O[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){f.error(`Failed to load ${e.length} external diagrams`);for(let t of e)f.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),jn=`graphics-document document`;function Mn(e,t){e.attr(`role`,jn),t!==``&&e.attr(`aria-roledescription`,t)}u(Mn,`setA11yDiagramInfo`);function Nn(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}u(Nn,`addSVGa11yTitleDescription`);var J=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{u(this,`Diagram`)}static async fromText(t,n={}){let r=typeof t==`string`?{raw:t,cleaned:t}:t,i=E(),a=ce(r.cleaned,i);try{w(a)}catch{let e=h(a);if(!e)throw new ue(`Diagram ${a} not found.`);let{id:t,diagram:n}=await e();x(t,n)}let{db:o,parser:s,renderer:c,init:l}=w(a);s.parser&&(s.parser.yy=o),o.clear?.(),l?.(i),n.title&&o.setDiagramTitle?.(n.title);let u=r.cleaned;if(o.preserveCommentsWhenParsing&&r.withComments){let e=i.maxTextSize??ae.maxTextSize;r.withComments.length>e?f.warn(`Comment-preserving source exceeds maxTextSize (${r.withComments.length} > ${e}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):u=r.withComments}let d=_e(u)+` `;return r.frontmatterLineOffset&&o.setFrontmatterLineOffset?.(r.frontmatterLineOffset),await s.parse(d),new e(a,d,o,s,c)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Pn=[],Fn=u(()=>{Pn.forEach(e=>{e()}),Pn=[]},`attachFunctions`),In=u(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function Ln(e){let t=e.match(re);if(!t)return{text:e,metadata:{}};let n=t[1],r=n?t[2].split(` `).map(e=>e.startsWith(n)?e.slice(n.length):e).join(` -`):t[2],i=Te(r,{schema:Ee})??{};i=typeof i==`object`&&!Array.isArray(i)?i:{};let a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}u(Ln,`extractFrontMatter`);var Rn=u(e=>e.replace(/\r\n?/g,` +`):t[2],i=Se(r,{schema:Ce})??{};i=typeof i==`object`&&!Array.isArray(i)?i:{};let a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}u(Ln,`extractFrontMatter`);var Rn=u(e=>e.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),zn=u(e=>{let{text:t,metadata:n}=Ln(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),Bn=u(e=>{let t=k.detectInit(e)??{},n=k.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:he(e),directive:t}},`processDirectives`);function Vn(e){let t=e,n=Rn(e),r=zn(n),i=Bn(r.text),a=ge(r.config,i.directive),o=i.text;return{code:{raw:t,cleaned:In(o),withComments:o,frontmatterLineOffset:n.length>r.text.length?(n.substring(0,n.length-r.text.length).match(/\n/g)??[]).length:0},title:r.title,config:a}}u(Vn,`preprocessDiagram`);function Hn(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}u(Hn,`toBase64`);var Un=5e4,Wn=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,Gn=`sandbox`,Kn=`loose`,qn=`http://www.w3.org/2000/svg`,Jn=`http://www.w3.org/1999/xlink`,Yn=`http://www.w3.org/1999/xhtml`,Xn=`100%`,Zn=`100%`,Qn=`border:0;margin:0;`,$n=`margin:0`,er=`allow-top-navigation-by-user-activation allow-popups`,tr=`The "iframe" tag is not supported by your browser.`,nr=[`foreignobject`],rr=[`dominant-baseline`];function ir(e){let t=Vn(e);_();let n;try{n=ce(t.code.cleaned,E())}catch{n=void 0}return y(n),se(t.config??{}),t}u(ir,`processAndSetConfigs`);async function ar(e,t){q();try{let{code:t,config:n}=ir(e);return{diagramType:(await J.fromText(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}finally{y(void 0)}}u(ar,`parse`);var or=u((e,t,n=[])=>`.${e} ${t} ${b(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),sr=u((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=ee(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{ke(e.styles)||r.forEach(t=>{n.insertRule(or(e.id,t,e.styles),n.cssRules.length)}),ke(e.textStyles)||n.insertRule(or(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0)if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=D(t)+` `}else r+=`${e.themeCSS} `;return r+D(n)},`createCssStyles`),cr=u((e,t)=>nt(Qe(`${e}{${t}}`),it([u(function(t,n,r,i){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(n=>n===e&&Array.isArray(t.children)&&t.children.every(e=>e.type===`decl`&&new Set([`font-family`,`font-size`,`fill`]).has(e.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(f.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=Ae))},`addNamespace`),rt])),`compileCSS`),lr=u((e,t,n,r)=>{let i=sr(e,n);return cr(r,T(t,i,{...e.themeVariables,theme:e.theme,look:e.look},r))},`createUserStyles`),ur=u((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=pe(r),r=r.replace(/
/g,`
`),r},`cleanUpSvgCode`),dr=u((e=``,t)=>``,`putIntoIFrame`),fr=u((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,qn);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function pr(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}u(pr,`sandboxedIframe`);var mr=u((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),hr=u(async function(e,t,n){q();let r=ir(t),i=r.code;t=i.cleaned;let a=E();f.debug(a),t.length>(a?.maxTextSize??Un)&&(t=Wn,i={raw:t,cleaned:t});let o=`#${e}`,s=`i`+e,c=`#`+s,d=`d`+e,m=`#`+d,h=u(()=>{let e=p(_?c:m).node();e&&`remove`in e&&e.remove()},`removeTempElements`),g=p(document.body),_=a.securityLevel===Gn,v=a.securityLevel===Kn,y=a.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=``),_){let e=pr(p(n),s);g=p(e.nodes()[0].contentDocument.body),g.node().style.margin=`0`}else g=p(n);fr(g,e,d,`font-family: ${y}`,Jn)}else{if(mr(document,e,d,s),_){let e=pr(p(document.body),s);g=p(e.nodes()[0].contentDocument.body),g.node().style.margin=`0`}else g=p(`body`);fr(g,e,d)}let b,x;try{b=await J.fromText(i,{title:r.title})}catch(e){if(a.suppressErrorRendering)throw h(),e;b=await J.fromText(`error`),x=e}let S=g.select(m).node(),C=b.type,w=S.firstChild,ee=w.firstChild,te=b.renderer.getClasses?.(t,b),ne=lr(a,C,te,o),T=document.createElement(`style`);T.innerHTML=ne,w.insertBefore(T,ee);try{await b.renderer.draw(t,e,`12.0.0`,b)}catch(n){throw a.suppressErrorRendering?h():Rt.draw(t,e,`12.0.0`),n}let re=g.select(`${m} svg`),ie=b.db.getAccTitle?.(),ae=b.db.getAccDescription?.();yr(C,re,ie,ae);let D=u(()=>{g.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,Yn);let t=g.select(m).node().innerHTML;if(f.debug(`config.arrowMarkerAbsolute`,a.arrowMarkerAbsolute),t=ur(t,_,oe(a.arrowMarkerAbsolute)),_){let e=g.select(m+` svg`).node();t=dr(t,e)}else v||(t=l.sanitize(t,{ADD_TAGS:nr,ADD_ATTR:rr,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Fn(),t},`serializeSvg`)();if(x)throw x;return h(),{diagramType:C,svg:D,bindFunctions:b.db.bindFunctions}},`renderDiagram`),gr=u(async function(e,t,n){try{return await hr(e,t,n)}finally{y(void 0)}},`render`);function _r(e={}){let t=le({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),te(t);let n=de.theme;t?.theme&&Object.hasOwn(C,t.theme)?t.themeVariables=C[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!==`null`&&(t.theme=n),t.themeVariables=C[n].getThemeVariables(t.themeVariables));let r=typeof t==`object`?v(t):g();d(r.logLevel),q()}u(_r,`initialize`);var vr=u((e,t={})=>{let{code:n}=Vn(e);return J.fromText(n,t)},`getDiagramFromText`);function yr(e,t,n,r){Mn(t,e),Nn(t,n,r,t.attr(`id`))}u(yr,`addA11yInfo`);var Y=Object.freeze({render:gr,parse:ar,getDiagramFromText:vr,initialize:_r,getConfig:E,setConfig:ne,getSiteConfig:g,updateSiteConfig:m,reset:u(()=>{_()},`reset`),globalReset:u(()=>{_(de)},`globalReset`),defaultConfig:de});d(E().logLevel),_(E());var br=u((e,t,n)=>{f.warn(e),me(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),xr=u(async function(e={querySelector:`.mermaid`}){try{await Sr(e)}catch(t){if(me(t)&&f.error(t.str),Z.parseError&&Z.parseError(t),!e.suppressErrors)throw f.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),Sr=u(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=Y.getConfig();f.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);f.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(f.debug(`Start On Load: `+r?.startOnLoad),Y.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new k.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(f.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=Ce(k.entityDecode(o)).trim().replace(//gi,`
`);let r=k.detectInit(o);r&&f.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await jr(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){br(e,s,Z.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),Cr=u(function(e){Y.initialize(e)},`initialize`),wr=u(async function(e,t,n){f.warn(`mermaid.init is deprecated. Please use run instead.`),e&&Cr(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(r.nodes=t instanceof HTMLElement?[t]:t),await xr(r)},`init`),Tr=u(async(e,{lazyLoad:t=!0}={})=>{q(),S(...e),t===!1&&await An()},`registerExternalDiagrams`),Er=u(function(){if(Z.startOnLoad){let{startOnLoad:e}=Y.getConfig();e&&Z.run().catch(e=>f.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,Er,!1);var Dr=u(function(e){Z.parseError=e},`setParseErrorHandler`),X=[],Or=!1,kr=u(async()=>{if(!Or){for(Or=!0;X.length>0;){let e=X.shift();if(e)try{await e()}catch(e){f.error(`Error executing queue`,e)}}Or=!1}},`executeQueue`),Ar=u(async(e,t)=>new Promise((n,r)=>{let i=u(()=>new Promise((i,a)=>{Y.parse(e,t).then(e=>{i(e),n(e)},e=>{f.error(`Error parsing`,e),Z.parseError?.(e),a(e),r(e)})}),`performCall`);X.push(i),kr().catch(r)}),`parse`),jr=u((e,t,n)=>new Promise((r,i)=>{let a=u(()=>new Promise((a,o)=>{Y.render(e,t,n).then(e=>{a(e),r(e)},e=>{f.error(`Error parsing`,e),Z.parseError?.(e),o(e),i(e)})}),`performCall`);X.push(a),kr().catch(i)}),`render`),Z={startOnLoad:!0,mermaidAPI:Y,parse:Ar,render:jr,init:wr,run:xr,registerExternalDiagrams:Tr,registerLayoutLoaders:we,initialize:Cr,parseError:void 0,contentLoaded:Er,setParseErrorHandler:Dr,detectType:ce,registerIconPacks:Se,getRegisteredDiagramsMetadata:u(()=>Object.keys(O).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},Mr=Z,Q=e(t(),1),$=n();Mr.initialize({startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,maxTextSize:5e4,maxEdges:500,theme:`neutral`,htmlLabels:!1,secure:[`securityLevel`,`startOnLoad`,`maxTextSize`,`maxEdges`,`suppressErrorRendering`,`htmlLabels`]});var Nr=Promise.resolve();function Pr({source:e}){let{t}=a(),n=`diagram-${(0,Q.useId)().replace(/[^a-z0-9]/giu,``)}`,[r,i]=(0,Q.useState)(null),u=r?.source===e?r:null,d=u?.image,f=u?.error,[p,m]=(0,Q.useState)(1),h=(0,Q.useRef)(null),g=(0,Q.useRef)(null),_=(0,Q.useRef)(null);return(0,Q.useEffect)(()=>{let r=!1;return Nr=Nr.then(async()=>{if(!r)try{if(e.length>5e4)throw Error(t(`filesDocumentLimit`));let a=await Mr.render(n,e),o=l.sanitize(a.svg,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:[`foreignObject`,`a`,`image`,`use`]});r||i({source:e,image:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(o)}`})}catch(n){r||i({source:e,error:n instanceof Error?n.message:t(`filesPreviewFailed`)})}}),()=>{r=!0}},[n,e,t]),f?(0,$.jsxs)(`div`,{className:`evidence-warning`,children:[(0,$.jsx)(`p`,{children:f}),(0,$.jsx)(`pre`,{children:e})]}):(0,$.jsxs)(`div`,{className:`file-diagram`,children:[d?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:d,alt:t(`filesDiagram`)}),(0,$.jsx)(`button`,{type:`button`,"aria-label":t(`filesExpandDiagram`),onClick:()=>{m(1),h.current?.showModal()},children:(0,$.jsx)(De,{})})]}):(0,$.jsx)(`p`,{role:`status`,children:t(`readingFile`)}),(0,$.jsxs)(`dialog`,{ref:h,className:`file-diagram-dialog`,"aria-label":t(`filesDiagram`),onCancel:e=>{e.stopPropagation()},onKeyDown:e=>{e.key===`Escape`&&e.stopPropagation()},children:[(0,$.jsxs)(`div`,{className:`file-preview-toolbar`,children:[(0,$.jsx)(`button`,{type:`button`,"aria-label":t(`filesZoomOut`),onClick:()=>m(e=>Math.max(.25,e-.25)),children:(0,$.jsx)(s,{})}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>m(1),children:[Math.round(p*100),`%`]}),(0,$.jsx)(`button`,{type:`button`,"aria-label":t(`filesZoomIn`),onClick:()=>m(e=>Math.min(4,e+.25)),children:(0,$.jsx)(o,{})}),(0,$.jsx)(`button`,{type:`button`,"aria-label":t(`close`),onClick:()=>h.current?.close(),children:(0,$.jsx)(c,{})})]}),(0,$.jsx)(`section`,{ref:g,className:`file-media-viewport`,tabIndex:0,"aria-label":t(`filesDiagram`),onWheel:e=>{(e.ctrlKey||e.metaKey)&&m(t=>Math.max(.25,Math.min(4,t+(e.deltaY>0?-.1:.1))))},onPointerDown:e=>{let t=e.currentTarget;_.current={x:e.clientX,y:e.clientY,left:t.scrollLeft,top:t.scrollTop},t.setPointerCapture(e.pointerId)},onPointerMove:e=>{_.current&&(e.currentTarget.scrollLeft=_.current.left+_.current.x-e.clientX,e.currentTarget.scrollTop=_.current.top+_.current.y-e.clientY)},onPointerUp:()=>{_.current=null},onPointerCancel:()=>{_.current=null},children:d&&(0,$.jsx)(`img`,{src:d,alt:t(`filesDiagram`),draggable:!1,style:{width:`${p*100}%`}})})]})]})}export{Pr as default}; \ No newline at end of file +`,`putIntoIFrame`),fr=u((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,qn);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function pr(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}u(pr,`sandboxedIframe`);var mr=u((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),hr=u(async function(e,t,n){q();let r=ir(t),i=r.code;t=i.cleaned;let a=E();f.debug(a),t.length>(a?.maxTextSize??Un)&&(t=Wn,i={raw:t,cleaned:t});let o=`#${e}`,s=`i`+e,c=`#`+s,d=`d`+e,m=`#`+d,h=u(()=>{let e=p(_?c:m).node();e&&`remove`in e&&e.remove()},`removeTempElements`),g=p(document.body),_=a.securityLevel===Gn,v=a.securityLevel===Kn,y=a.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=``),_){let e=pr(p(n),s);g=p(e.nodes()[0].contentDocument.body),g.node().style.margin=`0`}else g=p(n);fr(g,e,d,`font-family: ${y}`,Jn)}else{if(mr(document,e,d,s),_){let e=pr(p(document.body),s);g=p(e.nodes()[0].contentDocument.body),g.node().style.margin=`0`}else g=p(`body`);fr(g,e,d)}let b,x;try{b=await J.fromText(i,{title:r.title})}catch(e){if(a.suppressErrorRendering)throw h(),e;b=await J.fromText(`error`),x=e}let S=g.select(m).node(),C=b.type,w=S.firstChild,ee=w.firstChild,te=b.renderer.getClasses?.(t,b),ne=lr(a,C,te,o),T=document.createElement(`style`);T.innerHTML=ne,w.insertBefore(T,ee);try{await b.renderer.draw(t,e,`12.0.0`,b)}catch(n){throw a.suppressErrorRendering?h():Rt.draw(t,e,`12.0.0`),n}let re=g.select(`${m} svg`),ie=b.db.getAccTitle?.(),ae=b.db.getAccDescription?.();yr(C,re,ie,ae);let D=u(()=>{g.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,Yn);let t=g.select(m).node().innerHTML;if(f.debug(`config.arrowMarkerAbsolute`,a.arrowMarkerAbsolute),t=ur(t,_,oe(a.arrowMarkerAbsolute)),_){let e=g.select(m+` svg`).node();t=dr(t,e)}else v||(t=l.sanitize(t,{ADD_TAGS:nr,ADD_ATTR:rr,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Fn(),t},`serializeSvg`)();if(x)throw x;return h(),{diagramType:C,svg:D,bindFunctions:b.db.bindFunctions}},`renderDiagram`),gr=u(async function(e,t,n){try{return await hr(e,t,n)}finally{y(void 0)}},`render`);function _r(e={}){let t=le({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),te(t);let n=de.theme;t?.theme&&Object.hasOwn(C,t.theme)?t.themeVariables=C[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!==`null`&&(t.theme=n),t.themeVariables=C[n].getThemeVariables(t.themeVariables));let r=typeof t==`object`?v(t):g();d(r.logLevel),q()}u(_r,`initialize`);var vr=u((e,t={})=>{let{code:n}=Vn(e);return J.fromText(n,t)},`getDiagramFromText`);function yr(e,t,n,r){Mn(t,e),Nn(t,n,r,t.attr(`id`))}u(yr,`addA11yInfo`);var Y=Object.freeze({render:gr,parse:ar,getDiagramFromText:vr,initialize:_r,getConfig:E,setConfig:ne,getSiteConfig:g,updateSiteConfig:m,reset:u(()=>{_()},`reset`),globalReset:u(()=>{_(de)},`globalReset`),defaultConfig:de});d(E().logLevel),_(E());var br=u((e,t,n)=>{f.warn(e),me(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),xr=u(async function(e={querySelector:`.mermaid`}){try{await Sr(e)}catch(t){if(me(t)&&f.error(t.str),Z.parseError&&Z.parseError(t),!e.suppressErrors)throw f.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),Sr=u(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=Y.getConfig();f.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);f.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(f.debug(`Start On Load: `+r?.startOnLoad),Y.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new k.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(f.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=Te(k.entityDecode(o)).trim().replace(//gi,`
`);let r=k.detectInit(o);r&&f.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await jr(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){br(e,s,Z.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),Cr=u(function(e){Y.initialize(e)},`initialize`),wr=u(async function(e,t,n){f.warn(`mermaid.init is deprecated. Please use run instead.`),e&&Cr(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(r.nodes=t instanceof HTMLElement?[t]:t),await xr(r)},`init`),Tr=u(async(e,{lazyLoad:t=!0}={})=>{q(),S(...e),t===!1&&await An()},`registerExternalDiagrams`),Er=u(function(){if(Z.startOnLoad){let{startOnLoad:e}=Y.getConfig();e&&Z.run().catch(e=>f.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,Er,!1);var Dr=u(function(e){Z.parseError=e},`setParseErrorHandler`),X=[],Or=!1,kr=u(async()=>{if(!Or){for(Or=!0;X.length>0;){let e=X.shift();if(e)try{await e()}catch(e){f.error(`Error executing queue`,e)}}Or=!1}},`executeQueue`),Ar=u(async(e,t)=>new Promise((n,r)=>{let i=u(()=>new Promise((i,a)=>{Y.parse(e,t).then(e=>{i(e),n(e)},e=>{f.error(`Error parsing`,e),Z.parseError?.(e),a(e),r(e)})}),`performCall`);X.push(i),kr().catch(r)}),`parse`),jr=u((e,t,n)=>new Promise((r,i)=>{let a=u(()=>new Promise((a,o)=>{Y.render(e,t,n).then(e=>{a(e),r(e)},e=>{f.error(`Error parsing`,e),Z.parseError?.(e),o(e),i(e)})}),`performCall`);X.push(a),kr().catch(i)}),`render`),Z={startOnLoad:!0,mermaidAPI:Y,parse:Ar,render:jr,init:wr,run:xr,registerExternalDiagrams:Tr,registerLayoutLoaders:Ee,initialize:Cr,parseError:void 0,contentLoaded:Er,setParseErrorHandler:Dr,detectType:ce,registerIconPacks:we,getRegisteredDiagramsMetadata:u(()=>Object.keys(O).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},Mr=Z,Q=e(t(),1),$=n();Mr.initialize({startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,maxTextSize:5e4,maxEdges:500,theme:`neutral`,htmlLabels:!1,secure:[`securityLevel`,`startOnLoad`,`maxTextSize`,`maxEdges`,`suppressErrorRendering`,`htmlLabels`]});var Nr=Promise.resolve();function Pr({source:e}){let{t}=a(),n=`diagram-${(0,Q.useId)().replace(/[^a-z0-9]/giu,``)}`,[r,i]=(0,Q.useState)(null),u=r?.source===e?r:null,d=u?.image,f=u?.error,[p,m]=(0,Q.useState)(1),h=(0,Q.useRef)(null),g=(0,Q.useRef)(null),_=(0,Q.useRef)(null);return(0,Q.useEffect)(()=>{let r=!1;return Nr=Nr.then(async()=>{if(!r)try{if(e.length>5e4)throw Error(t(`filesDocumentLimit`));let a=await Mr.render(n,e),o=l.sanitize(a.svg,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:[`foreignObject`,`a`,`image`,`use`]});r||i({source:e,image:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(o)}`})}catch(n){r||i({source:e,error:n instanceof Error?n.message:t(`filesPreviewFailed`)})}}),()=>{r=!0}},[n,e,t]),f?(0,$.jsxs)(`div`,{className:`evidence-warning`,children:[(0,$.jsx)(`p`,{children:f}),(0,$.jsx)(`pre`,{children:e})]}):(0,$.jsxs)(`div`,{className:`file-diagram`,children:[d?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:d,alt:t(`filesDiagram`)}),(0,$.jsx)(`button`,{type:`button`,"aria-label":t(`filesExpandDiagram`),onClick:()=>{m(1),h.current?.showModal()},children:(0,$.jsx)(De,{})})]}):(0,$.jsx)(`p`,{role:`status`,children:t(`readingFile`)}),(0,$.jsxs)(`dialog`,{ref:h,className:`file-diagram-dialog`,"aria-label":t(`filesDiagram`),onCancel:e=>{e.stopPropagation()},onKeyDown:e=>{e.key===`Escape`&&e.stopPropagation()},children:[(0,$.jsxs)(`div`,{className:`file-preview-toolbar`,children:[(0,$.jsx)(`button`,{type:`button`,"aria-label":t(`filesZoomOut`),onClick:()=>m(e=>Math.max(.25,e-.25)),children:(0,$.jsx)(s,{})}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>m(1),children:[Math.round(p*100),`%`]}),(0,$.jsx)(`button`,{type:`button`,"aria-label":t(`filesZoomIn`),onClick:()=>m(e=>Math.min(4,e+.25)),children:(0,$.jsx)(o,{})}),(0,$.jsx)(`button`,{type:`button`,"aria-label":t(`close`),onClick:()=>h.current?.close(),children:(0,$.jsx)(c,{})})]}),(0,$.jsx)(`section`,{ref:g,className:`file-media-viewport`,tabIndex:0,"aria-label":t(`filesDiagram`),onWheel:e=>{(e.ctrlKey||e.metaKey)&&m(t=>Math.max(.25,Math.min(4,t+(e.deltaY>0?-.1:.1))))},onPointerDown:e=>{let t=e.currentTarget;_.current={x:e.clientX,y:e.clientY,left:t.scrollLeft,top:t.scrollTop},t.setPointerCapture(e.pointerId)},onPointerMove:e=>{_.current&&(e.currentTarget.scrollLeft=_.current.left+_.current.x-e.clientX,e.currentTarget.scrollTop=_.current.top+_.current.y-e.clientY)},onPointerUp:()=>{_.current=null},onPointerCancel:()=>{_.current=null},children:d&&(0,$.jsx)(`img`,{src:d,alt:t(`filesDiagram`),draggable:!1,style:{width:`${p*100}%`}})})]})]})}export{Pr as default}; \ No newline at end of file diff --git a/web/dist/app-abnfDiagram-O67JEVCF.js b/web/dist/app-abnfDiagram-O67JEVCF.js index 1ab3376a7..5c2d9188c 100644 --- a/web/dist/app-abnfDiagram-O67JEVCF.js +++ b/web/dist/app-abnfDiagram-O67JEVCF.js @@ -1 +1 @@ -import{n as e}from"./app-chunk-XHIXRSVI.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-6AEJRKK7.js";import{n as r,r as i,t as a}from"./app-chunk-GTNCS2PH.js";import{t as o}from"./app-chunk-JWPE2WC7.js";import{t as s}from"./app-mermaid-parser.core.js";var c=e().RailroadAbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=t(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=t(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=t(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=t(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:t(e=>{a.clear(),n.debug(`[ABNF Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),n.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram}; \ No newline at end of file +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-6AEJRKK7.js";import{n}from"./app-chunk-XHIXRSVI.js";import{n as r,r as i,t as a}from"./app-chunk-GTNCS2PH.js";import{t as o}from"./app-chunk-JWPE2WC7.js";import{t as s}from"./app-mermaid-parser.core.js";var c=n().RailroadAbnf.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=e(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=e(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=e(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=e(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=e(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:e(e=>{a.clear(),t.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new s(n);let r=n.value;t.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),t.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram}; \ No newline at end of file diff --git a/web/dist/app-architectureDiagram-NJMV4G6O.js b/web/dist/app-architectureDiagram-NJMV4G6O.js index f3b509c50..83f076457 100644 --- a/web/dist/app-architectureDiagram-NJMV4G6O.js +++ b/web/dist/app-architectureDiagram-NJMV4G6O.js @@ -1,4 +1,4 @@ -import{i as e,t}from"./app-rolldown-runtime.js";import{n}from"./app-chunk-Y2CYZVJY.js";import{m as r,p as i}from"./app-src.js";import{H as a,U as o,Y as s,a as c,b as l,f as u,q as d,v as f,w as p,x as m,y as h,z as g}from"./app-chunk-O7XYJQB3.js";import{c as _,i as v}from"./app-chunk-ZIGJFQKS.js";import{t as y}from"./app-chunk-6AEJRKK7.js";import{t as b}from"./app-chunk-JWPE2WC7.js";import{n as x}from"./app-mermaid-parser.core.js";import{i as S,r as C,t as w}from"./app-chunk-742MDFTN.js";import{n as T}from"./app-chunk-MBY4JIJT.js";import{t as E}from"./app-cytoscape.esm.js";var D=t(((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=28)})([(function(e,t,n){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){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){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(5);function l(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 u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.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},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.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},l.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},l.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},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.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 c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){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){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){var r=n(2),i=n(10),a=n(0),o=n(7),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(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 p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.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},f.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-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,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)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;cn&&(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 u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),ao&&(t=o),nc&&(r=c),a=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(6),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=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]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N}}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,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var u=(-c+Math.sqrt(c*c-4*s*l))/(2*s),d=(-c-Math.sqrt(c*c-4*s*l))/(2*s);return u>=0&&u<=1?[u]:d>=0&&d<=1?[d]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){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){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){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){var r=n(5);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){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.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.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de}}]),e}()}),(function(e,t,n){function r(){}r.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t=Math.min(this.m,this.n);this.s=function(e){for(var t=[];e-->0;)t.push(0);return t}(Math.min(this.m+1,this.n)),this.U=function(e){return function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t}(this.n),i=function(e){for(var t=[];e-->0;)t.push(0);return t}(this.m),a=!0,o=!0,s=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;k--)if(this.s[k]!==0){for(var A=k+1;A=0;L--){if(function(e,t){return e&&t}(L0;){var U=void 0,W=void 0;for(U=E-2;U>=-1&&U!==-1;U--)if(Math.abs(n[U])<=re+ne*(Math.abs(this.s[U])+Math.abs(this.s[U+1]))){n[U]=0;break}if(U===E-2)W=4;else{var G=void 0;for(G=E-1;G>=U&&G!==U;G--){var ie=(G===E?0:Math.abs(n[G]))+(G===U+1?0:Math.abs(n[G-1]));if(Math.abs(this.s[G])<=re+ne*ie){this.s[G]=0;break}}G===U?W=3:G===E-1?W=1:(W=2,U=G)}switch(U++,W){case 1:var K=n[E-2];n[E-2]=0;for(var q=E-2;q>=U;q--){var ae=r.hypot(this.s[q],K),J=this.s[q]/ae,Y=K/ae;if(this.s[q]=ae,q!==U&&(K=-Y*n[q-1],n[q-1]=J*n[q-1]),o)for(var X=0;X=this.s[U+1]);){var De=this.s[U];if(this.s[U]=this.s[U+1],this.s[U+1]=De,o&&UMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&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=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{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(D()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(D()):n.coseBase=r(n.layoutBase)})(e,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).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.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).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}),880:((e,t,n)=>{var r=n(551).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}),578:((e,t,n)=>{var r=n(551).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}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),c=n(806),l=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,f=n(551).Point,p=n(551).PointD,m=n(551).DimensionD,h=n(551).Layout,g=n(551).Integer,_=n(551).IGeometry,v=n(551).LGraph,y=n(551).Transform,b=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var S in x.prototype=Object.create(r.prototype),r)x[S]=r[S];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH<10?10:c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,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)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.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(c.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 Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.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=c.PURE_INCREMENTAL?u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2: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=c.PURE_INCREMENTAL?u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):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},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var l=this.constraints.alignmentConstraint.vertical,n=0;n=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var d=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;d.has(t)?d.get(t).push(n):d.set(t,[n]),d.has(n)?d.get(n).push(t):d.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},m=p(d,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=m.components,this.fixedComponentsOnHorizontal=m.isFixed;var h=p(f,e.fixedNodesOnVertical);this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var g=h[0];h.splice(0,1);var v=u.indexOf(g);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var S=u[b].getOtherEnd(e);if(S!=t){var C=(n+f*y)%360,w=(C+y)%360;x.branchRadialLayout(S,e,C,w,i+a,a),f++}}},x.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){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),c=i.getChild();c.add(a);for(var l=0;li?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},x.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,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},x.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,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},x.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;i0)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},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=f.rect.height)}n+=u+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(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,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},x.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var l=a/i,u=o/i,d=(n-r)**2+4*(l+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(l+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(l+r)-r;return s>m&&(m=s),m+=r*2,m},x.prototype.tileNodesByFavoringDim=function(e,t,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},l=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=l;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var u=0,d=0,f=0;f0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(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)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.widtha&&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;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=g.MAX_VALUE,p,m,h=0;h{var r=n(551).FDLayoutNode,i=n(551).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.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(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&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var a=0;r.forEach(function(e){t==`horizontal`?(f.set(e,c.has(e)?l[c.get(e)]:i.get(e)),a+=f.get(e)):(f.set(e,c.has(e)?u[c.get(e)]:i.get(e)),a+=f.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||f.set(e,a)})}else{var o=0;e.forEach(function(e){o+=t==`horizontal`?c.has(e)?l[c.get(e)]:i.get(e):c.has(e)?u[c.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){f.set(e,o)})}});for(var h=function(){var r=m.shift();e.get(r).forEach(function(e){if(f.get(e.id)o&&(o=v),ys&&(s=y)}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}var b=(r+o)/2-(a+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;f.set(E,f.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return f},v=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?l[c.get(e.left)]-l[c.get(e.right)]>=0?t++:n++:u[c.get(e.top)]-u[c.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)t.fixedNodeConstraint.forEach(function(e,t){S[t]=[e.position.x,e.position.y],C[t]=[l[c.get(e.nodeId)],u[c.get(e.nodeId)]]}),w=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return E.has(e)})),o=void 0;o=a.size>0?l[c.get(a.values().next().value)]:g(i).x,n[t].forEach(function(t){S[e]=[o,u[c.get(t)]],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},a=0;a0?l[c.get(i.values().next().value)]:g(n).y,o[t].forEach(function(t){S[e]=[l[c.get(t)],a],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},d=0;dA&&(A=k[M].length,j=M);if(A0){var W={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:l[c.get(e.nodeId)],y:u[c.get(e.nodeId)]},r=e.position,i=h(r,n);W.x+=i.x,W.y+=i.y}),W.x/=t.fixedNodeConstraint.length,W.y/=t.fixedNodeConstraint.length,l.forEach(function(e,t){l[t]+=W.x}),u.forEach(function(e,t){u[t]+=W.y}),t.fixedNodeConstraint.forEach(function(e){l[c.get(e.nodeId)]=e.position.x,u[c.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var G=t.alignmentConstraint.vertical,ie=function(e){var t=new Set;G[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?l[c.get(n.values().next().value)]:g(t).x,t.forEach(function(e){E.has(e)||(l[c.get(e)]=i)})},K=0;K0?u[c.get(n.values().next().value)]:g(t).y,t.forEach(function(e){E.has(e)||(u[c.get(e)]=i)})},J=0;J{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),k=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(O()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(O()):n.cytoscapeFcose=r(n.coseBase)})(e,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n0&&l.merge(e)});for(var u=0;u1){l=s[0],u=l.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length0&&r.set(`dummy`+(r.size+1),p),m},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=r(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;ya&&(a=b),xs&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+i)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;ra&&(a=c),ls&&(s=u)});var T=e.x-(a+i)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;mc&&(i=c),au&&(o=u),s{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,l=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,d=e.eles,f=d.nodes(),p=d.edges(),m=void 0,h=void 0,g=void 0,_={};e.randomize&&(m=t.nodeIndexes,h=t.xCoords,g=t.yCoords);var v=function(e){return typeof e==`function`},y=function(e,t){return v(e)?e(t):e},b=r.calcParentsWithoutChildren(n,d),x=function e(t,n,i,c){for(var l=n.length,u=0;u0){var S=void 0;S=i.getGraphManager().add(i.newGraph(),p),e(S,f,i,c)}}},S=function(t,n,r){for(var i=0,a=0,o=0;o0?i/a:v(e.idealEdgeLength)?50:e.idealEdgeLength,u.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)},C=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(u.MAX_ITERATIONS=l.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(u.TILING_COMPARE_BY=e.tilingCompareBy),c.QUALITY=e.quality==`proof`?2:0,u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!e.randomize,u.ANIMATE=l.ANIMATE=c.ANIMATE=e.animate,u.TILE=e.tile,u.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!e.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),e.step==`enforced`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),e.step==`cose`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),e.step==`all`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!!e.randomize,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),u.TREE_REDUCTION_ON_INCREMENTAL=!(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint);var w=new i,T=w.newGraphManager();return x(T.addRoot(),r.getTopMostNodes(f),w,e),S(w,T,p),C(w,e),w.runLayout(),_}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n0)if(f){var p=o.getTopMostNodes(t.eles.nodes());if(l=o.connectComponents(n,t.eles,p),l.forEach(function(e){var t=e.boundingBox();u.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var m=n.collection();if(t.tile){var h=new Map,g=[],_=[],v=0,y={nodeIndexes:h,xCoords:g,yCoords:_},b=[];if(l.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){m.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),v++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),b.push(t))}),m.length>1){var x=m.boundingBox();u.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),l.push(m),i.push(y);for(var S=b.length-1;S>=0;S--)l.splice(b[S],1),i.splice(b[S],1),u.splice(b[S],1)}}l.forEach(function(e,n){t.eles=e,a.push(c(t,i[n])),o.relocateComponent(u[n],a[n],t)})}else l.forEach(function(e,n){o.relocateComponent(u[n],i[n],t)});var C=new Set;if(l.length>1){var w=[],T=r.filter(function(e){return e.css(`display`)==`none`});l.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(T).length>0){var s={};s.edges=[],s.nodes=[];var c=void 0;e.nodes().not(T).forEach(function(e){if(t.quality==`draft`)if(!e.isParent())c=r.get(e.id()),s.nodes.push({x:i[n].xCoords[c]-e.boundingbox().w/2,y:i[n].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`)if(t.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=o.calcBoundingBox(c,i[n].xCoords,i[n].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(i[n].xCoords[u]),f.push(i[n].yCoords[u]);if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);s.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else a[n][c.id()]&&a[n][l.id()]&&s.edges.push({startX:a[n][c.id()].getCenterX(),startY:a[n][c.id()].getCenterY(),endX:a[n][l.id()].getCenterX(),endY:a[n][l.id()].getCenterY()})}),s.nodes.length>0&&(w.push(s),C.add(n))}});var E=d.packComponents(w,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+E[t].dx}),r=e.yCoords.map(function(e){return e+E[t].dy});e.xCoords=n,e.yCoords=r});else{var D=0;C.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+E[D].dx,n.getCenterY()+E[D].dy)}),D++})}}}else{var O=t.eles.boundingBox();if(u.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),t.randomize){var k=s(t);i.push(k)}t.quality=="default"||t.quality==`proof`?(a.push(c(t,i[0])),o.relocateComponent(u[0],a[0],t)):o.relocateComponent(u[0],i[0],t)}var A=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}var c=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var j=o.calcParentsWithoutChildren(n,r),M=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(M),r.nodes().not(`:parent`).not(M).layoutPositions(e,t,A),j.length>0&&j.forEach(function(e){e.position(A(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),c=new Map,l=new Map,u=new Map,d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=void 0,b=1e8,x=1e-9,S=e.piTol,C=e.samplingType,w=e.nodeSeparation,T=void 0,E=function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var m=d[o],_=0;_u&&(u=h[x],f=x)}return f},O=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*y);for(var n=0;n=1)break;u=l}for(var h=0;h=1)break;u=l}for(var b=0;b0&&(r.isParent()?d[t].push(u.get(r.id())):d[t].push(r.id()))})});var B=function(e){var n=l.get(e),r=void 0;c.get(e).forEach(function(i){r=t.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[l.get(r)].push(e)})},V=!0,ee=!1,te=void 0;try{for(var H=c.keys()[Symbol.iterator](),ne;!(V=(ne=H.next()).done);V=!0){var re=ne.value;B(re)}}catch(e){ee=!0,te=e}finally{try{!V&&H.return&&H.return()}finally{if(ee)throw te}}y=l.size;var U=void 0;if(y>2){T=y{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})}))(),1),A={L:`left`,R:`right`,T:`top`,B:`bottom`},j={L:n(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:n(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:n(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:n(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},M={L:n((e,t)=>e-t+2,`L`),R:n((e,t)=>e-2,`R`),T:n((e,t)=>e-t+2,`T`),B:n((e,t)=>e-2,`B`)},N=n(function(e){return F(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),P=n(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),F=n(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),I=n(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),L=n(function(e,t){let n=F(e)&&I(t),r=I(e)&&F(t);return n||r},`isArchitectureDirectionXY`),R=n(function(e){let t=e[0],n=e[1],r=F(t)&&I(n),i=I(t)&&F(n);return r||i},`isArchitecturePairXY`),z=n(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),B=n(function(e,t){let n=`${e}${t}`;return z(n)?n:void 0},`getArchitectureDirectionPair`),V=n(function([e,t],n){let r=n[0],i=n[1];return F(r)?I(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:F(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ee=n(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),te=n(function(e,t){return L(e,t)?`bend`:F(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),H=n(function(e){return e.type===`service`},`isArchitectureService`),ne=n(function(e){return e.type===`junction`},`isArchitectureJunction`),re=n((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),U=n(e=>e.data(),`edgeData`),W=n(e=>e.data(),`nodeData`),G=u.architecture,ie=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=o,this.getAccTitle=h,this.setDiagramTitle=d,this.getDiagramTitle=p,this.getAccDescription=f,this.setAccDescription=a,this.clear()}static{n(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,c()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(H)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ne)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!P(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!P(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[n,r]of this.nodes.entries()){let i=new Map;for(let t of r.edges){let r=this.getNode(t.lhsId)?.in,a=this.getNode(t.rhsId)?.in;if(r&&a&&r!==a){let n=te(t.lhsDir,t.rhsDir);n!==`bend`&&e.set(re(r,a),n)}if(t.lhsId===n){let e=B(t.lhsDir,t.rhsDir);e&&i.set(e,t.rhsId)}else{let e=B(t.rhsDir,t.lhsDir);e&&i.set(e,t.lhsId)}}t.set(n,i)}let r=new Set,i=new Set(t.keys()),a=n(e=>{let n=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){r.add(e),i.delete(e);let o=t.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=n.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,t)=>{r.has(e)||(n.set(e,V([c,l],t)),a.push(e))})}}return n},`BFS`),o=[];for(;i.size>0;){let e=i.values().next().value;o.push(a(e))}this.dataStructures={adjList:t,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return v({...G,...l().architecture})}getConfigField(e){return this.getConfig()[e]}},K=n((e,t)=>{b(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),q={parser:{yy:void 0},parse:n(async e=>{let t=await x(`architecture`,e);r.debug(t);let n=q.parser?.yy;if(!(n instanceof ie))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);K(t,n)},`parse`)},ae=n(e=>` +import{i as e,t}from"./app-rolldown-runtime.js";import{n}from"./app-chunk-Y2CYZVJY.js";import{m as r,p as i}from"./app-src.js";import{H as a,U as o,Y as s,a as c,b as l,f as u,q as d,v as f,w as p,x as m,y as h,z as g}from"./app-chunk-O7XYJQB3.js";import{c as _,i as v}from"./app-chunk-ZIGJFQKS.js";import{t as y}from"./app-chunk-6AEJRKK7.js";import{i as b,r as x,t as S}from"./app-chunk-742MDFTN.js";import{n as C}from"./app-chunk-MBY4JIJT.js";import{t as w}from"./app-chunk-JWPE2WC7.js";import{n as T}from"./app-mermaid-parser.core.js";import{t as E}from"./app-cytoscape.esm.js";var D=t(((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=28)})([(function(e,t,n){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){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){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(5);function l(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 u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.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},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.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},l.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},l.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},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.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 c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){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){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){var r=n(2),i=n(10),a=n(0),o=n(7),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(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 p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.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},f.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-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,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)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;cn&&(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 u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),ao&&(t=o),nc&&(r=c),a=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(6),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=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]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N}}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,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var u=(-c+Math.sqrt(c*c-4*s*l))/(2*s),d=(-c-Math.sqrt(c*c-4*s*l))/(2*s);return u>=0&&u<=1?[u]:d>=0&&d<=1?[d]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){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){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){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){var r=n(5);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){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.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.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de}}]),e}()}),(function(e,t,n){function r(){}r.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t=Math.min(this.m,this.n);this.s=function(e){for(var t=[];e-->0;)t.push(0);return t}(Math.min(this.m+1,this.n)),this.U=function(e){return function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t}(this.n),i=function(e){for(var t=[];e-->0;)t.push(0);return t}(this.m),a=!0,o=!0,s=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;k--)if(this.s[k]!==0){for(var A=k+1;A=0;L--){if(function(e,t){return e&&t}(L0;){var U=void 0,W=void 0;for(U=E-2;U>=-1&&U!==-1;U--)if(Math.abs(n[U])<=re+ne*(Math.abs(this.s[U])+Math.abs(this.s[U+1]))){n[U]=0;break}if(U===E-2)W=4;else{var G=void 0;for(G=E-1;G>=U&&G!==U;G--){var ie=(G===E?0:Math.abs(n[G]))+(G===U+1?0:Math.abs(n[G-1]));if(Math.abs(this.s[G])<=re+ne*ie){this.s[G]=0;break}}G===U?W=3:G===E-1?W=1:(W=2,U=G)}switch(U++,W){case 1:var K=n[E-2];n[E-2]=0;for(var q=E-2;q>=U;q--){var ae=r.hypot(this.s[q],K),J=this.s[q]/ae,Y=K/ae;if(this.s[q]=ae,q!==U&&(K=-Y*n[q-1],n[q-1]=J*n[q-1]),o)for(var X=0;X=this.s[U+1]);){var De=this.s[U];if(this.s[U]=this.s[U+1],this.s[U+1]=De,o&&UMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&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=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{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(D()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(D()):n.coseBase=r(n.layoutBase)})(e,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).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.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).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}),880:((e,t,n)=>{var r=n(551).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}),578:((e,t,n)=>{var r=n(551).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}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),c=n(806),l=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,f=n(551).Point,p=n(551).PointD,m=n(551).DimensionD,h=n(551).Layout,g=n(551).Integer,_=n(551).IGeometry,v=n(551).LGraph,y=n(551).Transform,b=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var S in x.prototype=Object.create(r.prototype),r)x[S]=r[S];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH<10?10:c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,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)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.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(c.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 Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.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=c.PURE_INCREMENTAL?u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2: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=c.PURE_INCREMENTAL?u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):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},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var l=this.constraints.alignmentConstraint.vertical,n=0;n=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var d=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;d.has(t)?d.get(t).push(n):d.set(t,[n]),d.has(n)?d.get(n).push(t):d.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},m=p(d,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=m.components,this.fixedComponentsOnHorizontal=m.isFixed;var h=p(f,e.fixedNodesOnVertical);this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var g=h[0];h.splice(0,1);var v=u.indexOf(g);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var S=u[b].getOtherEnd(e);if(S!=t){var C=(n+f*y)%360,w=(C+y)%360;x.branchRadialLayout(S,e,C,w,i+a,a),f++}}},x.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){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),c=i.getChild();c.add(a);for(var l=0;li?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},x.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,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},x.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,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},x.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;i0)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},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=f.rect.height)}n+=u+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(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,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},x.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var l=a/i,u=o/i,d=(n-r)**2+4*(l+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(l+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(l+r)-r;return s>m&&(m=s),m+=r*2,m},x.prototype.tileNodesByFavoringDim=function(e,t,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},l=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=l;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var u=0,d=0,f=0;f0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(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)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.widtha&&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;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=g.MAX_VALUE,p,m,h=0;h{var r=n(551).FDLayoutNode,i=n(551).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.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(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&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var a=0;r.forEach(function(e){t==`horizontal`?(f.set(e,c.has(e)?l[c.get(e)]:i.get(e)),a+=f.get(e)):(f.set(e,c.has(e)?u[c.get(e)]:i.get(e)),a+=f.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||f.set(e,a)})}else{var o=0;e.forEach(function(e){o+=t==`horizontal`?c.has(e)?l[c.get(e)]:i.get(e):c.has(e)?u[c.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){f.set(e,o)})}});for(var h=function(){var r=m.shift();e.get(r).forEach(function(e){if(f.get(e.id)o&&(o=v),ys&&(s=y)}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}var b=(r+o)/2-(a+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;f.set(E,f.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return f},v=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?l[c.get(e.left)]-l[c.get(e.right)]>=0?t++:n++:u[c.get(e.top)]-u[c.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)t.fixedNodeConstraint.forEach(function(e,t){S[t]=[e.position.x,e.position.y],C[t]=[l[c.get(e.nodeId)],u[c.get(e.nodeId)]]}),w=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return E.has(e)})),o=void 0;o=a.size>0?l[c.get(a.values().next().value)]:g(i).x,n[t].forEach(function(t){S[e]=[o,u[c.get(t)]],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},a=0;a0?l[c.get(i.values().next().value)]:g(n).y,o[t].forEach(function(t){S[e]=[l[c.get(t)],a],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},d=0;dA&&(A=k[M].length,j=M);if(A0){var W={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:l[c.get(e.nodeId)],y:u[c.get(e.nodeId)]},r=e.position,i=h(r,n);W.x+=i.x,W.y+=i.y}),W.x/=t.fixedNodeConstraint.length,W.y/=t.fixedNodeConstraint.length,l.forEach(function(e,t){l[t]+=W.x}),u.forEach(function(e,t){u[t]+=W.y}),t.fixedNodeConstraint.forEach(function(e){l[c.get(e.nodeId)]=e.position.x,u[c.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var G=t.alignmentConstraint.vertical,ie=function(e){var t=new Set;G[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?l[c.get(n.values().next().value)]:g(t).x,t.forEach(function(e){E.has(e)||(l[c.get(e)]=i)})},K=0;K0?u[c.get(n.values().next().value)]:g(t).y,t.forEach(function(e){E.has(e)||(u[c.get(e)]=i)})},J=0;J{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),k=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(O()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(O()):n.cytoscapeFcose=r(n.coseBase)})(e,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n0&&l.merge(e)});for(var u=0;u1){l=s[0],u=l.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length0&&r.set(`dummy`+(r.size+1),p),m},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=r(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;ya&&(a=b),xs&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+i)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;ra&&(a=c),ls&&(s=u)});var T=e.x-(a+i)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;mc&&(i=c),au&&(o=u),s{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,l=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,d=e.eles,f=d.nodes(),p=d.edges(),m=void 0,h=void 0,g=void 0,_={};e.randomize&&(m=t.nodeIndexes,h=t.xCoords,g=t.yCoords);var v=function(e){return typeof e==`function`},y=function(e,t){return v(e)?e(t):e},b=r.calcParentsWithoutChildren(n,d),x=function e(t,n,i,c){for(var l=n.length,u=0;u0){var S=void 0;S=i.getGraphManager().add(i.newGraph(),p),e(S,f,i,c)}}},S=function(t,n,r){for(var i=0,a=0,o=0;o0?i/a:v(e.idealEdgeLength)?50:e.idealEdgeLength,u.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)},C=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(u.MAX_ITERATIONS=l.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(u.TILING_COMPARE_BY=e.tilingCompareBy),c.QUALITY=e.quality==`proof`?2:0,u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!e.randomize,u.ANIMATE=l.ANIMATE=c.ANIMATE=e.animate,u.TILE=e.tile,u.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!e.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),e.step==`enforced`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),e.step==`cose`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),e.step==`all`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!!e.randomize,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),u.TREE_REDUCTION_ON_INCREMENTAL=!(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint);var w=new i,T=w.newGraphManager();return x(T.addRoot(),r.getTopMostNodes(f),w,e),S(w,T,p),C(w,e),w.runLayout(),_}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n0)if(f){var p=o.getTopMostNodes(t.eles.nodes());if(l=o.connectComponents(n,t.eles,p),l.forEach(function(e){var t=e.boundingBox();u.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var m=n.collection();if(t.tile){var h=new Map,g=[],_=[],v=0,y={nodeIndexes:h,xCoords:g,yCoords:_},b=[];if(l.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){m.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),v++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),b.push(t))}),m.length>1){var x=m.boundingBox();u.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),l.push(m),i.push(y);for(var S=b.length-1;S>=0;S--)l.splice(b[S],1),i.splice(b[S],1),u.splice(b[S],1)}}l.forEach(function(e,n){t.eles=e,a.push(c(t,i[n])),o.relocateComponent(u[n],a[n],t)})}else l.forEach(function(e,n){o.relocateComponent(u[n],i[n],t)});var C=new Set;if(l.length>1){var w=[],T=r.filter(function(e){return e.css(`display`)==`none`});l.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(T).length>0){var s={};s.edges=[],s.nodes=[];var c=void 0;e.nodes().not(T).forEach(function(e){if(t.quality==`draft`)if(!e.isParent())c=r.get(e.id()),s.nodes.push({x:i[n].xCoords[c]-e.boundingbox().w/2,y:i[n].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`)if(t.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=o.calcBoundingBox(c,i[n].xCoords,i[n].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(i[n].xCoords[u]),f.push(i[n].yCoords[u]);if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);s.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else a[n][c.id()]&&a[n][l.id()]&&s.edges.push({startX:a[n][c.id()].getCenterX(),startY:a[n][c.id()].getCenterY(),endX:a[n][l.id()].getCenterX(),endY:a[n][l.id()].getCenterY()})}),s.nodes.length>0&&(w.push(s),C.add(n))}});var E=d.packComponents(w,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+E[t].dx}),r=e.yCoords.map(function(e){return e+E[t].dy});e.xCoords=n,e.yCoords=r});else{var D=0;C.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+E[D].dx,n.getCenterY()+E[D].dy)}),D++})}}}else{var O=t.eles.boundingBox();if(u.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),t.randomize){var k=s(t);i.push(k)}t.quality=="default"||t.quality==`proof`?(a.push(c(t,i[0])),o.relocateComponent(u[0],a[0],t)):o.relocateComponent(u[0],i[0],t)}var A=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}var c=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var j=o.calcParentsWithoutChildren(n,r),M=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(M),r.nodes().not(`:parent`).not(M).layoutPositions(e,t,A),j.length>0&&j.forEach(function(e){e.position(A(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),c=new Map,l=new Map,u=new Map,d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=void 0,b=1e8,x=1e-9,S=e.piTol,C=e.samplingType,w=e.nodeSeparation,T=void 0,E=function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var m=d[o],_=0;_u&&(u=h[x],f=x)}return f},O=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*y);for(var n=0;n=1)break;u=l}for(var h=0;h=1)break;u=l}for(var b=0;b0&&(r.isParent()?d[t].push(u.get(r.id())):d[t].push(r.id()))})});var B=function(e){var n=l.get(e),r=void 0;c.get(e).forEach(function(i){r=t.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[l.get(r)].push(e)})},V=!0,ee=!1,te=void 0;try{for(var H=c.keys()[Symbol.iterator](),ne;!(V=(ne=H.next()).done);V=!0){var re=ne.value;B(re)}}catch(e){ee=!0,te=e}finally{try{!V&&H.return&&H.return()}finally{if(ee)throw te}}y=l.size;var U=void 0;if(y>2){T=y{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})}))(),1),A={L:`left`,R:`right`,T:`top`,B:`bottom`},j={L:n(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:n(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:n(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:n(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},M={L:n((e,t)=>e-t+2,`L`),R:n((e,t)=>e-2,`R`),T:n((e,t)=>e-t+2,`T`),B:n((e,t)=>e-2,`B`)},N=n(function(e){return F(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),P=n(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),F=n(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),I=n(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),L=n(function(e,t){let n=F(e)&&I(t),r=I(e)&&F(t);return n||r},`isArchitectureDirectionXY`),R=n(function(e){let t=e[0],n=e[1],r=F(t)&&I(n),i=I(t)&&F(n);return r||i},`isArchitecturePairXY`),z=n(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),B=n(function(e,t){let n=`${e}${t}`;return z(n)?n:void 0},`getArchitectureDirectionPair`),V=n(function([e,t],n){let r=n[0],i=n[1];return F(r)?I(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:F(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ee=n(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),te=n(function(e,t){return L(e,t)?`bend`:F(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),H=n(function(e){return e.type===`service`},`isArchitectureService`),ne=n(function(e){return e.type===`junction`},`isArchitectureJunction`),re=n((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),U=n(e=>e.data(),`edgeData`),W=n(e=>e.data(),`nodeData`),G=u.architecture,ie=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=o,this.getAccTitle=h,this.setDiagramTitle=d,this.getDiagramTitle=p,this.getAccDescription=f,this.setAccDescription=a,this.clear()}static{n(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,c()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(H)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ne)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!P(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!P(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[n,r]of this.nodes.entries()){let i=new Map;for(let t of r.edges){let r=this.getNode(t.lhsId)?.in,a=this.getNode(t.rhsId)?.in;if(r&&a&&r!==a){let n=te(t.lhsDir,t.rhsDir);n!==`bend`&&e.set(re(r,a),n)}if(t.lhsId===n){let e=B(t.lhsDir,t.rhsDir);e&&i.set(e,t.rhsId)}else{let e=B(t.rhsDir,t.lhsDir);e&&i.set(e,t.lhsId)}}t.set(n,i)}let r=new Set,i=new Set(t.keys()),a=n(e=>{let n=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){r.add(e),i.delete(e);let o=t.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=n.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,t)=>{r.has(e)||(n.set(e,V([c,l],t)),a.push(e))})}}return n},`BFS`),o=[];for(;i.size>0;){let e=i.values().next().value;o.push(a(e))}this.dataStructures={adjList:t,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return v({...G,...l().architecture})}getConfigField(e){return this.getConfig()[e]}},K=n((e,t)=>{w(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),q={parser:{yy:void 0},parse:n(async e=>{let t=await T(`architecture`,e);r.debug(t);let n=q.parser?.yy;if(!(n instanceof ie))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);K(t,n)},`parse`)},ae=n(e=>` .edge { stroke-width: ${e.archEdgeWidth}; stroke: ${e.archEdgeColor}; @@ -29,8 +29,8 @@ import{i as e,t}from"./app-rolldown-runtime.js";import{n}from"./app-chunk-Y2CYZV display: -webkit-box; -webkit-box-orient: vertical; } -`,`getStyles`);function J(e,t){if(e===0)return t();let n=Math.random,r=e>>>0;Math.random=function(){r=r+1831565813>>>0;let e=r;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=n}}n(J,`withSeededRandom`);var Y=n(e=>`${e}`,`wrapIcon`),X={prefix:`mermaid-architecture`,height:80,width:80,icons:{database:{body:Y(``)},server:{body:Y(``)},disk:{body:Y(``)},internet:{body:Y(``)},cloud:{body:Y(``)},unknown:S,blank:{body:Y(``)}}},oe=n(async function(e,t,n,r){let i=n.getConfigField(`padding`),a=n.getConfigField(`iconSize`),o=a/2,s=a/6,c=s/2;await Promise.all(t.edges().map(async t=>{let{source:a,sourceDir:l,sourceArrow:u,sourceGroup:d,target:f,targetDir:p,targetArrow:h,targetGroup:g,label:v}=U(t),{x:y,y:b}=t[0].sourceEndpoint(),{x,y:S}=t[0].midpoint(),{x:C,y:w}=t[0].targetEndpoint(),E=i+4;if(d&&(F(l)?y+=l===`L`?-E:E:b+=l===`T`?-E:E+18),g&&(F(p)?C+=p===`L`?-E:E:w+=p===`T`?-E:E+18),!d&&n.getNode(a)?.type===`junction`&&(F(l)?y+=l===`L`?o:-o:b+=l===`T`?o:-o),!g&&n.getNode(f)?.type===`junction`&&(F(p)?C+=p===`L`?o:-o:w+=p===`T`?o:-o),t[0]._private.rscratch){let t=e.insert(`g`);if(t.insert(`path`).attr(`d`,`M ${y},${b} L ${x},${S} L${C},${w} `).attr(`class`,`edge`).attr(`id`,`${r}-${_(a,f,{prefix:`L`})}`),u){let e=F(l)?M[l](y,s):y-c,n=I(l)?M[l](b,s):b-c;t.insert(`polygon`).attr(`points`,j[l](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(h){let e=F(p)?M[p](C,s):C-c,n=I(p)?M[p](w,s):w-c;t.insert(`polygon`).attr(`points`,j[p](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(v){let e=L(l,p)?`XY`:F(l)?`X`:`Y`,n=0;n=e===`X`?Math.abs(y-C):e===`Y`?Math.abs(b-w)/1.5:Math.abs(y-C)/2;let r=t.append(`g`);if(await T(r,v,{useHtmlLabels:!1,width:n,classes:`architecture-service-label`},m()),r.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e===`X`)r.attr(`transform`,`translate(`+x+`, `+S+`)`);else if(e===`Y`)r.attr(`transform`,`translate(`+x+`, `+S+`) rotate(-90)`);else if(e===`XY`){let e=B(l,p);if(e&&R(e)){let t=r.node().getBoundingClientRect(),[n,i]=ee(e);r.attr(`dominant-baseline`,`auto`).attr(`transform`,`rotate(${-1*n*i*45})`);let a=r.node().getBoundingClientRect();r.attr(`transform`,` +`,`getStyles`);function J(e,t){if(e===0)return t();let n=Math.random,r=e>>>0;Math.random=function(){r=r+1831565813>>>0;let e=r;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=n}}n(J,`withSeededRandom`);var Y=n(e=>`${e}`,`wrapIcon`),X={prefix:`mermaid-architecture`,height:80,width:80,icons:{database:{body:Y(``)},server:{body:Y(``)},disk:{body:Y(``)},internet:{body:Y(``)},cloud:{body:Y(``)},unknown:b,blank:{body:Y(``)}}},oe=n(async function(e,t,n,r){let i=n.getConfigField(`padding`),a=n.getConfigField(`iconSize`),o=a/2,s=a/6,c=s/2;await Promise.all(t.edges().map(async t=>{let{source:a,sourceDir:l,sourceArrow:u,sourceGroup:d,target:f,targetDir:p,targetArrow:h,targetGroup:g,label:v}=U(t),{x:y,y:b}=t[0].sourceEndpoint(),{x,y:S}=t[0].midpoint(),{x:w,y:T}=t[0].targetEndpoint(),E=i+4;if(d&&(F(l)?y+=l===`L`?-E:E:b+=l===`T`?-E:E+18),g&&(F(p)?w+=p===`L`?-E:E:T+=p===`T`?-E:E+18),!d&&n.getNode(a)?.type===`junction`&&(F(l)?y+=l===`L`?o:-o:b+=l===`T`?o:-o),!g&&n.getNode(f)?.type===`junction`&&(F(p)?w+=p===`L`?o:-o:T+=p===`T`?o:-o),t[0]._private.rscratch){let t=e.insert(`g`);if(t.insert(`path`).attr(`d`,`M ${y},${b} L ${x},${S} L${w},${T} `).attr(`class`,`edge`).attr(`id`,`${r}-${_(a,f,{prefix:`L`})}`),u){let e=F(l)?M[l](y,s):y-c,n=I(l)?M[l](b,s):b-c;t.insert(`polygon`).attr(`points`,j[l](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(h){let e=F(p)?M[p](w,s):w-c,n=I(p)?M[p](T,s):T-c;t.insert(`polygon`).attr(`points`,j[p](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(v){let e=L(l,p)?`XY`:F(l)?`X`:`Y`,n=0;n=e===`X`?Math.abs(y-w):e===`Y`?Math.abs(b-T)/1.5:Math.abs(y-w)/2;let r=t.append(`g`);if(await C(r,v,{useHtmlLabels:!1,width:n,classes:`architecture-service-label`},m()),r.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e===`X`)r.attr(`transform`,`translate(`+x+`, `+S+`)`);else if(e===`Y`)r.attr(`transform`,`translate(`+x+`, `+S+`) rotate(-90)`);else if(e===`XY`){let e=B(l,p);if(e&&R(e)){let t=r.node().getBoundingClientRect(),[n,i]=ee(e);r.attr(`dominant-baseline`,`auto`).attr(`transform`,`rotate(${-1*n*i*45})`);let a=r.node().getBoundingClientRect();r.attr(`transform`,` translate(${x}, ${S-t.height/2}) translate(${n*a.width/2}, ${i*a.height/2}) rotate(${-1*n*i*45}, 0, ${t.height/2}) - `)}}}}}))},`drawEdges`),Z=n(async function(e,t,n,r){let i=n.getConfigField(`padding`)*.75,a=n.getConfigField(`fontSize`),o=n.getConfigField(`iconSize`)/2;await Promise.all(t.nodes().map(async t=>{let s=W(t);if(s.type===`group`){let{h:c,w:l,x1:u,y1:d}=t.boundingBox(),f=e.append(`rect`);f.attr(`id`,`${r}-group-${s.id}`).attr(`x`,u+o).attr(`y`,d+o).attr(`width`,l).attr(`height`,c).attr(`class`,`node-bkg`);let p=e.append(`g`),h=u,g=d;if(s.icon){let e=p.append(`g`);e.html(`${await w(s.icon,{height:i,width:i,fallbackPrefix:X.prefix})}`),e.attr(`transform`,`translate(`+(h+o+1)+`, `+(g+o+1)+`)`),h+=i,g+=a/2-1-2}if(s.label){let e=p.append(`g`);await T(e,s.label,{useHtmlLabels:!1,width:l,classes:`architecture-service-label`},m()),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`start`).attr(`text-anchor`,`start`),e.attr(`transform`,`translate(`+(h+o+4)+`, `+(g+o+2)+`)`)}n.setElementForId(s.id,f)}}))},`drawGroups`),se=n(async function(e,t,n,r){let i=m();for(let a of n){let n=t.append(`g`),o=e.getConfigField(`iconSize`);if(a.title){let e=n.append(`g`);await T(e,a.title,{useHtmlLabels:!1,width:o*1.5,classes:`architecture-service-label`},i),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e.attr(`transform`,`translate(`+o/2+`, `+o+`)`)}let s=n.append(`g`);if(a.icon)s.html(`${await w(a.icon,{height:o,width:o,fallbackPrefix:X.prefix})}`);else if(a.iconText){s.html(`${await w(`blank`,{height:o,width:o,fallbackPrefix:X.prefix})}`);let e=s.append(`g`).append(`foreignObject`).attr(`width`,o).attr(`height`,o).append(`div`).attr(`class`,`node-icon-text`).attr(`style`,`height: ${o}px;`).append(`div`).html(g(a.iconText,i)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue(`font-size`).replace(/\D/g,``))??16;e.attr(`style`,`-webkit-line-clamp: ${Math.floor((o-2)/t)};`)}else s.append(`path`).attr(`class`,`node-bkg`).attr(`id`,`${r}-node-${a.id}`).attr(`d`,`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);n.attr(`id`,`${r}-service-${a.id}`).attr(`class`,`architecture-service`);let{width:c,height:l}=n.node().getBBox();a.width=c,a.height=l,e.setElementForId(a.id,n)}return 0},`drawServices`),ce=n(function(e,t,n,r){n.forEach(n=>{let i=t.append(`g`),a=e.getConfigField(`iconSize`);i.append(`g`).append(`rect`).attr(`id`,`${r}-node-${n.id}`).attr(`fill-opacity`,`0`).attr(`width`,a).attr(`height`,a),i.attr(`class`,`architecture-junction`);let{width:o,height:s}=i._groups[0][0].getBBox();i.width=o,i.height=s,e.setElementForId(n.id,i)})},`drawJunctions`);C([{name:X.prefix,icons:X}]),E.use(k.default);function le(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`service`,id:e.id,icon:e.icon,label:e.title,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-service`})})}n(le,`addServices`);function ue(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`junction`,id:e.id,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-junction`})})}n(ue,`addJunctions`);function de(e,t){t.nodes().map(t=>{let n=W(t);n.type!==`group`&&(n.x=t.position().x,n.y=t.position().y,e.getElementById(n.id).attr(`transform`,`translate(`+(n.x||0)+`,`+(n.y||0)+`)`))})}n(de,`positionNodes`);function fe(e,t){e.forEach(e=>{t.add({group:`nodes`,data:{type:`group`,id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:`node-group`})})}n(fe,`addGroups`);function pe(e,t){e.forEach(e=>{let{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:o,lhsDir:s,rhsDir:c,rhsGroup:l,title:u}=e,d=L(e.lhsDir,e.rhsDir)?`segments`:`straight`,f={id:`${n}-${r}`,label:u,source:n,sourceDir:s,sourceArrow:i,sourceGroup:a,sourceEndpoint:s===`L`?`0 50%`:s===`R`?`100% 50%`:s===`T`?`50% 0`:`50% 100%`,target:r,targetDir:c,targetArrow:o,targetGroup:l,targetEndpoint:c===`L`?`0 50%`:c===`R`?`100% 50%`:c===`T`?`50% 0`:`50% 100%`};t.add({group:`edges`,data:f,classes:d})})}n(pe,`addEdges`);function me(e,t,r,i=[]){let a=n((e,t)=>{let n=new Map;for(let[i,a]of e.entries()){let e=`${i}`,o=0,s=[...a.entries()];if(s.length===1){n.set(e,s[0][1]);continue}for(let i=0;i{let n=new Map,r=new Map;return t.forEach(([t,i],a)=>{let o=e.getNode(a)?.in??`default`,s=n.get(i)??new Map;n.has(i)||n.set(i,s);let c=r.get(t)??new Map;r.has(t)||r.set(t,c);for(let e of[s,c]){let t=e.get(o)??[];e.has(o)||e.set(o,t),t.push(a)}}),{horiz:[...a(n,`horizontal`).values()].filter(e=>e.length>1),vert:[...a(r,`vertical`).values()].filter(e=>e.length>1)}}).reduce(([e,t],{horiz:n,vert:r})=>[[...e,...n],[...t,...r]],[[],[]]),c=new Set;i.forEach(e=>e.members.forEach(e=>c.add(e)));let l=n(e=>e.filter(e=>!e.some(e=>c.has(e))),`dropOverlapping`),u=l(o),d=l(s);return i.forEach(e=>{e.members.length<2||(e.direction===`row`?u.push([...e.members]):d.push([...e.members]))}),{horizontal:u,vertical:d}}n(me,`getAlignments`);function he(e,t,r=[]){let i=[],a=t.getConfigField(`iconSize`),o=t.getConfigField(`idealEdgeLengthMultiplier`),s=o*a,c=new Set;r.forEach(e=>{for(let t=0;t`${e[0]},${e[1]}`,`posToStr`),u=n(e=>e.split(`,`).map(e=>parseInt(e)),`strToPos`);return e.forEach(e=>{let t=new Map([...e.entries()].map(([e,t])=>[l(t),e])),n=[l([0,0])],r={},s={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let e=n.shift();if(e){r[e]=1;let d=t.get(e);if(d){let f=u(e);Object.entries(s).forEach(([e,s])=>{let u=l([f[0]+s[0],f[1]+s[1]]),p=t.get(u);if(p&&!r[u]){if(n.push(u),c.has(`${d}|${p}`))return;i.push({[A[e]]:p,[A[N(e)]]:d,gap:o*a})}})}}}}),i}n(he,`getRelativeConstraints`);function ge(e,t,a,o,s,{spatialMaps:c,groupAlignments:l}){return new Promise(u=>{let d=i(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),f=E({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`straight`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`edge[label]`,style:{label:`data(label)`}},{selector:`edge.segments`,style:{"curve-style":`segments`,"segment-weights":`0`,"segment-distances":[.5],"edge-distances":`endpoints`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`node`,style:{"compound-sizing-wrt-labels":`include`}},{selector:`node[label]`,style:{"text-valign":`bottom`,"text-halign":`center`,"font-size":`${s.getConfigField(`fontSize`)}px`}},{selector:`.node-service`,style:{label:`data(label)`,width:`data(width)`,height:`data(height)`}},{selector:`.node-junction`,style:{width:`data(width)`,height:`data(height)`}},{selector:`.node-group`,style:{padding:`${s.getConfigField(`padding`)}px`}}],layout:{name:`grid`,boundingBox:{x1:0,x2:100,y1:0,y2:100}}});d.remove(),fe(a,f),le(e,f,s),ue(t,f,s),pe(o,f);let p=s.getLayoutHints(),m=me(s,c,l,p),h=he(c,s,p),g=s.getConfigField(`iconSize`),_=s.getConfigField(`idealEdgeLengthMultiplier`)*g,v=.5*g,y=s.getConfigField(`edgeElasticity`),b=s.getConfigField(`seed`),x=f.layout({name:`fcose`,quality:`proof`,randomize:s.getConfigField(`randomize`),nodeSeparation:s.getConfigField(`nodeSeparation`),numIter:s.getConfigField(`numIter`),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){let[t,n]=e.connectedNodes(),{parent:r}=W(t),{parent:i}=W(n);return r===i?_:v},edgeElasticity(e){let[t,n]=e.connectedNodes(),{parent:r}=W(t),{parent:i}=W(n);return r===i?y:.001},alignmentConstraint:m,relativePlacementConstraint:h});x.one(`layoutstop`,()=>{function e(e,t,n,r){let i,a,{x:o,y:s}=e,{x:c,y:l}=t;a=(r-s+(o-n)*(s-l)/(o-c))/Math.sqrt(1+((s-l)/(o-c))**2),i=Math.sqrt((r-s)**2+(n-o)**2-a**2);let u=Math.sqrt((c-o)**2+(l-s)**2);i/=u;let d=(c-o)*(r-s)-(l-s)*(n-o);switch(!0){case d>=0:d=1;break;case d<0:d=-1}let f=(c-o)*(n-o)+(l-s)*(r-s);switch(!0){case f>=0:f=1;break;case f<0:f=-1}return a=Math.abs(a)*d,i*=f,{distances:a,weights:i}}n(e,`getSegmentWeights`),f.startBatch();for(let t of Object.values(f.edges()))if(t.data?.()){let{x:n,y:r}=t.source().position(),{x:i,y:a}=t.target().position();if(n!==i&&r!==a){let n=t.sourceEndpoint(),r=t.targetEndpoint(),{sourceDir:i}=U(t),[a,o]=I(i)?[n.x,r.y]:[r.x,n.y],{weights:s,distances:c}=e(n,r,a,o);t.style(`segment-distances`,c),t.style(`segment-weights`,s)}}f.endBatch(),J(b,()=>x.run())});try{J(b,()=>x.run())}catch(e){throw e instanceof RangeError&&e.message.includes(`Invalid array length`)?Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):e}f.ready(e=>{r.info(`Ready`,e),u(f)})})}n(ge,`layoutArchitecture`);var _e={parser:q,get db(){return new ie},renderer:{draw:n(async(e,t,n,r)=>{let i=r.db;i.setDiagramId(t);let a=i.getServices(),o=i.getJunctions(),c=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),d=y(t),f=d.append(`g`);f.attr(`class`,`architecture-edges`);let p=d.append(`g`);p.attr(`class`,`architecture-services`);let m=d.append(`g`);m.attr(`class`,`architecture-groups`),await se(i,p,a,t),ce(i,p,o,t);let h=await ge(a,o,c,l,i,u);await oe(f,h,i,t),await Z(m,h,i,t),de(i,h),s(void 0,d,i.getConfigField(`padding`),i.getConfigField(`useMaxWidth`))},`draw`)},styles:ae};export{_e as diagram}; \ No newline at end of file + `)}}}}}))},`drawEdges`),Z=n(async function(e,t,n,r){let i=n.getConfigField(`padding`)*.75,a=n.getConfigField(`fontSize`),o=n.getConfigField(`iconSize`)/2;await Promise.all(t.nodes().map(async t=>{let s=W(t);if(s.type===`group`){let{h:c,w:l,x1:u,y1:d}=t.boundingBox(),f=e.append(`rect`);f.attr(`id`,`${r}-group-${s.id}`).attr(`x`,u+o).attr(`y`,d+o).attr(`width`,l).attr(`height`,c).attr(`class`,`node-bkg`);let p=e.append(`g`),h=u,g=d;if(s.icon){let e=p.append(`g`);e.html(`${await S(s.icon,{height:i,width:i,fallbackPrefix:X.prefix})}`),e.attr(`transform`,`translate(`+(h+o+1)+`, `+(g+o+1)+`)`),h+=i,g+=a/2-1-2}if(s.label){let e=p.append(`g`);await C(e,s.label,{useHtmlLabels:!1,width:l,classes:`architecture-service-label`},m()),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`start`).attr(`text-anchor`,`start`),e.attr(`transform`,`translate(`+(h+o+4)+`, `+(g+o+2)+`)`)}n.setElementForId(s.id,f)}}))},`drawGroups`),se=n(async function(e,t,n,r){let i=m();for(let a of n){let n=t.append(`g`),o=e.getConfigField(`iconSize`);if(a.title){let e=n.append(`g`);await C(e,a.title,{useHtmlLabels:!1,width:o*1.5,classes:`architecture-service-label`},i),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e.attr(`transform`,`translate(`+o/2+`, `+o+`)`)}let s=n.append(`g`);if(a.icon)s.html(`${await S(a.icon,{height:o,width:o,fallbackPrefix:X.prefix})}`);else if(a.iconText){s.html(`${await S(`blank`,{height:o,width:o,fallbackPrefix:X.prefix})}`);let e=s.append(`g`).append(`foreignObject`).attr(`width`,o).attr(`height`,o).append(`div`).attr(`class`,`node-icon-text`).attr(`style`,`height: ${o}px;`).append(`div`).html(g(a.iconText,i)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue(`font-size`).replace(/\D/g,``))??16;e.attr(`style`,`-webkit-line-clamp: ${Math.floor((o-2)/t)};`)}else s.append(`path`).attr(`class`,`node-bkg`).attr(`id`,`${r}-node-${a.id}`).attr(`d`,`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);n.attr(`id`,`${r}-service-${a.id}`).attr(`class`,`architecture-service`);let{width:c,height:l}=n.node().getBBox();a.width=c,a.height=l,e.setElementForId(a.id,n)}return 0},`drawServices`),ce=n(function(e,t,n,r){n.forEach(n=>{let i=t.append(`g`),a=e.getConfigField(`iconSize`);i.append(`g`).append(`rect`).attr(`id`,`${r}-node-${n.id}`).attr(`fill-opacity`,`0`).attr(`width`,a).attr(`height`,a),i.attr(`class`,`architecture-junction`);let{width:o,height:s}=i._groups[0][0].getBBox();i.width=o,i.height=s,e.setElementForId(n.id,i)})},`drawJunctions`);x([{name:X.prefix,icons:X}]),E.use(k.default);function le(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`service`,id:e.id,icon:e.icon,label:e.title,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-service`})})}n(le,`addServices`);function ue(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`junction`,id:e.id,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-junction`})})}n(ue,`addJunctions`);function de(e,t){t.nodes().map(t=>{let n=W(t);n.type!==`group`&&(n.x=t.position().x,n.y=t.position().y,e.getElementById(n.id).attr(`transform`,`translate(`+(n.x||0)+`,`+(n.y||0)+`)`))})}n(de,`positionNodes`);function fe(e,t){e.forEach(e=>{t.add({group:`nodes`,data:{type:`group`,id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:`node-group`})})}n(fe,`addGroups`);function pe(e,t){e.forEach(e=>{let{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:o,lhsDir:s,rhsDir:c,rhsGroup:l,title:u}=e,d=L(e.lhsDir,e.rhsDir)?`segments`:`straight`,f={id:`${n}-${r}`,label:u,source:n,sourceDir:s,sourceArrow:i,sourceGroup:a,sourceEndpoint:s===`L`?`0 50%`:s===`R`?`100% 50%`:s===`T`?`50% 0`:`50% 100%`,target:r,targetDir:c,targetArrow:o,targetGroup:l,targetEndpoint:c===`L`?`0 50%`:c===`R`?`100% 50%`:c===`T`?`50% 0`:`50% 100%`};t.add({group:`edges`,data:f,classes:d})})}n(pe,`addEdges`);function me(e,t,r,i=[]){let a=n((e,t)=>{let n=new Map;for(let[i,a]of e.entries()){let e=`${i}`,o=0,s=[...a.entries()];if(s.length===1){n.set(e,s[0][1]);continue}for(let i=0;i{let n=new Map,r=new Map;return t.forEach(([t,i],a)=>{let o=e.getNode(a)?.in??`default`,s=n.get(i)??new Map;n.has(i)||n.set(i,s);let c=r.get(t)??new Map;r.has(t)||r.set(t,c);for(let e of[s,c]){let t=e.get(o)??[];e.has(o)||e.set(o,t),t.push(a)}}),{horiz:[...a(n,`horizontal`).values()].filter(e=>e.length>1),vert:[...a(r,`vertical`).values()].filter(e=>e.length>1)}}).reduce(([e,t],{horiz:n,vert:r})=>[[...e,...n],[...t,...r]],[[],[]]),c=new Set;i.forEach(e=>e.members.forEach(e=>c.add(e)));let l=n(e=>e.filter(e=>!e.some(e=>c.has(e))),`dropOverlapping`),u=l(o),d=l(s);return i.forEach(e=>{e.members.length<2||(e.direction===`row`?u.push([...e.members]):d.push([...e.members]))}),{horizontal:u,vertical:d}}n(me,`getAlignments`);function he(e,t,r=[]){let i=[],a=t.getConfigField(`iconSize`),o=t.getConfigField(`idealEdgeLengthMultiplier`),s=o*a,c=new Set;r.forEach(e=>{for(let t=0;t`${e[0]},${e[1]}`,`posToStr`),u=n(e=>e.split(`,`).map(e=>parseInt(e)),`strToPos`);return e.forEach(e=>{let t=new Map([...e.entries()].map(([e,t])=>[l(t),e])),n=[l([0,0])],r={},s={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let e=n.shift();if(e){r[e]=1;let d=t.get(e);if(d){let f=u(e);Object.entries(s).forEach(([e,s])=>{let u=l([f[0]+s[0],f[1]+s[1]]),p=t.get(u);if(p&&!r[u]){if(n.push(u),c.has(`${d}|${p}`))return;i.push({[A[e]]:p,[A[N(e)]]:d,gap:o*a})}})}}}}),i}n(he,`getRelativeConstraints`);function ge(e,t,a,o,s,{spatialMaps:c,groupAlignments:l}){return new Promise(u=>{let d=i(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),f=E({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`straight`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`edge[label]`,style:{label:`data(label)`}},{selector:`edge.segments`,style:{"curve-style":`segments`,"segment-weights":`0`,"segment-distances":[.5],"edge-distances":`endpoints`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`node`,style:{"compound-sizing-wrt-labels":`include`}},{selector:`node[label]`,style:{"text-valign":`bottom`,"text-halign":`center`,"font-size":`${s.getConfigField(`fontSize`)}px`}},{selector:`.node-service`,style:{label:`data(label)`,width:`data(width)`,height:`data(height)`}},{selector:`.node-junction`,style:{width:`data(width)`,height:`data(height)`}},{selector:`.node-group`,style:{padding:`${s.getConfigField(`padding`)}px`}}],layout:{name:`grid`,boundingBox:{x1:0,x2:100,y1:0,y2:100}}});d.remove(),fe(a,f),le(e,f,s),ue(t,f,s),pe(o,f);let p=s.getLayoutHints(),m=me(s,c,l,p),h=he(c,s,p),g=s.getConfigField(`iconSize`),_=s.getConfigField(`idealEdgeLengthMultiplier`)*g,v=.5*g,y=s.getConfigField(`edgeElasticity`),b=s.getConfigField(`seed`),x=f.layout({name:`fcose`,quality:`proof`,randomize:s.getConfigField(`randomize`),nodeSeparation:s.getConfigField(`nodeSeparation`),numIter:s.getConfigField(`numIter`),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){let[t,n]=e.connectedNodes(),{parent:r}=W(t),{parent:i}=W(n);return r===i?_:v},edgeElasticity(e){let[t,n]=e.connectedNodes(),{parent:r}=W(t),{parent:i}=W(n);return r===i?y:.001},alignmentConstraint:m,relativePlacementConstraint:h});x.one(`layoutstop`,()=>{function e(e,t,n,r){let i,a,{x:o,y:s}=e,{x:c,y:l}=t;a=(r-s+(o-n)*(s-l)/(o-c))/Math.sqrt(1+((s-l)/(o-c))**2),i=Math.sqrt((r-s)**2+(n-o)**2-a**2);let u=Math.sqrt((c-o)**2+(l-s)**2);i/=u;let d=(c-o)*(r-s)-(l-s)*(n-o);switch(!0){case d>=0:d=1;break;case d<0:d=-1}let f=(c-o)*(n-o)+(l-s)*(r-s);switch(!0){case f>=0:f=1;break;case f<0:f=-1}return a=Math.abs(a)*d,i*=f,{distances:a,weights:i}}n(e,`getSegmentWeights`),f.startBatch();for(let t of Object.values(f.edges()))if(t.data?.()){let{x:n,y:r}=t.source().position(),{x:i,y:a}=t.target().position();if(n!==i&&r!==a){let n=t.sourceEndpoint(),r=t.targetEndpoint(),{sourceDir:i}=U(t),[a,o]=I(i)?[n.x,r.y]:[r.x,n.y],{weights:s,distances:c}=e(n,r,a,o);t.style(`segment-distances`,c),t.style(`segment-weights`,s)}}f.endBatch(),J(b,()=>x.run())});try{J(b,()=>x.run())}catch(e){throw e instanceof RangeError&&e.message.includes(`Invalid array length`)?Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):e}f.ready(e=>{r.info(`Ready`,e),u(f)})})}n(ge,`layoutArchitecture`);var _e={parser:q,get db(){return new ie},renderer:{draw:n(async(e,t,n,r)=>{let i=r.db;i.setDiagramId(t);let a=i.getServices(),o=i.getJunctions(),c=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),d=y(t),f=d.append(`g`);f.attr(`class`,`architecture-edges`);let p=d.append(`g`);p.attr(`class`,`architecture-services`);let m=d.append(`g`);m.attr(`class`,`architecture-groups`),await se(i,p,a,t),ce(i,p,o,t);let h=await ge(a,o,c,l,i,u);await oe(f,h,i,t),await Z(m,h,i,t),de(i,h),s(void 0,d,i.getConfigField(`padding`),i.getConfigField(`useMaxWidth`))},`draw`)},styles:ae};export{_e as diagram}; \ No newline at end of file diff --git a/web/dist/app-blockDiagram-BEXU5L5S.js b/web/dist/app-blockDiagram-BEXU5L5S.js index b61fbc5ee..571efdf08 100644 --- a/web/dist/app-blockDiagram-BEXU5L5S.js +++ b/web/dist/app-blockDiagram-BEXU5L5S.js @@ -1,9 +1,9 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{a as r,b as i,c as a,it as o,s,x as c}from"./app-chunk-O7XYJQB3.js";import{t as l}from"./app-channel.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,L as y,M as b,N as x,O as S,P as C,R as w,T,U as E,V as D,W as O,b as k,j as A,k as j,l as M,v as ee,w as te,z as ne}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{t as re}from"./app-chunk-5VM5RSS4.js";import{t as ie}from"./app-chunk-DUW6YSOI.js";import"./app-chunk-7PRAP22T.js";import{i as ae,n as oe,o as se,r as ce,s as le}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import{i as ue,r as de}from"./app-chunk-5DYCD2WN.js";import{a as fe,c as pe,i as me,l as he}from"./app-chunk-Z7XXMR3K.js";import{t as ge}from"./app-graphlib.js";function _e(e){return Array.isArray(e)}function ve(e){if(k(e))return e;let t=g(e);if(!ye(e))return{};if(_e(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(ee(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]`?xe(r,e):N(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 N(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Se(n,e),N(n,e),be(n,e),n}function ye(e){switch(g(e)){case f:case T:case te:case p:case m:case S:case j:case u:case x:case A:case b:case C:case h:case v:case y:case w:case ne:case d:case E:case O:case D:case _:return!0;default:return!1}}function N(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function be(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}function Se(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{a as r,b as i,c as a,it as o,s,x as c}from"./app-chunk-O7XYJQB3.js";import{t as l}from"./app-channel.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,L as y,M as b,N as x,O as S,P as C,R as w,T,U as E,V as D,W as O,b as k,j as A,k as j,l as M,v as ee,w as te,z as ne}from"./app-chunk-ZIGJFQKS.js";import{t as re}from"./app-chunk-DUW6YSOI.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{i as ie,n as ae,o as oe,r as se,s as ce}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import{i as le,r as ue}from"./app-chunk-5DYCD2WN.js";import{a as de,c as fe,i as pe,l as me}from"./app-chunk-Z7XXMR3K.js";import{t as he}from"./app-chunk-5VM5RSS4.js";import{t as ge}from"./app-graphlib.js";function _e(e){return Array.isArray(e)}function ve(e){if(k(e))return e;let t=g(e);if(!ye(e))return{};if(_e(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(ee(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]`?xe(r,e):N(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 N(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Se(n,e),N(n,e),be(n,e),n}function ye(e){switch(g(e)){case f:case T:case te:case p:case m:case S:case j:case u:case x:case A:case b:case C:case h:case v:case y:case w:case ne:case d:case E:case O:case D:case _:return!0;default:return!1}}function N(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function be(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}function Se(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:e(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:e(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;at[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. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return e(v,`Parser`),v.prototype=_,_.Parser=v,new v})();P.parser=P;var Ce=P,F=new Map,I=[],L=new Map,R=`color`,z=`fill`,we=`bgFill`,B=`,`,V=new Map,H=``,Te=e(e=>s.sanitizeText(e,c()),`sanitizeText`),Ee=e(function(e,t=``){let n=V.get(e);n||(n={id:e,styles:[],textStyles:[]},V.set(e,n)),t?.split(B).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(R).exec(e)){let e=t.replace(z,we).replace(R,z);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),De=e(function(e,t=``){let n=F.get(e);t!=null&&(n.styles=t.split(B))},`addStyle2Node`),Oe=e(function(e,t){e.split(`,`).forEach(function(e){let n=F.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},F.set(t,n)}n.classes||(n.classes=[]),n.classes.push(t)})},`setCssClass`),U=0,ke=e((e,n)=>{let r=e.flat(),i=[],a=r.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of r){if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&t.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&=Te(e.label),e.type===`classDef`){Ee(e.id,e.css);continue}if(e.type===`applyClass`){Oe(e.id,e?.styleClass??``);continue}if(e.type===`applyStyles`){e?.stylesStr&&De(e.id,e?.stylesStr);continue}if(e.type===`column-setting`)n.columns=e.columns??-1;else if(e.type===`edge`){let t=(L.get(e.id)??0)+1;L.set(e.id,t),e.id=t+`-`+e.id,I.push(e)}else{e.label||=e.type===`composite`?``:e.id;let t=F.get(e.id);if(t===void 0?(e.type===`composite`&&(e.colorIndex=U++),F.set(e.id,e)):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&ke(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n{t.debug(`Clear called`),r(),G={id:`root`,type:`composite`,children:[],columns:-1},F=new Map([[`root`,G]]),W=[],V=new Map,I=[],L=new Map,H=``,U=0},`clear`);function je(e){switch(t.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return t.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}e(je,`typeStr2Type`);function Me(e){switch(t.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}e(Me,`edgeTypeStr2Type`);function Ne(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}e(Ne,`edgeStrToEdgeData`);function Pe(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}e(Pe,`edgeStrToEdgeStartData`);function Fe(e){return e.includes(`==`)?`thick`:`normal`}e(Fe,`edgeStrToThickness`);function Ie(e){return e.includes(`.-`)?`dotted`:`solid`}e(Ie,`edgeStrToPattern`);var Le=0,Re={getConfig:e(()=>i().block,`getConfig`),typeStr2Type:je,edgeTypeStr2Type:Me,edgeStrToEdgeData:Ne,edgeStrToEdgeStartData:Pe,edgeStrToThickness:Fe,edgeStrToPattern:Ie,getLogger:e(()=>t,`getLogger`),getBlocksFlat:e(()=>[...F.values()],`getBlocksFlat`),getBlocks:e(()=>W||[],`getBlocks`),getEdges:e(()=>I,`getEdges`),setHierarchy:e(e=>{G.children=e,ke(e,G),W=G.children},`setHierarchy`),getBlock:e(e=>F.get(e),`getBlock`),setBlock:e(e=>{F.set(e.id,e)},`setBlock`),getColumns:e(e=>{let t=F.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:e(function(){return V},`getClasses`),clear:Ae,generateId:e(()=>(Le++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Le),`generateId`),setDiagramId:e(e=>{H=e},`setDiagramId`),getDiagramId:e(()=>H,`getDiagramId`)},ze=e(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!ae(t,r))return``;let i=se(e.look),a=ce(n),o=``;for(let t=0;t0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return e(v,`Parser`),v.prototype=_,_.Parser=v,new v})();P.parser=P;var Ce=P,F=new Map,I=[],L=new Map,R=`color`,z=`fill`,we=`bgFill`,B=`,`,V=new Map,H=``,Te=e(e=>s.sanitizeText(e,c()),`sanitizeText`),Ee=e(function(e,t=``){let n=V.get(e);n||(n={id:e,styles:[],textStyles:[]},V.set(e,n)),t?.split(B).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(R).exec(e)){let e=t.replace(z,we).replace(R,z);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),De=e(function(e,t=``){let n=F.get(e);t!=null&&(n.styles=t.split(B))},`addStyle2Node`),Oe=e(function(e,t){e.split(`,`).forEach(function(e){let n=F.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},F.set(t,n)}n.classes||(n.classes=[]),n.classes.push(t)})},`setCssClass`),U=0,ke=e((e,n)=>{let r=e.flat(),i=[],a=r.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of r){if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&t.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&=Te(e.label),e.type===`classDef`){Ee(e.id,e.css);continue}if(e.type===`applyClass`){Oe(e.id,e?.styleClass??``);continue}if(e.type===`applyStyles`){e?.stylesStr&&De(e.id,e?.stylesStr);continue}if(e.type===`column-setting`)n.columns=e.columns??-1;else if(e.type===`edge`){let t=(L.get(e.id)??0)+1;L.set(e.id,t),e.id=t+`-`+e.id,I.push(e)}else{e.label||=e.type===`composite`?``:e.id;let t=F.get(e.id);if(t===void 0?(e.type===`composite`&&(e.colorIndex=U++),F.set(e.id,e)):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&ke(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n{t.debug(`Clear called`),r(),G={id:`root`,type:`composite`,children:[],columns:-1},F=new Map([[`root`,G]]),W=[],V=new Map,I=[],L=new Map,H=``,U=0},`clear`);function je(e){switch(t.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return t.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}e(je,`typeStr2Type`);function Me(e){switch(t.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}e(Me,`edgeTypeStr2Type`);function Ne(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}e(Ne,`edgeStrToEdgeData`);function Pe(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}e(Pe,`edgeStrToEdgeStartData`);function Fe(e){return e.includes(`==`)?`thick`:`normal`}e(Fe,`edgeStrToThickness`);function Ie(e){return e.includes(`.-`)?`dotted`:`solid`}e(Ie,`edgeStrToPattern`);var Le=0,Re={getConfig:e(()=>i().block,`getConfig`),typeStr2Type:je,edgeTypeStr2Type:Me,edgeStrToEdgeData:Ne,edgeStrToEdgeStartData:Pe,edgeStrToThickness:Fe,edgeStrToPattern:Ie,getLogger:e(()=>t,`getLogger`),getBlocksFlat:e(()=>[...F.values()],`getBlocksFlat`),getBlocks:e(()=>W||[],`getBlocks`),getEdges:e(()=>I,`getEdges`),setHierarchy:e(e=>{G.children=e,ke(e,G),W=G.children},`setHierarchy`),getBlock:e(e=>F.get(e),`getBlock`),setBlock:e(e=>{F.set(e.id,e)},`setBlock`),getColumns:e(e=>{let t=F.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:e(function(){return V},`getClasses`),clear:Ae,generateId:e(()=>(Le++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Le),`generateId`),setDiagramId:e(e=>{H=e},`setDiagramId`),getDiagramId:e(()=>H,`getDiagramId`)},ze=e(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!ie(t,r))return``;let i=oe(e.look),a=se(n),o=``;for(let t=0;t{let n=0,r=0;for(let i of e.children){let{width:e,height:a,x:o,y:s}=i.size??{width:0,height:0,x:0,y:0};if(t.debug(`getMaxChildSize abc95 child:`,i.id,`width:`,e,`height:`,a,`x:`,o,`y:`,s,i.type),i.type===`space`)continue;let c=e/(i.widthInColumns??1);c>n&&(n=c),a>r&&(r=a)}return{width:n,height:r}},`getMaxChildSize`);function J(e,n,r=0,i=0,a=8){t.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,r),e?.size?.width||(e.size={width:r,height:i,x:0,y:0});let o=0,s=0;if(e.children?.length>0){for(let t of e.children)J(t,n,0,0,a);let c=Ve(e);o=c.width,s=c.height,t.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,o,s);for(let n of e.children)n.size&&(t.debug(`abc95 Setting size of children of ${e.id} id=${n.id} ${o} ${s} ${JSON.stringify(n.size)}`),n.size.width=o*(n.widthInColumns??1)+a*((n.widthInColumns??1)-1),n.size.height=s,n.size.x=0,n.size.y=0,t.debug(`abc95 updating size of ${e.id} children child:${n.id} maxWidth:${o} maxHeight:${s}`));for(let t of e.children)J(t,n,o,s,a);let l=e.columns??-1,u=0;for(let t of e.children)u+=t.widthInColumns??1;let d=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(n>0){let r=(p-n*a-a)/n;t.debug(`abc95 (growing to fit) width`,e.id,p,e.size?.width,r);for(let t of e.children)t.size&&(t.size.width=r)}}e.size={width:p,height:m,x:0,y:0}}t.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}e(J,`setBlockSizes`);function Y(e,n,r=8){t.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(t.debug(`layoutBlocks columns abc95`,e.id,`=>`,i,e),e.children&&e.children.length>0){let a=e?.children[0]?.size?.width??0,o=e.children.length*a+(e.children.length-1)*r;t.debug(`widthOfChildren 88`,o,`posX`);let s=new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=q(i,t),r=s.get(e)??0;n.size.height>r&&s.set(e,n.size.height);let a=n?.widthInColumns??1;i>0&&(a=Math.min(a,i-t%i)),t+=a}}let c=new Map;{let e=0,t=[...s.keys()].sort((e,t)=>e-t);for(let n of t)c.set(n,e),e+=(s.get(n)??0)+r}let l=0;t.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,d=0;for(let a of e.children){let o=e;if(!a.size)continue;let{width:f,height:p}=a.size,{px:m,py:h}=q(i,l);if(h!=d&&(d=h,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,t.debug(`New row in layout for block`,e.id,` and child `,a.id,d)),t.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`),o.size){let e=f/2;a.size.x=u+r+e,t.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${e} padding=${r} width=${f} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(a?.widthInColumns??1)/2}`),u=a.size.x+e;let n=c.get(h)??0,i=s.get(h)??p;a.size.y=o.size.y-o.size.height/2+n+i/2+r,t.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f*(a?.widthInColumns??1)/2}`)}a.children&&Y(a,n,r);let g=a?.widthInColumns??1;i>0&&(g=Math.min(g,i-l%i)),l+=g,t.debug(`abc88 columnsPos`,a,l)}}t.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}e(Y,`layoutBlocks`);function X(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=X(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}e(X,`findBounds`);function He(e){let n=e.getBlock(`root`);if(!n)return;let r=c()?.block?.padding??8;J(n,e,0,0,r),Y(n,e,r),t.debug(`getBlocks`,JSON.stringify(n,null,2));let{minX:i,minY:a,maxX:o,maxY:s}=X(n),l=s-a;return{x:i,y:a,width:o-i,height:l}}e(He,`layout`);function Z(e,t,n=!1){let r=e,a=`default`;(r?.classes?.length||0)>0&&(a=(r?.classes??[]).join(` `)),a+=` flowchart-label`;let o=(r?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]),s=0,c=`rect`,l;switch(r.type){case`round`:s=5,c=`rect`;break;case`composite`:s=0,c=`composite`,l=0;break;case`square`:c=`rect`;break;case`diamond`:c=`question`;break;case`hexagon`:c=`hexagon`;break;case`block_arrow`:c=`block_arrow`;break;case`odd`:c=`rect_left_inv_arrow`;break;case`lean_right`:c=`lean_right`;break;case`lean_left`:c=`lean_left`;break;case`trapezoid`:c=`trapezoid`;break;case`inv_trapezoid`:c=`inv_trapezoid`;break;case`rect_left_inv_arrow`:c=`rect_left_inv_arrow`;break;case`circle`:c=`circle`;break;case`ellipse`:c=`ellipse`;break;case`stadium`:c=`stadium`;break;case`subroutine`:c=`subroutine`;break;case`cylinder`:c=`cylinder`;break;case`group`:c=`rect`;break;case`doublecircle`:c=`doublecircle`;break;default:c=`rect`}let u=M(r?.styles??[]),d=r.label,f=r.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:u.labelStyle,shape:c,label:d,labelText:d,rx:s,ry:s,class:a,cssClasses:a,cssStyles:r?.styles??[],cssCompiledStyles:o,style:u.style,id:r.id,domId:p?`${p}-${r.id}`:r.id,isGroup:!1,directions:r.directions,width:f.width||void 0,height:f.height||void 0,wrappingWidth:f.width||1/0,x:f.x,y:f.y,positioned:n,intersect:void 0,padding:l??i()?.block?.padding??0,widthInColumns:r.widthInColumns??1,colorIndex:r.colorIndex,look:i().look}}e(Z,`getNodeFromBlock`);async function Ue(e,t,n){let r=Z(t,n,!1);if(t.type===`group`)return;let a=i(),o=await de(e,r,{config:a}),s=o.node()?.getBBox()??{width:0,height:0},c=n.getBlock(r.id);c.size={width:s.width,height:s.height,x:0,y:0,node:o},n.setBlock(c),o.remove()}e(Ue,`calculateBlockSize`);async function We(e,t,n){let r=Z(t,n,!0);if(n.getBlock(r.id).type!==`space`){let n=i(),a=await de(e,r,{config:n});r.colorIndex!==void 0&&le(a,r.colorIndex,n.theme,n.themeVariables?.borderColorArray),t.intersect=r?.intersect,ue(r)}}e(We,`insertBlockPositioned`);async function Q(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await Q(e,i.children,n,r)}e(Q,`performOperations`);async function Ge(e,t,n){await Q(e,t,n,Ue)}e(Ge,`calculateBlockSizes`);async function Ke(e,t,n){await Q(e,t,n,We)}e(Ke,`insertBlocks`);async function $(e,t,n,r,i){let a=new ge({multigraph:!0,compound:!0});a.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),o=r.getBlock(n.end);if(t?.size&&o?.size){let r=t.size,s=o.size,c=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}],l=i?`${i}-${n.id}`:n.id,u=`${n.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${n.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;me(e,{...n,id:l,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u},{},`block`,a.node(n.start),a.node(n.end),i),n.label&&(await fe(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u}),he({...n,x:c[1].x,y:c[1].y},{originalPath:c}))}}}e($,`insertEdges`);var qe={parser:Ce,db:Re,renderer:{draw:e(async function(e,r,o,s){let{securityLevel:c,block:l}=i(),u=s.db;u.setDiagramId(r);let d;c===`sandbox`&&(d=n(`#i`+r));let f=n(c===`sandbox`?d.nodes()[0].contentDocument.body:`body`),p=c===`sandbox`?f.select(`[id="${r}"]`):n(`[id="${r}"]`);ie(p,i()),pe(p,[`point`,`circle`,`cross`],s.type,r);let m=u.getBlocks(),h=u.getBlocksFlat(),g=u.getEdges(),_=p.insert(`g`).attr(`class`,`block`);await Ge(_,m,u);let v=He(u);await Ke(_,m,u),await $(_,g,h,u,r);let y=_.node()?.getBBox(),b=y&&Number.isFinite(y.width)&&Number.isFinite(y.height)?y:v;if(b){let e=Math.max(1,Math.round(.125*(b.width/b.height))),n=b.height+e+10,r=b.width+10,{useMaxWidth:i}=l;a(p,n,r,!!i),t.debug(`Here Bounds`,v,b),p.attr(`viewBox`,`${b.x-5} ${b.y-5} ${b.width+10} ${b.height+10}`)}},`draw`),getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`)},styles:Be};export{qe as diagram}; \ No newline at end of file + ${he()} +`,`getStyles`);function q(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}e(q,`calculateBlockPosition`);var Ve=e(e=>{let n=0,r=0;for(let i of e.children){let{width:e,height:a,x:o,y:s}=i.size??{width:0,height:0,x:0,y:0};if(t.debug(`getMaxChildSize abc95 child:`,i.id,`width:`,e,`height:`,a,`x:`,o,`y:`,s,i.type),i.type===`space`)continue;let c=e/(i.widthInColumns??1);c>n&&(n=c),a>r&&(r=a)}return{width:n,height:r}},`getMaxChildSize`);function J(e,n,r=0,i=0,a=8){t.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,r),e?.size?.width||(e.size={width:r,height:i,x:0,y:0});let o=0,s=0;if(e.children?.length>0){for(let t of e.children)J(t,n,0,0,a);let c=Ve(e);o=c.width,s=c.height,t.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,o,s);for(let n of e.children)n.size&&(t.debug(`abc95 Setting size of children of ${e.id} id=${n.id} ${o} ${s} ${JSON.stringify(n.size)}`),n.size.width=o*(n.widthInColumns??1)+a*((n.widthInColumns??1)-1),n.size.height=s,n.size.x=0,n.size.y=0,t.debug(`abc95 updating size of ${e.id} children child:${n.id} maxWidth:${o} maxHeight:${s}`));for(let t of e.children)J(t,n,o,s,a);let l=e.columns??-1,u=0;for(let t of e.children)u+=t.widthInColumns??1;let d=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(n>0){let r=(p-n*a-a)/n;t.debug(`abc95 (growing to fit) width`,e.id,p,e.size?.width,r);for(let t of e.children)t.size&&(t.size.width=r)}}e.size={width:p,height:m,x:0,y:0}}t.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}e(J,`setBlockSizes`);function Y(e,n,r=8){t.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(t.debug(`layoutBlocks columns abc95`,e.id,`=>`,i,e),e.children&&e.children.length>0){let a=e?.children[0]?.size?.width??0,o=e.children.length*a+(e.children.length-1)*r;t.debug(`widthOfChildren 88`,o,`posX`);let s=new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=q(i,t),r=s.get(e)??0;n.size.height>r&&s.set(e,n.size.height);let a=n?.widthInColumns??1;i>0&&(a=Math.min(a,i-t%i)),t+=a}}let c=new Map;{let e=0,t=[...s.keys()].sort((e,t)=>e-t);for(let n of t)c.set(n,e),e+=(s.get(n)??0)+r}let l=0;t.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,d=0;for(let a of e.children){let o=e;if(!a.size)continue;let{width:f,height:p}=a.size,{px:m,py:h}=q(i,l);if(h!=d&&(d=h,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,t.debug(`New row in layout for block`,e.id,` and child `,a.id,d)),t.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`),o.size){let e=f/2;a.size.x=u+r+e,t.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${e} padding=${r} width=${f} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(a?.widthInColumns??1)/2}`),u=a.size.x+e;let n=c.get(h)??0,i=s.get(h)??p;a.size.y=o.size.y-o.size.height/2+n+i/2+r,t.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f*(a?.widthInColumns??1)/2}`)}a.children&&Y(a,n,r);let g=a?.widthInColumns??1;i>0&&(g=Math.min(g,i-l%i)),l+=g,t.debug(`abc88 columnsPos`,a,l)}}t.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}e(Y,`layoutBlocks`);function X(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=X(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}e(X,`findBounds`);function He(e){let n=e.getBlock(`root`);if(!n)return;let r=c()?.block?.padding??8;J(n,e,0,0,r),Y(n,e,r),t.debug(`getBlocks`,JSON.stringify(n,null,2));let{minX:i,minY:a,maxX:o,maxY:s}=X(n),l=s-a;return{x:i,y:a,width:o-i,height:l}}e(He,`layout`);function Z(e,t,n=!1){let r=e,a=`default`;(r?.classes?.length||0)>0&&(a=(r?.classes??[]).join(` `)),a+=` flowchart-label`;let o=(r?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]),s=0,c=`rect`,l;switch(r.type){case`round`:s=5,c=`rect`;break;case`composite`:s=0,c=`composite`,l=0;break;case`square`:c=`rect`;break;case`diamond`:c=`question`;break;case`hexagon`:c=`hexagon`;break;case`block_arrow`:c=`block_arrow`;break;case`odd`:c=`rect_left_inv_arrow`;break;case`lean_right`:c=`lean_right`;break;case`lean_left`:c=`lean_left`;break;case`trapezoid`:c=`trapezoid`;break;case`inv_trapezoid`:c=`inv_trapezoid`;break;case`rect_left_inv_arrow`:c=`rect_left_inv_arrow`;break;case`circle`:c=`circle`;break;case`ellipse`:c=`ellipse`;break;case`stadium`:c=`stadium`;break;case`subroutine`:c=`subroutine`;break;case`cylinder`:c=`cylinder`;break;case`group`:c=`rect`;break;case`doublecircle`:c=`doublecircle`;break;default:c=`rect`}let u=M(r?.styles??[]),d=r.label,f=r.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:u.labelStyle,shape:c,label:d,labelText:d,rx:s,ry:s,class:a,cssClasses:a,cssStyles:r?.styles??[],cssCompiledStyles:o,style:u.style,id:r.id,domId:p?`${p}-${r.id}`:r.id,isGroup:!1,directions:r.directions,width:f.width||void 0,height:f.height||void 0,wrappingWidth:f.width||1/0,x:f.x,y:f.y,positioned:n,intersect:void 0,padding:l??i()?.block?.padding??0,widthInColumns:r.widthInColumns??1,colorIndex:r.colorIndex,look:i().look}}e(Z,`getNodeFromBlock`);async function Ue(e,t,n){let r=Z(t,n,!1);if(t.type===`group`)return;let a=i(),o=await ue(e,r,{config:a}),s=o.node()?.getBBox()??{width:0,height:0},c=n.getBlock(r.id);c.size={width:s.width,height:s.height,x:0,y:0,node:o},n.setBlock(c),o.remove()}e(Ue,`calculateBlockSize`);async function We(e,t,n){let r=Z(t,n,!0);if(n.getBlock(r.id).type!==`space`){let n=i(),a=await ue(e,r,{config:n});r.colorIndex!==void 0&&ce(a,r.colorIndex,n.theme,n.themeVariables?.borderColorArray),t.intersect=r?.intersect,le(r)}}e(We,`insertBlockPositioned`);async function Q(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await Q(e,i.children,n,r)}e(Q,`performOperations`);async function Ge(e,t,n){await Q(e,t,n,Ue)}e(Ge,`calculateBlockSizes`);async function Ke(e,t,n){await Q(e,t,n,We)}e(Ke,`insertBlocks`);async function $(e,t,n,r,i){let a=new ge({multigraph:!0,compound:!0});a.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),o=r.getBlock(n.end);if(t?.size&&o?.size){let r=t.size,s=o.size,c=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}],l=i?`${i}-${n.id}`:n.id,u=`${n.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${n.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;pe(e,{...n,id:l,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u},{},`block`,a.node(n.start),a.node(n.end),i),n.label&&(await de(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u}),me({...n,x:c[1].x,y:c[1].y},{originalPath:c}))}}}e($,`insertEdges`);var qe={parser:Ce,db:Re,renderer:{draw:e(async function(e,r,o,s){let{securityLevel:c,block:l}=i(),u=s.db;u.setDiagramId(r);let d;c===`sandbox`&&(d=n(`#i`+r));let f=n(c===`sandbox`?d.nodes()[0].contentDocument.body:`body`),p=c===`sandbox`?f.select(`[id="${r}"]`):n(`[id="${r}"]`);re(p,i()),fe(p,[`point`,`circle`,`cross`],s.type,r);let m=u.getBlocks(),h=u.getBlocksFlat(),g=u.getEdges(),_=p.insert(`g`).attr(`class`,`block`);await Ge(_,m,u);let v=He(u);await Ke(_,m,u),await $(_,g,h,u,r);let y=_.node()?.getBBox(),b=y&&Number.isFinite(y.width)&&Number.isFinite(y.height)?y:v;if(b){let e=Math.max(1,Math.round(.125*(b.width/b.height))),n=b.height+e+10,r=b.width+10,{useMaxWidth:i}=l;a(p,n,r,!!i),t.debug(`Here Bounds`,v,b),p.attr(`viewBox`,`${b.x-5} ${b.y-5} ${b.width+10} ${b.height+10}`)}},`draw`),getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`)},styles:Be};export{qe as diagram}; \ No newline at end of file diff --git a/web/dist/app-c4Diagram-YGBWAQC7.js b/web/dist/app-c4Diagram-YGBWAQC7.js index 39e4e4de0..c522e0381 100644 --- a/web/dist/app-c4Diagram-YGBWAQC7.js +++ b/web/dist/app-c4Diagram-YGBWAQC7.js @@ -1,4 +1,4 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./app-chunk-O7XYJQB3.js";import{_ as p,n as m,r as h}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import{r as g,s as _}from"./app-chunk-7INBJB4K.js";import{a as v}from"./app-chunk-GWA4HPMP.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[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],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],Z=[12,33],ae=[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],oe={trace:e(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:e(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:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},t(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ee,[2,14]),t(te,[2,16],{12:[1,76]}),t(ee,[2,36],{12:[1,77]}),t(ne,[2,19]),t(ne,[2,20]),{25:[1,78]},{27:[1,79]},t(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},t(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ee,[2,15]),t(te,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ne,[2,21]),t(ne,[2,22]),t(X,[2,39]),t(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),t(ie,[2,73]),{78:[1,133]},t(ie,[2,75]),t(ie,[2,76]),t(X,[2,40]),t(X,[2,41]),t(X,[2,42]),t(X,[2,43]),t(X,[2,44]),t(X,[2,45]),t(X,[2,46]),t(X,[2,47]),t(X,[2,48]),t(X,[2,49]),t(X,[2,50]),t(X,[2,51]),t(X,[2,52]),t(X,[2,53]),t(X,[2,54]),t(X,[2,55]),t(X,[2,56]),t(X,[2,57]),t(X,[2,58]),t(X,[2,60]),t(X,[2,61]),t(X,[2,62]),t(X,[2,63]),t(X,[2,64]),t(X,[2,65]),t(X,[2,66]),t(X,[2,67]),t(X,[2,68]),t(X,[2,69]),t(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(Z,[2,28]),t(Z,[2,29]),t(Z,[2,30]),t(Z,[2,31]),t(Z,[2,32]),t(Z,[2,33]),t(Z,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(ee,[2,38]),t(re,[2,72]),t(ie,[2,74]),t(X,[2,24]),t(X,[2,35]),t(ae,[2,25]),t(ae,[2,26],{12:[1,138]}),t(ae,[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:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.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(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`: +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./app-chunk-O7XYJQB3.js";import{_ as p,n as m,r as h}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{r as g,s as _}from"./app-chunk-7INBJB4K.js";import{a as v}from"./app-chunk-GWA4HPMP.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[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],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],Z=[12,33],ae=[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],oe={trace:e(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:e(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:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},t(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ee,[2,14]),t(te,[2,16],{12:[1,76]}),t(ee,[2,36],{12:[1,77]}),t(ne,[2,19]),t(ne,[2,20]),{25:[1,78]},{27:[1,79]},t(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},t(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ee,[2,15]),t(te,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,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:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ne,[2,21]),t(ne,[2,22]),t(X,[2,39]),t(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),t(ie,[2,73]),{78:[1,133]},t(ie,[2,75]),t(ie,[2,76]),t(X,[2,40]),t(X,[2,41]),t(X,[2,42]),t(X,[2,43]),t(X,[2,44]),t(X,[2,45]),t(X,[2,46]),t(X,[2,47]),t(X,[2,48]),t(X,[2,49]),t(X,[2,50]),t(X,[2,51]),t(X,[2,52]),t(X,[2,53]),t(X,[2,54]),t(X,[2,55]),t(X,[2,56]),t(X,[2,57]),t(X,[2,58]),t(X,[2,60]),t(X,[2,61]),t(X,[2,62]),t(X,[2,63]),t(X,[2,64]),t(X,[2,65]),t(X,[2,66]),t(X,[2,67]),t(X,[2,68]),t(X,[2,69]),t(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(Z,[2,28]),t(Z,[2,29]),t(Z,[2,30]),t(Z,[2,31]),t(Z,[2,32]),t(Z,[2,33]),t(Z,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(ee,[2,38]),t(re,[2,72]),t(ie,[2,74]),t(X,[2,24]),t(X,[2,35]),t(ae,[2,25]),t(ae,[2,26],{12:[1,138]}),t(ae,[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:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.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(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`: `+g.showPosition()+` Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+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:r.push(C),a.push(g.yytext),o.push(g.yylloc),r.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(r=r.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),r.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[r[r.length-2]][r[r.length-1]],r.push(j);break;case 3:return!0}}return!0},`parse`)};oe.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/web/dist/app-chunk-3FUC2YCW.js b/web/dist/app-chunk-3FUC2YCW.js index 50e9053f1..256a8d282 100644 --- a/web/dist/app-chunk-3FUC2YCW.js +++ b/web/dist/app-chunk-3FUC2YCW.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["app-sizeCapture-INFHLROL.js","app-chunk-Y2CYZVJY.js"])))=>i.map(i=>d[i]); -import{t as e}from"./app-preload-helper.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import{b as r,x as i}from"./app-chunk-O7XYJQB3.js";import{g as a}from"./app-chunk-ZIGJFQKS.js";import{o}from"./app-chunk-7INBJB4K.js";import{i as s,n as c,r as l,t as u}from"./app-chunk-5DYCD2WN.js";import{a as d,c as f,i as p,n as m,r as h,t as g,u as _}from"./app-chunk-Z7XXMR3K.js";import{t as v}from"./app-graphlib.js";import{r as y,t as b}from"./app-chunk-UA2S7LBM.js";function x(e,{edgePathsClass:t=`edges edgePaths`}={}){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}}t(x,`createLayoutElementGroups`);async function S(e,t,n){if(t.label){let{shapeSvg:r,bbox:i}=await o(e,n===void 0?t:{...t,width:n});t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}t(S,`measureGroupLabel`);async function C(e,t,n){let r=await l(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(C,`insertMeasuredNode`);function w(e,t,n){let r=e,i=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||i.has(r.parentId))break;i.add(r.parentId),r=t.get(r.parentId)}return n}t(w,`resolveNodeDir`);async function T(t,n,r={}){let a=new v({multigraph:!0,compound:!0}),o=[...n.edges],s=i(),c=x(t),{edgeLabels:l,nodes:u}=c,f=new Map,p=new Map(n.nodes.map(e=>[e.id,e])),m=n.direction,g=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup){if(g){let t=r.unwrapGroupLabels&&e.labelType!==`markdown`;await S(u,e,t?1/0:void 0)}a.setNode(e.id,{...e})}else{if(g){let t=await C(u,e,{config:s,dir:w(e,p,m)});f.set(e.id,t)}a.setNode(e.id,{...e})}}));for(let e of o)g&&h(e)&&await d(l,e),a.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./app-sizeCapture-INFHLROL.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:a,groups:c,nodeElements:f}}t(T,`createGraphWithElements`);var E=new Map,D=new Map,O=new Map,k=t(()=>{D.clear(),O.clear(),E.clear()},`clear`),A=t((e,t)=>{let r=D.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),j=t((e,t)=>{let r=D.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||A(e.v,t)||A(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),M=t((e,t,r,i)=>{n.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)M(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.debug(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{j(a,i)?(n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),N=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)O.set(i,e),r=[...r,...N(i,t)];return r},`extractDescendants`),P=t((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`),F=t((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=F(e,t,r),i=P(t,r,n);if(n)if(i.length>0)a=n;else return n}return a},`findNonClusterChild`),I=t(e=>!E.has(e)||!E.get(e).externalConnections?e:E.has(e)?E.get(e).id:e,`getAnchorId`),L=t((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}n.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(n.debug(`Cluster identified`,t,` Replacement id in edges: `,F(t,e,t)),D.set(t,N(t,e)),E.set(t,{id:F(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,D),i.forEach(e=>{A(e.v,t)^A(e.w,t)&&(n.debug(`Edge: `,e,` leaves cluster `,t),n.debug(`Descendants of XXX `,t,`: `,D.get(t)),E.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,D)});for(let t of E.keys()){let n=E.get(t).id,r=e.parent(n);r!==t&&E.has(r)&&!E.get(r).externalConnections&&(E.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&E.get(t)?.externalConnections&&i&&V(e,n,t)){let r=ee(e,t,e.parent(n));r&&(E.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.debug(`Fix XXX`,E,`ids:`,t.v,t.w,`Translating: `,E.get(t.v),` --- `,E.get(t.w)),E.get(t.v)||E.get(t.w)){if(n.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=I(t.v),a=I(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);E.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);E.get(n).externalConnections=!0,r.toCluster=t.w}n.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),R(e,0),n.trace(E)},`adjustClustersAndEdges`),R=t((e,t)=>{if(t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i){n.debug(`Done, no node has children`,e.nodes());return}n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,E,E.has(i)&&!E.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!E.has(i))n.debug(`Not a cluster`,i,t);else if(!E.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.debug(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;E.get(i)?.clusterData?.dir&&(r=E.get(i).clusterData.dir,n.debug(`Fixing dir`,E.get(i).clusterData.dir,r));let a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:a})}else n.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!E.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(E);r=e.nodes(),n.debug(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.debug(` Now next level`,i,r),r?.clusterNode&&R(r.graph,t+1)}},`extractor`),z=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),B=t(e=>z(e,e.children()),`sortNodesByHierarchy`),V=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=E.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),ee=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||A(i,n))continue;let r=F(i,e,t);if(r&&!V(e,r,t))return r}return null},`findSafeAnchorNode`);function H({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??W;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??f)(u,t.markers,t.type,t.diagramId),U();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let p=await s(t,d),m=await r(t,d),h={...d,measure:p};i?await i(t,h,m):await G(t,h,o),await a?.(t,h,m)},`render`)}t(H,`createCommonLayoutRenderer`);function U(){u(),g(),b(),k()}t(U,`clearLayoutRenderState`);async function W(e,{element:t},n){return await T(t,e,n)}t(W,`defaultMeasureLayout`);async function G(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 K(i,r,t,n);let a=J(e.nodes);for(let r of e.edges)Y(r,n)||await X(i,r,a,e,n,t)}t(G,`paintLayoutData`);async function K(e,t,n,r){t.clusterNode?s(t):q(t,n,r)?await y(e.clusters,t):s(t)}t(K,`paintLayoutNode`);function q(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(q,`shouldPaintAsCluster`);function J(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(J,`buildNodeLookup`);function Y(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(Y,`shouldSkipPaintEdge`);async function X(e,t,n,r,i,a){let o=p(e.edgePaths,{...t},i.clusterDb??new Map,r.type,Z(t.start,t,n,a,i),Z(t.end,t,n,a,i),r.diagramId,Q(t,i));h(t)&&(m.has(t.id)||await d(e.edgeLabels,t),$(t,o))}t(X,`paintLayoutEdge`);function Z(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(Z,`getRenderedNode`);function Q(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Q,`shouldSkipIntersect`);function $(e,t){let i=t?.updatedPath??t?.originalPath,o=r(),{subGraphTitleTotalMargin:s}=c({flowchart:o.flowchart??{}});if(e.label){let r=m.get(e.id),o=e.x,c=e.y;if(i){let r=a.calcLabelPosition(i);n.debug(`Moving label `+e.label+` from (`,o,`,`,c,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(o=r.x,c=r.y)}r.attr(`transform`,`translate(${o}, ${c+s/2})`)}if(e?.startLabelLeft){let t=_.get(e.id).startLeft,n=e?.x,r=e?.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=_.get(e.id).startRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=_.get(e.id).endLeft,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=_.get(e.id).endRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}t($,`positionRenderedEdgeLabel`);export{W as a,B as c,x as i,E as n,F as o,H as r,C as s,L as t}; \ No newline at end of file +import{t as e}from"./app-preload-helper.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import{b as r,x as i}from"./app-chunk-O7XYJQB3.js";import{g as a}from"./app-chunk-ZIGJFQKS.js";import{o}from"./app-chunk-7INBJB4K.js";import{i as s,n as c,r as l,t as u}from"./app-chunk-5DYCD2WN.js";import{r as d,t as f}from"./app-chunk-UA2S7LBM.js";import{a as p,c as m,i as h,n as g,r as _,t as ee,u as v}from"./app-chunk-Z7XXMR3K.js";import{t as y}from"./app-graphlib.js";function b(e,{edgePathsClass:t=`edges edgePaths`}={}){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}}t(b,`createLayoutElementGroups`);async function x(e,t,n){if(t.label){let{shapeSvg:r,bbox:i}=await o(e,n===void 0?t:{...t,width:n});t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}t(x,`measureGroupLabel`);async function S(e,t,n){let r=await l(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(S,`insertMeasuredNode`);function C(e,t,n){let r=e,i=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||i.has(r.parentId))break;i.add(r.parentId),r=t.get(r.parentId)}return n}t(C,`resolveNodeDir`);async function w(t,n,r={}){let a=new y({multigraph:!0,compound:!0}),o=[...n.edges],s=i(),c=b(t),{edgeLabels:l,nodes:u}=c,d=new Map,f=new Map(n.nodes.map(e=>[e.id,e])),m=n.direction,h=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup){if(h){let t=r.unwrapGroupLabels&&e.labelType!==`markdown`;await x(u,e,t?1/0:void 0)}a.setNode(e.id,{...e})}else{if(h){let t=await S(u,e,{config:s,dir:C(e,f,m)});d.set(e.id,t)}a.setNode(e.id,{...e})}}));for(let e of o)h&&_(e)&&await p(l,e),a.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./app-sizeCapture-INFHLROL.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:a,groups:c,nodeElements:d}}t(w,`createGraphWithElements`);var T=new Map,E=new Map,D=new Map,O=t(()=>{E.clear(),D.clear(),T.clear()},`clear`),k=t((e,t)=>{let r=E.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),A=t((e,t)=>{let r=E.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||k(e.v,t)||k(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),j=t((e,t,r,i)=>{n.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)j(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.debug(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{A(a,i)?(n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),M=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)D.set(i,e),r=[...r,...M(i,t)];return r},`extractDescendants`),N=t((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`),P=t((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=P(e,t,r),i=N(t,r,n);if(n)if(i.length>0)a=n;else return n}return a},`findNonClusterChild`),F=t(e=>!T.has(e)||!T.get(e).externalConnections?e:T.has(e)?T.get(e).id:e,`getAnchorId`),I=t((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}n.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(n.debug(`Cluster identified`,t,` Replacement id in edges: `,P(t,e,t)),E.set(t,M(t,e)),T.set(t,{id:P(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,E),i.forEach(e=>{k(e.v,t)^k(e.w,t)&&(n.debug(`Edge: `,e,` leaves cluster `,t),n.debug(`Descendants of XXX `,t,`: `,E.get(t)),T.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,E)});for(let t of T.keys()){let n=T.get(t).id,r=e.parent(n);r!==t&&T.has(r)&&!T.get(r).externalConnections&&(T.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&T.get(t)?.externalConnections&&i&&B(e,n,t)){let r=V(e,t,e.parent(n));r&&(T.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.debug(`Fix XXX`,T,`ids:`,t.v,t.w,`Translating: `,T.get(t.v),` --- `,T.get(t.w)),T.get(t.v)||T.get(t.w)){if(n.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=F(t.v),a=F(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);T.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);T.get(n).externalConnections=!0,r.toCluster=t.w}n.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),L(e,0),n.trace(T)},`adjustClustersAndEdges`),L=t((e,t)=>{if(t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i){n.debug(`Done, no node has children`,e.nodes());return}n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,T,T.has(i)&&!T.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!T.has(i))n.debug(`Not a cluster`,i,t);else if(!T.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.debug(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;T.get(i)?.clusterData?.dir&&(r=T.get(i).clusterData.dir,n.debug(`Fixing dir`,T.get(i).clusterData.dir,r));let a=new y({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});j(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:T.get(i).clusterData,label:T.get(i).label,graph:a})}else n.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!T.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(T);r=e.nodes(),n.debug(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.debug(` Now next level`,i,r),r?.clusterNode&&L(r.graph,t+1)}},`extractor`),R=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=R(e,e.children(t));n=[...n,...r]}),n},`sorter`),z=t(e=>R(e,e.children()),`sortNodesByHierarchy`),B=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=T.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),V=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||k(i,n))continue;let r=P(i,e,t);if(r&&!B(e,r,t))return r}return null},`findSafeAnchorNode`);function H({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??W;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??m)(u,t.markers,t.type,t.diagramId),U();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await r(t,d),h={...d,measure:f};i?await i(t,h,p):await G(t,h,o),await a?.(t,h,p)},`render`)}t(H,`createCommonLayoutRenderer`);function U(){u(),ee(),f(),O()}t(U,`clearLayoutRenderState`);async function W(e,{element:t},n){return await w(t,e,n)}t(W,`defaultMeasureLayout`);async function G(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 K(i,r,t,n);let a=J(e.nodes);for(let r of e.edges)Y(r,n)||await X(i,r,a,e,n,t)}t(G,`paintLayoutData`);async function K(e,t,n,r){t.clusterNode?s(t):q(t,n,r)?await d(e.clusters,t):s(t)}t(K,`paintLayoutNode`);function q(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(q,`shouldPaintAsCluster`);function J(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(J,`buildNodeLookup`);function Y(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(Y,`shouldSkipPaintEdge`);async function X(e,t,n,r,i,a){let o=h(e.edgePaths,{...t},i.clusterDb??new Map,r.type,Z(t.start,t,n,a,i),Z(t.end,t,n,a,i),r.diagramId,Q(t,i));_(t)&&(g.has(t.id)||await p(e.edgeLabels,t),$(t,o))}t(X,`paintLayoutEdge`);function Z(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(Z,`getRenderedNode`);function Q(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Q,`shouldSkipIntersect`);function $(e,t){let i=t?.updatedPath??t?.originalPath,o=r(),{subGraphTitleTotalMargin:s}=c({flowchart:o.flowchart??{}});if(e.label){let r=g.get(e.id),o=e.x,c=e.y;if(i){let r=a.calcLabelPosition(i);n.debug(`Moving label `+e.label+` from (`,o,`,`,c,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(o=r.x,c=r.y)}r.attr(`transform`,`translate(${o}, ${c+s/2})`)}if(e?.startLabelLeft){let t=v.get(e.id).startLeft,n=e?.x,r=e?.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=v.get(e.id).startRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=v.get(e.id).endLeft,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=v.get(e.id).endRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}t($,`positionRenderedEdgeLabel`);export{W as a,z as c,b as i,T as n,P as o,H as r,S as s,I as t}; \ No newline at end of file diff --git a/web/dist/app-chunk-7INBJB4K.js b/web/dist/app-chunk-7INBJB4K.js index 529c81f17..1066e2439 100644 --- a/web/dist/app-chunk-7INBJB4K.js +++ b/web/dist/app-chunk-7INBJB4K.js @@ -1,31 +1,31 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./app-chunk-O7XYJQB3.js";import{a as f,p,r as m,u as h}from"./app-chunk-ZIGJFQKS.js";import{n as g,t as _}from"./app-chunk-742MDFTN.js";import{n as v,r as y}from"./app-chunk-MBY4JIJT.js";import{a as b,i as x,r as S,t as C}from"./app-chunk-7PRAP22T.js";import{s as w}from"./app-chunk-J5ZVWO5B.js";import{t as T}from"./app-rough.esm.js";var E=1,D=3;async function O(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!k(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let e=u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize,[n=c.fontSize]=p(e),r=n*5+`px`;t.style.minWidth=r,t.style.maxWidth=r}else t.style.width=`100%`;n(t)}e(i,`setupImage`),setTimeout(()=>{t.complete&&i()}),t.addEventListener(`error`,i),t.addEventListener(`load`,i)})))}e(O,`configureLabelImages`);function k(e){return e.nodeType===D?e.textContent?.trim()!==``:e.nodeType!==E||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(k)}e(k,`hasTextBesidesImages`);var A=3,j=32,M=e(async(e,t,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),s=[{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),c=t.width?Math.max(t.width-2*(t.padding??0),j):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await v(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return n(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),n(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+A;let _=p.length>0?g-A:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-_/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(t.padding??0)/2,label:o}},`c4LabelHelper`),N=e((t,n)=>{let{x:r,y:i,width:a,height:o}=t;return a>=n?t:`left`in t?{x:r,y:i,width:n,height:o,top:i,left:r,bottom:i+o,right:r+n,toJSON:e(()=>({}),`toJSON`)}:{x:r-(n-a)/2,y:i,width:n,height:o}},`withMinWidth`),P=e(async(e,t,r)=>{if(t.stereotype!==void 0)return M(e,t,r);let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,m=t.labelType===`markdown`,g=c&&!t.width?t.minWidth??0:0,_=await v(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||u().flowchart?.wrappingWidth,minWidth:g,classes:m?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:m},u()),b=(t?.padding??0)/2,x;if(a){let e=_.children[0],t=n(_);await O(e),x=await y.measure(()=>e.getBoundingClientRect()),x=N(x,g),t.attr(`width`,x.width),t.attr(`height`,x.height)}else x=await y.measure(()=>_.getBBox()),x=N(x,g);return a?s.attr(`transform`,`translate(`+-x.width/2+`, `+-x.height/2+`)`):s.attr(`transform`,`translate(0, `+-x.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-x.width/2+`, `+-x.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:x,halfPadding:b,label:s}},`labelHelper`),F=e(async(e,t,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await v(a,d(f(t),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],t=n(s);l=await y.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await y.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),I=e((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`),L=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function R(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(R,`createPathFromPoints`);function z(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(z,`generateFullSineWavePoints`);function B(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(ee,`mergePaths`);var V=e((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,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`);function te(e,t){return e.intersect(t)}e(te,`intersectNode`);var H=te;function U(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}e(G,`sameSign`);var ae=W;function oe(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 c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r1&&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,c=Math.sqrt(o*o+s*s);return a[`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`),se=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await v(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function ce(e,n){let{labelStyles:r}=x(n);n.labelStyle=r;let i=L(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=T.svg(o),l=b(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,h(s)),I(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}e(ce,`anchor`);function le(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(le,`generateArcPoints`);function ue(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ue,`calculateArcSagitta`);async function de(t,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await P(t,n,L(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ue(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,y=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...le(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...le(g/2,_/2,g/2,-_/2,p,m,!0)],S=T.svg(u),C=b(n,{});n.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=R(y),E=S.path(w,C),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),I(n,D),n.intersect=function(e){return K.polygon(n,y,e)},u}e(de,`bowTieRect`);async function fe(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=x(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await P(t,n,L(n)),l=r?.nodeBorder??r?.lineColor??`currentColor`,u=n.padding??12,d=Math.max(s.width+u*2,n.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,n.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=n,y=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(n.look===`handDrawn`){let e=T.svg(o).path(_,b(n,{}));y.node()?.appendChild(e),v&&y.attr(`style`,v)}else y.append(`path`).attr(`d`,_).attr(`style`,a);y.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),I(n,y);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let C=e((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`),w=[...C(d/2,m,-1),...C(g/2,h,1).reverse()];return n.intersect=function(e){return K.polygon(n,w,e)},o}e(fe,`bucket`);var pe=20,me=8,he=80,ge=8;function _e(e){let{themeVariables:t}=u(),n=t.clusterBkg,r=t.clusterBorder;switch(e){case`flow`:return{rx:10,fill:`none`,stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:`flow-collapsed`};default:return{rx:ge,fill:n,stroke:r,cssClass:`collapsed-group`}}}e(_e,`getCollapsedStyle`);async function ve(e,t){let n=_e(t.metadata?.containerType),{fill:r,stroke:i}=n,{nodeStyles:a}=x(t),{shapeSvg:s,bbox:c}=await P(e,t,L(t)),{theme:l,themeVariables:d}=u();w(s,t.colorIndex,l,d.borderColorArray);let f=t.padding??8,p=c.height,m=Math.max(c.width+f*2,he,t?.width??0),g=Math.max(p+me+pe+f*2,t?.height??0),_=-m/2,v=-g/2,y=-(me+pe)/2,S=s.select(`.label`);S&&(t.useHtmlLabels??o(u())?S.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):S.attr(`transform`,`translate(0, ${-c.height/2+y})`));let C;if(t.look===`handDrawn`){let e=T.svg(s),a=b(t,{fill:r,stroke:i,...n.strokeWidth===void 0?{}:{strokeWidth:n.strokeWidth},...r===`none`?{fillWeight:0}:{fillStyle:`solid`}}),o=e.path(q(_,v,m,g,n.rx),a);C=s.insert(()=>o,`:first-child`),C.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,h(t.cssStyles))}else C=s.insert(`rect`,`:first-child`),C.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,a).attr(`rx`,n.rx).attr(`ry`,n.rx).attr(`x`,_).attr(`y`,v).attr(`width`,m).attr(`height`,g).attr(`fill`,r).attr(`stroke`,i),n.strokeWidth!==void 0&&C.attr(`stroke-width`,n.strokeWidth+`px`);let E=v+f+p+me;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,_+8).attr(`y1`,E).attr(`x2`,_+m-8).attr(`y2`,E).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let D=E+pe/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,D).attr(`r`,2.5).attr(`fill`,i);return I(t,C),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}e(ve,`collapsedGroup`);function J(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+`)`)}e(J,`insertPolygonShape`);var ye=[`right`,`left`,`up`,`down`],be=`point`,xe=e(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`),Se=e(e=>ye.filter(t=>e.has(t)).join(`|`)||be,`getDirectionKey`),Ce={"right|left|up|down":e(({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":e(({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":e(({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":e(({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":e(({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":e(({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":e(({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":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":e(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":e(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":e(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:e(({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:e(({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:e(({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:e(({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`),[be]:()=>[{x:0,y:0}]},we=e((e,t,n,r)=>{let i=xe(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(Ce[Se(i)]??Ce[be])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Te(e,t){let n=t,{shapeSvg:r,bbox:i}=await P(e,n,L(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=we(n.directions??[],i,n,u),f=J(r,u,o,d);return f.attr(`style`,n.style??null),I(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}e(Te,`block_arrow`);async function Ee(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await P(e,t,L(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=T.svg(a).path(q(-u/2,f,u,d,12),b(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+18/2).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),I(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Ee,`browser`);var De=12;async function Oe(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+De),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+De,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+De},{x:0+De,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=b(t,{}),r=R(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=J(s,l,u,p);return r&&m.attr(`style`,r),I(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}e(Oe,`card`);function ke(e,t){let{nodeStyles:n}=x(t);t.label=``;let r=e.insert(`g`).attr(`class`,L(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=T.svg(r),c=b(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=R(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}e(ke,`choice`);async function Ae(e,n,r){let{labelStyles:i,nodeStyles:a}=x(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await P(e,n,L(n)),l=r?.padding??c,u=Math.sqrt(s.width**2+s.height**2)/2,d=n.look===`neo`?u+32:u+l,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=T.svg(o),t=b(n,{}),r=e.circle(0,0,d*2,t);f=o.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,h(p))}else f=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return I(n,f),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,d,e),K.circle(n,d,e)},o}e(Ae,`circle`);async function je(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await P(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/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`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),I(n,o),n.intersect=function(e){return K.rect(n,e)},r}e(je,`composite`);async function Me(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await P(e,t,L(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=T.svg(a).path(q(-u/2,f,u,d,12),b(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),I(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Me,`consoleWindow`);function Ne(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} - M ${i.x},${i.y} L ${o.x},${o.y}`}e(Ne,`createLine`);function Pe(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=T.svg(a),l=b(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ne(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),I(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),K.circle(n,o,e)},a}e(Pe,`crossedCircle`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iS,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),I(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Fe,`curlyBraceLeft`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iS,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),I(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Ie,`curlyBraceRight`);function Z(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iE,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>y,`:first-child`),D.insert(()=>C,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),I(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}e(Le,`curlyBraces`);async function Re(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(5,c.height+o*2,t?.height??0),u=l/2,d=u-Math.sqrt(Math.max(0,u**2-(c.height/2)**2)),f=Math.max(l/4,d),p=Math.max(20,c.width+a*2+f*2,(c.width+a*2)*1.25,t?.width??0),{cssStyles:m}=t,h=T.svg(s),g=b(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=p,v=l,y=_-u,S=v/4,C=[{x:y,y:0},{x:S,y:0},{x:0,y:v/2},{x:S,y:v},{x:y,y:v},...B(-y,-v/2,u,50,270,90)],w=R(C),E=h.path(w,g),D=s.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&D.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&D.selectChildren(`path`).attr(`style`,r),D.attr(`transform`,`translate(${-p/2}, ${-l/2})`),I(t,D),t.intersect=function(e){return K.polygon(t,C,e)},s}e(Re,`curvedTrapezoid`);async function ze(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,g=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:_}=t;if(t.look===`handDrawn`){let e=T.svg(i),n=b(t,{}),r=e.path(q(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);g.insert(()=>a,`:first-child`),g.insert(()=>r,`:first-child`),_&&g.attr(`style`,_)}else g.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),g.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);I(t,g);let v=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let y=m+l,S=Math.asin(Math.min(1,(h-y)/l))*180/Math.PI,C=[...B(0,-y,l,24,180+S,-S),...B(-(-c/2+f),-(h+f),f,12,90,0),...B(-(-c/2+f),-(p/2-f),f,12,360,270),...B(-(c/2-f),-(p/2-f),f,12,270,180),...B(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,C,e)},i}e(ze,`person`);var Be=e((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`),Ve=e((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`),He=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Ue=8,We=8;async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=x(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.widtho,`:first-child`),g=c.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=Be(0,0,d,m,f,p);g=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(_)).attr(`style`,r)}return g.attr(`label-offset-y`,p),g.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),I(t,g),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.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},c}e(Ge,`cylinder`);async function Ke(e,t,n){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await P(e,t,L(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=T.svg(a),n=b(t,{}),r=f||p?e.path(q(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,h(f)).attr(`ry`,h(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return I(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},a}e(Ke,`drawRect`);async function qe(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ke(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=T.svg(c),n=b(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.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(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}e(qe,`datastore`);async function Je(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c}=await P(e,t,L(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=T.svg(o),g=b(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=o.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),I(t,y),t.intersect=function(e){return K.rect(t,e)},o}e(Je,`dividedRectangle`);async function Ye(e,n){let{labelStyles:r,nodeStyles:i}=x(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await P(e,n,L(n)),u=Math.sqrt(l.width**2+l.height**2)/2,d=(n?.width?n?.width/2:u)+(s??0),f=d+a,p,{cssStyles:m}=n;if(n.look===`handDrawn`){let e=T.svg(c),t=b(n,{roughness:.2,strokeWidth:2.5}),r=b(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,f*2,t),a=e.circle(0,0,d*2,r);p=c.insert(`g`,`:first-child`),p.attr(`class`,h(n.cssClasses)).attr(`style`,h(m)),p.node()?.appendChild(i),p.node()?.appendChild(a)}else{p=c.insert(`g`,`:first-child`);let e=p.insert(`circle`,`:first-child`),t=p.insert(`circle`);p.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,f).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return I(n,p),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,f,e),K.circle(n,f,e)},c}e(Ye,`doublecircle`);async function Xe(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o}=await P(e,t,L(t)),{theme:s,themeVariables:c}=u();w(i,t.colorIndex,s,c.borderColorArray);let l=o??10,d=a.width/2+l*2,f=a.height/2+l*2,p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=T.svg(i),n=b(t,{}),r=e.ellipse(0,0,d*2,f*2,n);p=i.insert(()=>r,`:first-child`),p.attr(`class`,`basic label-container`),m&&p.attr(`style`,m)}else p=i.insert(`ellipse`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`rx`,d).attr(`ry`,f).attr(`cx`,0).attr(`cy`,0);return t.width=d*2,t.height=f*2,I(t,p),t.calcIntersect=function(e,t){let n=e.width/2,r=e.height/2;return K.ellipse(e,n,r,t)},t.intersect=function(e){return K.ellipse(t,d,f,e)},i}e(Xe,`usecaseEllipse`);function Ze(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=x(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=T.svg(o),{nodeBorder:l}=r,u=b(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),I(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),K.circle(n,7,e)},o}e(Ze,`filledCircle`);var Qe=10,$e=10;async function et(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.heightv,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,I(n,y),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),K.polygon(n,p,e)},s}e(et,`flippedTriangle`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],g=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:_}=t,v;if(t.look===`handDrawn`){let e=T.svg(i).path(g,b(t,{}));v=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),_&&v.attr(`style`,_)}else v=i.insert(`path`,`:first-child`).attr(`d`,g).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?I(t,v):I(t,v,{width:c,height:d});let y=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}e(tt,`folder`);function nt(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=x(t);t.label=``;let o=e.insert(`g`).attr(`class`,L(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);(n===`LR`||n===`RL`)&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=T.svg(o),p=b(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),I(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return K.rect(t,e)},o}e(nt,`forkJoin`);async function rt(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await P(e,n,L(n)),l=(n?.height?n?.height:Math.max(10,c.height))+o*2,u=l/2,d=u-Math.sqrt(Math.max(0,u**2-(c.height/2)**2)),f=(n?.width?n?.width:Math.max(15,c.width)+d*2)+a*2,{cssStyles:p}=n,m=T.svg(s),h=b(n,{});n.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-f/2,y:-l/2},{x:f/2-u,y:-l/2},...B(-f/2+u,0,u,50,90,270),{x:f/2-u,y:l/2},{x:-f/2,y:l/2}],_=R(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),p&&n.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,p),i&&n.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,i),I(n,y),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:u,point:e}),K.polygon(n,g,e)},s}e(rt,`halfRoundedRectangle`);var it=e((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`);async function at(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c,bbox:l}=await P(e,t,L(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=T.svg(c),n=b(t,{}),r=it(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=J(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,I(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}e(at,`hexagon`);async function ot(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await P(e,n,L(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=T.svg(a),u=b(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=R(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),I(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),K.polygon(n,d,e)},a}e(ot,`hourglass`);async function st(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=x(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await P(e,n,`icon-shape default`),p=n.pos===`t`,m=c,h=c,{nodeBorder:g}=r,{stylesMap:v}=C(n),y=-h/2,S=-m/2,w=n.label?8:0,E=T.svg(u),D=b(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(y,S,h,m,D),k=Math.max(h,d.width),A=m+d.height+w,j=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),M=u.insert(()=>O,`:first-child`),N=u.insert(()=>j);if(n.icon){let e=u.append(`g`);e.html(`${await _(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+w/2-i/2-o:-d.height/2-w/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??g};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),M.attr(`transform`,`translate(0,${p?d.height/2+w/2:-d.height/2-w/2})`),I(n,N),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+w},{x:r+h/2,y:i-a/2+d.height+w},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+d.height+w},{x:r-d.width/2,y:i-a/2+d.height+w}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+m},{x:r+d.width/2,y:i-a/2+m},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+m},{x:r-h/2,y:i-a/2+m}],K.polygon(n,o,e)},u}e(st,`icon`);async function ct(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=x(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await P(e,n,`icon-shape default`),p=n.label?8:0,m=n.pos===`t`,{nodeBorder:h,mainBkg:g}=r,{stylesMap:v}=C(n),y=T.svg(u),S=b(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`),S.stroke=v.get(`fill`)??g;let w=u.append(`g`);n.icon&&w.html(`${await _(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let E=w.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,j=Math.max(D,O)*Math.SQRT2+40,M=y.circle(0,0,j,S),N=Math.max(j,d.width),F=j+d.height+p,L=y.rectangle(-N/2,-F/2,N,F,{...S,fill:`transparent`,stroke:`none`}),R=u.insert(()=>M,`:first-child`),z=u.insert(()=>L);return w.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),w.attr(`style`,`color: ${v.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-F/2:F/2-d.height})`),R.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),I(n,z),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),K.rect(n,e)},u}e(ct,`iconCircle`);async function lt(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=x(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await P(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,g=c+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:S}=C(n),w=-g/2,E=-h/2,D=n.label?8:0,O=T.svg(u),k=b(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=S.get(`fill`)??y;let A=O.path(q(w,E,g,h,5),k),j=Math.max(g,d.width),M=h+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),F=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`${await _(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${S.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-M/2:M/2-d.height})`),F.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),I(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+g/2,y:i-a/2+d.height+D},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-g/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(lt,`iconRounded`);async function ut(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=x(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await P(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,g=c+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:S}=C(n),w=-g/2,E=-h/2,D=n.label?8:0,O=T.svg(u),k=b(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=S.get(`fill`)??y;let A=O.path(q(w,E,g,h,.1),k),j=Math.max(g,d.width),M=h+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),F=u.insert(()=>A,`:first-child`),L=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`${await _(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${S.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-M/2:M/2-d.height})`),F.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),I(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+g/2,y:i-a/2+d.height+D},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-g/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(ut,`iconSquare`);async function dt(e,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=x(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await P(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,v=n.label?8:0,y=T.svg(f),S=b(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=y.rectangle(g,_,u,d,S),w=Math.max(u,p.width),E=d+p.height+v,D=y.rectangle(-w/2,-E/2,w,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>C,`:first-child`),k=f.insert(()=>D);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/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})`),O.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),I(n,k),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+v},{x:r+u/2,y:i-a/2+p.height+v},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+v},{x:r-p.width/2,y:i-a/2+p.height+v}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],K.polygon(n,o,e)},f}e(dt,`imageSquare`);async function ft(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=b(t,{}),r=R(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ft,`inv_trapezoid`);async function pt(e,t){let{shapeSvg:n,bbox:r,label:i}=await P(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))})`),I(t,a),t.intersect=function(e){return K.rect(t,e)},n}e(pt,`labelRect`);async function mt(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=b(t,{}),r=R(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(mt,`lean_left`);async function ht(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=b(t,{}),r=R(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ht,`lean_right`);function gt(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=T.svg(a),d=b(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=R(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),I(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),K.polygon(n,l,e)},a}e(gt,`lightningBolt`);var _t=e((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`),vt=e((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`),yt=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),bt=10,xt=10;async function St(e,t){let{labelStyles:n,nodeStyles:r}=x(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.widtho,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=_t(0,0,u,p,d,f,m);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),I(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=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-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(St,`linedCylinder`);async function Ct(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c,label:l}=await P(e,t,L(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=T.svg(s),g=b(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...z(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),y.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f-(c.y-(c.top??0))})`),I(t,y),t.intersect=function(e){return K.polygon(t,_,e)},s}e(Ct,`linedWaveEdgedRect`);var wt=56,Tt=72,Et=8,Dt=2,Ot=8,kt={normal:`usecase-actor-shape usecase-actor-normal`,hollow:`usecase-actor-hollow`,awesome:`usecase-actor-awesome`,icon:`usecase-actor-icon`},At=Math.PI/3,jt=.6,Mt=e((e,t)=>{let n=t*jt,r=t*Math.sqrt(1-jt**2),i=Math.cos(At),a=-Math.sin(At),o=n*-a,s=e+n*i,c=r*i,l=r*a;return`M ${o-c} ${s-l} L ${o+c} ${s+l}`},`businessMarkerPathForCircle`),Nt={normal:Mt(-24,12),hollow:Mt(-23,9),awesome:Mt(-21,13),icon:`M 12 -8 L 26 -26`},Pt=e((e,t,n)=>{let r=(t.x??0)-(t.left??0),i=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${-t.width/2-r},${n-t.height/2-i})`)},`positionLabel`),Ft=e((e,t,n,r,i=!1)=>{if(t.look===`handDrawn`){let a=T.svg(e).path(n,b(t,i?{fill:`none`}:{}));return e.insert(()=>a,`:first-child`).attr(`class`,r)}let a=e.append(`path`).attr(`class`,r).attr(`d`,n);return i&&a.attr(`fill`,`none`),a},`appendActorPath`),It=e((e,t,n,r,i,a,o=!1)=>{if(t.look===`handDrawn`){let s=T.svg(e).circle(n,r,i*2,b(t,o?{fill:`none`}:{}));return e.insert(()=>s,`:first-child`).attr(`class`,a)}let s=e.append(`circle`).attr(`class`,a).attr(`cx`,n).attr(`cy`,r).attr(`r`,i);return o&&s.attr(`fill`,`none`),s},`appendActorCircle`),Lt=e((e,t,n)=>{t.business&&e.append(`path`).attr(`class`,`usecase-business-marker usecase-actor-business-marker`).attr(`d`,Nt[n]).attr(`fill`,`none`).attr(`style`,`stroke: inherit !important; stroke-width: inherit !important`)},`appendBusinessActorMarker`);async function Rt(e,t,n,r){let{labelStyles:i,nodeStyles:a}=x(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await P(e,n===`icon`||t.stereotype!==void 0?{...t,icon:n===`icon`?void 0:t.icon,stereotype:void 0}:t,L(t,`usecase-actor-variant usecase-actor-${n}`)),l=t.accessibleName??t.label;l&&o.attr(`role`,`img`).attr(`aria-label`,l),c.attr(`class`,`label actor-label usecase-actor-label`);let{theme:d,themeVariables:f}=u();w(o,t.colorIndex,d,f.borderColorArray);let p,m;if(t.stereotype){let e=await F(o,`\xAB${t.stereotype}\xBB`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});p=e.label.attr(`class`,`label usecase-stereotype`),m=e.bbox}let h=o.append(`g`).attr(`class`,`usecase-actor-glyph ${kt[n]}`).attr(`style`,a||null);await r(h,t),Lt(h,t,n);let g=t.padding??Ot,_=m?.height??0,v=Tt+Et+s.height+(m?_+Dt:0),y=Math.max(wt,s.width,m?.width??0)+g*2,b=v+g*2,S=-v/2;h.attr(`transform`,`translate(0,${S+Tt/2})`);let C=S+Tt+Et;return p&&m&&(C+=_/2,Pt(p,m,C),C+=_/2+Dt),Pt(c,s,C+s.height/2),I(t,o.insert(`rect`,`:first-child`).attr(`class`,`usecase-actor-outline`).attr(`x`,-y/2).attr(`y`,-b/2).attr(`width`,y).attr(`height`,b).attr(`opacity`,0).attr(`aria-hidden`,`true`)),t.intersect=e=>K.rect(t,e),o}e(Rt,`renderUsecaseActor`);var zt=[`M 0 -12`,`C 6.627 -12 12 -17.373 12 -24`,`C 12 -30.627 6.627 -36 0 -36`,`C -6.627 -36 -12 -30.627 -12 -24`,`C -12 -17.373 -6.627 -12 0 -12 Z`,`M 0 -12 V 8`,`M -17 -5 H 17`,`M 0 8 L -15 28`,`M 0 8 L 15 28`].join(` `);async function Bt(e,t){return Rt(e,t,`normal`,(e,t)=>{Ft(e,t,zt,`usecase-actor-stick`)})}e(Bt,`usecaseActor`);var Vt=[`M 0 -34`,`C 7.18 -34 13 -28.18 13 -21`,`C 13 -13.82 7.18 -8 0 -8`,`C -7.18 -8 -13 -13.82 -13 -21`,`C -13 -28.18 -7.18 -34 0 -34 Z`,`M -24 25`,`C -24 7 -14 -3 0 -3`,`C 14 -3 24 7 24 25`,`C 24 28 21 30 18 30`,`H -18`,`C -21 30 -24 28 -24 25 Z`].join(` `);async function Ht(e,t){return Rt(e,t,`awesome`,(e,t)=>{Ft(e,t,Vt,`usecase-actor-awesome-silhouette`)})}e(Ht,`usecaseActorAwesome`);var Ut=[`M -22 -10`,`H 22`,`V 0`,`H 6`,`L 22 17`,`L 13 28`,`L 0 13`,`L -13 28`,`L -22 17`,`L -6 0`,`H -22`,`Z`].join(` `);async function Wt(e,t){return Rt(e,t,`hollow`,(e,t)=>{It(e,t,0,-23,9,`usecase-actor-hollow-head`,!0),Ft(e,t,Ut,`usecase-actor-hollow-body`,!0)})}e(Wt,`usecaseActorHollow`);var Gt=52,Kt=42,qt=-2,Jt=e(async(e,t)=>{let n=-Gt/2,r=qt-Gt/2;if(t.look===`handDrawn`){let i=T.svg(e).rectangle(n,r,Gt,Gt,b(t,{}));e.insert(()=>i,`:first-child`).attr(`class`,`usecase-actor-icon-frame`)}else e.append(`rect`).attr(`class`,`usecase-actor-icon-frame`).attr(`x`,n).attr(`y`,r).attr(`width`,Gt).attr(`height`,Gt).attr(`rx`,4).attr(`ry`,4);let i=t.icon??``,a=await g(i.includes(`:`)?i:`fa:${i}`),o=await _(i,{height:Kt,width:Kt,fallbackPrefix:`fa`}),s=e.append(`g`).attr(`class`,`usecase-actor-icon-symbol${a?``:` usecase-actor-icon-fallback`}`).attr(`aria-hidden`,`true`).html(`${o}`),c=s.node()?.getBBox();c&&s.attr(`transform`,`translate(${-c.width/2-c.x},${qt-c.height/2-c.y})`)},`drawIconActor`);async function Yt(e,t){return Rt(e,t,`icon`,Jt)}e(Yt,`usecaseActorIcon`);var Xt=e((e,t,n)=>{let r=(t.x??0)-(t.left??0),i=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${-t.width/2-r},${n-t.height/2-i})`)},`positionLabel`);async function Zt(e,t){let n=t,{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n.stereotype?{...t,stereotype:void 0}:t,L(t,`usecase-business-shape`));c.attr(`class`,`label usecase-label`);let{theme:l,themeVariables:d}=u();w(a,t.colorIndex,l,d.borderColorArray);let f,p;if(n.stereotype){let e=await F(a,`\xAB${n.stereotype}\xBB`,{labelStyle:r,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=e.label.attr(`class`,`label usecase-stereotype`),p=e.bbox}let m=p?2:0,h=o.height+(p?.height??0)+m,g=Math.max(o.width,p?.width??0),_=s??10,v=g/2+_*2,y=h/2+_*2,S=Math.min(Math.max(_/5,1),_/2),C=g/2+S,E=v-S,D=C/v,O=E/v,k=y*Math.sqrt(Math.max(0,1-D*D)),A=-y*Math.sqrt(Math.max(0,1-O*O));f&&p&&Xt(f,p,-h/2+p.height/2),Xt(c,o,h/2-o.height/2);let j;if(t.look===`handDrawn`){let e=T.svg(a).ellipse(0,0,v*2,y*2,b(t,{}));j=a.insert(()=>e,`:first-child`).attr(`class`,`basic label-container usecase-business-ellipse`)}else j=a.insert(`ellipse`,`:first-child`).attr(`class`,`basic label-container usecase-business-ellipse`).attr(`style`,i).attr(`rx`,v).attr(`ry`,y).attr(`cx`,0).attr(`cy`,0);a.append(`path`).attr(`class`,`usecase-business-marker`).attr(`d`,`M ${C} ${k} L ${E} ${A}`).attr(`fill`,`none`).attr(`style`,i||null);let M=n.accessibleName??n.label;return M&&a.attr(`role`,`img`).attr(`aria-label`,M),I(t,j),t.calcIntersect=(e,t)=>K.ellipse(e,e.width/2,e.height/2,t),t.intersect=e=>K.ellipse(t,v,y,e),a}e(Zt,`usecaseBusiness`);var Qt=8,$t=4,en=1,tn=e((e,t,n,r)=>{let i=(t.x??0)-(t.left??0),a=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${n-t.width/2-i},${r-t.height/2-a})`)},`positionLabel`),nn=e(e=>{let t=Number.parseFloat(e??``);return Number.isFinite(t)&&t>=0?t:en},`numericStrokeWidth`);async function rn(t,n){let r=n,{labelStyles:i,nodeStyles:a}=x(n),{stylesMap:o}=C(n);n.labelStyle=i;let{shapeSvg:s,bbox:c,label:l}=await P(t,n,L(n,`usecase-json-table`));s.attr(`role`,`img`),r.accessibleName&&s.attr(`aria-label`,r.accessibleName),l.attr(`class`,`label usecase-json-title`);let u=s.append(`g`).attr(`class`,`usecase-json-table-grid`),d=[];for(let e of r.jsonRows??[]){let t=await F(u,e.key,{labelStyle:i,useHtmlLabels:n.useHtmlLabels,padding:0,centerLabel:!0}),r=await F(u,e.value,{labelStyle:i,useHtmlLabels:n.useHtmlLabels,padding:0,centerLabel:!0});d.push({key:{label:t.label.attr(`class`,`label usecase-json-key`),bbox:t.bbox},value:{label:r.label.attr(`class`,`label usecase-json-value`),bbox:r.bbox}})}let f=Math.max(0,...d.map(({key:e})=>e.bbox.width))+Qt*2,p=Math.max(0,...d.map(({value:e})=>e.bbox.width))+Qt*2,m=c.width+Qt*2,h=Math.max(m,f+p),g=p+Math.max(0,h-f-p),_=c.height+$t*2,v=d.map(({key:e,value:t})=>Math.max(e.bbox.height,t.bbox.height)+$t*2),y=_+v.reduce((e,t)=>e+t,0),S=nn(o.get(`stroke-width`)),w=h+S*2,E=y+S*2,D=-h/2,O=-y/2,k=n.look===`handDrawn`?T.svg(s):void 0,A=k?b(n,{}):void 0,j=e((e,t,n,r,i,o)=>{if(k&&A){let a=k.rectangle(n,r,i,o,A);return e.insert(()=>a,`:first-child`).attr(`class`,t)}return e.insert(`rect`,`:first-child`).attr(`class`,t).attr(`x`,n).attr(`y`,r).attr(`width`,i).attr(`height`,o).attr(`style`,a)},`insertCell`),M=j(s,`label-container usecase-json-border`,-w/2,-E/2,w,E);j(u,`usecase-json-cell usecase-json-title-cell`,D,O,h,_),u.node()?.append(l.node()),tn(l,c,0,O+_/2);let N=O+_;return d.forEach(({key:e,value:t},n)=>{let r=v[n],i=u.append(`g`).attr(`class`,`usecase-json-row`).attr(`data-row-index`,n).attr(`transform`,`translate(0,${N})`);j(i,`usecase-json-cell usecase-json-key-cell`,D,0,f,r),j(i,`usecase-json-cell usecase-json-value-cell`,D+f,0,g,r),i.node()?.append(e.label.node(),t.label.node()),tn(e.label,e.bbox,D+f/2,r/2),tn(t.label,t.bbox,D+f+g/2,r/2),N+=r}),I(n,M),n.intersect=e=>K.rect(n,e),s}e(rn,`usecaseJsonTable`);async function an(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c,bbox:l,label:u}=await P(e,t,L(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=T.svg(c),y=b(t,{}),S=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],C=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let w=R(S),E=v.path(w,y),D=R(C),O=v.path(D,y);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),I(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}e(an,`multiRect`);async function on(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=z(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],S=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:y.y-20},{x:h+d+10,y:y.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],C=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:g},{x:h,y:g}],w=T.svg(i),E=b(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=R(S),O=w.path(D,E),k=R(C),A=w.path(k,E),j=i.insert(()=>O,`:first-child`);return j.insert(()=>A),j.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p-(a.y-(a.top??0))})`),I(t,j),t.intersect=function(e){return K.polygon(t,S,e)},i}e(on,`multiWaveEdgedRectangle`);async function sn(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r,t.useHtmlLabels||o(s())||(t.centerLabel=!0);let{shapeSvg:a,bbox:c,label:l}=await P(e,t,L(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=T.svg(a),g=b(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,v),t.intersect=function(e){return K.rect(t,e)},a}e(sn,`note`);var cn=e((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`);async function ln(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await P(e,t,L(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=T.svg(i),n=b(t,{}),r=cn(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=J(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),I(t,l),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}];return K.polygon(e,r,t)},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(ln,`question`);async function un(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c,label:l}=await P(e,t,L(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,g=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:_}=t,v=T.svg(s),y=b(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=R(g),C=v.path(S,y),w=s.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,w),t.intersect=function(e){return K.polygon(t,g,e)},s}e(un,`rect_left_inv_arrow`);async function dn(e,r){let{labelStyles:i,nodeStyles:a}=x(r);r.labelStyle=i;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=e.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),l=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=r.description,p=r.label,m=await se(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(o(u())){let e=m.children[0],t=n(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let g=f||[],_=m.getBBox(),v=await se(d,Array.isArray(g)?g.join(`
`):g,r.labelStyle,!0,!0),y=v.children[0],S=n(v);h=y.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let C=(r.padding||0)/2;n(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+C+5)+`)`),n(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=d.node().getBBox(),d.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-C+3)+`)`);let w=h.width+(r.padding||0),E=h.height+(r.padding||0),D=-h.width/2-C,O=-h.height/2-C,k,A;if(r.look===`handDrawn`){let e=T.svg(c),n=b(r,{}),i=e.path(q(D,O,w,E,r.rx||0),n),a=e.line(-h.width/2-C,-h.height/2-C+_.height+C,h.width/2+C,-h.height/2-C+_.height+C,n);A=c.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),k=c.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else k=l.insert(`rect`,`:first-child`),A=l.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-C).attr(`y`,-h.height/2-C).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-C).attr(`x2`,h.width/2+C).attr(`y1`,-h.height/2-C+_.height+C).attr(`y2`,-h.height/2-C+_.height+C);return I(r,k),r.intersect=function(e){return K.rect(r,e)},c}e(dn,`rectWithTitle`);async function fn(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ke(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(fn,`roundedRect`);var pn=8;async function mn(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c}=await P(e,t,L(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?pn:pn*2),u=(t?.height??s.height)+a*2,d=l-pn,f=u,p=pn-l/2,m=-u/2,{cssStyles:g}=t,_=T.svg(o),v=b(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-pn,y:m+f},{x:p-pn,y:m},{x:p,y:m},{x:p,y:m+f}],S=_.polygon(y.map(e=>[e.x,e.y]),v),C=o.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`).attr(`style`,h(g)),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${pn/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),I(t,C),t.intersect=function(e){return K.rect(t,e)},o}e(mn,`shadedProcess`);async function hn(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c,label:l}=await P(e,t,L(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=T.svg(s),v=b(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=R(y),C=_.path(S,v),w=s.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,r),w.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),I(t,w),t.intersect=function(e){return K.polygon(t,y,e)},s}e(hn,`slopedRect`);async function gn(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n,a=await Ke(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i});if(t.colorIndex!==void 0){let{theme:e,themeVariables:n}=u();w(a,t.colorIndex,e,n.borderColorArray)}return a}e(gn,`squareRect`);var _n=50,vn=e((e,t,n)=>{let r=e.height+n,i=r*Math.cos(Math.PI/(2*(_n-1))),a=Math.sqrt(Math.max(0,i**2-e.height**2));return{w:Math.max(e.width+r/4+t,1.5*r+(r-i),e.width+t+r-a),h:r}},`stadiumDimensions`);async function yn(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?40:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),{w:l,h:u}=vn(c,a,o),d=u/2,{cssStyles:f}=t,p=T.svg(s),m=b(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2+d,y:-u/2},{x:l/2-d,y:-u/2},...B(-l/2+d,0,d,_n,90,270),{x:l/2-d,y:u/2},...B(l/2-d,0,d,_n,270,450)],g=R(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),I(t,v),t.intersect=function(e){return K.polygon(t,h,e)},s}e(yn,`stadium`);async function bn(e,t){return Ke(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(bn,`state`);function xn(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=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 u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=T.svg(u),f=b(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return I(t,_),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}e(xn,`stateEnd`);function Sn(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=T.svg(a).circle(0,0,t.width,S(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 I(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}e(Sn,`stateStart`);var Cn=8;async function wn(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.width+2*Cn+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*Cn,f=u,p=-l/2,m=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=T.svg(s),n=b(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+Cn,m,p+Cn,m+f,n),a=e.line(p+Cn+d,m,p+Cn+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,h(c)),I(t,o)}else{let e=J(s,d,f,g);r&&e.attr(`style`,r),I(t,e)}return t.intersect=function(e){return K.polygon(t,g,e)},s}e(wn,`subroutine`);var Tn=.2;async function En(e,t){let{labelStyles:n,nodeStyles:r}=x(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-Tn*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=(t?.height?t?.height:c.height)+o*2,u=Tn*l,d=Tn*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=T.svg(s),v=b(t,{}),y=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let C=R(y),w=_.path(C,v),E=R(S),D=_.path(E,{...v,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>w,`:first-child`),O.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),I(t,O),t.intersect=function(e){return K.polygon(t,y,e)},s}e(En,`taggedRect`);async function Dn(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=T.svg(i),h=b(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...z(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,y=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...z(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],S=R(g),C=m.path(S,h),w=R(y),E=m.path(w,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>C,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),I(t,D),t.intersect=function(e){return K.polygon(t,g,e)},i}e(Dn,`taggedWaveEdgedRectangle`);async function On(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await P(e,t,L(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),I(t,u),t.intersect=function(e){return K.rect(t,e)},i}e(On,`text`);var kn=e((e,t,n,r,i,a)=>`M${e},${t} +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./app-chunk-O7XYJQB3.js";import{a as f,p,r as m,u as h}from"./app-chunk-ZIGJFQKS.js";import{a as g,i as _,r as v,t as y}from"./app-chunk-7PRAP22T.js";import{n as b,t as x}from"./app-chunk-742MDFTN.js";import{n as S,r as C}from"./app-chunk-MBY4JIJT.js";import{s as w}from"./app-chunk-J5ZVWO5B.js";import{t as T}from"./app-rough.esm.js";var E=1,D=3;async function O(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!k(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let e=u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize,[n=c.fontSize]=p(e),r=n*5+`px`;t.style.minWidth=r,t.style.maxWidth=r}else t.style.width=`100%`;n(t)}e(i,`setupImage`),setTimeout(()=>{t.complete&&i()}),t.addEventListener(`error`,i),t.addEventListener(`load`,i)})))}e(O,`configureLabelImages`);function k(e){return e.nodeType===D?e.textContent?.trim()!==``:e.nodeType!==E||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(k)}e(k,`hasTextBesidesImages`);var A=3,j=32,M=e(async(e,t,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),s=[{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),c=t.width?Math.max(t.width-2*(t.padding??0),j):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await S(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return n(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),n(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+A;let _=p.length>0?g-A:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-_/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(t.padding??0)/2,label:o}},`c4LabelHelper`),N=e((t,n)=>{let{x:r,y:i,width:a,height:o}=t;return a>=n?t:`left`in t?{x:r,y:i,width:n,height:o,top:i,left:r,bottom:i+o,right:r+n,toJSON:e(()=>({}),`toJSON`)}:{x:r-(n-a)/2,y:i,width:n,height:o}},`withMinWidth`),P=e(async(e,t,r)=>{if(t.stereotype!==void 0)return M(e,t,r);let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,m=t.labelType===`markdown`,g=c&&!t.width?t.minWidth??0:0,_=await S(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||u().flowchart?.wrappingWidth,minWidth:g,classes:m?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:m},u()),v=(t?.padding??0)/2,y;if(a){let e=_.children[0],t=n(_);await O(e),y=await C.measure(()=>e.getBoundingClientRect()),y=N(y,g),t.attr(`width`,y.width),t.attr(`height`,y.height)}else y=await C.measure(()=>_.getBBox()),y=N(y,g);return a?s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):s.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:y,halfPadding:v,label:s}},`labelHelper`),F=e(async(e,t,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await S(a,d(f(t),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],t=n(s);l=await C.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await C.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),I=e((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`),L=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function R(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(R,`createPathFromPoints`);function z(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(z,`generateFullSineWavePoints`);function B(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(ee,`mergePaths`);var V=e((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,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`);function te(e,t){return e.intersect(t)}e(te,`intersectNode`);var H=te;function U(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}e(G,`sameSign`);var ae=W;function oe(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 c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r1&&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,c=Math.sqrt(o*o+s*s);return a[`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`),se=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await S(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function ce(e,n){let{labelStyles:r}=_(n);n.labelStyle=r;let i=L(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=T.svg(o),l=g(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,h(s)),I(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}e(ce,`anchor`);function le(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(le,`generateArcPoints`);function ue(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ue,`calculateArcSagitta`);async function de(t,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await P(t,n,L(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ue(f,p,m),v=(n?.width?n?.width:d.width)+o*2+h-h,y=f,{cssStyles:b}=n,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...le(-v/2,-y/2,-v/2,y/2,p,m,!1),{x:v/2,y:y/2},...le(v/2,y/2,v/2,-y/2,p,m,!0)],S=T.svg(u),C=g(n,{});n.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=R(x),E=S.path(w,C),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),b&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,b),i&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),I(n,D),n.intersect=function(e){return K.polygon(n,x,e)},u}e(de,`bowTieRect`);async function fe(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=_(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await P(t,n,L(n)),l=r?.nodeBorder??r?.lineColor??`currentColor`,u=n.padding??12,d=Math.max(s.width+u*2,n.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,n.height??0),m=-p/2+f,h=p/2,v=d*.72,y=[`M${-d/2},${m}`,`L${-v/2},${h}`,`A${v/2},${f} 0 0 0 ${v/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:b}=n,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(n.look===`handDrawn`){let e=T.svg(o).path(y,g(n,{}));x.node()?.appendChild(e),b&&x.attr(`style`,b)}else x.append(`path`).attr(`d`,y).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),I(n,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let C=e((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`),w=[...C(d/2,m,-1),...C(v/2,h,1).reverse()];return n.intersect=function(e){return K.polygon(n,w,e)},o}e(fe,`bucket`);var pe=20,me=8,he=80,ge=8;function _e(e){let{themeVariables:t}=u(),n=t.clusterBkg,r=t.clusterBorder;switch(e){case`flow`:return{rx:10,fill:`none`,stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:`flow-collapsed`};default:return{rx:ge,fill:n,stroke:r,cssClass:`collapsed-group`}}}e(_e,`getCollapsedStyle`);async function ve(e,t){let n=_e(t.metadata?.containerType),{fill:r,stroke:i}=n,{nodeStyles:a}=_(t),{shapeSvg:s,bbox:c}=await P(e,t,L(t)),{theme:l,themeVariables:d}=u();w(s,t.colorIndex,l,d.borderColorArray);let f=t.padding??8,p=c.height,m=Math.max(c.width+f*2,he,t?.width??0),v=Math.max(p+me+pe+f*2,t?.height??0),y=-m/2,b=-v/2,x=-(me+pe)/2,S=s.select(`.label`);S&&(t.useHtmlLabels??o(u())?S.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+x})`):S.attr(`transform`,`translate(0, ${-c.height/2+x})`));let C;if(t.look===`handDrawn`){let e=T.svg(s),a=g(t,{fill:r,stroke:i,...n.strokeWidth===void 0?{}:{strokeWidth:n.strokeWidth},...r===`none`?{fillWeight:0}:{fillStyle:`solid`}}),o=e.path(q(y,b,m,v,n.rx),a);C=s.insert(()=>o,`:first-child`),C.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,h(t.cssStyles))}else C=s.insert(`rect`,`:first-child`),C.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,a).attr(`rx`,n.rx).attr(`ry`,n.rx).attr(`x`,y).attr(`y`,b).attr(`width`,m).attr(`height`,v).attr(`fill`,r).attr(`stroke`,i),n.strokeWidth!==void 0&&C.attr(`stroke-width`,n.strokeWidth+`px`);let E=b+f+p+me;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,y+8).attr(`y1`,E).attr(`x2`,y+m-8).attr(`y2`,E).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let D=E+pe/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,D).attr(`r`,2.5).attr(`fill`,i);return I(t,C),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}e(ve,`collapsedGroup`);function J(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+`)`)}e(J,`insertPolygonShape`);var ye=[`right`,`left`,`up`,`down`],be=`point`,xe=e(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`),Se=e(e=>ye.filter(t=>e.has(t)).join(`|`)||be,`getDirectionKey`),Ce={"right|left|up|down":e(({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":e(({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":e(({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":e(({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":e(({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":e(({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":e(({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":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":e(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":e(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":e(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:e(({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:e(({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:e(({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:e(({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`),[be]:()=>[{x:0,y:0}]},we=e((e,t,n,r)=>{let i=xe(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(Ce[Se(i)]??Ce[be])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Te(e,t){let n=t,{shapeSvg:r,bbox:i}=await P(e,n,L(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=we(n.directions??[],i,n,u),f=J(r,u,o,d);return f.attr(`style`,n.style??null),I(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}e(Te,`block_arrow`);async function Ee(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await P(e,t,L(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=T.svg(a).path(q(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+18/2).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),I(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Ee,`browser`);var De=12;async function Oe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+De),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+De,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+De},{x:0+De,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=g(t,{}),r=R(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=J(s,l,u,p);return r&&m.attr(`style`,r),I(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}e(Oe,`card`);function ke(e,t){let{nodeStyles:n}=_(t);t.label=``;let r=e.insert(`g`).attr(`class`,L(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=T.svg(r),c=g(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=R(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}e(ke,`choice`);async function Ae(e,n,r){let{labelStyles:i,nodeStyles:a}=_(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await P(e,n,L(n)),l=r?.padding??c,u=Math.sqrt(s.width**2+s.height**2)/2,d=n.look===`neo`?u+32:u+l,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=T.svg(o),t=g(n,{}),r=e.circle(0,0,d*2,t);f=o.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,h(p))}else f=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return I(n,f),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,d,e),K.circle(n,d,e)},o}e(Ae,`circle`);async function je(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await P(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/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`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),I(n,o),n.intersect=function(e){return K.rect(n,e)},r}e(je,`composite`);async function Me(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await P(e,t,L(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=T.svg(a).path(q(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),I(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Me,`consoleWindow`);function Ne(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} + M ${i.x},${i.y} L ${o.x},${o.y}`}e(Ne,`createLine`);function Pe(e,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=T.svg(a),l=g(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ne(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),I(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),K.circle(n,o,e)},a}e(Pe,`crossedCircle`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iS,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>b,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),I(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Fe,`curlyBraceLeft`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iS,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>b,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),I(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Ie,`curlyBraceRight`);function Z(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iE,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>x,`:first-child`),D.insert(()=>C,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),I(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}e(Le,`curlyBraces`);async function Re(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(5,c.height+o*2,t?.height??0),u=l/2,d=u-Math.sqrt(Math.max(0,u**2-(c.height/2)**2)),f=Math.max(l/4,d),p=Math.max(20,c.width+a*2+f*2,(c.width+a*2)*1.25,t?.width??0),{cssStyles:m}=t,h=T.svg(s),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=p,b=l,x=y-u,S=b/4,C=[{x,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x,y:b},...B(-x,-b/2,u,50,270,90)],w=R(C),E=h.path(w,v),D=s.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&D.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&D.selectChildren(`path`).attr(`style`,r),D.attr(`transform`,`translate(${-p/2}, ${-l/2})`),I(t,D),t.intersect=function(e){return K.polygon(t,C,e)},s}e(Re,`curvedTrapezoid`);async function ze(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,v=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:y}=t;if(t.look===`handDrawn`){let e=T.svg(i),n=g(t,{}),r=e.path(q(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);v.insert(()=>a,`:first-child`),v.insert(()=>r,`:first-child`),y&&v.attr(`style`,y)}else v.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),v.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);I(t,v);let b=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);let x=m+l,S=Math.asin(Math.min(1,(h-x)/l))*180/Math.PI,C=[...B(0,-x,l,24,180+S,-S),...B(-(-c/2+f),-(h+f),f,12,90,0),...B(-(-c/2+f),-(p/2-f),f,12,360,270),...B(-(c/2-f),-(p/2-f),f,12,270,180),...B(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,C,e)},i}e(ze,`person`);var Be=e((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`),Ve=e((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`),He=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Ue=8,We=8;async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=_(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.widtho,`:first-child`),v=c.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=Be(0,0,d,m,f,p);v=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(y)).attr(`style`,r)}return v.attr(`label-offset-y`,p),v.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),I(t,v),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.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},c}e(Ge,`cylinder`);async function Ke(e,t,n){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await P(e,t,L(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=T.svg(a),n=g(t,{}),r=f||p?e.path(q(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,h(f)).attr(`ry`,h(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return I(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},a}e(Ke,`drawRect`);async function qe(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ke(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=T.svg(c),n=g(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.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(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}e(qe,`datastore`);async function Je(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c}=await P(e,t,L(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=T.svg(o),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],b=h.polygon(y.map(e=>[e.x,e.y]),v),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),I(t,x),t.intersect=function(e){return K.rect(t,e)},o}e(Je,`dividedRectangle`);async function Ye(e,n){let{labelStyles:r,nodeStyles:i}=_(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await P(e,n,L(n)),u=Math.sqrt(l.width**2+l.height**2)/2,d=(n?.width?n?.width/2:u)+(s??0),f=d+a,p,{cssStyles:m}=n;if(n.look===`handDrawn`){let e=T.svg(c),t=g(n,{roughness:.2,strokeWidth:2.5}),r=g(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,f*2,t),a=e.circle(0,0,d*2,r);p=c.insert(`g`,`:first-child`),p.attr(`class`,h(n.cssClasses)).attr(`style`,h(m)),p.node()?.appendChild(i),p.node()?.appendChild(a)}else{p=c.insert(`g`,`:first-child`);let e=p.insert(`circle`,`:first-child`),t=p.insert(`circle`);p.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,f).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return I(n,p),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,f,e),K.circle(n,f,e)},c}e(Ye,`doublecircle`);async function Xe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o}=await P(e,t,L(t)),{theme:s,themeVariables:c}=u();w(i,t.colorIndex,s,c.borderColorArray);let l=o??10,d=a.width/2+l*2,f=a.height/2+l*2,p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=T.svg(i),n=g(t,{}),r=e.ellipse(0,0,d*2,f*2,n);p=i.insert(()=>r,`:first-child`),p.attr(`class`,`basic label-container`),m&&p.attr(`style`,m)}else p=i.insert(`ellipse`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`rx`,d).attr(`ry`,f).attr(`cx`,0).attr(`cy`,0);return t.width=d*2,t.height=f*2,I(t,p),t.calcIntersect=function(e,t){let n=e.width/2,r=e.height/2;return K.ellipse(e,n,r,t)},t.intersect=function(e){return K.ellipse(t,d,f,e)},i}e(Xe,`usecaseEllipse`);function Ze(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=_(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=T.svg(o),{nodeBorder:l}=r,u=g(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),I(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),K.circle(n,7,e)},o}e(Ze,`filledCircle`);var Qe=10,$e=10;async function et(e,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.heightb,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,I(n,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),K.polygon(n,p,e)},s}e(et,`flippedTriangle`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],v=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:y}=t,b;if(t.look===`handDrawn`){let e=T.svg(i).path(v,g(t,{}));b=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),y&&b.attr(`style`,y)}else b=i.insert(`path`,`:first-child`).attr(`d`,v).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?I(t,b):I(t,b,{width:c,height:d});let x=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}e(tt,`folder`);function nt(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=_(t);t.label=``;let o=e.insert(`g`).attr(`class`,L(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);(n===`LR`||n===`RL`)&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=T.svg(o),p=g(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),I(t,h);let v=r?.padding??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(e){return K.rect(t,e)},o}e(nt,`forkJoin`);async function rt(e,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await P(e,n,L(n)),l=(n?.height?n?.height:Math.max(10,c.height))+o*2,u=l/2,d=u-Math.sqrt(Math.max(0,u**2-(c.height/2)**2)),f=(n?.width?n?.width:Math.max(15,c.width)+d*2)+a*2,{cssStyles:p}=n,m=T.svg(s),h=g(n,{});n.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let v=[{x:-f/2,y:-l/2},{x:f/2-u,y:-l/2},...B(-f/2+u,0,u,50,90,270),{x:f/2-u,y:l/2},{x:-f/2,y:l/2}],y=R(v),b=m.path(y,h),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),p&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,p),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),I(n,x),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:u,point:e}),K.polygon(n,v,e)},s}e(rt,`halfRoundedRectangle`);var it=e((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`);async function at(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c,bbox:l}=await P(e,t,L(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=T.svg(c),n=g(t,{}),r=it(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=J(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,I(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}e(at,`hexagon`);async function ot(e,n){let{labelStyles:r,nodeStyles:i}=_(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await P(e,n,L(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=T.svg(a),u=g(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=R(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),I(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),K.polygon(n,d,e)},a}e(ot,`hourglass`);async function st(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=_(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await P(e,n,`icon-shape default`),p=n.pos===`t`,m=c,h=c,{nodeBorder:v}=r,{stylesMap:b}=y(n),S=-h/2,C=-m/2,w=n.label?8:0,E=T.svg(u),D=g(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(S,C,h,m,D),k=Math.max(h,d.width),A=m+d.height+w,j=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),M=u.insert(()=>O,`:first-child`),N=u.insert(()=>j);if(n.icon){let e=u.append(`g`);e.html(`${await x(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+w/2-i/2-o:-d.height/2-w/2-i/2-o})`),e.attr(`style`,`color: ${b.get(`stroke`)??v};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),M.attr(`transform`,`translate(0,${p?d.height/2+w/2:-d.height/2-w/2})`),I(n,N),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+w},{x:r+h/2,y:i-a/2+d.height+w},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+d.height+w},{x:r-d.width/2,y:i-a/2+d.height+w}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+m},{x:r+d.width/2,y:i-a/2+m},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+m},{x:r-h/2,y:i-a/2+m}],K.polygon(n,o,e)},u}e(st,`icon`);async function ct(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=_(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await P(e,n,`icon-shape default`),p=n.label?8:0,m=n.pos===`t`,{nodeBorder:h,mainBkg:v}=r,{stylesMap:b}=y(n),S=T.svg(u),C=g(n,{});n.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`),C.stroke=b.get(`fill`)??v;let w=u.append(`g`);n.icon&&w.html(`${await x(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let E=w.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,j=Math.max(D,O)*Math.SQRT2+40,M=S.circle(0,0,j,C),N=Math.max(j,d.width),F=j+d.height+p,L=S.rectangle(-N/2,-F/2,N,F,{...C,fill:`transparent`,stroke:`none`}),R=u.insert(()=>M,`:first-child`),z=u.insert(()=>L);return w.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),w.attr(`style`,`color: ${b.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-F/2:F/2-d.height})`),R.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),I(n,z),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),K.rect(n,e)},u}e(ct,`iconCircle`);async function lt(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=_(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await P(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,v=c+f*2,{nodeBorder:b,mainBkg:S}=r,{stylesMap:C}=y(n),w=-v/2,E=-h/2,D=n.label?8:0,O=T.svg(u),k=g(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=C.get(`fill`)??S;let A=O.path(q(w,E,v,h,5),k),j=Math.max(v,d.width),M=h+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),F=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`${await x(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${C.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-M/2:M/2-d.height})`),F.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),I(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+v/2,y:i-a/2+d.height+D},{x:r+v/2,y:i+a/2},{x:r-v/2,y:i+a/2},{x:r-v/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-v/2,y:i-a/2},{x:r+v/2,y:i-a/2},{x:r+v/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-v/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(lt,`iconRounded`);async function ut(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=_(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await P(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,v=c+f*2,{nodeBorder:b,mainBkg:S}=r,{stylesMap:C}=y(n),w=-v/2,E=-h/2,D=n.label?8:0,O=T.svg(u),k=g(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=C.get(`fill`)??S;let A=O.path(q(w,E,v,h,.1),k),j=Math.max(v,d.width),M=h+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),F=u.insert(()=>A,`:first-child`),L=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`${await x(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${C.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-M/2:M/2-d.height})`),F.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),I(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+v/2,y:i-a/2+d.height+D},{x:r+v/2,y:i+a/2},{x:r-v/2,y:i+a/2},{x:r-v/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-v/2,y:i-a/2},{x:r+v/2,y:i-a/2},{x:r+v/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-v/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(ut,`iconSquare`);async function dt(e,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=_(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await P(e,n,`image-shape default`),h=n.pos===`t`,v=-u/2,y=-d/2,b=n.label?8:0,x=T.svg(f),S=g(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(v,y,u,d,S),w=Math.max(u,p.width),E=d+p.height+b,D=x.rectangle(-w/2,-E/2,w,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>C,`:first-child`),k=f.insert(()=>D);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),O.attr(`transform`,`translate(0,${h?p.height/2+b/2:-p.height/2-b/2})`),I(n,k),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+b},{x:r+u/2,y:i-a/2+p.height+b},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+b},{x:r-p.width/2,y:i-a/2+p.height+b}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],K.polygon(n,o,e)},f}e(dt,`imageSquare`);async function ft(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=g(t,{}),r=R(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ft,`inv_trapezoid`);async function pt(e,t){let{shapeSvg:n,bbox:r,label:i}=await P(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))})`),I(t,a),t.intersect=function(e){return K.rect(t,e)},n}e(pt,`labelRect`);async function mt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=g(t,{}),r=R(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(mt,`lean_left`);async function ht(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=g(t,{}),r=R(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ht,`lean_right`);function gt(e,n){let{labelStyles:r,nodeStyles:i}=_(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=T.svg(a),d=g(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=R(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),I(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),K.polygon(n,l,e)},a}e(gt,`lightningBolt`);var _t=e((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`),vt=e((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`),yt=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),bt=10,xt=10;async function St(e,t){let{labelStyles:n,nodeStyles:r}=_(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.widtho,`:first-child`).attr(`class`,`line`),v=s.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=_t(0,0,u,p,d,f,m);v=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(y)).attr(`style`,r)}return v.attr(`label-offset-y`,f),v.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),I(t,v),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=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-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(St,`linedCylinder`);async function Ct(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c,label:l}=await P(e,t,L(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=T.svg(s),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...z(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],b=h.polygon(y.map(e=>[e.x,e.y]),v),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f-(c.y-(c.top??0))})`),I(t,x),t.intersect=function(e){return K.polygon(t,y,e)},s}e(Ct,`linedWaveEdgedRect`);var wt=56,Tt=72,Et=8,Dt=2,Ot=8,kt={normal:`usecase-actor-shape usecase-actor-normal`,hollow:`usecase-actor-hollow`,awesome:`usecase-actor-awesome`,icon:`usecase-actor-icon`},At=Math.PI/3,jt=.6,Mt=e((e,t)=>{let n=t*jt,r=t*Math.sqrt(1-jt**2),i=Math.cos(At),a=-Math.sin(At),o=n*-a,s=e+n*i,c=r*i,l=r*a;return`M ${o-c} ${s-l} L ${o+c} ${s+l}`},`businessMarkerPathForCircle`),Nt={normal:Mt(-24,12),hollow:Mt(-23,9),awesome:Mt(-21,13),icon:`M 12 -8 L 26 -26`},Pt=e((e,t,n)=>{let r=(t.x??0)-(t.left??0),i=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${-t.width/2-r},${n-t.height/2-i})`)},`positionLabel`),Ft=e((e,t,n,r,i=!1)=>{if(t.look===`handDrawn`){let a=T.svg(e).path(n,g(t,i?{fill:`none`}:{}));return e.insert(()=>a,`:first-child`).attr(`class`,r)}let a=e.append(`path`).attr(`class`,r).attr(`d`,n);return i&&a.attr(`fill`,`none`),a},`appendActorPath`),It=e((e,t,n,r,i,a,o=!1)=>{if(t.look===`handDrawn`){let s=T.svg(e).circle(n,r,i*2,g(t,o?{fill:`none`}:{}));return e.insert(()=>s,`:first-child`).attr(`class`,a)}let s=e.append(`circle`).attr(`class`,a).attr(`cx`,n).attr(`cy`,r).attr(`r`,i);return o&&s.attr(`fill`,`none`),s},`appendActorCircle`),Lt=e((e,t,n)=>{t.business&&e.append(`path`).attr(`class`,`usecase-business-marker usecase-actor-business-marker`).attr(`d`,Nt[n]).attr(`fill`,`none`).attr(`style`,`stroke: inherit !important; stroke-width: inherit !important`)},`appendBusinessActorMarker`);async function Rt(e,t,n,r){let{labelStyles:i,nodeStyles:a}=_(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await P(e,n===`icon`||t.stereotype!==void 0?{...t,icon:n===`icon`?void 0:t.icon,stereotype:void 0}:t,L(t,`usecase-actor-variant usecase-actor-${n}`)),l=t.accessibleName??t.label;l&&o.attr(`role`,`img`).attr(`aria-label`,l),c.attr(`class`,`label actor-label usecase-actor-label`);let{theme:d,themeVariables:f}=u();w(o,t.colorIndex,d,f.borderColorArray);let p,m;if(t.stereotype){let e=await F(o,`\xAB${t.stereotype}\xBB`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});p=e.label.attr(`class`,`label usecase-stereotype`),m=e.bbox}let h=o.append(`g`).attr(`class`,`usecase-actor-glyph ${kt[n]}`).attr(`style`,a||null);await r(h,t),Lt(h,t,n);let g=t.padding??Ot,v=m?.height??0,y=Tt+Et+s.height+(m?v+Dt:0),b=Math.max(wt,s.width,m?.width??0)+g*2,x=y+g*2,S=-y/2;h.attr(`transform`,`translate(0,${S+Tt/2})`);let C=S+Tt+Et;return p&&m&&(C+=v/2,Pt(p,m,C),C+=v/2+Dt),Pt(c,s,C+s.height/2),I(t,o.insert(`rect`,`:first-child`).attr(`class`,`usecase-actor-outline`).attr(`x`,-b/2).attr(`y`,-x/2).attr(`width`,b).attr(`height`,x).attr(`opacity`,0).attr(`aria-hidden`,`true`)),t.intersect=e=>K.rect(t,e),o}e(Rt,`renderUsecaseActor`);var zt=[`M 0 -12`,`C 6.627 -12 12 -17.373 12 -24`,`C 12 -30.627 6.627 -36 0 -36`,`C -6.627 -36 -12 -30.627 -12 -24`,`C -12 -17.373 -6.627 -12 0 -12 Z`,`M 0 -12 V 8`,`M -17 -5 H 17`,`M 0 8 L -15 28`,`M 0 8 L 15 28`].join(` `);async function Bt(e,t){return Rt(e,t,`normal`,(e,t)=>{Ft(e,t,zt,`usecase-actor-stick`)})}e(Bt,`usecaseActor`);var Vt=[`M 0 -34`,`C 7.18 -34 13 -28.18 13 -21`,`C 13 -13.82 7.18 -8 0 -8`,`C -7.18 -8 -13 -13.82 -13 -21`,`C -13 -28.18 -7.18 -34 0 -34 Z`,`M -24 25`,`C -24 7 -14 -3 0 -3`,`C 14 -3 24 7 24 25`,`C 24 28 21 30 18 30`,`H -18`,`C -21 30 -24 28 -24 25 Z`].join(` `);async function Ht(e,t){return Rt(e,t,`awesome`,(e,t)=>{Ft(e,t,Vt,`usecase-actor-awesome-silhouette`)})}e(Ht,`usecaseActorAwesome`);var Ut=[`M -22 -10`,`H 22`,`V 0`,`H 6`,`L 22 17`,`L 13 28`,`L 0 13`,`L -13 28`,`L -22 17`,`L -6 0`,`H -22`,`Z`].join(` `);async function Wt(e,t){return Rt(e,t,`hollow`,(e,t)=>{It(e,t,0,-23,9,`usecase-actor-hollow-head`,!0),Ft(e,t,Ut,`usecase-actor-hollow-body`,!0)})}e(Wt,`usecaseActorHollow`);var Gt=52,Kt=42,qt=-2,Jt=e(async(e,t)=>{let n=-Gt/2,r=qt-Gt/2;if(t.look===`handDrawn`){let i=T.svg(e).rectangle(n,r,Gt,Gt,g(t,{}));e.insert(()=>i,`:first-child`).attr(`class`,`usecase-actor-icon-frame`)}else e.append(`rect`).attr(`class`,`usecase-actor-icon-frame`).attr(`x`,n).attr(`y`,r).attr(`width`,Gt).attr(`height`,Gt).attr(`rx`,4).attr(`ry`,4);let i=t.icon??``,a=await b(i.includes(`:`)?i:`fa:${i}`),o=await x(i,{height:Kt,width:Kt,fallbackPrefix:`fa`}),s=e.append(`g`).attr(`class`,`usecase-actor-icon-symbol${a?``:` usecase-actor-icon-fallback`}`).attr(`aria-hidden`,`true`).html(`${o}`),c=s.node()?.getBBox();c&&s.attr(`transform`,`translate(${-c.width/2-c.x},${qt-c.height/2-c.y})`)},`drawIconActor`);async function Yt(e,t){return Rt(e,t,`icon`,Jt)}e(Yt,`usecaseActorIcon`);var Xt=e((e,t,n)=>{let r=(t.x??0)-(t.left??0),i=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${-t.width/2-r},${n-t.height/2-i})`)},`positionLabel`);async function Zt(e,t){let n=t,{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n.stereotype?{...t,stereotype:void 0}:t,L(t,`usecase-business-shape`));c.attr(`class`,`label usecase-label`);let{theme:l,themeVariables:d}=u();w(a,t.colorIndex,l,d.borderColorArray);let f,p;if(n.stereotype){let e=await F(a,`\xAB${n.stereotype}\xBB`,{labelStyle:r,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=e.label.attr(`class`,`label usecase-stereotype`),p=e.bbox}let m=p?2:0,h=o.height+(p?.height??0)+m,v=Math.max(o.width,p?.width??0),y=s??10,b=v/2+y*2,x=h/2+y*2,S=Math.min(Math.max(y/5,1),y/2),C=v/2+S,E=b-S,D=C/b,O=E/b,k=x*Math.sqrt(Math.max(0,1-D*D)),A=-x*Math.sqrt(Math.max(0,1-O*O));f&&p&&Xt(f,p,-h/2+p.height/2),Xt(c,o,h/2-o.height/2);let j;if(t.look===`handDrawn`){let e=T.svg(a).ellipse(0,0,b*2,x*2,g(t,{}));j=a.insert(()=>e,`:first-child`).attr(`class`,`basic label-container usecase-business-ellipse`)}else j=a.insert(`ellipse`,`:first-child`).attr(`class`,`basic label-container usecase-business-ellipse`).attr(`style`,i).attr(`rx`,b).attr(`ry`,x).attr(`cx`,0).attr(`cy`,0);a.append(`path`).attr(`class`,`usecase-business-marker`).attr(`d`,`M ${C} ${k} L ${E} ${A}`).attr(`fill`,`none`).attr(`style`,i||null);let M=n.accessibleName??n.label;return M&&a.attr(`role`,`img`).attr(`aria-label`,M),I(t,j),t.calcIntersect=(e,t)=>K.ellipse(e,e.width/2,e.height/2,t),t.intersect=e=>K.ellipse(t,b,x,e),a}e(Zt,`usecaseBusiness`);var Qt=8,$t=4,en=1,tn=e((e,t,n,r)=>{let i=(t.x??0)-(t.left??0),a=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${n-t.width/2-i},${r-t.height/2-a})`)},`positionLabel`),nn=e(e=>{let t=Number.parseFloat(e??``);return Number.isFinite(t)&&t>=0?t:en},`numericStrokeWidth`);async function rn(t,n){let r=n,{labelStyles:i,nodeStyles:a}=_(n),{stylesMap:o}=y(n);n.labelStyle=i;let{shapeSvg:s,bbox:c,label:l}=await P(t,n,L(n,`usecase-json-table`));s.attr(`role`,`img`),r.accessibleName&&s.attr(`aria-label`,r.accessibleName),l.attr(`class`,`label usecase-json-title`);let u=s.append(`g`).attr(`class`,`usecase-json-table-grid`),d=[];for(let e of r.jsonRows??[]){let t=await F(u,e.key,{labelStyle:i,useHtmlLabels:n.useHtmlLabels,padding:0,centerLabel:!0}),r=await F(u,e.value,{labelStyle:i,useHtmlLabels:n.useHtmlLabels,padding:0,centerLabel:!0});d.push({key:{label:t.label.attr(`class`,`label usecase-json-key`),bbox:t.bbox},value:{label:r.label.attr(`class`,`label usecase-json-value`),bbox:r.bbox}})}let f=Math.max(0,...d.map(({key:e})=>e.bbox.width))+Qt*2,p=Math.max(0,...d.map(({value:e})=>e.bbox.width))+Qt*2,m=c.width+Qt*2,h=Math.max(m,f+p),v=p+Math.max(0,h-f-p),b=c.height+$t*2,x=d.map(({key:e,value:t})=>Math.max(e.bbox.height,t.bbox.height)+$t*2),S=b+x.reduce((e,t)=>e+t,0),C=nn(o.get(`stroke-width`)),w=h+C*2,E=S+C*2,D=-h/2,O=-S/2,k=n.look===`handDrawn`?T.svg(s):void 0,A=k?g(n,{}):void 0,j=e((e,t,n,r,i,o)=>{if(k&&A){let a=k.rectangle(n,r,i,o,A);return e.insert(()=>a,`:first-child`).attr(`class`,t)}return e.insert(`rect`,`:first-child`).attr(`class`,t).attr(`x`,n).attr(`y`,r).attr(`width`,i).attr(`height`,o).attr(`style`,a)},`insertCell`),M=j(s,`label-container usecase-json-border`,-w/2,-E/2,w,E);j(u,`usecase-json-cell usecase-json-title-cell`,D,O,h,b),u.node()?.append(l.node()),tn(l,c,0,O+b/2);let N=O+b;return d.forEach(({key:e,value:t},n)=>{let r=x[n],i=u.append(`g`).attr(`class`,`usecase-json-row`).attr(`data-row-index`,n).attr(`transform`,`translate(0,${N})`);j(i,`usecase-json-cell usecase-json-key-cell`,D,0,f,r),j(i,`usecase-json-cell usecase-json-value-cell`,D+f,0,v,r),i.node()?.append(e.label.node(),t.label.node()),tn(e.label,e.bbox,D+f/2,r/2),tn(t.label,t.bbox,D+f+v/2,r/2),N+=r}),I(n,M),n.intersect=e=>K.rect(n,e),s}e(rn,`usecaseJsonTable`);async function an(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c,bbox:l,label:u}=await P(e,t,L(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,v=-m/2,{cssStyles:y}=t,b=T.svg(c),x=g(t,{}),S=[{x:h-s,y:v+s},{x:h-s,y:v+m+s},{x:h+p-s,y:v+m+s},{x:h+p-s,y:v+m},{x:h+p,y:v+m},{x:h+p,y:v+m-s},{x:h+p+s,y:v+m-s},{x:h+p+s,y:v-s},{x:h+s,y:v-s},{x:h+s,y:v},{x:h,y:v},{x:h,y:v+s}],C=[{x:h,y:v+s},{x:h+p-s,y:v+s},{x:h+p-s,y:v+m},{x:h+p,y:v+m},{x:h+p,y:v},{x:h,y:v}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let w=R(S),E=b.path(w,x),D=R(C),O=b.path(D,x);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),I(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}e(an,`multiRect`);async function on(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,v=-m/2,{cssStyles:y}=t,b=z(h-10,v+m+10,h+d-10,v+m+10,p,.8),x=b?.[b.length-1],S=[{x:h-10,y:v+10},{x:h-10,y:v+m+10},...b,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:v-10},{x:h+10,y:v-10},{x:h+10,y:v},{x:h,y:v},{x:h,y:v+10}],C=[{x:h,y:v+10},{x:h+d-10,y:v+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:v},{x:h,y:v}],w=T.svg(i),E=g(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=R(S),O=w.path(D,E),k=R(C),A=w.path(k,E),j=i.insert(()=>O,`:first-child`);return j.insert(()=>A),j.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p-(a.y-(a.top??0))})`),I(t,j),t.intersect=function(e){return K.polygon(t,S,e)},i}e(on,`multiWaveEdgedRectangle`);async function sn(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r,t.useHtmlLabels||o(s())||(t.centerLabel=!0);let{shapeSvg:a,bbox:c,label:l}=await P(e,t,L(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=T.svg(a),v=g(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=h.rectangle(f,p,u,d,v),b=a.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,b),t.intersect=function(e){return K.rect(t,e)},a}e(sn,`note`);var cn=e((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`);async function ln(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await P(e,t,L(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=T.svg(i),n=g(t,{}),r=cn(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=J(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),I(t,l),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}];return K.polygon(e,r,t)},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(ln,`question`);async function un(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c,label:l}=await P(e,t,L(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,v=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:y}=t,b=T.svg(s),x=g(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=R(v),C=b.path(S,x),w=s.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,w),t.intersect=function(e){return K.polygon(t,v,e)},s}e(un,`rect_left_inv_arrow`);async function dn(e,r){let{labelStyles:i,nodeStyles:a}=_(r);r.labelStyle=i;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=e.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),l=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=r.description,p=r.label,m=await se(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(o(u())){let e=m.children[0],t=n(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let v=f||[],y=m.getBBox(),b=await se(d,Array.isArray(v)?v.join(`
`):v,r.labelStyle,!0,!0),x=b.children[0],S=n(b);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let C=(r.padding||0)/2;n(b).attr(`transform`,`translate( `+(h.width>y.width?0:(y.width-h.width)/2)+`, `+(y.height+C+5)+`)`),n(m).attr(`transform`,`translate( `+(h.width(t.debug(`Rough node insert CXC`,i),a),`:first-child`),k=c.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else k=l.insert(`rect`,`:first-child`),A=l.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-C).attr(`y`,-h.height/2-C).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-C).attr(`x2`,h.width/2+C).attr(`y1`,-h.height/2-C+y.height+C).attr(`y2`,-h.height/2-C+y.height+C);return I(r,k),r.intersect=function(e){return K.rect(r,e)},c}e(dn,`rectWithTitle`);async function fn(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ke(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(fn,`roundedRect`);var pn=8;async function mn(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c}=await P(e,t,L(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?pn:pn*2),u=(t?.height??s.height)+a*2,d=l-pn,f=u,p=pn-l/2,m=-u/2,{cssStyles:v}=t,y=T.svg(o),b=g(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-pn,y:m+f},{x:p-pn,y:m},{x:p,y:m},{x:p,y:m+f}],S=y.polygon(x.map(e=>[e.x,e.y]),b),C=o.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`).attr(`style`,h(v)),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),v&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${pn/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),I(t,C),t.intersect=function(e){return K.rect(t,e)},o}e(mn,`shadedProcess`);async function hn(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c,label:l}=await P(e,t,L(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:v}=t,y=T.svg(s),b=g(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=R(x),C=y.path(S,b),w=s.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,r),w.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),I(t,w),t.intersect=function(e){return K.polygon(t,x,e)},s}e(hn,`slopedRect`);async function gn(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n,a=await Ke(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i});if(t.colorIndex!==void 0){let{theme:e,themeVariables:n}=u();w(a,t.colorIndex,e,n.borderColorArray)}return a}e(gn,`squareRect`);var _n=50,vn=e((e,t,n)=>{let r=e.height+n,i=r*Math.cos(Math.PI/(2*(_n-1))),a=Math.sqrt(Math.max(0,i**2-e.height**2));return{w:Math.max(e.width+r/4+t,1.5*r+(r-i),e.width+t+r-a),h:r}},`stadiumDimensions`);async function yn(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?40:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),{w:l,h:u}=vn(c,a,o),d=u/2,{cssStyles:f}=t,p=T.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2+d,y:-u/2},{x:l/2-d,y:-u/2},...B(-l/2+d,0,d,_n,90,270),{x:l/2-d,y:u/2},...B(l/2-d,0,d,_n,270,450)],v=R(h),y=p.path(v,m),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),I(t,b),t.intersect=function(e){return K.polygon(t,h,e)},s}e(yn,`stadium`);async function bn(e,t){return Ke(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(bn,`state`);function xn(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=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 u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=T.svg(u),f=g(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,v=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),y=u.insert(()=>p,`:first-child`);if(y.insert(()=>v),t.look!==`handDrawn`&&y.attr(`class`,`outer-path`),a&&y.selectAll(`path`).attr(`style`,a),i&&y.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;y.attr(`style`,`filter:url(#${n})`)}return I(t,y),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}e(xn,`stateEnd`);function Sn(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=T.svg(a).circle(0,0,t.width,v(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 I(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}e(Sn,`stateStart`);var Cn=8;async function wn(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.width+2*Cn+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*Cn,f=u,p=-l/2,m=-u/2,v=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=T.svg(s),n=g(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+Cn,m,p+Cn,m+f,n),a=e.line(p+Cn+d,m,p+Cn+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,h(c)),I(t,o)}else{let e=J(s,d,f,v);r&&e.attr(`style`,r),I(t,e)}return t.intersect=function(e){return K.polygon(t,v,e)},s}e(wn,`subroutine`);var Tn=.2;async function En(e,t){let{labelStyles:n,nodeStyles:r}=_(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-Tn*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=(t?.height?t?.height:c.height)+o*2,u=Tn*l,d=Tn*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:v}=t,y=T.svg(s),b=g(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let C=R(x),w=y.path(C,b),E=R(S),D=y.path(E,{...b,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>w,`:first-child`),O.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),I(t,O),t.intersect=function(e){return K.polygon(t,x,e)},s}e(En,`taggedRect`);async function Dn(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=T.svg(i),h=g(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let v=[{x:-s/2-s/2*.1,y:f/2},...z(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],y=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:y+s-u,y:(b+c)*1.3},{x:y+s,y:b+c-d},{x:y+s,y:(b+c)*.9},...z(y+s,(b+c)*1.25,y+s-u,(b+c)*1.3,-c*.02,.5)],S=R(v),C=m.path(S,h),w=R(x),E=m.path(w,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>C,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),I(t,D),t.intersect=function(e){return K.polygon(t,v,e)},i}e(Dn,`taggedWaveEdgedRectangle`);async function On(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await P(e,t,L(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),I(t,u),t.intersect=function(e){return K.rect(t,e)},i}e(On,`text`);var kn=e((e,t,n,r,i,a)=>`M${e},${t} a${i},${a} 0,0,1 0,${-r} l${n},0 a${i},${a} 0,0,1 0,${r} M${n},${-r} a${i},${a} 0,0,0 0,${r} - l${-n},0`,`createCylinderPathD`),An=e((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`),jn=e((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),Mn=5,Nn=10;async function Pn(e,t){let{labelStyles:n,nodeStyles:r}=x(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.heighta,`:first-child`),g=s.insert(()=>i,`:first-child`),g.attr(`class`,`basic label-container`),m&&g.attr(`style`,m)}else{let e=kn(0,0,p,u,f,d);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,h(m)).attr(`style`,r),g.attr(`class`,`basic label-container outer-path`),m&&g.selectAll(`path`).attr(`style`,m),r&&g.selectAll(`path`).attr(`style`,r)}return g.attr(`label-offset-x`,f),g.attr(`transform`,`translate(${-p/2}, ${u/2} )`),l.attr(`transform`,`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,g),t.intersect=function(e){let n=K.rect(t,e),r=n.y-(t.y??0);if(d!=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-f)){let i=f*f*(1-r*r/(d*d));i!=0&&(i=Math.sqrt(Math.abs(i))),i=f-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},s}e(Pn,`tiltedCylinder`);async function Fn(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=b(t,{}),r=R(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(Fn,`trapezoid`);async function In(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c}=await P(e,t,L(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=T.svg(s),p=b(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=R(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),I(t,_),t.intersect=function(e){return K.polygon(t,m,e)},s}e(In,`trapezoidalPentagon`);var Ln=10,Rn=10;async function zn(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.width=((n?.width??0)-o)/2,n.widthC,`:first-child`).attr(`transform`,`translate(${-m/2}, ${m/2})`).attr(`class`,`outer-path`);return _&&n.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,_),i&&n.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,i),n.width=p,n.height=m,I(n,w),d.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${m/2-(c.height+(n.padding??0)/(f?2:1)-(c.y-(c.top??0)))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,g,e),K.polygon(n,g,e)},s}e(zn,`triangle`);async function Bn(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c,bbox:l,label:u}=await P(e,t,L(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+(s?p:-p),{cssStyles:h}=t,g=14-d,_=g>0?g/2:0,v=T.svg(c),y=b(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=[{x:-d/2-_,y:m/2},...z(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],C=R(S),w=v.path(C,y),E=c.insert(()=>w,`:first-child`);return E.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),E.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),I(t,E),t.intersect=function(e){return K.polygon(t,S,e)},c}e(Bn,`waveEdgedRectangle`);async function Vn(e,t){let{labelStyles:n,nodeStyles:r}=x(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:c}=await P(e,t,L(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=T.svg(s),h=b(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...z(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...z(l/2,-f/2,-l/2,-f/2,d,-1)],_=R(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),I(t,y),t.intersect=function(e){return K.polygon(t,g,e)},s}e(Vn,`waveRectangle`);var Q=10;async function Hn(e,t){let{labelStyles:n,nodeStyles:r}=x(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-Q,10),t.height=Math.max((t?.height??0)-a*2-Q,10));let{shapeSvg:o,bbox:s,label:c}=await P(e,t,L(t)),l=(t?.width?t?.width:s.width)+i*2+Q,u=(t?.height?t?.height:s.height)+a*2+Q,d=l-Q,f=u-Q,p=-d/2,m=-f/2,{cssStyles:h}=t,g=T.svg(o),_=b(t,{}),v=[{x:p-Q,y:m-Q},{x:p-Q,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-Q}],y=`M${p-Q},${m-Q} L${p+d},${m-Q} L${p+d},${m+f} L${p-Q},${m+f} L${p-Q},${m-Q} + l${-n},0`,`createCylinderPathD`),An=e((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`),jn=e((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),Mn=5,Nn=10;async function Pn(e,t){let{labelStyles:n,nodeStyles:r}=_(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.heighta,`:first-child`),v=s.insert(()=>i,`:first-child`),v.attr(`class`,`basic label-container`),m&&v.attr(`style`,m)}else{let e=kn(0,0,p,u,f,d);v=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,h(m)).attr(`style`,r),v.attr(`class`,`basic label-container outer-path`),m&&v.selectAll(`path`).attr(`style`,m),r&&v.selectAll(`path`).attr(`style`,r)}return v.attr(`label-offset-x`,f),v.attr(`transform`,`translate(${-p/2}, ${u/2} )`),l.attr(`transform`,`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,v),t.intersect=function(e){let n=K.rect(t,e),r=n.y-(t.y??0);if(d!=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-f)){let i=f*f*(1-r*r/(d*d));i!=0&&(i=Math.sqrt(Math.abs(i))),i=f-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},s}e(Pn,`tiltedCylinder`);async function Fn(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=g(t,{}),r=R(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(Fn,`trapezoid`);async function In(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c}=await P(e,t,L(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=T.svg(s),p=g(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=R(m),v=f.path(h,p),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),I(t,y),t.intersect=function(e){return K.polygon(t,m,e)},s}e(In,`trapezoidalPentagon`);var Ln=10,Rn=10;async function zn(e,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.width=((n?.width??0)-o)/2,n.widthC,`:first-child`).attr(`transform`,`translate(${-m/2}, ${m/2})`).attr(`class`,`outer-path`);return y&&n.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,y),i&&n.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,i),n.width=p,n.height=m,I(n,w),d.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${m/2-(c.height+(n.padding??0)/(f?2:1)-(c.y-(c.top??0)))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,v,e),K.polygon(n,v,e)},s}e(zn,`triangle`);async function Bn(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c,bbox:l,label:u}=await P(e,t,L(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+(s?p:-p),{cssStyles:h}=t,v=14-d,y=v>0?v/2:0,b=T.svg(c),x=g(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=[{x:-d/2-y,y:m/2},...z(-d/2-y,m/2,d/2+y,m/2,p,.8),{x:d/2+y,y:-m/2},{x:-d/2-y,y:-m/2}],C=R(S),w=b.path(C,x),E=c.insert(()=>w,`:first-child`);return E.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),E.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),I(t,E),t.intersect=function(e){return K.polygon(t,S,e)},c}e(Bn,`waveEdgedRectangle`);async function Vn(e,t){let{labelStyles:n,nodeStyles:r}=_(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:c}=await P(e,t,L(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=T.svg(s),h=g(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let v=[{x:-l/2,y:f/2},...z(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...z(l/2,-f/2,-l/2,-f/2,d,-1)],y=R(v),b=m.path(y,h),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),I(t,x),t.intersect=function(e){return K.polygon(t,v,e)},s}e(Vn,`waveRectangle`);var Q=10;async function Hn(e,t){let{labelStyles:n,nodeStyles:r}=_(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-Q,10),t.height=Math.max((t?.height??0)-a*2-Q,10));let{shapeSvg:o,bbox:s,label:c}=await P(e,t,L(t)),l=(t?.width?t?.width:s.width)+i*2+Q,u=(t?.height?t?.height:s.height)+a*2+Q,d=l-Q,f=u-Q,p=-d/2,m=-f/2,{cssStyles:h}=t,v=T.svg(o),y=g(t,{}),b=[{x:p-Q,y:m-Q},{x:p-Q,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-Q}],x=`M${p-Q},${m-Q} L${p+d},${m-Q} L${p+d},${m+f} L${p-Q},${m+f} L${p-Q},${m-Q} M${p-Q},${m} L${p+d},${m} - M${p},${m-Q} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let S=g.path(y,_),C=o.insert(()=>S,`:first-child`);return C.attr(`transform`,`translate(${Q/2}, ${Q/2})`),C.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+Q/2-(s.x-(s.left??0))}, ${-(s.height/2)+Q/2-(s.y-(s.top??0))})`),I(t,C),t.intersect=function(e){return K.polygon(t,v,e)},o}e(Hn,`windowPane`);var Un=new Set([`redux-color`,`redux-dark-color`]),Wn=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function Gn(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:i,themeVariables:a}=s(),{rowEven:o,rowOdd:c,nodeBorder:u,borderColorArray:d}=a;if(t.look===`handDrawn`){let{themeVariables:n}=s(),{background:r}=n;await Gn(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let f=s();t.useHtmlLabels=f.htmlLabels;let p=f.er?.diagramPadding??10,h=f.er?.entityPadding??6,{cssStyles:g}=t,{labelStyles:_,nodeStyles:v}=x(t);if(r.attributes.length===0&&t.label){let n={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5,classes:``};m(t.label,f)+n.labelPaddingX*20){let e=C.width+p*2-(O+k+A+j);O+=e/P,k+=e/P,A>0&&(A+=e/P),j>0&&(j+=e/P)}let R=O+k+A+j,z=T.svg(S),B=b(t,{});t.look!==`handDrawn`&&(B.roughness=0,B.fillStyle=`solid`);let ee=0;D.length>0&&(ee=D.reduce((e,t)=>e+(t?.rowHeight??0),0));let V=Math.max(F.width+p*2,t?.width||0,R),te=Math.max((ee??0)+C.height,t?.height||0),H=-V/2,U=-te/2;if(S.selectAll(`g:not(:first-child)`).each((e,t,r)=>{let i=n(r[t]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]),i.attr(`class`).includes(`attribute-name`)?o+=O:i.attr(`class`).includes(`attribute-keys`)?o+=O+k:i.attr(`class`).includes(`attribute-comment`)&&(o+=O+k+A))}i.attr(`transform`,`translate(${H+p/2+o}, ${s+U+C.height+h/2})`)}),S.select(`.name`).attr(`transform`,`translate(`+-C.width/2+`, `+(U+h/2)+`)`),i!=null&&Un.has(i)){let e=r.colorIndex??0;S.attr(`data-color-id`,`color-${e%d.length}`)}let ne=z.rectangle(H,U,V,te,B),re=S.insert(()=>ne,`:first-child`).attr(`class`,`outer-path`).attr(`style`,g.join(``));E.push(0);for(let[e,t]of D.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=z.rectangle(H,C.height+U+t?.yOffset,V,t?.rowHeight,{...B,fill:n?o:c,stroke:u});S.insert(()=>r,`g.label`).attr(`style`,g.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let ie=1e-4,W=qn(H,C.height+U,V+H,C.height+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B);if(S.insert(()=>G).attr(`class`,`divider`),W=qn(O+H,C.height+U,O+H,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`),M){let e=O+k+H;W=qn(e,C.height+U,e,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}if(N){let e=O+k+A+H;W=qn(e,C.height+U,e,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}for(let e of E){let t=C.height+U+e;W=qn(H,t,V+H,t,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}if(I(t,re),v&&t.look!==`handDrawn`)if(i!=null&&Wn.has(i))S.selectAll(`path`).attr(`style`,v);else{let e=v.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);S.selectAll(`path`).attr(`style`,e??``),S.selectAll(`.row-rect-even path`).attr(`style`,v)}return t.intersect=function(e){return K.rect(t,e)},S}e(Gn,`erBox`);async function Kn(e,t,r,i=0,o=0,s=[],c=``){let u=e.insert(`g`).attr(`class`,`label ${s.join(` `)}`).attr(`transform`,`translate(${i}, ${o})`).attr(`style`,c);t!==a(t)&&(t=a(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let d=u.node().appendChild(await v(u,t,{width:m(t,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(t.includes(`<`)||t.includes(`>`)){let e=d.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let f=d.getBBox();if(l(r.htmlLabels)){let e=d.children[0];e.style.textAlign=`start`;let t=n(d);f=e.getBoundingClientRect(),t.attr(`width`,f.width),t.attr(`height`,f.height)}return f}e(Kn,`addText`);function qn(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}]}e(qn,`lineToPolygon`);async function Jn(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,L(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Yn(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Yn(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await Yn(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await Yn(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}e(Jn,`textHelper`);async function Yn(e,t,a,o=[]){let c=e.insert(`g`).attr(`class`,`label`).attr(`style`,o.join(`; `)),u=s(),d=`useHtmlLabels`in t?t.useHtmlLabels:l(u.htmlLabels)??!0,p=``;p=`text`in t?t.text:t.label,!d&&p.startsWith(`\\`)&&(p=p.substring(1)),r(p)&&(d=!0);let h=await v(c,i(f(p)),{width:m(p,u)+50,classes:`markdown-node-label`,useHtmlLabels:d},u),g,_=1;if(d){let e=h.children[0],t=n(h);_=e.innerHTML.split(`
`).length,e.innerHTML.includes(``)&&(_+=e.innerHTML.split(``).length-1),await O(e),g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}else{o.includes(`font-weight: bolder`)&&n(h).selectAll(`tspan`).attr(`font-weight`,``),_=h.children.length;let e=h.children[0];(h.textContent===``||h.textContent.includes(`>`))&&(e.textContent=p[0]+p.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),p[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),g=h.getBBox()}return c.attr(`transform`,`translate(0,`+(-g.height/(2*_)+a)+`)`),g.height}e(Yn,`addText`);async function Xn(e,t){let r=u(),{theme:i,themeVariables:a}=r,{useGradient:o,borderColorArray:s}=a,c=r.class.padding??12,d=c,f=t.useHtmlLabels??l(r.htmlLabels)??!0,p=t;p.annotations=p.annotations??[],p.members=p.members??[],p.methods=p.methods??[];let{shapeSvg:m,bbox:h}=await Jn(e,t,r,f,d);w(m,t.colorIndex,i,s);let{labelStyles:g,nodeStyles:_}=x(t);t.labelStyle=g,t.cssStyles=p.styles||``;let v=p.styles?.join(`;`)||_||``;t.cssStyles||=v.replaceAll(`!important`,``).split(`;`);let y=p.members.length===0&&p.methods.length===0&&!r.class?.hideEmptyMembersBox,S=T.svg(m),C=b(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let E=Math.max(t.width??0,h.width),D=Math.max(t.height??0,h.height),O=(t.height??0)>h.height;p.members.length===0&&p.methods.length===0?D+=d:p.members.length>0&&p.methods.length===0&&(D+=d*2);let k=-E/2,A=-D/2,j=y?c*2:p.members.length===0&&p.methods.length===0?-c:0;O&&(j=c*2);let M=S.rectangle(k-c,A-c-(y?c:p.members.length===0&&p.methods.length===0?-c/2:0),E+2*c,D+2*c+j,C),N=m.insert(()=>M,`:first-child`);N.attr(`class`,`basic label-container outer-path`);let P=N.node().getBBox(),F=m.select(`.annotation-group`).node().getBBox().height-(y?c/2:0)||0,L=m.select(`.label-group`).node().getBBox().height-(y?c/2:0)||0,R=m.select(`.members-group`).node().getBBox().height-(y?c/2:0)||0,z=(F+L+A+c-(A-c-(y?c:p.members.length===0&&p.methods.length===0?-c/2:0)))/2;if(m.selectAll(`.text`).each((e,t,i)=>{let a=n(i[t]),o=a.attr(`transform`),s=0;if(o){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);e&&(s=parseFloat(e[2]))}let l=s+A+c-(y?c:p.members.length===0&&p.methods.length===0?-c/2:0);if(a.attr(`class`).includes(`methods-group`)){let e=Math.max(R,d/2);l=O?Math.max(z,F+L+e+A+d*2+c)+d*2:F+L+e+A+d*4+c}p.members.length===0&&p.methods.length===0&&r.class?.hideEmptyMembersBox&&(l=p.annotations.length>0?s-d:s),f||(l-=4);let u=k;(a.attr(`class`).includes(`label-group`)||a.attr(`class`).includes(`annotation-group`))&&(u=-a.node()?.getBBox().width/2||0,m.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(u=0)})),a.attr(`transform`,`translate(${u}, ${l})`)}),p.members.length>0||p.methods.length>0||y){let e=F+L+A+c,n=S.line(P.x,e,P.x+P.width,e+.001,C);m.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,v)}if(y||p.members.length>0||p.methods.length>0){let e=F+L+R+A+d*2+c,n=S.line(P.x,O?Math.max(z,e):e,P.x+P.width,(O?Math.max(z,e):e)+.001,C);m.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,v)}if(p.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,v),N.select(`:nth-child(2)`).attr(`style`,v),m.selectAll(`.divider`).select(`path`).attr(`style`,v),t.labelStyle?m.selectAll(`span`).attr(`style`,t.labelStyle):m.selectAll(`span`).attr(`style`,v),!f){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(v);if(t){let e=t[0].replace(`color`,`fill`);m.selectAll(`tspan`).attr(`style`,e)}else if(g){let t=e.exec(g);if(t){let e=t[0].replace(`color`,`fill`);m.selectAll(`tspan`).attr(`style`,e)}}}return I(t,N),t.intersect=function(e){return K.rect(t,e)},m}e(Xn,`classBox`);async function Zn(e,t){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let a=t,o=t,s=`verifyMethod`in t,c=L(t),l=u(),{themeVariables:d}=l,{borderColorArray:f,requirementEdgeLabelBackground:p}=d,m=l.layout===`elk`?`start`:`center`,h=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId??t.id),g;g=s?await $(h,`<<${a.type}>>`,0,t.labelStyle):await $(h,`<<Element>>`,0,t.labelStyle);let _=g,v=await $(h,a.name,_,t.labelStyle+`; font-weight: bold;`);if(_+=v+20,s){let e=await $(h,`${a.requirementId?`ID: ${a.requirementId}`:``}`,_,t.labelStyle,m);_+=e;let n=await $(h,`${a.text?`Text: ${a.text}`:``}`,_,t.labelStyle,m);_+=n;let r=await $(h,`${a.risk?`Risk: ${a.risk}`:``}`,_,t.labelStyle,m);_+=r,await $(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:``}`,_,t.labelStyle,m)}else{let e=await $(h,`${o.type?`Type: ${o.type}`:``}`,_,t.labelStyle,m);_+=e,await $(h,`${o.docRef?`Doc Ref: ${o.docRef}`:``}`,_,t.labelStyle,m)}let y=(h.node()?.getBBox().width??200)+20,S=(h.node()?.getBBox().height??200)+20,C=-y/2,w=-S/2,E=T.svg(h),D=b(t,{});t.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(C,w,y,S,D),k=h.insert(()=>O,`:first-child`);if(k.attr(`class`,`basic label-container outer-path`).attr(`style`,i),f?.length){let e=t.colorIndex??0;h.attr(`data-color-id`,`color-${e%f.length}`)}if(h.selectAll(`.label`).each((e,t,r)=>{let i=n(r[t]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]))}let c=s-S/2,l=C+20/2;(t===0||t===1)&&(l=o),i.attr(`transform`,`translate(${l}, ${c+20})`)}),_>g+v+20){let e=w+g+v+20,n;if(t.look===`neo`){let t=.001,r=[[C,e],[C+y,e],[C+y,e+t],[C,e+t]];n=E.polygon(r,D)}else n=E.line(C,e,C+y,e,D);h.insert(()=>n).attr(`class`,`divider`)}return I(t,k),t.intersect=function(e){return K.rect(t,e)},i&&t.look!==`handDrawn`&&(p||f?.length)&&h.selectAll(`path`).attr(`style`,i),h}e(Zn,`requirementBox`);async function $(e,t,r,a=``,o=`center`){if(t===``)return 0;let s=e.insert(`g`).attr(`class`,`label`).attr(`style`,a),c=u(),l=c.htmlLabels??!0,d=await v(s,i(f(t)),{width:m(t,c)+50,classes:`markdown-node-label`,useHtmlLabels:l,style:a},c),p;if(l){let e=d.children[0],t=n(d);o===`start`&&n(e).style(`text-align`,`left`),p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=d.children[0];for(let t of e.children)a&&t.setAttribute(`style`,a);if(o===`start`){e.setAttribute(`text-anchor`,`start`);for(let t of e.children)t.setAttribute(`text-anchor`,`start`)}p=d.getBBox(),p.height+=6}return s.attr(`transform`,`translate(${-p.width/2},${-p.height/2+r})`),p.height}e($,`addText`);var Qn=e(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`);async function $n(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await P(e,t,L(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await F(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await F(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await F(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,v=Math.max(m.height,g.height)/2,y=Math.max(s.height+20,t?.height||0)+v,S=-_/2,C=-y/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-v+s.height/2)+`)`);let w,{rx:E,ry:D}=t,{cssStyles:O}=t;if(t.look===`handDrawn`){let e=T.svg(o),n=b(t,{}),r=E||D?e.path(q(S,C,_,y,E||0),n):e.rectangle(S,C,_,y,n);w=o.insert(()=>r,`:first-child`),w.attr(`class`,`basic label-container`).attr(`style`,O||null)}else{w=o.insert(`rect`,`:first-child`),w.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,E??5).attr(`ry`,D??5).attr(`x`,S).attr(`y`,C).attr(`width`,_).attr(`height`,y);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=S+2,r=C+Math.floor((E??0)/2),i=C+y-Math.floor((E??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,Qn(e))}}return I(t,w),t.height=y,t.intersect=function(e){return K.rect(t,e)},o}e($n,`kanbanItem`);async function er(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n,L(n)),l=o.width+10*s,u=o.height+8*s,d=.15*l,{cssStyles:f}=n,p=o.width+20,m=o.height+20,g=Math.max(l,p),_=Math.max(u,m);c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`);let v,y=`M0 0 - a${d},${d} 1 0,0 ${g*.25},${-1*_*.1} - a${d},${d} 1 0,0 ${g*.25},0 - a${d},${d} 1 0,0 ${g*.25},0 - a${d},${d} 1 0,0 ${g*.25},${_*.1} + M${p},${m-Q} L${p},${m+f}`;t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=v.path(x,y),C=o.insert(()=>S,`:first-child`);return C.attr(`transform`,`translate(${Q/2}, ${Q/2})`),C.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+Q/2-(s.x-(s.left??0))}, ${-(s.height/2)+Q/2-(s.y-(s.top??0))})`),I(t,C),t.intersect=function(e){return K.polygon(t,b,e)},o}e(Hn,`windowPane`);var Un=new Set([`redux-color`,`redux-dark-color`]),Wn=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function Gn(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:i,themeVariables:a}=s(),{rowEven:o,rowOdd:c,nodeBorder:u,borderColorArray:d}=a;if(t.look===`handDrawn`){let{themeVariables:n}=s(),{background:r}=n;await Gn(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let f=s();t.useHtmlLabels=f.htmlLabels;let p=f.er?.diagramPadding??10,h=f.er?.entityPadding??6,{cssStyles:v}=t,{labelStyles:y,nodeStyles:b}=_(t);if(r.attributes.length===0&&t.label){let n={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5,classes:``};m(t.label,f)+n.labelPaddingX*20){let e=C.width+p*2-(O+k+A+j);O+=e/P,k+=e/P,A>0&&(A+=e/P),j>0&&(j+=e/P)}let R=O+k+A+j,z=T.svg(S),B=g(t,{});t.look!==`handDrawn`&&(B.roughness=0,B.fillStyle=`solid`);let ee=0;D.length>0&&(ee=D.reduce((e,t)=>e+(t?.rowHeight??0),0));let V=Math.max(F.width+p*2,t?.width||0,R),te=Math.max((ee??0)+C.height,t?.height||0),H=-V/2,U=-te/2;if(S.selectAll(`g:not(:first-child)`).each((e,t,r)=>{let i=n(r[t]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]),i.attr(`class`).includes(`attribute-name`)?o+=O:i.attr(`class`).includes(`attribute-keys`)?o+=O+k:i.attr(`class`).includes(`attribute-comment`)&&(o+=O+k+A))}i.attr(`transform`,`translate(${H+p/2+o}, ${s+U+C.height+h/2})`)}),S.select(`.name`).attr(`transform`,`translate(`+-C.width/2+`, `+(U+h/2)+`)`),i!=null&&Un.has(i)){let e=r.colorIndex??0;S.attr(`data-color-id`,`color-${e%d.length}`)}let ne=z.rectangle(H,U,V,te,B),re=S.insert(()=>ne,`:first-child`).attr(`class`,`outer-path`).attr(`style`,v.join(``));E.push(0);for(let[e,t]of D.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=z.rectangle(H,C.height+U+t?.yOffset,V,t?.rowHeight,{...B,fill:n?o:c,stroke:u});S.insert(()=>r,`g.label`).attr(`style`,v.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let ie=1e-4,W=qn(H,C.height+U,V+H,C.height+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B);if(S.insert(()=>G).attr(`class`,`divider`),W=qn(O+H,C.height+U,O+H,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`),M){let e=O+k+H;W=qn(e,C.height+U,e,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}if(N){let e=O+k+A+H;W=qn(e,C.height+U,e,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}for(let e of E){let t=C.height+U+e;W=qn(H,t,V+H,t,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}if(I(t,re),b&&t.look!==`handDrawn`)if(i!=null&&Wn.has(i))S.selectAll(`path`).attr(`style`,b);else{let e=b.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);S.selectAll(`path`).attr(`style`,e??``),S.selectAll(`.row-rect-even path`).attr(`style`,b)}return t.intersect=function(e){return K.rect(t,e)},S}e(Gn,`erBox`);async function Kn(e,t,r,i=0,o=0,s=[],c=``){let u=e.insert(`g`).attr(`class`,`label ${s.join(` `)}`).attr(`transform`,`translate(${i}, ${o})`).attr(`style`,c);t!==a(t)&&(t=a(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let d=u.node().appendChild(await S(u,t,{width:m(t,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(t.includes(`<`)||t.includes(`>`)){let e=d.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let f=d.getBBox();if(l(r.htmlLabels)){let e=d.children[0];e.style.textAlign=`start`;let t=n(d);f=e.getBoundingClientRect(),t.attr(`width`,f.width),t.attr(`height`,f.height)}return f}e(Kn,`addText`);function qn(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}]}e(qn,`lineToPolygon`);async function Jn(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,L(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Yn(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Yn(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await Yn(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await Yn(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}e(Jn,`textHelper`);async function Yn(e,t,a,o=[]){let c=e.insert(`g`).attr(`class`,`label`).attr(`style`,o.join(`; `)),u=s(),d=`useHtmlLabels`in t?t.useHtmlLabels:l(u.htmlLabels)??!0,p=``;p=`text`in t?t.text:t.label,!d&&p.startsWith(`\\`)&&(p=p.substring(1)),r(p)&&(d=!0);let h=await S(c,i(f(p)),{width:m(p,u)+50,classes:`markdown-node-label`,useHtmlLabels:d},u),g,_=1;if(d){let e=h.children[0],t=n(h);_=e.innerHTML.split(`
`).length,e.innerHTML.includes(``)&&(_+=e.innerHTML.split(``).length-1),await O(e),g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}else{o.includes(`font-weight: bolder`)&&n(h).selectAll(`tspan`).attr(`font-weight`,``),_=h.children.length;let e=h.children[0];(h.textContent===``||h.textContent.includes(`>`))&&(e.textContent=p[0]+p.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),p[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),g=h.getBBox()}return c.attr(`transform`,`translate(0,`+(-g.height/(2*_)+a)+`)`),g.height}e(Yn,`addText`);async function Xn(e,t){let r=u(),{theme:i,themeVariables:a}=r,{useGradient:o,borderColorArray:s}=a,c=r.class.padding??12,d=c,f=t.useHtmlLabels??l(r.htmlLabels)??!0,p=t;p.annotations=p.annotations??[],p.members=p.members??[],p.methods=p.methods??[];let{shapeSvg:m,bbox:h}=await Jn(e,t,r,f,d);w(m,t.colorIndex,i,s);let{labelStyles:v,nodeStyles:y}=_(t);t.labelStyle=v,t.cssStyles=p.styles||``;let b=p.styles?.join(`;`)||y||``;t.cssStyles||=b.replaceAll(`!important`,``).split(`;`);let x=p.members.length===0&&p.methods.length===0&&!r.class?.hideEmptyMembersBox,S=T.svg(m),C=g(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let E=Math.max(t.width??0,h.width),D=Math.max(t.height??0,h.height),O=(t.height??0)>h.height;p.members.length===0&&p.methods.length===0?D+=d:p.members.length>0&&p.methods.length===0&&(D+=d*2);let k=-E/2,A=-D/2,j=x?c*2:p.members.length===0&&p.methods.length===0?-c:0;O&&(j=c*2);let M=S.rectangle(k-c,A-c-(x?c:p.members.length===0&&p.methods.length===0?-c/2:0),E+2*c,D+2*c+j,C),N=m.insert(()=>M,`:first-child`);N.attr(`class`,`basic label-container outer-path`);let P=N.node().getBBox(),F=m.select(`.annotation-group`).node().getBBox().height-(x?c/2:0)||0,L=m.select(`.label-group`).node().getBBox().height-(x?c/2:0)||0,R=m.select(`.members-group`).node().getBBox().height-(x?c/2:0)||0,z=(F+L+A+c-(A-c-(x?c:p.members.length===0&&p.methods.length===0?-c/2:0)))/2;if(m.selectAll(`.text`).each((e,t,i)=>{let a=n(i[t]),o=a.attr(`transform`),s=0;if(o){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);e&&(s=parseFloat(e[2]))}let l=s+A+c-(x?c:p.members.length===0&&p.methods.length===0?-c/2:0);if(a.attr(`class`).includes(`methods-group`)){let e=Math.max(R,d/2);l=O?Math.max(z,F+L+e+A+d*2+c)+d*2:F+L+e+A+d*4+c}p.members.length===0&&p.methods.length===0&&r.class?.hideEmptyMembersBox&&(l=p.annotations.length>0?s-d:s),f||(l-=4);let u=k;(a.attr(`class`).includes(`label-group`)||a.attr(`class`).includes(`annotation-group`))&&(u=-a.node()?.getBBox().width/2||0,m.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(u=0)})),a.attr(`transform`,`translate(${u}, ${l})`)}),p.members.length>0||p.methods.length>0||x){let e=F+L+A+c,n=S.line(P.x,e,P.x+P.width,e+.001,C);m.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,b)}if(x||p.members.length>0||p.methods.length>0){let e=F+L+R+A+d*2+c,n=S.line(P.x,O?Math.max(z,e):e,P.x+P.width,(O?Math.max(z,e):e)+.001,C);m.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,b)}if(p.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,b),N.select(`:nth-child(2)`).attr(`style`,b),m.selectAll(`.divider`).select(`path`).attr(`style`,b),t.labelStyle?m.selectAll(`span`).attr(`style`,t.labelStyle):m.selectAll(`span`).attr(`style`,b),!f){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(b);if(t){let e=t[0].replace(`color`,`fill`);m.selectAll(`tspan`).attr(`style`,e)}else if(v){let t=e.exec(v);if(t){let e=t[0].replace(`color`,`fill`);m.selectAll(`tspan`).attr(`style`,e)}}}return I(t,N),t.intersect=function(e){return K.rect(t,e)},m}e(Xn,`classBox`);async function Zn(e,t){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let a=t,o=t,s=`verifyMethod`in t,c=L(t),l=u(),{themeVariables:d}=l,{borderColorArray:f,requirementEdgeLabelBackground:p}=d,m=l.layout===`elk`?`start`:`center`,h=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId??t.id),v;v=s?await $(h,`<<${a.type}>>`,0,t.labelStyle):await $(h,`<<Element>>`,0,t.labelStyle);let y=v,b=await $(h,a.name,y,t.labelStyle+`; font-weight: bold;`);if(y+=b+20,s){let e=await $(h,`${a.requirementId?`ID: ${a.requirementId}`:``}`,y,t.labelStyle,m);y+=e;let n=await $(h,`${a.text?`Text: ${a.text}`:``}`,y,t.labelStyle,m);y+=n;let r=await $(h,`${a.risk?`Risk: ${a.risk}`:``}`,y,t.labelStyle,m);y+=r,await $(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:``}`,y,t.labelStyle,m)}else{let e=await $(h,`${o.type?`Type: ${o.type}`:``}`,y,t.labelStyle,m);y+=e,await $(h,`${o.docRef?`Doc Ref: ${o.docRef}`:``}`,y,t.labelStyle,m)}let x=(h.node()?.getBBox().width??200)+20,S=(h.node()?.getBBox().height??200)+20,C=-x/2,w=-S/2,E=T.svg(h),D=g(t,{});t.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(C,w,x,S,D),k=h.insert(()=>O,`:first-child`);if(k.attr(`class`,`basic label-container outer-path`).attr(`style`,i),f?.length){let e=t.colorIndex??0;h.attr(`data-color-id`,`color-${e%f.length}`)}if(h.selectAll(`.label`).each((e,t,r)=>{let i=n(r[t]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]))}let c=s-S/2,l=C+20/2;(t===0||t===1)&&(l=o),i.attr(`transform`,`translate(${l}, ${c+20})`)}),y>v+b+20){let e=w+v+b+20,n;if(t.look===`neo`){let t=.001,r=[[C,e],[C+x,e],[C+x,e+t],[C,e+t]];n=E.polygon(r,D)}else n=E.line(C,e,C+x,e,D);h.insert(()=>n).attr(`class`,`divider`)}return I(t,k),t.intersect=function(e){return K.rect(t,e)},i&&t.look!==`handDrawn`&&(p||f?.length)&&h.selectAll(`path`).attr(`style`,i),h}e(Zn,`requirementBox`);async function $(e,t,r,a=``,o=`center`){if(t===``)return 0;let s=e.insert(`g`).attr(`class`,`label`).attr(`style`,a),c=u(),l=c.htmlLabels??!0,d=await S(s,i(f(t)),{width:m(t,c)+50,classes:`markdown-node-label`,useHtmlLabels:l,style:a},c),p;if(l){let e=d.children[0],t=n(d);o===`start`&&n(e).style(`text-align`,`left`),p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=d.children[0];for(let t of e.children)a&&t.setAttribute(`style`,a);if(o===`start`){e.setAttribute(`text-anchor`,`start`);for(let t of e.children)t.setAttribute(`text-anchor`,`start`)}p=d.getBBox(),p.height+=6}return s.attr(`transform`,`translate(${-p.width/2},${-p.height/2+r})`),p.height}e($,`addText`);var Qn=e(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`);async function $n(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await P(e,t,L(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await F(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await F(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:v}=await F(o,`assigned`in t&&t.assigned||``,f);t.width=a;let y=t?.width||0,b=Math.max(m.height,v.height)/2,x=Math.max(s.height+20,t?.height||0)+b,S=-y/2,C=-x/2;c.attr(`transform`,`translate(`+(l-y/2)+`, `+(-b-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-y/2)+`, `+(-b+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+y/2-v.width-20)+`, `+(-b+s.height/2)+`)`);let w,{rx:E,ry:D}=t,{cssStyles:O}=t;if(t.look===`handDrawn`){let e=T.svg(o),n=g(t,{}),r=E||D?e.path(q(S,C,y,x,E||0),n):e.rectangle(S,C,y,x,n);w=o.insert(()=>r,`:first-child`),w.attr(`class`,`basic label-container`).attr(`style`,O||null)}else{w=o.insert(`rect`,`:first-child`),w.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,E??5).attr(`ry`,D??5).attr(`x`,S).attr(`y`,C).attr(`width`,y).attr(`height`,x);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=S+2,r=C+Math.floor((E??0)/2),i=C+x-Math.floor((E??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,Qn(e))}}return I(t,w),t.height=x,t.intersect=function(e){return K.rect(t,e)},o}e($n,`kanbanItem`);async function er(e,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n,L(n)),l=o.width+10*s,u=o.height+8*s,d=.15*l,{cssStyles:f}=n,p=o.width+20,m=o.height+20,v=Math.max(l,p),y=Math.max(u,m);c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`);let b,x=`M0 0 + a${d},${d} 1 0,0 ${v*.25},${-1*y*.1} + a${d},${d} 1 0,0 ${v*.25},0 + a${d},${d} 1 0,0 ${v*.25},0 + a${d},${d} 1 0,0 ${v*.25},${y*.1} - a${d},${d} 1 0,0 ${g*.15},${_*.33} - a${d*.8},${d*.8} 1 0,0 0,${_*.34} - a${d},${d} 1 0,0 ${-1*g*.15},${_*.33} + a${d},${d} 1 0,0 ${v*.15},${y*.33} + a${d*.8},${d*.8} 1 0,0 0,${y*.34} + a${d},${d} 1 0,0 ${-1*v*.15},${y*.33} - a${d},${d} 1 0,0 ${-1*g*.25},${_*.15} - a${d},${d} 1 0,0 ${-1*g*.25},0 - a${d},${d} 1 0,0 ${-1*g*.25},0 - a${d},${d} 1 0,0 ${-1*g*.25},${-1*_*.15} + a${d},${d} 1 0,0 ${-1*v*.25},${y*.15} + a${d},${d} 1 0,0 ${-1*v*.25},0 + a${d},${d} 1 0,0 ${-1*v*.25},0 + a${d},${d} 1 0,0 ${-1*v*.25},${-1*y*.15} - a${d},${d} 1 0,0 ${-1*g*.1},${-1*_*.33} - a${d*.8},${d*.8} 1 0,0 0,${-1*_*.34} - a${d},${d} 1 0,0 ${g*.1},${-1*_*.33} - H0 V0 Z`;if(n.look===`handDrawn`){let e=T.svg(a),t=b(n,{}),r=e.path(y,t);v=a.insert(()=>r,`:first-child`),v.attr(`class`,`basic label-container`).attr(`style`,h(f))}else v=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,y);return v.attr(`transform`,`translate(${-g/2}, ${-_/2})`),I(n,v),n.calcIntersect=function(e,t){return K.rect(e,t)},n.intersect=function(e){return t.info(`Bang intersect`,n,e),K.rect(n,e)},a}e(er,`bang`);async function tr(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n,L(n)),l=o.width+2*s,u=o.height+2*s,d=.15*l,f=.25*l,p=.35*l,m=.2*l,{cssStyles:g}=n,_,v=`M0 0 + a${d},${d} 1 0,0 ${-1*v*.1},${-1*y*.33} + a${d*.8},${d*.8} 1 0,0 0,${-1*y*.34} + a${d},${d} 1 0,0 ${v*.1},${-1*y*.33} + H0 V0 Z`;if(n.look===`handDrawn`){let e=T.svg(a),t=g(n,{}),r=e.path(x,t);b=a.insert(()=>r,`:first-child`),b.attr(`class`,`basic label-container`).attr(`style`,h(f))}else b=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,x);return b.attr(`transform`,`translate(${-v/2}, ${-y/2})`),I(n,b),n.calcIntersect=function(e,t){return K.rect(e,t)},n.intersect=function(e){return t.info(`Bang intersect`,n,e),K.rect(n,e)},a}e(er,`bang`);async function tr(e,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n,L(n)),l=o.width+2*s,u=o.height+2*s,d=.15*l,f=.25*l,p=.35*l,m=.2*l,{cssStyles:v}=n,y,b=`M0 0 a${d},${d} 0 0,1 ${l*.25},${-1*l*.1} a${p},${p} 1 0,1 ${l*.4},${-1*l*.1} a${f},${f} 1 0,1 ${l*.35},${l*.2} @@ -39,7 +39,7 @@ import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src. a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35} a${m},${m} 1 0,1 ${l*.1},${-1*u*.65} - H0 V0 Z`;if(n.look===`handDrawn`){let e=T.svg(a),t=b(n,{}),r=e.path(v,t);_=a.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,h(g))}else _=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,v);return c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`),_.attr(`transform`,`translate(${-l/2}, ${-u/2})`),I(n,_),n.calcIntersect=function(e,t){return K.rect(e,t)},n.intersect=function(e){return t.info(`Cloud intersect`,n,e),K.rect(n,e)},a}e(tr,`cloud`);async function nr(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await P(e,t,L(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?` + H0 V0 Z`;if(n.look===`handDrawn`){let e=T.svg(a),t=g(n,{}),r=e.path(b,t);y=a.insert(()=>r,`:first-child`),y.attr(`class`,`basic label-container`).attr(`style`,h(v))}else y=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,b);return c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`),y.attr(`transform`,`translate(${-l/2}, ${-u/2})`),I(n,y),n.calcIntersect=function(e,t){return K.rect(e,t)},n.intersect=function(e){return t.info(`Cloud intersect`,n,e),K.rect(n,e)},a}e(tr,`cloud`);async function nr(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await P(e,t,L(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?` M${-c/2} ${l/2-5} v${-l+10} q0,-5 5,-5 diff --git a/web/dist/app-chunk-7M6MHVWA.js b/web/dist/app-chunk-7M6MHVWA.js index dcaa7fc5f..bbee9fe8f 100644 --- a/web/dist/app-chunk-7M6MHVWA.js +++ b/web/dist/app-chunk-7M6MHVWA.js @@ -1,18 +1,18 @@ -import{t as e}from"./app-purify.es.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{G as i,H as a,U as o,a as s,d as c,it as l,q as u,s as d,v as f,w as p,x as m,y as h}from"./app-chunk-O7XYJQB3.js";import{t as g}from"./app-channel.js";import{c as _,g as v}from"./app-chunk-ZIGJFQKS.js";import{t as ee}from"./app-chunk-5VM5RSS4.js";import{i as te,n as ne,o as y,r as b}from"./app-chunk-J5ZVWO5B.js";import{a as x}from"./app-chunk-7INBJB4K.js";import{t as S}from"./app-chunk-GWA4HPMP.js";import{t as C}from"./app-chunk-XXDRQBXY.js";import{t as w}from"./app-chunk-WEXAMYUT.js";import{r as T,t as E}from"./app-chunk-GNY47TPC.js";import{n as D,t as O}from"./app-chunk-LNGE3PJU.js";var re=`flowchart-`,ie=class{constructor(){this.vertexCounter=0,this.config=m(),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=o,this.setAccDescription=a,this.setDiagramTitle=u,this.getAccTitle=h,this.getAccDescription=f,this.getDiagramTitle=p,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{t(this,`FlowDB`)}sanitizeText(e){return d.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(` +import{t as e}from"./app-purify.es.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{G as i,H as a,U as o,a as s,d as c,it as l,q as u,s as d,v as f,w as p,x as m,y as h}from"./app-chunk-O7XYJQB3.js";import{t as g}from"./app-channel.js";import{c as _,g as v}from"./app-chunk-ZIGJFQKS.js";import{n as ee,t as te}from"./app-chunk-LNGE3PJU.js";import{i as ne,n as y,o as b,r as x}from"./app-chunk-J5ZVWO5B.js";import{a as S}from"./app-chunk-7INBJB4K.js";import{r as C,t as w}from"./app-chunk-GNY47TPC.js";import{t as T}from"./app-chunk-5VM5RSS4.js";import{t as E}from"./app-chunk-GWA4HPMP.js";import{t as D}from"./app-chunk-XXDRQBXY.js";import{t as O}from"./app-chunk-WEXAMYUT.js";var re=`flowchart-`,ie=class{constructor(){this.vertexCounter=0,this.config=m(),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=o,this.setAccDescription=a,this.setDiagramTitle=u,this.getAccTitle=h,this.getAccDescription=f,this.getDiagramTitle=p,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{t(this,`FlowDB`)}sanitizeText(e){return d.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(` `)?c+` `:`{ `+c+` -}`,l=D(e,{schema:O})}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&&r===void 0&&i!=null&&n.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),p={id:e,labelType:`text`,domId:re+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,t===void 0?p.text===void 0&&(p.text=e):(this.config=m(),f=this.sanitizeText(t.text.trim()),p.labelType=t.type,f.startsWith(`"`)&&f.endsWith(`"`)&&(f=f.substring(1,f.length-1)),p.text=f),r!==void 0&&(p.type=r),i?.forEach(e=>{p.styles.push(e)}),a?.forEach(e=>{p.classes.push(e)}),o!==void 0&&(p.dir=o),p.props===void 0?p.props=s:s!==void 0&&Object.assign(p.props,s),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(!x(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,r,i){let a={start:e,end:t,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};n.info(`abc78 Got edge...`,a);let o=r.text;if(o!==void 0&&(a.text=this.sanitizeText(o.text.trim()),a.text.startsWith(`"`)&&a.text.endsWith(`"`)&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=this.sanitizeNodeLabelType(o.type)),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),i&&!this.edges.some(e=>e.id===i))a.id=i,a.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===a.start&&e.end===a.end);a.id=e.length===0?_(a.start,a.end,{counter:0,prefix:`L`}):_(a.start,a.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))n.info(`Pushing edge...`),this.edges.push(a);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. +}`,l=ee(e,{schema:te})}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&&r===void 0&&i!=null&&n.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),p={id:e,labelType:`text`,domId:re+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,t===void 0?p.text===void 0&&(p.text=e):(this.config=m(),f=this.sanitizeText(t.text.trim()),p.labelType=t.type,f.startsWith(`"`)&&f.endsWith(`"`)&&(f=f.substring(1,f.length-1)),p.text=f),r!==void 0&&(p.type=r),i?.forEach(e=>{p.styles.push(e)}),a?.forEach(e=>{p.classes.push(e)}),o!==void 0&&(p.dir=o),p.props===void 0?p.props=s:s!==void 0&&Object.assign(p.props,s),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(!S(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,r,i){let a={start:e,end:t,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};n.info(`abc78 Got edge...`,a);let o=r.text;if(o!==void 0&&(a.text=this.sanitizeText(o.text.trim()),a.text.startsWith(`"`)&&a.text.endsWith(`"`)&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=this.sanitizeNodeLabelType(o.type)),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),i&&!this.edges.some(e=>e.id===i))a.id=i,a.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===a.start&&e.end===a.end);a.id=e.length===0?_(a.start,a.end,{counter:0,prefix:`L`}):_(a.start,a.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))n.info(`Pushing edge...`),this.edges.push(a);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,t,r){let i=this.isLinkData(r)?r.id.replace(`@`,``):void 0;n.info(`addLink`,e,t,i);for(let n of e)for(let a of t){let o=n===e[e.length-1],s=a===t[0];o&&s?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,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=`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(m().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{v.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=v.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(t){let n=S();r(t).select(`svg`).selectAll(`g.node`).on(`mouseover`,t=>{let i=r(t.currentTarget),a=i.attr(`title`);if(a===null)return;let o=t.currentTarget?.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.text(i.attr(`title`)).style(`left`,window.scrollX+o.left+(o.right-o.left)/2+`px`).style(`top`,window.scrollY+o.bottom+`px`),n.html(e.sanitize(a)),i.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),r(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=m(),s()}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,r,i){let a=e.text.trim(),o=i.text;e===i&&/\s/.exec(i.text)&&(a=void 0);let s=t(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`)(r.flat()),c=s.nodeList,l=s.dir,u=m().flowchart??{};if(l??=u.inheritDir?this.getDirection()??m().direction??void 0:void 0,this.version===`gen-1`)for(let e=0;e2e3)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=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`: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,c=this.findNode(t,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.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),minWidth:i.flowchart?.minNodeWidth})}}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=m(),n=[],r=[],i=this.getSubGraphs(),a=new Map,o=new Map,s=new Map;for(let e of i)for(let t of e.nodes)this.subGraphLookup.has(t)&&s.set(t,e.id);let c=new Map,l=new Map;for(let e of i){let t=s.get(e.id);t!==void 0&&l.set(t,[...l.get(t)??[],e.id])}let u=0,d=t(e=>{c.set(e,u++);for(let t of l.get(e)??[])d(t)},`walk`);for(let e of i)s.has(e.id)||d(e.id);let f=t(e=>this.subGraphLookup.get(e)?.metadata?.view===`collapsed`,`isCollapsed`),p=t(e=>{let t,n=new Set,r=e;for(;r!==void 0&&!n.has(r);)n.add(r),f(r)&&(t=r),r=s.get(r);return t},`outermostCollapsed`),h=new Set,g=new Map;for(let e of i){let t=p(e.id);if(t!==void 0){e.id!==t&&(h.add(e.id),g.set(e.id,t));for(let n of e.nodes)n!==t&&(h.add(n),g.set(n,t))}}for(let e=i.length-1;e>=0;e--){let t=i[e];if(!h.has(t.id)){t.nodes.length>0&&o.set(t.id,!0);for(let e of t.nodes)a.set(e,t.id)}}for(let t=i.length-1;t>=0;t--){let r=i[t];h.has(r.id)||(r.metadata?.view===`collapsed`?n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`collapsedGroup`,dir:r.dir,isGroup:!1,look:e.look,colorIndex:c.get(r.id)}):n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`rect`,dir:r.dir,isGroup:!0,look:e.look,colorIndex:c.get(r.id),metadata:r.metadata}))}this.getVertices().forEach(t=>{h.has(t.id)||this.addNodeFromVertex(t,n,a,o,e,e.look||`classic`)});let v=this.getEdges();return v.forEach((t,n)=>{let{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(t.type),o=[...v.defaultStyle??[]],s=g.get(t.start)??t.start,c=g.get(t.end)??t.end;if(s===c&&(g.has(t.start)||g.has(t.end)))return;t.style&&o.push(...t.style);let l={id:_(s,c,{counter:n,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:s,end:c,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};r.push(l)}),{nodes:n,edges:r,other:{},config:e}}defaultConfig(){return c.flowchart}},ae={getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing state diagram (v2)`,t);let{securityLevel:a,flowchart:o,layout:s}=m();i.db.setDiagramId(t),n.debug(`Before getData: `);let c=i.db.getData();n.debug(`Data: `,c);let l=C(t,a),u=i.db.getDirection();c.type=i.type,c.layoutAlgorithm=E(s),c.direction=u,c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`point`,`circle`,`cross`],c.diagramId=t,n.debug(`REF1:`,c),await T(c,l);let d=c.config.flowchart?.diagramPadding??8;v.insertTitle(l,`flowchartTitleText`,o?.titleTopMargin||0,i.db.getDiagramTitle()),w(l,d,`flowchart`,o?.useMaxWidth||!1)},`draw`)},oe=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,3],i=[1,5],a=[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],o=[2,2],s=[1,13],c=[1,14],l=[1,15],u=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],h=[1,50],g=[1,49],_=[1,29],v=[1,30],ee=[1,31],te=[1,32],ne=[1,33],y=[1,45],b=[1,47],x=[1,43],S=[1,48],C=[1,44],w=[1,51],T=[1,46],E=[1,52],D=[1,53],O=[1,34],re=[1,35],ie=[1,36],ae=[1,37],oe=[1,38],k=[1,58],A=[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],j=[1,62],M=[1,61],N=[1,63],se=[8,9,11,75,77,78],ce=[1,79],le=[1,92],ue=[1,97],de=[1,96],fe=[1,93],pe=[1,89],me=[1,95],he=[1,91],ge=[1,98],_e=[1,94],ve=[1,99],ye=[1,90],be=[8,9,10,11,40,75,77,78],P=[8,9,10,11,40,46,75,77,78],F=[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],xe=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Se=[44,60,89,102,105,106,109,111,114,115,116],Ce=[1,122],we=[1,123],Te=[1,125],Ee=[1,124],De=[44,60,62,74,89,102,105,106,109,111,114,115,116],Oe=[1,134],ke=[1,148],Ae=[1,149],je=[1,150],Me=[1,151],Ne=[1,136],Pe=[1,138],Fe=[1,142],Ie=[1,143],Le=[1,144],Re=[1,145],ze=[1,146],Be=[1,147],Ve=[1,152],He=[1,153],Ue=[1,132],We=[1,133],Ge=[1,140],Ke=[1,135],qe=[1,139],Je=[1,137],Ye=[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],Xe=[1,155],Ze=[1,157],I=[8,9,11],L=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],R=[1,177],z=[1,173],B=[1,174],V=[1,178],H=[1,175],U=[1,176],Qe=[77,116,119],W=[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],$e=[10,106],et=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],G=[1,248],K=[1,246],q=[1,250],J=[1,244],Y=[1,245],X=[1,247],Z=[1,249],Q=[1,251],tt=[1,269],nt=[8,9,11,106],$=[8,9,10,11,60,84,105,106,109,110,111,112],rt={trace:t(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:t(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 c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 78:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.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 c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 84:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.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:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:ee,87:te,88:ne,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},e(a,[2,9]),e(a,[2,10]),e(a,[2,11]),{8:[1,55],9:[1,56],10:k,15:54,18:57},e(A,[2,3]),e(A,[2,4]),e(A,[2,5]),e(A,[2,6]),e(A,[2,7]),e(A,[2,8]),{8:j,9:M,11:N,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:j,9:M,11:N,21:68},{8:j,9:M,11:N,21:69},{8:j,9:M,11:N,21:70},{8:j,9:M,11:N,21:71},{8:j,9:M,11:N,21:72},{8:j,9:M,10:[1,73],11:N,21:74},e(A,[2,36]),{35:[1,75]},{37:[1,76]},e(A,[2,39]),e(se,[2,50],{18:77,39:78,10:k,40:ce}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:le,44:ue,60:de,80:[1,87],89:fe,95:[1,84],97:[1,85],101:86,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},e(A,[2,185]),e(A,[2,186]),e(A,[2,187]),e(A,[2,188]),e(A,[2,189]),e(be,[2,51]),e(be,[2,54],{46:[1,100]}),e(P,[2,72],{113:113,29:[1,101],44:h,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:g,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),e(F,[2,181]),e(F,[2,142]),e(F,[2,143]),e(F,[2,144]),e(F,[2,145]),e(F,[2,146]),e(F,[2,147]),e(F,[2,148]),e(F,[2,149]),e(F,[2,150]),e(F,[2,151]),e(F,[2,152]),e(a,[2,12]),e(a,[2,18]),e(a,[2,19]),{9:[1,114]},e(xe,[2,26],{18:115,10:k}),e(A,[2,27]),{42:116,43:39,44:h,45:40,47:41,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},e(A,[2,40]),e(A,[2,41]),e(A,[2,42]),e(Se,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Ce,81:we,116:Te,119:Ee},{75:[1,126],77:[1,127]},e(De,[2,83]),e(A,[2,28]),e(A,[2,29]),e(A,[2,30]),e(A,[2,31]),e(A,[2,32]),{10:Oe,12:ke,14:Ae,27:je,28:128,32:Me,44:Ne,60:Pe,75:Fe,80:[1,130],81:[1,131],83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:129,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},e(Ye,o,{5:154}),e(A,[2,37]),e(A,[2,38]),e(se,[2,48],{44:Xe}),e(se,[2,49],{18:156,10:k,40:Ze}),e(be,[2,44]),{44:h,47:158,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{102:[1,159],103:160,105:[1,161]},{44:h,47:162,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{44:h,47:163,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},e(I,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(I,[2,115],{120:168,10:[1,167],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),e(I,[2,117],{10:[1,169]}),e(L,[2,183]),e(L,[2,170]),e(L,[2,171]),e(L,[2,172]),e(L,[2,173]),e(L,[2,174]),e(L,[2,175]),e(L,[2,176]),e(L,[2,177]),e(L,[2,178]),e(L,[2,179]),e(L,[2,180]),{44:h,47:170,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{30:171,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:179,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:181,50:[1,180],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:182,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:183,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:184,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{109:[1,185]},{30:186,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:187,65:[1,188],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:189,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:190,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:191,67:R,80:z,81:B,82:172,116:V,117:H,118:U},e(F,[2,182]),e(a,[2,20]),e(xe,[2,25]),e(se,[2,46],{39:192,18:193,10:k,40:ce}),e(Se,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{77:[1,197],79:198,116:Te,119:Ee},e(Qe,[2,79]),e(Qe,[2,81]),e(Qe,[2,82]),e(Qe,[2,168]),e(Qe,[2,169]),{76:199,79:121,80:Ce,81:we,116:Te,119:Ee},e(De,[2,84]),{8:j,9:M,10:Oe,11:N,12:ke,14:Ae,21:201,27:je,29:[1,200],32:Me,44:Ne,60:Pe,75:Fe,83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:202,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},e(W,[2,101]),e(W,[2,103]),e(W,[2,104]),e(W,[2,157]),e(W,[2,158]),e(W,[2,159]),e(W,[2,160]),e(W,[2,161]),e(W,[2,162]),e(W,[2,163]),e(W,[2,164]),e(W,[2,165]),e(W,[2,166]),e(W,[2,167]),e(W,[2,90]),e(W,[2,91]),e(W,[2,92]),e(W,[2,93]),e(W,[2,94]),e(W,[2,95]),e(W,[2,96]),e(W,[2,97]),e(W,[2,98]),e(W,[2,99]),e(W,[2,100]),{6:11,7:12,8:s,9:c,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:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:ee,87:te,88:ne,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},{10:k,18:204},{44:[1,205]},e(be,[2,43]),{10:[1,206],44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{10:[1,207]},{10:[1,208],106:[1,209]},e($e,[2,128]),{10:[1,210],44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{10:[1,211],44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{80:[1,212]},e(I,[2,109],{10:[1,213]}),e(I,[2,111],{10:[1,214]}),{80:[1,215]},e(L,[2,184]),{80:[1,216],98:[1,217]},e(be,[2,55],{113:113,44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),{31:[1,218],67:R,82:219,116:V,117:H,118:U},e(et,[2,86]),e(et,[2,88]),e(et,[2,89]),e(et,[2,153]),e(et,[2,154]),e(et,[2,155]),e(et,[2,156]),{49:[1,220],67:R,82:219,116:V,117:H,118:U},{30:221,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{51:[1,222],67:R,82:219,116:V,117:H,118:U},{53:[1,223],67:R,82:219,116:V,117:H,118:U},{55:[1,224],67:R,82:219,116:V,117:H,118:U},{57:[1,225],67:R,82:219,116:V,117:H,118:U},{60:[1,226]},{64:[1,227],67:R,82:219,116:V,117:H,118:U},{66:[1,228],67:R,82:219,116:V,117:H,118:U},{30:229,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{31:[1,230],67:R,82:219,116:V,117:H,118:U},{67:R,69:[1,231],71:[1,232],82:219,116:V,117:H,118:U},{67:R,69:[1,234],71:[1,233],82:219,116:V,117:H,118:U},e(se,[2,45],{18:156,10:k,40:Ze}),e(se,[2,47],{44:Xe}),e(Se,[2,75]),e(Se,[2,74]),{62:[1,235],67:R,82:219,116:V,117:H,118:U},e(Se,[2,77]),e(Qe,[2,80]),{77:[1,236],79:198,116:Te,119:Ee},{30:237,67:R,80:z,81:B,82:172,116:V,117:H,118:U},e(Ye,o,{5:238}),e(W,[2,102]),e(A,[2,35]),{43:239,44:h,45:40,47:41,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{10:k,18:240},{10:G,60:K,84:q,92:241,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:252,104:[1,253],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:254,104:[1,255],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{105:[1,256]},{10:G,60:K,84:q,92:257,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{44:h,47:258,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},e(I,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(I,[2,116]),e(I,[2,118],{10:[1,262]}),e(I,[2,119]),e(P,[2,56]),e(et,[2,87]),e(P,[2,57]),{51:[1,263],67:R,82:219,116:V,117:H,118:U},e(P,[2,64]),e(P,[2,59]),e(P,[2,60]),e(P,[2,61]),{109:[1,264]},e(P,[2,63]),e(P,[2,65]),{66:[1,265],67:R,82:219,116:V,117:H,118:U},e(P,[2,67]),e(P,[2,68]),e(P,[2,70]),e(P,[2,69]),e(P,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Se,[2,78]),{31:[1,266],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,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:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:ee,87:te,88:ne,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},e(be,[2,53]),{43:268,44:h,45:40,47:41,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},e(I,[2,121],{106:tt}),e(nt,[2,130],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),e($,[2,132]),e($,[2,134]),e($,[2,135]),e($,[2,136]),e($,[2,137]),e($,[2,138]),e($,[2,139]),e($,[2,140]),e($,[2,141]),e(I,[2,122],{106:tt}),{10:[1,271]},e(I,[2,123],{106:tt}),{10:[1,272]},e($e,[2,129]),e(I,[2,105],{106:tt}),e(I,[2,106],{113:113,44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),e(I,[2,110]),e(I,[2,112],{10:[1,273]}),e(I,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:j,9:M,11:N,21:278},e(A,[2,34]),e(be,[2,52]),{10:G,60:K,84:q,105:J,107:279,108:243,109:Y,110:X,111:Z,112:Q},e($,[2,133]),{14:le,44:ue,60:de,89:fe,101:280,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{14:le,44:ue,60:de,89:fe,101:281,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{98:[1,282]},e(I,[2,120]),e(P,[2,58]),{30:283,67:R,80:z,81:B,82:172,116:V,117:H,118:U},e(P,[2,66]),e(Ye,o,{5:284}),e(nt,[2,131],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),e(I,[2,126],{120:168,10:[1,285],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),e(I,[2,127],{120:168,10:[1,286],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),e(I,[2,114]),{31:[1,287],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,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:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:ee,87:te,88:ne,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},{10:G,60:K,84:q,92:289,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:290,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},e(P,[2,62]),e(A,[2,33]),e(I,[2,124],{106:tt}),e(I,[2,125],{106:tt})],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var ee=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function te(e){r.length-=2*e,a.length-=e,o.length-=e}t(te,`popStack`);function ne(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(ne,`lex`);for(var y,b,x,S,C,w={},T,E,D,O;;){if(x=r[r.length-1],this.defaultActions[x]?S=this.defaultActions[x]:(y??=ne(),S=s[x]&&s[x][y]),S===void 0||!S.length||!S[0]){var re=``;for(T in O=[],s[x])this.terminals_[T]&&T>f&&O.push(`'`+this.terminals_[T]+`'`);re=h.showPosition?`Parse error on line `+(l+1)+`: +You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,t,r){let i=this.isLinkData(r)?r.id.replace(`@`,``):void 0;n.info(`addLink`,e,t,i);for(let n of e)for(let a of t){let o=n===e[e.length-1],s=a===t[0];o&&s?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,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=`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(m().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{v.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=v.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(t){let n=E();r(t).select(`svg`).selectAll(`g.node`).on(`mouseover`,t=>{let i=r(t.currentTarget),a=i.attr(`title`);if(a===null)return;let o=t.currentTarget?.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.text(i.attr(`title`)).style(`left`,window.scrollX+o.left+(o.right-o.left)/2+`px`).style(`top`,window.scrollY+o.bottom+`px`),n.html(e.sanitize(a)),i.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),r(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=m(),s()}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,r,i){let a=e.text.trim(),o=i.text;e===i&&/\s/.exec(i.text)&&(a=void 0);let s=t(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`)(r.flat()),c=s.nodeList,l=s.dir,u=m().flowchart??{};if(l??=u.inheritDir?this.getDirection()??m().direction??void 0:void 0,this.version===`gen-1`)for(let e=0;e2e3)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=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`: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,c=this.findNode(t,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.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),minWidth:i.flowchart?.minNodeWidth})}}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=m(),n=[],r=[],i=this.getSubGraphs(),a=new Map,o=new Map,s=new Map;for(let e of i)for(let t of e.nodes)this.subGraphLookup.has(t)&&s.set(t,e.id);let c=new Map,l=new Map;for(let e of i){let t=s.get(e.id);t!==void 0&&l.set(t,[...l.get(t)??[],e.id])}let u=0,d=t(e=>{c.set(e,u++);for(let t of l.get(e)??[])d(t)},`walk`);for(let e of i)s.has(e.id)||d(e.id);let f=t(e=>this.subGraphLookup.get(e)?.metadata?.view===`collapsed`,`isCollapsed`),p=t(e=>{let t,n=new Set,r=e;for(;r!==void 0&&!n.has(r);)n.add(r),f(r)&&(t=r),r=s.get(r);return t},`outermostCollapsed`),h=new Set,g=new Map;for(let e of i){let t=p(e.id);if(t!==void 0){e.id!==t&&(h.add(e.id),g.set(e.id,t));for(let n of e.nodes)n!==t&&(h.add(n),g.set(n,t))}}for(let e=i.length-1;e>=0;e--){let t=i[e];if(!h.has(t.id)){t.nodes.length>0&&o.set(t.id,!0);for(let e of t.nodes)a.set(e,t.id)}}for(let t=i.length-1;t>=0;t--){let r=i[t];h.has(r.id)||(r.metadata?.view===`collapsed`?n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`collapsedGroup`,dir:r.dir,isGroup:!1,look:e.look,colorIndex:c.get(r.id)}):n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`rect`,dir:r.dir,isGroup:!0,look:e.look,colorIndex:c.get(r.id),metadata:r.metadata}))}this.getVertices().forEach(t=>{h.has(t.id)||this.addNodeFromVertex(t,n,a,o,e,e.look||`classic`)});let v=this.getEdges();return v.forEach((t,n)=>{let{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(t.type),o=[...v.defaultStyle??[]],s=g.get(t.start)??t.start,c=g.get(t.end)??t.end;if(s===c&&(g.has(t.start)||g.has(t.end)))return;t.style&&o.push(...t.style);let l={id:_(s,c,{counter:n,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:s,end:c,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};r.push(l)}),{nodes:n,edges:r,other:{},config:e}}defaultConfig(){return c.flowchart}},ae={getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing state diagram (v2)`,t);let{securityLevel:a,flowchart:o,layout:s}=m();i.db.setDiagramId(t),n.debug(`Before getData: `);let c=i.db.getData();n.debug(`Data: `,c);let l=D(t,a),u=i.db.getDirection();c.type=i.type,c.layoutAlgorithm=w(s),c.direction=u,c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`point`,`circle`,`cross`],c.diagramId=t,n.debug(`REF1:`,c),await C(c,l);let d=c.config.flowchart?.diagramPadding??8;v.insertTitle(l,`flowchartTitleText`,o?.titleTopMargin||0,i.db.getDiagramTitle()),O(l,d,`flowchart`,o?.useMaxWidth||!1)},`draw`)},oe=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,3],i=[1,5],a=[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],o=[2,2],s=[1,13],c=[1,14],l=[1,15],u=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],h=[1,50],g=[1,49],_=[1,29],v=[1,30],ee=[1,31],te=[1,32],ne=[1,33],y=[1,45],b=[1,47],x=[1,43],S=[1,48],C=[1,44],w=[1,51],T=[1,46],E=[1,52],D=[1,53],O=[1,34],re=[1,35],ie=[1,36],ae=[1,37],oe=[1,38],k=[1,58],A=[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],j=[1,62],M=[1,61],N=[1,63],se=[8,9,11,75,77,78],ce=[1,79],le=[1,92],ue=[1,97],de=[1,96],fe=[1,93],pe=[1,89],me=[1,95],he=[1,91],ge=[1,98],_e=[1,94],ve=[1,99],ye=[1,90],be=[8,9,10,11,40,75,77,78],P=[8,9,10,11,40,46,75,77,78],F=[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],xe=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Se=[44,60,89,102,105,106,109,111,114,115,116],Ce=[1,122],we=[1,123],Te=[1,125],Ee=[1,124],De=[44,60,62,74,89,102,105,106,109,111,114,115,116],Oe=[1,134],ke=[1,148],Ae=[1,149],je=[1,150],Me=[1,151],Ne=[1,136],Pe=[1,138],Fe=[1,142],Ie=[1,143],Le=[1,144],Re=[1,145],ze=[1,146],Be=[1,147],Ve=[1,152],He=[1,153],Ue=[1,132],We=[1,133],Ge=[1,140],Ke=[1,135],qe=[1,139],Je=[1,137],Ye=[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],Xe=[1,155],Ze=[1,157],I=[8,9,11],L=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],R=[1,177],z=[1,173],B=[1,174],V=[1,178],H=[1,175],U=[1,176],Qe=[77,116,119],W=[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],$e=[10,106],et=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],G=[1,248],K=[1,246],q=[1,250],J=[1,244],Y=[1,245],X=[1,247],Z=[1,249],Q=[1,251],tt=[1,269],nt=[8,9,11,106],$=[8,9,10,11,60,84,105,106,109,110,111,112],rt={trace:t(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:t(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 c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 78:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.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 c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 84:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.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:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:ee,87:te,88:ne,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},e(a,[2,9]),e(a,[2,10]),e(a,[2,11]),{8:[1,55],9:[1,56],10:k,15:54,18:57},e(A,[2,3]),e(A,[2,4]),e(A,[2,5]),e(A,[2,6]),e(A,[2,7]),e(A,[2,8]),{8:j,9:M,11:N,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:j,9:M,11:N,21:68},{8:j,9:M,11:N,21:69},{8:j,9:M,11:N,21:70},{8:j,9:M,11:N,21:71},{8:j,9:M,11:N,21:72},{8:j,9:M,10:[1,73],11:N,21:74},e(A,[2,36]),{35:[1,75]},{37:[1,76]},e(A,[2,39]),e(se,[2,50],{18:77,39:78,10:k,40:ce}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:le,44:ue,60:de,80:[1,87],89:fe,95:[1,84],97:[1,85],101:86,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},e(A,[2,185]),e(A,[2,186]),e(A,[2,187]),e(A,[2,188]),e(A,[2,189]),e(be,[2,51]),e(be,[2,54],{46:[1,100]}),e(P,[2,72],{113:113,29:[1,101],44:h,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:g,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),e(F,[2,181]),e(F,[2,142]),e(F,[2,143]),e(F,[2,144]),e(F,[2,145]),e(F,[2,146]),e(F,[2,147]),e(F,[2,148]),e(F,[2,149]),e(F,[2,150]),e(F,[2,151]),e(F,[2,152]),e(a,[2,12]),e(a,[2,18]),e(a,[2,19]),{9:[1,114]},e(xe,[2,26],{18:115,10:k}),e(A,[2,27]),{42:116,43:39,44:h,45:40,47:41,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},e(A,[2,40]),e(A,[2,41]),e(A,[2,42]),e(Se,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Ce,81:we,116:Te,119:Ee},{75:[1,126],77:[1,127]},e(De,[2,83]),e(A,[2,28]),e(A,[2,29]),e(A,[2,30]),e(A,[2,31]),e(A,[2,32]),{10:Oe,12:ke,14:Ae,27:je,28:128,32:Me,44:Ne,60:Pe,75:Fe,80:[1,130],81:[1,131],83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:129,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},e(Ye,o,{5:154}),e(A,[2,37]),e(A,[2,38]),e(se,[2,48],{44:Xe}),e(se,[2,49],{18:156,10:k,40:Ze}),e(be,[2,44]),{44:h,47:158,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{102:[1,159],103:160,105:[1,161]},{44:h,47:162,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{44:h,47:163,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},e(I,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(I,[2,115],{120:168,10:[1,167],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),e(I,[2,117],{10:[1,169]}),e(L,[2,183]),e(L,[2,170]),e(L,[2,171]),e(L,[2,172]),e(L,[2,173]),e(L,[2,174]),e(L,[2,175]),e(L,[2,176]),e(L,[2,177]),e(L,[2,178]),e(L,[2,179]),e(L,[2,180]),{44:h,47:170,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{30:171,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:179,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:181,50:[1,180],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:182,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:183,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:184,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{109:[1,185]},{30:186,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:187,65:[1,188],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:189,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:190,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:191,67:R,80:z,81:B,82:172,116:V,117:H,118:U},e(F,[2,182]),e(a,[2,20]),e(xe,[2,25]),e(se,[2,46],{39:192,18:193,10:k,40:ce}),e(Se,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{77:[1,197],79:198,116:Te,119:Ee},e(Qe,[2,79]),e(Qe,[2,81]),e(Qe,[2,82]),e(Qe,[2,168]),e(Qe,[2,169]),{76:199,79:121,80:Ce,81:we,116:Te,119:Ee},e(De,[2,84]),{8:j,9:M,10:Oe,11:N,12:ke,14:Ae,21:201,27:je,29:[1,200],32:Me,44:Ne,60:Pe,75:Fe,83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:202,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},e(W,[2,101]),e(W,[2,103]),e(W,[2,104]),e(W,[2,157]),e(W,[2,158]),e(W,[2,159]),e(W,[2,160]),e(W,[2,161]),e(W,[2,162]),e(W,[2,163]),e(W,[2,164]),e(W,[2,165]),e(W,[2,166]),e(W,[2,167]),e(W,[2,90]),e(W,[2,91]),e(W,[2,92]),e(W,[2,93]),e(W,[2,94]),e(W,[2,95]),e(W,[2,96]),e(W,[2,97]),e(W,[2,98]),e(W,[2,99]),e(W,[2,100]),{6:11,7:12,8:s,9:c,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:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:ee,87:te,88:ne,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},{10:k,18:204},{44:[1,205]},e(be,[2,43]),{10:[1,206],44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{10:[1,207]},{10:[1,208],106:[1,209]},e($e,[2,128]),{10:[1,210],44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{10:[1,211],44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{80:[1,212]},e(I,[2,109],{10:[1,213]}),e(I,[2,111],{10:[1,214]}),{80:[1,215]},e(L,[2,184]),{80:[1,216],98:[1,217]},e(be,[2,55],{113:113,44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),{31:[1,218],67:R,82:219,116:V,117:H,118:U},e(et,[2,86]),e(et,[2,88]),e(et,[2,89]),e(et,[2,153]),e(et,[2,154]),e(et,[2,155]),e(et,[2,156]),{49:[1,220],67:R,82:219,116:V,117:H,118:U},{30:221,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{51:[1,222],67:R,82:219,116:V,117:H,118:U},{53:[1,223],67:R,82:219,116:V,117:H,118:U},{55:[1,224],67:R,82:219,116:V,117:H,118:U},{57:[1,225],67:R,82:219,116:V,117:H,118:U},{60:[1,226]},{64:[1,227],67:R,82:219,116:V,117:H,118:U},{66:[1,228],67:R,82:219,116:V,117:H,118:U},{30:229,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{31:[1,230],67:R,82:219,116:V,117:H,118:U},{67:R,69:[1,231],71:[1,232],82:219,116:V,117:H,118:U},{67:R,69:[1,234],71:[1,233],82:219,116:V,117:H,118:U},e(se,[2,45],{18:156,10:k,40:Ze}),e(se,[2,47],{44:Xe}),e(Se,[2,75]),e(Se,[2,74]),{62:[1,235],67:R,82:219,116:V,117:H,118:U},e(Se,[2,77]),e(Qe,[2,80]),{77:[1,236],79:198,116:Te,119:Ee},{30:237,67:R,80:z,81:B,82:172,116:V,117:H,118:U},e(Ye,o,{5:238}),e(W,[2,102]),e(A,[2,35]),{43:239,44:h,45:40,47:41,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{10:k,18:240},{10:G,60:K,84:q,92:241,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:252,104:[1,253],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:254,104:[1,255],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{105:[1,256]},{10:G,60:K,84:q,92:257,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{44:h,47:258,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},e(I,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(I,[2,116]),e(I,[2,118],{10:[1,262]}),e(I,[2,119]),e(P,[2,56]),e(et,[2,87]),e(P,[2,57]),{51:[1,263],67:R,82:219,116:V,117:H,118:U},e(P,[2,64]),e(P,[2,59]),e(P,[2,60]),e(P,[2,61]),{109:[1,264]},e(P,[2,63]),e(P,[2,65]),{66:[1,265],67:R,82:219,116:V,117:H,118:U},e(P,[2,67]),e(P,[2,68]),e(P,[2,70]),e(P,[2,69]),e(P,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Se,[2,78]),{31:[1,266],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,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:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:ee,87:te,88:ne,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},e(be,[2,53]),{43:268,44:h,45:40,47:41,60:g,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},e(I,[2,121],{106:tt}),e(nt,[2,130],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),e($,[2,132]),e($,[2,134]),e($,[2,135]),e($,[2,136]),e($,[2,137]),e($,[2,138]),e($,[2,139]),e($,[2,140]),e($,[2,141]),e(I,[2,122],{106:tt}),{10:[1,271]},e(I,[2,123],{106:tt}),{10:[1,272]},e($e,[2,129]),e(I,[2,105],{106:tt}),e(I,[2,106],{113:113,44:h,60:g,89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),e(I,[2,110]),e(I,[2,112],{10:[1,273]}),e(I,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:j,9:M,11:N,21:278},e(A,[2,34]),e(be,[2,52]),{10:G,60:K,84:q,105:J,107:279,108:243,109:Y,110:X,111:Z,112:Q},e($,[2,133]),{14:le,44:ue,60:de,89:fe,101:280,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{14:le,44:ue,60:de,89:fe,101:281,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{98:[1,282]},e(I,[2,120]),e(P,[2,58]),{30:283,67:R,80:z,81:B,82:172,116:V,117:H,118:U},e(P,[2,66]),e(Ye,o,{5:284}),e(nt,[2,131],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),e(I,[2,126],{120:168,10:[1,285],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),e(I,[2,127],{120:168,10:[1,286],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),e(I,[2,114]),{31:[1,287],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,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:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:ee,87:te,88:ne,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},{10:G,60:K,84:q,92:289,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:290,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},e(P,[2,62]),e(A,[2,33]),e(I,[2,124],{106:tt}),e(I,[2,125],{106:tt})],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var ee=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function te(e){r.length-=2*e,a.length-=e,o.length-=e}t(te,`popStack`);function ne(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(ne,`lex`);for(var y,b,x,S,C,w={},T,E,D,O;;){if(x=r[r.length-1],this.defaultActions[x]?S=this.defaultActions[x]:(y??=ne(),S=s[x]&&s[x][y]),S===void 0||!S.length||!S[0]){var re=``;for(T in O=[],s[x])this.terminals_[T]&&T>f&&O.push(`'`+this.terminals_[T]+`'`);re=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+O.join(`, `)+`, got '`+(this.terminals_[y]||y)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(y==p?`end of input`:`'`+(this.terminals_[y]||y)+`'`),this.parseError(re,{text:h.match,token:this.terminals_[y]||y,line:h.yylineno,loc:v,expected:O})}if(S[0]instanceof Array&&S.length>1)throw Error(`Parse Error: multiple actions possible at state: `+x+`, token: `+y);switch(S[0]){case 1:r.push(y),a.push(h.yytext),o.push(h.yylloc),r.push(S[1]),y=null,b?(y=b,b=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(E=this.productions_[S[1]][1],w.$=a[a.length-E],w._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},ee&&(w._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),C=this.performAction.apply(w,[c,u,l,g.yy,S[1],a,o].concat(m)),C!==void 0)return C;E&&(r=r.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),r.push(this.productions_[S[1]][0]),a.push(w.$),o.push(w._$),D=s[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0},`parse`)};rt.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(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:t(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:t(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:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(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:t(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:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:t(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:t(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;at[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. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(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,`
`),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\n\r]+)/,/^(?:$)/],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 it(){this.yy={}}return t(it,`Parser`),it.prototype=rt,rt.Parser=it,new it})();oe.parser=oe;var k=oe,A=Object.assign({},k);A.parse=e=>{let t=e.replace(/}\s*\n/g,`} -`);return k.parse(t)};var j=A,M=t(e=>{let{theme:n,bkgColorArray:r,borderColorArray:i}=e;if(!te(n,i))return``;let a=y(e.look),o=b(r),s=``;for(let n=0;n`${l}.node ${e}, ${l}.rough-node ${e}`,`collapsedRule`),d=t(e=>`${l}.swimlane.cluster .swimlane-title${e}, ${l}.swimlane.cluster .swimlane-body${e}`,`laneRule`);s+=` +`);return k.parse(t)};var j=A,M=t(e=>{let{theme:n,bkgColorArray:r,borderColorArray:i}=e;if(!ne(n,i))return``;let a=b(e.look),o=x(r),s=``;for(let n=0;n`${l}.node ${e}, ${l}.rough-node ${e}`,`collapsedRule`),d=t(e=>`${l}.swimlane.cluster .swimlane-title${e}, ${l}.swimlane.cluster .swimlane-body${e}`,`laneRule`);s+=` ${l}.cluster:not(.swimlane) rect { stroke: ${e}; @@ -209,5 +209,5 @@ ${o?` } text-align: center; } - ${ee()} + ${T()} `,`getStyles`),ce=t(({styles:e=se}={})=>({parser:j,get db(){return new ie},renderer:ae,styles:e,init:t(e=>{e.flowchart||={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},`init`)}),`createFlowDiagram`),le=ce();export{le as n,se as r,ce as t}; \ No newline at end of file diff --git a/web/dist/app-chunk-GNY47TPC.js b/web/dist/app-chunk-GNY47TPC.js index 613f71291..caa2b288d 100644 --- a/web/dist/app-chunk-GNY47TPC.js +++ b/web/dist/app-chunk-GNY47TPC.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["app-elk-276RUBZZ.js","app-rolldown-runtime.js","app-chunk-Y2CYZVJY.js","app-src.js","app-chunk-O7XYJQB3.js","app-preload-helper.js","app-purify.es.js","app-chunk-ZIGJFQKS.js","app-dist.js","app-chunk-742MDFTN.js","app-chunk-MBY4JIJT.js","app-chunk-7PRAP22T.js","app-chunk-7INBJB4K.js","app-chunk-J5ZVWO5B.js","app-rough.esm.js","app-chunk-5DYCD2WN.js","app-chunk-Z7XXMR3K.js","app-line.js","app-path.js","app-array.js","app-chunk-UA2S7LBM.js","app-chunk-3FUC2YCW.js","app-graphlib.js","app-chunk-NETBCI7D.js","app-dagre-6A5THRUB.js","app-swimlanes-2SLR337P.js","app-cose-bilkent-JH36ORCC.js","app-cytoscape.esm.js"])))=>i.map(i=>d[i]); -import{t as e}from"./app-preload-helper.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import{b as r,s as i}from"./app-chunk-O7XYJQB3.js";import{d as a}from"./app-chunk-ZIGJFQKS.js";import{t as o}from"./app-chunk-DUW6YSOI.js";import{o as s}from"./app-chunk-7INBJB4K.js";import{r as c}from"./app-chunk-5DYCD2WN.js";import{a as l,c as u,i as d,l as f}from"./app-chunk-Z7XXMR3K.js";import{r as p}from"./app-chunk-UA2S7LBM.js";var m={common:i,getConfig:r,insertCluster:p,insertEdge:d,insertEdgeLabel:l,insertMarkers:u,insertNode:c,interpolateToCurve:a,labelHelper:s,log:n,positionEdgeLabel:f},h=[`elk.stress`,`elk.force`,`elk.mrtree`,`elk.sporeOverlap`,`elk.box`,`elk.rectpacking`],g=Object.create(null),_=t(e=>{for(let t of e)g[t.name]=t},`registerLayoutLoaders`),v=t(()=>{let n=t(async()=>await e(()=>import(`./app-elk-276RUBZZ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),`loader`);return[{name:`elk`,loader:n,algorithm:`elk.layered`},...h.map(e=>({name:e,loader:n,algorithm:e}))]},`elkLayoutLoaders`);t(()=>{_([{name:`dagre`,loader:t(async()=>await e(()=>import(`./app-dagre-6A5THRUB.js`),__vite__mapDeps([24,2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,22,20,21])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./app-swimlanes-2SLR337P.js`),__vite__mapDeps([25,2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./app-cose-bilkent-JH36ORCC.js`),__vite__mapDeps([26,1,2,3,27])),`loader`)},...v()])},`registerDefaultLayoutLoaders`)();var y=t(async(e,t)=>{if(!Object.hasOwn(g,e.layoutAlgorithm))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=g[e.layoutAlgorithm],r=await n.loader();return o(t,e.config),r.render(e,t,m,{algorithm:n.algorithm})},`render`),b=`dagre`,x=t((e=``,{fallback:t=b}={})=>{if(Object.hasOwn(g,e))return e;for(let r of[t,b])if(Object.hasOwn(g,r))return n.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw Error(`Neither layout algorithm ${e}, ${t}, nor ${b} is registered.`)},`getRegisteredLayoutAlgorithm`);export{_ as n,y as r,x as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["app-elk-276RUBZZ.js","app-rolldown-runtime.js","app-chunk-Y2CYZVJY.js","app-src.js","app-chunk-O7XYJQB3.js","app-preload-helper.js","app-purify.es.js","app-chunk-ZIGJFQKS.js","app-dist.js","app-chunk-7PRAP22T.js","app-chunk-742MDFTN.js","app-chunk-MBY4JIJT.js","app-chunk-7INBJB4K.js","app-chunk-J5ZVWO5B.js","app-rough.esm.js","app-chunk-5DYCD2WN.js","app-chunk-UA2S7LBM.js","app-chunk-Z7XXMR3K.js","app-line.js","app-path.js","app-array.js","app-chunk-3FUC2YCW.js","app-graphlib.js","app-chunk-NETBCI7D.js","app-dagre-6A5THRUB.js","app-swimlanes-2SLR337P.js","app-cose-bilkent-JH36ORCC.js","app-cytoscape.esm.js"])))=>i.map(i=>d[i]); +import{t as e}from"./app-preload-helper.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import{b as r,s as i}from"./app-chunk-O7XYJQB3.js";import{d as a}from"./app-chunk-ZIGJFQKS.js";import{t as o}from"./app-chunk-DUW6YSOI.js";import{o as s}from"./app-chunk-7INBJB4K.js";import{r as c}from"./app-chunk-5DYCD2WN.js";import{r as l}from"./app-chunk-UA2S7LBM.js";import{a as u,c as d,i as f,l as p}from"./app-chunk-Z7XXMR3K.js";var m={common:i,getConfig:r,insertCluster:l,insertEdge:f,insertEdgeLabel:u,insertMarkers:d,insertNode:c,interpolateToCurve:a,labelHelper:s,log:n,positionEdgeLabel:p},h=[`elk.stress`,`elk.force`,`elk.mrtree`,`elk.sporeOverlap`,`elk.box`,`elk.rectpacking`],g=Object.create(null),_=t(e=>{for(let t of e)g[t.name]=t},`registerLayoutLoaders`),v=t(()=>{let n=t(async()=>await e(()=>import(`./app-elk-276RUBZZ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),`loader`);return[{name:`elk`,loader:n,algorithm:`elk.layered`},...h.map(e=>({name:e,loader:n,algorithm:e}))]},`elkLayoutLoaders`);t(()=>{_([{name:`dagre`,loader:t(async()=>await e(()=>import(`./app-dagre-6A5THRUB.js`),__vite__mapDeps([24,2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,21])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./app-swimlanes-2SLR337P.js`),__vite__mapDeps([25,2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./app-cose-bilkent-JH36ORCC.js`),__vite__mapDeps([26,1,2,3,27])),`loader`)},...v()])},`registerDefaultLayoutLoaders`)();var y=t(async(e,t)=>{if(!Object.hasOwn(g,e.layoutAlgorithm))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=g[e.layoutAlgorithm],r=await n.loader();return o(t,e.config),r.render(e,t,m,{algorithm:n.algorithm})},`render`),b=`dagre`,x=t((e=``,{fallback:t=b}={})=>{if(Object.hasOwn(g,e))return e;for(let r of[t,b])if(Object.hasOwn(g,r))return n.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw Error(`Neither layout algorithm ${e}, ${t}, nor ${b} is registered.`)},`getRegisteredLayoutAlgorithm`);export{_ as n,y as r,x as t}; \ No newline at end of file diff --git a/web/dist/app-chunk-UA2S7LBM.js b/web/dist/app-chunk-UA2S7LBM.js index 6150383e0..638b27ad9 100644 --- a/web/dist/app-chunk-UA2S7LBM.js +++ b/web/dist/app-chunk-UA2S7LBM.js @@ -1 +1 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{T as r,g as i,x as a}from"./app-chunk-O7XYJQB3.js";import{n as o}from"./app-chunk-MBY4JIJT.js";import{a as s,i as c,t as l}from"./app-chunk-7PRAP22T.js";import{s as u}from"./app-chunk-J5ZVWO5B.js";import{t as d}from"./app-rough.esm.js";import{i as f,n as p,t as m}from"./app-chunk-7INBJB4K.js";import{n as h}from"./app-chunk-5DYCD2WN.js";var g=e(async(e,r)=>{let l=a(),{theme:p,themeVariables:m,handDrawnSeed:h}=l,{clusterBkg:g,clusterBorder:_,borderColorArray:v}=m,y=_,{labelStyles:b,nodeStyles:x,borderStyles:S,backgroundStyles:C}=c(r),w=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look);u(w,r.colorIndex,p,v);let T=i(l.flowchart.htmlLabels),E=r.direction===`LR`,D=w.insert(`g`).attr(`class`,`cluster-label swimlane-label`),O=await o(D,r.label,{style:r.labelStyle,useHtmlLabels:T,isNode:!0,width:r.width}),k=O.getBBox();if(T){let e=O.children[0],t=n(O);k=e.getBoundingClientRect(),t.attr(`width`,k.width),t.attr(`height`,k.height)}let A=r.padding??0,j=r.width<=k.width+A?k.width+A:r.width;r.diff=r.width<=k.width+A?(j-r.width)/2-A:-A;let M=r.height,N=r.y-M/2,P=r.y+M/2,F=r.x-j/2,I=r.swimlaneContentTop===void 0?N+M/3:r.swimlaneContentTop,L=E?4:0,R=k.height+2*L,z,B;if(E){let e=Math.max(R,k.height+2*L),t=F+e,n=Math.max(0,j-e);if(r.look===`handDrawn`){let i=d.svg(w),a=s(r,{roughness:.7,fill:g,stroke:y,seed:h}),o=s(r,{roughness:.7,fill:`none`,stroke:y,seed:h}),c=i.rectangle(F,N,e,M,a);z=w.insert(()=>c,`:first-child`).attr(`class`,`swimlane-title`);let l=i.rectangle(t,N,n,M,o);B=w.insert(()=>l,`:first-child`).attr(`class`,`swimlane-body`),z.select(`path:nth-child(2)`).attr(`style`,S.join(`;`)),z.select(`path`).attr(`style`,C.join(`;`).replace(`fill`,`stroke`))}else z=w.insert(`rect`,`:first-child`),B=w.insert(`rect`,`:first-child`),z.attr(`class`,`swimlane-title`).attr(`style`,x).attr(`x`,F).attr(`y`,N).attr(`width`,e).attr(`height`,M).attr(`fill`,g).attr(`stroke`,y),B.attr(`class`,`swimlane-body`).attr(`style`,x).attr(`x`,t).attr(`y`,N).attr(`width`,n).attr(`height`,M).attr(`fill`,`none`).attr(`stroke`,y);let i=F+e/2,a=r.y;D.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{let e=Math.max(0,I-N),t=Math.min(R,e),n=N+t,i=Math.max(0,P-n),a=r.x-j/2;if(r.look===`handDrawn`){let e=d.svg(w),o=s(r,{roughness:.7,fill:g,stroke:y,fillWeight:3,seed:h}),c=s(r,{roughness:.7,fill:`none`,stroke:y,seed:h}),l=e.rectangle(a,N,j,t,o);z=w.insert(()=>l,`:first-child`).attr(`class`,`swimlane-title`);let u=e.rectangle(a,n,j,i,c);B=w.insert(()=>u,`:first-child`).attr(`class`,`swimlane-body`),z.select(`path:nth-child(2)`).attr(`style`,S.join(`;`)),z.select(`path`).attr(`style`,C.join(`;`).replace(`fill`,`stroke`))}else z=w.insert(`rect`,`:first-child`),B=w.insert(`rect`,`:first-child`),z.attr(`class`,`swimlane-title`).attr(`style`,x).attr(`x`,a).attr(`y`,N).attr(`width`,j).attr(`height`,t).attr(`fill`,g).attr(`stroke`,y),B.attr(`class`,`swimlane-body`).attr(`style`,x).attr(`x`,a).attr(`y`,n).attr(`width`,j).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,y);let o=r.x-k.width/2,c=N+(t-k.height)/2;D.attr(`transform`,`translate(${o}, ${c})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),b){let e=D.select(`span`);e&&e.attr(`style`,b)}return r.offsetX=0,r.width=j,r.height=M,r.offsetY=k.height-A/2,r.intersect=function(e){return f(r,e)},{cluster:w,labelBBox:k}},`swimlane`),_=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let l=a(),{theme:g,themeVariables:_,handDrawnSeed:v}=l,{clusterBkg:y,clusterBorder:b,borderColorArray:x}=_,{labelStyles:S,nodeStyles:C,borderStyles:w,backgroundStyles:T}=c(i),E=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look);u(E,i.colorIndex,g,x);let D=r(l),O=E.insert(`g`).attr(`class`,`cluster-label `),k;k=i.labelType===`markdown`?await o(O,i.label,{style:i.labelStyle,useHtmlLabels:D,isNode:!0,width:i.width}):await m(O,i.label,i.labelStyle||``,!1,!0);let A=k.getBBox();if(r(l)){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let j=i.width<=A.width+i.padding?A.width+i.padding:i.width;i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let M=i.height,N=i.x-j/2,P=i.y-M/2;t.trace(`Data `,i,JSON.stringify(i));let F;if(i.look===`handDrawn`){let e=d.svg(E),n=s(i,{roughness:.7,fill:y,stroke:b,fillWeight:3,seed:v}),r=e.path(p(N,P,j,M,0),n);F=E.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),F.select(`path:nth-child(2)`).attr(`style`,w.join(`;`)),F.select(`path`).attr(`style`,T.join(`;`).replace(`fill`,`stroke`))}else F=E.insert(`rect`,`:first-child`),F.attr(`style`,C).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,N).attr(`y`,P).attr(`width`,j).attr(`height`,M);let{subGraphTitleTopMargin:I}=h(l);if(O.attr(`transform`,`translate(${i.x-A.width/2}, ${i.y-i.height/2+I})`),S){let e=O.select(`span`);e&&e.attr(`style`,S)}let L=F.node().getBBox();return i.offsetX=0,i.width=L.width,i.height=L.height,i.offsetY=A.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`rect`),v=e((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 f(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),y=e(async(e,t)=>{let i=a(),{theme:o,themeVariables:s,handDrawnSeed:c}=i,{altBackground:l,borderColorArray:h,compositeBackground:g,compositeTitleBackground:_,nodeBorder:v}=s,y=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look);u(y,t.colorIndex,o,h);let b=y.insert(`g`,`:first-child`),x=y.insert(`g`).attr(`class`,`cluster-label`),S=y.append(`rect`),C=await m(x,t.label,t.labelStyle,void 0,!0),w=C.getBBox();if(r(i)){let e=C.children[0],t=n(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=0*t.padding,E=T/2,D=(t.width<=w.width+t.padding?w.width+t.padding:t.width)+T;t.diff=t.width<=w.width+t.padding?(D-t.width)/2-t.padding:-t.padding;let O=t.height+T,k=t.height+T-w.height-6,A=t.x-D/2,j=t.y-O/2;t.width=D;let M=t.y-t.height/2-E+w.height+2,N;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=d.svg(y),r=t.rx||t.ry?n.path(p(A,j,D,O,10),{roughness:.7,fill:_,fillStyle:`solid`,stroke:v,seed:c}):n.rectangle(A,j,D,O,{seed:c});N=y.insert(()=>r,`:first-child`);let i=n.rectangle(A,M,D,k,{fill:e?l:g,fillStyle:e?`hachure`:`solid`,stroke:v,seed:c});N=y.insert(()=>r,`:first-child`),S=y.insert(()=>i),N.attr(`class`,`outer`),S.attr(`class`,`inner`)}else N=b.insert(`rect`,`:first-child`),N.attr(`class`,`outer`).attr(`x`,A).attr(`y`,j).attr(`width`,D).attr(`height`,O).attr(`data-look`,t.look),S.attr(`class`,`inner`).attr(`x`,A).attr(`y`,M).attr(`width`,D).attr(`height`,k);return x.attr(`transform`,`translate(${t.x-w.width/2}, ${j+1-(r(i)?0:3)})`),t.height=N.node().getBBox().height,t.offsetX=0,t.offsetY=w.height-t.padding/2,t.labelBBox=w,t.intersect=function(e){return f(t,e)},{cluster:y,labelBBox:w}},`roundedWithTitle`),b=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let l=a(),{themeVariables:u,handDrawnSeed:m}=l,{clusterBkg:g,clusterBorder:_}=u,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=c(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=r(l),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await o(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(r(l)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=d.svg(S),n=s(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:m}),r=e.path(p(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=h(l);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),x=e((e,t)=>{let{theme:n,themeVariables:r,handDrawnSeed:i}=a(),{altBackground:o,nodeBorder:s,borderColorArray:c}=r,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look);u(l,t.colorIndex,n,c);let p=l.insert(`g`,`:first-child`),m=0*t.padding,h=t.width+m;t.diff=-t.padding;let g=t.height+m,_=t.x-h/2,v=t.y-g/2;t.width=h;let y;if(t.look===`handDrawn`){let e=d.svg(l).rectangle(_,v,h,g,{fill:o??`#efefef`,fillStyle:`solid`,roughness:.5,strokeLineDash:[5],stroke:s,seed:i});y=l.insert(()=>e,`:first-child`).attr(`class`,`divider`)}else{y=p.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),y.attr(`class`,e).attr(`x`,_).attr(`y`,v).attr(`width`,h).attr(`height`,g).attr(`data-look`,t.look)}return t.height=y.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return f(t,e)},{cluster:l,labelBBox:{}}},`divider`),S=e(async(e,i,l)=>{t.info(`Creating ${l.cssClass} for `,i.id,i);let g=a(),{theme:_,themeVariables:v,handDrawnSeed:y}=g,{borderColorArray:b}=v,{labelStyles:x,borderStyles:S}=c(i),C=e.insert(`g`).attr(`class`,`cluster `+l.cssClass+` `+i.cssClasses).attr(`id`,i.domId??i.id).attr(`data-look`,i.look);u(C,i.colorIndex,_,b);let w=r(g),T=C.insert(`g`).attr(`class`,`cluster-label`),E={width:0,height:0},D=i.label?.trim();if(D){let e;if(e=i.labelType===`markdown`?await o(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await m(T,i.label,i.labelStyle||``,!1,!0),E=e.getBBox(),w){let t=e.children[0],r=n(e);E=t.getBoundingClientRect(),r.attr(`width`,E.width),r.attr(`height`,E.height)}}let O=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(O-i.width)/2-i.padding:-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2,M;if(i.look===`handDrawn`){let e=d.svg(C),t=s(i,{roughness:l.roughness,fill:l.fill,stroke:l.stroke,strokeWidth:l.strokeWidth,seed:y,...l.fill===`none`?{fillWeight:0}:{fillStyle:`solid`},...l.strokeDash?{strokeLineDash:l.strokeDash}:{}}),n=e.path(p(A,j,O,k,l.rx),t);M=C.insert(()=>n,`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,S.join(`;`))}else M=C.insert(`rect`,`:first-child`),M.attr(`rx`,l.rx).attr(`ry`,l.rx).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k).attr(`fill`,l.fill).attr(`stroke`,l.stroke).attr(`stroke-width`,l.strokeWidth+`px`),l.strokeDash&&M.attr(`stroke-dasharray`,l.strokeDash.join(`, `));if(D){let{subGraphTitleTopMargin:e}=h(g);if(T.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+e})`),x){let e=T.select(`span`);e&&e.attr(`style`,x)}}let N=M.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:C,labelBBox:E}},`createContainerGroup`),C=e(async(e,t)=>{let{themeVariables:n}=a();return S(e,t,{cssClass:`flow-cluster`,rx:10,fill:`none`,stroke:n.flowContainerStroke||n.secondaryBorderColor,strokeWidth:.75,roughness:.7})},`flowGroup`),w=e((e,t)=>{let n=e.boundaryType||`rect`,r=n===`package`?20:e.padding,i=n===`package`?t.height+10:0,a=Math.max(e.width,t.width+r),o=n===`package`?Math.max(e.height,i+e.padding*2):e.height,s=e.x-a/2,c=e.y-o/2;return{boundaryType:n,width:a,height:o,x:s,y:c,bodyY:c+i,bodyHeight:o-i,tabHeight:i,tabWidth:n===`package`?Math.min(a,Math.max(80,t.width+20)):0}},`getUsecaseSystemBoundaryGeometry`),T={rect:_,squareRect:_,roundedWithTitle:y,noteGroup:v,divider:x,kanbanSection:b,flowGroup:C,usecaseSystemBoundary:e(async(e,i)=>{t.info(`Creating usecase system boundary for `,i.id,i);let p=a(),{theme:m,themeVariables:g,handDrawnSeed:_}=p,{clusterBkg:v,clusterBorder:y,borderColorArray:b}=g,{labelStyles:x,nodeStyles:S}=c(i),{stylesMap:C}=l(i),T=i.boundaryType||`rect`,E=e.insert(`g`).attr(`class`,`cluster usecase-system-boundary usecase-system-boundary-${T} ${i.cssClasses}`).attr(`id`,typeof i.domId==`string`?i.domId:i.id).attr(`data-boundary-type`,T).attr(`data-look`,i.look);u(E,i.colorIndex,m,b);let D=r(p),O=E.insert(`g`).attr(`class`,`cluster-label system-boundary-title`),k=await o(O,i.label,{style:x,useHtmlLabels:D,isNode:!0}),A=k.getBBox();if(D){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let{width:j,height:M,x:N,y:P,bodyY:F,bodyHeight:I,tabHeight:L,tabWidth:R}=w(i,A);i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let z=s(i,{fill:C.get(`fill`)||v,stroke:C.get(`stroke`)||y,strokeWidth:C.get(`stroke-width`)?.replace(`px`,``)||1,seed:_});if(i.look===`handDrawn`){let e=d.svg(E),t=e.rectangle(N,F,j,I,z);if(E.insert(()=>t,`:first-child`).attr(`class`,`boundary-body label-container`),T===`package`){let t=e.rectangle(N,P,R,L,z);E.insert(()=>t,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`)}}else E.insert(`rect`,`:first-child`).attr(`class`,`boundary-body label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,F).attr(`width`,j).attr(`height`,I),T===`package`&&E.insert(`rect`,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,P).attr(`width`,R).attr(`height`,L);let{subGraphTitleTopMargin:B}=h(p);return T===`package`?O.attr(`transform`,`translate(${N+(R-A.width)/2}, ${P+(L-A.height)/2})`):O.attr(`transform`,`translate(${i.x-A.width/2}, ${P+B})`),x&&(O.attr(`style`,x),O.select(`span`).attr(`style`,x)),i.offsetX=0,i.width=j,i.height=M,i.offsetY=A.height-i.padding/2,i.labelBBox=A,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`usecaseSystemBoundary`),swimlane:g},E=new Set([`noteGroup`,`divider`]),D=e(e=>!E.has(e??`rect`),`clusterPaintsTitle`),O=new Map,k=e(async(e,t)=>{let n=await T[t.shape||`rect`](e,t);return O.set(t.id,n),n},`insertCluster`),A=e(()=>{O=new Map},`clear`);export{D as n,k as r,A as t}; \ No newline at end of file +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{T as r,g as i,x as a}from"./app-chunk-O7XYJQB3.js";import{a as o,i as s,t as c}from"./app-chunk-7PRAP22T.js";import{n as l}from"./app-chunk-MBY4JIJT.js";import{s as u}from"./app-chunk-J5ZVWO5B.js";import{t as d}from"./app-rough.esm.js";import{i as f,n as p,t as m}from"./app-chunk-7INBJB4K.js";import{n as h}from"./app-chunk-5DYCD2WN.js";var g=e(async(e,r)=>{let c=a(),{theme:p,themeVariables:m,handDrawnSeed:h}=c,{clusterBkg:g,clusterBorder:_,borderColorArray:v}=m,y=_,{labelStyles:b,nodeStyles:x,borderStyles:S,backgroundStyles:C}=s(r),w=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look);u(w,r.colorIndex,p,v);let T=i(c.flowchart.htmlLabels),E=r.direction===`LR`,D=w.insert(`g`).attr(`class`,`cluster-label swimlane-label`),O=await l(D,r.label,{style:r.labelStyle,useHtmlLabels:T,isNode:!0,width:r.width}),k=O.getBBox();if(T){let e=O.children[0],t=n(O);k=e.getBoundingClientRect(),t.attr(`width`,k.width),t.attr(`height`,k.height)}let A=r.padding??0,j=r.width<=k.width+A?k.width+A:r.width;r.diff=r.width<=k.width+A?(j-r.width)/2-A:-A;let M=r.height,N=r.y-M/2,P=r.y+M/2,F=r.x-j/2,I=r.swimlaneContentTop===void 0?N+M/3:r.swimlaneContentTop,L=E?4:0,R=k.height+2*L,z,B;if(E){let e=Math.max(R,k.height+2*L),t=F+e,n=Math.max(0,j-e);if(r.look===`handDrawn`){let i=d.svg(w),a=o(r,{roughness:.7,fill:g,stroke:y,seed:h}),s=o(r,{roughness:.7,fill:`none`,stroke:y,seed:h}),c=i.rectangle(F,N,e,M,a);z=w.insert(()=>c,`:first-child`).attr(`class`,`swimlane-title`);let l=i.rectangle(t,N,n,M,s);B=w.insert(()=>l,`:first-child`).attr(`class`,`swimlane-body`),z.select(`path:nth-child(2)`).attr(`style`,S.join(`;`)),z.select(`path`).attr(`style`,C.join(`;`).replace(`fill`,`stroke`))}else z=w.insert(`rect`,`:first-child`),B=w.insert(`rect`,`:first-child`),z.attr(`class`,`swimlane-title`).attr(`style`,x).attr(`x`,F).attr(`y`,N).attr(`width`,e).attr(`height`,M).attr(`fill`,g).attr(`stroke`,y),B.attr(`class`,`swimlane-body`).attr(`style`,x).attr(`x`,t).attr(`y`,N).attr(`width`,n).attr(`height`,M).attr(`fill`,`none`).attr(`stroke`,y);let i=F+e/2,a=r.y;D.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{let e=Math.max(0,I-N),t=Math.min(R,e),n=N+t,i=Math.max(0,P-n),a=r.x-j/2;if(r.look===`handDrawn`){let e=d.svg(w),s=o(r,{roughness:.7,fill:g,stroke:y,fillWeight:3,seed:h}),c=o(r,{roughness:.7,fill:`none`,stroke:y,seed:h}),l=e.rectangle(a,N,j,t,s);z=w.insert(()=>l,`:first-child`).attr(`class`,`swimlane-title`);let u=e.rectangle(a,n,j,i,c);B=w.insert(()=>u,`:first-child`).attr(`class`,`swimlane-body`),z.select(`path:nth-child(2)`).attr(`style`,S.join(`;`)),z.select(`path`).attr(`style`,C.join(`;`).replace(`fill`,`stroke`))}else z=w.insert(`rect`,`:first-child`),B=w.insert(`rect`,`:first-child`),z.attr(`class`,`swimlane-title`).attr(`style`,x).attr(`x`,a).attr(`y`,N).attr(`width`,j).attr(`height`,t).attr(`fill`,g).attr(`stroke`,y),B.attr(`class`,`swimlane-body`).attr(`style`,x).attr(`x`,a).attr(`y`,n).attr(`width`,j).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,y);let s=r.x-k.width/2,c=N+(t-k.height)/2;D.attr(`transform`,`translate(${s}, ${c})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),b){let e=D.select(`span`);e&&e.attr(`style`,b)}return r.offsetX=0,r.width=j,r.height=M,r.offsetY=k.height-A/2,r.intersect=function(e){return f(r,e)},{cluster:w,labelBBox:k}},`swimlane`),_=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let c=a(),{theme:g,themeVariables:_,handDrawnSeed:v}=c,{clusterBkg:y,clusterBorder:b,borderColorArray:x}=_,{labelStyles:S,nodeStyles:C,borderStyles:w,backgroundStyles:T}=s(i),E=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look);u(E,i.colorIndex,g,x);let D=r(c),O=E.insert(`g`).attr(`class`,`cluster-label `),k;k=i.labelType===`markdown`?await l(O,i.label,{style:i.labelStyle,useHtmlLabels:D,isNode:!0,width:i.width}):await m(O,i.label,i.labelStyle||``,!1,!0);let A=k.getBBox();if(r(c)){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let j=i.width<=A.width+i.padding?A.width+i.padding:i.width;i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let M=i.height,N=i.x-j/2,P=i.y-M/2;t.trace(`Data `,i,JSON.stringify(i));let F;if(i.look===`handDrawn`){let e=d.svg(E),n=o(i,{roughness:.7,fill:y,stroke:b,fillWeight:3,seed:v}),r=e.path(p(N,P,j,M,0),n);F=E.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),F.select(`path:nth-child(2)`).attr(`style`,w.join(`;`)),F.select(`path`).attr(`style`,T.join(`;`).replace(`fill`,`stroke`))}else F=E.insert(`rect`,`:first-child`),F.attr(`style`,C).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,N).attr(`y`,P).attr(`width`,j).attr(`height`,M);let{subGraphTitleTopMargin:I}=h(c);if(O.attr(`transform`,`translate(${i.x-A.width/2}, ${i.y-i.height/2+I})`),S){let e=O.select(`span`);e&&e.attr(`style`,S)}let L=F.node().getBBox();return i.offsetX=0,i.width=L.width,i.height=L.height,i.offsetY=A.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`rect`),v=e((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 f(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),y=e(async(e,t)=>{let i=a(),{theme:o,themeVariables:s,handDrawnSeed:c}=i,{altBackground:l,borderColorArray:h,compositeBackground:g,compositeTitleBackground:_,nodeBorder:v}=s,y=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look);u(y,t.colorIndex,o,h);let b=y.insert(`g`,`:first-child`),x=y.insert(`g`).attr(`class`,`cluster-label`),S=y.append(`rect`),C=await m(x,t.label,t.labelStyle,void 0,!0),w=C.getBBox();if(r(i)){let e=C.children[0],t=n(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=0*t.padding,E=T/2,D=(t.width<=w.width+t.padding?w.width+t.padding:t.width)+T;t.diff=t.width<=w.width+t.padding?(D-t.width)/2-t.padding:-t.padding;let O=t.height+T,k=t.height+T-w.height-6,A=t.x-D/2,j=t.y-O/2;t.width=D;let M=t.y-t.height/2-E+w.height+2,N;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=d.svg(y),r=t.rx||t.ry?n.path(p(A,j,D,O,10),{roughness:.7,fill:_,fillStyle:`solid`,stroke:v,seed:c}):n.rectangle(A,j,D,O,{seed:c});N=y.insert(()=>r,`:first-child`);let i=n.rectangle(A,M,D,k,{fill:e?l:g,fillStyle:e?`hachure`:`solid`,stroke:v,seed:c});N=y.insert(()=>r,`:first-child`),S=y.insert(()=>i),N.attr(`class`,`outer`),S.attr(`class`,`inner`)}else N=b.insert(`rect`,`:first-child`),N.attr(`class`,`outer`).attr(`x`,A).attr(`y`,j).attr(`width`,D).attr(`height`,O).attr(`data-look`,t.look),S.attr(`class`,`inner`).attr(`x`,A).attr(`y`,M).attr(`width`,D).attr(`height`,k);return x.attr(`transform`,`translate(${t.x-w.width/2}, ${j+1-(r(i)?0:3)})`),t.height=N.node().getBBox().height,t.offsetX=0,t.offsetY=w.height-t.padding/2,t.labelBBox=w,t.intersect=function(e){return f(t,e)},{cluster:y,labelBBox:w}},`roundedWithTitle`),b=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let c=a(),{themeVariables:u,handDrawnSeed:m}=c,{clusterBkg:g,clusterBorder:_}=u,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=s(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=r(c),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await l(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(r(c)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=d.svg(S),n=o(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:m}),r=e.path(p(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=h(c);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),x=e((e,t)=>{let{theme:n,themeVariables:r,handDrawnSeed:i}=a(),{altBackground:o,nodeBorder:s,borderColorArray:c}=r,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look);u(l,t.colorIndex,n,c);let p=l.insert(`g`,`:first-child`),m=0*t.padding,h=t.width+m;t.diff=-t.padding;let g=t.height+m,_=t.x-h/2,v=t.y-g/2;t.width=h;let y;if(t.look===`handDrawn`){let e=d.svg(l).rectangle(_,v,h,g,{fill:o??`#efefef`,fillStyle:`solid`,roughness:.5,strokeLineDash:[5],stroke:s,seed:i});y=l.insert(()=>e,`:first-child`).attr(`class`,`divider`)}else{y=p.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),y.attr(`class`,e).attr(`x`,_).attr(`y`,v).attr(`width`,h).attr(`height`,g).attr(`data-look`,t.look)}return t.height=y.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return f(t,e)},{cluster:l,labelBBox:{}}},`divider`),S=e(async(e,i,c)=>{t.info(`Creating ${c.cssClass} for `,i.id,i);let g=a(),{theme:_,themeVariables:v,handDrawnSeed:y}=g,{borderColorArray:b}=v,{labelStyles:x,borderStyles:S}=s(i),C=e.insert(`g`).attr(`class`,`cluster `+c.cssClass+` `+i.cssClasses).attr(`id`,i.domId??i.id).attr(`data-look`,i.look);u(C,i.colorIndex,_,b);let w=r(g),T=C.insert(`g`).attr(`class`,`cluster-label`),E={width:0,height:0},D=i.label?.trim();if(D){let e;if(e=i.labelType===`markdown`?await l(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await m(T,i.label,i.labelStyle||``,!1,!0),E=e.getBBox(),w){let t=e.children[0],r=n(e);E=t.getBoundingClientRect(),r.attr(`width`,E.width),r.attr(`height`,E.height)}}let O=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(O-i.width)/2-i.padding:-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2,M;if(i.look===`handDrawn`){let e=d.svg(C),t=o(i,{roughness:c.roughness,fill:c.fill,stroke:c.stroke,strokeWidth:c.strokeWidth,seed:y,...c.fill===`none`?{fillWeight:0}:{fillStyle:`solid`},...c.strokeDash?{strokeLineDash:c.strokeDash}:{}}),n=e.path(p(A,j,O,k,c.rx),t);M=C.insert(()=>n,`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,S.join(`;`))}else M=C.insert(`rect`,`:first-child`),M.attr(`rx`,c.rx).attr(`ry`,c.rx).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k).attr(`fill`,c.fill).attr(`stroke`,c.stroke).attr(`stroke-width`,c.strokeWidth+`px`),c.strokeDash&&M.attr(`stroke-dasharray`,c.strokeDash.join(`, `));if(D){let{subGraphTitleTopMargin:e}=h(g);if(T.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+e})`),x){let e=T.select(`span`);e&&e.attr(`style`,x)}}let N=M.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:C,labelBBox:E}},`createContainerGroup`),C=e(async(e,t)=>{let{themeVariables:n}=a();return S(e,t,{cssClass:`flow-cluster`,rx:10,fill:`none`,stroke:n.flowContainerStroke||n.secondaryBorderColor,strokeWidth:.75,roughness:.7})},`flowGroup`),w=e((e,t)=>{let n=e.boundaryType||`rect`,r=n===`package`?20:e.padding,i=n===`package`?t.height+10:0,a=Math.max(e.width,t.width+r),o=n===`package`?Math.max(e.height,i+e.padding*2):e.height,s=e.x-a/2,c=e.y-o/2;return{boundaryType:n,width:a,height:o,x:s,y:c,bodyY:c+i,bodyHeight:o-i,tabHeight:i,tabWidth:n===`package`?Math.min(a,Math.max(80,t.width+20)):0}},`getUsecaseSystemBoundaryGeometry`),T={rect:_,squareRect:_,roundedWithTitle:y,noteGroup:v,divider:x,kanbanSection:b,flowGroup:C,usecaseSystemBoundary:e(async(e,i)=>{t.info(`Creating usecase system boundary for `,i.id,i);let p=a(),{theme:m,themeVariables:g,handDrawnSeed:_}=p,{clusterBkg:v,clusterBorder:y,borderColorArray:b}=g,{labelStyles:x,nodeStyles:S}=s(i),{stylesMap:C}=c(i),T=i.boundaryType||`rect`,E=e.insert(`g`).attr(`class`,`cluster usecase-system-boundary usecase-system-boundary-${T} ${i.cssClasses}`).attr(`id`,typeof i.domId==`string`?i.domId:i.id).attr(`data-boundary-type`,T).attr(`data-look`,i.look);u(E,i.colorIndex,m,b);let D=r(p),O=E.insert(`g`).attr(`class`,`cluster-label system-boundary-title`),k=await l(O,i.label,{style:x,useHtmlLabels:D,isNode:!0}),A=k.getBBox();if(D){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let{width:j,height:M,x:N,y:P,bodyY:F,bodyHeight:I,tabHeight:L,tabWidth:R}=w(i,A);i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let z=o(i,{fill:C.get(`fill`)||v,stroke:C.get(`stroke`)||y,strokeWidth:C.get(`stroke-width`)?.replace(`px`,``)||1,seed:_});if(i.look===`handDrawn`){let e=d.svg(E),t=e.rectangle(N,F,j,I,z);if(E.insert(()=>t,`:first-child`).attr(`class`,`boundary-body label-container`),T===`package`){let t=e.rectangle(N,P,R,L,z);E.insert(()=>t,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`)}}else E.insert(`rect`,`:first-child`).attr(`class`,`boundary-body label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,F).attr(`width`,j).attr(`height`,I),T===`package`&&E.insert(`rect`,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,P).attr(`width`,R).attr(`height`,L);let{subGraphTitleTopMargin:B}=h(p);return T===`package`?O.attr(`transform`,`translate(${N+(R-A.width)/2}, ${P+(L-A.height)/2})`):O.attr(`transform`,`translate(${i.x-A.width/2}, ${P+B})`),x&&(O.attr(`style`,x),O.select(`span`).attr(`style`,x)),i.offsetX=0,i.width=j,i.height=M,i.offsetY=A.height-i.padding/2,i.labelBBox=A,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`usecaseSystemBoundary`),swimlane:g},E=new Set([`noteGroup`,`divider`]),D=e(e=>!E.has(e??`rect`),`clusterPaintsTitle`),O=new Map,k=e(async(e,t)=>{let n=await T[t.shape||`rect`](e,t);return O.set(t.id,n),n},`insertCluster`),A=e(()=>{O=new Map},`clear`);export{D as n,k as r,A as t}; \ No newline at end of file diff --git a/web/dist/app-chunk-Z7XXMR3K.js b/web/dist/app-chunk-Z7XXMR3K.js index e9f53839b..0f6a3727e 100644 --- a/web/dist/app-chunk-Z7XXMR3K.js +++ b/web/dist/app-chunk-Z7XXMR3K.js @@ -1,10 +1,10 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{T as r,b as i,x as a}from"./app-chunk-O7XYJQB3.js";import{$ as o,J as s,K as c,Q as l,X as u,Y as d,Z as f,et as p,g as m,nt as h,q as g,rt as _,tt as v,u as y}from"./app-chunk-ZIGJFQKS.js";import{t as b}from"./app-line.js";import{n as x,r as S}from"./app-chunk-MBY4JIJT.js";import{i as C,n as ee}from"./app-chunk-7PRAP22T.js";import{t as te}from"./app-rough.esm.js";import{t as w}from"./app-chunk-7INBJB4K.js";import{n as T}from"./app-chunk-5DYCD2WN.js";var E=e((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`),D={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},O={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function k(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=A(e),t=A(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}}e(k,`calculateDeltaAndAngle`);var A=e(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),ne=e(t=>({x:e(function(e,n,r){let i=0,a=A(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(D,t.arrowTypeEnd)){let{angle:e,deltaX:n}=k(r[r.length-1],r[r.length-2]);i=D[t.arrowTypeEnd]*Math.cos(e)*(n>=0?1:-1)}let o=Math.abs(A(e).x-A(r[r.length-1]).x),s=Math.abs(A(e).y-A(r[r.length-1]).y),c=Math.abs(A(e).x-A(r[0]).x),l=Math.abs(A(e).y-A(r[0]).y),u=D[t.arrowTypeStart],d=D[t.arrowTypeEnd];if(o0&&s0&&l=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(D,t.arrowTypeEnd)){let{angle:e,deltaY:n}=k(r[r.length-1],r[r.length-2]);i=D[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(n>=0?1:-1)}let o=Math.abs(A(e).y-A(r[r.length-1]).y),s=Math.abs(A(e).x-A(r[r.length-1]).x),c=Math.abs(A(e).y-A(r[0]).y),l=Math.abs(A(e).x-A(r[0]).x),u=D[t.arrowTypeStart],d=D[t.arrowTypeEnd];if(o0&&s0&&l{t.arrowTypeStart&&N(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&N(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),j={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},arrow_hierarchy:{type:`hierarchy`,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}},M=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],N=e((e,n,r,i,a,o,s=!1,c)=>{if(!r||r===`none`)return;let l=j[r],u=l&&M.includes(l.type);if(!l){t.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let t=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(t)){let e=document.getElementById(d);if(e){let n=e.cloneNode(!0);n.id=t,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(n)}}e.attr(`marker-${n}`,`url(${i}#${t})`)}else e.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),ie=e(e=>typeof e==`string`?e:a()?.flowchart?.curve,`resolveEdgeCurveType`),P=new Map,F=new Map,I=e(()=>{P.clear(),F.clear()},`clear`),L=e(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),R=e(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),ae=e(async(e,i)=>{let o=a(),s=r(o),{labelStyles:c}=C(i);i.labelStyle=c;let l=e.insert(`g`).attr(`class`,`edgeLabel`),u=l.insert(`g`).attr(`class`,`label`).attr(`data-id`,i.id),d=i.labelType===`markdown`,f=await x(e,i.label,{style:R(i.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:d,width:void 0},o);u.node().appendChild(f),t.info(`abc82`,i,i.labelType);let p,m;if(s){let e=f.children[0],t=n(f);p=await S.measure(()=>e.getBoundingClientRect()),m=p,t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=n(f).select(`text`).node();await S.measure(()=>{p=f.getBBox(),m=e&&typeof e.getBBox==`function`?e.getBBox():p})}u.attr(`transform`,E(m,s)),P.set(i.id,l),i.width=p.width,i.height=p.height;let h;if(i.startLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(r,i.startLabelLeft,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).startLeft=t,z(h,i.startLabelLeft)}if(i.startLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(r,i.startLabelRight,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).startRight=t,z(h,i.startLabelRight)}if(i.endLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(t,i.endLabelLeft,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).endLeft=t,z(h,i.endLabelLeft)}if(i.endLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(t,i.endLabelRight,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).endRight=t,z(h,i.endLabelRight)}return f},`insertEdgeLabel`);function z(e,t){r(a())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}e(z,`setTerminalWidth`);var B=e((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,P.get(e.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,i=a(),{subGraphTitleTotalMargin:o}=T(i);if(e.label){let i=P.get(e.id),a=e.x,s=e.y;if(r){let i=m.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,a,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(a=i.x,s=i.y)}i.attr(`transform`,`translate(${a}, ${s+o/2})`)}if(e.startLabelLeft){let t=F.get(e.id).startLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=F.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=F.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=F.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),oe=e((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`),V=e((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`),H=e((e,n,r)=>{t.debug(`intersection calc abc89: +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{T as r,b as i,x as a}from"./app-chunk-O7XYJQB3.js";import{$ as o,J as s,K as c,Q as l,X as u,Y as d,Z as f,et as p,g as m,nt as h,q as g,rt as _,tt as v,u as y}from"./app-chunk-ZIGJFQKS.js";import{t as b}from"./app-line.js";import{i as x,n as S}from"./app-chunk-7PRAP22T.js";import{n as C,r as w}from"./app-chunk-MBY4JIJT.js";import{t as ee}from"./app-rough.esm.js";import{t as T}from"./app-chunk-7INBJB4K.js";import{n as E}from"./app-chunk-5DYCD2WN.js";var D=e((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`),O={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},k={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function A(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=j(e),t=j(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}}e(A,`calculateDeltaAndAngle`);var j=e(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),te=e(t=>({x:e(function(e,n,r){let i=0,a=j(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(O,t.arrowTypeEnd)){let{angle:e,deltaX:n}=A(r[r.length-1],r[r.length-2]);i=O[t.arrowTypeEnd]*Math.cos(e)*(n>=0?1:-1)}let o=Math.abs(j(e).x-j(r[r.length-1]).x),s=Math.abs(j(e).y-j(r[r.length-1]).y),c=Math.abs(j(e).x-j(r[0]).x),l=Math.abs(j(e).y-j(r[0]).y),u=O[t.arrowTypeStart],d=O[t.arrowTypeEnd];if(o0&&s0&&l=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(O,t.arrowTypeEnd)){let{angle:e,deltaY:n}=A(r[r.length-1],r[r.length-2]);i=O[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(n>=0?1:-1)}let o=Math.abs(j(e).y-j(r[r.length-1]).y),s=Math.abs(j(e).x-j(r[r.length-1]).x),c=Math.abs(j(e).y-j(r[0]).y),l=Math.abs(j(e).x-j(r[0]).x),u=O[t.arrowTypeStart],d=O[t.arrowTypeEnd];if(o0&&s0&&l{t.arrowTypeStart&&P(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&P(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),M={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},arrow_hierarchy:{type:`hierarchy`,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}},N=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],P=e((e,n,r,i,a,o,s=!1,c)=>{if(!r||r===`none`)return;let l=M[r],u=l&&N.includes(l.type);if(!l){t.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let t=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(t)){let e=document.getElementById(d);if(e){let n=e.cloneNode(!0);n.id=t,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(n)}}e.attr(`marker-${n}`,`url(${i}#${t})`)}else e.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),re=e(e=>typeof e==`string`?e:a()?.flowchart?.curve,`resolveEdgeCurveType`),F=new Map,I=new Map,L=e(()=>{F.clear(),I.clear()},`clear`),R=e(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),z=e(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),ie=e(async(e,i)=>{let o=a(),s=r(o),{labelStyles:c}=x(i);i.labelStyle=c;let l=e.insert(`g`).attr(`class`,`edgeLabel`),u=l.insert(`g`).attr(`class`,`label`).attr(`data-id`,i.id),d=i.labelType===`markdown`,f=await C(e,i.label,{style:z(i.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:d,width:void 0},o);u.node().appendChild(f),t.info(`abc82`,i,i.labelType);let p,m;if(s){let e=f.children[0],t=n(f);p=await w.measure(()=>e.getBoundingClientRect()),m=p,t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=n(f).select(`text`).node();await w.measure(()=>{p=f.getBBox(),m=e&&typeof e.getBBox==`function`?e.getBBox():p})}u.attr(`transform`,D(m,s)),F.set(i.id,l),i.width=p.width,i.height=p.height;let h;if(i.startLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await T(r,i.startLabelLeft,z(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,D(o,s)),I.get(i.id)||I.set(i.id,{}),I.get(i.id).startLeft=t,B(h,i.startLabelLeft)}if(i.startLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await T(r,i.startLabelRight,z(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,D(o,s)),I.get(i.id)||I.set(i.id,{}),I.get(i.id).startRight=t,B(h,i.startLabelRight)}if(i.endLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await T(t,i.endLabelLeft,z(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,D(o,s)),I.get(i.id)||I.set(i.id,{}),I.get(i.id).endLeft=t,B(h,i.endLabelLeft)}if(i.endLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await T(t,i.endLabelRight,z(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,D(o,s)),I.get(i.id)||I.set(i.id,{}),I.get(i.id).endRight=t,B(h,i.endLabelRight)}return f},`insertEdgeLabel`);function B(e,t){r(a())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}e(B,`setTerminalWidth`);var V=e((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,F.get(e.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,i=a(),{subGraphTitleTotalMargin:o}=E(i);if(e.label){let i=F.get(e.id),a=e.x,s=e.y;if(r){let i=m.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,a,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(a=i.x,s=i.y)}i.attr(`transform`,`translate(${a}, ${s+o/2})`)}if(e.startLabelLeft){let t=I.get(e.id).startLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=I.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=I.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=I.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),ae=e((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`),H=e((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`),U=e((e,n,r)=>{t.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(n)} insidePoint : ${JSON.stringify(r)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.xMath.abs(i-n.x)*l){let e=r.y{t.warn(`abc88 cutPathAtIntersect`,e,n);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(t.info(`abc88 checking point`,e,n),!V(n,e)&&!a){let o=H(n,i,e);t.debug(`abc88 inside`,e,i,o),t.debug(`abc88 intersection`,o,n);let s=!1;r.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?t.warn(`abc88 no intersect`,o,r):r.push(o),a=!0}else t.warn(`abc88 outside`,e,i),i=e,a||r.push(e)}),t.debug(`returning points`,r),r},`cutPathAtIntersect`);function W(e){let t=[],n=[];for(let r=1;r5&&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}}e(W,`extractCornerPoints`);var G=e(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`),se=e(function(e){let{cornerPointPositions:n}=W(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10?(t.debug(`Corner point fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):t.debug(`Corner point skipping fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),r.push(f,c)}else r.push(e[i]);return r},`fixCorners`),ce=e((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`),K=e(function(e,r,i,x,S,C,w,T=!1){if(!w)throw Error(`insertEdge: missing diagramId for edge "${r.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:E,layout:D}=a(),k=r.points,A=!1,j=S;var M=C;let N=[];for(let e in r.cssCompiledStyles)ee(e)||N.push(r.cssCompiledStyles[e]);if(D===`swimlane`){if(M.intersect&&j.intersect&&Array.isArray(k)&&k.length>=2)if(k.length===2)k=[j.intersect(k[0]),M.intersect(k[1])];else{let e=k.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(k[k.length-1].x-n.x)!Number.isNaN(e.y)),I=ie(r.curve);I!==`rounded`&&(F=se(F));let L=_;switch(I){case`linear`:L=_;break;case`basis`:L=p;break;case`cardinal`:L=o;break;case`bumpX`:L=v;break;case`bumpY`:L=h;break;case`catmullRom`:L=l;break;case`monotoneX`:L=u;break;case`monotoneY`:L=f;break;case`natural`:L=d;break;case`step`:L=s;break;case`stepAfter`:L=c;break;case`stepBefore`:L=g;break;case`rounded`:L=_;break;default:L=p}let{x:R,y:ae}=ne(r),z=b().x(R).y(ae).curve(L),B;switch(r.thickness){case`normal`:B=`edge-thickness-normal`;break;case`thick`:B=`edge-thickness-thick`;break;case`invisible`:B=`edge-thickness-invisible`;break;default:B=`edge-thickness-normal`}switch(r.pattern){case`solid`:B+=` edge-pattern-solid`;break;case`dotted`:B+=` edge-pattern-dotted`;break;case`dashed`:B+=` edge-pattern-dashed`;break;default:B+=` edge-pattern-solid`}let V,H=I===`rounded`?q(Y(F,r),5):z(F),W=Array.isArray(r.style)?r.style:[r.style],G=W.find(e=>e?.startsWith(`stroke:`)),K=``;r.animate&&(K=`edge-animation-fast`),r.animation&&(K=`edge-animation-`+r.animation);let J=!1;if(r.look===`handDrawn`){let t=te.svg(e);Object.assign([],F);let i=t.path(H,{roughness:.3,seed:E});B+=` transition`,V=n(i).select(`path`).attr(`id`,`${w}-${r.id}`).attr(`class`,` `+B+(r.classes?` `+r.classes:``)+(K?` `+K:``)).attr(`style`,W?W.reduce((e,t)=>e+`;`+t,``):``);let a=V.attr(`d`);V.attr(`d`,a),e.node().appendChild(V.node())}else{let t=N.join(`;`),n=W?W.reduce((e,t)=>e+t+`;`,``):``,i=(t?t+`;`+n+`;`:n)+`;`+(W?W.reduce((e,t)=>e+`;`+t,``):``);V=e.append(`path`).attr(`d`,H).attr(`id`,`${w}-${r.id}`).attr(`class`,` `+B+(r.classes?` `+r.classes:``)+(K?` `+K:``)).attr(`style`,i),G=i.match(/stroke:([^;]+)/)?.[1],J=r.animate===!0||!!r.animation||t.includes(`animation`);let a=V.node(),o=typeof a.getTotalLength==`function`?a.getTotalLength():0,s=O[r.arrowTypeStart]||0,c=O[r.arrowTypeEnd]||0;if(r.look===`neo`&&!J){let e=`stroke-dasharray: ${r.pattern===`dotted`||r.pattern===`dashed`?ce(o,s,c):`0 ${s} ${o-s-c} ${c}`}; stroke-dashoffset: 0;`;V.attr(`style`,e+V.attr(`style`))}}V.attr(`data-edge`,!0),V.attr(`data-et`,`edge`),V.attr(`data-id`,r.id),V.attr(`data-points`,P),V.attr(`data-look`,y(r.look)),r.showPoints&&F.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let X=``;(a().flowchart.arrowMarkerAbsolute||a().state.arrowMarkerAbsolute)&&(X=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,X=X.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),t.info(`arrowTypeStart`,r.arrowTypeStart),t.info(`arrowTypeEnd`,r.arrowTypeEnd);let Z=!J&&r?.look===`neo`;re(V,r,X,w,x,Z,G);let Q=Math.floor(k.length/2),le=k[Q];m.isLabelCoordinateInPath(le,V.attr(`d`))||(A=!0);let $={};return A&&($.updatedPath=k),$.originalPath=r.points,$},`insertEdge`);function q(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a({...e}));if(e.length>=2&&D[t.arrowTypeStart]){let r=D[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=J(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&D[t.arrowTypeEnd]){let i=D[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=J(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}e(Y,`applyMarkerOffsetsToPoints`);var X=e((e,t,n,r)=>{t.forEach(t=>{Z[t](e,n,r)})},`insertMarkers`),Z={extension:e((e,n,r)=>{t.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,r+`_`+n+`-extensionStart-margin`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd-margin`).attr(`class`,`marker extension `+n).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:e((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`).attr(`markerUnits`,`userSpaceOnUse`).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`).attr(`markerUnits`,`userSpaceOnUse`).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:e((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`).attr(`markerUnits`,`userSpaceOnUse`).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`).attr(`markerUnits`,`userSpaceOnUse`).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:e((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`).attr(`markerUnits`,`userSpaceOnUse`).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`).attr(`markerUnits`,`userSpaceOnUse`).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:e((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`).attr(`markerUnits`,`userSpaceOnUse`).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`).attr(`markerUnits`,`userSpaceOnUse`).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:e((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:e((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:e((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:e((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:e((e,t,n)=>{let{themeVariables:r}=i(),{transitionColor:a}=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`,`${a}`)},`barbNeo`),hierarchy:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-hierarchyEnd`).attr(`class`,`marker hierarchy `+t).attr(`viewBox`,`0 0 12 10`).attr(`refX`,10).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,10).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`).style(`fill`,`none`),e.append(`marker`).attr(`id`,n+`_`+t+`-hierarchyStart`).attr(`class`,`marker hierarchy `+t).attr(`viewBox`,`0 0 12 10`).attr(`refX`,2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,10).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`).style(`fill`,`none`)},`hierarchy`),only_one:e((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:e((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:e((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:e((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:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=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`,`${a}`),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`,`${a}`)},`only_one_neo`),zero_or_one_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=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`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),s.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${a}`);let c=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`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),c.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${a}`)},`zero_or_one_neo`),one_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=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`,`${a}`),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`,`${a}`)},`one_or_more_neo`),zero_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=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`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),s.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${a}`);let c=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`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),c.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${a}`)},`zero_or_more_neo`),requirement_arrow:e((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,0 + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.xMath.abs(i-n.x)*l){let e=r.y{t.warn(`abc88 cutPathAtIntersect`,e,n);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(t.info(`abc88 checking point`,e,n),!H(n,e)&&!a){let o=U(n,i,e);t.debug(`abc88 inside`,e,i,o),t.debug(`abc88 intersection`,o,n);let s=!1;r.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?t.warn(`abc88 no intersect`,o,r):r.push(o),a=!0}else t.warn(`abc88 outside`,e,i),i=e,a||r.push(e)}),t.debug(`returning points`,r),r},`cutPathAtIntersect`);function G(e){let t=[],n=[];for(let r=1;r5&&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}}e(G,`extractCornerPoints`);var K=e(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`),oe=e(function(e){let{cornerPointPositions:n}=G(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10?(t.debug(`Corner point fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):t.debug(`Corner point skipping fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),r.push(f,c)}else r.push(e[i]);return r},`fixCorners`),se=e((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`),q=e(function(e,r,i,x,C,w,T,E=!1){if(!T)throw Error(`insertEdge: missing diagramId for edge "${r.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:D,layout:O}=a(),A=r.points,j=!1,M=C;var N=w;let P=[];for(let e in r.cssCompiledStyles)S(e)||P.push(r.cssCompiledStyles[e]);if(O===`swimlane`){if(N.intersect&&M.intersect&&Array.isArray(A)&&A.length>=2)if(A.length===2)A=[M.intersect(A[0]),N.intersect(A[1])];else{let e=A.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(A[A.length-1].x-n.x)!Number.isNaN(e.y)),L=re(r.curve);L!==`rounded`&&(I=oe(I));let R=_;switch(L){case`linear`:R=_;break;case`basis`:R=p;break;case`cardinal`:R=o;break;case`bumpX`:R=v;break;case`bumpY`:R=h;break;case`catmullRom`:R=l;break;case`monotoneX`:R=u;break;case`monotoneY`:R=f;break;case`natural`:R=d;break;case`step`:R=s;break;case`stepAfter`:R=c;break;case`stepBefore`:R=g;break;case`rounded`:R=_;break;default:R=p}let{x:z,y:ie}=te(r),B=b().x(z).y(ie).curve(R),V;switch(r.thickness){case`normal`:V=`edge-thickness-normal`;break;case`thick`:V=`edge-thickness-thick`;break;case`invisible`:V=`edge-thickness-invisible`;break;default:V=`edge-thickness-normal`}switch(r.pattern){case`solid`:V+=` edge-pattern-solid`;break;case`dotted`:V+=` edge-pattern-dotted`;break;case`dashed`:V+=` edge-pattern-dashed`;break;default:V+=` edge-pattern-solid`}let H,U=L===`rounded`?J(X(I,r),5):B(I),G=Array.isArray(r.style)?r.style:[r.style],K=G.find(e=>e?.startsWith(`stroke:`)),q=``;r.animate&&(q=`edge-animation-fast`),r.animation&&(q=`edge-animation-`+r.animation);let Y=!1;if(r.look===`handDrawn`){let t=ee.svg(e);Object.assign([],I);let i=t.path(U,{roughness:.3,seed:D});V+=` transition`,H=n(i).select(`path`).attr(`id`,`${T}-${r.id}`).attr(`class`,` `+V+(r.classes?` `+r.classes:``)+(q?` `+q:``)).attr(`style`,G?G.reduce((e,t)=>e+`;`+t,``):``);let a=H.attr(`d`);H.attr(`d`,a),e.node().appendChild(H.node())}else{let t=P.join(`;`),n=G?G.reduce((e,t)=>e+t+`;`,``):``,i=(t?t+`;`+n+`;`:n)+`;`+(G?G.reduce((e,t)=>e+`;`+t,``):``);H=e.append(`path`).attr(`d`,U).attr(`id`,`${T}-${r.id}`).attr(`class`,` `+V+(r.classes?` `+r.classes:``)+(q?` `+q:``)).attr(`style`,i),K=i.match(/stroke:([^;]+)/)?.[1],Y=r.animate===!0||!!r.animation||t.includes(`animation`);let a=H.node(),o=typeof a.getTotalLength==`function`?a.getTotalLength():0,s=k[r.arrowTypeStart]||0,c=k[r.arrowTypeEnd]||0;if(r.look===`neo`&&!Y){let e=`stroke-dasharray: ${r.pattern===`dotted`||r.pattern===`dashed`?se(o,s,c):`0 ${s} ${o-s-c} ${c}`}; stroke-dashoffset: 0;`;H.attr(`style`,e+H.attr(`style`))}}H.attr(`data-edge`,!0),H.attr(`data-et`,`edge`),H.attr(`data-id`,r.id),H.attr(`data-points`,F),H.attr(`data-look`,y(r.look)),r.showPoints&&I.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let Z=``;(a().flowchart.arrowMarkerAbsolute||a().state.arrowMarkerAbsolute)&&(Z=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,Z=Z.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),t.info(`arrowTypeStart`,r.arrowTypeStart),t.info(`arrowTypeEnd`,r.arrowTypeEnd);let Q=!Y&&r?.look===`neo`;ne(H,r,Z,T,x,Q,K);let ce=Math.floor(A.length/2),le=A[ce];m.isLabelCoordinateInPath(le,H.attr(`d`))||(j=!0);let $={};return j&&($.updatedPath=A),$.originalPath=r.points,$},`insertEdge`);function J(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a({...e}));if(e.length>=2&&O[t.arrowTypeStart]){let r=O[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=Y(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&O[t.arrowTypeEnd]){let i=O[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=Y(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}e(X,`applyMarkerOffsetsToPoints`);var Z=e((e,t,n,r)=>{t.forEach(t=>{Q[t](e,n,r)})},`insertMarkers`),Q={extension:e((e,n,r)=>{t.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,r+`_`+n+`-extensionStart-margin`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd-margin`).attr(`class`,`marker extension `+n).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:e((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`).attr(`markerUnits`,`userSpaceOnUse`).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`).attr(`markerUnits`,`userSpaceOnUse`).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:e((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`).attr(`markerUnits`,`userSpaceOnUse`).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`).attr(`markerUnits`,`userSpaceOnUse`).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:e((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`).attr(`markerUnits`,`userSpaceOnUse`).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`).attr(`markerUnits`,`userSpaceOnUse`).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:e((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`).attr(`markerUnits`,`userSpaceOnUse`).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`).attr(`markerUnits`,`userSpaceOnUse`).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:e((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:e((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:e((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:e((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:e((e,t,n)=>{let{themeVariables:r}=i(),{transitionColor:a}=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`,`${a}`)},`barbNeo`),hierarchy:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-hierarchyEnd`).attr(`class`,`marker hierarchy `+t).attr(`viewBox`,`0 0 12 10`).attr(`refX`,10).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,10).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`).style(`fill`,`none`),e.append(`marker`).attr(`id`,n+`_`+t+`-hierarchyStart`).attr(`class`,`marker hierarchy `+t).attr(`viewBox`,`0 0 12 10`).attr(`refX`,2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,10).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`).style(`fill`,`none`)},`hierarchy`),only_one:e((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:e((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:e((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:e((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:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=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`,`${a}`),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`,`${a}`)},`only_one_neo`),zero_or_one_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=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`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),s.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${a}`);let c=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`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),c.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${a}`)},`zero_or_one_neo`),one_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=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`,`${a}`),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`,`${a}`)},`one_or_more_neo`),zero_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=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`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),s.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${a}`);let c=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`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),c.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${a}`)},`zero_or_more_neo`),requirement_arrow:e((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,0 L20,10 M20,10 L0,20`)},`requirement_arrow`),requirement_contains:e((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:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=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`,`${a}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0 L20,10 M20,10 - L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r,o=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`);o.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),o.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),o.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),o.selectAll(`*`).attr(`stroke-width`,`${a}`)},`requirement_contains_neo`)},Q=X;export{ae as a,Q as c,K as i,B as l,P as n,D as o,L as r,O as s,I as t,F as u}; \ No newline at end of file + L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r,o=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`);o.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),o.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),o.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),o.selectAll(`*`).attr(`stroke-width`,`${a}`)},`requirement_contains_neo`)},ce=Z;export{ie as a,ce as c,q as i,V as l,F as n,O as o,R as r,k as s,L as t,I as u}; \ No newline at end of file diff --git a/web/dist/app-classDiagram-v2-NBCMYWYE.js b/web/dist/app-classDiagram-v2-NBCMYWYE.js index 2bdce788e..af4720c61 100644 --- a/web/dist/app-classDiagram-v2-NBCMYWYE.js +++ b/web/dist/app-classDiagram-v2-NBCMYWYE.js @@ -1,9 +1,9 @@ -import{t as e}from"./app-purify.es.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{H as i,M as a,U as o,a as s,q as c,s as l,v as u,w as d,x as f,y as p,z as m}from"./app-chunk-O7XYJQB3.js";import{c as h,g}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{t as _}from"./app-chunk-5VM5RSS4.js";import"./app-chunk-7PRAP22T.js";import{i as v,n as y,o as b,r as x}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import{t as S}from"./app-chunk-GWA4HPMP.js";import{t as C}from"./app-chunk-XXDRQBXY.js";import{t as w}from"./app-chunk-WEXAMYUT.js";import"./app-chunk-UA2S7LBM.js";import{r as T,t as E}from"./app-chunk-GNY47TPC.js";var D=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],F=[1,64],I=[1,8,9,41],ee=[1,77],L=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],R=[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],z=[13,60,86,100,102,103],B=[13,60,73,74,86,100,102,103],te=[13,60,68,69,70,71,72,86,100,102,103],V=[1,103],H=[1,121],U=[1,117],W=[1,113],G=[1,119],K=[1,114],q=[1,115],J=[1,116],Y=[1,118],X=[1,120],ne=[22,50,60,61,82,86,87,88,89,90],re=[1,128],Z=[12,39],ie=[1,8,9,39,41,44,46],Q=[1,8,9,22],ae=[1,153],oe=[1,8,9,61],$=[1,8,9,22,50,60,61,82,86,87,88,89,90],se={trace:t(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:t(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:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:F}),{39:[1,65]},e(I,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:ee,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(L,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),e(L,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},e(R,[2,133]),e(R,[2,134]),e(R,[2,135]),e(R,[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(D,[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:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{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:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:F},e(O,[2,64]),{67:93,73:P,74:F},e(z,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),e(B,[2,84]),e(B,[2,85]),e(B,[2,86]),e(B,[2,87]),e(B,[2,88]),e(te,[2,89]),e(te,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:V},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:H,50:U,59:110,60:W,82:G,84:111,85:112,86:K,87:q,88:J,89:Y,90:X},{60:[1,122]},{13:ee,55:123},e(I,[2,72]),e(I,[2,138]),{22:H,50:U,59:124,60:W,61:[1,125],82:G,84:111,85:112,86:K,87:q,88:J,89:Y,90:X},e(ne,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},e(L,[2,16]),e(L,[2,17]),e(L,[2,18]),{11:127,12:re,39:[2,36]},e(Z,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),e(Z,[2,10]),e(ie,[2,55],{11:131,12:re}),e(D,[2,7]),{9:[1,132]},e(Q,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},e(z,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),e(z,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(I,[2,48],{39:[1,142]}),{41:[1,143]},e(I,[2,50]),{41:[2,61],45:144,51:V},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:ae}),e(oe,[2,107],{85:154,22:H,50:U,60:W,82:G,86:K,87:q,88:J,89:Y,90:X}),e($,[2,109]),e($,[2,111]),e($,[2,112]),e($,[2,113]),e($,[2,114]),e($,[2,115]),e($,[2,116]),e($,[2,117]),e($,[2,118]),e($,[2,119]),e(O,[2,106]),e(I,[2,71]),e(O,[2,73],{61:ae}),{60:[1,155]},e(L,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},e(Z,[2,12]),e(ie,[2,56]),{1:[2,4]},e(Q,[2,69]),e(Q,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},e(z,[2,80]),e(I,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:V},e(I,[2,49]),{41:[2,62]},e(I,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:H,50:U,60:W,82:G,84:169,85:112,86:K,87:q,88:J,89:Y,90:X},e($,[2,110]),e(ne,[2,75]),{14:[1,170]},e(Z,[2,11]),e(Q,[2,70]),e(I,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:V},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(oe,[2,108],{85:154,22:H,50:U,60:W,82:G,86:K,87:q,88:J,89:Y,90:X}),e(ie,[2,8]),e(I,[2,51]),{41:[1,175]},e(I,[2,54]),e(O,[2,104]),e(I,[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:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{t as e}from"./app-purify.es.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{H as i,M as a,U as o,a as s,q as c,s as l,v as u,w as d,x as f,y as p,z as m}from"./app-chunk-O7XYJQB3.js";import{c as h,g}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{i as _,n as v,o as y,r as b}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{r as x,t as S}from"./app-chunk-GNY47TPC.js";import{t as C}from"./app-chunk-5VM5RSS4.js";import{t as w}from"./app-chunk-GWA4HPMP.js";import{t as T}from"./app-chunk-XXDRQBXY.js";import{t as E}from"./app-chunk-WEXAMYUT.js";var D=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],F=[1,64],I=[1,8,9,41],ee=[1,77],L=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],R=[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],z=[13,60,86,100,102,103],B=[13,60,73,74,86,100,102,103],te=[13,60,68,69,70,71,72,86,100,102,103],V=[1,103],H=[1,121],U=[1,117],W=[1,113],G=[1,119],K=[1,114],q=[1,115],J=[1,116],Y=[1,118],X=[1,120],ne=[22,50,60,61,82,86,87,88,89,90],re=[1,128],Z=[12,39],ie=[1,8,9,39,41,44,46],Q=[1,8,9,22],ae=[1,153],oe=[1,8,9,61],$=[1,8,9,22,50,60,61,82,86,87,88,89,90],se={trace:t(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:t(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:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:F}),{39:[1,65]},e(I,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:ee,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(L,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),e(L,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},e(R,[2,133]),e(R,[2,134]),e(R,[2,135]),e(R,[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(D,[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:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{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:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:F},e(O,[2,64]),{67:93,73:P,74:F},e(z,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),e(B,[2,84]),e(B,[2,85]),e(B,[2,86]),e(B,[2,87]),e(B,[2,88]),e(te,[2,89]),e(te,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:V},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:H,50:U,59:110,60:W,82:G,84:111,85:112,86:K,87:q,88:J,89:Y,90:X},{60:[1,122]},{13:ee,55:123},e(I,[2,72]),e(I,[2,138]),{22:H,50:U,59:124,60:W,61:[1,125],82:G,84:111,85:112,86:K,87:q,88:J,89:Y,90:X},e(ne,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},e(L,[2,16]),e(L,[2,17]),e(L,[2,18]),{11:127,12:re,39:[2,36]},e(Z,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),e(Z,[2,10]),e(ie,[2,55],{11:131,12:re}),e(D,[2,7]),{9:[1,132]},e(Q,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},e(z,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),e(z,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(I,[2,48],{39:[1,142]}),{41:[1,143]},e(I,[2,50]),{41:[2,61],45:144,51:V},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:ae}),e(oe,[2,107],{85:154,22:H,50:U,60:W,82:G,86:K,87:q,88:J,89:Y,90:X}),e($,[2,109]),e($,[2,111]),e($,[2,112]),e($,[2,113]),e($,[2,114]),e($,[2,115]),e($,[2,116]),e($,[2,117]),e($,[2,118]),e($,[2,119]),e(O,[2,106]),e(I,[2,71]),e(O,[2,73],{61:ae}),{60:[1,155]},e(L,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},e(Z,[2,12]),e(ie,[2,56]),{1:[2,4]},e(Q,[2,69]),e(Q,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},e(z,[2,80]),e(I,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:V},e(I,[2,49]),{41:[2,62]},e(I,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:H,50:U,60:W,82:G,84:169,85:112,86:K,87:q,88:J,89:Y,90:X},e($,[2,110]),e(ne,[2,75]),{14:[1,170]},e(Z,[2,11]),e(Q,[2,70]),e(I,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:V},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(oe,[2,108],{85:154,22:H,50:U,60:W,82:G,86:K,87:q,88:J,89:Y,90:X}),e(ie,[2,8]),e(I,[2,51]),{41:[1,175]},e(I,[2,54]),e(O,[2,104]),e(I,[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:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};se.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(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:t(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:t(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:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(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:t(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:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:t(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:t(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;at[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. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(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 ce(){this.yy={}}return t(ce,`Parser`),ce.prototype=se,se.Parser=ce,new ce})();D.parser=D;var O=D,k=[`#`,`+`,`~`,`-`,``],A=class{static{t(this,`ClassMember`)}constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=m(e,f());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+a(this.id);this.memberType===`method`&&(e+=`(${a(this.parameters.trim())})`,this.returnType&&(e+=` : `+a(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(k.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);k.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:``}${a(this.id)}${this.memberType===`method`?`(${a(this.parameters)})${this.returnType?` : `+a(this.returnType):``}`:``}`;this.text=n.replaceAll(`<`,`<`).replaceAll(`>`,`>`),this.text.startsWith(`\\<`)&&(this.text=this.text.replace(`\\<`,`~`))}parseClassifier(){switch(this.classifier){case`*`:return`font-style:italic;`;case`$`:return`text-decoration:underline;`;default:return``}}},j=`classId-`,M=0,N=t(e=>l.sanitizeText(e,f()),`sanitizeText`),P=class a{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=t(t=>{let n=S();r(t).select(`svg`).selectAll(`g`).filter(function(){return r(this).attr(`title`)!==null}).on(`mouseover`,t=>{let i=r(t.currentTarget),a=i.attr(`title`);if(!a)return;let o=t.currentTarget.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.html(e.sanitize(a)).style(`left`,`${window.scrollX+o.left+o.width/2}px`).style(`top`,`${window.scrollY+o.bottom+4}px`),i.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),r(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=o,this.getAccTitle=p,this.setAccDescription=i,this.getAccDescription=u,this.setDiagramTitle=c,this.getDiagramTitle=d,this.getConfig=t(()=>f().class,`getConfig`),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{t(this,`ClassDB`)}splitClassNameAndType(e){let t=l.sanitizeText(e,f()),n=``,r=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);r=N(e[0]),n=N(e[1])}return{className:r,type:n}}setClassLabel(e,t){let n=l.sanitizeText(e,f());t&&=N(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=l.sanitizeText(e,f()),{className:n,type:r}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let i=l.sanitizeText(n,f());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`<${r}>`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:j+i+`-`+M}),M++}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=l.sanitizeText(e,f());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`,s()}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){n.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=l.sanitizeText(e.relationTitle1.trim(),f()),e.relationTitle2=l.sanitizeText(e.relationTitle2.trim(),f()),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(N(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new A(e,`method`)):e&&r.members.push(new A(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)),N(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=j+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=N(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=f();e.split(`,`).forEach(e=>{let i=e;/\d/.exec(e[0])&&(i=j+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.link=g.formatUrl(t,r),a.linkTarget=r.securityLevel===`sandbox`?`_top`:typeof n==`string`?N(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=l.sanitizeText(e,f());if(f().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{let n=this.lookUpDomId(i),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{g.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}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;e0?i[e-1]:void 0,o=e===i.length-1,s=o&&t?t:r[e];this.namespaces.has(n)?o&&(this.namespaces.get(n).explicit=!0):this.namespaces.set(n,this.createNamespaceNode(n,s,a,o)),a&&this.linkParentChild(a,n)}return n}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=f(),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)}let i=0;for(let t of this.classes.values()){let a=r?t.parent:this.resolveExplicitAncestor(t.parent),o={...t,type:void 0,isGroup:!1,parentId:a,look:n.look,colorIndex:i++};e.push(o)}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 a=0;for(let e of this.relations){a++;let r={id:h(e.id1,e.id2,{prefix:`id`,counter:a}),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()}}},F=t(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!v(t,r))return``;let i=b(e.look),a=x(n),o=``;for(let t=0;t0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(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 ce(){this.yy={}}return t(ce,`Parser`),ce.prototype=se,se.Parser=ce,new ce})();D.parser=D;var O=D,k=[`#`,`+`,`~`,`-`,``],A=class{static{t(this,`ClassMember`)}constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=m(e,f());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+a(this.id);this.memberType===`method`&&(e+=`(${a(this.parameters.trim())})`,this.returnType&&(e+=` : `+a(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(k.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);k.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:``}${a(this.id)}${this.memberType===`method`?`(${a(this.parameters)})${this.returnType?` : `+a(this.returnType):``}`:``}`;this.text=n.replaceAll(`<`,`<`).replaceAll(`>`,`>`),this.text.startsWith(`\\<`)&&(this.text=this.text.replace(`\\<`,`~`))}parseClassifier(){switch(this.classifier){case`*`:return`font-style:italic;`;case`$`:return`text-decoration:underline;`;default:return``}}},j=`classId-`,M=0,N=t(e=>l.sanitizeText(e,f()),`sanitizeText`),P=class a{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=t(t=>{let n=w();r(t).select(`svg`).selectAll(`g`).filter(function(){return r(this).attr(`title`)!==null}).on(`mouseover`,t=>{let i=r(t.currentTarget),a=i.attr(`title`);if(!a)return;let o=t.currentTarget.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.html(e.sanitize(a)).style(`left`,`${window.scrollX+o.left+o.width/2}px`).style(`top`,`${window.scrollY+o.bottom+4}px`),i.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),r(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=o,this.getAccTitle=p,this.setAccDescription=i,this.getAccDescription=u,this.setDiagramTitle=c,this.getDiagramTitle=d,this.getConfig=t(()=>f().class,`getConfig`),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{t(this,`ClassDB`)}splitClassNameAndType(e){let t=l.sanitizeText(e,f()),n=``,r=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);r=N(e[0]),n=N(e[1])}return{className:r,type:n}}setClassLabel(e,t){let n=l.sanitizeText(e,f());t&&=N(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=l.sanitizeText(e,f()),{className:n,type:r}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let i=l.sanitizeText(n,f());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`<${r}>`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:j+i+`-`+M}),M++}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=l.sanitizeText(e,f());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`,s()}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){n.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=l.sanitizeText(e.relationTitle1.trim(),f()),e.relationTitle2=l.sanitizeText(e.relationTitle2.trim(),f()),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(N(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new A(e,`method`)):e&&r.members.push(new A(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)),N(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=j+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=N(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=f();e.split(`,`).forEach(e=>{let i=e;/\d/.exec(e[0])&&(i=j+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.link=g.formatUrl(t,r),a.linkTarget=r.securityLevel===`sandbox`?`_top`:typeof n==`string`?N(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=l.sanitizeText(e,f());if(f().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{let n=this.lookUpDomId(i),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{g.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}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;e0?i[e-1]:void 0,o=e===i.length-1,s=o&&t?t:r[e];this.namespaces.has(n)?o&&(this.namespaces.get(n).explicit=!0):this.namespaces.set(n,this.createNamespaceNode(n,s,a,o)),a&&this.linkParentChild(a,n)}return n}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=f(),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)}let i=0;for(let t of this.classes.values()){let a=r?t.parent:this.resolveExplicitAncestor(t.parent),o={...t,type:void 0,isGroup:!1,parentId:a,look:n.look,colorIndex:i++};e.push(o)}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 a=0;for(let e of this.relations){a++;let r={id:h(e.id1,e.id2,{prefix:`id`,counter:a}),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()}}},F=t(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!_(t,r))return``;let i=y(e.look),a=b(n),o=``;for(let t=0;t{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`)},styles:t(e=>`${F(e)} + `}return o},`genColor`),I={parser:O,get db(){return new P},renderer:{getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing class diagram (v3)`,t);let{securityLevel:a,state:o,layout:s}=f();i.db.setDiagramId(t);let c=i.db.getData(),l=T(t,a);c.type=i.type,c.layoutAlgorithm=S(s),c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`],c.diagramId=t,await x(c,l),g.insertTitle(l,`classDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),E(l,8,`classDiagram`,o?.useMaxWidth??!0)},`draw`),getDir:t((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`)},styles:t(e=>`${F(e)} g.classGroup text { fill: ${e.nodeBorder||e.classText}; stroke: none; @@ -213,5 +213,5 @@ g.classGroup line { } text-align: center; } - ${_()} + ${C()} `,`getStyles`),init:t(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{I as diagram}; \ No newline at end of file diff --git a/web/dist/app-dagre-6A5THRUB.js b/web/dist/app-dagre-6A5THRUB.js index fa3547919..ce1d1c98a 100644 --- a/web/dist/app-dagre-6A5THRUB.js +++ b/web/dist/app-dagre-6A5THRUB.js @@ -1,4 +1,4 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import{x as n}from"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import{c as r}from"./app-chunk-7INBJB4K.js";import{a as i,i as a,n as o}from"./app-chunk-5DYCD2WN.js";import{a as s,i as c,l}from"./app-chunk-Z7XXMR3K.js";import{$ as u,A as d,B as f,C as p,D as m,E as h,F as g,G as ee,H as _,I as te,J as ne,K as re,L as ie,M as ae,N as oe,O as se,P as v,Q as y,R as ce,S as le,T as ue,U as de,V as fe,W as pe,X as me,Y as he,Z as b,_ as x,a as S,b as ge,c as _e,d as ve,et as ye,f as C,g as be,h as xe,i as w,it as Se,j as Ce,k as we,l as Te,m as Ee,n as T,nt as De,o as E,p as Oe,q as ke,r as D,rt as Ae,s as je,t as O,tt as k,u as Me,v as Ne,w as Pe,x as Fe,y as Ie,z as A}from"./app-graphlib.js";import{r as Le}from"./app-chunk-UA2S7LBM.js";import{c as Re,i as ze,n as j,o as Be,r as Ve,s as He,t as Ue}from"./app-chunk-3FUC2YCW.js";var We=/\s/;function Ge(e){for(var t=e.length;t--&&We.test(e.charAt(t)););return t}var Ke=/^\s+/;function qe(e){return e&&e.slice(0,Ge(e)+1).replace(Ke,``)}var Je=NaN,Ye=/^[-+]0x[0-9a-f]+$/i,Xe=/^0b[01]+$/i,Ze=/^0o[0-7]+$/i,Qe=parseInt;function $e(e){if(typeof e==`number`)return e;if(ye(e))return Je;if(b(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=b(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=qe(e);var n=Xe.test(e);return n||Ze.test(e)?Qe(e.slice(2),n?2:8):Ye.test(e)?Je:+e}var et=1/0,tt=17976931348623157e292;function M(e){return e?(e=$e(e),e===et||e===-et?(e<0?-1:1)*tt:e===e?e:0):e===0?e:0}function nt(e){var t=M(e),n=t%1;return t===t?n?t-n:t:0}var rt=Object.create,it=function(){function e(){}return function(t){if(!b(t))return{};if(rt)return rt(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function at(e,t){var n=-1,r=e.length;for(t||=Array(r);++n1?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&&I(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r2?t[2]:void 0;for(i&&I(t[0],t[1],i)&&(r=1);++n-1?i[a?t[o]:o]:void 0}}var sr=Math.max;function cr(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:nt(n);return i<0&&(i=sr(r+i,0)),pe(e,C(t,3),i)}var lr=or(cr);function ur(e,t){var n=-1,r=A(e)?Array(e.length):[];return Te(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function H(e,t){return(y(e)?u:ur)(e,C(t,3))}function dr(e,t){return e==null?e:ve(e,je(t),L)}function fr(e,t){return e&&Me(e,je(t))}function pr(e,t){return e>t}var mr=Object.prototype.hasOwnProperty;function hr(e,t){return e!=null&&mr.call(e,t)}function gr(e,t){return e!=null&&xe(e,t,hr)}var _r=`[object String]`;function vr(e){return typeof e==`string`||!y(e)&&k(e)&&De(e)==_r}function yr(e,t){return et||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Or(e,t,n){t=t.length?u(t,function(e){return y(e)?function(t){return ue(t,e.length===1?e[0]:e)}:e}):[me];var r=-1;return t=u(t,g(C)),Tr(ur(e,function(e,n,i){return{criteria:u(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Dr(e,t,n)})}var kr=Oe(`length`),Ar=`\\ud800-\\udfff`,jr=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Mr=`\\ufe0e\\ufe0f`,Nr=`[`+Ar+`]`,Pr=`[`+jr+`]`,Fr=`\\ud83c[\\udffb-\\udfff]`,Ir=`(?:`+Pr+`|`+Fr+`)`,Lr=`[^`+Ar+`]`,Rr=`(?:\\ud83c[\\udde6-\\uddff]){2}`,zr=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Br=`\\u200d`,Vr=Ir+`?`,Hr=`[`+Mr+`]?`,Ur=`(?:`+Br+`(?:`+[Lr,Rr,zr].join(`|`)+`)`+Hr+Vr+`)*`,Wr=Hr+Vr+Ur,Gr=`(?:`+[Lr+Pr+`?`,Pr,Rr,zr,Nr].join(`|`)+`)`,Kr=RegExp(Fr+`(?=`+Fr+`)|`+Gr+Wr,`g`);function qr(e){for(var t=Kr.lastIndex=0;Kr.test(e);)++t;return t}function Jr(e){return xt(e)?qr(e):kr(e)}function Yr(e,t){return wr(e,t,function(t,n){return Ee(e,n)})}var K=dt(function(e,t){return e==null?{}:Yr(e,t)}),Xr=Math.ceil,Zr=Math.max;function Qr(e,t,n,r){for(var i=-1,a=Zr(Xr((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function $r(e){return function(t,n,r){return r&&typeof r!=`number`&&I(t,n,r)&&(n=r=void 0),t=M(t),n===void 0?(n=t,t=0):n=M(n),r=r===void 0?t1&&I(e,t[0],t[1])?t=[]:n>2&&I(t[0],t[1],t[2])&&(t=[t[0]]),Or(e,p(t,1),[])}),ri=0;function ii(e){var t=++ri;return se(e)+t}function ai(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r0;--s)if(o=t[s].dequeue(),o){r=r.concat(pi(e,t,n,o,!0));break}}}return r}function pi(e,t,n,r,i){var a=i?[]:void 0;return E(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,hi(t,n,s)}),E(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,hi(t,n,o)}),e.removeNode(r.v),a}function mi(e,t){var n=new O,r=0,i=0;E(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),E(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=q(i+r+3).map(function(){return new si}),o=r+1;return E(n.nodes(),function(e){hi(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function hi(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)}function gi(e){var t=e.graph().acyclicer===`greedy`?di(e,n(e)):_i(e);E(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,ii(`rev`))});function n(e){return function(t){return e.edge(t).weight}}}function _i(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,E(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return E(e.nodes(),i),t}function vi(e){E(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)}})}function Y(e,t,n,r){var i;do i=ii(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function yi(e){var t=new O().setGraph(e.graph());return E(e.nodes(),function(n){t.setNode(n,e.node(n))}),E(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 bi(e){var t=new O({multigraph:e.isMultigraph()}).setGraph(e.graph());return E(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),E(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function xi(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 c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function X(e){var t=H(q(Ti(e)+1),function(){return[]});return E(e.nodes(),function(n){var r=e.node(n),i=r.rank;D(i)||(t[i][r.order]=n)}),t}function Si(e){var t=G(H(e.nodes(),function(t){return e.node(t).rank}));E(e.nodes(),function(n){var r=e.node(n);gr(r,`rank`)&&(r.rank-=t)})}function Ci(e){var t=G(H(e.nodes(),function(t){return e.node(t).rank})),n=[];E(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;E(n,function(t,n){D(t)&&n%i!==0?--r:r&&E(t,function(t){e.node(t).rank+=r})})}function wi(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),Y(e,`border`,i,t)}function Ti(e){return W(H(e.nodes(),function(t){var n=e.node(t).rank;if(!D(n))return n}))}function Ei(e,t){var n={lhs:[],rhs:[]};return E(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function Di(e,t){var n=Zn();try{return t()}finally{console.log(e+` time: `+(Zn()-n)+`ms`)}}function Oi(e,t){return t()}function ki(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&E(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,c=!0),Sr(S(t.edges(),function(t){return c===ca(e,e.node(t.v),s)&&c!==ca(e,e.node(t.w),s)}),function(e){return Z(t,e)})}function aa(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),ta(e),Qi(e,t),oa(e,t)}function oa(e,t){var n=Zi(e,lr(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),E(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 sa(e,t,n){return e.hasEdge(t,n)}function ca(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function la(e){switch(e.graph().ranker){case`network-simplex`:fa(e);break;case`tight-tree`:da(e);break;case`longest-path`:ua(e);break;default:fa(e)}}var ua=Hi;function da(e){Hi(e),Ui(e)}function fa(e){$(e)}function pa(e){var t=Y(e,`root`,{},`_root`),n=ha(e),r=W(w(n))-1,i=2*r+1;e.graph().nestingRoot=t,E(e.edges(),function(t){e.edge(t).minlen*=i});var a=ga(e)+1;E(e.children(),function(o){ma(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function ma(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 c=wi(e,`_bt`),l=wi(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,E(s,function(s){ma(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function ha(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&E(a,function(e){n(e,i+1)}),t[r]=i}return E(e.children(),function(e){n(e,1)}),t}function ga(e){return T(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function _a(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,E(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function va(e,t,n){var r={},i;E(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}})}function ya(e,t,n){var r=ba(e),i=new O({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return E(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),E(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=D(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 ba(e){for(var t;e.hasNode(t=ii(`_root`)););return t}function xa(e,t){for(var n=0,r=1;r0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n})),c}function Ca(e){var t={},n=S(e.nodes(),function(t){return!e.children(t).length}),r=H(q(W(H(n,function(t){return e.node(t).rank}))+1),function(){return[]});function i(n){gr(t,n)||(t[n]=!0,r[e.node(n).rank].push(n),E(e.successors(n),i))}var a=J(n,function(t){return e.node(t).rank});return E(a,i),r}function wa(e,t){return H(t,function(t){var n=e.inEdges(t);if(n.length){var r=T(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}})}function Ta(e,t){var n={};return E(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};D(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),E(t.edges(),function(e){var t=n[e.v],r=n[e.w];!D(t)&&!D(r)&&(r.indegree++,t.out.push(n[e.w]))}),Ea(S(n,function(e){return!e.indegree}))}function Ea(e){var t=[];function n(e){return function(t){t.merged||(D(t.barycenter)||D(e.barycenter)||t.barycenter>=e.barycenter)&&Da(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),E(i.in.reverse(),n(i)),E(i.out,r(i))}return H(S(t,function(e){return!e.merged}),function(e){return K(e,[`vs`,`i`,`barycenter`,`weight`])})}function Da(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}function Oa(e,t){var n=Ei(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=J(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,c=0;r.sort(Aa(!!t)),c=ka(a,i,c),E(r,function(e){c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=ka(a,i,c)});var l={vs:R(a)};return s&&(l.barycenter=o/s,l.weight=s),l}function ka(e,t,n){for(var r;t.length&&(r=V(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Aa(e){return function(t,n){return t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}}function ja(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,c={};o&&(i=S(i,function(e){return e!==o&&e!==s}));var l=wa(e,i);E(l,function(t){if(e.children(t.v).length){var i=ja(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&Na(t,i)}});var u=Ta(l,n);Ma(u,c);var d=Oa(u,r);if(o&&(d.vs=R([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function Ma(e,t){E(e,function(e){e.vs=R(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function Na(e,t){D(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)}function Pa(e){var t=Ti(e),n=Fa(e,q(1,t+1),`inEdges`),r=Fa(e,q(t-1,-1,-1),`outEdges`),i=Ca(e);La(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){Ia(s%2?n:r,s%4>=2),i=X(e);var l=xa(e,i);lo||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Ba(e){var t={},n=0;function r(i){var a=n;E(e.children(i),r),t[i]={low:a,lim:n++}}return E(e.children(),r),t}function Va(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=V(r);return E(r,function(t,c){var l=Ua(e,t),u=l?e.node(l).order:o;(l||t===s)&&(E(r.slice(a,c+1),function(t){E(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(oo)&&Wa(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return E(n,function(s,c){if(e.node(s).dummy===`border`){var l=e.predecessors(s);l.length&&(a=e.node(l[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return T(t,i),n}function Ua(e,t){if(e.node(t).dummy)return lr(e.predecessors(t),function(t){return e.node(t).dummy})}function Wa(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 Ga(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Ka(e,t,n,r){var i={},a={},o={};return E(t,function(e){E(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),E(t,function(e){var t=-1;E(e,function(e){var s=r(e);if(s.length){s=J(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=s[l];a[e]===e&&t{var t=n(` buildLayoutGraph`,()=>ho(e));n(` runLayout`,()=>io(t,n)),n(` updateInputGraph`,()=>ao(e,t))})}function io(e,t){t(` makeSpaceForEdgeLabels`,()=>go(e)),t(` removeSelfEdges`,()=>To(e)),t(` acyclic`,()=>gi(e)),t(` nestingGraph.run`,()=>pa(e)),t(` rank`,()=>la(bi(e))),t(` injectEdgeLabelProxies`,()=>_o(e)),t(` removeEmptyRanks`,()=>Ci(e)),t(` nestingGraph.cleanup`,()=>_a(e)),t(` normalizeRanks`,()=>Si(e)),t(` assignRankMinMax`,()=>vo(e)),t(` removeEdgeLabelProxies`,()=>yo(e)),t(` normalize.run`,()=>zi(e)),t(` parentDummyChains`,()=>Ra(e)),t(` addBorderSegments`,()=>ki(e)),t(` order`,()=>Pa(e)),t(` insertSelfEdges`,()=>Eo(e)),t(` adjustCoordinateSystem`,()=>ji(e)),t(` position`,()=>to(e)),t(` positionSelfEdges`,()=>Do(e)),t(` removeBorderNodes`,()=>wo(e)),t(` normalize.undo`,()=>Vi(e)),t(` fixupEdgeLabelCoords`,()=>So(e)),t(` undoCoordinateSystem`,()=>Mi(e)),t(` translateGraph`,()=>bo(e)),t(` assignNodeIntersects`,()=>xo(e)),t(` reversePoints`,()=>Co(e)),t(` acyclic.undo`,()=>vi(e))}function ao(e,t){E(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))}),E(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}var oo=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],so={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},co=[`acyclicer`,`ranker`,`rankdir`,`align`],lo=[`width`,`height`],uo={width:0,height:0},fo=[`minlen`,`weight`,`width`,`height`,`labeloffset`],po={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},mo=[`labelpos`];function ho(e){var t=new O({multigraph:!0,compound:!0}),n=ko(e.graph());return t.setGraph(xr({},so,Oo(n,oo),K(n,co))),E(e.nodes(),function(n){var r=ko(e.node(n));t.setNode(n,er(Oo(r,lo),uo)),t.setParent(n,e.parent(n))}),E(e.edges(),function(n){var r=ko(e.edge(n));t.setEdge(n,xr({},po,Oo(r,fo),K(r,mo)))}),t}function go(e){var t=e.graph();t.ranksep/=2,E(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 _o(e){E(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);Y(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function vo(e){var t=0;E(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=W(t,r.maxRank))}),e.graph().maxRank=t}function yo(e){E(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function bo(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){var a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}E(e.nodes(),function(t){c(e.node(t))}),E(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&c(n)}),t-=o,r-=s,E(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),E(e.edges(),function(n){var i=e.edge(n);E(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 xo(e){E(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(xi(r,a)),n.points.push(xi(i,o))})}function So(e){E(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 Co(e){E(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function wo(e){E(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(V(n.borderLeft)),o=e.node(V(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}}),E(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function To(e){E(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 Eo(e){var t=X(e);E(t,function(t){var n=0;E(t,function(t,r){var i=e.node(t);i.order=r+n,E(i.selfEdges,function(t){Y(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 Do(e){E(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 Oo(e,t){return U(K(e,t),Number)}function ko(e){var t={};return E(e,function(e,n){t[n.toLowerCase()]=e}),t}var Ao=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),jo=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),Mo=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),No=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],Po=e((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 jo(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}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:jo(i)},`getSelfLoopSide`),Fo=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=Ao(Math.max(r,e.width*.35),36,c),u=Ao(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),Io=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/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))-c/2-4}}},`getSelfLoopLabelPosition`),Lo=e((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,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=Po(e,l,n,c.start,a),f=Fo(l,d,t,u.width??0),p=Io(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.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 m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),Ro=e(async({element:n,graph:a,diagramType:c,id:l,parentCluster:u,siteConfig:d})=>{let f=a.graph().rankdir;t.trace(`Dir in recursive render - dir:`,f);let{clusters:p,edgePaths:m,edgeLabels:h,nodes:g,rootGroups:ee}=ze(n,{edgePathsClass:`edgePaths`});a.nodes()?t.info(`Recursive render XXX`,a.nodes()):t.info(`No nodes found for`,a),a.edges().length>0&&t.info(`Recursive edges`,a.edge(a.edges()[0]));let _=Mo(c);await Promise.all(a.nodes().map(async function(e){let n=a.node(e);if(u!==void 0){let n=JSON.parse(JSON.stringify(u.clusterData));t.trace(`Setting data for parent cluster XXX +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import{x as n}from"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{c as r}from"./app-chunk-7INBJB4K.js";import{a as i,i as a,n as o}from"./app-chunk-5DYCD2WN.js";import{r as s}from"./app-chunk-UA2S7LBM.js";import{a as c,i as l,l as u}from"./app-chunk-Z7XXMR3K.js";import{$ as d,A as f,B as p,C as m,D as h,E as g,F as _,G as ee,H as v,I as te,J as ne,K as re,L as ie,M as ae,N as oe,O as se,P as y,Q as b,R as ce,S as le,T as ue,U as de,V as fe,W as pe,X as me,Y as he,Z as x,_ as S,a as C,b as ge,c as _e,d as ve,et as w,f as T,g as ye,h as be,i as E,it as xe,j as Se,k as Ce,l as we,m as Te,n as D,nt as Ee,o as O,p as De,q as Oe,r as k,rt as ke,s as Ae,t as A,tt as j,u as je,v as Me,w as Ne,x as Pe,y as Fe,z as M}from"./app-graphlib.js";import{c as Ie,i as Le,n as N,o as Re,r as ze,s as Be,t as Ve}from"./app-chunk-3FUC2YCW.js";var He=/\s/;function Ue(e){for(var t=e.length;t--&&He.test(e.charAt(t)););return t}var We=/^\s+/;function Ge(e){return e&&e.slice(0,Ue(e)+1).replace(We,``)}var Ke=NaN,qe=/^[-+]0x[0-9a-f]+$/i,Je=/^0b[01]+$/i,Ye=/^0o[0-7]+$/i,Xe=parseInt;function Ze(e){if(typeof e==`number`)return e;if(w(e))return Ke;if(x(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=x(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Ge(e);var n=Je.test(e);return n||Ye.test(e)?Xe(e.slice(2),n?2:8):qe.test(e)?Ke:+e}var Qe=1/0,$e=17976931348623157e292;function P(e){return e?(e=Ze(e),e===Qe||e===-Qe?(e<0?-1:1)*$e:e===e?e:0):e===0?e:0}function et(e){var t=P(e),n=t%1;return t===t?n?t-n:t:0}var tt=Object.create,nt=function(){function e(){}return function(t){if(!x(t))return{};if(tt)return tt(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function rt(e,t){var n=-1,r=e.length;for(t||=Array(r);++n1?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&&L(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r2?t[2]:void 0;for(i&&L(t[0],t[1],i)&&(r=1);++n-1?i[a?t[o]:o]:void 0}}var or=Math.max;function sr(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:et(n);return i<0&&(i=or(r+i,0)),pe(e,T(t,3),i)}var cr=ar(sr);function lr(e,t){var n=-1,r=M(e)?Array(e.length):[];return we(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function U(e,t){return(b(e)?d:lr)(e,T(t,3))}function ur(e,t){return e==null?e:ve(e,Ae(t),R)}function dr(e,t){return e&&je(e,Ae(t))}function fr(e,t){return e>t}var pr=Object.prototype.hasOwnProperty;function mr(e,t){return e!=null&&pr.call(e,t)}function hr(e,t){return e!=null&&be(e,t,mr)}var gr=`[object String]`;function _r(e){return typeof e==`string`||!b(e)&&j(e)&&Ee(e)==gr}function vr(e,t){return et||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Dr(e,t,n){t=t.length?d(t,function(e){return b(e)?function(t){return ue(t,e.length===1?e[0]:e)}:e}):[me];var r=-1;return t=d(t,_(T)),wr(lr(e,function(e,n,i){return{criteria:d(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Er(e,t,n)})}var Or=De(`length`),kr=`\\ud800-\\udfff`,Ar=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,jr=`\\ufe0e\\ufe0f`,Mr=`[`+kr+`]`,Nr=`[`+Ar+`]`,Pr=`\\ud83c[\\udffb-\\udfff]`,Fr=`(?:`+Nr+`|`+Pr+`)`,Ir=`[^`+kr+`]`,Lr=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Rr=`[\\ud800-\\udbff][\\udc00-\\udfff]`,zr=`\\u200d`,Br=Fr+`?`,Vr=`[`+jr+`]?`,Hr=`(?:`+zr+`(?:`+[Ir,Lr,Rr].join(`|`)+`)`+Vr+Br+`)*`,Ur=Vr+Br+Hr,Wr=`(?:`+[Ir+Nr+`?`,Nr,Lr,Rr,Mr].join(`|`)+`)`,Gr=RegExp(Pr+`(?=`+Pr+`)|`+Wr+Ur,`g`);function Kr(e){for(var t=Gr.lastIndex=0;Gr.test(e);)++t;return t}function qr(e){return bt(e)?Kr(e):Or(e)}function Jr(e,t){return Cr(e,t,function(t,n){return Te(e,n)})}var q=ut(function(e,t){return e==null?{}:Jr(e,t)}),Yr=Math.ceil,Xr=Math.max;function Zr(e,t,n,r){for(var i=-1,a=Xr(Yr((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function Qr(e){return function(t,n,r){return r&&typeof r!=`number`&&L(t,n,r)&&(n=r=void 0),t=P(t),n===void 0?(n=t,t=0):n=P(n),r=r===void 0?t1&&L(e,t[0],t[1])?t=[]:n>2&&L(t[0],t[1],t[2])&&(t=[t[0]]),Dr(e,m(t,1),[])}),ni=0;function ri(e){var t=++ni;return se(e)+t}function ii(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r0;--s)if(o=t[s].dequeue(),o){r=r.concat(fi(e,t,n,o,!0));break}}}return r}function fi(e,t,n,r,i){var a=i?[]:void 0;return O(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,mi(t,n,s)}),O(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,mi(t,n,o)}),e.removeNode(r.v),a}function pi(e,t){var n=new A,r=0,i=0;O(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),O(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=J(i+r+3).map(function(){return new oi}),o=r+1;return O(n.nodes(),function(e){mi(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function mi(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)}function hi(e){var t=e.graph().acyclicer===`greedy`?ui(e,n(e)):gi(e);O(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,ri(`rev`))});function n(e){return function(t){return e.edge(t).weight}}}function gi(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,O(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return O(e.nodes(),i),t}function _i(e){O(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)}})}function X(e,t,n,r){var i;do i=ri(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function vi(e){var t=new A().setGraph(e.graph());return O(e.nodes(),function(n){t.setNode(n,e.node(n))}),O(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 yi(e){var t=new A({multigraph:e.isMultigraph()}).setGraph(e.graph());return O(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),O(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function bi(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 c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function Z(e){var t=U(J(wi(e)+1),function(){return[]});return O(e.nodes(),function(n){var r=e.node(n),i=r.rank;k(i)||(t[i][r.order]=n)}),t}function xi(e){var t=K(U(e.nodes(),function(t){return e.node(t).rank}));O(e.nodes(),function(n){var r=e.node(n);hr(r,`rank`)&&(r.rank-=t)})}function Si(e){var t=K(U(e.nodes(),function(t){return e.node(t).rank})),n=[];O(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;O(n,function(t,n){k(t)&&n%i!==0?--r:r&&O(t,function(t){e.node(t).rank+=r})})}function Ci(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),X(e,`border`,i,t)}function wi(e){return G(U(e.nodes(),function(t){var n=e.node(t).rank;if(!k(n))return n}))}function Ti(e,t){var n={lhs:[],rhs:[]};return O(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function Ei(e,t){var n=Xn();try{return t()}finally{console.log(e+` time: `+(Xn()-n)+`ms`)}}function Di(e,t){return t()}function Oi(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&O(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,c=!0),xr(C(t.edges(),function(t){return c===ca(e,e.node(t.v),s)&&c!==ca(e,e.node(t.w),s)}),function(e){return Q(t,e)})}function aa(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),ta(e),Qi(e,t),oa(e,t)}function oa(e,t){var n=Zi(e,cr(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),O(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 sa(e,t,n){return e.hasEdge(t,n)}function ca(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function la(e){switch(e.graph().ranker){case`network-simplex`:fa(e);break;case`tight-tree`:da(e);break;case`longest-path`:ua(e);break;default:fa(e)}}var ua=Vi;function da(e){Vi(e),Hi(e)}function fa(e){$(e)}function pa(e){var t=X(e,`root`,{},`_root`),n=ha(e),r=G(E(n))-1,i=2*r+1;e.graph().nestingRoot=t,O(e.edges(),function(t){e.edge(t).minlen*=i});var a=ga(e)+1;O(e.children(),function(o){ma(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function ma(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 c=Ci(e,`_bt`),l=Ci(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,O(s,function(s){ma(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function ha(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&O(a,function(e){n(e,i+1)}),t[r]=i}return O(e.children(),function(e){n(e,1)}),t}function ga(e){return D(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function _a(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,O(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function va(e,t,n){var r={},i;O(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}})}function ya(e,t,n){var r=ba(e),i=new A({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return O(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),O(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=k(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 ba(e){for(var t;e.hasNode(t=ri(`_root`)););return t}function xa(e,t){for(var n=0,r=1;r0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n})),c}function Ca(e){var t={},n=C(e.nodes(),function(t){return!e.children(t).length}),r=U(J(G(U(n,function(t){return e.node(t).rank}))+1),function(){return[]});function i(n){hr(t,n)||(t[n]=!0,r[e.node(n).rank].push(n),O(e.successors(n),i))}var a=Y(n,function(t){return e.node(t).rank});return O(a,i),r}function wa(e,t){return U(t,function(t){var n=e.inEdges(t);if(n.length){var r=D(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}})}function Ta(e,t){var n={};return O(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};k(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),O(t.edges(),function(e){var t=n[e.v],r=n[e.w];!k(t)&&!k(r)&&(r.indegree++,t.out.push(n[e.w]))}),Ea(C(n,function(e){return!e.indegree}))}function Ea(e){var t=[];function n(e){return function(t){t.merged||(k(t.barycenter)||k(e.barycenter)||t.barycenter>=e.barycenter)&&Da(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),O(i.in.reverse(),n(i)),O(i.out,r(i))}return U(C(t,function(e){return!e.merged}),function(e){return q(e,[`vs`,`i`,`barycenter`,`weight`])})}function Da(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}function Oa(e,t){var n=Ti(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=Y(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,c=0;r.sort(Aa(!!t)),c=ka(a,i,c),O(r,function(e){c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=ka(a,i,c)});var l={vs:z(a)};return s&&(l.barycenter=o/s,l.weight=s),l}function ka(e,t,n){for(var r;t.length&&(r=H(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Aa(e){return function(t,n){return t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}}function ja(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,c={};o&&(i=C(i,function(e){return e!==o&&e!==s}));var l=wa(e,i);O(l,function(t){if(e.children(t.v).length){var i=ja(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&Na(t,i)}});var u=Ta(l,n);Ma(u,c);var d=Oa(u,r);if(o&&(d.vs=z([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function Ma(e,t){O(e,function(e){e.vs=z(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function Na(e,t){k(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)}function Pa(e){var t=wi(e),n=Fa(e,J(1,t+1),`inEdges`),r=Fa(e,J(t-1,-1,-1),`outEdges`),i=Ca(e);La(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){Ia(s%2?n:r,s%4>=2),i=Z(e);var l=xa(e,i);lo||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Ba(e){var t={},n=0;function r(i){var a=n;O(e.children(i),r),t[i]={low:a,lim:n++}}return O(e.children(),r),t}function Va(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=H(r);return O(r,function(t,c){var l=Ua(e,t),u=l?e.node(l).order:o;(l||t===s)&&(O(r.slice(a,c+1),function(t){O(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(oo)&&Wa(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return O(n,function(s,c){if(e.node(s).dummy===`border`){var l=e.predecessors(s);l.length&&(a=e.node(l[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return D(t,i),n}function Ua(e,t){if(e.node(t).dummy)return cr(e.predecessors(t),function(t){return e.node(t).dummy})}function Wa(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 Ga(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Ka(e,t,n,r){var i={},a={},o={};return O(t,function(e){O(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),O(t,function(e){var t=-1;O(e,function(e){var s=r(e);if(s.length){s=Y(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=s[l];a[e]===e&&t{var t=n(` buildLayoutGraph`,()=>ho(e));n(` runLayout`,()=>io(t,n)),n(` updateInputGraph`,()=>ao(e,t))})}function io(e,t){t(` makeSpaceForEdgeLabels`,()=>go(e)),t(` removeSelfEdges`,()=>To(e)),t(` acyclic`,()=>hi(e)),t(` nestingGraph.run`,()=>pa(e)),t(` rank`,()=>la(yi(e))),t(` injectEdgeLabelProxies`,()=>_o(e)),t(` removeEmptyRanks`,()=>Si(e)),t(` nestingGraph.cleanup`,()=>_a(e)),t(` normalizeRanks`,()=>xi(e)),t(` assignRankMinMax`,()=>vo(e)),t(` removeEdgeLabelProxies`,()=>yo(e)),t(` normalize.run`,()=>Ri(e)),t(` parentDummyChains`,()=>Ra(e)),t(` addBorderSegments`,()=>Oi(e)),t(` order`,()=>Pa(e)),t(` insertSelfEdges`,()=>Eo(e)),t(` adjustCoordinateSystem`,()=>Ai(e)),t(` position`,()=>to(e)),t(` positionSelfEdges`,()=>Do(e)),t(` removeBorderNodes`,()=>wo(e)),t(` normalize.undo`,()=>Bi(e)),t(` fixupEdgeLabelCoords`,()=>So(e)),t(` undoCoordinateSystem`,()=>ji(e)),t(` translateGraph`,()=>bo(e)),t(` assignNodeIntersects`,()=>xo(e)),t(` reversePoints`,()=>Co(e)),t(` acyclic.undo`,()=>_i(e))}function ao(e,t){O(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))}),O(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}var oo=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],so={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},co=[`acyclicer`,`ranker`,`rankdir`,`align`],lo=[`width`,`height`],uo={width:0,height:0},fo=[`minlen`,`weight`,`width`,`height`,`labeloffset`],po={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},mo=[`labelpos`];function ho(e){var t=new A({multigraph:!0,compound:!0}),n=ko(e.graph());return t.setGraph(br({},so,Oo(n,oo),q(n,co))),O(e.nodes(),function(n){var r=ko(e.node(n));t.setNode(n,$n(Oo(r,lo),uo)),t.setParent(n,e.parent(n))}),O(e.edges(),function(n){var r=ko(e.edge(n));t.setEdge(n,br({},po,Oo(r,fo),q(r,mo)))}),t}function go(e){var t=e.graph();t.ranksep/=2,O(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 _o(e){O(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);X(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function vo(e){var t=0;O(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=G(t,r.maxRank))}),e.graph().maxRank=t}function yo(e){O(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function bo(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){var a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}O(e.nodes(),function(t){c(e.node(t))}),O(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&c(n)}),t-=o,r-=s,O(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),O(e.edges(),function(n){var i=e.edge(n);O(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 xo(e){O(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(bi(r,a)),n.points.push(bi(i,o))})}function So(e){O(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 Co(e){O(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function wo(e){O(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(H(n.borderLeft)),o=e.node(H(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}}),O(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function To(e){O(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 Eo(e){var t=Z(e);O(t,function(t){var n=0;O(t,function(t,r){var i=e.node(t);i.order=r+n,O(i.selfEdges,function(t){X(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 Do(e){O(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 Oo(e,t){return W(q(e,t),Number)}function ko(e){var t={};return O(e,function(e,n){t[n.toLowerCase()]=e}),t}var Ao=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),jo=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),Mo=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),No=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],Po=e((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 jo(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}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:jo(i)},`getSelfLoopSide`),Fo=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=Ao(Math.max(r,e.width*.35),36,c),u=Ao(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),Io=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/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))-c/2-4}}},`getSelfLoopLabelPosition`),Lo=e((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,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=Po(e,l,n,c.start,a),f=Fo(l,d,t,u.width??0),p=Io(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.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 m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),Ro=e(async({element:n,graph:a,diagramType:s,id:l,parentCluster:u,siteConfig:d})=>{let f=a.graph().rankdir;t.trace(`Dir in recursive render - dir:`,f);let{clusters:p,edgePaths:m,edgeLabels:h,nodes:g,rootGroups:_}=Le(n,{edgePathsClass:`edgePaths`});a.nodes()?t.info(`Recursive render XXX`,a.nodes()):t.info(`No nodes found for`,a),a.edges().length>0&&t.info(`Recursive edges`,a.edge(a.edges()[0]));let ee=Mo(s);await Promise.all(a.nodes().map(async function(e){let n=a.node(e);if(u!==void 0){let n=JSON.parse(JSON.stringify(u.clusterData));t.trace(`Setting data for parent cluster XXX Node.id = `,e,` data=`,n.height,` -Parent cluster`,u.height),a.setNode(u.id,n),a.parent(e)||(t.trace(`Setting parent`,e,u.id),a.setParent(e,u.id,n))}if(t.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(a.node(e))),n?.clusterNode){t.info(`Cluster identified XBX`,e,n.width,a.node(e));let{ranksep:o,nodesep:s}=a.graph();n.graph.setGraph({...n.graph.graph(),ranksep:o+25,nodesep:s});let u=await Go({element:g,graph:n.graph,diagramType:c,id:l,parentCluster:a.node(e),siteConfig:d}),f=u.elem;r(n,f),n.diff=u.diff||0,t.info(`New compound node after recursive render XAX`,e,`width`,n.width,`height`,n.height),i(f,n)}else a.children(e).length>0?(t.trace(`Cluster - the non recursive path XBX`,e,n.id,n,n.width,`Graph:`,a),t.trace(Be(n.id,a)),j.set(n.id,{id:Be(n.id,a),node:n})):(t.trace(`Node - the non recursive path XAX`,e,g,a.node(e),f),await He(g,a.node(e),{config:d,dir:f}))})),await e(async()=>{let e=a.edges().map(async function(e){let n=a.edge(e.v,e.w,e.name);if(t.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),t.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(a.edge(e))),t.info(`Fix`,j,`ids:`,e.v,e.w,`Translating: `,j.get(e.v),j.get(e.w)),_&&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 s(h,e),n.width=e.width,n.height=e.height,n.labelStyle=e.labelStyle;return}await s(h,n)});await Promise.all(e)},`processEdges`)();let{subGraphTitleTotalMargin:te}=o(d);return{elem:ee,graph:a,groups:{clusters:p,edgePaths:m,edgeLabels:h,nodes:g,rootGroups:ee},diagramType:c,id:l,mergeSelfLoops:_,subGraphTitleTotalMargin:te}},`measureDagreGraph`),zo=e(e=>{t.info(`############################################# XXX`),t.info(`### Layout ### XXX`),t.info(`############################################# XXX`),ro(e)},`runDagreGraphLayout`),Bo=e((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`),Vo=e((e,t)=>{No.forEach(n=>{t[n]!==void 0&&(e[n]=t[n])})},`applyDagreNodeLayout`),Ho=e((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`),Uo=e((e,t)=>{let{graph:n,mergeSelfLoops:r,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(e=>[e.id,e]));Re(n).forEach(e=>{let t=Bo(n,e,i);if(!t)return;Vo(n.node(e),t);let r=a.get(e);r&&Vo(r,t)});let o=i/2;return e.edges=Lo(n,o,{mergeSelfLoops:r}).map(({edge:e,start:t,end:n})=>Ho(e,t,n,o)),e},`applyDagreLayoutResult`),Wo=e(async({elem:e,graph:n,groups:{clusters:r,edgePaths:i},diagramType:o,id:s,mergeSelfLoops:u,subGraphTitleTotalMargin:d})=>{let f=0;await Promise.all(Re(n).map(async function(e){let i=n.node(e);if(t.info(`Position XBX => `+e+`: (`+i.x,`,`+i.y,`) width: `,i.width,` height: `,i.height),i?.clusterNode)i.y+=d,t.info(`A tainted cluster node XBX1`,e,i.id,i.width,i.height,i.x,i.y,n.parent(e)),j.get(i.id).node=i,a(i);else if(n.children(e).length>0){t.info(`A pure cluster node XBX1`,e,i.id,i.x,i.y,i.width,i.height,n.parent(e)),i.height+=d,n.node(i.parentId);let a=i?.padding/2||0,o=i?.labelBBox?.height||0,s=o-a||0;t.debug(`OffsetY`,s,`labelHeight`,o,`halfPadding`,a),await Le(r,i),j.get(i.id).node=i}else{let e=n.node(i.parentId);i.y+=d/2,t.info(`A regular node XBX1 - using the padding`,i.id,`parent`,i.parentId,i.width,i.height,i.x,i.y,`offsetY`,i.offsetY,`parent`,e,e?.offsetY,i),a(i)}}));let p=d/2;return Lo(n,p,{mergeSelfLoops:u}).forEach(function({edge:e,start:r,end:a}){t.info(`Edge `+r+` -> `+a+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=p);let u=n.node(r),d=n.node(a),f=c(i,e,j,o,u,d,s);l(e,f)}),n.nodes().forEach(function(e){let r=n.node(e);t.info(e,r.type,r.diff),r.isGroup&&(f=r.diff)}),t.warn(`Returning from recursive render XAX`,e,f),{elem:e,diff:f}},`paintDagreLayoutCore`),Go=e(async e=>{let t=await Ro(e);return zo(t.graph),await Wo(t)},`renderDagreSubgraph`),Ko=e(e=>{let n=new O({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=>{n.setNode(e.id,{...e}),e.parentId&&n.setParent(e.id,e.parentId)}),t.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,r=t+`---`+t+`---1`,i=t+`---`+t+`---2`,a=n.node(t);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),n.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,n.setEdge(t,r,s,t+`-cyclic-special-0`),n.setEdge(r,i,c,t+`-cyclic-special-1`),n.setEdge(i,t,l,t+`-cyclic-special-2`)}else n.setEdge(e.start,e.end,{...e},e.id)}),Ue(n),{graph:n}},`prepareLayoutForDagre`),qo=e(async(e,{element:t,preparedLayout:r})=>{let i=r??Ko(e),a=n(),o=await Ro({element:t,graph:i.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:a});return i.measuredLayout=o,o},`measureDagreLayout`),Jo=e((e,t)=>{let n=t.preparedLayout?.measuredLayout;if(!n)throw Error(`runDagreLayoutCore requires measureDagreLayout to run first`);return zo(n.graph),Uo(e,n),n},`runDagreLayoutCore`),Yo=Ve({prepareLayout:Ko,measureLayout:qo,runLayoutCore:Jo,paintOptions:{clusterDb:j,getNodes:e((e,{measure:t})=>Re(t.graph).map(e=>t.graph.node(e)).filter(Boolean),`getDagrePaintNodes`),getEdgeNode:e((e,t,{measure:n})=>e?n.graph.node(e):void 0,`getDagreEdgeNode`),skipNode:e((e,{measure:t})=>!t.graph.hasNode(e.id),`skipNode`),isCluster:e((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,`isCluster`)}});export{Uo as applyDagreLayoutResult,Lo as getEdgesToRender,qo as measureDagreLayout,Ko as prepareLayoutForDagre,Yo as render,Jo as runDagreLayoutCore}; \ No newline at end of file +Parent cluster`,u.height),a.setNode(u.id,n),a.parent(e)||(t.trace(`Setting parent`,e,u.id),a.setParent(e,u.id,n))}if(t.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(a.node(e))),n?.clusterNode){t.info(`Cluster identified XBX`,e,n.width,a.node(e));let{ranksep:o,nodesep:c}=a.graph();n.graph.setGraph({...n.graph.graph(),ranksep:o+25,nodesep:c});let u=await Go({element:g,graph:n.graph,diagramType:s,id:l,parentCluster:a.node(e),siteConfig:d}),f=u.elem;r(n,f),n.diff=u.diff||0,t.info(`New compound node after recursive render XAX`,e,`width`,n.width,`height`,n.height),i(f,n)}else a.children(e).length>0?(t.trace(`Cluster - the non recursive path XBX`,e,n.id,n,n.width,`Graph:`,a),t.trace(Re(n.id,a)),N.set(n.id,{id:Re(n.id,a),node:n})):(t.trace(`Node - the non recursive path XAX`,e,g,a.node(e),f),await Be(g,a.node(e),{config:d,dir:f}))})),await e(async()=>{let e=a.edges().map(async function(e){let n=a.edge(e.v,e.w,e.name);if(t.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),t.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(a.edge(e))),t.info(`Fix`,N,`ids:`,e.v,e.w,`Translating: `,N.get(e.v),N.get(e.w)),ee&&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 c(h,e),n.width=e.width,n.height=e.height,n.labelStyle=e.labelStyle;return}await c(h,n)});await Promise.all(e)},`processEdges`)();let{subGraphTitleTotalMargin:v}=o(d);return{elem:_,graph:a,groups:{clusters:p,edgePaths:m,edgeLabels:h,nodes:g,rootGroups:_},diagramType:s,id:l,mergeSelfLoops:ee,subGraphTitleTotalMargin:v}},`measureDagreGraph`),zo=e(e=>{t.info(`############################################# XXX`),t.info(`### Layout ### XXX`),t.info(`############################################# XXX`),ro(e)},`runDagreGraphLayout`),Bo=e((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`),Vo=e((e,t)=>{No.forEach(n=>{t[n]!==void 0&&(e[n]=t[n])})},`applyDagreNodeLayout`),Ho=e((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`),Uo=e((e,t)=>{let{graph:n,mergeSelfLoops:r,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(e=>[e.id,e]));Ie(n).forEach(e=>{let t=Bo(n,e,i);if(!t)return;Vo(n.node(e),t);let r=a.get(e);r&&Vo(r,t)});let o=i/2;return e.edges=Lo(n,o,{mergeSelfLoops:r}).map(({edge:e,start:t,end:n})=>Ho(e,t,n,o)),e},`applyDagreLayoutResult`),Wo=e(async({elem:e,graph:n,groups:{clusters:r,edgePaths:i},diagramType:o,id:c,mergeSelfLoops:d,subGraphTitleTotalMargin:f})=>{let p=0;await Promise.all(Ie(n).map(async function(e){let i=n.node(e);if(t.info(`Position XBX => `+e+`: (`+i.x,`,`+i.y,`) width: `,i.width,` height: `,i.height),i?.clusterNode)i.y+=f,t.info(`A tainted cluster node XBX1`,e,i.id,i.width,i.height,i.x,i.y,n.parent(e)),N.get(i.id).node=i,a(i);else if(n.children(e).length>0){t.info(`A pure cluster node XBX1`,e,i.id,i.x,i.y,i.width,i.height,n.parent(e)),i.height+=f,n.node(i.parentId);let a=i?.padding/2||0,o=i?.labelBBox?.height||0,c=o-a||0;t.debug(`OffsetY`,c,`labelHeight`,o,`halfPadding`,a),await s(r,i),N.get(i.id).node=i}else{let e=n.node(i.parentId);i.y+=f/2,t.info(`A regular node XBX1 - using the padding`,i.id,`parent`,i.parentId,i.width,i.height,i.x,i.y,`offsetY`,i.offsetY,`parent`,e,e?.offsetY,i),a(i)}}));let m=f/2;return Lo(n,m,{mergeSelfLoops:d}).forEach(function({edge:e,start:r,end:a}){t.info(`Edge `+r+` -> `+a+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=m);let s=n.node(r),d=n.node(a),f=l(i,e,N,o,s,d,c);u(e,f)}),n.nodes().forEach(function(e){let r=n.node(e);t.info(e,r.type,r.diff),r.isGroup&&(p=r.diff)}),t.warn(`Returning from recursive render XAX`,e,p),{elem:e,diff:p}},`paintDagreLayoutCore`),Go=e(async e=>{let t=await Ro(e);return zo(t.graph),await Wo(t)},`renderDagreSubgraph`),Ko=e(e=>{let n=new A({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=>{n.setNode(e.id,{...e}),e.parentId&&n.setParent(e.id,e.parentId)}),t.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,r=t+`---`+t+`---1`,i=t+`---`+t+`---2`,a=n.node(t);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),n.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,n.setEdge(t,r,s,t+`-cyclic-special-0`),n.setEdge(r,i,c,t+`-cyclic-special-1`),n.setEdge(i,t,l,t+`-cyclic-special-2`)}else n.setEdge(e.start,e.end,{...e},e.id)}),Ve(n),{graph:n}},`prepareLayoutForDagre`),qo=e(async(e,{element:t,preparedLayout:r})=>{let i=r??Ko(e),a=n(),o=await Ro({element:t,graph:i.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:a});return i.measuredLayout=o,o},`measureDagreLayout`),Jo=e((e,t)=>{let n=t.preparedLayout?.measuredLayout;if(!n)throw Error(`runDagreLayoutCore requires measureDagreLayout to run first`);return zo(n.graph),Uo(e,n),n},`runDagreLayoutCore`),Yo=ze({prepareLayout:Ko,measureLayout:qo,runLayoutCore:Jo,paintOptions:{clusterDb:N,getNodes:e((e,{measure:t})=>Ie(t.graph).map(e=>t.graph.node(e)).filter(Boolean),`getDagrePaintNodes`),getEdgeNode:e((e,t,{measure:n})=>e?n.graph.node(e):void 0,`getDagreEdgeNode`),skipNode:e((e,{measure:t})=>!t.graph.hasNode(e.id),`skipNode`),isCluster:e((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,`isCluster`)}});export{Uo as applyDagreLayoutResult,Lo as getEdgesToRender,qo as measureDagreLayout,Ko as prepareLayoutForDagre,Yo as render,Jo as runDagreLayoutCore}; \ No newline at end of file diff --git a/web/dist/app-diagram-22UHCM2B.js b/web/dist/app-diagram-22UHCM2B.js index 07fb75314..72cb5aa47 100644 --- a/web/dist/app-diagram-22UHCM2B.js +++ b/web/dist/app-diagram-22UHCM2B.js @@ -1,12 +1,12 @@ -import{t as e}from"./app-purify.es.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{G as i,H as a,U as o,a as s,d as c,it as l,q as u,s as d,v as f,w as p,x as m,y as h}from"./app-chunk-O7XYJQB3.js";import{t as g}from"./app-channel.js";import{c as _,g as v}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{t as y}from"./app-chunk-5VM5RSS4.js";import"./app-chunk-7PRAP22T.js";import{i as b,n as x,o as S,r as C}from"./app-chunk-J5ZVWO5B.js";import{a as w}from"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import{t as T}from"./app-chunk-GWA4HPMP.js";import{t as E}from"./app-chunk-XXDRQBXY.js";import{t as D}from"./app-chunk-WEXAMYUT.js";import"./app-chunk-UA2S7LBM.js";import{r as O,t as k}from"./app-chunk-GNY47TPC.js";import{n as A,t as j}from"./app-chunk-LNGE3PJU.js";var M={SHAPE_UNSUPPORTED:`SHAPE_UNSUPPORTED`,SHAPE_REMOVED:`SHAPE_REMOVED`,EDGE_OPERATOR_UNSUPPORTED:`EDGE_OPERATOR_UNSUPPORTED`,REFERENCE_EDGE_LABEL_REJECTED:`REFERENCE_EDGE_LABEL_REJECTED`,CONNECTOR_REF_UNRESOLVED:`CONNECTOR_REF_UNRESOLVED`,CONNECTOR_REF_NOT_A_CONNECTOR:`CONNECTOR_REF_NOT_A_CONNECTOR`,METADATA_KEY_MISAPPLIED:`METADATA_KEY_MISAPPLIED`,DUPLICATE_ID_NODE:`DUPLICATE_ID_NODE`,RESERVED_SYNTHETIC_ID:`RESERVED_SYNTHETIC_ID`,CONTAINMENT_VIOLATION:`CONTAINMENT_VIOLATION`,EDGE_SEMANTIC_CONTRADICTION:`EDGE_SEMANTIC_CONTRADICTION`,FLOW_NO_INPUT:`FLOW_NO_INPUT`},N=new Set([M.SHAPE_UNSUPPORTED,M.SHAPE_REMOVED,M.CONTAINMENT_VIOLATION]);new Set(Object.values(M).filter(e=>!N.has(e)));var P=new Map([[`task`,`roundedRect`],[`tool`,`subroutine`],[`input`,`lean-right`],[`decision`,`diamond`],[`refdoc`,`lin-doc`],[`action`,`hexagon`],[`round`,`rect`]]),ee=new Set(`doc.stadium.terminal.circle.trapezoid.inv_trapezoid.inv-trapezoid.doublecircle.double-circle.typeDeclaration.procs.lean_left.lean-left.in-out.cylinder.ellipse.odd.tag-rect.tagged-rectangle.delay.half-rounded-rectangle.lin-rect.lined-rectangle.win-pane.window-pane.curv-trap.curved-trapezoid`.split(`.`)),te=new Set([`roundedRect`,`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`lean-right`,`diamond`,`lin-doc`,`lined-document`,`hexagon`,`hex`,`connector`,`collapsedGroup`]),F=`roundedRect`;function I(e){return e&&(P.get(e)??e)}t(I,`resolveShapeAlias`);function ne(e,t){for(let r of e)if(!r.isGroup){if((!r.shape||r.shape===`squareRect`||r.shape===`rect`)&&(r.shape=F),ee.has(r.shape)){let e=`shape "${r.shape}" was removed in v0.8.1, using "${F}"`;t?.emitError?t.emitError(`SHAPE_REMOVED`,e,{nodeId:r.id}):n.warn(`agentflow: ${e}`),r.shape=F;continue}if(!te.has(r.shape)){let e=`shape "${r.shape}" is not supported, using "${F}"`;t?.emitWarning?t.emitWarning(`SHAPE_UNSUPPORTED`,e,{nodeId:r.id}):n.warn(`agentflow: ${e}`),r.shape=F}}}t(ne,`normaliseNodeShapes`);var L=new Map([[`tool`,0],[`task`,1],[`decision`,2],[`input`,3],[`refdoc`,4],[`connector`,5],[`action`,6]]),R=L.size,z=t(e=>`af-kind-${e}`,`kindClass`),B=[...L.keys()],V=t(e=>Math.max(1,e-R),`containerSlotCount`),H=t((e,t)=>{let n=R+e%V(t);return t>0?n%t:n},`containerSlot`);function re(e,t,n){let r=m().themeVariables?.borderColorArray,i=Array.isArray(r)?r.length:0,a=n.size;for(let r of e??[]){if(r.isGroup||r.shape===`collapsedGroup`){r.colorIndex=H(n.get(String(r.id))??a++,i);continue}let e=t(String(r.id));e&&L.has(e)&&(r.cssClasses=`${r.cssClasses??``} ${z(e)}`.replace(/\s+/g,` `).trim())}}t(re,`assignColorSlots`);var ie=`agentflow-`,ae=new Set([`shape`,`view`,`icon`,`img`,`form`,`pos`,`w`,`h`,`class`,`style`,`labelType`]),oe=new Set([`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`tool`]),se={flow:`flowGroup`};function ce(e){if(Array.isArray(e))return e.map(e=>ce(e));if(typeof e!=`object`||!e)return e;let t={};for(let n of Object.keys(e))n!==`__proto__`&&n!==`constructor`&&n!==`prototype`&&(t[n]=ce(e[n]));return t}t(ce,`stripPrototypeKeys`);function le(e){let t=!1,n=!1,r=0,i,a=[];for(let o of e.split(` +import{t as e}from"./app-purify.es.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{G as i,H as a,U as o,a as s,d as c,it as l,q as u,s as d,v as f,w as p,x as m,y as h}from"./app-chunk-O7XYJQB3.js";import{t as g}from"./app-channel.js";import{c as _,g as v}from"./app-chunk-ZIGJFQKS.js";import{n as y,t as b}from"./app-chunk-LNGE3PJU.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{i as x,n as S,o as C,r as w}from"./app-chunk-J5ZVWO5B.js";import{a as T}from"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{r as E,t as D}from"./app-chunk-GNY47TPC.js";import{t as O}from"./app-chunk-5VM5RSS4.js";import{t as k}from"./app-chunk-GWA4HPMP.js";import{t as A}from"./app-chunk-XXDRQBXY.js";import{t as j}from"./app-chunk-WEXAMYUT.js";var M={SHAPE_UNSUPPORTED:`SHAPE_UNSUPPORTED`,SHAPE_REMOVED:`SHAPE_REMOVED`,EDGE_OPERATOR_UNSUPPORTED:`EDGE_OPERATOR_UNSUPPORTED`,REFERENCE_EDGE_LABEL_REJECTED:`REFERENCE_EDGE_LABEL_REJECTED`,CONNECTOR_REF_UNRESOLVED:`CONNECTOR_REF_UNRESOLVED`,CONNECTOR_REF_NOT_A_CONNECTOR:`CONNECTOR_REF_NOT_A_CONNECTOR`,METADATA_KEY_MISAPPLIED:`METADATA_KEY_MISAPPLIED`,DUPLICATE_ID_NODE:`DUPLICATE_ID_NODE`,RESERVED_SYNTHETIC_ID:`RESERVED_SYNTHETIC_ID`,CONTAINMENT_VIOLATION:`CONTAINMENT_VIOLATION`,EDGE_SEMANTIC_CONTRADICTION:`EDGE_SEMANTIC_CONTRADICTION`,FLOW_NO_INPUT:`FLOW_NO_INPUT`},N=new Set([M.SHAPE_UNSUPPORTED,M.SHAPE_REMOVED,M.CONTAINMENT_VIOLATION]);new Set(Object.values(M).filter(e=>!N.has(e)));var P=new Map([[`task`,`roundedRect`],[`tool`,`subroutine`],[`input`,`lean-right`],[`decision`,`diamond`],[`refdoc`,`lin-doc`],[`action`,`hexagon`],[`round`,`rect`]]),ee=new Set(`doc.stadium.terminal.circle.trapezoid.inv_trapezoid.inv-trapezoid.doublecircle.double-circle.typeDeclaration.procs.lean_left.lean-left.in-out.cylinder.ellipse.odd.tag-rect.tagged-rectangle.delay.half-rounded-rectangle.lin-rect.lined-rectangle.win-pane.window-pane.curv-trap.curved-trapezoid`.split(`.`)),te=new Set([`roundedRect`,`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`lean-right`,`diamond`,`lin-doc`,`lined-document`,`hexagon`,`hex`,`connector`,`collapsedGroup`]),F=`roundedRect`;function I(e){return e&&(P.get(e)??e)}t(I,`resolveShapeAlias`);function ne(e,t){for(let r of e)if(!r.isGroup){if((!r.shape||r.shape===`squareRect`||r.shape===`rect`)&&(r.shape=F),ee.has(r.shape)){let e=`shape "${r.shape}" was removed in v0.8.1, using "${F}"`;t?.emitError?t.emitError(`SHAPE_REMOVED`,e,{nodeId:r.id}):n.warn(`agentflow: ${e}`),r.shape=F;continue}if(!te.has(r.shape)){let e=`shape "${r.shape}" is not supported, using "${F}"`;t?.emitWarning?t.emitWarning(`SHAPE_UNSUPPORTED`,e,{nodeId:r.id}):n.warn(`agentflow: ${e}`),r.shape=F}}}t(ne,`normaliseNodeShapes`);var L=new Map([[`tool`,0],[`task`,1],[`decision`,2],[`input`,3],[`refdoc`,4],[`connector`,5],[`action`,6]]),R=L.size,z=t(e=>`af-kind-${e}`,`kindClass`),B=[...L.keys()],V=t(e=>Math.max(1,e-R),`containerSlotCount`),H=t((e,t)=>{let n=R+e%V(t);return t>0?n%t:n},`containerSlot`);function re(e,t,n){let r=m().themeVariables?.borderColorArray,i=Array.isArray(r)?r.length:0,a=n.size;for(let r of e??[]){if(r.isGroup||r.shape===`collapsedGroup`){r.colorIndex=H(n.get(String(r.id))??a++,i);continue}let e=t(String(r.id));e&&L.has(e)&&(r.cssClasses=`${r.cssClasses??``} ${z(e)}`.replace(/\s+/g,` `).trim())}}t(re,`assignColorSlots`);var ie=`agentflow-`,ae=new Set([`shape`,`view`,`icon`,`img`,`form`,`pos`,`w`,`h`,`class`,`style`,`labelType`]),oe=new Set([`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`tool`]),se={flow:`flowGroup`};function ce(e){if(Array.isArray(e))return e.map(e=>ce(e));if(typeof e!=`object`||!e)return e;let t={};for(let n of Object.keys(e))n!==`__proto__`&&n!==`constructor`&&n!==`prototype`&&(t[n]=ce(e[n]));return t}t(ce,`stripPrototypeKeys`);function le(e){let t=!1,n=!1,r=0,i,a=[];for(let o of e.split(` `)){if(i!==void 0){let e=o.length-o.trimStart().length;if(o.trim()===``||e>i){a.push(o);continue}i=void 0}let e=-1;for(let i=0;i0){a.push(o);continue}let s=e>=0?o.slice(0,e):o,c=e>=0?o.slice(e):``;if(/:\s*[>|][\d+-]*\s*$/.test(s)){i=o.length-o.trimStart().length,a.push(o);continue}a.push(s.replace(/,([\t ]*)$/,`$1`)+c)}return a.join(` `)}t(le,`stripLineTrailingCommas`);var ue=class{constructor(){this.vertexCounter=0,this.config=m(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId=``,this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=o,this.setAccDescription=a,this.setDiagramTitle=u,this.getAccTitle=h,this.getAccDescription=f,this.getDiagramTitle=p,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.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.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.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{t(this,`AgentFlowDB`)}sanitizeText(e){return d.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,c){if(!e||e.trim().length===0)return;let l;if(s!==void 0){let e;e=s.includes(` `)?s+` `:`{ `+s+` -}`;try{l=A(e,{schema:j})??{}}catch(e){let t=s.includes(` -`)?le(s):s;if(t!==s)try{l=A(t+` -`,{schema:j})??{}}catch{this.rethrowMetadataYamlError(e,s,c)}else this.rethrowMetadataYamlError(e,s,c)}l=ce(l)}let u;if(l&&typeof l.shape==`string`){let e=l;u=e.shape;let t=I(u);t&&t!==u&&(e.shape=t)}let d=this.subGraphLookup.get(e);if(d&&l){d.metadata={...d.metadata,...l};return}let f=this.connectors.get(e);if(f&&l){f.metadata={...f.metadata,...l};return}if(e===`connectors`)return;let p=this.edges.find(t=>t.id===e);if(p){let e=l;e?.animate!==void 0&&(p.animate=e.animate),e?.animation!==void 0&&(p.animation=e.animation),e?.curve!==void 0&&(p.interpolate=e.curve),l&&(p.metadata={...p.metadata,...l});return}let h,g=this.vertices.get(e);if(g===void 0&&(g={id:e,labelType:`text`,domId:ie+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,g)),this.vertexCounter++,t===void 0?g.text===void 0&&(g.text=e):(this.config=m(),h=this.sanitizeText(t.text.trim()),g.labelType=t.type,h.startsWith(`"`)&&h.endsWith(`"`)&&(h=h.substring(1,h.length-1)),g.text=h),n!==void 0&&(g.type=n),r?.forEach(e=>{g.styles.push(e)}),i?.forEach(e=>{g.classes.push(e)}),a!==void 0&&(g.dir=a),g.props===void 0?g.props=o:o!==void 0&&Object.assign(g.props,o),l){if(g.metadata={...g.metadata,...l},l.shape){let e=u??l.shape;if(typeof e!=`string`)throw this.positionedShapeError(`No such shape: ${JSON.stringify(e)}.`,c);if(e!==e.toLowerCase()||e.includes(`_`))throw this.positionedShapeError(`No such shape: ${e}. Shape names should be lowercase.`,c);if(!w(l.shape))throw this.positionedShapeError(`No such shape: ${l.shape}.`,c);g.type=l?.shape}l?.label&&(g.text=this.sanitizeText(l.label),g.labelType=this.sanitizeNodeLabelType(l?.labelType))}}positionedShapeError(e,t){let n=Error(e);if(!t)return n;let r=t.first_line+this.frontmatterLineOffset;return Object.assign(n,{hash:{text:``,token:null,line:r-1,loc:{first_line:r,last_line:t.last_line+this.frontmatterLineOffset,first_column:t.first_column,last_column:t.last_column},expected:[]}}),n}rethrowMetadataYamlError(e,n,r){let i=e;if(!i||i.name!==`YAMLException`||!i.mark||!r)throw e;let a;try{let e=!n.includes(` +}`;try{l=y(e,{schema:b})??{}}catch(e){let t=s.includes(` +`)?le(s):s;if(t!==s)try{l=y(t+` +`,{schema:b})??{}}catch{this.rethrowMetadataYamlError(e,s,c)}else this.rethrowMetadataYamlError(e,s,c)}l=ce(l)}let u;if(l&&typeof l.shape==`string`){let e=l;u=e.shape;let t=I(u);t&&t!==u&&(e.shape=t)}let d=this.subGraphLookup.get(e);if(d&&l){d.metadata={...d.metadata,...l};return}let f=this.connectors.get(e);if(f&&l){f.metadata={...f.metadata,...l};return}if(e===`connectors`)return;let p=this.edges.find(t=>t.id===e);if(p){let e=l;e?.animate!==void 0&&(p.animate=e.animate),e?.animation!==void 0&&(p.animation=e.animation),e?.curve!==void 0&&(p.interpolate=e.curve),l&&(p.metadata={...p.metadata,...l});return}let h,g=this.vertices.get(e);if(g===void 0&&(g={id:e,labelType:`text`,domId:ie+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,g)),this.vertexCounter++,t===void 0?g.text===void 0&&(g.text=e):(this.config=m(),h=this.sanitizeText(t.text.trim()),g.labelType=t.type,h.startsWith(`"`)&&h.endsWith(`"`)&&(h=h.substring(1,h.length-1)),g.text=h),n!==void 0&&(g.type=n),r?.forEach(e=>{g.styles.push(e)}),i?.forEach(e=>{g.classes.push(e)}),a!==void 0&&(g.dir=a),g.props===void 0?g.props=o:o!==void 0&&Object.assign(g.props,o),l){if(g.metadata={...g.metadata,...l},l.shape){let e=u??l.shape;if(typeof e!=`string`)throw this.positionedShapeError(`No such shape: ${JSON.stringify(e)}.`,c);if(e!==e.toLowerCase()||e.includes(`_`))throw this.positionedShapeError(`No such shape: ${e}. Shape names should be lowercase.`,c);if(!T(l.shape))throw this.positionedShapeError(`No such shape: ${l.shape}.`,c);g.type=l?.shape}l?.label&&(g.text=this.sanitizeText(l.label),g.labelType=this.sanitizeNodeLabelType(l?.labelType))}}positionedShapeError(e,t){let n=Error(e);if(!t)return n;let r=t.first_line+this.frontmatterLineOffset;return Object.assign(n,{hash:{text:``,token:null,line:r-1,loc:{first_line:r,last_line:t.last_line+this.frontmatterLineOffset,first_column:t.first_column,last_column:t.last_column},expected:[]}}),n}rethrowMetadataYamlError(e,n,r){let i=e;if(!i||i.name!==`YAMLException`||!i.mark||!r)throw e;let a;try{let e=!n.includes(` `),o=e?`{ `+n+` }`:n+` @@ -19,13 +19,13 @@ ${h.join(` Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,t,r){let i=this.isLinkData(r)?r.id.replace(`@`,``):void 0;n.info(`addLink`,e,t,i);for(let n of e)for(let a of t){let o=n===e[e.length-1],s=a===t[0];o&&s?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{if(e==="default"){this.edges.defaultInterpolate=t;return}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.)`);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=`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(m().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{v.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=v.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}isToolDefinition(e){return oe.has(e.type)}getTools(){let e=[];for(let t of this.vertices.values())this.isToolDefinition(t)&&e.push(t);return e}getClasses(){return this.classes}setupToolTips(t){let n=T();r(t).select(`svg`).selectAll(`g.node`).on(`mouseover`,t=>{let i=r(t.currentTarget),a=i.attr(`title`);if(a===null)return;let o=t.currentTarget?.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.text(i.attr(`title`)).style(`left`,window.scrollX+o.left+(o.right-o.left)/2+`px`).style(`top`,window.scrollY+o.bottom+`px`),n.html(e.sanitize(a)),i.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),r(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.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=m(),this.diagramId=``,this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,s()}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,r,i,a){let o=e?.text?.trim(),s=i?.text;e===i&&i?.text&&/\s/.exec(i.text)&&(o=void 0);let c=t(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`)(r.flat()),l=c.nodeList,u=c.dir,d=m().flowchart??{};if(u??=d.inheritDir?this.getDirection()??m().direction??void 0:void 0,this.version===`gen-1`)for(let e=0;ee!==o&&!this.globalNodes.has(e)),title:s.trim(),classes:[],dir:u,labelType:this.sanitizeNodeLabelType(i?.type),type:a??`flow`};n.info(`Adding`,f.id,f.nodes,f.dir),f.nodes=this.makeUniq(f,this.subGraphs).nodes;let p=this.getPosForId(o);if(p!==-1){let e=this.subGraphs[p];for(let t of f.nodes)e.nodes.includes(t)||e.nodes.push(t);f.title&&(e.title=f.title),f.dir&&(e.dir=f.dir),f.type&&(e.type=f.type),this.subGraphLookup.set(o,e)}else this.subGraphs.push(f),this.subGraphLookup.set(o,f);return o}addGlobal(e){for(let t of e.flat()){if(typeof t!=`string`)continue;let e=t.trim();e!==``&&this.globalNodes.add(e)}for(let e of this.subGraphs)e.nodes=e.nodes.filter(e=>!this.globalNodes.has(e))}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=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)}addConnector(e,t){let n=e?.text?.trim();if(!n)return``;let r=t?.text?.trim()??``,i=r.length>0?this.sanitizeText(r):n,a=this.connectors.get(n);return a?r.length>0&&(a.text=i):(a={id:n,labelType:`text`,domId:ie+n+`-`+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:i},this.connectors.set(n,a),this.vertices.set(n,a),this.vertexCounter++),n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}computeEdgeSemantic(e,t){if(e===`arrow_point`&&t===`normal`)return`sequence`;if(e===`arrow_cross`&&t===`normal`)return`failure`;if(e===`arrow_open`&&t===`dotted`)return`reference`}destructStartLink(e){let t=e.trim(),n=`normal`;return t.includes(`.`)&&(n=`dotted`),{type:`arrow_open`,stroke:n}}countChar(e,t){let n=t.length,r=0;for(let i=0;i`:r=`arrow_point`;break;case`-`:case`.`:r=`arrow_open`,n=t}let i=`normal`,a=n.length-1,o=this.countChar(`.`,n);return o>0&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}destructLink(e,t){let n=this.destructEndLink(e),r;return t?(r=this.destructStartLink(t),r.stroke===n.stroke?(r.type=n.type,r.length=n.length,{...r,edgeSemantic:this.computeEdgeSemantic(r.type,r.stroke)}):{type:`INVALID`,stroke:`INVALID`}):{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}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){let t=typeof e.type==`string`?I(e.type):e.type;switch(t){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;case`ellipse`:return`ellipse`;default:return t}}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`:case`arrow_hierarchy`: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,c=this.findNode(t,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.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),metadata:e.metadata};s?t.push({...n,isGroup:!0,shape:`rect`}):t.push({...n,isGroup:!1,shape:this.getTypeFromVertex(e),wrappingWidth:i.agentflow?.wrappingWidth,minWidth:i.agentflow?.minNodeWidth})}}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}runPostParseValidators(){this.postParseValidationRun||=!0}getData(){this.runPostParseValidators();let e=m(),n=[],r=[],i=this.getSubGraphs(),a=new Map,o=new Map,s=new Set,c=new Map,l=t((e,t,n=new Set)=>{if(n.has(e))return;n.add(e);let r=this.subGraphLookup.get(e);if(r)for(let e of r.nodes)e===t||n.has(e)||(s.add(e),c.set(e,t),l(e,t,n))},`collectDescendants`);for(let e of i)e.metadata?.view===`collapsed`&&!s.has(e.id)&&l(e.id,e.id);let u=t((e,t)=>{let n=new Set,r=t;for(;r!==void 0&&!n.has(r);){if(r===e)return!0;n.add(r),r=a.get(r)}return!1},`wouldCloseContainmentCycle`);for(let e=i.length-1;e>=0;e--){let t=i[e];if(!s.has(t.id)){t.nodes.length>0&&o.set(t.id,!0);for(let e of t.nodes){if(u(e,t.id)){this.emitWarning(M.CONTAINMENT_VIOLATION,`Container "${t.id}" cannot contain "${e}" because "${e}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:e});continue}a.set(e,t.id)}}}for(let t=i.length-1;t>=0;t--){let r=i[t];if(!s.has(r.id))if(r.metadata?.view===`collapsed`){let t={...r.metadata,containerType:r.type};n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`collapsedGroup`,dir:r.dir,isGroup:!1,look:e.look,metadata:t})}else n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:se[r.type??`flow`],dir:r.dir,isGroup:!0,look:e.look,metadata:r.metadata})}this.getVertices().forEach(t=>{s.has(t.id)||this.addNodeFromVertex(t,n,a,o,e,e.look||`classic`)});let d=this.getEdges();d.forEach((t,n)=>{let i=c.get(t.start)??t.start,a=c.get(t.end)??t.end;if(i===a&&t.start!==t.end)return;let{arrowTypeStart:o,arrowTypeEnd:s}=this.destructEdgeType(t.type),l=[...d.defaultStyle??[]];t.style&&l.push(...t.style);let u={id:_(i,a,{counter:n,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:i,end:a,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`:o,arrowTypeEnd:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:s,arrowheadStyle:`fill: #333`,cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:l,style:l,pattern:t.stroke,look:e.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve,metadata:t.metadata};r.push(u)}),ne(n,this);let f=new Map,p=new Map;for(let e of i){let t=a.get(e.id);t!==void 0&&p.set(t,[...p.get(t)??[],e.id])}let h=0,g=t(e=>{if(!f.has(e)){f.set(e,h++);for(let t of p.get(e)??[])g(t)}},`walkContainers`);for(let e of i)a.get(e.id)===void 0&&g(e.id);let v=new Set(this.getConnectors().map(e=>e.id));return re(n,e=>{if(v.has(e))return`connector`;let t=this.vertices.get(e);return t?this.deriveVertexKind(t,I(t.type)):void 0},f),{nodes:n,edges:r,other:{},config:e,connectors:this.getConnectors()}}defaultConfig(){return c.flowchart}deriveVertexKind(e,t){return this.isToolDefinition(e)?`tool`:t===`hexagon`||t===`hex`?`action`:t===`lean-right`||t===`lean_right`?`input`:t===`lin-doc`||t===`lined-document`?`refdoc`:t===`diamond`?`decision`:`task`}getSemanticModel(){this.runPostParseValidators();let e=new Set(this.subGraphs.map(e=>e.id)),t=[],n=[];for(let[r,i]of this.vertices){if(e.has(r))continue;if(i.isConnector){let e={id:r};if(i.text!==void 0&&i.text!==r&&(e.title=i.text),i.metadata&&Object.keys(i.metadata).length>0){let t={};for(let[e,n]of Object.entries(i.metadata))ae.has(e)||(t[e]=n);Object.keys(t).length>0&&(e.metadata=t)}n.push(e);continue}let a={id:r};i.text!==void 0&&(a.label=i.text);let o=typeof i.type==`string`?I(i.type):i.type;if(o!==void 0&&(a.shape=o),a.vertexKind=this.deriveVertexKind(i,o),i.metadata&&Object.keys(i.metadata).length>0){let e={};for(let[t,n]of Object.entries(i.metadata))ae.has(t)||(e[t]=n);Object.keys(e).length>0&&(a.metadata=e)}t.push(a)}let r={vertices:t,edges:this.edges.map(e=>{let t={start:e.start,end:e.end};return e.id!==void 0&&(t.id=e.id),typeof e.text==`string`&&e.text.length>0&&(t.label=e.text),e.type!==void 0&&(t.type=e.type),e.stroke!==void 0&&(t.stroke=e.stroke),e.edgeSemantic!==void 0&&(t.edgeSemantic=e.edgeSemantic),e.length!==void 0&&(t.length=e.length),e.metadata&&Object.keys(e.metadata).length>0&&(t.metadata={...e.metadata}),t}),subGraphs:this.subGraphs.map(e=>{let t={id:e.id,nodes:[...e.nodes]};if(e.type!==void 0&&(t.type=e.type),e.title!==void 0&&(t.title=e.title),e.dir!==void 0&&(t.direction=e.dir),e.metadata&&Object.keys(e.metadata).length>0){let n={};for(let[t,r]of Object.entries(e.metadata))ae.has(t)||(n[t]=r);Object.keys(n).length>0&&(t.metadata=n)}return t}),connectors:n,diagnostics:this.diagnostics};return this.direction!==void 0&&(r.direction=this.direction),r}setFrontmatterLineOffset(e){this.frontmatterLineOffset=e??0}toElementPosition(e){let t=e?.first_line??0,n=e?.first_column??0,r=e?.last_line??t,i=e?.last_column??n,[a,o]=e?.range??[0,0];return{startLine:t+this.frontmatterLineOffset,startColumn:n,endLine:r+this.frontmatterLineOffset,endColumn:i,startIndex:a,endIndex:o}}pushMapping(e,t,n){if(!e)return;let r={id:e,type:t,position:this.toElementPosition(n)};return this.elementMappings.push(r),r}addVertexMapping(e,t,n,r){let i=this.pushMapping(e,`vertex`,r);i&&n==null&&this.bareVertexMappings.add(i)}extendVertexMapping(e,t){if(!e||!t)return;let n=this.toElementPosition(t);for(let t=this.elementMappings.length-1;t>=0;t--){let r=this.elementMappings[t];if(r.type===`vertex`&&r.id===e){this.bareVertexMappings.has(r)&&(r.type=`attachment`,this.bareVertexMappings.delete(r)),(n.endLine>r.position.endLine||n.endLine===r.position.endLine&&n.endColumn>r.position.endColumn)&&(r.position.endLine=n.endLine,r.position.endColumn=n.endColumn,r.position.endIndex=n.endIndex);return}}this.pushMapping(e,`attachment`,t)}addEdgeMapping(e,t,n,r){let i=Array.isArray(t)?t.map(e=>typeof e==`string`?e:e?.id??``).filter(Boolean):[],a=i.length>0?i.join(`>`):`edge`;this.pushMapping(a,`edge`,r)}addSubgraphMapping(e,t,n,r){let i=(typeof e==`string`?e:e?.text)??``,a=this.toElementPosition(n),o=r?this.toElementPosition(r):a;i&&this.elementMappings.push({id:i,type:`subgraph`,position:{startLine:a.startLine,startColumn:a.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:a.startIndex,endIndex:o.endIndex}})}addConnectorMapping(e,t,n,r){let i=e?.text?.trim()??``;if(!i)return;let a=this.toElementPosition(n),o=r?this.toElementPosition(r):a;this.elementMappings.push({id:i,type:`connector`,position:{startLine:a.startLine,startColumn:a.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:a.startIndex,endIndex:o.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(e){return this.elementMappings.find(t=>t.id===e)}getElementsOnLine(e){return this.elementMappings.filter(t=>e>=t.position.startLine&&e<=t.position.endLine)}getElementAtPosition(e,n){let r=this.elementMappings.filter(t=>{let{startLine:r,startColumn:i,endLine:a,endColumn:o}=t.position;return!(ea||e===r&&no)});if(r.length===0)return;let i=t(({position:e})=>[e.endLine-e.startLine,e.endColumn-e.startColumn],`span`);return r.reduce((e,t)=>{let[n,r]=i(e),[a,o]=i(t);return a===n?oe.id===s.id&&e.severity===s.severity&&e.message===s.message&&e.nodeId===s.nodeId&&e.edgeId===s.edgeId))return;this.diagnostics.push(s);let c=`agentflow[${e}]: ${r}`;t===`error`?n.error(c):n.warn(c)}emitWarning(e,t,n){this.emitDiagnostic(e,`warning`,t,n)}emitError(e,t,n){this.emitDiagnostic(e,`error`,t,n)}getDiagnostics(){return[...this.diagnostics]}},de={getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(e,t,r,i){n.debug(`Drawing agentflow diagram`,t);let{securityLevel:a,agentflow:o,layout:s}=m();i.db.setDiagramId(t),n.debug(`Before getData: `);let c=i.db.getData();n.debug(`Data: `,c);let l=E(t,a),u=i.db.getDirection();c.type=i.type,c.layoutAlgorithm=k(s),c.layoutAlgorithm===`dagre`&&s===`elk`&&n.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."),c.direction=u,c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`point`,`circle`,`cross`,`hierarchy`],c.diagramId=t,n.debug(`REF1:`,c),await O(c,l);let d=o?.diagramPadding??8;v.insertTitle(l,`agentflowTitleText`,o?.titleTopMargin??0,i.db.getDiagramTitle()),D(l,d,`agentflow`,o?.useMaxWidth??!0)},`draw`)},fe=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,5],r=[1,4],i=[1,3],a=[1,6],o=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],s=[2,2],c=[1,15],l=[1,16],u=[1,17],d=[1,18],f=[1,19],p=[1,26],m=[1,27],h=[1,28],g=[1,30],_=[1,31],v=[1,32],y=[1,55],b=[1,54],x=[1,34],S=[1,35],C=[1,36],w=[1,37],T=[1,38],E=[1,50],D=[1,52],O=[1,48],k=[1,53],A=[1,49],j=[1,56],M=[1,51],N=[1,57],P=[1,58],ee=[1,39],te=[1,40],F=[1,41],I=[1,42],ne=[1,43],L=[1,64],R=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],z=[1,70],B=[1,68],V=[1,67],H=[1,69],re=[8,9,10,12,78,80,81],ie=[1,88],ae=[1,101],oe=[1,106],se=[1,105],ce=[1,102],le=[1,98],ue=[1,104],de=[1,100],fe=[1,107],pe=[1,103],me=[1,108],he=[1,99],ge=[8,9,10,11,12,43,78,80,81],U=[8,9,10,11,12,43,49,78,80,81],W=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],_e=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],ve=[47,63,92,105,108,109,112,114,117,118,119],ye=[1,131],be=[1,132],xe=[1,134],Se=[1,133],Ce=[47,63,65,77,92,105,108,109,112,114,117,118,119],we=[1,143],Te=[1,157],Ee=[1,158],De=[1,159],Oe=[1,162],ke=[1,161],Ae=[1,160],je=[1,145],Me=[1,147],Ne=[1,151],Pe=[1,139],Fe=[1,140],Ie=[1,152],Le=[1,153],Re=[1,154],ze=[1,155],Be=[1,156],Ve=[1,163],He=[1,164],Ue=[1,141],We=[1,142],Ge=[1,149],Ke=[1,144],qe=[1,148],Je=[1,146],Ye=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Xe=[1,168],Ze=[1,170],G=[8,9,10,12],K=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],q=[1,190],J=[1,186],Y=[1,187],X=[1,191],Z=[1,188],Q=[1,189],Qe=[80,119,122],$=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],$e=[11,109],et=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],tt=[1,269],nt=[1,267],rt=[1,271],it=[1,265],at=[1,266],ot=[1,268],st=[1,270],ct=[1,272],lt=[1,292],ut=[8,9,10,12,109],dt=[8,9,10,11,12,63,87,108,109,112,113,114,115],ft={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:`error`,8:`COMMENT`,9:`SEMI`,10:`NEWLINE`,11:`SPACE`,12:`EOF`,13:`GRAPH`,14:`NODIR`,15:`DIR`,28:`flow`,30:`SQS`,32:`SQE`,33:`end`,35:`global`,36:`connector`,38:`acc_title`,39:`acc_title_value`,40:`acc_descr`,41:`acc_descr_value`,42:`acc_descr_multiline_value`,43:`SHAPE_DATA`,47:`AMP`,49:`STYLE_SEPARATOR`,51:`DOUBLECIRCLESTART`,52:`DOUBLECIRCLEEND`,53:`PS`,54:`PE`,55:`(-`,56:`-)`,57:`STADIUMSTART`,58:`STADIUMEND`,59:`SUBROUTINESTART`,60:`SUBROUTINEEND`,61:`VERTEX_WITH_PROPS_START`,62:`NODE_STRING[field]`,63:`COLON`,64:`NODE_STRING[value]`,65:`PIPE`,66:`CYLINDERSTART`,67:`CYLINDEREND`,68:`DIAMOND_START`,69:`DIAMOND_STOP`,70:`TAGEND`,71:`TRAPSTART`,72:`TRAPEND`,73:`INVTRAPSTART`,74:`INVTRAPEND`,77:`TESTSTR`,78:`START_LINK`,80:`LINK`,81:`LINK_ID`,83:`STR`,84:`MD_STR`,87:`STYLE`,88:`LINKSTYLE`,89:`CLASSDEF`,90:`CLASS`,91:`CLICK`,92:`DOWN`,93:`UP`,96:`idString[vertex]`,97:`idString[class]`,98:`CALLBACKNAME`,99:`CALLBACKARGS`,100:`HREF`,101:`LINK_TARGET`,102:`STR[link]`,103:`STR[tooltip]`,105:`DEFAULT`,107:`INTERPOLATE`,108:`NUM`,109:`COMMA`,112:`NODE_STRING`,113:`UNIT`,114:`BRKT`,115:`PCT`,117:`MINUS`,118:`MULT`,119:`UNICODE_TEXT`,120:`TEXT`,121:`TAGSTART`,122:`EDGE_TEXT`,124:`direction_tb`,125:`direction_bt`,126:`direction_rl`,127:`direction_lr`,128:`direction_td`},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:t(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 198:this.$=a[s];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:r.setDirection(`TB`),this.$=`TB`;break;case 14:r.setDirection(a[s-1]),this.$=a[s-1];break;case 32:this.$=a[s-1].nodes;break;case 38:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4],`flow`),r.addSubgraphMapping&&r.addSubgraphMapping(a[s-6],a[s-4],o[s-8],o[s]);break;case 39:this.$=r.addSubGraph(a[s-7],a[s-1],a[s-5],`flow`),r.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,a[s-3],o[s-3]),r.addSubgraphMapping&&r.addSubgraphMapping(a[s-7],a[s-5],o[s-9],o[s]);break;case 40:this.$=r.addSubGraph(a[s-3],a[s-1],{text:``,type:`text`},`flow`),r.addSubgraphMapping&&r.addSubgraphMapping(a[s-3],{text:``,type:`text`},o[s-5],o[s]);break;case 41:this.$=r.addSubGraph(a[s-4],a[s-1],{text:``,type:`text`},`flow`),r.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,a[s-3],o[s-3]),r.addSubgraphMapping&&r.addSubgraphMapping(a[s-4],{text:``,type:`text`},o[s-6],o[s]);break;case 42:this.$=r.addSubGraph(void 0,a[s-1],void 0,`flow`),r.addSubgraphMapping&&r.addSubgraphMapping(void 0,void 0,o[s-3],o[s]);break;case 43:r.addGlobal(a[s-1]),this.$=[];break;case 44:this.$=r.addConnector(a[s-4],a[s-2]),r.addConnectorMapping&&r.addConnectorMapping(a[s-4],a[s-2],o[s-6],o[s]);break;case 45:this.$=r.addConnector(a[s-5],a[s-3]),r.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,a[s-1],o[s-1]),r.addConnectorMapping&&r.addConnectorMapping(a[s-5],a[s-3],o[s-7],o[s]);break;case 46:this.$=r.addConnector(a[s-1],{text:``,type:`text`}),r.addConnectorMapping&&r.addConnectorMapping(a[s-1],{text:``,type:`text`},o[s-3],o[s]);break;case 47:this.$=r.addConnector(a[s-2],{text:``,type:`text`}),r.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,a[s-1],o[s-1]),r.addConnectorMapping&&r.addConnectorMapping(a[s-2],{text:``,type:`text`},o[s-4],o[s]);break;case 49:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 50:case 51:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 56:this.$=a[s-1]+a[s];break;case 57:this.$=a[s];break;case 58:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s],o[s]),r.extendVertexMapping&&r.extendVertexMapping(a[s-1][a[s-1].length-1],o[s]),r.addLink(a[s-3].stmt,a[s-1],a[s-2]),r.addEdgeMapping&&r.addEdgeMapping(a[s-3].stmt,a[s-1],a[s-2],this._$),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 59:r.addLink(a[s-2].stmt,a[s],a[s-1]),r.addEdgeMapping&&r.addEdgeMapping(a[s-2].stmt,a[s],a[s-1],this._$),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 60:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),r.addEdgeMapping&&r.addEdgeMapping(a[s-3].stmt,a[s-1],a[s-2],this._$),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 61:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 62:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s],o[s]),r.extendVertexMapping&&r.extendVertexMapping(a[s-1][a[s-1].length-1],o[s]),this.$={stmt:a[s-1],nodes:a[s-1],shapeData:a[s]};break;case 63:this.$={stmt:a[s],nodes:a[s]};break;case 64:this.$=[a[s]];break;case 65: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],o[s-4]),r.extendVertexMapping&&r.extendVertexMapping(a[s-5][a[s-5].length-1],o[s-4]),this.$=a[s-5].concat(a[s]);break;case 66:this.$=a[s-4].concat(a[s]);break;case 67:this.$=a[s];break;case 68:this.$=a[s-2],r.setClass(a[s-2],a[s]);break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`square`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`square`,this._$);break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`doublecircle`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`doublecircle`,this._$);break;case 71:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`circle`),r.addVertexMapping&&r.addVertexMapping(a[s-5],a[s-2],`circle`,this._$);break;case 72:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`ellipse`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`ellipse`,this._$);break;case 73:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`stadium`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`stadium`,this._$);break;case 74:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`subroutine`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`subroutine`,this._$);break;case 75: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]]])),r.addVertexMapping&&r.addVertexMapping(a[s-7],a[s-1],`rect`,this._$);break;case 76:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`cylinder`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`cylinder`,this._$);break;case 77:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`round`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`round`,this._$);break;case 78:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`diamond`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`diamond`,this._$);break;case 79:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`hexagon`),r.addVertexMapping&&r.addVertexMapping(a[s-5],a[s-2],`hexagon`,this._$);break;case 80:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`odd`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`odd`,this._$);break;case 81:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`trapezoid`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`trapezoid`,this._$);break;case 82:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`inv_trapezoid`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`inv_trapezoid`,this._$);break;case 83:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_right`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`lean_right`,this._$);break;case 84:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_left`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`lean_left`,this._$);break;case 85:this.$=a[s],r.addVertex(a[s]),r.addVertexMapping&&r.addVertexMapping(a[s],void 0,void 0,this._$);break;case 86:a[s-1].text=a[s],this.$=a[s-1];break;case 87:case 88:a[s-2].text=a[s-1],this.$=a[s-2];break;case 89:this.$=a[s];break;case 90:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,edgeSemantic:c.edgeSemantic,text:a[s-1]};break;case 91:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,edgeSemantic:c.edgeSemantic,text:a[s-1],id:a[s-3]};break;case 92:this.$={text:a[s],type:`text`};break;case 93:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 94:this.$={text:a[s],type:`string`};break;case 95:this.$={text:a[s],type:`markdown`};break;case 96:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length,edgeSemantic:c.edgeSemantic};break;case 97:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length,edgeSemantic:c.edgeSemantic,id:a[s-1]};break;case 98:this.$=a[s-1];break;case 99:this.$={text:a[s],type:`text`};break;case 100:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 101:this.$={text:a[s],type:`string`};break;case 102:case 119:this.$={text:a[s],type:`markdown`};break;case 116:this.$={text:a[s],type:`text`};break;case 117:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 118:this.$={text:a[s],type:`text`};break;case 120:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 121:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 122:case 130:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 123:case 131:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 124:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 125:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 126:this.$=a[s-2],r.setLink(a[s-2],a[s]);break;case 127:this.$=a[s-4],r.setLink(a[s-4],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 128:this.$=a[s-4],r.setLink(a[s-4],a[s-2],a[s]);break;case 129:this.$=a[s-6],r.setLink(a[s-6],a[s-4],a[s]),r.setTooltip(a[s-6],a[s-2]);break;case 132:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 133:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 134:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 135:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 136:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 137:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 138:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 139:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 140:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 141:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 142:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 143:case 145:this.$=[a[s]];break;case 144:case 146:a[s-2].push(a[s]),this.$=a[s-2];break;case 148:this.$=a[s-1]+a[s];break;case 196:this.$=a[s];break;case 197:this.$=a[s-1]+``+a[s];break;case 199:this.$=a[s-1]+``+a[s];break;case 200:this.$={stmt:`dir`,value:`TB`};break;case 201:this.$={stmt:`dir`,value:`BT`};break;case 202:this.$={stmt:`dir`,value:`RL`};break;case 203:this.$={stmt:`dir`,value:`LR`};break;case 204:this.$={stmt:`dir`,value:`TD`}}},`anonymous`),table:[{3:1,4:2,8:n,10:r,11:i,13:a},{1:[3]},e(o,s,{5:7}),{4:8,8:n,10:r,11:i,13:a},{4:9,8:n,10:r,11:i,13:a},{4:10,8:n,10:r,11:i,13:a},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},e(o,[2,10]),e(o,[2,11]),e(o,[2,12]),e(o,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:L,16:59,19:62},e(R,[2,3]),e(R,[2,4]),e(R,[2,5]),e(R,[2,6]),e(R,[2,7]),e(R,[2,8]),e(R,[2,9]),{8:z,9:B,10:V,12:H,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:z,9:B,10:V,12:H,22:75},{8:z,9:B,10:V,12:H,22:76},{8:z,9:B,10:V,12:H,22:77},{8:z,9:B,10:V,12:H,22:78},{8:z,9:B,10:V,12:H,22:79},{8:z,9:B,10:V,11:[1,80],12:H,22:81},{8:z,9:B,10:V,12:H,22:82},{11:[1,83]},e(R,[2,48]),{39:[1,84]},{41:[1,85]},e(R,[2,51]),e(re,[2,63],{19:86,34:87,11:L,43:ie}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:ae,47:oe,63:se,83:[1,96],92:ce,98:[1,93],100:[1,94],104:95,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he,123:97},e(R,[2,200]),e(R,[2,201]),e(R,[2,202]),e(R,[2,203]),e(R,[2,204]),e(ge,[2,64]),e(ge,[2,67],{49:[1,109]}),e(U,[2,85],{116:122,30:[1,110],47:y,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:b,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:E,105:D,108:O,109:k,112:A,114:j,117:M,118:N,119:P}),e(W,[2,196]),e(W,[2,157]),e(W,[2,158]),e(W,[2,159]),e(W,[2,160]),e(W,[2,161]),e(W,[2,162]),e(W,[2,163]),e(W,[2,164]),e(W,[2,165]),e(W,[2,166]),e(W,[2,167]),e(o,[2,14]),e(o,[2,20]),e(o,[2,21]),{10:[1,123]},e(o,[2,23]),e(_e,[2,31],{19:124,11:L}),e(R,[2,32]),{45:125,46:44,47:y,48:45,50:46,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},e(R,[2,52]),e(R,[2,53]),e(R,[2,54]),e(R,[2,55]),e(ve,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:ye,84:be,119:xe,122:Se},{78:[1,135],80:[1,136]},e(Ce,[2,96]),e(R,[2,33]),e(R,[2,34]),e(R,[2,35]),e(R,[2,36]),e(R,[2,37]),{11:we,13:Te,15:Ee,28:De,29:137,33:Oe,35:ke,36:Ae,47:je,63:Me,78:Ne,83:Pe,84:Fe,86:150,87:Ie,88:Le,89:Re,90:ze,91:Be,92:Ve,93:He,94:138,108:Ue,112:We,114:Ge,117:Ke,118:qe,119:Je},e(Ye,s,{5:165}),e(Ye,s,{5:166}),{11:we,13:Te,15:Ee,28:De,29:167,33:Oe,35:ke,36:Ae,47:je,63:Me,78:Ne,83:Pe,84:Fe,86:150,87:Ie,88:Le,89:Re,90:ze,91:Be,92:Ve,93:He,94:138,108:Ue,112:We,114:Ge,117:Ke,118:qe,119:Je},e(R,[2,49]),e(R,[2,50]),e(re,[2,61],{47:Xe}),e(re,[2,62],{19:169,11:L,43:Ze}),e(ge,[2,57]),{47:y,50:171,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},{105:[1,172],106:173,108:[1,174]},{47:y,50:175,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},{47:y,50:176,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},e(G,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(G,[2,130],{123:181,11:[1,180],15:ae,47:oe,63:se,92:ce,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he}),e(G,[2,132],{11:[1,182]}),e(K,[2,198]),e(K,[2,185]),e(K,[2,186]),e(K,[2,187]),e(K,[2,188]),e(K,[2,189]),e(K,[2,190]),e(K,[2,191]),e(K,[2,192]),e(K,[2,193]),e(K,[2,194]),e(K,[2,195]),{47:y,50:183,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},{31:184,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:192,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:194,53:[1,193],70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:195,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:196,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:197,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{112:[1,198]},{31:199,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:200,68:[1,201],70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:202,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:203,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:204,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},e(W,[2,197]),e(o,[2,22]),e(_e,[2,30]),e(re,[2,59],{34:205,19:206,11:L,43:ie}),e(ve,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{80:[1,210],82:211,119:xe,122:Se},e(Qe,[2,92]),e(Qe,[2,94]),e(Qe,[2,95]),e(Qe,[2,183]),e(Qe,[2,184]),{79:212,82:130,83:ye,84:be,119:xe,122:Se},e(Ce,[2,97]),{8:z,9:B,10:V,11:we,12:H,13:Te,15:Ee,22:214,28:De,30:[1,213],33:Oe,34:215,35:ke,36:Ae,43:ie,47:je,63:Me,78:Ne,86:150,87:Ie,88:Le,89:Re,90:ze,91:Be,92:Ve,93:He,94:216,108:Ue,112:We,114:Ge,117:Ke,118:qe,119:Je},e($,[2,116]),e($,[2,118]),e($,[2,119]),e($,[2,172]),e($,[2,173]),e($,[2,174]),e($,[2,175]),e($,[2,176]),e($,[2,177]),e($,[2,178]),e($,[2,179]),e($,[2,180]),e($,[2,181]),e($,[2,182]),e($,[2,103]),e($,[2,104]),e($,[2,105]),e($,[2,106]),e($,[2,107]),e($,[2,108]),e($,[2,109]),e($,[2,110]),e($,[2,111]),e($,[2,112]),e($,[2,113]),e($,[2,114]),e($,[2,115]),{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,217],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,218],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},{8:z,9:B,10:V,11:we,12:H,13:Te,15:Ee,22:220,28:De,30:[1,219],33:Oe,34:221,35:ke,36:Ae,43:ie,47:je,63:Me,78:Ne,86:150,87:Ie,88:Le,89:Re,90:ze,91:Be,92:Ve,93:He,94:216,108:Ue,112:We,114:Ge,117:Ke,118:qe,119:Je},{11:L,19:222},{47:[1,223]},e(ge,[2,56]),{11:[1,224],47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:122,117:M,118:N,119:P},{11:[1,225]},{11:[1,226],109:[1,227]},e($e,[2,143]),{11:[1,228],47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:122,117:M,118:N,119:P},{11:[1,229],47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:122,117:M,118:N,119:P},{83:[1,230]},e(G,[2,124],{11:[1,231]}),e(G,[2,126],{11:[1,232]}),{83:[1,233]},e(K,[2,199]),{83:[1,234],101:[1,235]},e(ge,[2,68],{116:122,47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,117:M,118:N,119:P}),{32:[1,236],70:q,85:237,119:X,120:Z,121:Q},e(et,[2,99]),e(et,[2,101]),e(et,[2,102]),e(et,[2,168]),e(et,[2,169]),e(et,[2,170]),e(et,[2,171]),{52:[1,238],70:q,85:237,119:X,120:Z,121:Q},{31:239,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{54:[1,240],70:q,85:237,119:X,120:Z,121:Q},{56:[1,241],70:q,85:237,119:X,120:Z,121:Q},{58:[1,242],70:q,85:237,119:X,120:Z,121:Q},{60:[1,243],70:q,85:237,119:X,120:Z,121:Q},{63:[1,244]},{67:[1,245],70:q,85:237,119:X,120:Z,121:Q},{69:[1,246],70:q,85:237,119:X,120:Z,121:Q},{31:247,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{32:[1,248],70:q,85:237,119:X,120:Z,121:Q},{70:q,72:[1,249],74:[1,250],85:237,119:X,120:Z,121:Q},{70:q,72:[1,252],74:[1,251],85:237,119:X,120:Z,121:Q},e(re,[2,58],{19:169,11:L,43:Ze}),e(re,[2,60],{47:Xe}),e(ve,[2,88]),e(ve,[2,87]),{65:[1,253],70:q,85:237,119:X,120:Z,121:Q},e(ve,[2,90]),e(Qe,[2,93]),{80:[1,254],82:211,119:xe,122:Se},{31:255,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},e(Ye,s,{5:256}),{8:z,9:B,10:V,12:H,22:257,43:Ze},e($,[2,117]),e(R,[2,42]),e(R,[2,43]),{31:258,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},e(R,[2,46]),{8:z,9:B,10:V,12:H,22:259,43:Ze},{46:260,47:y,48:45,50:46,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},{11:L,19:261},{11:tt,63:nt,87:rt,95:262,108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{11:tt,63:nt,87:rt,95:273,107:[1,274],108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{11:tt,63:nt,87:rt,95:275,107:[1,276],108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{108:[1,277]},{11:tt,63:nt,87:rt,95:278,108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{47:y,50:279,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},e(G,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(G,[2,131]),e(G,[2,133],{11:[1,283]}),e(G,[2,134]),e(U,[2,69]),e(et,[2,100]),e(U,[2,70]),{54:[1,284],70:q,85:237,119:X,120:Z,121:Q},e(U,[2,77]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),{112:[1,285]},e(U,[2,76]),e(U,[2,78]),{69:[1,286],70:q,85:237,119:X,120:Z,121:Q},e(U,[2,80]),e(U,[2,81]),e(U,[2,83]),e(U,[2,82]),e(U,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(ve,[2,91]),{32:[1,287],70:q,85:237,119:X,120:Z,121:Q},{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,288],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},e(Ye,s,{5:289}),{32:[1,290],70:q,85:237,119:X,120:Z,121:Q},e(R,[2,47]),e(ge,[2,66]),{46:291,47:y,48:45,50:46,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},e(G,[2,136],{109:lt}),e(ut,[2,145],{111:293,11:tt,63:nt,87:rt,108:it,112:at,113:ot,114:st,115:ct}),e(dt,[2,147]),e(dt,[2,149]),e(dt,[2,150]),e(dt,[2,151]),e(dt,[2,152]),e(dt,[2,153]),e(dt,[2,154]),e(dt,[2,155]),e(dt,[2,156]),e(G,[2,137],{109:lt}),{11:[1,294]},e(G,[2,138],{109:lt}),{11:[1,295]},e($e,[2,144]),e(G,[2,120],{109:lt}),e(G,[2,121],{116:122,47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,117:M,118:N,119:P}),e(G,[2,125]),e(G,[2,127],{11:[1,296]}),e(G,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:z,9:B,10:V,12:H,22:301,34:302,43:ie},e(R,[2,40]),{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,303],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},{8:z,9:B,10:V,12:H,22:304,34:305,43:ie},e(ge,[2,65]),{11:tt,63:nt,87:rt,108:it,110:306,111:264,112:at,113:ot,114:st,115:ct},e(dt,[2,148]),{15:ae,47:oe,63:se,92:ce,104:307,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he,123:97},{15:ae,47:oe,63:se,92:ce,104:308,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he,123:97},{101:[1,309]},e(G,[2,135]),e(U,[2,71]),{31:310,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},e(U,[2,79]),e(Ye,s,{5:311}),{8:z,9:B,10:V,12:H,22:312,43:Ze},e(R,[2,41]),e(R,[2,44]),{8:z,9:B,10:V,12:H,22:313,43:Ze},e(ut,[2,146],{111:293,11:tt,63:nt,87:rt,108:it,112:at,113:ot,114:st,115:ct}),e(G,[2,141],{123:181,11:[1,314],15:ae,47:oe,63:se,92:ce,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he}),e(G,[2,142],{123:181,11:[1,315],15:ae,47:oe,63:se,92:ce,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he}),e(G,[2,129]),{32:[1,316],70:q,85:237,119:X,120:Z,121:Q},{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,317],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},e(Ye,s,{5:318}),e(R,[2,45]),{11:tt,63:nt,87:rt,95:319,108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{11:tt,63:nt,87:rt,95:320,108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},e(U,[2,75]),e(R,[2,38]),{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,321],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},e(G,[2,139],{109:lt}),e(G,[2,140],{109:lt}),e(R,[2,39])],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,t,r){let i=this.isLinkData(r)?r.id.replace(`@`,``):void 0;n.info(`addLink`,e,t,i);for(let n of e)for(let a of t){let o=n===e[e.length-1],s=a===t[0];o&&s?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{if(e==="default"){this.edges.defaultInterpolate=t;return}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.)`);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=`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(m().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{v.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=v.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}isToolDefinition(e){return oe.has(e.type)}getTools(){let e=[];for(let t of this.vertices.values())this.isToolDefinition(t)&&e.push(t);return e}getClasses(){return this.classes}setupToolTips(t){let n=k();r(t).select(`svg`).selectAll(`g.node`).on(`mouseover`,t=>{let i=r(t.currentTarget),a=i.attr(`title`);if(a===null)return;let o=t.currentTarget?.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.text(i.attr(`title`)).style(`left`,window.scrollX+o.left+(o.right-o.left)/2+`px`).style(`top`,window.scrollY+o.bottom+`px`),n.html(e.sanitize(a)),i.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),r(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.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=m(),this.diagramId=``,this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,s()}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,r,i,a){let o=e?.text?.trim(),s=i?.text;e===i&&i?.text&&/\s/.exec(i.text)&&(o=void 0);let c=t(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`)(r.flat()),l=c.nodeList,u=c.dir,d=m().flowchart??{};if(u??=d.inheritDir?this.getDirection()??m().direction??void 0:void 0,this.version===`gen-1`)for(let e=0;ee!==o&&!this.globalNodes.has(e)),title:s.trim(),classes:[],dir:u,labelType:this.sanitizeNodeLabelType(i?.type),type:a??`flow`};n.info(`Adding`,f.id,f.nodes,f.dir),f.nodes=this.makeUniq(f,this.subGraphs).nodes;let p=this.getPosForId(o);if(p!==-1){let e=this.subGraphs[p];for(let t of f.nodes)e.nodes.includes(t)||e.nodes.push(t);f.title&&(e.title=f.title),f.dir&&(e.dir=f.dir),f.type&&(e.type=f.type),this.subGraphLookup.set(o,e)}else this.subGraphs.push(f),this.subGraphLookup.set(o,f);return o}addGlobal(e){for(let t of e.flat()){if(typeof t!=`string`)continue;let e=t.trim();e!==``&&this.globalNodes.add(e)}for(let e of this.subGraphs)e.nodes=e.nodes.filter(e=>!this.globalNodes.has(e))}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=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)}addConnector(e,t){let n=e?.text?.trim();if(!n)return``;let r=t?.text?.trim()??``,i=r.length>0?this.sanitizeText(r):n,a=this.connectors.get(n);return a?r.length>0&&(a.text=i):(a={id:n,labelType:`text`,domId:ie+n+`-`+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:i},this.connectors.set(n,a),this.vertices.set(n,a),this.vertexCounter++),n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}computeEdgeSemantic(e,t){if(e===`arrow_point`&&t===`normal`)return`sequence`;if(e===`arrow_cross`&&t===`normal`)return`failure`;if(e===`arrow_open`&&t===`dotted`)return`reference`}destructStartLink(e){let t=e.trim(),n=`normal`;return t.includes(`.`)&&(n=`dotted`),{type:`arrow_open`,stroke:n}}countChar(e,t){let n=t.length,r=0;for(let i=0;i`:r=`arrow_point`;break;case`-`:case`.`:r=`arrow_open`,n=t}let i=`normal`,a=n.length-1,o=this.countChar(`.`,n);return o>0&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}destructLink(e,t){let n=this.destructEndLink(e),r;return t?(r=this.destructStartLink(t),r.stroke===n.stroke?(r.type=n.type,r.length=n.length,{...r,edgeSemantic:this.computeEdgeSemantic(r.type,r.stroke)}):{type:`INVALID`,stroke:`INVALID`}):{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}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){let t=typeof e.type==`string`?I(e.type):e.type;switch(t){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;case`ellipse`:return`ellipse`;default:return t}}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`:case`arrow_hierarchy`: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,c=this.findNode(t,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.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),metadata:e.metadata};s?t.push({...n,isGroup:!0,shape:`rect`}):t.push({...n,isGroup:!1,shape:this.getTypeFromVertex(e),wrappingWidth:i.agentflow?.wrappingWidth,minWidth:i.agentflow?.minNodeWidth})}}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}runPostParseValidators(){this.postParseValidationRun||=!0}getData(){this.runPostParseValidators();let e=m(),n=[],r=[],i=this.getSubGraphs(),a=new Map,o=new Map,s=new Set,c=new Map,l=t((e,t,n=new Set)=>{if(n.has(e))return;n.add(e);let r=this.subGraphLookup.get(e);if(r)for(let e of r.nodes)e===t||n.has(e)||(s.add(e),c.set(e,t),l(e,t,n))},`collectDescendants`);for(let e of i)e.metadata?.view===`collapsed`&&!s.has(e.id)&&l(e.id,e.id);let u=t((e,t)=>{let n=new Set,r=t;for(;r!==void 0&&!n.has(r);){if(r===e)return!0;n.add(r),r=a.get(r)}return!1},`wouldCloseContainmentCycle`);for(let e=i.length-1;e>=0;e--){let t=i[e];if(!s.has(t.id)){t.nodes.length>0&&o.set(t.id,!0);for(let e of t.nodes){if(u(e,t.id)){this.emitWarning(M.CONTAINMENT_VIOLATION,`Container "${t.id}" cannot contain "${e}" because "${e}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:e});continue}a.set(e,t.id)}}}for(let t=i.length-1;t>=0;t--){let r=i[t];if(!s.has(r.id))if(r.metadata?.view===`collapsed`){let t={...r.metadata,containerType:r.type};n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`collapsedGroup`,dir:r.dir,isGroup:!1,look:e.look,metadata:t})}else n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:se[r.type??`flow`],dir:r.dir,isGroup:!0,look:e.look,metadata:r.metadata})}this.getVertices().forEach(t=>{s.has(t.id)||this.addNodeFromVertex(t,n,a,o,e,e.look||`classic`)});let d=this.getEdges();d.forEach((t,n)=>{let i=c.get(t.start)??t.start,a=c.get(t.end)??t.end;if(i===a&&t.start!==t.end)return;let{arrowTypeStart:o,arrowTypeEnd:s}=this.destructEdgeType(t.type),l=[...d.defaultStyle??[]];t.style&&l.push(...t.style);let u={id:_(i,a,{counter:n,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:i,end:a,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`:o,arrowTypeEnd:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:s,arrowheadStyle:`fill: #333`,cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:l,style:l,pattern:t.stroke,look:e.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve,metadata:t.metadata};r.push(u)}),ne(n,this);let f=new Map,p=new Map;for(let e of i){let t=a.get(e.id);t!==void 0&&p.set(t,[...p.get(t)??[],e.id])}let h=0,g=t(e=>{if(!f.has(e)){f.set(e,h++);for(let t of p.get(e)??[])g(t)}},`walkContainers`);for(let e of i)a.get(e.id)===void 0&&g(e.id);let v=new Set(this.getConnectors().map(e=>e.id));return re(n,e=>{if(v.has(e))return`connector`;let t=this.vertices.get(e);return t?this.deriveVertexKind(t,I(t.type)):void 0},f),{nodes:n,edges:r,other:{},config:e,connectors:this.getConnectors()}}defaultConfig(){return c.flowchart}deriveVertexKind(e,t){return this.isToolDefinition(e)?`tool`:t===`hexagon`||t===`hex`?`action`:t===`lean-right`||t===`lean_right`?`input`:t===`lin-doc`||t===`lined-document`?`refdoc`:t===`diamond`?`decision`:`task`}getSemanticModel(){this.runPostParseValidators();let e=new Set(this.subGraphs.map(e=>e.id)),t=[],n=[];for(let[r,i]of this.vertices){if(e.has(r))continue;if(i.isConnector){let e={id:r};if(i.text!==void 0&&i.text!==r&&(e.title=i.text),i.metadata&&Object.keys(i.metadata).length>0){let t={};for(let[e,n]of Object.entries(i.metadata))ae.has(e)||(t[e]=n);Object.keys(t).length>0&&(e.metadata=t)}n.push(e);continue}let a={id:r};i.text!==void 0&&(a.label=i.text);let o=typeof i.type==`string`?I(i.type):i.type;if(o!==void 0&&(a.shape=o),a.vertexKind=this.deriveVertexKind(i,o),i.metadata&&Object.keys(i.metadata).length>0){let e={};for(let[t,n]of Object.entries(i.metadata))ae.has(t)||(e[t]=n);Object.keys(e).length>0&&(a.metadata=e)}t.push(a)}let r={vertices:t,edges:this.edges.map(e=>{let t={start:e.start,end:e.end};return e.id!==void 0&&(t.id=e.id),typeof e.text==`string`&&e.text.length>0&&(t.label=e.text),e.type!==void 0&&(t.type=e.type),e.stroke!==void 0&&(t.stroke=e.stroke),e.edgeSemantic!==void 0&&(t.edgeSemantic=e.edgeSemantic),e.length!==void 0&&(t.length=e.length),e.metadata&&Object.keys(e.metadata).length>0&&(t.metadata={...e.metadata}),t}),subGraphs:this.subGraphs.map(e=>{let t={id:e.id,nodes:[...e.nodes]};if(e.type!==void 0&&(t.type=e.type),e.title!==void 0&&(t.title=e.title),e.dir!==void 0&&(t.direction=e.dir),e.metadata&&Object.keys(e.metadata).length>0){let n={};for(let[t,r]of Object.entries(e.metadata))ae.has(t)||(n[t]=r);Object.keys(n).length>0&&(t.metadata=n)}return t}),connectors:n,diagnostics:this.diagnostics};return this.direction!==void 0&&(r.direction=this.direction),r}setFrontmatterLineOffset(e){this.frontmatterLineOffset=e??0}toElementPosition(e){let t=e?.first_line??0,n=e?.first_column??0,r=e?.last_line??t,i=e?.last_column??n,[a,o]=e?.range??[0,0];return{startLine:t+this.frontmatterLineOffset,startColumn:n,endLine:r+this.frontmatterLineOffset,endColumn:i,startIndex:a,endIndex:o}}pushMapping(e,t,n){if(!e)return;let r={id:e,type:t,position:this.toElementPosition(n)};return this.elementMappings.push(r),r}addVertexMapping(e,t,n,r){let i=this.pushMapping(e,`vertex`,r);i&&n==null&&this.bareVertexMappings.add(i)}extendVertexMapping(e,t){if(!e||!t)return;let n=this.toElementPosition(t);for(let t=this.elementMappings.length-1;t>=0;t--){let r=this.elementMappings[t];if(r.type===`vertex`&&r.id===e){this.bareVertexMappings.has(r)&&(r.type=`attachment`,this.bareVertexMappings.delete(r)),(n.endLine>r.position.endLine||n.endLine===r.position.endLine&&n.endColumn>r.position.endColumn)&&(r.position.endLine=n.endLine,r.position.endColumn=n.endColumn,r.position.endIndex=n.endIndex);return}}this.pushMapping(e,`attachment`,t)}addEdgeMapping(e,t,n,r){let i=Array.isArray(t)?t.map(e=>typeof e==`string`?e:e?.id??``).filter(Boolean):[],a=i.length>0?i.join(`>`):`edge`;this.pushMapping(a,`edge`,r)}addSubgraphMapping(e,t,n,r){let i=(typeof e==`string`?e:e?.text)??``,a=this.toElementPosition(n),o=r?this.toElementPosition(r):a;i&&this.elementMappings.push({id:i,type:`subgraph`,position:{startLine:a.startLine,startColumn:a.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:a.startIndex,endIndex:o.endIndex}})}addConnectorMapping(e,t,n,r){let i=e?.text?.trim()??``;if(!i)return;let a=this.toElementPosition(n),o=r?this.toElementPosition(r):a;this.elementMappings.push({id:i,type:`connector`,position:{startLine:a.startLine,startColumn:a.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:a.startIndex,endIndex:o.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(e){return this.elementMappings.find(t=>t.id===e)}getElementsOnLine(e){return this.elementMappings.filter(t=>e>=t.position.startLine&&e<=t.position.endLine)}getElementAtPosition(e,n){let r=this.elementMappings.filter(t=>{let{startLine:r,startColumn:i,endLine:a,endColumn:o}=t.position;return!(ea||e===r&&no)});if(r.length===0)return;let i=t(({position:e})=>[e.endLine-e.startLine,e.endColumn-e.startColumn],`span`);return r.reduce((e,t)=>{let[n,r]=i(e),[a,o]=i(t);return a===n?oe.id===s.id&&e.severity===s.severity&&e.message===s.message&&e.nodeId===s.nodeId&&e.edgeId===s.edgeId))return;this.diagnostics.push(s);let c=`agentflow[${e}]: ${r}`;t===`error`?n.error(c):n.warn(c)}emitWarning(e,t,n){this.emitDiagnostic(e,`warning`,t,n)}emitError(e,t,n){this.emitDiagnostic(e,`error`,t,n)}getDiagnostics(){return[...this.diagnostics]}},de={getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(e,t,r,i){n.debug(`Drawing agentflow diagram`,t);let{securityLevel:a,agentflow:o,layout:s}=m();i.db.setDiagramId(t),n.debug(`Before getData: `);let c=i.db.getData();n.debug(`Data: `,c);let l=A(t,a),u=i.db.getDirection();c.type=i.type,c.layoutAlgorithm=D(s),c.layoutAlgorithm===`dagre`&&s===`elk`&&n.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."),c.direction=u,c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`point`,`circle`,`cross`,`hierarchy`],c.diagramId=t,n.debug(`REF1:`,c),await E(c,l);let d=o?.diagramPadding??8;v.insertTitle(l,`agentflowTitleText`,o?.titleTopMargin??0,i.db.getDiagramTitle()),j(l,d,`agentflow`,o?.useMaxWidth??!0)},`draw`)},fe=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,5],r=[1,4],i=[1,3],a=[1,6],o=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],s=[2,2],c=[1,15],l=[1,16],u=[1,17],d=[1,18],f=[1,19],p=[1,26],m=[1,27],h=[1,28],g=[1,30],_=[1,31],v=[1,32],y=[1,55],b=[1,54],x=[1,34],S=[1,35],C=[1,36],w=[1,37],T=[1,38],E=[1,50],D=[1,52],O=[1,48],k=[1,53],A=[1,49],j=[1,56],M=[1,51],N=[1,57],P=[1,58],ee=[1,39],te=[1,40],F=[1,41],I=[1,42],ne=[1,43],L=[1,64],R=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],z=[1,70],B=[1,68],V=[1,67],H=[1,69],re=[8,9,10,12,78,80,81],ie=[1,88],ae=[1,101],oe=[1,106],se=[1,105],ce=[1,102],le=[1,98],ue=[1,104],de=[1,100],fe=[1,107],pe=[1,103],me=[1,108],he=[1,99],ge=[8,9,10,11,12,43,78,80,81],U=[8,9,10,11,12,43,49,78,80,81],W=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],_e=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],ve=[47,63,92,105,108,109,112,114,117,118,119],ye=[1,131],be=[1,132],xe=[1,134],Se=[1,133],Ce=[47,63,65,77,92,105,108,109,112,114,117,118,119],we=[1,143],Te=[1,157],Ee=[1,158],De=[1,159],Oe=[1,162],ke=[1,161],Ae=[1,160],je=[1,145],Me=[1,147],Ne=[1,151],Pe=[1,139],Fe=[1,140],Ie=[1,152],Le=[1,153],Re=[1,154],ze=[1,155],Be=[1,156],Ve=[1,163],He=[1,164],Ue=[1,141],We=[1,142],Ge=[1,149],Ke=[1,144],qe=[1,148],Je=[1,146],Ye=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Xe=[1,168],Ze=[1,170],G=[8,9,10,12],K=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],q=[1,190],J=[1,186],Y=[1,187],X=[1,191],Z=[1,188],Q=[1,189],Qe=[80,119,122],$=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],$e=[11,109],et=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],tt=[1,269],nt=[1,267],rt=[1,271],it=[1,265],at=[1,266],ot=[1,268],st=[1,270],ct=[1,272],lt=[1,292],ut=[8,9,10,12,109],dt=[8,9,10,11,12,63,87,108,109,112,113,114,115],ft={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:`error`,8:`COMMENT`,9:`SEMI`,10:`NEWLINE`,11:`SPACE`,12:`EOF`,13:`GRAPH`,14:`NODIR`,15:`DIR`,28:`flow`,30:`SQS`,32:`SQE`,33:`end`,35:`global`,36:`connector`,38:`acc_title`,39:`acc_title_value`,40:`acc_descr`,41:`acc_descr_value`,42:`acc_descr_multiline_value`,43:`SHAPE_DATA`,47:`AMP`,49:`STYLE_SEPARATOR`,51:`DOUBLECIRCLESTART`,52:`DOUBLECIRCLEEND`,53:`PS`,54:`PE`,55:`(-`,56:`-)`,57:`STADIUMSTART`,58:`STADIUMEND`,59:`SUBROUTINESTART`,60:`SUBROUTINEEND`,61:`VERTEX_WITH_PROPS_START`,62:`NODE_STRING[field]`,63:`COLON`,64:`NODE_STRING[value]`,65:`PIPE`,66:`CYLINDERSTART`,67:`CYLINDEREND`,68:`DIAMOND_START`,69:`DIAMOND_STOP`,70:`TAGEND`,71:`TRAPSTART`,72:`TRAPEND`,73:`INVTRAPSTART`,74:`INVTRAPEND`,77:`TESTSTR`,78:`START_LINK`,80:`LINK`,81:`LINK_ID`,83:`STR`,84:`MD_STR`,87:`STYLE`,88:`LINKSTYLE`,89:`CLASSDEF`,90:`CLASS`,91:`CLICK`,92:`DOWN`,93:`UP`,96:`idString[vertex]`,97:`idString[class]`,98:`CALLBACKNAME`,99:`CALLBACKARGS`,100:`HREF`,101:`LINK_TARGET`,102:`STR[link]`,103:`STR[tooltip]`,105:`DEFAULT`,107:`INTERPOLATE`,108:`NUM`,109:`COMMA`,112:`NODE_STRING`,113:`UNIT`,114:`BRKT`,115:`PCT`,117:`MINUS`,118:`MULT`,119:`UNICODE_TEXT`,120:`TEXT`,121:`TAGSTART`,122:`EDGE_TEXT`,124:`direction_tb`,125:`direction_bt`,126:`direction_rl`,127:`direction_lr`,128:`direction_td`},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:t(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 198:this.$=a[s];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:r.setDirection(`TB`),this.$=`TB`;break;case 14:r.setDirection(a[s-1]),this.$=a[s-1];break;case 32:this.$=a[s-1].nodes;break;case 38:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4],`flow`),r.addSubgraphMapping&&r.addSubgraphMapping(a[s-6],a[s-4],o[s-8],o[s]);break;case 39:this.$=r.addSubGraph(a[s-7],a[s-1],a[s-5],`flow`),r.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,a[s-3],o[s-3]),r.addSubgraphMapping&&r.addSubgraphMapping(a[s-7],a[s-5],o[s-9],o[s]);break;case 40:this.$=r.addSubGraph(a[s-3],a[s-1],{text:``,type:`text`},`flow`),r.addSubgraphMapping&&r.addSubgraphMapping(a[s-3],{text:``,type:`text`},o[s-5],o[s]);break;case 41:this.$=r.addSubGraph(a[s-4],a[s-1],{text:``,type:`text`},`flow`),r.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,a[s-3],o[s-3]),r.addSubgraphMapping&&r.addSubgraphMapping(a[s-4],{text:``,type:`text`},o[s-6],o[s]);break;case 42:this.$=r.addSubGraph(void 0,a[s-1],void 0,`flow`),r.addSubgraphMapping&&r.addSubgraphMapping(void 0,void 0,o[s-3],o[s]);break;case 43:r.addGlobal(a[s-1]),this.$=[];break;case 44:this.$=r.addConnector(a[s-4],a[s-2]),r.addConnectorMapping&&r.addConnectorMapping(a[s-4],a[s-2],o[s-6],o[s]);break;case 45:this.$=r.addConnector(a[s-5],a[s-3]),r.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,a[s-1],o[s-1]),r.addConnectorMapping&&r.addConnectorMapping(a[s-5],a[s-3],o[s-7],o[s]);break;case 46:this.$=r.addConnector(a[s-1],{text:``,type:`text`}),r.addConnectorMapping&&r.addConnectorMapping(a[s-1],{text:``,type:`text`},o[s-3],o[s]);break;case 47:this.$=r.addConnector(a[s-2],{text:``,type:`text`}),r.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,a[s-1],o[s-1]),r.addConnectorMapping&&r.addConnectorMapping(a[s-2],{text:``,type:`text`},o[s-4],o[s]);break;case 49:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 50:case 51:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 56:this.$=a[s-1]+a[s];break;case 57:this.$=a[s];break;case 58:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s],o[s]),r.extendVertexMapping&&r.extendVertexMapping(a[s-1][a[s-1].length-1],o[s]),r.addLink(a[s-3].stmt,a[s-1],a[s-2]),r.addEdgeMapping&&r.addEdgeMapping(a[s-3].stmt,a[s-1],a[s-2],this._$),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 59:r.addLink(a[s-2].stmt,a[s],a[s-1]),r.addEdgeMapping&&r.addEdgeMapping(a[s-2].stmt,a[s],a[s-1],this._$),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 60:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),r.addEdgeMapping&&r.addEdgeMapping(a[s-3].stmt,a[s-1],a[s-2],this._$),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 61:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 62:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s],o[s]),r.extendVertexMapping&&r.extendVertexMapping(a[s-1][a[s-1].length-1],o[s]),this.$={stmt:a[s-1],nodes:a[s-1],shapeData:a[s]};break;case 63:this.$={stmt:a[s],nodes:a[s]};break;case 64:this.$=[a[s]];break;case 65: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],o[s-4]),r.extendVertexMapping&&r.extendVertexMapping(a[s-5][a[s-5].length-1],o[s-4]),this.$=a[s-5].concat(a[s]);break;case 66:this.$=a[s-4].concat(a[s]);break;case 67:this.$=a[s];break;case 68:this.$=a[s-2],r.setClass(a[s-2],a[s]);break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`square`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`square`,this._$);break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`doublecircle`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`doublecircle`,this._$);break;case 71:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`circle`),r.addVertexMapping&&r.addVertexMapping(a[s-5],a[s-2],`circle`,this._$);break;case 72:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`ellipse`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`ellipse`,this._$);break;case 73:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`stadium`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`stadium`,this._$);break;case 74:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`subroutine`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`subroutine`,this._$);break;case 75: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]]])),r.addVertexMapping&&r.addVertexMapping(a[s-7],a[s-1],`rect`,this._$);break;case 76:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`cylinder`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`cylinder`,this._$);break;case 77:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`round`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`round`,this._$);break;case 78:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`diamond`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`diamond`,this._$);break;case 79:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`hexagon`),r.addVertexMapping&&r.addVertexMapping(a[s-5],a[s-2],`hexagon`,this._$);break;case 80:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`odd`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`odd`,this._$);break;case 81:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`trapezoid`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`trapezoid`,this._$);break;case 82:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`inv_trapezoid`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`inv_trapezoid`,this._$);break;case 83:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_right`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`lean_right`,this._$);break;case 84:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_left`),r.addVertexMapping&&r.addVertexMapping(a[s-3],a[s-1],`lean_left`,this._$);break;case 85:this.$=a[s],r.addVertex(a[s]),r.addVertexMapping&&r.addVertexMapping(a[s],void 0,void 0,this._$);break;case 86:a[s-1].text=a[s],this.$=a[s-1];break;case 87:case 88:a[s-2].text=a[s-1],this.$=a[s-2];break;case 89:this.$=a[s];break;case 90:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,edgeSemantic:c.edgeSemantic,text:a[s-1]};break;case 91:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,edgeSemantic:c.edgeSemantic,text:a[s-1],id:a[s-3]};break;case 92:this.$={text:a[s],type:`text`};break;case 93:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 94:this.$={text:a[s],type:`string`};break;case 95:this.$={text:a[s],type:`markdown`};break;case 96:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length,edgeSemantic:c.edgeSemantic};break;case 97:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length,edgeSemantic:c.edgeSemantic,id:a[s-1]};break;case 98:this.$=a[s-1];break;case 99:this.$={text:a[s],type:`text`};break;case 100:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 101:this.$={text:a[s],type:`string`};break;case 102:case 119:this.$={text:a[s],type:`markdown`};break;case 116:this.$={text:a[s],type:`text`};break;case 117:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 118:this.$={text:a[s],type:`text`};break;case 120:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 121:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 122:case 130:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 123:case 131:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 124:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 125:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 126:this.$=a[s-2],r.setLink(a[s-2],a[s]);break;case 127:this.$=a[s-4],r.setLink(a[s-4],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 128:this.$=a[s-4],r.setLink(a[s-4],a[s-2],a[s]);break;case 129:this.$=a[s-6],r.setLink(a[s-6],a[s-4],a[s]),r.setTooltip(a[s-6],a[s-2]);break;case 132:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 133:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 134:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 135:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 136:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 137:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 138:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 139:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 140:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 141:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 142:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 143:case 145:this.$=[a[s]];break;case 144:case 146:a[s-2].push(a[s]),this.$=a[s-2];break;case 148:this.$=a[s-1]+a[s];break;case 196:this.$=a[s];break;case 197:this.$=a[s-1]+``+a[s];break;case 199:this.$=a[s-1]+``+a[s];break;case 200:this.$={stmt:`dir`,value:`TB`};break;case 201:this.$={stmt:`dir`,value:`BT`};break;case 202:this.$={stmt:`dir`,value:`RL`};break;case 203:this.$={stmt:`dir`,value:`LR`};break;case 204:this.$={stmt:`dir`,value:`TD`}}},`anonymous`),table:[{3:1,4:2,8:n,10:r,11:i,13:a},{1:[3]},e(o,s,{5:7}),{4:8,8:n,10:r,11:i,13:a},{4:9,8:n,10:r,11:i,13:a},{4:10,8:n,10:r,11:i,13:a},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},e(o,[2,10]),e(o,[2,11]),e(o,[2,12]),e(o,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:L,16:59,19:62},e(R,[2,3]),e(R,[2,4]),e(R,[2,5]),e(R,[2,6]),e(R,[2,7]),e(R,[2,8]),e(R,[2,9]),{8:z,9:B,10:V,12:H,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:z,9:B,10:V,12:H,22:75},{8:z,9:B,10:V,12:H,22:76},{8:z,9:B,10:V,12:H,22:77},{8:z,9:B,10:V,12:H,22:78},{8:z,9:B,10:V,12:H,22:79},{8:z,9:B,10:V,11:[1,80],12:H,22:81},{8:z,9:B,10:V,12:H,22:82},{11:[1,83]},e(R,[2,48]),{39:[1,84]},{41:[1,85]},e(R,[2,51]),e(re,[2,63],{19:86,34:87,11:L,43:ie}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:ae,47:oe,63:se,83:[1,96],92:ce,98:[1,93],100:[1,94],104:95,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he,123:97},e(R,[2,200]),e(R,[2,201]),e(R,[2,202]),e(R,[2,203]),e(R,[2,204]),e(ge,[2,64]),e(ge,[2,67],{49:[1,109]}),e(U,[2,85],{116:122,30:[1,110],47:y,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:b,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:E,105:D,108:O,109:k,112:A,114:j,117:M,118:N,119:P}),e(W,[2,196]),e(W,[2,157]),e(W,[2,158]),e(W,[2,159]),e(W,[2,160]),e(W,[2,161]),e(W,[2,162]),e(W,[2,163]),e(W,[2,164]),e(W,[2,165]),e(W,[2,166]),e(W,[2,167]),e(o,[2,14]),e(o,[2,20]),e(o,[2,21]),{10:[1,123]},e(o,[2,23]),e(_e,[2,31],{19:124,11:L}),e(R,[2,32]),{45:125,46:44,47:y,48:45,50:46,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},e(R,[2,52]),e(R,[2,53]),e(R,[2,54]),e(R,[2,55]),e(ve,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:ye,84:be,119:xe,122:Se},{78:[1,135],80:[1,136]},e(Ce,[2,96]),e(R,[2,33]),e(R,[2,34]),e(R,[2,35]),e(R,[2,36]),e(R,[2,37]),{11:we,13:Te,15:Ee,28:De,29:137,33:Oe,35:ke,36:Ae,47:je,63:Me,78:Ne,83:Pe,84:Fe,86:150,87:Ie,88:Le,89:Re,90:ze,91:Be,92:Ve,93:He,94:138,108:Ue,112:We,114:Ge,117:Ke,118:qe,119:Je},e(Ye,s,{5:165}),e(Ye,s,{5:166}),{11:we,13:Te,15:Ee,28:De,29:167,33:Oe,35:ke,36:Ae,47:je,63:Me,78:Ne,83:Pe,84:Fe,86:150,87:Ie,88:Le,89:Re,90:ze,91:Be,92:Ve,93:He,94:138,108:Ue,112:We,114:Ge,117:Ke,118:qe,119:Je},e(R,[2,49]),e(R,[2,50]),e(re,[2,61],{47:Xe}),e(re,[2,62],{19:169,11:L,43:Ze}),e(ge,[2,57]),{47:y,50:171,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},{105:[1,172],106:173,108:[1,174]},{47:y,50:175,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},{47:y,50:176,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},e(G,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(G,[2,130],{123:181,11:[1,180],15:ae,47:oe,63:se,92:ce,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he}),e(G,[2,132],{11:[1,182]}),e(K,[2,198]),e(K,[2,185]),e(K,[2,186]),e(K,[2,187]),e(K,[2,188]),e(K,[2,189]),e(K,[2,190]),e(K,[2,191]),e(K,[2,192]),e(K,[2,193]),e(K,[2,194]),e(K,[2,195]),{47:y,50:183,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},{31:184,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:192,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:194,53:[1,193],70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:195,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:196,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:197,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{112:[1,198]},{31:199,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:200,68:[1,201],70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:202,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:203,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{31:204,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},e(W,[2,197]),e(o,[2,22]),e(_e,[2,30]),e(re,[2,59],{34:205,19:206,11:L,43:ie}),e(ve,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{80:[1,210],82:211,119:xe,122:Se},e(Qe,[2,92]),e(Qe,[2,94]),e(Qe,[2,95]),e(Qe,[2,183]),e(Qe,[2,184]),{79:212,82:130,83:ye,84:be,119:xe,122:Se},e(Ce,[2,97]),{8:z,9:B,10:V,11:we,12:H,13:Te,15:Ee,22:214,28:De,30:[1,213],33:Oe,34:215,35:ke,36:Ae,43:ie,47:je,63:Me,78:Ne,86:150,87:Ie,88:Le,89:Re,90:ze,91:Be,92:Ve,93:He,94:216,108:Ue,112:We,114:Ge,117:Ke,118:qe,119:Je},e($,[2,116]),e($,[2,118]),e($,[2,119]),e($,[2,172]),e($,[2,173]),e($,[2,174]),e($,[2,175]),e($,[2,176]),e($,[2,177]),e($,[2,178]),e($,[2,179]),e($,[2,180]),e($,[2,181]),e($,[2,182]),e($,[2,103]),e($,[2,104]),e($,[2,105]),e($,[2,106]),e($,[2,107]),e($,[2,108]),e($,[2,109]),e($,[2,110]),e($,[2,111]),e($,[2,112]),e($,[2,113]),e($,[2,114]),e($,[2,115]),{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,217],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,218],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},{8:z,9:B,10:V,11:we,12:H,13:Te,15:Ee,22:220,28:De,30:[1,219],33:Oe,34:221,35:ke,36:Ae,43:ie,47:je,63:Me,78:Ne,86:150,87:Ie,88:Le,89:Re,90:ze,91:Be,92:Ve,93:He,94:216,108:Ue,112:We,114:Ge,117:Ke,118:qe,119:Je},{11:L,19:222},{47:[1,223]},e(ge,[2,56]),{11:[1,224],47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:122,117:M,118:N,119:P},{11:[1,225]},{11:[1,226],109:[1,227]},e($e,[2,143]),{11:[1,228],47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:122,117:M,118:N,119:P},{11:[1,229],47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:122,117:M,118:N,119:P},{83:[1,230]},e(G,[2,124],{11:[1,231]}),e(G,[2,126],{11:[1,232]}),{83:[1,233]},e(K,[2,199]),{83:[1,234],101:[1,235]},e(ge,[2,68],{116:122,47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,117:M,118:N,119:P}),{32:[1,236],70:q,85:237,119:X,120:Z,121:Q},e(et,[2,99]),e(et,[2,101]),e(et,[2,102]),e(et,[2,168]),e(et,[2,169]),e(et,[2,170]),e(et,[2,171]),{52:[1,238],70:q,85:237,119:X,120:Z,121:Q},{31:239,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{54:[1,240],70:q,85:237,119:X,120:Z,121:Q},{56:[1,241],70:q,85:237,119:X,120:Z,121:Q},{58:[1,242],70:q,85:237,119:X,120:Z,121:Q},{60:[1,243],70:q,85:237,119:X,120:Z,121:Q},{63:[1,244]},{67:[1,245],70:q,85:237,119:X,120:Z,121:Q},{69:[1,246],70:q,85:237,119:X,120:Z,121:Q},{31:247,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},{32:[1,248],70:q,85:237,119:X,120:Z,121:Q},{70:q,72:[1,249],74:[1,250],85:237,119:X,120:Z,121:Q},{70:q,72:[1,252],74:[1,251],85:237,119:X,120:Z,121:Q},e(re,[2,58],{19:169,11:L,43:Ze}),e(re,[2,60],{47:Xe}),e(ve,[2,88]),e(ve,[2,87]),{65:[1,253],70:q,85:237,119:X,120:Z,121:Q},e(ve,[2,90]),e(Qe,[2,93]),{80:[1,254],82:211,119:xe,122:Se},{31:255,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},e(Ye,s,{5:256}),{8:z,9:B,10:V,12:H,22:257,43:Ze},e($,[2,117]),e(R,[2,42]),e(R,[2,43]),{31:258,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},e(R,[2,46]),{8:z,9:B,10:V,12:H,22:259,43:Ze},{46:260,47:y,48:45,50:46,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},{11:L,19:261},{11:tt,63:nt,87:rt,95:262,108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{11:tt,63:nt,87:rt,95:273,107:[1,274],108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{11:tt,63:nt,87:rt,95:275,107:[1,276],108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{108:[1,277]},{11:tt,63:nt,87:rt,95:278,108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{47:y,50:279,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},e(G,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(G,[2,131]),e(G,[2,133],{11:[1,283]}),e(G,[2,134]),e(U,[2,69]),e(et,[2,100]),e(U,[2,70]),{54:[1,284],70:q,85:237,119:X,120:Z,121:Q},e(U,[2,77]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),{112:[1,285]},e(U,[2,76]),e(U,[2,78]),{69:[1,286],70:q,85:237,119:X,120:Z,121:Q},e(U,[2,80]),e(U,[2,81]),e(U,[2,83]),e(U,[2,82]),e(U,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(ve,[2,91]),{32:[1,287],70:q,85:237,119:X,120:Z,121:Q},{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,288],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},e(Ye,s,{5:289}),{32:[1,290],70:q,85:237,119:X,120:Z,121:Q},e(R,[2,47]),e(ge,[2,66]),{46:291,47:y,48:45,50:46,63:b,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P},e(G,[2,136],{109:lt}),e(ut,[2,145],{111:293,11:tt,63:nt,87:rt,108:it,112:at,113:ot,114:st,115:ct}),e(dt,[2,147]),e(dt,[2,149]),e(dt,[2,150]),e(dt,[2,151]),e(dt,[2,152]),e(dt,[2,153]),e(dt,[2,154]),e(dt,[2,155]),e(dt,[2,156]),e(G,[2,137],{109:lt}),{11:[1,294]},e(G,[2,138],{109:lt}),{11:[1,295]},e($e,[2,144]),e(G,[2,120],{109:lt}),e(G,[2,121],{116:122,47:y,63:b,92:E,105:D,108:O,109:k,112:A,114:j,117:M,118:N,119:P}),e(G,[2,125]),e(G,[2,127],{11:[1,296]}),e(G,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:z,9:B,10:V,12:H,22:301,34:302,43:ie},e(R,[2,40]),{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,303],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},{8:z,9:B,10:V,12:H,22:304,34:305,43:ie},e(ge,[2,65]),{11:tt,63:nt,87:rt,108:it,110:306,111:264,112:at,113:ot,114:st,115:ct},e(dt,[2,148]),{15:ae,47:oe,63:se,92:ce,104:307,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he,123:97},{15:ae,47:oe,63:se,92:ce,104:308,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he,123:97},{101:[1,309]},e(G,[2,135]),e(U,[2,71]),{31:310,70:q,83:J,84:Y,85:185,119:X,120:Z,121:Q},e(U,[2,79]),e(Ye,s,{5:311}),{8:z,9:B,10:V,12:H,22:312,43:Ze},e(R,[2,41]),e(R,[2,44]),{8:z,9:B,10:V,12:H,22:313,43:Ze},e(ut,[2,146],{111:293,11:tt,63:nt,87:rt,108:it,112:at,113:ot,114:st,115:ct}),e(G,[2,141],{123:181,11:[1,314],15:ae,47:oe,63:se,92:ce,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he}),e(G,[2,142],{123:181,11:[1,315],15:ae,47:oe,63:se,92:ce,108:le,109:ue,112:de,114:fe,117:pe,118:me,119:he}),e(G,[2,129]),{32:[1,316],70:q,85:237,119:X,120:Z,121:Q},{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,317],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},e(Ye,s,{5:318}),e(R,[2,45]),{11:tt,63:nt,87:rt,95:319,108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},{11:tt,63:nt,87:rt,95:320,108:it,110:263,111:264,112:at,113:ot,114:st,115:ct},e(U,[2,75]),e(R,[2,38]),{6:13,7:14,8:c,9:l,10:u,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,321],35:m,36:h,37:29,38:g,40:_,42:v,45:33,46:44,47:y,48:45,50:46,63:b,87:x,88:S,89:C,90:w,91:T,92:E,105:D,108:O,109:k,112:A,114:j,116:47,117:M,118:N,119:P,124:ee,125:te,126:F,127:I,128:ne},e(G,[2,139],{109:lt}),e(G,[2,140],{109:lt}),e(R,[2,39])],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ft.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(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:t(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:t(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:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(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:t(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:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:t(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:t(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;at[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. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),38;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),40;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=``,43;case 8:return this.pushState(`shapeDataStr`),43;case 9:return this.popState(),43;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,`
`),43;case 11:return 43;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 98;case 17:this.popState();break;case 18:return 99;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 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin(`click`);break;case 33:this.popState();break;case 34:return 91;case 35:return e.lex.firstGraph()&&this.begin(`dir`),13;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),14;case 45:return this.popState(),15;case 46:return this.popState(),15;case 47:return this.popState(),15;case 48:return this.popState(),15;case 49:return this.popState(),15;case 50:return this.popState(),15;case 51:return this.popState(),15;case 52:return this.popState(),15;case 53:return this.popState(),15;case 54:return this.popState(),15;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:return 114;case 63:return 49;case 64:return 63;case 65:return 47;case 66:return 9;case 67:return 109;case 68:return 118;case 69:return this.popState(),80;case 70:return this.pushState(`edgeText`),78;case 71:return 122;case 72:return 80;case 73:break;case 74:return this.popState(),56;case 75:return`TEXT`;case 76:return this.pushState(`ellipseText`),55;case 77:return this.popState(),58;case 78:return this.pushState(`text`),57;case 79:return this.popState(),60;case 80:return this.pushState(`text`),59;case 81:return 61;case 82:return this.pushState(`text`),70;case 83:return this.popState(),67;case 84:return this.pushState(`text`),66;case 85:return this.popState(),52;case 86:return this.pushState(`text`),51;case 87:break;case 88:return this.popState(),72;case 89:return this.popState(),74;case 90:return 120;case 91:return this.pushState(`trapText`),71;case 92:return this.pushState(`trapText`),73;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return`SEP`;case 97:return 92;case 98:return 118;case 99:return 114;case 100:return 47;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;case 106:return this.pushState(`text`),65;case 107:return this.popState(),54;case 108:return this.pushState(`text`),53;case 109:return this.popState(),32;case 110:return this.pushState(`text`),30;case 111:return this.popState(),69;case 112:return this.pushState(`text`),68;case 113:break;case 114:return`TEXT`;case 115:return`QUOTE`;case 116:return 10;case 117:return 11;case 118:return 12}},`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]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_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*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([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])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}}})();function pt(){this.yy={}}return t(pt,`Parser`),pt.prototype=ft,ft.Parser=pt,new pt})();fe.parser=fe;var pe=fe,me=Object.assign({},pe);me.parse=e=>{let t=e.replace(/}[^\S\n]*\n/g,`} -`);return pe.parse(t)};var he=me,ge=t(e=>{let{theme:n,bkgColorArray:r,borderColorArray:i}=e;if(!b(n,i))return``;let a=S(e.look),o=C(r),s=x(e.THEME_COLOR_LIMIT,i),c=t(e=>i[e%i.length],`border`),l=t(e=>o?`fill: ${r[e%r.length]};`:``,`fill`),u=``;for(let e of B){let t=L.get(e),n=`[data-look="${a}"].node.${z(e)}`;u+=` +`);return pe.parse(t)};var he=me,ge=t(e=>{let{theme:n,bkgColorArray:r,borderColorArray:i}=e;if(!x(n,i))return``;let a=C(e.look),o=w(r),s=S(e.THEME_COLOR_LIMIT,i),c=t(e=>i[e%i.length],`border`),l=t(e=>o?`fill: ${r[e%r.length]};`:``,`fill`),u=``;for(let e of B){let t=L.get(e),n=`[data-look="${a}"].node.${z(e)}`;u+=` ${n} rect, ${n} path, @@ -196,5 +196,5 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l } text-align: center; } - ${y()} + ${O()} `,`getStyles`),init:t(e=>{e.agentflow??={},e.layout&&i({layout:e.layout}),e.flowchart??={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},`init`)};export{W as diagram}; \ No newline at end of file diff --git a/web/dist/app-diagram-3UASUU5V.js b/web/dist/app-diagram-3UASUU5V.js index 96ce28fe0..df1505c91 100644 --- a/web/dist/app-diagram-3UASUU5V.js +++ b/web/dist/app-diagram-3UASUU5V.js @@ -1,4 +1,4 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{D as r,H as i,U as a,a as o,b as s,c,f as l,q as u,v as d,w as f,y as p}from"./app-chunk-O7XYJQB3.js";import{t as m}from"./app-ordinal.js";import{t as h}from"./app-defaultLocale.js";import{i as g}from"./app-chunk-ZIGJFQKS.js";import{t as _}from"./app-chunk-6AEJRKK7.js";import{t as v}from"./app-chunk-JWPE2WC7.js";import{n as y}from"./app-mermaid-parser.core.js";import{i as b,n as x}from"./app-chunk-7PRAP22T.js";import{t as S}from"./app-chunk-WEXAMYUT.js";function C(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 w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(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}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(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 M(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}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){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=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function J(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)}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++sv&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p1?t:1)},n})(ne);function ae(){var e=ie,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(J),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d{x(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){o(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}e(X,`buildHierarchy`);var oe=e((t,n)=>{v(t,n);let r=[];for(let e of t.TreemapRows??[])e.$type===`ClassDefStatement`&&n.addClass(e.className??``,e.styleText??``);for(let e of t.TreemapRows??[]){let t=e.item;if(!t)continue;let i=e.indent?parseInt(e.indent):0,a=se(t),o=t.classSelector?n.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=e((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),se=e(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:e(async e=>{try{let n=await y(`treemap`,e);t.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);oe(n,r)}catch(e){throw t.error(`Error parsing treemap:`,e),e}},`parse`)},ce=10,Q=10,$=25,le={draw:e((r,i,a,o)=>{let l=o.db,u=l.getConfig(),d=u.padding??ce,f=l.getDiagramTitle(),p=l.getRoot(),{themeVariables:g}=s();if(!p)return;let v=f?30:0,y=_(i),x=u.nodeWidth?u.nodeWidth*Q:960,C=u.nodeHeight?u.nodeHeight*Q:500,w=x,T=C+v;y.attr(`viewBox`,`0 0 ${w} ${T}`),c(y,T,w,u.useMaxWidth);let E;try{let t=u.valueFormat||`,`;if(t===`$0,0`)E=e(e=>`$`+h(`,`)(e),`valueFormat`);else if(t.startsWith(`$`)&&t.includes(`,`)){let n=/\.\d+/.exec(t),r=n?n[0]:``;E=e(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(t.startsWith(`$`)){let n=t.substring(1);E=e(e=>`$`+h(n||``)(e),`valueFormat`)}else E=h(t)}catch(e){t.error(`Error creating format function:`,e),E=h(`,`)}let D=m().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),O=m().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),k=m().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);f&&y.append(`text`).attr(`x`,w/2).attr(`y`,v/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=y.append(`g`).attr(`transform`,`translate(0, ${v})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ae().size([x,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=u.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),u.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-2*H,s=i-2*H;if(oo&&c>B;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(uo||c(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;t.node().getComputedTextLength()>u||s+o>l||o{let t=r(),n=s(),i=g(t,n.themeVariables),a=g(ue,e),o=a.titleColor??i.titleColor,c=a.labelColor??i.textColor,l=a.valueColor??i.textColor;return` +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{D as r,H as i,U as a,a as o,b as s,c,f as l,q as u,v as d,w as f,y as p}from"./app-chunk-O7XYJQB3.js";import{t as m}from"./app-ordinal.js";import{t as h}from"./app-defaultLocale.js";import{i as g}from"./app-chunk-ZIGJFQKS.js";import{t as _}from"./app-chunk-6AEJRKK7.js";import{i as v,n as y}from"./app-chunk-7PRAP22T.js";import{t as b}from"./app-chunk-JWPE2WC7.js";import{n as x}from"./app-mermaid-parser.core.js";import{t as S}from"./app-chunk-WEXAMYUT.js";function C(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 w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(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}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(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 M(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}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){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=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function J(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)}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++sv&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p1?t:1)},n})(ne);function ae(){var e=ie,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(J),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d{y(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){o(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}e(X,`buildHierarchy`);var oe=e((t,n)=>{b(t,n);let r=[];for(let e of t.TreemapRows??[])e.$type===`ClassDefStatement`&&n.addClass(e.className??``,e.styleText??``);for(let e of t.TreemapRows??[]){let t=e.item;if(!t)continue;let i=e.indent?parseInt(e.indent):0,a=se(t),o=t.classSelector?n.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=e((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),se=e(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:e(async e=>{try{let n=await x(`treemap`,e);t.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);oe(n,r)}catch(e){throw t.error(`Error parsing treemap:`,e),e}},`parse`)},ce=10,Q=10,$=25,le={draw:e((r,i,a,o)=>{let l=o.db,u=l.getConfig(),d=u.padding??ce,f=l.getDiagramTitle(),p=l.getRoot(),{themeVariables:g}=s();if(!p)return;let y=f?30:0,b=_(i),x=u.nodeWidth?u.nodeWidth*Q:960,C=u.nodeHeight?u.nodeHeight*Q:500,w=x,T=C+y;b.attr(`viewBox`,`0 0 ${w} ${T}`),c(b,T,w,u.useMaxWidth);let E;try{let t=u.valueFormat||`,`;if(t===`$0,0`)E=e(e=>`$`+h(`,`)(e),`valueFormat`);else if(t.startsWith(`$`)&&t.includes(`,`)){let n=/\.\d+/.exec(t),r=n?n[0]:``;E=e(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(t.startsWith(`$`)){let n=t.substring(1);E=e(e=>`$`+h(n||``)(e),`valueFormat`)}else E=h(t)}catch(e){t.error(`Error creating format function:`,e),E=h(`,`)}let D=m().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),O=m().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),k=m().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);f&&b.append(`text`).attr(`x`,w/2).attr(`y`,y/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=b.append(`g`).attr(`transform`,`translate(0, ${y})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ae().size([x,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=v({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+v({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=u.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),u.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+v({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>v({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+v({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-2*H,s=i-2*H;if(oo&&c>B;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(uo||c(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+v({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;t.node().getComputedTextLength()>u||s+o>l||o{let t=r(),n=s(),i=g(t,n.themeVariables),a=g(ue,e),o=a.titleColor??i.titleColor,c=a.labelColor??i.textColor,l=a.valueColor??i.textColor;return` .treemapNode.section { stroke: ${a.sectionStrokeColor}; stroke-width: ${a.sectionStrokeWidth}; diff --git a/web/dist/app-diagram-ATOU4E4O.js b/web/dist/app-diagram-ATOU4E4O.js index 7db725fd2..f42272035 100644 --- a/web/dist/app-diagram-ATOU4E4O.js +++ b/web/dist/app-diagram-ATOU4E4O.js @@ -1,3 +1,3 @@ -import{T as e}from"./app-chunk-FOHPRMQF.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{H as i,U as a,X as o,a as s,b as c,f as l,q as u,v as d,w as f,x as p,y as m,z as h}from"./app-chunk-O7XYJQB3.js";import{_ as g,i as ee,t as te}from"./app-chunk-ZIGJFQKS.js";import{t as ne}from"./app-chunk-JWPE2WC7.js";import{n as re}from"./app-mermaid-parser.core.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=t(function(e){n.debug(`options str`,e)},`setOptions`),ae=t(function(){return{}},`getOptions`),oe=t(function(){x(),s()},`clear`);function x(){S={}}t(x,`reset`);var se=l.eventmodeling,ce=t(()=>ee({...se,...c().eventmodeling}),`getConfig`),S={};function C(){let e=le,{ast:t}=S,r=E();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((i,a)=>{let o=N(i,t.dataEntities,r);e=q(e,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(n.debug(`source frame`,i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=q(e,{$kind:y,index:a,frame:i,sourceFrame:t})})):e=q(e,{$kind:y,index:a,frame:i})}),e={...e,sortedSwimlanesArray:L(e.swimlanes)},e}t(C,`getState`);function w(e){S.ast=e}t(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}t(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}t(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}t(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}t(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}t(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}t(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=c();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}t(M,`calculateEntityVisualProps`);function N(e,t,r){let i=c(),a=h(O(e.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
`},l=`${g(a,r.textMaxWidth,s)}`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=h(o,i),o=g(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `)),e.dataReference){let n=t.find(t=>t.name===e.dataReference?.$refText);n&&(o=n.dataBlockValue,o=o.substring(o.indexOf(`{ -`)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=h(o,i),o=g(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `),o+=`
`)}let u=o!==void 0;u&&(l+=`

${o}`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=te(l,d),p=u?f.width/3:f.width,m={content:l,width:p,height:f.height};return n.debug(`[${e.name}] ${e.entityIdentifier} text`,m),m}t(N,`calculateTextProps`);function P(e,t){let n=t,r=M(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:v,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}t(P,`decidePositionFrame`);function F(e,t,n){return t===void 0?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:n===void 0?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}t(F,`calculateX`);function I(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}t(I,`calculateMaxRight`);function L(e){return Object.values(e).sort((e,t)=>e.index-t.index)}t(L,`sortedSwimlanesArray`);function R(e,t){let n=t,r=j(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},c=F(i,o,a),l=c+s.width+T.boxPadding,u=I(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;let d={x:c,y:T.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=L(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e0}t(B,`hasSourceFrame`);function V(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}t(V,`findBoxByFrame`);function H(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}t(H,`findBoxByLineIndex`);function U(t,n){let r=n;if(e(r.frame)||z(r.index,r.frame))return[];let i=V(t.boxes,r.frame);if(i===void 0)throw Error(`Target box not found for frame ${r.frame.name}`);let a;return a=r.sourceFrame?V(t.boxes,r.sourceFrame):H(t.boxes,i.swimlane.index,r.index-1),a===void 0?[]:[{$kind:b,frame:r.frame,index:r.index,sourceBox:a,targetBox:i}]}t(U,`decidePositionRelation`);function W(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}t(W,`evolveRelationPositioned`);var ue={[_]:P,[y]:U},de={[v]:R,[b]:W};function G(e,t){let r=ue[t.$kind];if(r==null)return[];let i=r(e,t);return n.debug(`decided events`,i),i}t(G,`decide`);function K(e,t){let r=t.reduce((e,t)=>{let n=de[t.$kind];return n==null?e:n(e,t)},e);return n.debug(`evolve events`,{state:e,newState:r,events:t}),r}t(K,`evolve`);function q(e,t){return K(e,G(e,t))}t(q,`dispatch`);var J={getConfig:ce,setOptions:ie,getOptions:ae,clear:oe,setAccTitle:a,getAccTitle:m,getAccDescription:d,setAccDescription:i,setDiagramTitle:u,getDiagramTitle:f,setAst:w,getDiagramProps:E,getState:C},fe={parse:t(async e=>{let t=await re(`eventmodeling`,e);n.debug(t),J.setAst(t),ne(t,J)},`parse`)},Y=p()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}t(X,`renderD3Box`);function Z(e,t){return e>t}t(Z,`dirUpwards`);function Q(e,t,r,i){return a=>{let o=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;n.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}t(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}t($,`renderD3Swimlane`);var pe={parser:fe,db:J,renderer:{draw:t(function(e,t,i,a){if(n.debug(`in eventmodeling renderer`,e+` -`,`id:`,t,i),!Y)throw Error(`EventModeling config not found`);let s=a.db,{themeVariables:c,eventmodeling:l}=p(),u=r(`[id="${t}"]`),d=s.getDiagramProps(),f=s.getState(),m=`em-arrowhead-${t}`,h=c.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach($(u,f.maxR,d,c)),f.boxes.forEach(X(u,d)),f.relations.forEach(Q(u,d,m,c)),u.append(`defs`).append(`marker`).attr(`id`,m).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),o(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:t(e=>``,`getStyles`)};export{pe as diagram}; \ No newline at end of file +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{H as r,U as i,X as a,a as o,b as s,f as c,q as l,v as u,w as d,x as f,y as p,z as m}from"./app-chunk-O7XYJQB3.js";import{_ as h,i as g,t as ee}from"./app-chunk-ZIGJFQKS.js";import{T as te}from"./app-chunk-FOHPRMQF.js";import{t as ne}from"./app-chunk-JWPE2WC7.js";import{n as re}from"./app-mermaid-parser.core.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=e(function(e){t.debug(`options str`,e)},`setOptions`),ae=e(function(){return{}},`getOptions`),oe=e(function(){x(),o()},`clear`);function x(){S={}}e(x,`reset`);var se=c.eventmodeling,ce=e(()=>g({...se,...s().eventmodeling}),`getConfig`),S={};function C(){let e=le,{ast:n}=S,r=E();if(!n)throw Error(`No data for EventModel`);return n.frames.forEach((i,a)=>{let o=N(i,n.dataEntities,r);e=q(e,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(t.debug(`source frame`,i.sourceFrames),s=n.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=q(e,{$kind:y,index:a,frame:i,sourceFrame:t})})):e=q(e,{$kind:y,index:a,frame:i})}),e={...e,sortedSwimlanesArray:L(e.swimlanes)},e}e(C,`getState`);function w(e){S.ast=e}e(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}e(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}e(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}e(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}e(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}e(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}e(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=s();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}e(M,`calculateEntityVisualProps`);function N(e,n,r){let i=s(),a=m(O(e.entityIdentifier)??``,i),o,c={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
`},l=`${h(a,r.textMaxWidth,c)}`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=m(o,i),o=h(o,r.textMaxWidth,c),o=o.replaceAll(` `,` `)),e.dataReference){let t=n.find(t=>t.name===e.dataReference?.$refText);t&&(o=t.dataBlockValue,o=o.substring(o.indexOf(`{ +`)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=m(o,i),o=h(o,r.textMaxWidth,c),o=o.replaceAll(` `,` `),o+=`
`)}let u=o!==void 0;u&&(l+=`

${o}`);let d={fontSize:c.fontSize,fontWeight:c.fontWeight,fontFamily:c.fontFamily},f=ee(l,d),p=u?f.width/3:f.width,g={content:l,width:p,height:f.height};return t.debug(`[${e.name}] ${e.entityIdentifier} text`,g),g}e(N,`calculateTextProps`);function P(e,t){let n=t,r=M(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:v,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}e(P,`decidePositionFrame`);function F(e,t,n){return t===void 0?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:n===void 0?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}e(F,`calculateX`);function I(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}e(I,`calculateMaxRight`);function L(e){return Object.values(e).sort((e,t)=>e.index-t.index)}e(L,`sortedSwimlanesArray`);function R(e,t){let n=t,r=j(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},c=F(i,o,a),l=c+s.width+T.boxPadding,u=I(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;let d={x:c,y:T.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=L(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e0}e(B,`hasSourceFrame`);function V(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}e(V,`findBoxByFrame`);function H(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}e(H,`findBoxByLineIndex`);function U(e,t){let n=t;if(te(n.frame)||z(n.index,n.frame))return[];let r=V(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let i;return i=n.sourceFrame?V(e.boxes,n.sourceFrame):H(e.boxes,r.swimlane.index,n.index-1),i===void 0?[]:[{$kind:b,frame:n.frame,index:n.index,sourceBox:i,targetBox:r}]}e(U,`decidePositionRelation`);function W(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}e(W,`evolveRelationPositioned`);var ue={[_]:P,[y]:U},de={[v]:R,[b]:W};function G(e,n){let r=ue[n.$kind];if(r==null)return[];let i=r(e,n);return t.debug(`decided events`,i),i}e(G,`decide`);function K(e,n){let r=n.reduce((e,t)=>{let n=de[t.$kind];return n==null?e:n(e,t)},e);return t.debug(`evolve events`,{state:e,newState:r,events:n}),r}e(K,`evolve`);function q(e,t){return K(e,G(e,t))}e(q,`dispatch`);var J={getConfig:ce,setOptions:ie,getOptions:ae,clear:oe,setAccTitle:i,getAccTitle:p,getAccDescription:u,setAccDescription:r,setDiagramTitle:l,getDiagramTitle:d,setAst:w,getDiagramProps:E,getState:C},fe={parse:e(async e=>{let n=await re(`eventmodeling`,e);t.debug(n),J.setAst(n),ne(n,J)},`parse`)},Y=f()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}e(X,`renderD3Box`);function Z(e,t){return e>t}e(Z,`dirUpwards`);function Q(e,n,r,i){return a=>{let o=a.sourceBox.swimlane.y+n.swimlanePadding,s=a.targetBox.swimlane.y+n.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;t.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}e(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}e($,`renderD3Swimlane`);var pe={parser:fe,db:J,renderer:{draw:e(function(e,r,i,o){if(t.debug(`in eventmodeling renderer`,e+` +`,`id:`,r,i),!Y)throw Error(`EventModeling config not found`);let s=o.db,{themeVariables:c,eventmodeling:l}=f(),u=n(`[id="${r}"]`),d=s.getDiagramProps(),p=s.getState(),m=`em-arrowhead-${r}`,h=c.emArrowhead??`#000000`;p.sortedSwimlanesArray.forEach($(u,p.maxR,d,c)),p.boxes.forEach(X(u,d)),p.relations.forEach(Q(u,d,m,c)),u.append(`defs`).append(`marker`).attr(`id`,m).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),a(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:e(e=>``,`getStyles`)};export{pe as diagram}; \ No newline at end of file diff --git a/web/dist/app-diagram-CDSNMT55.js b/web/dist/app-diagram-CDSNMT55.js index 6495a98eb..11c0962b7 100644 --- a/web/dist/app-diagram-CDSNMT55.js +++ b/web/dist/app-diagram-CDSNMT55.js @@ -1,6 +1,6 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import{H as n,U as r,a as i,b as a,c as o,f as s,q as c,v as l,w as u,y as d,z as f}from"./app-chunk-O7XYJQB3.js";import{i as p}from"./app-chunk-ZIGJFQKS.js";import{t as m}from"./app-chunk-6AEJRKK7.js";import{t as h}from"./app-chunk-JWPE2WC7.js";import{n as g}from"./app-mermaid-parser.core.js";import{r as _,t as v}from"./app-chunk-742MDFTN.js";import{t as y}from"./app-chunk-2Q5K7J3B.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}e(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}e(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}e(k,`remapErrorLines`);function A(e){let t=e.split(` +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import{H as n,U as r,a as i,b as a,c as o,f as s,q as c,v as l,w as u,y as d,z as f}from"./app-chunk-O7XYJQB3.js";import{i as p}from"./app-chunk-ZIGJFQKS.js";import{t as m}from"./app-chunk-6AEJRKK7.js";import{r as h,t as g}from"./app-chunk-742MDFTN.js";import{t as _}from"./app-chunk-JWPE2WC7.js";import{n as v}from"./app-mermaid-parser.core.js";import{t as y}from"./app-chunk-2Q5K7J3B.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}e(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}e(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}e(k,`remapErrorLines`);function A(e){let t=e.split(` `),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=e(()=>{j.reset(),i()},`clear`),N=e(()=>j.records.stack[0],`getRoot`),P=e(()=>j.records.cnt,`getCount`),F=s.treeView,I={clear:M,addNode:e((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:e(()=>p(F,a().treeView),`getConfig`),getAccTitle:d,getAccDescription:l,getDiagramTitle:u,setAccDescription:n,setAccTitle:r,setDiagramTitle:c},L=e(e=>{h(e,I);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,o=t.classAnnotation||void 0,s=t.iconAnnotation,c=s===void 0?void 0:s||`none`,l=t.descAnnotation||void 0,u=l?f(l,a()):void 0;I.addNode(e,n,i,o,c,u)}},`populate`),R={parse:e(async e=>{let{text:n,lineMap:r}=A(e);try{let e=await g(`treeView`,n);t.debug(e),L(e)}catch(e){throw r.size>0&&e instanceof Error&&(e.message=k(e.message,r)),e}},`parse`)},z={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:``},file:{body:``}}};function B(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}e(B,`detectIcon`);function V(e,t){return e.includes(`:`)?e:e in z.icons||!t?`${z.prefix}:${e}`:`${t}:${e}`}e(V,`qualifyIcon`);function H(e,t){if(e.icon!==`none`){if(e.icon)return V(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=B(e.name,t);if(n===`none`)return;if(n)return V(n,t.defaultIconPack)}return`${z.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}e(H,`getNodeIcon`),_([{name:z.prefix,icons:z}]);var U=14,W=4,G=16,K=e(async(t,n)=>{let r=[],i=e(e=>{let t=H(e,n);t&&r.push({icon:t,node:e}),e.children.forEach(i)},`collect`);i(t);let a=await Promise.all(r.map(async({icon:e,node:t})=>({id:t.id,svg:await v(e,{height:U,width:U})})));return new Map(a.map(({id:e,svg:t})=>[e,t]))},`resolveNodeIcons`),q=e((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=H(n,i),u=l!==void 0;l&&o.append(`g`).attr(`class`,`treeView-node-icon`).attr(`transform`,`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(n.id)??``);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),J=e((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),Y=e((t,n,r,i)=>{let a=0,o=0,s=[],c=e((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=q(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;J(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=e((e,n=0)=>{c(t,e,r,n),e.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=e.BBox;if(e.children.length){let{y:n,height:s}=e.children[e.children.length-1].BBox;J(t,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),X={draw:e(async(e,n,r,i)=>{t.debug(`Rendering treeView diagram +`),lineMap:n}}e(A,`preprocessBoxDrawing`);var j=new y(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=e(()=>{j.reset(),i()},`clear`),N=e(()=>j.records.stack[0],`getRoot`),P=e(()=>j.records.cnt,`getCount`),F=s.treeView,I={clear:M,addNode:e((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:e(()=>p(F,a().treeView),`getConfig`),getAccTitle:d,getAccDescription:l,getDiagramTitle:u,setAccDescription:n,setAccTitle:r,setDiagramTitle:c},L=e(e=>{_(e,I);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,o=t.classAnnotation||void 0,s=t.iconAnnotation,c=s===void 0?void 0:s||`none`,l=t.descAnnotation||void 0,u=l?f(l,a()):void 0;I.addNode(e,n,i,o,c,u)}},`populate`),R={parse:e(async e=>{let{text:n,lineMap:r}=A(e);try{let e=await v(`treeView`,n);t.debug(e),L(e)}catch(e){throw r.size>0&&e instanceof Error&&(e.message=k(e.message,r)),e}},`parse`)},z={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:``},file:{body:``}}};function B(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}e(B,`detectIcon`);function V(e,t){return e.includes(`:`)?e:e in z.icons||!t?`${z.prefix}:${e}`:`${t}:${e}`}e(V,`qualifyIcon`);function H(e,t){if(e.icon!==`none`){if(e.icon)return V(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=B(e.name,t);if(n===`none`)return;if(n)return V(n,t.defaultIconPack)}return`${z.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}e(H,`getNodeIcon`),h([{name:z.prefix,icons:z}]);var U=14,W=4,G=16,K=e(async(t,n)=>{let r=[],i=e(e=>{let t=H(e,n);t&&r.push({icon:t,node:e}),e.children.forEach(i)},`collect`);i(t);let a=await Promise.all(r.map(async({icon:e,node:t})=>({id:t.id,svg:await g(e,{height:U,width:U})})));return new Map(a.map(({id:e,svg:t})=>[e,t]))},`resolveNodeIcons`),q=e((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=H(n,i),u=l!==void 0;l&&o.append(`g`).attr(`class`,`treeView-node-icon`).attr(`transform`,`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(n.id)??``);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),J=e((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),Y=e((t,n,r,i)=>{let a=0,o=0,s=[],c=e((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=q(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;J(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=e((e,n=0)=>{c(t,e,r,n),e.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=e.BBox;if(e.children.length){let{y:n,height:s}=e.children[e.children.length-1].BBox;J(t,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),X={draw:e(async(e,n,r,i)=>{t.debug(`Rendering treeView diagram `+e);let a=i.db,s=a.getRoot(),c=a.getConfig(),l=m(n),u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=Y(u,s,c,await K(s,c));l.attr(`viewBox`,`-${c.lineThickness/2} 0 ${f} ${d}`),o(l,d,f,c.useMaxWidth)},`draw`)},Z={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},Q={db:I,renderer:X,parser:R,styles:e(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=p(Z,e);return` .treeView-node-label { font-size: ${t}; diff --git a/web/dist/app-ebnfDiagram-ZINNZB2B.js b/web/dist/app-ebnfDiagram-ZINNZB2B.js index 85d12786b..0f8c1ad18 100644 --- a/web/dist/app-ebnfDiagram-ZINNZB2B.js +++ b/web/dist/app-ebnfDiagram-ZINNZB2B.js @@ -1 +1 @@ -import{n as e}from"./app-chunk-2ZTRR5NV.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-6AEJRKK7.js";import{n as r,r as i,t as a}from"./app-chunk-GTNCS2PH.js";import{t as o}from"./app-chunk-JWPE2WC7.js";import{t as s}from"./app-mermaid-parser.core.js";var c=e().RailroadEbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=t(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=t((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=t(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:t(e=>{a.clear(),n.debug(`[EBNF Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[EBNF Parser] Parsed rules:`,r.rules.length),h(r),n.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram}; \ No newline at end of file +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-6AEJRKK7.js";import{n}from"./app-chunk-2ZTRR5NV.js";import{n as r,r as i,t as a}from"./app-chunk-GTNCS2PH.js";import{t as o}from"./app-chunk-JWPE2WC7.js";import{t as s}from"./app-mermaid-parser.core.js";var c=n().RailroadEbnf.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=e(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=e(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=e((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=e(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=e(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:e(e=>{a.clear(),t.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new s(n);let r=n.value;t.debug(`[EBNF Parser] Parsed rules:`,r.rules.length),h(r),t.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram}; \ No newline at end of file diff --git a/web/dist/app-elk-276RUBZZ.js b/web/dist/app-elk-276RUBZZ.js index 82a908df1..bd575ad2e 100644 --- a/web/dist/app-elk-276RUBZZ.js +++ b/web/dist/app-elk-276RUBZZ.js @@ -1,4 +1,4 @@ -import{i as e,r as t,t as n}from"./app-rolldown-runtime.js";import{n as r}from"./app-chunk-Y2CYZVJY.js";import"./app-src.js";import{G as i}from"./app-chunk-O7XYJQB3.js";import{rt as a}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import{o,s}from"./app-chunk-Z7XXMR3K.js";import{n as c}from"./app-chunk-UA2S7LBM.js";import{a as l,r as u}from"./app-chunk-3FUC2YCW.js";import{t as d}from"./app-chunk-NETBCI7D.js";var f=e(n(((e,n)=>{(function(t){if(typeof e==`object`&&n!==void 0)n.exports=t();else if(typeof define==`function`&&define.amd)define([],t);else{var r=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this;r.ELK=t()}})(function(){return(function(){function e(n,r,i){function a(s,c){if(!r[s]){if(!n[s]){var l=typeof t==`function`&&t;if(!c&&l)return l(s,!0);if(o)return o(s,!0);var u=Error(`Cannot find module '`+s+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=r[s]={exports:{}};n[s][0].call(d.exports,function(e){var t=n[s][1][e];return a(t||e)},d,d.exports,e,n,r,i)}return r[s].exports}for(var o=typeof t==`function`&&t,s=0;s0&&arguments[0]!==void 0?arguments[0]:{},r=n.defaultLayoutOptions,o=r===void 0?{}:r,s=n.algorithms,c=s===void 0?[`layered`,`stress`,`mrtree`,`radial`,`force`,`disco`,`sporeOverlap`,`sporeCompaction`,`rectpacking`]:s,l=n.workerFactory,u=n.workerUrl;if(i(this,e),this.defaultLayoutOptions=o,this.initialized=!1,u===void 0&&l===void 0)throw Error(`Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.`);var d=l;u!==void 0&&l===void 0&&(d=function(e){return new Worker(e)});var f=d(u);if(typeof f.postMessage!=`function`)throw TypeError(`Created worker does not provide the required 'postMessage' function.`);this.worker=new a(f),this.worker.postMessage({cmd:`register`,algorithms:c}).then(function(e){return t.initialized=!0}).catch(console.err)}return r(e,[{key:`layout`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.layoutOptions,r=n===void 0?this.defaultLayoutOptions:n,i=t.logging,a=i!==void 0&&i,o=t.measureExecutionTime,s=o!==void 0&&o;return e?this.worker.postMessage({cmd:`layout`,graph:e,layoutOptions:r,options:{logging:a,measureExecutionTime:s}}):Promise.reject(Error(`Missing mandatory parameter 'graph'.`))}},{key:`knownLayoutAlgorithms`,value:function(){return this.worker.postMessage({cmd:`algorithms`})}},{key:`knownLayoutOptions`,value:function(){return this.worker.postMessage({cmd:`options`})}},{key:`knownLayoutCategories`,value:function(){return this.worker.postMessage({cmd:`categories`})}},{key:`terminateWorker`,value:function(){this.worker&&this.worker.terminate()}}]),e}();var a=function(){function e(t){var n=this;if(i(this,e),t===void 0)throw Error(`Missing mandatory parameter 'worker'.`);this.resolvers={},this.worker=t,this.worker.onmessage=function(e){setTimeout(function(){n.receive(n,e)},0)}}return r(e,[{key:`postMessage`,value:function(e){var t=this.id||0;this.id=t+1,e.id=t;var n=this;return new Promise(function(r,i){n.resolvers[t]=function(e,t){e?(n.convertGwtStyleError(e),i(e)):r(t)},n.worker.postMessage(e)})}},{key:`receive`,value:function(e,t){var n=t.data,r=e.resolvers[n.id];r&&(delete e.resolvers[n.id],n.error?r(n.error):r(null,n.data))}},{key:`terminate`,value:function(){this.worker&&this.worker.terminate()}},{key:`convertGwtStyleError`,value:function(e){if(e){var t=e.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(e.cause=t.cause.backingJsObject,this.convertGwtStyleError(e.cause)),delete e.__java$exception)}}}]),e}()},{}],2:[function(e,t,n){(function(e){(function(){var r;typeof window<`u`?r=window:e===void 0?typeof self<`u`&&(r=self):r=e;var i;function a(){}function o(){}function s(){}function c(){}function l(){}function u(){}function d(){}function f(){}function p(){}function m(){}function h(){}function g(){}function _(){}function v(){}function y(){}function b(){}function x(){}function S(){}function ee(){}function te(){}function ne(){}function C(){}function re(){}function ie(){}function ae(){}function oe(){}function se(){}function ce(){}function le(){}function ue(){}function de(){}function fe(){}function pe(){}function me(){}function he(){}function ge(){}function _e(){}function ve(){}function ye(){}function be(){}function xe(){}function Se(){}function Ce(){}function we(){}function Te(){}function Ee(){}function De(){}function Oe(){}function ke(){}function Ae(){}function je(){}function Me(){}function Ne(){}function Pe(){}function Fe(){}function Ie(){}function Le(){}function Re(){}function ze(){}function Be(){}function Ve(){}function He(){}function Ue(){}function We(){}function Ge(){}function Ke(){}function qe(){}function Je(){}function Ye(){}function Xe(){}function Ze(){}function Qe(){}function $e(){}function et(){}function tt(){}function nt(){}function rt(){}function it(){}function at(){}function ot(){}function st(){}function ct(){}function lt(){}function ut(){}function dt(){}function ft(){}function pt(){}function mt(){}function ht(){}function gt(){}function _t(){}function vt(){}function yt(){}function bt(){}function xt(){}function St(){}function Ct(){}function wt(){}function Tt(){}function Et(){}function Dt(){}function Ot(){}function kt(){}function At(){}function jt(){}function Mt(){}function Nt(){}function Pt(){}function Ft(){}function It(){}function Lt(){}function Rt(){}function zt(){}function Bt(){}function eee(){}function Vt(){}function tee(){}function nee(){}function Ht(){}function ree(){}function iee(){}function aee(){}function oee(){}function see(){}function cee(){}function lee(){}function uee(){}function dee(){}function fee(){}function pee(){}function mee(){}function hee(){}function Ut(){}function gee(){}function _ee(){}function vee(){}function yee(){}function bee(){}function xee(){}function See(){}function Cee(){}function wee(){}function Wt(){}function Gt(){}function Tee(){}function Eee(){}function Dee(){}function Oee(){}function kee(){}function Aee(){}function jee(){}function Mee(){}function Nee(){}function Pee(){}function Fee(){}function Iee(){}function Lee(){}function Ree(){}function zee(){}function Bee(){}function Vee(){}function Hee(){}function Uee(){}function Wee(){}function Gee(){}function Kee(){}function qee(){}function Jee(){}function Yee(){}function Xee(){}function Zee(){}function Qee(){}function $ee(){}function ete(){}function tte(){}function nte(){}function rte(){}function ite(){}function ate(){}function ote(){}function ste(){}function cte(){}function lte(){}function ute(){}function dte(){}function fte(){}function pte(){}function mte(){}function hte(){}function gte(){}function _te(){}function vte(){}function yte(){}function bte(){}function xte(){}function Ste(){}function Cte(){}function wte(){}function Tte(){}function Ete(){}function Dte(){}function Ote(){}function kte(){}function Ate(){}function jte(){}function Mte(){}function Nte(){}function Pte(){}function Fte(){}function Ite(){}function Lte(){}function Rte(){}function zte(){}function Bte(){}function Vte(){}function Hte(){}function Ute(){}function Wte(){}function Gte(){}function Kte(){}function qte(){}function Jte(){}function Yte(){}function Xte(){}function Zte(){}function Qte(){}function $te(){}function ene(){}function tne(){}function nne(){}function rne(){}function ine(){}function ane(){}function one(){}function sne(){}function cne(){}function lne(){}function une(){}function dne(){}function fne(){}function pne(){}function mne(){}function hne(){}function gne(){}function Kt(){}function _ne(){}function vne(){}function yne(){}function bne(){}function xne(){}function Sne(){}function Cne(){}function wne(){}function Tne(){}function Ene(){}function Dne(){}function One(){}function kne(){}function Ane(){}function jne(){}function Mne(){}function Nne(){}function Pne(){}function Fne(){}function Ine(){}function Lne(){}function Rne(){}function zne(){}function Bne(){}function Vne(){}function Hne(){}function Une(){}function Wne(){}function Gne(){}function Kne(){}function qne(){}function Jne(){}function Yne(){}function Xne(){}function Zne(){}function Qne(){}function $ne(){}function ere(){}function tre(){}function nre(){}function rre(){}function ire(){}function are(){}function ore(){}function sre(){}function cre(){}function lre(){}function ure(){}function dre(){}function fre(){}function pre(){}function mre(){}function hre(){}function gre(){}function _re(){}function vre(){}function yre(){}function bre(){}function xre(){}function Sre(){}function Cre(){}function wre(){}function Tre(){}function Ere(){}function Dre(){}function Ore(){}function kre(){}function Are(){}function jre(){}function Mre(){}function Nre(){}function Pre(){}function Fre(){}function qt(){}function Ire(){}function Lre(){}function Rre(){}function zre(){}function Bre(){}function Vre(){}function Hre(){}function Ure(){}function Wre(){}function Gre(){}function Kre(){}function qre(){}function Jre(){}function Yre(){}function Xre(){}function Zre(){}function Qre(){}function $re(){}function eie(){}function tie(){}function nie(){}function rie(){}function iie(){}function aie(){}function oie(){}function sie(){}function cie(){}function lie(){}function uie(){}function die(){}function fie(){}function pie(){}function mie(){}function hie(){}function gie(){}function _ie(){}function vie(){}function yie(){}function bie(){}function xie(){}function Sie(){}function Cie(){}function wie(){}function Tie(){}function Eie(){}function Die(){}function Oie(){}function kie(){}function Aie(){}function jie(){}function Mie(){}function Nie(){}function Pie(){}function Fie(){}function Iie(){}function Lie(){}function Rie(){}function zie(){}function Bie(){}function Vie(){}function Hie(){}function Uie(){}function Wie(){}function Gie(){}function Kie(){}function qie(){}function Jie(){}function Yie(){}function Xie(){}function Zie(){}function Qie(){}function $ie(){}function eae(){}function tae(){}function nae(){}function rae(){}function iae(){}function aae(){}function oae(){}function sae(){}function cae(){}function lae(){}function uae(){}function dae(){}function fae(){}function pae(){}function mae(){}function hae(){}function gae(){}function _ae(){}function vae(){}function yae(){}function bae(){}function xae(){}function Sae(){}function Cae(){}function wae(){}function Tae(){}function Eae(){}function Dae(){}function Oae(){}function kae(){}function Aae(){}function jae(){}function Mae(){}function Nae(){}function Pae(){}function Fae(){}function Iae(){}function Lae(){}function Rae(){}function zae(){}function Bae(){}function Vae(){}function Hae(){}function Uae(){}function Wae(){}function Gae(){}function Kae(){}function qae(){}function Jae(){}function Yae(){}function Xae(){}function Zae(){}function Qae(){}function $ae(){}function eoe(){}function toe(){}function noe(){}function roe(){}function ioe(){}function aoe(){}function ooe(){}function soe(){}function coe(){}function loe(){}function uoe(){}function doe(){}function foe(){}function poe(){}function moe(){}function hoe(){}function goe(){}function _oe(){}function voe(){}function yoe(){}function boe(){}function xoe(){}function Jt(){}function Yt(){}function Soe(){}function Xt(){}function Coe(){}function woe(){}function Toe(){}function Eoe(){}function Doe(){}function Ooe(){}function koe(){}function Aoe(){}function joe(){}function Moe(){}function Noe(){}function Poe(){}function Foe(){}function Ioe(){}function Loe(){}function Roe(){}function zoe(){}function Boe(){}function Voe(){}function Hoe(){}function Uoe(){}function Woe(){}function Zt(){}function Goe(){}function Qt(){}function Koe(){}function qoe(){}function Joe(){}function Yoe(){}function Xoe(){}function Zoe(){}function Qoe(){}function $oe(){}function ese(){}function tse(){}function nse(){}function rse(){}function ise(){}function ase(){}function ose(){}function sse(){}function cse(){}function lse(){}function use(){}function dse(){}function $t(){}function fse(){}function pse(){}function mse(){}function hse(){}function gse(){}function _se(){}function vse(){}function yse(){}function bse(){}function xse(){}function Sse(){}function Cse(){}function wse(){}function en(){}function Tse(){}function Ese(){}function Dse(){}function tn(){}function Ose(){}function nn(){}function rn(){}function kse(){}function Ase(){}function jse(){}function Mse(){}function Nse(){}function Pse(){}function Fse(){}function Ise(){}function an(){}function Lse(){}function Rse(){}function on(){}function zse(){}function sn(){}function Bse(){}function Vse(){}function Hse(){}function cn(){}function Use(){}function Wse(){}function Gse(){}function Kse(){}function qse(){}function Jse(){}function Yse(){}function Xse(){}function Zse(){}function Qse(){}function $se(){}function ece(){}function tce(){}function nce(){}function rce(){}function ice(){}function ln(){}function un(){}function ace(){}function oce(){}function sce(){}function cce(){}function lce(){}function uce(){}function dce(){}function fce(){}function pce(){}function mce(){}function hce(){}function gce(){}function _ce(){}function vce(){}function yce(){}function bce(){}function xce(){}function Sce(){}function Cce(){}function wce(){}function Tce(){}function Ece(){}function Dce(){}function Oce(){}function kce(){}function Ace(){}function jce(){}function Mce(){}function Nce(){}function Pce(){}function Fce(){}function Ice(){}function Lce(){}function Rce(){}function zce(){}function Bce(){}function Vce(){}function Hce(){}function Uce(){}function Wce(){}function Gce(){}function Kce(){}function qce(){}function Jce(){}function Yce(){}function Xce(){}function Zce(){}function Qce(){}function $ce(){}function ele(){}function tle(){}function nle(){}function rle(){}function ile(){}function ale(){}function ole(){}function sle(){}function cle(){}function lle(){}function ule(){}function dle(){}function fle(){}function ple(){}function mle(){}function hle(){}function gle(){}function _le(){}function vle(){}function yle(){}function ble(){}function xle(){}function Sle(){}function Cle(){}function wle(){}function Tle(){}function Ele(){}function Dle(){}function Ole(){}function kle(){}function Ale(){}function jle(){}function Mle(){}function Nle(){}function Ple(){}function Fle(){}function Ile(){}function Lle(){}function Rle(){}function zle(){}function Ble(){}function Vle(){}function Hle(){}function Ule(){}function Wle(){}function Gle(){}function Kle(){}function qle(){}function Jle(){}function Yle(){}function Xle(){}function Zle(){}function Qle(){}function $le(){}function eue(){}function dn(){fi()}function tue(){Fo()}function nue(){Rk()}function rue(){qw()}function iue(){bO()}function aue(){I9e()}function oue(){XM()}function sue(){e6e()}function cue(){Nk()}function lue(){Io()}function uue(){Ff()}function due(){Ibe()}function fue(){cC()}function pue(){sWe()}function mue(){mJe()}function hue(){DRe()}function gue(){gJe()}function _ue(){eGe()}function vue(){TRe()}function yue(){Fw()}function bue(){vJe()}function xue(){_Je()}function Sue(){HBe()}function Cue(){yJe()}function wue(){wA()}function Tue(){Ro()}function Eue(){bP()}function Due(){mP()}function Oue(){bJe()}function kue(){kYe()}function Aue(){ORe()}function jue(){o6e()}function Mue(){kRe()}function Nue(){Aut()}function Pue(){Hrt()}function Fue(){zx()}function Iue(){Q$e()}function Lue(){rN()}function Rue(){fze()}function zue(){Rx()}function Bue(){Ylt()}function Vue(){PA()}function Hue(){Qlt()}function Uue(){gM()}function Wue(){yA()}function Gue(){bM()}function Kue(){ek()}function fn(){rke()}function que(){gb()}function Jue(){bA()}function Yue(){vP()}function Xue(){Iw()}function Zue(){wD()}function Que(){uC()}function $ue(){_N()}function ede(){Odt()}function tde(e){Gh(e)}function nde(e){this.a=e}function pn(e){this.a=e}function rde(e){this.a=e}function ide(e){this.a=e}function ade(e){this.a=e}function ode(e){this.a=e}function sde(e){this.a=e}function cde(e){this.a=e}function mn(e){this.a=e}function hn(e){this.a=e}function lde(e){this.a=e}function ude(e){this.a=e}function gn(e){this.a=e}function dde(e){this.a=e}function fde(e){this.a=e}function _n(e){this.a=e}function vn(e){this.a=e}function pde(e){this.a=e}function yn(e){this.a=e}function mde(e){this.a=e}function hde(e){this.a=e}function gde(e){this.a=e}function bn(e){this.b=e}function _de(e){this.c=e}function vde(e){this.a=e}function yde(e){this.a=e}function bde(e){this.a=e}function xde(e){this.a=e}function Sde(e){this.a=e}function Cde(e){this.a=e}function wde(e){this.a=e}function Tde(e){this.a=e}function Ede(e){this.a=e}function Dde(e){this.a=e}function Ode(e){this.a=e}function kde(e){this.a=e}function Ade(e){this.a=e}function xn(e){this.a=e}function Sn(e){this.a=e}function Cn(e){this.a=e}function wn(e){this.a=e}function Tn(){this.a=[]}function jde(e,t){e.a=t}function Mde(e,t){e.a=t}function Nde(e,t){e.b=t}function Pde(e,t){e.b=t}function Fde(e,t){e.b=t}function Ide(e,t){e.j=t}function Lde(e,t){e.g=t}function Rde(e,t){e.i=t}function zde(e,t){e.c=t}function Bde(e,t){e.c=t}function Vde(e,t){e.d=t}function Hde(e,t){e.d=t}function En(e,t){e.k=t}function Ude(e,t){e.c=t}function Wde(e,t){e.c=t}function Gde(e,t){e.a=t}function Kde(e,t){e.a=t}function qde(e,t){e.f=t}function Jde(e,t){e.a=t}function Yde(e,t){e.b=t}function Dn(e,t){e.d=t}function On(e,t){e.i=t}function Xde(e,t){e.o=t}function Zde(e,t){e.r=t}function Qde(e,t){e.a=t}function $de(e,t){e.b=t}function efe(e,t){e.e=t}function tfe(e,t){e.f=t}function nfe(e,t){e.g=t}function rfe(e,t){e.e=t}function ife(e,t){e.f=t}function afe(e,t){e.f=t}function kn(e,t){e.a=t}function An(e,t){e.b=t}function ofe(e,t){e.n=t}function sfe(e,t){e.a=t}function cfe(e,t){e.c=t}function lfe(e,t){e.c=t}function ufe(e,t){e.c=t}function dfe(e,t){e.a=t}function ffe(e,t){e.a=t}function pfe(e,t){e.d=t}function mfe(e,t){e.d=t}function hfe(e,t){e.e=t}function gfe(e,t){e.e=t}function _fe(e,t){e.g=t}function vfe(e,t){e.f=t}function yfe(e,t){e.j=t}function bfe(e,t){e.a=t}function xfe(e,t){e.a=t}function Sfe(e,t){e.b=t}function Cfe(e){e.b=e.a}function wfe(e){e.c=e.d.d}function jn(e){this.a=e}function Mn(e){this.a=e}function Nn(e){this.a=e}function Pn(e){this.a=e}function Fn(e){this.a=e}function In(e){this.a=e}function Tfe(e){this.a=e}function Ln(e){this.a=e}function Rn(e){this.a=e}function zn(e){this.a=e}function Bn(e){this.a=e}function Vn(e){this.a=e}function Efe(e){this.a=e}function Dfe(e){this.a=e}function Hn(e){this.b=e}function Un(e){this.b=e}function Wn(e){this.b=e}function Gn(e){this.a=e}function Ofe(e){this.a=e}function Kn(e){this.c=e}function w(e){this.c=e}function kfe(e){this.c=e}function qn(e){this.d=e}function Jn(e){this.a=e}function Yn(e){this.a=e}function Afe(e){this.a=e}function Xn(e){this.a=e}function Zn(e){this.a=e}function Qn(e){this.a=e}function $n(e){this.a=e}function er(e){this.a=e}function tr(e){this.a=e}function nr(e){this.a=e}function jfe(e){this.a=e}function Mfe(e){this.a=e}function rr(e){this.a=e}function Nfe(e){this.a=e}function Pfe(e){this.a=e}function Ffe(e){this.a=e}function Ife(e){this.a=e}function Lfe(e){this.a=e}function Rfe(e){this.a=e}function zfe(e){this.a=e}function Bfe(e){this.a=e}function Vfe(e){this.a=e}function Hfe(e){this.a=e}function Ufe(e){this.a=e}function Wfe(e){this.a=e}function Gfe(e){this.a=e}function Kfe(e){this.a=e}function qfe(e){this.a=e}function ir(e){this.a=e}function Jfe(e){this.a=e}function Yfe(e){this.a=e}function Xfe(e){this.a=e}function Zfe(e){this.a=e}function ar(e){this.a=e}function Qfe(e){this.a=e}function $fe(e){this.a=e}function or(e){this.a=e}function sr(e){this.a=e}function epe(e){this.a=e}function tpe(e){this.a=e}function npe(e){this.a=e}function rpe(e){this.a=e}function ipe(e){this.a=e}function ape(e){this.a=e}function cr(e){this.a=e}function lr(e){this.a=e}function ur(e){this.a=e}function dr(e){this.a=e}function fr(e){this.e=e}function pr(e){this.a=e}function ope(e){this.a=e}function mr(e){this.a=e}function spe(e){this.a=e}function cpe(e){this.a=e}function lpe(e){this.a=e}function upe(e){this.a=e}function dpe(e){this.a=e}function fpe(e){this.a=e}function ppe(e){this.a=e}function mpe(e){this.a=e}function hpe(e){this.a=e}function gpe(e){this.a=e}function _pe(e){this.a=e}function vpe(e){this.a=e}function ype(e){this.a=e}function bpe(e){this.a=e}function xpe(e){this.a=e}function Spe(e){this.a=e}function Cpe(e){this.a=e}function wpe(e){this.a=e}function Tpe(e){this.a=e}function Epe(e){this.a=e}function Dpe(e){this.a=e}function Ope(e){this.a=e}function kpe(e){this.a=e}function Ape(e){this.a=e}function jpe(e){this.a=e}function Mpe(e){this.a=e}function Npe(e){this.a=e}function Ppe(e){this.a=e}function Fpe(e){this.a=e}function Ipe(e){this.a=e}function Lpe(e){this.a=e}function Rpe(e){this.a=e}function zpe(e){this.a=e}function Bpe(e){this.a=e}function Vpe(e){this.a=e}function Hpe(e){this.a=e}function Upe(e){this.a=e}function Wpe(e){this.a=e}function Gpe(e){this.a=e}function Kpe(e){this.a=e}function qpe(e){this.a=e}function Jpe(e){this.a=e}function Ype(e){this.a=e}function Xpe(e){this.a=e}function Zpe(e){this.a=e}function Qpe(e){this.a=e}function $pe(e){this.a=e}function eme(e){this.a=e}function tme(e){this.a=e}function nme(e){this.a=e}function rme(e){this.a=e}function ime(e){this.c=e}function ame(e){this.b=e}function ome(e){this.a=e}function sme(e){this.a=e}function cme(e){this.a=e}function lme(e){this.a=e}function ume(e){this.a=e}function dme(e){this.a=e}function fme(e){this.a=e}function pme(e){this.a=e}function mme(e){this.a=e}function hme(e){this.a=e}function gme(e){this.a=e}function _me(e){this.a=e}function vme(e){this.a=e}function yme(e){this.a=e}function bme(e){this.a=e}function xme(e){this.a=e}function Sme(e){this.a=e}function Cme(e){this.a=e}function wme(e){this.a=e}function Tme(e){this.a=e}function Eme(e){this.a=e}function Dme(e){this.a=e}function Ome(e){this.a=e}function kme(e){this.a=e}function Ame(e){this.a=e}function jme(e){this.a=e}function Mme(e){this.a=e}function hr(e){this.a=e}function gr(e){this.a=e}function Nme(e){this.a=e}function Pme(e){this.a=e}function Fme(e){this.a=e}function Ime(e){this.a=e}function Lme(e){this.a=e}function Rme(e){this.a=e}function zme(e){this.a=e}function Bme(e){this.a=e}function Vme(e){this.a=e}function Hme(e){this.a=e}function Ume(e){this.a=e}function Wme(e){this.a=e}function Gme(e){this.a=e}function Kme(e){this.a=e}function qme(e){this.a=e}function Jme(e){this.a=e}function Yme(e){this.a=e}function Xme(e){this.a=e}function Zme(e){this.a=e}function Qme(e){this.a=e}function $me(e){this.a=e}function ehe(e){this.a=e}function the(e){this.a=e}function nhe(e){this.a=e}function rhe(e){this.a=e}function ihe(e){this.a=e}function _r(e){this.a=e}function ahe(e){this.f=e}function ohe(e){this.a=e}function she(e){this.a=e}function che(e){this.a=e}function lhe(e){this.a=e}function uhe(e){this.a=e}function dhe(e){this.a=e}function fhe(e){this.a=e}function phe(e){this.a=e}function mhe(e){this.a=e}function hhe(e){this.a=e}function ghe(e){this.a=e}function _he(e){this.a=e}function vhe(e){this.a=e}function yhe(e){this.a=e}function bhe(e){this.a=e}function xhe(e){this.a=e}function She(e){this.a=e}function Che(e){this.a=e}function whe(e){this.a=e}function The(e){this.a=e}function Ehe(e){this.a=e}function Dhe(e){this.a=e}function Ohe(e){this.a=e}function khe(e){this.a=e}function Ahe(e){this.a=e}function jhe(e){this.a=e}function Mhe(e){this.a=e}function Nhe(e){this.a=e}function vr(e){this.a=e}function Phe(e){this.a=e}function yr(e){this.b=e}function Fhe(e){this.a=e}function Ihe(e){this.a=e}function Lhe(e){this.a=e}function Rhe(e){this.a=e}function zhe(e){this.a=e}function Bhe(e){this.a=e}function Vhe(e){this.a=e}function Hhe(e){this.b=e}function Uhe(e){this.a=e}function br(e){this.a=e}function Whe(e){this.a=e}function Ghe(e){this.a=e}function Khe(e){this.c=e}function xr(e){this.e=e}function Sr(e){this.a=e}function Cr(e){this.a=e}function wr(e){this.a=e}function qhe(e){this.d=e}function Jhe(e){this.a=e}function Yhe(e){this.a=e}function Xhe(e){this.a=e}function Tr(e){this.e=e}function Er(){this.a=0}function Dr(){Pm(this)}function T(){au(this)}function Or(){_Fe(this)}function Zhe(){}function kr(){this.c=nHt}function Qhe(e,t){e.b+=t}function $he(e,t){t.Wb(e)}function ege(e){return e.a}function tge(e){return e.a}function nge(e){return e.a}function rge(e){return e.a}function ige(e){return e.a}function E(e){return e.e}function age(){return null}function oge(){return null}function sge(){La(),P_t()}function cge(e){e.b.Of(e.e)}function lge(e){e.b=new la}function Ar(e,t){e.b=t-e.b}function jr(e,t){e.a=t-e.a}function Mr(e,t){e.push(t)}function uge(e,t){e.sort(t)}function dge(e,t){t.jd(e.a)}function fge(e,t){tj(t,e)}function pge(e,t,n){e.Yd(n,t)}function Nr(e,t){e.e=t,t.b=e}function mge(e){wf(),this.a=e}function hge(e){wf(),this.a=e}function gge(e){wf(),this.a=e}function Pr(e){gh(),this.a=e}function _ge(e){Xg(),lG.le(e)}function vge(){vge=C,new Dr}function Fr(){WTe.call(this)}function yge(){WTe.call(this)}function bge(){Fr.call(this)}function Ir(){Fr.call(this)}function xge(){Fr.call(this)}function Lr(){Fr.call(this)}function Rr(){Fr.call(this)}function zr(){Fr.call(this)}function Br(){Fr.call(this)}function Vr(){Fr.call(this)}function Sge(){Fr.call(this)}function Hr(){Fr.call(this)}function Cge(){Fr.call(this)}function wge(){this.a=this}function Ur(){this.Bb|=256}function Tge(){this.b=new lCe}function Wr(e,t){e.length=t}function Gr(e,t){M(e.a,t)}function Ege(e,t){tet(e.c,t)}function Dge(e,t){Lm(e.b,t)}function Oge(e,t){JO(e.a,t)}function kge(e,t){$T(e.a,t)}function Kr(e,t){AC(e.e,t)}function qr(e){_j(e.c,e.b)}function Age(e,t){e.kc().Nb(t)}function jge(e){this.a=y1e(e)}function Jr(){this.a=new Dr}function Mge(){this.a=new Dr}function Nge(){this.a=new gbe}function Yr(){this.a=new T}function Xr(){this.a=new T}function Pge(){this.a=new T}function Zr(){this.a=new Xe}function Qr(){this.a=new qUe}function Fge(){this.a=new Vt}function Ige(){this.a=new wRe}function Lge(){this.a=new eOe}function Rge(){this.a=new T}function zge(){this.a=new T}function Bge(){this.a=new T}function Vge(){this.a=new T}function Hge(){this.d=new T}function Uge(){this.a=new Qze}function Wge(){this.a=new Jr}function Gge(){this.a=new Dr}function Kge(){this.b=new Dr}function qge(){this.b=new T}function Jge(){this.e=new T}function Yge(){this.a=new wue}function Xge(){this.d=new T}function Zge(){QIe.call(this)}function Qge(){QIe.call(this)}function $ge(){T.call(this)}function e_e(){bge.call(this)}function $r(){Yr.call(this)}function t_e(){Qd.call(this)}function n_e(){Vge.call(this)}function ei(){Zhe.call(this)}function ti(){ei.call(this)}function ni(){Zhe.call(this)}function ri(){ni.call(this)}function r_e(){b_e.call(this)}function i_e(){b_e.call(this)}function a_e(){b_e.call(this)}function o_e(){C_e.call(this)}function ii(){Ose.call(this)}function s_e(){Ose.call(this)}function ai(){vo.call(this)}function c_e(){E_e.call(this)}function l_e(){E_e.call(this)}function u_e(){Dr.call(this)}function d_e(){Dr.call(this)}function f_e(){Dr.call(this)}function oi(){EJe.call(this)}function p_e(){Jr.call(this)}function m_e(){Ur.call(this)}function si(){gTe.call(this)}function ci(){Dr.call(this)}function li(){gTe.call(this)}function ui(){Dr.call(this)}function h_e(){Dr.call(this)}function g_e(){sn.call(this)}function __e(){g_e.call(this)}function v_e(){sn.call(this)}function y_e(){Qle.call(this)}function b_e(){this.a=new Jr}function x_e(){this.a=new Dr}function S_e(){this.a=new T}function C_e(){this.a=new Dr}function di(){this.a=new vo}function w_e(){this.j=new T}function T_e(){this.a=new bye}function E_e(){this.a=new zse}function D_e(){this.a=new goe}function fi(){fi=C,GW=new o}function pi(){pi=C,XW=new k_e}function mi(){mi=C,ZW=new O_e}function O_e(){_n.call(this,``)}function k_e(){_n.call(this,``)}function A_e(e){mqe.call(this,e)}function j_e(e){mqe.call(this,e)}function M_e(e){mn.call(this,e)}function N_e(e){nbe.call(this,e)}function P_e(e){nbe.call(this,e)}function F_e(e){N_e.call(this,e)}function I_e(e){N_e.call(this,e)}function L_e(e){N_e.call(this,e)}function R_e(e){ny.call(this,e)}function z_e(e){ny.call(this,e)}function B_e(e){VOe.call(this,e)}function V_e(e){obe.call(this,e)}function hi(e){lo.call(this,e)}function gi(e){lo.call(this,e)}function H_e(e){lo.call(this,e)}function _i(e){P9e.call(this,e)}function vi(e){_i.call(this,e)}function yi(e){KNe.call(this,e)}function U_e(e){yi.call(this,e)}function bi(){wn.call(this,{})}function W_e(){W_e=C,zTt=new te}function xi(){xi=C,tG=new Vwe}function G_e(){G_e=C,iG=new a}function Si(){Si=C,cG=new v}function Ci(){Ci=C,dG=new x}function wi(e){Bu(),this.a=e}function Ti(e){lC(),this.a=e}function Ei(e){em(),this.f=e}function Di(e){em(),this.f=e}function K_e(e){nke(),this.a=e}function q_e(e){e.b=null,e.c=0}function J_e(e,t){e.e=t,Sst(e,t)}function Y_e(e,t){e.a=t,ott(e)}function Oi(e,t,n){e.a[t.g]=n}function X_e(e,t,n){y8e(n,e,t)}function Z_e(e,t){HOe(t.i,e.n)}function Q_e(e,t){ZZe(e).Cd(t)}function $_e(e,t){e.a.ec().Mc(t)}function eve(e,t){return e.g-t.g}function tve(e,t){return e*e/t}function ki(e){return Gh(e),e}function D(e){return Gh(e),e}function Ai(e){return Gh(e),e}function nve(e){return new Cn(e)}function rve(e){return new mh(e)}function ive(e){return Gh(e),e}function ave(e){return Gh(e),e}function ji(e){yi.call(this,e)}function Mi(e){yi.call(this,e)}function ove(e){yi.call(this,e)}function Ni(e){KNe.call(this,e)}function Pi(e){yi.call(this,e)}function Fi(e){yi.call(this,e)}function Ii(e){yi.call(this,e)}function sve(e){yi.call(this,e)}function Li(e){yi.call(this,e)}function Ri(e){yi.call(this,e)}function zi(e){yi.call(this,e)}function Bi(e){yi.call(this,e)}function Vi(e){yi.call(this,e)}function Hi(e){yi.call(this,e)}function Ui(e){yi.call(this,e)}function Wi(e){Gh(e),this.a=e}function Gi(e){return Tw(e),e}function Ki(e){CPe(e,e.length)}function qi(e){return e.b==e.c}function Ji(e){return!!e&&e.b}function cve(e){return!!e&&e.k}function lve(e){return!!e&&e.j}function uve(e,t,n){e.c.Ef(t,n)}function dve(e,t){e.be(t),t.ae(e)}function Yi(e){wf(),this.a=ph(e)}function Xi(){this.a=kd(ph(PP))}function fve(){throw E(new Br)}function pve(){throw E(new Br)}function Zi(){throw E(new Br)}function mve(){throw E(new Br)}function hve(){throw E(new Br)}function gve(){throw E(new Br)}function Qi(){Qi=C,Xg()}function $i(){In.call(this,``)}function ea(){In.call(this,``)}function ta(){In.call(this,``)}function na(){In.call(this,``)}function ra(e){Mi.call(this,e)}function ia(e){Mi.call(this,e)}function aa(e){Fi.call(this,e)}function oa(e){Wn.call(this,e)}function _ve(e){oa.call(this,e)}function sa(e){qu.call(this,e)}function ca(e){sEe.call(this,e,0)}function la(){URe.call(this,12,3)}function O(e,t){return _Re(e,t)}function ua(e,t){return yb(e,t)}function vve(e,t){return e.a-t.a}function yve(e,t){return e.a-t.a}function bve(e,t){return e.a-t.a}function xve(e,t){return t in e.a}function Sve(e){return e.a?e.b:0}function Cve(e){return e.a?e.b:0}function wve(e,t,n){t.Cd(e.a[n])}function Tve(e,t,n){t.Pe(e.a[n])}function Eve(e,t){e.b=new Vl(t)}function Dve(e,t){return e.b=t,e}function Ove(e,t){return e.c=t,e}function kve(e,t){return e.f=t,e}function Ave(e,t){return e.g=t,e}function da(e,t){return e.a=t,e}function fa(e,t){return e.f=t,e}function jve(e,t){return e.k=t,e}function pa(e,t){return e.a=t,e}function Mve(e,t){return e.e=t,e}function ma(e,t){return e.e=t,e}function Nve(e,t){return e.f=t,e}function Pve(e,t){e.b=!0,e.d=t}function Fve(e,t){return e.b-t.b}function Ive(e,t){return e.g-t.g}function Lve(e,t){return e?0:t-1}function Rve(e,t){return e?0:t-1}function zve(e,t){return e?t-1:0}function Bve(e,t){return e.s-t.s}function Vve(e,t){return t.rg(e)}function ha(e,t){return e.b=t,e}function ga(e,t){return e.a=t,e}function _a(e,t){return e.c=t,e}function va(e,t){return e.d=t,e}function ya(e,t){return e.e=t,e}function ba(e,t){return e.f=t,e}function xa(e,t){return e.a=t,e}function Sa(e,t){return e.b=t,e}function Ca(e,t){return e.c=t,e}function wa(e,t){return e.c=t,e}function Ta(e,t){return e.b=t,e}function Ea(e,t){return e.d=t,e}function Da(e,t){return e.e=t,e}function Hve(e,t){return e.f=t,e}function Oa(e,t){return e.g=t,e}function ka(e,t){return e.a=t,e}function Aa(e,t){return e.i=t,e}function ja(e,t){return e.j=t,e}function Uve(e,t){wA(),G_(t,e)}function Wve(e,t,n){CNe(e.a,t,n)}function Ma(e){yf.call(this,e)}function Gve(e){L1e.call(this,e)}function Kve(e){uIe.call(this,e)}function Na(e){uIe.call(this,e)}function Pa(e){kx.call(this,e)}function qve(e){Ig.call(this,e)}function Jve(e){Ig.call(this,e)}function Yve(){Dwe.call(this,``)}function Fa(){this.a=0,this.b=0}function Xve(){this.b=0,this.a=0}function Zve(e,t){e.b=0,Qx(e,t)}function Qve(e,t){return e.k=t,e}function $ve(e,t){return e.j=t,e}function eye(e,t){e.c=t,e.b=!0}function tye(){tye=C,rEt=c5e()}function Ia(){Ia=C,iVt=X6e()}function nye(){nye=C,Y5=X5e()}function La(){La=C,h7=dS()}function Ra(){Ra=C,R7=Z6e()}function rye(){rye=C,wHt=Q6e()}function za(){za=C,b9=rtt()}function Ba(e){return e.e&&e.e()}function iye(e){return e.l|e.m<<22}function aye(e,t){return e.c._b(t)}function oye(e,t){return E$e(e.b,t)}function Va(e){return e?e.d:null}function sye(e){return e?e.g:null}function cye(e){return e?e.i:null}function Ha(e){return Ad(e),e.o}function Ua(e,t){return e.a+=t,e}function Wa(e,t){return e.a+=t,e}function Ga(e,t){return e.a+=t,e}function Ka(e,t){return e.a+=t,e}function lye(e,t){for(;e.Bd(t););}function qa(e){this.a=new go(e)}function uye(){throw E(new Br)}function dye(){throw E(new Br)}function fye(){throw E(new Br)}function pye(){throw E(new Br)}function mye(){throw E(new Br)}function hye(){throw E(new Br)}function Ja(e){this.a=new mm(e)}function gye(){this.a=new Yj(NFt)}function _ye(){this.b=new Yj(yPt)}function vye(){this.a=new Yj(kIt)}function yye(){this.b=new Yj(_3)}function bye(){this.b=new Yj(_3)}function Ya(e){this.a=0,this.b=e}function xye(e){Ngt(),tvt(this,e)}function Xa(e){return Hh(e),e.a}function Za(e){return e.b!=e.d.c}function Sye(e,t){return e.d[t.p]}function Cye(e,t){return bst(e,t)}function wye(e,t,n){e.splice(t,n)}function Qa(e,t){for(;e.Re(t););}function Tye(e){e.c?gct(e):_ct(e)}function Eye(){throw E(new Br)}function Dye(){throw E(new Br)}function Oye(){throw E(new Br)}function kye(){throw E(new Br)}function Aye(){throw E(new Br)}function jye(){throw E(new Br)}function Mye(){throw E(new Br)}function Nye(){throw E(new Br)}function Pye(){throw E(new Br)}function Fye(){throw E(new Br)}function Iye(){throw E(new Hr)}function Lye(){throw E(new Hr)}function $a(e){this.a=new Rye(e)}function Rye(e){IJe(this,e,B9e())}function eo(e){return!e||mFe(e)}function to(e){return A9[e]!=-1}function zye(){oG!=0&&(oG=0),sG=-1}function Bye(){xTt??=[]}function no(e,t){zu.call(this,e,t)}function ro(e,t){no.call(this,e,t)}function Vye(e,t){this.a=e,this.b=t}function Hye(e,t){this.a=e,this.b=t}function Uye(e,t){this.a=e,this.b=t}function Wye(e,t){this.a=e,this.b=t}function Gye(e,t){this.a=e,this.b=t}function Kye(e,t){this.a=e,this.b=t}function qye(e,t){this.a=e,this.b=t}function io(e,t){this.e=e,this.d=t}function Jye(e,t){this.b=e,this.c=t}function Yye(e,t){this.b=e,this.a=t}function Xye(e,t){this.b=e,this.a=t}function Zye(e,t){this.b=e,this.a=t}function Qye(e,t){this.b=e,this.a=t}function $ye(e,t){this.a=e,this.b=t}function ao(e,t){this.a=e,this.b=t}function ebe(e,t){this.a=e,this.f=t}function oo(e,t){this.g=e,this.i=t}function so(e,t){this.f=e,this.g=t}function tbe(e,t){this.b=e,this.c=t}function nbe(e){vTe(e.dc()),this.c=e}function rbe(e,t){this.a=e,this.b=t}function ibe(e,t){this.a=e,this.b=t}function abe(e){this.a=P(ph(e),15)}function obe(e){this.a=P(ph(e),15)}function sbe(e){this.a=P(ph(e),85)}function co(e){this.b=P(ph(e),85)}function lo(e){this.b=P(ph(e),51)}function uo(){this.q=new r.Date}function fo(e,t){this.a=e,this.b=t}function cbe(e,t){return km(e.b,t)}function po(e,t){return e.b.Hc(t)}function lbe(e,t){return e.b.Ic(t)}function ube(e,t){return e.b.Qc(t)}function dbe(e,t){return e.b.Hc(t)}function fbe(e,t){return e.c.uc(t)}function pbe(e,t){return NT(e.c,t)}function mo(e,t){return e.a._b(t)}function mbe(e,t){return e>t&&t0}function rs(e,t){return dT(e,t)<0}function exe(e,t){return Gp(e.a,t)}function txe(e,t){yRe.call(this,e,t)}function nxe(e){_h(),VOe.call(this,e)}function rxe(e,t){mNe(e,e.length,t)}function is(e,t){NPe(e,e.length,t)}function as(e,t){return e.a.get(t)}function ixe(e,t){return km(e.e,t)}function os(e){return Gh(e),!1}function ss(e){this.a=P(ph(e),229)}function cs(e){cv.call(this,e,21)}function ls(e,t){so.call(this,e,t)}function us(e,t){so.call(this,e,t)}function axe(e,t){this.b=e,this.a=t}function ds(e,t){this.d=e,this.e=t}function oxe(e,t){this.a=e,this.b=t}function sxe(e,t){this.a=e,this.b=t}function cxe(e,t){this.a=e,this.b=t}function lxe(e,t){this.a=e,this.b=t}function fs(e,t){this.a=e,this.b=t}function uxe(e,t){this.b=e,this.a=t}function dxe(e,t){this.b=e,this.a=t}function fxe(e,t){so.call(this,e,t)}function pxe(e,t){so.call(this,e,t)}function ps(e,t){so.call(this,e,t)}function ms(e,t){so.call(this,e,t)}function hs(e,t){so.call(this,e,t)}function gs(e,t){so.call(this,e,t)}function _s(e,t){so.call(this,e,t)}function vs(e,t){this.b=e,this.a=t}function ys(e,t){so.call(this,e,t)}function bs(e,t){this.b=e,this.a=t}function xs(e,t){so.call(this,e,t)}function mxe(e,t){this.b=e,this.a=t}function Ss(e,t){so.call(this,e,t)}function Cs(e,t){so.call(this,e,t)}function ws(e,t){so.call(this,e,t)}function Ts(e,t,n){e.splice(t,0,n)}function hxe(e,t,n){e.Mb(n)&&t.Cd(n)}function gxe(e,t,n){t.Pe(e.a.Ye(n))}function _xe(e,t,n){t.Dd(e.a.Ze(n))}function vxe(e,t,n){t.Cd(e.a.Kb(n))}function yxe(e,t){return $u(e.c,t)}function bxe(e,t){return $u(e.e,t)}function Es(e,t){so.call(this,e,t)}function Ds(e,t){so.call(this,e,t)}function Os(e,t){so.call(this,e,t)}function xxe(e,t){so.call(this,e,t)}function ks(e,t){so.call(this,e,t)}function As(e,t){so.call(this,e,t)}function Sxe(e,t){this.a=e,this.b=t}function Cxe(e,t){this.a=e,this.b=t}function wxe(e,t){this.a=e,this.b=t}function Txe(e,t){this.a=e,this.b=t}function Exe(e,t){this.a=e,this.b=t}function Dxe(e,t){this.a=e,this.b=t}function Oxe(e,t){this.b=e,this.a=t}function kxe(e,t){this.b=e,this.a=t}function Axe(e,t){this.b=e,this.a=t}function js(e,t){this.c=e,this.d=t}function jxe(e,t){this.e=e,this.d=t}function Mxe(e,t){this.a=e,this.b=t}function Nxe(e,t){this.a=e,this.b=t}function Pxe(e,t){this.a=e,this.b=t}function Fxe(e,t){this.b=e,this.a=t}function Ixe(e,t){this.b=t,this.c=e}function Ms(e,t){so.call(this,e,t)}function Ns(e,t){so.call(this,e,t)}function Ps(e,t){so.call(this,e,t)}function Lxe(e,t){so.call(this,e,t)}function Fs(e,t){so.call(this,e,t)}function Is(e,t){so.call(this,e,t)}function Ls(e,t){so.call(this,e,t)}function Rs(e,t){so.call(this,e,t)}function zs(e,t){so.call(this,e,t)}function Bs(e,t){so.call(this,e,t)}function Vs(e,t){so.call(this,e,t)}function Hs(e,t){so.call(this,e,t)}function Us(e,t){so.call(this,e,t)}function Ws(e,t){so.call(this,e,t)}function Gs(e,t){so.call(this,e,t)}function Ks(e,t){so.call(this,e,t)}function qs(e,t){so.call(this,e,t)}function Js(e,t){so.call(this,e,t)}function Ys(e,t){so.call(this,e,t)}function Xs(e,t){so.call(this,e,t)}function Zs(e,t){so.call(this,e,t)}function Qs(e,t){so.call(this,e,t)}function $s(e,t){so.call(this,e,t)}function ec(e,t){so.call(this,e,t)}function tc(e,t){so.call(this,e,t)}function nc(e,t){so.call(this,e,t)}function rc(e,t){so.call(this,e,t)}function ic(e,t){so.call(this,e,t)}function ac(e,t){so.call(this,e,t)}function oc(e,t){so.call(this,e,t)}function sc(e,t){so.call(this,e,t)}function cc(e,t){so.call(this,e,t)}function lc(e,t){so.call(this,e,t)}function Rxe(e,t){this.b=e,this.a=t}function zxe(e,t){so.call(this,e,t)}function Bxe(e,t){this.a=e,this.b=t}function Vxe(e,t){this.a=e,this.b=t}function Hxe(e,t){this.a=e,this.b=t}function Uxe(e,t){so.call(this,e,t)}function Wxe(e,t){so.call(this,e,t)}function Gxe(e,t){this.a=e,this.b=t}function Kxe(e,t){return Rf(),t!=e}function uc(e){return jd(e.a),e.b}function dc(e){return Drt(e,e.c),e}function qxe(){return tye(),new rEt}function Jxe(){If(),this.a=new Zd}function Yxe(){rM(),this.a=new Jr}function Xxe(){B_(),this.b=new Jr}function Zxe(e,t){this.b=e,this.d=t}function Qxe(e,t){this.a=e,this.b=t}function $xe(e,t){this.a=e,this.b=t}function eSe(e,t){this.a=e,this.b=t}function tSe(e,t){this.b=e,this.a=t}function nSe(e,t){so.call(this,e,t)}function rSe(e,t){so.call(this,e,t)}function fc(e,t){so.call(this,e,t)}function pc(e,t){so.call(this,e,t)}function mc(e,t){so.call(this,e,t)}function hc(e,t){so.call(this,e,t)}function iSe(e,t){so.call(this,e,t)}function aSe(e,t){so.call(this,e,t)}function gc(e,t){so.call(this,e,t)}function oSe(e,t){so.call(this,e,t)}function _c(e,t){so.call(this,e,t)}function vc(e,t){so.call(this,e,t)}function yc(e,t){so.call(this,e,t)}function bc(e,t){so.call(this,e,t)}function xc(e,t){so.call(this,e,t)}function Sc(e,t){so.call(this,e,t)}function sSe(e,t){so.call(this,e,t)}function Cc(e,t){so.call(this,e,t)}function cSe(e,t){so.call(this,e,t)}function wc(e,t){so.call(this,e,t)}function Tc(e,t){so.call(this,e,t)}function lSe(e,t){so.call(this,e,t)}function Ec(e,t){so.call(this,e,t)}function uSe(e,t){so.call(this,e,t)}function dSe(e,t){this.b=e,this.a=t}function fSe(e,t){this.b=e,this.a=t}function pSe(e,t){this.b=e,this.a=t}function mSe(e,t){this.b=e,this.a=t}function hSe(e,t){this.a=e,this.b=t}function gSe(e,t){this.a=e,this.b=t}function _Se(e,t){this.a=e,this.b=t}function k(e,t){this.a=e,this.b=t}function Dc(e,t){so.call(this,e,t)}function Oc(e,t){so.call(this,e,t)}function kc(e,t){so.call(this,e,t)}function Ac(e,t){so.call(this,e,t)}function jc(e,t){so.call(this,e,t)}function Mc(e,t){so.call(this,e,t)}function Nc(e,t){so.call(this,e,t)}function Pc(e,t){so.call(this,e,t)}function Fc(e,t){so.call(this,e,t)}function Ic(e,t){so.call(this,e,t)}function Lc(e,t){so.call(this,e,t)}function Rc(e,t){so.call(this,e,t)}function zc(e,t){so.call(this,e,t)}function Bc(e,t){so.call(this,e,t)}function Vc(e,t){so.call(this,e,t)}function Hc(e,t){so.call(this,e,t)}function Uc(e,t){so.call(this,e,t)}function Wc(e,t){so.call(this,e,t)}function vSe(e,t){so.call(this,e,t)}function Gc(e,t){so.call(this,e,t)}function ySe(e,t){this.a=e,this.b=t}function bSe(e,t){this.a=e,this.b=t}function xSe(e,t){this.a=e,this.b=t}function SSe(e,t){this.a=e,this.b=t}function CSe(e,t){this.a=e,this.b=t}function wSe(e,t){this.a=e,this.b=t}function Kc(e,t){this.a=e,this.b=t}function TSe(e,t){this.a=e,this.b=t}function ESe(e,t){this.a=e,this.b=t}function DSe(e,t){this.a=e,this.b=t}function OSe(e,t){this.a=e,this.b=t}function kSe(e,t){this.a=e,this.b=t}function ASe(e,t){this.a=e,this.b=t}function jSe(e,t){this.b=e,this.a=t}function MSe(e,t){this.b=e,this.a=t}function NSe(e,t){this.b=e,this.a=t}function PSe(e,t){this.b=e,this.a=t}function FSe(e,t){this.a=e,this.b=t}function ISe(e,t){this.a=e,this.b=t}function qc(e,t){so.call(this,e,t)}function LSe(e,t){this.a=e,this.b=t}function RSe(e,t){this.a=e,this.b=t}function Jc(e,t){so.call(this,e,t)}function zSe(e,t){this.f=e,this.c=t}function Yc(e,t){return $u(e.g,t)}function BSe(e,t){return $u(t.b,e)}function VSe(e,t){return uD(e.a,t)}function HSe(e,t){return-e.b.af(t)}function USe(e,t){e&&Qh(f7,e,t)}function Xc(e,t){e.i=null,OS(e,t)}function WSe(e,t,n){I8e(t,KA(e,n))}function GSe(e,t,n){I8e(t,KA(e,n))}function KSe(e,t){not(e.a,P(t,58))}function qSe(e,t){KGe(e.a,P(t,12))}function Zc(e,t){this.a=e,this.b=t}function JSe(e,t){this.a=e,this.b=t}function YSe(e,t){this.a=e,this.b=t}function XSe(e,t){this.a=e,this.b=t}function ZSe(e,t){this.a=e,this.b=t}function QSe(e,t){this.d=e,this.b=t}function $Se(e,t){this.e=e,this.a=t}function Qc(e,t){this.b=e,this.c=t}function $c(e,t){this.i=e,this.g=t}function el(e,t){this.d=e,this.e=t}function eCe(e,t){kKe(new Lu(e),t)}function tl(e){return lD(e.c,e.b)}function nl(e){return e?e.md():null}function A(e){return e??null}function rl(e){return typeof e===OP}function il(e){return typeof e===DP}function al(e){return typeof e===Vvt}function ol(e,t){return dT(e,t)==0}function sl(e,t){return dT(e,t)>=0}function cl(e,t){return dT(e,t)!=0}function ll(e,t){return VYe(e.Kc(),t)}function ul(e,t){return e.Rd().Xb(t)}function tCe(e){return RE(e),e.d.gc()}function dl(e){return bp(e==null),e}function fl(e,t){return e.a+=``+t,e}function pl(e,t){return e.a+=``+t,e}function ml(e,t){return e.a+=``+t,e}function hl(e,t){return e.a+=``+t,e}function gl(e,t){return e.a+=``+t,e}function _l(e,t){return e.a+=``+t,e}function nCe(e){return``+(Gh(e),e)}function rCe(e){Pm(this),mC(this,e)}function iCe(){ERe(),bNe.call(this)}function aCe(e,t){GNe.call(this,e,t)}function oCe(e,t){GNe.call(this,e,t)}function vl(e,t){GNe.call(this,e,t)}function yl(e,t){iy(e,t,e.c.b,e.c)}function bl(e,t){iy(e,t,e.a,e.a.a)}function xl(e){return ov(e,0),null}function sCe(){this.b=0,this.a=!1}function cCe(){this.b=0,this.a=!1}function lCe(){this.b=new go(xx(12))}function uCe(){uCe=C,oDt=nT(sO())}function dCe(){dCe=C,NOt=nT(wot())}function fCe(){fCe=C,NPt=nT(qYe())}function Sl(){Sl=C,vge(),uG=new Dr}function Cl(e){return e.a=0,e.b=0,e}function pCe(e,t){return e.a=t.g+1,e}function wl(e,t){lf.call(this,e,t)}function Tl(e,t){Wd.call(this,e,t)}function El(e,t){$c.call(this,e,t)}function mCe(e,t){ad.call(this,e,t)}function Dl(e,t){WC.call(this,e,t)}function Ol(e,t){Jo(),Qh(v7,e,t)}function hCe(e,t){e.q.setTime(Dv(t))}function gCe(e){r.clearTimeout(e)}function _Ce(e){return ph(e),new Hl(e)}function vCe(e,t){return A(e)===A(t)}function yCe(e,t){return e.a.a.a.cc(t)}function kl(e,t){return p_(e.a,0,t)}function Al(e){return zPe(P(e,74))}function jl(e){return C_((Gh(e),e))}function bCe(e){return C_((Gh(e),e))}function xCe(e){return vu(e.l,e.m,e.h)}function Ml(e,t){return _u(e.a,t.a)}function SCe(e,t){return DPe(e.a,t.a)}function CCe(e,t){return aE(e.a,t.a)}function Nl(e,t){return e.indexOf(t)}function wCe(e,t){return e.j[t.p]==2}function Pl(e,t){return e==t?0:e?1:-1}function Fl(e){return e<10?`0`+e:``+e}function Il(e){return typeof e===Vvt}function TCe(e){return e==kJ||e==MJ}function ECe(e){return e==kJ||e==AJ}function DCe(e,t){return _u(e.g,t.g)}function Ll(e){return Ab(e.b.b,e,0)}function OCe(){Np.call(this,0,0,0,0)}function Rl(){Xn.call(this,new ry)}function zl(e,t){bb(e,0,e.length,t)}function kCe(e,t){return M(e.a,t),t}function ACe(e,t){return Lf(),t.a+=e}function jCe(e,t){return Lf(),t.a+=e}function MCe(e,t){return Lf(),t.c+=e}function NCe(e,t){return M(e.c,t),e}function Bl(e,t){return OC(e.a,t),e}function PCe(e){this.a=qxe(),this.b=e}function FCe(e){this.a=qxe(),this.b=e}function Vl(e){this.a=e.a,this.b=e.b}function Hl(e){this.a=e,dn.call(this)}function ICe(e){this.a=e,dn.call(this)}function Ul(){wg.call(this,0,0,0,0)}function Wl(e){return OC(new Zh,e)}function LCe(e){return ag(P(e,123))}function Gl(e){return e.vh()&&e.wh()}function Kl(e){return e!=V8&&e!=H8}function ql(e){return e==t8||e==n8}function Jl(e){return e==i8||e==e8}function RCe(e){return e==L0||e==I0}function zCe(e,t){return _u(e.g,t.g)}function BCe(e,t){return new WC(t,e)}function VCe(e,t){return new WC(t,e)}function Yl(e){return wje(e.b.Kc(),e.a)}function Xl(e,t){Gw(e,t),eS(e,e.D)}function Zl(e,t,n){Xx(e,t),Vx(e,n)}function Ql(e,t,n){Wx(e,t),Ux(e,n)}function $l(e,t,n){Gx(e,t),Kx(e,n)}function eu(e,t,n){Hx(e,t),Jx(e,n)}function tu(e,t,n){qx(e,t),Yx(e,n)}function HCe(e,t,n){mDe.call(this,e,t,n)}function nu(e){zSe.call(this,e,!0)}function UCe(){ls.call(this,`Tail`,3)}function WCe(){ls.call(this,`Head`,1)}function ru(e){AM(),IYe.call(this,e)}function iu(e){Np.call(this,e,e,e,e)}function au(e){e.c=V(WW,FP,1,0,5,1)}function GCe(e){return e.b&&yN(e),e.a}function KCe(e){return e.b&&yN(e),e.c}function qCe(e,t){_K||(e.b=t)}function JCe(e,t){return e[e.length]=t}function YCe(e,t){return e[e.length]=t}function XCe(e,t){return Ex(t,E_(e))}function ZCe(e,t){return Ex(t,E_(e))}function QCe(e,t){return yS(uh(e.d),t)}function $Ce(e,t){return yS(uh(e.g),t)}function ewe(e,t){return yS(uh(e.j),t)}function ou(e,t){Wd.call(this,e.b,t)}function twe(e,t){tb(Jv(e.a),IRe(t))}function nwe(e,t){tb(Ib(e.a),LRe(t))}function rwe(e,t,n){$l(n,n.i+e,n.j+t)}function iwe(e,t,n){Sh(e.c[t.g],t.g,n)}function awe(e,t,n){P(e.c,71).Gi(t,n)}function su(e,t,n){return Sh(e,t,n),n}function owe(e){Dx(e.Sf(),new Zfe(e))}function cu(e){return e==null?0:US(e)}function swe(e){return e==null?0:US(e)}function lu(e){xP(),Tr.call(this,e)}function cwe(e){this.a=e,xje.call(this,e)}function uu(){uu=C,r.Math.log(2)}function du(){du=C,s9=(Xbe(),mVt)}function lwe(){lwe=C,D2=new NE(p8)}function fu(){fu=C,new uwe,new T}function uwe(){new Dr,new Dr,new Dr}function dwe(){throw E(new Ri(_Tt))}function fwe(){throw E(new Ri(_Tt))}function pwe(){throw E(new Ri(vTt))}function mwe(){throw E(new Ri(vTt))}function pu(e){this.a=e,co.call(this,e)}function mu(e){this.a=e,co.call(this,e)}function hwe(e,t){gh(),this.a=e,this.b=t}function gwe(e,t){ph(t),bg(e).Jc(new m)}function hu(e,t){qp(e.c,e.c.length,t)}function gu(e){return e.at)}function ywe(e,t){return dT(e,t)>0?e:t}function vu(e,t,n){return{l:e,m:t,h:n}}function bwe(e,t){e.a!=null&&qSe(t,e.a)}function xwe(e){U_(e,null),K_(e,null)}function Swe(e,t,n){return Qh(e.g,n,t)}function yu(e,t,n){return AD(t,n,e.c)}function Cwe(e,t,n){return Qh(e.k,n,t)}function wwe(e,t,n){return kht(e,t,n),n}function Twe(e,t){return z_(),t.n.b+=e}function Ewe(e){r_.call(this),this.b=e}function Dwe(e){$De.call(this),this.a=e}function Owe(){ls.call(this,`Range`,2)}function bu(e){this.b=e,this.a=new T}function kwe(e){this.b=new jt,this.a=e}function Awe(e){e.a=new me,e.c=new me}function jwe(e){e.a=new Dr,e.d=new Dr}function Mwe(e){q_(e,null),J_(e,null)}function Nwe(e,t){return Nht(e.a,t,null)}function Pwe(e,t){return Qh(e.a,t.a,t)}function xu(e){return new k(e.a,e.b)}function Fwe(e){return new k(e.c,e.d)}function Iwe(e){return new k(e.c,e.d)}function Su(e,t){return xmt(e.c,e.b,t)}function j(e,t){return e!=null&&kO(e,t)}function Cu(e,t){return XXe(e.Kc(),t)!=-1}function wu(e){return e.Ob()?e.Pb():null}function Lwe(e){this.b=(Vg(),new Kn(e))}function Rwe(e){this.a=e,Dr.call(this)}function zwe(){ad.call(this,null,null)}function Bwe(){od.call(this,null,null)}function Vwe(){so.call(this,`INSTANCE`,0)}function Hwe(){i8e(),this.a=new Yj(CJ)}function Uwe(e){return ND(e,0,e.length)}function Wwe(e,t){return new PTe(e.Kc(),t)}function Gwe(e,t){return e.a.Bc(t)!=null}function Kwe(e,t){RN(e),e.Gc(P(t,15))}function qwe(e,t,n){e.c.bd(t,P(n,136))}function Jwe(e,t,n){e.c.Ui(t,P(n,136))}function Ywe(e,t){e.c&&(pMe(t),LLe(t))}function Xwe(e,t){e.q.setHours(t),dN(e,t)}function Zwe(e,t){Sd(t,e.a.a.a,e.a.a.b)}function Qwe(e,t,n,r){Sh(e.a[t.g],n.g,r)}function Tu(e,t,n){return e.a[t.g][n.g]}function $we(e,t){return e.e[t.c.p][t.p]}function eTe(e,t){return e.c[t.c.p][t.p]}function Eu(e,t){return e.a[t.c.p][t.p]}function tTe(e,t){return e.j[t.p]=Aat(t)}function Du(e,t){return e.a.Bc(t)!=null}function nTe(e,t){return D(N(t.a))<=e}function rTe(e,t){return D(N(t.a))>=e}function iTe(e,t){return zUe(e.f,t.Pg())}function Ou(e,t){return e.a*t.a+e.b*t.b}function aTe(e,t){return e.a0?t/(e*e):t*100}function SEe(e,t){return e>0?t*t/e:t*t*100}function xd(e,t){return P(ix(e.a,t),34)}function CEe(e,t){return wA(),fj(e,t.e,t)}function wEe(e,t,n){return zo(),n.Mg(e,t)}function TEe(e){return zx(),e.e.a+e.f.a/2}function EEe(e,t,n){return zx(),n.e.a-e*t}function DEe(e){return zx(),e.e.b+e.f.b/2}function OEe(e,t,n){return zx(),n.e.b-e*t}function kEe(e){e.d=new gEe(e),e.e=new Dr}function AEe(){this.a=new g_,this.b=new g_}function jEe(e){this.c=e,this.a=1,this.b=1}function MEe(e){dP(),lge(this),this.Ff(e)}function NEe(e,t,n){gb(),e.pf(t)&&n.Cd(e)}function PEe(e,t,n){return M(t,Y1e(e,n))}function Sd(e,t,n){return e.a+=t,e.b+=n,e}function FEe(e,t,n){return e.a*=t,e.b*=n,e}function IEe(e,t){return e.a=t.a,e.b=t.b,e}function Cd(e){return e.a=-e.a,e.b=-e.b,e}function wd(e,t,n){return e.a-=t,e.b-=n,e}function LEe(e){vo.call(this),_S(this,e)}function REe(){so.call(this,`GROW_TREE`,0)}function zEe(){so.call(this,`POLYOMINO`,0)}function Td(e,t,n){lb.call(this,e,t,n,2)}function BEe(e,t,n){WT(Jv(e.a),t,IRe(n))}function VEe(e,t){Yo(),ad.call(this,e,t)}function HEe(e,t){Xo(),od.call(this,e,t)}function UEe(e,t){Xo(),HEe.call(this,e,t)}function WEe(e,t){Xo(),od.call(this,e,t)}function GEe(e,t){return e.c.Fc(P(t,136))}function KEe(e,t,n){WT(Ib(e.a),t,LRe(n))}function qEe(e){this.c=e,Gx(e,0),Kx(e,0)}function Ed(e,t){du(),Bp.call(this,e,t)}function JEe(e,t){du(),Ed.call(this,e,t)}function YEe(e,t){du(),Ed.call(this,e,t)}function XEe(e,t){du(),Bp.call(this,e,t)}function ZEe(e,t){du(),YEe.call(this,e,t)}function QEe(e,t){du(),XEe.call(this,e,t)}function $Ee(e,t){du(),Bp.call(this,e,t)}function eDe(e,t,n){return t.zl(e.e,e.c,n)}function tDe(e,t,n){return t.Al(e.e,e.c,n)}function nDe(e,t,n){return jN(Lb(e,t),n)}function Dd(e,t){return pT(e.e,P(t,54))}function rDe(e){return e==null?null:Fgt(e)}function iDe(e){return e==null?null:G9e(e)}function aDe(e){return e==null?null:PE(e)}function oDe(e){return e==null?null:PE(e)}function Od(e){return bp(e==null||il(e)),e}function N(e){return bp(e==null||al(e)),e}function kd(e){return bp(e==null||rl(e)),e}function Ad(e){e.o??zit(e)}function sDe(e){if(!e)throw E(new Lr)}function cDe(e){if(!e)throw E(new Ir)}function jd(e){if(!e)throw E(new Hr)}function Md(e){if(!e)throw E(new Rr)}function lDe(e){if(!e)throw E(new Vr)}function Nd(){Nd=C,_7=new c_e,new l_e}function Pd(){Pd=C,y4=new yr(`root`)}function uDe(){EJe.call(this),this.Bb|=pI}function dDe(e,t){this.d=e,wfe(this),this.b=t}function fDe(e,t){Qy.call(this,e),this.a=t}function pDe(e,t){Qy.call(this,e),this.a=t}function mDe(e,t,n){Ry.call(this,e,t,n,null)}function hDe(e,t,n){Ry.call(this,e,t,n,null)}function Fd(e,t){this.c=e,io.call(this,e,t)}function Id(e,t){this.a=e,Fd.call(this,e,t)}function gDe(e){this.q=new r.Date(Dv(e))}function _De(e){return e>8?0:e+1}function vDe(e,t){_K||M(e.a,t)}function yDe(e,t){return Io(),jC(t.d.i,e)}function bDe(e,t){return cC(),new Ilt(t,e)}function xDe(e,t,n){return e.Ne(t,n)<=0?n:t}function SDe(e,t,n){return e.Ne(t,n)<=0?t:n}function CDe(e,t){return P(ix(e.b,t),143)}function wDe(e,t){return P(ix(e.c,t),233)}function Ld(e){return P(Ep(e.a,e.b),294)}function TDe(e){return new k(e.c,e.d+e.a)}function EDe(e){return Gh(e),e?1231:1237}function DDe(e){return z_(),RCe(P(e,203))}function Rd(){Rd=C,lq=sE((TD(),x5))}function ODe(e,t){t.a?Irt(e,t):Du(e.a,t.b)}function zd(e,t,n){++e.j,e.tj(),Xy(e,t,n)}function kDe(e,t,n){++e.j,e.qj(t,e.Zi(t,n))}function ADe(e,t,n){e.fd(t).Rb(n)}function jDe(e,t,n){return n=qM(e,t,6,n),n}function Bd(e,t,n){return n=qM(e,t,3,n),n}function Vd(e,t,n){return n=qM(e,t,9,n),n}function Hd(e,t){return c_(t,Iyt),e.f=t,e}function MDe(e,t){return(t&AP)%e.d.length}function NDe(e,t,n){return Xft(e.c,e.b,t,n)}function PDe(e,t){this.c=e,kx.call(this,t)}function FDe(e,t){this.a=e,Hhe.call(this,t)}function Ud(e,t){this.a=e,Hhe.call(this,t)}function Wd(e,t){yr.call(this,e),this.a=t}function IDe(e,t){Khe.call(this,e),this.a=t}function Gd(e,t){Khe.call(this,e),this.a=t}function LDe(e){iD.call(this,0,0),this.f=e}function RDe(e,t,n){return e.a+=ND(t,0,n),e}function Kd(e){return!e.a&&(e.a=new ee),e.a}function zDe(e,t){var n=e.e;return e.e=t,n}function BDe(e,t){var n=t;return!!e.Fe(n)}function VDe(e,t){return rd(),e==t?0:e?1:-1}function qd(e,t){e.a.bd(e.b,t),++e.b,e.c=-1}function Jd(e){e.b?Jd(e.b):e.f.c.zc(e.e,e.d)}function HDe(e){Pm(e.e),e.d.b=e.d,e.d.a=e.d}function UDe(e,t,n){wo(),jde(e,t.Ve(e.a,n))}function WDe(e,t,n){return zm(e,P(t,22),n)}function Yd(e,t){return ua(Array(t),e)}function GDe(e){return nm(um(e,32))^nm(e)}function Xd(e){return String.fromCharCode(e)}function KDe(e){return e==null?null:e.message}function qDe(e,t,n){return e.apply(t,n)}function JDe(e,t){e[TI].call(e,t)}function YDe(e,t){e[TI].call(e,t)}function XDe(e,t){return Io(),!jC(t.d.i,e)}function ZDe(e,t,n,r){Np.call(this,e,t,n,r)}function QDe(){Qd.call(this),this.a=new Fa}function $De(){this.n=new Fa,this.o=new Fa}function eOe(){this.b=new Fa,this.c=new T}function tOe(){this.a=new T,this.b=new T}function nOe(){this.a=new Vt,this.b=new Tge}function Zd(){this.b=new ry,this.a=new ry}function rOe(){this.b=new Jr,this.a=new Jr}function iOe(){this.b=new Dr,this.a=new Dr}function aOe(){this.b=new _ye,this.a=new iae}function oOe(){this.a=new Tue,this.b=new Ure}function sOe(){this.a=new T,this.d=new T}function Qd(){this.n=new ni,this.i=new Ul}function cOe(e){this.a=(vS(e,hF),new Hy(e))}function lOe(e){this.a=(vS(e,hF),new Hy(e))}function uOe(e){return e<100?null:new Pa(e)}function dOe(e,t){return e.n.a=(Gh(t),t+10)}function fOe(e,t){return e.n.a=(Gh(t),t+10)}function pOe(e,t){return t==e||Uk(zj(t),e)}function mOe(e,t){return Qh(e.a,t,``)==null}function hOe(e,t){return t.qi(e.a)}function $d(e,t){return e.a+=t.a,e.b+=t.b,e}function ef(e,t){return e.a-=t.a,e.b-=t.b,e}function gOe(e){return Wr(e.j.c,0),e.a=-1,e}function tf(e,t,n){return n=qM(e,t,11,n),n}function _Oe(e,t,n){n!=null&&TS(t,dk(e,n))}function vOe(e,t,n){n!=null&&ES(t,dk(e,n))}function nf(e,t,n,r){F.call(this,e,t,n,r)}function rf(e,t,n,r){F.call(this,e,t,n,r)}function yOe(e,t,n,r){rf.call(this,e,t,n,r)}function bOe(e,t,n,r){wm.call(this,e,t,n,r)}function af(e,t,n,r){wm.call(this,e,t,n,r)}function of(e,t,n,r){wm.call(this,e,t,n,r)}function xOe(e,t,n,r){af.call(this,e,t,n,r)}function sf(e,t,n,r){af.call(this,e,t,n,r)}function cf(e,t,n,r){of.call(this,e,t,n,r)}function SOe(e,t,n,r){sf.call(this,e,t,n,r)}function COe(e,t,n,r){dPe.call(this,e,t,n,r)}function lf(e,t){Mi.call(this,PU+e+bU+t)}function uf(e,t){return e.jk().wi().ri(e,t)}function df(e,t){return e.jk().wi().ti(e,t)}function wOe(e,t){return Gh(e),A(e)===A(t)}function ff(e,t){return Gh(e),A(e)===A(t)}function TOe(e,t){return e.b.Bd(new sxe(e,t))}function EOe(e,t){return e.b.Bd(new cxe(e,t))}function DOe(e,t){return e.b.Bd(new lxe(e,t))}function OOe(e,t){return e.e=P(e.d.Kb(t),159)}function pf(e,t,n){return e.lastIndexOf(t,n)}function kOe(e,t,n){return aE(e[t.a],e[n.a])}function AOe(e,t){return W(t,(mP(),d1),e)}function jOe(e,t){return _u(t.a.d.p,e.a.d.p)}function MOe(e,t){return _u(e.a.d.p,t.a.d.p)}function NOe(e,t){return aE(e.c-e.s,t.c-t.s)}function POe(e,t){return aE(e.b.e.a,t.b.e.a)}function FOe(e,t){return aE(e.c.e.a,t.c.e.a)}function IOe(e){return e.c?Ab(e.c.a,e,0):-1}function mf(e){return e==L8||e==z8||e==R8}function LOe(e,t){this.c=e,Hm.call(this,e,t)}function ROe(e,t,n){this.a=e,sEe.call(this,t,n)}function zOe(e){this.c=e,vl.call(this,tF,0)}function BOe(e,t,n){this.c=t,this.b=n,this.a=e}function hf(e){Rf(),this.d=e,this.a=new Iu}function VOe(e){wf(),this.a=(Vg(),new oa(e))}function HOe(e,t){ql(e.f)?Ait(e,t):f7e(e,t)}function UOe(e,t){kje.call(this,e,e.length,t)}function WOe(e,t){_K||t&&(e.d=t)}function GOe(e,t){return j(t,15)&&Mct(e.c,t)}function KOe(e,t,n){return P(e.c,71).Wk(t,n)}function gf(e,t,n){return P(e.c,71).Xk(t,n)}function qOe(e,t,n){return eDe(e,P(t,343),n)}function JOe(e,t,n){return tDe(e,P(t,343),n)}function YOe(e,t,n){return E5e(e,P(t,343),n)}function XOe(e,t,n){return A7e(e,P(t,343),n)}function _f(e,t){return t==null?null:TT(e.b,t)}function ZOe(e){return al(e)?(Gh(e),e):e.ue()}function vf(e){return!isNaN(e)&&!isFinite(e)}function yf(e){Awe(this),Fg(this),XS(this,e)}function bf(e){au(this),Fje(this.c,0,e.Pc())}function xf(e,t,n){this.a=e,this.b=t,this.c=n}function QOe(e,t,n){this.a=e,this.b=t,this.c=n}function $Oe(e,t,n){this.d=e,this.b=n,this.a=t}function eke(e){this.a=e,yo(),LC(Date.now())}function tke(e){Fh(e.a),KWe(e.c,e.b),e.b=null}function Sf(){Sf=C,aK=new he,oEt=new ge}function nke(){nke=C,TVt=V(WW,FP,1,0,5,1)}function rke(){rke=C,QVt=V(WW,FP,1,0,5,1)}function Cf(){Cf=C,$Vt=V(WW,FP,1,0,5,1)}function wf(){wf=C,new mge((Vg(),Vg(),QG))}function ike(e){return Sb(),iS((TGe(),dEt),e)}function ake(e){return Zw(),iS((MWe(),vEt),e)}function oke(e){return fO(),iS((wHe(),DEt),e)}function ske(e){return dx(),iS((THe(),OEt),e)}function cke(e){return vM(),iS((CXe(),kEt),e)}function lke(e){return Ix(),iS((AWe(),MEt),e)}function uke(e){return Cb(),iS((kWe(),PEt),e)}function dke(e){return Xb(),iS((jWe(),LEt),e)}function fke(e){return SP(),iS((uCe(),oDt),e)}function pke(e){return KC(),iS((DGe(),cDt),e)}function mke(e){return TO(),iS((kGe(),uDt),e)}function hke(e){return wO(),iS((OGe(),mDt),e)}function gke(e){return No(),iS((VBe(),hDt),e)}function _ke(e){return fx(),iS((EHe(),NDt),e)}function vke(e){return Yb(),iS((NWe(),aOt),e)}function yke(e){return vA(),iS((PKe(),lOt),e)}function bke(e){return ow(),iS((jGe(),hOt),e)}function xke(e){return YD(),iS((AGe(),xOt),e)}function Tf(e,t){if(!e)throw E(new Fi(t))}function Ef(e){if(!e)throw E(new Ii(Wvt))}function Df(e,t){if(e!=t)throw E(new Vr)}function Ske(e,t,n){this.a=e,this.b=t,this.c=n}function Of(e,t,n){this.a=e,this.b=t,this.c=n}function Cke(e,t,n){this.a=e,this.b=t,this.c=n}function kf(e,t,n){this.b=e,this.a=t,this.c=n}function Af(e,t,n){this.b=e,this.c=t,this.a=n}function jf(e,t,n){this.a=e,this.b=t,this.c=n}function Mf(e,t,n){this.e=t,this.b=e,this.d=n}function wke(e,t,n){this.b=e,this.a=t,this.c=n}function Tke(e,t,n){return wo(),e.a.Yd(t,n),t}function Nf(e){var t=new Ze;return t.e=e,t}function Pf(e){var t=new Hge;return t.b=e,t}function Ff(){Ff=C,oY=new vte,sY=new yte}function If(){If=C,ROt=new Kte,LOt=new qte}function Lf(){Lf=C,UOt=new tre,WOt=new nre}function Eke(e){return kS(),iS((uWe(),ekt),e)}function Dke(e){return yP(),iS((dCe(),NOt),e)}function Oke(e){return iw(),iS((NGe(),IOt),e)}function kke(e){return aw(),iS((MGe(),qOt),e)}function Ake(e){return tA(),iS((FKe(),YOt),e)}function jke(e){return dM(),iS((KYe(),tkt),e)}function Mke(e){return GA(),iS((Eqe(),nkt),e)}function Nke(e){return Ky(),iS((NHe(),rkt),e)}function Pke(e){return bS(),iS((cWe(),ikt),e)}function Fke(e){return lS(),iS((lWe(),akt),e)}function Ike(e){return FD(),iS((IKe(),okt),e)}function Lke(e){return px(),iS((kHe(),skt),e)}function Rke(e){return TA(),iS((kqe(),pkt),e)}function zke(e){return uM(),iS((gZe(),mkt),e)}function Bke(e){return qC(),iS((fWe(),hkt),e)}function Vke(e){return Zb(),iS((pWe(),_kt),e)}function Hke(e){return Bv(),iS((OHe(),vkt),e)}function Uke(e){return qk(),iS((Oqe(),fkt),e)}function Wke(e){return _w(),iS((dWe(),lkt),e)}function Gke(e){return kA(),iS((Dqe(),ukt),e)}function Kke(e){return wb(),iS((AHe(),dkt),e)}function qke(e){return XE(),iS((RKe(),ykt),e)}function Jke(e){return Zj(),iS((bXe(),MMt),e)}function Yke(e){return hT(),iS((mWe(),FMt),e)}function Xke(e){return IO(),iS((PGe(),IMt),e)}function Zke(e){return CO(),iS((LKe(),zMt),e)}function Qke(e){return FM(),iS((_Ze(),GMt),e)}function $ke(e){return ID(),iS((FGe(),JMt),e)}function eAe(e){return Qb(),iS((jHe(),XMt),e)}function tAe(e){return uS(),iS((_We(),QMt),e)}function nAe(e){return CC(),iS((hWe(),nNt),e)}function rAe(e){return Nw(),iS((gWe(),iNt),e)}function iAe(e){return Xw(),iS((vWe(),sNt),e)}function aAe(e){return cS(),iS((yWe(),dNt),e)}function oAe(e){return sw(),iS((bWe(),pNt),e)}function sAe(e){return sS(),iS((OWe(),jNt),e)}function cAe(e){return Vv(),iS((MHe(),RNt),e)}function lAe(e){return O_(),iS((IHe(),qNt),e)}function uAe(e){return k_(),iS((LHe(),YNt),e)}function dAe(e){return Wy(),iS((RHe(),dPt),e)}function fAe(e){return D_(),iS((zHe(),vPt),e)}function pAe(e){return Ok(),iS((YGe(),bPt),e)}function mAe(e){return LM(),iS((fCe(),NPt),e)}function hAe(e){return Pw(),iS((xWe(),IPt),e)}function gAe(e){return Jw(),iS((JGe(),TFt),e)}function _Ae(e){return iv(),iS((PHe(),OFt),e)}function vAe(e){return AS(),iS((FHe(),PFt),e)}function yAe(e){return iA(),iS((zKe(),IFt),e)}function bAe(e){return Yw(),iS((SWe(),UFt),e)}function xAe(e){return _b(),iS((BHe(),zFt),e)}function SAe(e){return uk(),iS((qGe(),wIt),e)}function CAe(e){return SC(),iS((CWe(),OIt),e)}function wAe(e){return ED(),iS((wWe(),AIt),e)}function TAe(e){return LO(),iS((TWe(),MIt),e)}function EAe(e){return TE(),iS((EWe(),RIt),e)}function DAe(e){return my(),iS((VHe(),xLt),e)}function OAe(e){return dC(),iS((DHe(),AOt),e)}function kAe(e){return DA(),iS((Aqe(),TOt),e)}function AAe(e){return Tb(),iS((DWe(),TLt),e)}function jAe(e){return JC(),iS((HHe(),kLt),e)}function MAe(e){return Wj(),iS((BKe(),MLt),e)}function NAe(e){return Bo(),iS((sVe(),FLt),e)}function PAe(e){return KT(),iS((FWe(),NLt),e)}function FAe(e){return Vo(),iS((cVe(),LLt),e)}function IAe(e){return Gy(),iS((UHe(),zLt),e)}function LAe(e){return MA(),iS((VKe(),WLt),e)}function RAe(e){return Ho(),iS((lVe(),SRt),e)}function zAe(e){return cw(),iS((WHe(),TRt),e)}function BAe(e){return uO(),iS((UKe(),FRt),e)}function VAe(e){return VA(),iS((WYe(),RRt),e)}function HAe(e){return RO(),iS((jqe(),HRt),e)}function UAe(e){return eA(),iS((Mqe(),ezt),e)}function WAe(e){return GT(),iS((HKe(),nBt),e)}function GAe(e){return Lx(),iS((IWe(),iBt),e)}function KAe(e){return wE(),iS((XGe(),aBt),e)}function qAe(e){return hA(),iS((Nqe(),fBt),e)}function JAe(e){return _T(),iS((PWe(),bBt),e)}function YAe(e){return kk(),iS((ZGe(),SBt),e)}function XAe(e){return Ej(),iS((SXe(),CBt),e)}function ZAe(e){return pO(),iS((WKe(),EBt),e)}function QAe(e){return rA(),iS((Pqe(),OBt),e)}function $Ae(e){return rj(),iS((Fqe(),kBt),e)}function eje(e){return nP(),iS((GKe(),ABt),e)}function tje(e){return TD(),iS((QGe(),IBt),e)}function nje(e){return UM(),iS((xXe(),RBt),e)}function rje(e){return gT(),iS((LWe(),VBt),e)}function ije(e,t){return Gh(e),e+(Gh(t),t)}function aje(e){return zf(),iS((GHe(),WBt),e)}function oje(e){return ZE(),iS(($Ge(),YBt),e)}function sje(e){return Mw(),iS((eKe(),tVt),e)}function Rf(){Rf=C,PNt=(nP(),g5),v2=X8}function zf(){zf=C,HBt=new AMe,UBt=new cPe}function cje(e){return!e.e&&(e.e=new T),e.e}function Bf(e,t){this.c=e,this.a=t,this.b=t-e}function lje(e,t,n){this.a=e,this.b=t,this.c=n}function Vf(e,t,n){this.a=e,this.b=t,this.c=n}function Hf(e,t,n){this.a=e,this.b=t,this.c=n}function Uf(e,t,n){this.a=e,this.b=t,this.c=n}function uje(e,t,n){this.a=e,this.b=t,this.c=n}function dje(e,t,n){this.a=e,this.b=t,this.c=n}function Wf(e,t,n){this.e=e,this.a=t,this.c=n}function fje(e,t,n){du(),ILe.call(this,e,t,n)}function Gf(e,t,n){du(),Ph.call(this,e,t,n)}function pje(e,t,n){du(),Ph.call(this,e,t,n)}function mje(e,t,n){du(),Ph.call(this,e,t,n)}function hje(e,t,n){du(),Gf.call(this,e,t,n)}function gje(e,t,n){du(),Gf.call(this,e,t,n)}function _je(e,t,n){du(),gje.call(this,e,t,n)}function vje(e,t,n){du(),pje.call(this,e,t,n)}function yje(e,t,n){du(),mje.call(this,e,t,n)}function Kf(e){Np.call(this,e.d,e.c,e.a,e.b)}function bje(e){Np.call(this,e.d,e.c,e.a,e.b)}function xje(e){this.d=e,wfe(this),this.b=FNe(e.d)}function Sje(e){return Sj(),iS((GYe(),bVt),e)}function qf(e,t){return ph(e),ph(t),new Hye(e,t)}function Jf(e,t){return ph(e),ph(t),new oMe(e,t)}function Cje(e,t){return ph(e),ph(t),new sMe(e,t)}function wje(e,t){return ph(e),ph(t),new Qye(e,t)}function Yf(e){return jd(e.b!=0),Ox(e,e.a.a)}function Tje(e){return jd(e.b!=0),Ox(e,e.c.b)}function Eje(e){return!e.c&&(e.c=new ln),e.c}function Xf(e){var t=new T;return rx(t,e),t}function Dje(e){var t=new Jr;return rx(t,e),t}function Oje(e){var t=new Nge;return HS(t,e),t}function Zf(e){var t=new vo;return HS(t,e),t}function P(e,t){return bp(e==null||kO(e,t)),e}function kje(e,t,n){WNe.call(this,t,n),this.a=e}function Aje(e,t){this.c=e,this.b=t,this.a=!1}function jje(){this.a=`;,;`,this.b=``,this.c=``}function Mje(e,t,n){this.b=e,aCe.call(this,t,n)}function Nje(e,t,n){this.c=e,ds.call(this,t,n)}function Pje(e,t,n){js.call(this,e,t),this.b=n}function Fje(e,t,n){art(n,0,e,t,n.length,!1)}function Qf(e,t,n,r,i){e.b=t,e.c=n,e.d=r,e.a=i}function Ije(e,t,n,r,i){e.d=t,e.c=n,e.a=r,e.b=i}function Lje(e,t){t&&(e.b=t,e.a=(Hh(t),t.a))}function $f(e,t){if(!e)throw E(new Fi(t))}function ep(e,t){if(!e)throw E(new Ii(t))}function Rje(e,t){if(!e)throw E(new ove(t))}function zje(e,t){return Ro(),_u(e.d.p,t.d.p)}function Bje(e,t){return zx(),aE(e.e.b,t.e.b)}function Vje(e,t){return zx(),aE(e.e.a,t.e.a)}function Hje(e,t){return _u(bMe(e.d),bMe(t.d))}function tp(e,t){return t&&Lh(e,t.d)?t:null}function Uje(e,t){return t==(nP(),g5)?e.c:e.d}function Wje(e){return MC(gPe(Il(e)?zC(e):e))}function Gje(e){return new k(e.c+e.b,e.d+e.a)}function Kje(e){return e!=null&&!zE(e,y7,b7)}function qje(e,t){return(R$e(e)<<4|R$e(t))&OF}function Jje(e,t,n,r,i){e.c=t,e.d=n,e.b=r,e.a=i}function Yje(e){var t=e.b;e.b=e.c,e.c=t}function Xje(e){var t,n=e.d;t=e.a,e.d=t,e.a=n}function Zje(e,t){var n=e.c;return PJe(e,t),n}function Qje(e,t){return e.g=t<0?-1:t,e}function np(e,t){return bqe(e),e.a*=t,e.b*=t,e}function $je(e,t,n){pqe.call(this,t,n),this.d=e}function rp(e,t,n){el.call(this,e,t),this.c=n}function ip(e,t,n){el.call(this,e,t),this.c=n}function eMe(e){Cf(),sn.call(this),this.ci(e)}function tMe(){By(),uFe.call(this,(qo(),N7))}function nMe(e){return xP(),++W9,new zp(0,e)}function rMe(){rMe=C,f9=(Vg(),new Gn(xW))}function ap(){ap=C,new FO((mi(),ZW),(pi(),XW))}function iMe(){iMe=C,OG=V(DG,X,17,256,0,1)}function aMe(){this.b=D(N(hO((XM(),eJ))))}function op(e){this.b=e,this.a=am(this.b.a).Od()}function oMe(e,t){this.b=e,this.a=t,dn.call(this)}function sMe(e,t){this.a=e,this.b=t,dn.call(this)}function cMe(e,t,n){this.a=e,El.call(this,t,n)}function lMe(e,t,n){this.a=e,El.call(this,t,n)}function sp(e,t,n){hx(e,t,new mh(n))}function uMe(e,t,n){var r=e[t];return e[t]=n,r}function cp(e){return yb(e.slice(),e)}function lp(e){var t=e.n;return e.a.b+t.d+t.a}function dMe(e){var t=e.n;return e.e.b+t.d+t.a}function fMe(e){var t=e.n;return e.e.a+t.b+t.c}function pMe(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function up(e,t){return iy(e,t,e.c.b,e.c),!0}function mMe(e){return e.a?e.a:xg(e)}function hMe(e){return Ug(),xA(e)==I_(SA(e))}function gMe(e){return Ug(),SA(e)==I_(xA(e))}function dp(e,t){return Bk(e,new js(t.a,t.b))}function _Me(e,t){return eg(),ik(e,t),new jFe(e,t)}function vMe(e,t){return e.c=t)throw E(new e_e)}function _m(e,t){return MT(e,(Gh(t),new jfe(t)))}function vm(e,t){return MT(e,(Gh(t),new Mfe(t)))}function XNe(e,t,n){return kvt(e,P(t,12),P(n,12))}function ZNe(e){return fC(),P(e,12).g.c.length!=0}function QNe(e){return fC(),P(e,12).e.c.length!=0}function $Ne(e,t){return cC(),aE(t.a.o.a,e.a.o.a)}function ePe(e,t){(t.Bb&GH)!=0&&!e.a.o&&(e.a.o=t)}function tPe(e,t){t.Ug(`General 'Rotator`,1),vgt(e)}function nPe(e,t,n){t.qf(n,D(N(xh(e.b,n)))*e.a)}function rPe(e,t,n){return fM(),_C(e,t)&&_C(e,n)}function ym(e){return rj(),!e.Hc(G8)&&!e.Hc(q8)}function iPe(e){return e.e?$Ue(e.e):null}function bm(e){return Il(e)?``+e:Ect(e)}function aPe(e){for(var t=e;t.f;)t=t.f;return t}function oPe(e,t,n){return Sh(t,0,Op(t[0],n[0])),t}function xm(e,t,n,r){var i=e.i;i.i=t,i.a=n,i.b=r}function F(e,t,n,r){ju.call(this,e,t,n),this.b=r}function Sm(e,t,n,r,i){ub.call(this,e,t,n,r,i,-1)}function Cm(e,t,n,r,i){db.call(this,e,t,n,r,i,-1)}function wm(e,t,n,r){rp.call(this,e,t,n),this.b=r}function sPe(e){zSe.call(this,e,!1),this.a=!1}function cPe(){vSe.call(this,`LOOKAHEAD_LAYOUT`,1)}function lPe(e){this.b=e,cd.call(this,e),CTe(this)}function uPe(e){this.b=e,ud.call(this,e),wTe(this)}function Tm(e,t,n){this.a=e,nf.call(this,t,n,5,6)}function dPe(e,t,n,r){this.b=e,ju.call(this,t,n,r)}function fPe(e,t){this.b=e,_de.call(this,e.b),this.a=t}function pPe(e){this.a=m4e(e.a),this.b=new bf(e.b)}function mPe(e,t){gh(),rbe.call(this,e,bT(new Wi(t)))}function Em(e,t){return xP(),++W9,new Nh(e,t,0)}function Dm(e,t){return xP(),++W9,new Nh(6,e,t)}function Om(e,t){for(Gh(t);e.Ob();)t.Cd(e.Pb())}function km(e,t){return rl(t)?e_(e,t):!!Kp(e.f,t)}function Am(e,t){return t.Vh()?pT(e.b,P(t,54)):t}function hPe(e,t){return ff(e.substr(0,t.length),t)}function jm(e){return new pm(new ATe(e.a.length,e.a))}function Mm(e){return new k(e.c+e.b/2,e.d+e.a/2)}function gPe(e){return vu(~e.l&QF,~e.m&QF,~e.h&$F)}function Nm(e){return typeof e===EP||typeof e===kP}function Pm(e){e.f=new PCe(e),e.i=new FCe(e),++e.g}function _Pe(e){if(!e)throw E(new Hr);return e.d}function Fm(e){var t=yw(e);return jd(t!=null),t}function vPe(e){var t=u1e(e);return jd(t!=null),t}function Im(e,t){var n=e.a.gc();return RUe(t,n),n-t}function Lm(e,t){return e.a.zc(t,e)==null}function Rm(e,t){return e.a.zc(t,(rd(),vG))==null}function yPe(e){return new Mp(null,OPe(e,e.length))}function bPe(e,t,n){return ypt(e,P(t,42),P(n,176))}function zm(e,t,n){return PS(e.a,t),uMe(e.b,t.g,n)}function xPe(e,t,n){gm(n,e.a.c.length),uy(e.a,n,t)}function I(e,t,n,r){TQe(t,n,e.length),SPe(e,t,n,r)}function SPe(e,t,n,r){var i;for(i=t;i0?r.Math.log(e/t):-100}function DPe(e,t){return dT(e,t)<0?-1:+(dT(e,t)>0)}function qm(e,t){Kwe(e,j(t,160)?t:P(t,2036).Rl())}function Jm(e,t){if(e==null)throw E(new Li(t))}function OPe(e,t){return gqe(t,e.length),new kMe(e,t)}function Ym(e,t){return t?XS(e,t):!1}function kPe(){return xi(),U(O(MTt,1),Z,549,0,[tG])}function Xm(e){return e.e==0?e:new Bm(-e.e,e.d,e.a)}function APe(e,t){return aE(e.c.c+e.c.b,t.c.c+t.c.b)}function Zm(e,t){iy(e.d,t,e.b.b,e.b),++e.a,e.c=null}function jPe(e,t){return e.c?jPe(e.c,t):M(e.b,t),e}function MPe(e,t,n){var r=ax(e,t);return Yv(e,t,n),r}function NPe(e,t,n){var r;for(r=0;r=e.g}function Sh(e,t,n){return cDe(n==null||mdt(e,n)),e[t]=n}function Ch(e,t){return sv(t,e.length+1),e.substr(t)}function wh(e,t){for(Gh(t);e.c=e?new _be:RJe(e-1)}function Bh(e){return!e.a&&e.c?e.c.b:e.a}function Vh(e){return j(e,616)?e:new KLe(e)}function Hh(e){e.c?Hh(e.c):(lE(e),e.d=!0)}function Uh(e){e.c?e.c.$e():(e.d=!0,bot(e))}function _Fe(e){e.b=!1,e.c=!1,e.d=!1,e.a=!1}function vFe(e){return e.c.i.c==e.d.i.c}function yFe(e,t){var n=e.Ih(t);n>=0?e.ki(n):Qtt(e,t)}function bFe(e,t){e.c<0||e.b.b0;)e=e<<1|e<0;return e}function BFe(e,t){var n=new Eh(e);return Mr(t.c,n),n}function VFe(e,t){e.u.Hc((rj(),G8))&&bnt(e,t),RWe(e,t)}function rg(e,t){return A(e)===A(t)||e!=null&&NT(e,t)}function ig(e,t){return Gp(e.a,t)?e.b[P(t,22).g]:null}function HFe(){return No(),U(O(Oq,1),Z,489,0,[Dq])}function UFe(){return Bo(),U(O(PLt,1),Z,490,0,[v3])}function WFe(){return Vo(),U(O(ILt,1),Z,558,0,[y3])}function GFe(){return Ho(),U(O(xRt,1),Z,539,0,[O3])}function ag(e){return!e.n&&(e.n=new F(Q5,e,1,7)),e.n}function og(e){return!e.c&&(e.c=new F(e7,e,9,9)),e.c}function sg(e){return!e.c&&(e.c=new cf(H5,e,5,8)),e.c}function KFe(e){return!e.b&&(e.b=new cf(H5,e,4,7)),e.b}function cg(e){return e.j.c.length=0,yg(e.c),gOe(e.a),e}function lg(e){return e.e==SW&&gfe(e,p2e(e.g,e.b)),e.e}function ug(e){return e.f==SW&&vfe(e,O6e(e.g,e.b)),e.f}function dg(e,t,n,r){return lXe(e,t,n,!1),LT(e,r),e}function qFe(e,t){this.b=e,Hm.call(this,e,t),CTe(this)}function JFe(e,t){this.b=e,LOe.call(this,e,t),wTe(this)}function fg(e){this.d=e,this.a=this.d.b,this.b=this.d.c}function pg(e,t){this.b=e,this.c=t,this.a=new _o(this.b)}function mg(e,t){return sv(t,e.length),e.charCodeAt(t)}function YFe(e,t){fE(e,D(nS(t,`x`)),D(nS(t,`y`)))}function XFe(e,t){fE(e,D(nS(t,`x`)),D(nS(t,`y`)))}function hg(e,t){return lE(e),new Mp(e,new UGe(t,e.a))}function gg(e,t){return lE(e),new Mp(e,new WUe(t,e.a))}function _g(e,t){return lE(e),new fDe(e,new HUe(t,e.a))}function vg(e,t){return lE(e),new pDe(e,new UUe(t,e.a))}function ZFe(e,t){return new VIe(P(ph(e),50),P(ph(t),50))}function QFe(e,t){return aE(e.d.c+e.d.b/2,t.d.c+t.d.b/2)}function $Fe(e,t,n){n.a?Kx(e,t.b-e.f/2):Gx(e,t.a-e.g/2)}function eIe(e,t){return aE(e.g.c+e.g.b/2,t.g.c+t.g.b/2)}function tIe(e,t){return Pbe(),aE((Gh(e),e),(Gh(t),t))}function nIe(e){return e!=null&&po(x7,e.toLowerCase())}function yg(e){var t;for(t=e.Kc();t.Ob();)t.Pb(),t.Qb()}function bg(e){var t=e.b;return!t&&(e.b=t=new lde(e)),t}function xg(e){return HJe(e)||null}function rIe(e,t){var n=e/t,r=C_(n);return n>r&&++r,r}function iIe(e,t,n){var r=P(e.d.Kb(n),159);r&&r.Nb(t)}function aIe(e,t,n){gpt(e.a,n),PXe(n),sit(e.b,n),Wpt(t,n)}function Sg(e,t,n,r){this.a=e,this.c=t,this.b=n,this.d=r}function Cg(e,t,n,r){this.c=e,this.b=t,this.a=n,this.d=r}function oIe(e,t,n,r){this.c=e,this.b=t,this.d=n,this.a=r}function wg(e,t,n,r){this.c=e,this.d=t,this.b=n,this.a=r}function sIe(e,t,n,r){this.a=e,this.d=t,this.c=n,this.b=r}function Tg(e,t,n,r){this.a=e,this.e=t,this.d=n,this.c=r}function cIe(e,t,n,r){this.a=e,this.c=t,this.d=n,this.b=r}function Eg(e,t,n){this.a=ryt,this.d=e,this.b=t,this.c=n}function Dg(e,t,n,r){so.call(this,e,t),this.a=n,this.b=r}function lIe(e,t){this.d=(Gh(e),e),this.a=16449,this.c=t}function uIe(e){this.a=new T,this.e=V(q9,X,53,e,0,2)}function dIe(e){e.Ug(`No crossing minimization`,1),e.Vg()}function fIe(){yi.call(this,`There is no more element.`)}function pIe(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r}function mIe(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r}function Og(e,t,n,r){this.e=e,this.a=t,this.c=n,this.d=r}function hIe(e,t,n,r){this.a=e,this.c=t,this.d=n,this.b=r}function gIe(e,t,n,r){du(),GUe.call(this,t,n,r),this.a=e}function _Ie(e,t,n,r){du(),GUe.call(this,t,n,r),this.a=e}function kg(e,t,n){var r=n_t(e);return t.ti(n,r)}function Ag(e){var t,n=(t=new kr,t);return Nx(n,e),n}function jg(e){var t,n=(t=new kr,t);return i9e(n,e),n}function vIe(e,t){return yC(t,xh(e.f,t)),null}function yIe(e){return!e.b&&(e.b=new F(U5,e,12,3)),e.b}function bIe(e){return bp(e==null||Nm(e)&&e.Tm!==ne),e}function Mg(e){return e.n&&(e.e!==eyt&&e.je(),e.j=null),e}function Ng(e){if(RE(e.d),e.d.d!=e.c)throw E(new Vr)}function Pg(e){return jd(e.b0&&d8e(this)}function xIe(e,t){this.a=e,dDe.call(this,e,P(e.d,15).fd(t))}function SIe(e,t){return aE(Lp(e)*Ip(e),Lp(t)*Ip(t))}function CIe(e,t){return aE(Lp(e)*Ip(e),Lp(t)*Ip(t))}function wIe(e){return uj(e)&&ki(Od(J(e,(mP(),A1))))}function TIe(e,t){return fj(e,P(K(t,(mP(),Y1)),17),t)}function EIe(e,t){return P(K(e,(Y(),PQ)),15).Fc(t),t}function Lg(e,t){return e.b=t.b,e.c=t.c,e.d=t.d,e.a=t.a,e}function DIe(e,t,n,r){this.b=e,this.c=r,vl.call(this,t,n)}function OIe(e,t,n){e.i=0,e.e=0,t!=n&&RZe(e,t,n)}function kIe(e,t,n){e.i=0,e.e=0,t!=n&&zZe(e,t,n)}function AIe(e,t,n){return Lo(),N1e(P(xh(e.e,t),529),n)}function Rg(e){var t;return t=e.f,t||(e.f=new io(e,e.c))}function jIe(e,t){return CT(e.j,t.s,t.c)+CT(t.e,e.s,e.c)}function MIe(e,t){e.e&&!e.e.a&&(Qhe(e.e,t),MIe(e.e,t))}function NIe(e,t){e.d&&!e.d.a&&(Qhe(e.d,t),NIe(e.d,t))}function PIe(e,t){return-aE(Lp(e)*Ip(e),Lp(t)*Ip(t))}function FIe(e){return P(e.ld(),149).Pg()+`:`+PE(e.md())}function IIe(){EA(this,new $ue),this.wb=(vh(),z7),Ra()}function LIe(e){this.b=new T,nw(this.b,this.b),this.a=e}function zg(e,t){new vo,this.a=new ai,this.b=e,this.c=t}function Bg(){Bg=C,nK=new ue,rK=new ue,iK=new de}function Vg(){Vg=C,QG=new ae,$G=new se,eK=new ce}function Hg(){Hg=C,wEt=new Ge,EEt=new yNe,TEt=new Ke}function Ug(){Ug=C,zq=new T,Rq=new Dr,Lq=new T}function Wg(e,t){if(e==null)throw E(new Li(t));return e}function Gg(e){return!e.a&&(e.a=new F($5,e,10,11)),e.a}function Kg(e){return!e.q&&(e.q=new F(M7,e,11,10)),e.q}function R(e){return!e.s&&(e.s=new F(w7,e,21,17)),e.s}function RIe(e){return ph(e),z4e(new pm(Vu(e.a.Kc(),new d)))}function zIe(e,t){return $w(e),$w(t),eve(P(e,22),P(t,22))}function qg(e,t,n){hx(e,t,new Cn(ZOe(n)))}function Jg(e,t,n,r,i,a){db.call(this,e,t,n,r,i,a?-2:-1)}function BIe(e,t,n,r){el.call(this,t,n),this.b=e,this.a=r}function VIe(e,t){F_e.call(this,new mm(e)),this.a=e,this.b=t}function Yg(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function HIe(e){Lf();var t=P(e.g,10);t.n.a=e.d.c+t.d.b}function Xg(){Xg=C;var e,t=!L0e();e=new b,lG=t?new y:e}function Zg(e){return Vg(),j(e,59)?new sa(e):new qu(e)}function Qg(e){return j(e,16)?new jp(P(e,16)):Dje(e.Kc())}function UIe(e){return new DTe(e,e.e.Rd().gc()*e.c.Rd().gc())}function WIe(e){return new OTe(e,e.e.Rd().gc()*e.c.Rd().gc())}function $g(e){return e&&e.hashCode?e.hashCode():td(e)}function e_(e,t){return t==null?!!Kp(e.f,null):dNe(e.i,t)}function GIe(e,t){var n=Gwe(e.a,t);return n&&(t.d=null),n}function KIe(e,t,n){return e.f?e.f.ef(t,n):!1}function t_(e,t,n,r){Sh(e.c[t.g],n.g,r),Sh(e.c[n.g],t.g,r)}function n_(e,t,n,r){Sh(e.c[t.g],t.g,n),Sh(e.b[t.g],t.g,r)}function qIe(e,t,n){return D(N(n.a))<=e&&D(N(n.b))>=t}function JIe(e,t){this.g=e,this.d=U(O(UJ,1),jR,10,0,[t])}function YIe(e){this.c=e,this.b=new Ja(P(ph(new qe),50))}function XIe(e){this.c=e,this.b=new Ja(P(ph(new dee),50))}function ZIe(e){this.b=e,this.a=new Ja(P(ph(new At),50))}function QIe(){this.b=new Jr,this.d=new vo,this.e=new $r}function r_(){this.c=new Fa,this.d=new Fa,this.e=new Fa}function i_(){this.a=new ai,this.b=(vS(3,hF),new Hy(3))}function a_(e,t){this.e=e,this.a=WW,this.b=glt(t),this.c=t}function o_(e){this.c=e.c,this.d=e.d,this.b=e.b,this.a=e.a}function $Ie(e,t,n,r,i,a){this.a=e,xS.call(this,t,n,r,i,a)}function eLe(e,t,n,r,i,a){this.a=e,xS.call(this,t,n,r,i,a)}function s_(e,t,n,r,i,a,o){return new ey(e.e,t,n,r,i,a,o)}function tLe(e,t,n){return n>=0&&ff(e.substr(n,t.length),t)}function nLe(e,t){return j(t,149)&&ff(e.b,P(t,149).Pg())}function rLe(e,t){return e.a?t.Gh().Kc():P(t.Gh(),71).Ii()}function iLe(e,t){var n=e.b.Qc(t);return bHe(n,e.b.gc()),n}function c_(e,t){if(e==null)throw E(new Li(t));return e}function l_(e){return e.u||=(_y(e),new FDe(e,e)),e.u}function u_(e){this.a=(Vg(),j(e,59)?new sa(e):new qu(e))}function d_(e){return P(NC(e,16),29)||e.ii()}function f_(e,t){var n=Ha(e.Rm);return t==null?n:n+`: `+t}function p_(e,t,n){return Zy(t,n,e.length),e.substr(t,n-t)}function aLe(e,t){Qd.call(this),Px(this),this.a=e,this.c=t}function oLe(e){!e||f_(e,e.ie())}function sLe(e){Qi(),r.setTimeout(function(){throw e},0)}function cLe(){return fO(),U(O(DK,1),Z,436,0,[EK,TK])}function lLe(){return dx(),U(O(AK,1),Z,435,0,[OK,kK])}function uLe(){return fx(),U(O(Uq,1),Z,432,0,[Vq,Hq])}function dLe(){return dC(),U(O(kOt,1),Z,517,0,[aY,iY])}function fLe(){return Bv(),U(O(lQ,1),Z,429,0,[sQ,cQ])}function pLe(){return px(),U(O(hZ,1),Z,428,0,[pZ,mZ])}function mLe(){return Ky(),U(O(QX,1),Z,431,0,[XX,ZX])}function hLe(){return Qb(),U(O(YMt,1),Z,430,0,[e2,t2])}function gLe(){return Vv(),U(O(LNt,1),Z,531,0,[b2,y2])}function _Le(){return AS(),U(O(NFt,1),Z,501,0,[b4,x4])}function vLe(){return O_(),U(O(KNt,1),Z,523,0,[w2,C2])}function yLe(){return k_(),U(O(JNt,1),Z,522,0,[T2,E2])}function bLe(){return Wy(),U(O(uPt,1),Z,528,0,[A2,k2])}function xLe(){return wb(),U(O(OZ,1),Z,488,0,[DZ,EZ])}function SLe(){return my(),U(O(bLt,1),Z,491,0,[s3,yLt])}function CLe(){return JC(),U(O(OLt,1),Z,492,0,[ELt,DLt])}function wLe(){return iv(),U(O(DFt,1),Z,433,0,[v4,EFt])}function TLe(){return _b(),U(O(RFt,1),Z,434,0,[LFt,D4])}function ELe(){return D_(),U(O(_Pt,1),Z,465,0,[j2,M2])}function DLe(){return Gy(),U(O(RLt,1),Z,438,0,[x3,b3])}function OLe(){return cw(),U(O(wRt,1),Z,437,0,[k3,CRt])}function kLe(){return zf(),U(O(P5,1),Z,347,0,[HBt,UBt])}function m_(e,t,n,r){return n>=0?e.Uh(t,n,r):e.Ch(null,n,r)}function h_(e){return e.b.b==0?e.a.sf():Yf(e.b)}function ALe(e){if(e.p!=5)throw E(new Rr);return nm(e.f)}function jLe(e){if(e.p!=5)throw E(new Rr);return nm(e.k)}function MLe(e){return A(e.a)===A((uC(),r9))&&bmt(e),e.a}function NLe(e,t){e.b=t,e.c>0&&e.b>0&&(e.g=Pp(e.c,e.b,e.a))}function PLe(e,t){e.c=t,e.c>0&&e.b>0&&(e.g=Pp(e.c,e.b,e.a))}function FLe(e,t){Qde(this,new k(e.a,e.b)),$de(this,Zf(t))}function g_(){I_e.call(this,new go(xx(12))),vTe(!0),this.a=2}function __(e,t,n){xP(),Tr.call(this,e),this.b=t,this.a=n}function ILe(e,t,n){du(),xr.call(this,t),this.a=e,this.b=n}function LLe(e){var t=e.c.d.b;e.b=t,e.a=e.c.d,t.a=e.c.d.b=e}function RLe(e){return e.b==0?null:(jd(e.b!=0),Ox(e,e.a.a))}function v_(e,t){return t==null?nl(Kp(e.f,null)):as(e.i,t)}function zLe(e,t,n,r,i){return new IA(e,(Sb(),fK),t,n,r,i)}function y_(e,t){return dHe(t),eJe(e,V(q9,HF,28,t,15,1),t)}function b_(e,t){return Wg(e,`set1`),Wg(t,`set2`),new ibe(e,t)}function BLe(e,t){return aG[e.charCodeAt(0)]??e}function VLe(e,t){var n=t,r=new ve;return Aht(e,n,r),r.d}function x_(e,t,n,r){var i=new QDe;t.a[n.g]=i,zm(e.b,r,i)}function HLe(e,t){return $d(Cd(Bqe(e.f,t)),e.f.d)}function S_(e){var t;xJe(e.a),owe(e.a),t=new ar(e.a),KE(t)}function ULe(e,t){Uct(e,!0),Dx(e.e.Rf(),new Af(e,!0,t))}function WLe(e,t){return Ug(),e==I_(xA(t))||e==I_(SA(t))}function GLe(e,t){return zx(),P(K(t,(rN(),p4)),17).a==e}function C_(e){return Math.max(Math.min(e,AP),-2147483648)|0}function KLe(e){this.a=P(ph(e),277),this.b=(Vg(),new UTe(e))}function qLe(e,t,n){this.i=new T,this.b=e,this.g=t,this.a=n}function JLe(e,t,n){this.a=new T,this.e=e,this.f=t,this.c=n}function w_(e,t,n){this.c=new T,this.e=e,this.f=t,this.b=n}function YLe(e){Qd.call(this),Px(this),this.a=e,this.c=!0}function XLe(e){function t(){}return t.prototype=e||{},new t}function ZLe(e){if(e.Ae())return null;var t=e.n;return UW[t]}function T_(e){return e.Db>>16==3?P(e.Cb,27):null}function E_(e){return e.Db>>16==9?P(e.Cb,27):null}function QLe(e){return e.Db>>16==6?P(e.Cb,74):null}function D_(){D_=C,j2=new rSe(cL,0),M2=new rSe(lL,1)}function O_(){O_=C,w2=new Uxe(lL,0),C2=new Uxe(cL,1)}function k_(){k_=C,T2=new Wxe(hL,0),E2=new Wxe(`UP`,1)}function $Le(){$Le=C,NTt=nT((xi(),U(O(MTt,1),Z,549,0,[tG])))}function eRe(e){var t=new qa(xx(e.length));return wZe(t,e),t}function tRe(e,t){return e.b+=t.b,e.c+=t.c,e.d+=t.d,e.a+=t.a,e}function nRe(e,t){return IXe(e,t)?(oJe(e),!0):!1}function A_(e,t){if(t==null)throw E(new zr);return K0e(e,t)}function j_(e,t){var n=e.q.getHours();e.q.setDate(t),dN(e,n)}function rRe(e,t,n){var r=e.Ih(t);r>=0?e.bi(r,n):Pat(e,t,n)}function iRe(e,t){var n=e.Ih(t);return n>=0?e.Wh(n):cj(e,t)}function aRe(e,t){var n;for(ph(t),n=e.a;n;n=n.c)t.Yd(n.g,n.i)}function M_(e,t,n){e.b=new VS(kZe(e,t,n).c.length)}function N_(e,t,n){R_(),e&&Qh(p7,e,t),e&&Qh(f7,e,n)}function oRe(e,t){return If(),rd(),P(t.a,17).a0}function lRe(e){var t=e.d;return t=e.bj(e.f),tb(e,t),t.Ob()}function uRe(e,t){var n=new Ap(t);return L7e(n,e),new bf(n)}function dRe(e){if(e.p!=0)throw E(new Rr);return cl(e.f,0)}function fRe(e){if(e.p!=0)throw E(new Rr);return cl(e.k,0)}function pRe(e){return e.Db>>16==7?P(e.Cb,241):null}function F_(e){return e.Db>>16==6?P(e.Cb,241):null}function mRe(e){return e.Db>>16==7?P(e.Cb,167):null}function I_(e){return e.Db>>16==11?P(e.Cb,27):null}function L_(e){return e.Db>>16==17?P(e.Cb,29):null}function hRe(e){return e.Db>>16==3?P(e.Cb,155):null}function gRe(e){var t;return lE(e),t=new Jr,hg(e,new Wfe(t))}function _Re(e,t){var n=e.a=e.a||[];return n[t]||(n[t]=e.ve(t))}function vRe(e,t){var n=e.q.getHours();e.q.setMonth(t),dN(e,n)}function yRe(e,t){Fu(this),this.f=t,this.g=e,Mg(this),this.je()}function bRe(e,t){this.a=e,this.c=xu(this.a),this.b=new o_(t)}function xRe(e,t,n){this.a=t,this.c=e,this.b=(ph(n),new bf(n))}function SRe(e,t,n){this.a=t,this.c=e,this.b=(ph(n),new bf(n))}function CRe(e){this.a=e,this.b=V(MNt,X,2043,e.e.length,0,2)}function wRe(){this.a=new Rl,this.e=new Jr,this.g=0,this.i=0}function R_(){R_=C,p7=new Dr,f7=new Dr,USe(tEt,new Ise)}function TRe(){TRe=C,mNt=tm(new Zh,(vA(),SJ),(yP(),nX))}function ERe(){ERe=C,hNt=tm(new Zh,(vA(),SJ),(yP(),nX))}function DRe(){DRe=C,_Nt=tm(new Zh,(vA(),SJ),(yP(),nX))}function ORe(){ORe=C,zNt=vp(new Zh,(vA(),SJ),(yP(),OY))}function z_(){z_=C,HNt=vp(new Zh,(vA(),SJ),(yP(),OY))}function kRe(){kRe=C,GNt=vp(new Zh,(vA(),SJ),(yP(),OY))}function B_(){B_=C,XNt=vp(new Zh,(vA(),SJ),(yP(),OY))}function V_(e,t,n,r,i,a){return new Hb(e.e,t,e.Lj(),n,r,i,a)}function H_(e,t,n){return t==null?XA(e.f,null,n):uE(e.i,t,n)}function U_(e,t){e.c&&Db(e.c.g,e),e.c=t,e.c&&M(e.c.g,e)}function W_(e,t){e.c&&Db(e.c.a,e),e.c=t,e.c&&M(e.c.a,e)}function G_(e,t){e.i&&Db(e.i.j,e),e.i=t,e.i&&M(e.i.j,e)}function K_(e,t){e.d&&Db(e.d.e,e),e.d=t,e.d&&M(e.d.e,e)}function q_(e,t){e.a&&Db(e.a.k,e),e.a=t,e.a&&M(e.a.k,e)}function J_(e,t){e.b&&Db(e.b.f,e),e.b=t,e.b&&M(e.b.f,e)}function ARe(e,t){rFe(e,e.b,e.c),P(e.b.b,68),t&&P(t.b,68).b}function jRe(e,t){return aE(P(e.c,65).c.e.b,P(t.c,65).c.e.b)}function MRe(e,t){return aE(P(e.c,65).c.e.a,P(t.c,65).c.e.a)}function NRe(e){return Qw(),rd(),P(e.a,86).d.e!=0}function Y_(e,t){j(e.Cb,184)&&(P(e.Cb,184).tb=null),GS(e,t)}function X_(e,t){j(e.Cb,90)&&$A(_y(P(e.Cb,90)),4),GS(e,t)}function PRe(e,t){hE(e,t),j(e.Cb,90)&&$A(_y(P(e.Cb,90)),2)}function FRe(e,t){t.c!=null&&Dh(e,new mh(t.c))}function IRe(e){var t,n=(Ra(),t=new kr,t);return Nx(n,e),n}function LRe(e){var t,n=(Ra(),t=new kr,t);return Nx(n,e),n}function RRe(e){for(var t;;)if(t=e.Pb(),!e.Ob())return t}function zRe(e,t,n){return M(e.a,(eg(),ik(t,n),new oo(t,n))),e}function Z_(e,t){return Qo(),ex(t)?new hp(t,e):new Qc(t,e)}function Q_(e){return AM(),dT(e,0)>=0?yD(e):Xm(yD(kb(e)))}function BRe(e){var t=P(cp(e.b),9);return new xf(e.a,t,e.c)}function VRe(e,t){var n=P(TT(Rg(e.a),t),16);return n?n.gc():0}function HRe(e,t,n){var r;I$e(t,n,e.c.length),r=n-t,wye(e.c,t,r)}function $_(e,t,n){I$e(t,n,e.gc()),this.c=e,this.a=t,this.b=n-t}function ev(e){this.c=new vo,this.b=e.b,this.d=e.c,this.a=e.a}function tv(e){this.a=r.Math.cos(e),this.b=r.Math.sin(e)}function nv(e,t,n,r){this.c=e,this.d=r,q_(this,t),J_(this,n)}function URe(e,t){P_e.call(this,new go(xx(e))),vS(t,Jvt),this.a=t}function WRe(e,t,n){return new IA(e,(Sb(),dK),null,!1,t,n)}function GRe(e,t,n){return new IA(e,(Sb(),pK),t,n,null,!1)}function KRe(){return Zw(),U(O(xK,1),Z,108,0,[vK,yK,bK])}function qRe(){return Xb(),U(O(IEt,1),Z,472,0,[sq,oq,aq])}function JRe(){return Cb(),U(O(NEt,1),Z,471,0,[rq,nq,iq])}function YRe(){return Ix(),U(O($K,1),Z,237,0,[XK,ZK,QK])}function XRe(){return Yb(),U(O(_J,1),Z,391,0,[hJ,mJ,gJ])}function ZRe(){return kS(),U(O(MX,1),Z,372,0,[jX,AX,kX])}function QRe(){return bS(),U(O(nZ,1),Z,322,0,[eZ,$X,tZ])}function $Re(){return lS(),U(O(oZ,1),Z,351,0,[rZ,aZ,iZ])}function eze(){return _w(),U(O(ckt,1),Z,460,0,[_Z,gZ,vZ])}function tze(){return qC(),U(O(rQ,1),Z,299,0,[tQ,nQ,eQ])}function nze(){return Zb(),U(O(gkt,1),Z,311,0,[aQ,oQ,iQ])}function rze(){return hT(),U(O(PMt,1),Z,390,0,[P0,NMt,F0])}function ize(){return uS(),U(O(ZMt,1),Z,463,0,[i2,n2,r2])}function aze(){return CC(),U(O(tNt,1),Z,387,0,[$Mt,a2,eNt])}function oze(){return Nw(),U(O(rNt,1),Z,349,0,[c2,o2,s2])}function sze(){return Xw(),U(O(oNt,1),Z,350,0,[l2,aNt,u2])}function cze(){return cS(),U(O(uNt,1),Z,352,0,[lNt,d2,cNt])}function lze(){return sw(),U(O(fNt,1),Z,388,0,[p2,m2,f2])}function uze(){return sS(),U(O(ANt,1),Z,464,0,[h2,g2,_2])}function rv(e){return Sw(U(O(K3,1),X,8,0,[e.i.n,e.n,e.a]))}function dze(){return Pw(),U(O(FPt,1),Z,392,0,[PPt,B2,z2])}function fze(){fze=C,kFt=tm(new Zh,(Ok(),F2),(LM(),CPt))}function iv(){iv=C,v4=new iSe(`DFS`,0),EFt=new iSe(`BFS`,1)}function pze(e,t,n){var r=new zie;r.b=t,r.a=n,++t.b,M(e.d,r)}function mze(e,t,n){var r=new Vl(n.d);$d(r,e),fE(t,r.a,r.b)}function hze(e,t){cTe(e,nm(uv(lm(t,24),jI)),nm(uv(t,jI)))}function av(e,t){if(e<0||e>t)throw E(new Mi(HI+e+UI+t))}function ov(e,t){if(e<0||e>=t)throw E(new Mi(HI+e+UI+t))}function sv(e,t){if(e<0||e>=t)throw E(new ra(HI+e+UI+t))}function cv(e,t){this.b=(Gh(e),e),this.a=(t&uI)==0?t|64|ZP:t}function gze(e){var t;return lE(e),t=(Bg(),Bg(),rK),Cx(e,t)}function _ze(e,t,n){var r=vN(e,t,!1);return r.b<=t&&r.a<=n}function vze(){return Tb(),U(O(wLt,1),Z,439,0,[c3,CLt,SLt])}function yze(){return TE(),U(O(LIt,1),Z,394,0,[IIt,Q4,FIt])}function bze(){return ED(),U(O(kIt,1),Z,445,0,[L4,R4,z4])}function xze(){return LO(),U(O(jIt,1),Z,456,0,[B4,H4,V4])}function Sze(){return Yw(),U(O(HFt,1),Z,393,0,[O4,BFt,VFt])}function Cze(){return SC(),U(O(DIt,1),Z,300,0,[I4,EIt,TIt])}function wze(){return _T(),U(O(yBt,1),Z,346,0,[_8,g8,v8])}function Tze(){return KT(),U(O(_3,1),Z,444,0,[m3,h3,g3])}function Eze(){return Lx(),U(O(rBt,1),Z,278,0,[o8,s8,c8])}function Dze(){return gT(),U(O(BBt,1),Z,280,0,[zBt,M5,N5])}function lv(e){return ph(e),j(e,16)?new bf(P(e,16)):Xf(e.Kc())}function Oze(e,t){return e&&e.equals?e.equals(t):A(e)===A(t)}function uv(e,t){return MC(BNe(Il(e)?zC(e):e,Il(t)?zC(t):t))}function dv(e,t){return MC(VNe(Il(e)?zC(e):e,Il(t)?zC(t):t))}function fv(e,t){return MC(HNe(Il(e)?zC(e):e,Il(t)?zC(t):t))}function kze(e,t){var n=(Gh(e),e).g;return sDe(!!n),Gh(t),n(t)}function Aze(e,t){var n,r=Im(e,t);return n=e.a.fd(r),new tbe(e,n)}function jze(e){return e.Db>>16==6?P(xj(e),241):null}function Mze(e){if(e.p!=2)throw E(new Rr);return nm(e.f)&OF}function Nze(e){if(e.p!=2)throw E(new Rr);return nm(e.k)&OF}function z(e){return jd(e.ar)}function Yze(e,t){var n=jb(t);return P(xh(e.c,n),17).a}function gv(e,t,n){var r=e.d[t.p];e.d[t.p]=e.d[n.p],e.d[n.p]=r}function Xze(e,t,n){var r;e.n&&t&&n&&(r=new Ese,M(e.e,r))}function _v(e,t){if(Lm(e.a,t),t.d)throw E(new yi(xyt));t.d=e}function Zze(e,t){this.a=new T,this.d=new T,this.f=e,this.c=t}function Qze(){this.c=new Hwe,this.a=new JUe,this.b=new Kge,Fbe()}function $ze(){lw(),this.b=new Dr,this.a=new Dr,this.c=new T}function eBe(e,t,n){this.d=e,this.j=t,this.e=n,this.o=-1,this.p=3}function tBe(e,t,n){this.d=e,this.k=t,this.f=n,this.o=-1,this.p=5}function nBe(e,t,n,r,i,a){Gqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function rBe(e,t,n,r,i,a){Kqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function iBe(e,t,n,r,i,a){vUe.call(this,e,t,n,r,i),a&&(this.o=-2)}function aBe(e,t,n,r,i,a){Yqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function oBe(e,t,n,r,i,a){yUe.call(this,e,t,n,r,i),a&&(this.o=-2)}function sBe(e,t,n,r,i,a){qqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function cBe(e,t,n,r,i,a){Jqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function lBe(e,t,n,r,i,a){bUe.call(this,e,t,n,r,i),a&&(this.o=-2)}function uBe(e,t,n,r){xr.call(this,n),this.b=e,this.c=t,this.d=r}function dBe(e,t){this.f=e,this.a=(By(),u9),this.c=u9,this.b=t}function fBe(e,t){this.g=e,this.d=(By(),d9),this.a=d9,this.b=t}function pBe(e,t){!e.c&&(e.c=new DC(e,0)),ON(e.c,(UN(),w9),t)}function mBe(e,t){return Wit(e,t,j(t,102)&&(P(t,19).Bb&pI)!=0)}function hBe(e,t){return DPe(LC(e.q.getTime()),LC(t.q.getTime()))}function gBe(e){return yp(e.e.Rd().gc()*e.c.Rd().gc(),16,new ode(e))}function _Be(e){return!!e.u&&Jv(e.u.a).i!=0&&!(e.n&&QO(e.n))}function vBe(e){return!!e.a&&Ib(e.a.a).i!=0&&!(e.b&&$O(e.b))}function yBe(e,t){return t==0?!!e.o&&e.o.f!=0:mO(e,t)}function bBe(e,t,n){var r=P(e.Zb().xc(t),16);return!!r&&r.Hc(n)}function xBe(e,t,n){var r=P(e.Zb().xc(t),16);return!!r&&r.Mc(n)}function SBe(e,t){var n=1-t;return e.a[n]=FS(e.a[n],n),FS(e,t)}function CBe(e,t){var n,r=uv(e,_I);return n=cm(t,32),dv(n,r)}function wBe(e,t,n){Z3e(new xRe((ph(e),new bf(e)),t,n))}function vv(e,t,n){Q3e(new SRe((ph(e),new bf(e)),t,n))}function yv(e,t,n,r,i,a){return lXe(e,t,n,a),IT(e,r),zT(e,i),e}function TBe(e,t,n,r){return e.a+=``+p_(t==null?IP:PE(t),n,r),e}function bv(e,t){this.a=e,qn.call(this,e),av(t,e.gc()),this.b=t}function EBe(e){this.a=V(WW,FP,1,dZe(r.Math.max(8,e))<<1,5,1)}function xv(e){return P(rO(e,V(UJ,jR,10,e.c.length,0,1)),199)}function Sv(e){return P(rO(e,V(VJ,AR,18,e.c.length,0,1)),483)}function DBe(e){return e.a?e.e.length==0?e.a.a:e.a.a+(``+e.e):e.c}function Cv(e){for(;e.d>0&&e.a[--e.d]==0;);e.a[e.d++]==0&&(e.e=0)}function OBe(e){return jd(e.b.b!=e.d.a),e.c=e.b=e.b.b,--e.a,e.c.c}function kBe(e,t,n){e.a=t,e.c=n,e.b.a.$b(),Fg(e.d),Wr(e.e.a.c,0)}function ABe(e,t){var n;e.e=new D_e,n=sM(t),hu(n,e.c),pct(e,n,0)}function wv(e,t,n,r){var i=new Koe;i.a=t,i.b=n,i.c=r,up(e.a,i)}function B(e,t,n,r){var i=new Koe;i.a=t,i.b=n,i.c=r,up(e.b,i)}function jBe(e,t,n){if(e<0||tn)throw E(new Mi(yet(e,t,n)))}function Tv(e,t){if(e<0||e>=t)throw E(new Mi(jtt(e,t)));return e}function MBe(e){if(!(`stack`in e))try{throw e}catch{}return e}function Ev(e){return Lo(),j(e.g,10)?P(e.g,10):null}function NBe(e){return!bg(e).dc()&&(gwe(e,new h),!0)}function Dv(e){var t;return Il(e)?(t=e,t==-0?0:t):lKe(e)}function PBe(e,t){return j(t,44)?lk(e.a,P(t,44)):!1}function FBe(e,t){return j(t,44)?lk(e.a,P(t,44)):!1}function IBe(e,t){return j(t,44)?lk(e.a,P(t,44)):!1}function LBe(e){var t;return Hh(e),t=new fe,Qa(e.a,new Vfe(t)),t}function RBe(){var e,t=(n=(e=new kr,e),n),n;return M(fHt,t),t}function Ov(e){var t;return Hh(e),t=new pe,Qa(e.a,new Hfe(t)),t}function zBe(e,t){return e.a<=e.b&&(t.Dd(e.a++),!0)}function BBe(e){rC.call(this,e,(Sb(),uK),null,!1,null,!1)}function VBe(){VBe=C,hDt=nT((No(),U(O(Oq,1),Z,489,0,[Dq])))}function HBe(){HBe=C,wNt=LFe(G(1),G(4)),CNt=LFe(G(1),G(2))}function UBe(e,t){return new Vf(t,wd(xu(t.e),e,e),(rd(),!0))}function kv(e){return new Hy((vS(e,_F),bx(yE(yE(5,e),e/10|0))))}function WBe(e){return yp(e.e.Rd().gc()*e.c.Rd().gc(),273,new ade(e))}function GBe(e){return P(rO(e,V(EOt,Sbt,12,e.c.length,0,1)),2042)}function KBe(e){return z_(),!gy(e)&&!(!gy(e)&&e.c.i.c==e.d.i.c)}function qBe(e,t){return Rx(),P(K(t,(rN(),u4)),17).a>=e.gc()}function Av(e,t){L_t(t,e),Yje(e.d),Yje(P(K(e,(mP(),L1)),214))}function jv(e,t){R_t(t,e),Xje(e.d),Xje(P(K(e,(mP(),L1)),214))}function JBe(e,t,n){e.d&&Db(e.d.e,e),e.d=t,e.d&&Jp(e.d.e,n,e)}function YBe(e,t,n){return n.f.c.length>0?bPe(e.a,t,n):bPe(e.b,t,n)}function XBe(e,t,n){var r=b2e();try{return qDe(e,t,n)}finally{CHe(r)}}function Mv(e,t){var n=A_(e,t),r=null;return n&&(r=n.pe()),r}function Nv(e,t){var n=A_(e,t),r=null;return n&&(r=n.se()),r}function Pv(e,t){var n=ax(e,t),r=null;return n&&(r=n.se()),r}function Fv(e,t){var n=A_(e,t),r=null;return n&&(r=ket(n)),r}function ZBe(e,t,n){var r=RD(n);return PM(e.g,r,t),PM(e.i,t,n),t}function QBe(e,t,n){this.d=new nme(this),this.e=e,this.i=t,this.f=n}function $Be(e,t,n,r){this.e=null,this.c=e,this.d=t,this.a=n,this.b=r}function eVe(e,t,n,r){jwe(this),this.c=e,this.e=t,this.f=n,this.b=r}function tVe(e,t,n,r){this.d=e,this.n=t,this.g=n,this.o=r,this.p=-1}function nVe(e,t,n,r){return j(n,59)?new lEe(e,t,n,r):new qNe(e,t,n,r)}function Iv(e){return j(e,16)?P(e,16).dc():!e.Kc().Ob()}function rVe(e){if(e.e.g!=e.b)throw E(new Vr);return!!e.c&&e.d>0}function Lv(e){return jd(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function iVe(e,t){Gh(t),Sh(e.a,e.c,t),e.c=e.c+1&e.a.length-1,L3e(e)}function Rv(e,t){Gh(t),e.b=e.b-1&e.a.length-1,Sh(e.a,e.b,t),L3e(e)}function aVe(e){var t=e.Gh();this.a=j(t,71)?P(t,71).Ii():t.Kc()}function oVe(e){return new cv(wqe(P(e.a.md(),16).gc(),e.a.ld()),16)}function sVe(){sVe=C,FLt=nT((Bo(),U(O(PLt,1),Z,490,0,[v3])))}function cVe(){cVe=C,LLt=nT((Vo(),U(O(ILt,1),Z,558,0,[y3])))}function lVe(){lVe=C,SRt=nT((Ho(),U(O(xRt,1),Z,539,0,[O3])))}function uVe(){return YD(),U(O(zJ,1),Z,389,0,[RJ,IJ,FJ,LJ])}function dVe(){return Sb(),U(O(mK,1),Z,304,0,[uK,dK,fK,pK])}function fVe(){return TO(),U(O(lDt,1),Z,332,0,[gq,hq,_q,vq])}function pVe(){return wO(),U(O(pDt,1),Z,406,0,[wq,Cq,Tq,Eq])}function mVe(){return KC(),U(O(sDt,1),Z,417,0,[mq,dq,fq,pq])}function hVe(){return ow(),U(O(mOt,1),Z,416,0,[kJ,MJ,AJ,jJ])}function gVe(){return aw(),U(O(KOt,1),Z,421,0,[bX,xX,SX,CX])}function _Ve(){return iw(),U(O(FOt,1),Z,371,0,[gX,mX,hX,pX])}function vVe(){return IO(),U(O(B0,1),Z,203,0,[R0,z0,L0,I0])}function yVe(){return ID(),U(O(qMt,1),Z,284,0,[Z0,KMt,Q0,$0])}function bVe(e){var t;return e.j==(nP(),m5)&&(t=krt(e),$u(t,X8))}function xVe(e,t){var n=t.a;U_(n,t.c.d),K_(n,t.d.d),vC(n.a,e.n)}function SVe(e,t){var n=P(ix(e.b,t),67);return!n&&(n=new vo),n}function zv(e){return Lo(),j(e.g,154)?P(e.g,154):null}function CVe(e){e.a=null,e.e=null,Wr(e.b.c,0),Wr(e.f.c,0),e.c=null}function Bv(){Bv=C,sQ=new Js(sL,0),cQ=new Js(`TOP_LEFT`,1)}function Vv(){Vv=C,b2=new zxe(`UPPER`,0),y2=new zxe(`LOWER`,1)}function wVe(e,t){return Ou(new k(t.e.a+t.f.a/2,t.e.b+t.f.b/2),e)}function TVe(e,t){return P(Ju(_m(P(Dy(e.k,t),15).Oc(),HX)),113)}function EVe(e,t){return P(Ju(vm(P(Dy(e.k,t),15).Oc(),HX)),113)}function DVe(){return Ok(),U(O(yPt,1),Z,405,0,[N2,P2,F2,I2])}function OVe(){return Jw(),U(O(wFt,1),Z,353,0,[_4,h4,g4,m4])}function kVe(){return uk(),U(O(CIt,1),Z,354,0,[F4,xIt,SIt,bIt])}function AVe(){return TD(),U(O(S5,1),Z,386,0,[b5,x5,y5,v5])}function jVe(){return kk(),U(O(xBt,1),Z,291,0,[S8,y8,b8,x8])}function MVe(){return wE(),U(O(p8,1),Z,223,0,[f8,u8,l8,d8])}function NVe(){return ZE(),U(O(JBt,1),Z,320,0,[F5,GBt,qBt,KBt])}function PVe(){return Mw(),U(O(eVt,1),Z,415,0,[I5,QBt,ZBt,$Bt])}function FVe(e){return R_(),km(p7,e)?P(xh(p7,e),341).Qg():null}function Hv(e,t,n){return t<0?cj(e,n):P(n,69).wk().Bk(e,e.hi(),t)}function IVe(e,t,n){var r=RD(n);return PM(e.j,r,t),Qh(e.k,t,n),t}function LVe(e,t,n){var r=RD(n);return PM(e.d,r,t),Qh(e.e,t,n),t}function RVe(e){var t=(Ia(),n=new nn,n),n;return e&&Hj(t,e),t}function zVe(e){var t=e.aj(e.i);return e.i>0&&tN(e.g,0,t,0,e.i),t}function BVe(e,t){var n;for(n=e.j.c.length;n>24}function WVe(e){if(e.p!=1)throw E(new Rr);return nm(e.k)<<24>>24}function GVe(e){if(e.p!=7)throw E(new Rr);return nm(e.k)<<16>>16}function KVe(e){if(e.p!=7)throw E(new Rr);return nm(e.f)<<16>>16}function Uv(e,t){return t.e==0||e.e==0?JG:(pM(),Xj(e,t))}function qVe(e,t){return A(t)===A(e)?`(this Map)`:t==null?IP:PE(t)}function JVe(e,t,n){return dm(N(nl(Kp(e.f,t))),N(nl(Kp(e.f,n))))}function YVe(e,t,n){var r=P(xh(e.g,n),60);M(e.a.c,new Kc(t,r))}function XVe(e,t,n){e.i=0,e.e=0,t!=n&&(zZe(e,t,n),RZe(e,t,n))}function ZVe(e,t,n,r,i){M(t,vtt(i,mat(i,n,r))),p9e(e,i,t)}function QVe(e,t,n,r,i){this.i=e,this.a=t,this.e=n,this.j=r,this.f=i}function $Ve(e,t){r_.call(this),this.a=e,this.b=t,M(this.a.b,this)}function eHe(e){this.b=new Dr,this.c=new Dr,this.d=new Dr,this.a=e}function tHe(e,t){var n=new na;return e.Gd(n),n.a+=`..`,t.Hd(n),n.a}function nHe(e,t){for(var n=t;n;)Sd(e,n.i,n.j),n=I_(n);return e}function rHe(e,t,n){var r=RD(n);return Qh(e.b,r,t),Qh(e.c,t,n),t}function Wv(e){for(var t=0;e.Ob();)e.Pb(),t=yE(t,1);return bx(t)}function Gv(e,t){Qo();var n=P(e,69).vk();return L9e(n,t),n.xl(t)}function iHe(e,t,n){if(n){var r=n.oe();e.a[t]=r(n)}else delete e.a[t]}function aHe(e,t){var n=e.q.getHours();e.q.setFullYear(t+VF),dN(e,n)}function oHe(e,t){return P(t==null?nl(Kp(e.f,null)):as(e.i,t),288)}function sHe(e,t){return e==(DA(),JJ)&&t==JJ?4:e==JJ||t==JJ?8:32}function Kv(e,t,n){return sN(e,t,n,j(t,102)&&(P(t,19).Bb&pI)!=0)}function cHe(e,t,n){return pN(e,t,n,j(t,102)&&(P(t,19).Bb&pI)!=0)}function lHe(e,t,n){return tat(e,t,n,j(t,102)&&(P(t,19).Bb&pI)!=0)}function uHe(e){e.b!=e.c&&(e.a=V(WW,FP,1,8,5,1),e.b=0,e.c=0)}function qv(e){return jd(e.a=0&&e.a[n]===t[n];n--);return n<0}function oy(e){var t;return e?new Ap(e):(t=new Rl,HS(t,e),t)}function SHe(e,t){var n,r=!1;do n=mZe(e,t),r|=n;while(n);return r}function CHe(e){e&&OKe((Si(),cG)),--oG,e&&sG!=-1&&(gCe(sG),sG=-1)}function sy(e){s7e(),cTe(this,nm(uv(lm(e,24),jI)),nm(uv(e,jI)))}function wHe(){wHe=C,DEt=nT((fO(),U(O(DK,1),Z,436,0,[EK,TK])))}function THe(){THe=C,OEt=nT((dx(),U(O(AK,1),Z,435,0,[OK,kK])))}function EHe(){EHe=C,NDt=nT((fx(),U(O(Uq,1),Z,432,0,[Vq,Hq])))}function DHe(){DHe=C,AOt=nT((dC(),U(O(kOt,1),Z,517,0,[aY,iY])))}function OHe(){OHe=C,vkt=nT((Bv(),U(O(lQ,1),Z,429,0,[sQ,cQ])))}function kHe(){kHe=C,skt=nT((px(),U(O(hZ,1),Z,428,0,[pZ,mZ])))}function AHe(){AHe=C,dkt=nT((wb(),U(O(OZ,1),Z,488,0,[DZ,EZ])))}function jHe(){jHe=C,XMt=nT((Qb(),U(O(YMt,1),Z,430,0,[e2,t2])))}function MHe(){MHe=C,RNt=nT((Vv(),U(O(LNt,1),Z,531,0,[b2,y2])))}function NHe(){NHe=C,rkt=nT((Ky(),U(O(QX,1),Z,431,0,[XX,ZX])))}function PHe(){PHe=C,OFt=nT((iv(),U(O(DFt,1),Z,433,0,[v4,EFt])))}function FHe(){FHe=C,PFt=nT((AS(),U(O(NFt,1),Z,501,0,[b4,x4])))}function IHe(){IHe=C,qNt=nT((O_(),U(O(KNt,1),Z,523,0,[w2,C2])))}function LHe(){LHe=C,YNt=nT((k_(),U(O(JNt,1),Z,522,0,[T2,E2])))}function RHe(){RHe=C,dPt=nT((Wy(),U(O(uPt,1),Z,528,0,[A2,k2])))}function zHe(){zHe=C,vPt=nT((D_(),U(O(_Pt,1),Z,465,0,[j2,M2])))}function BHe(){BHe=C,zFt=nT((_b(),U(O(RFt,1),Z,434,0,[LFt,D4])))}function VHe(){VHe=C,xLt=nT((my(),U(O(bLt,1),Z,491,0,[s3,yLt])))}function HHe(){HHe=C,kLt=nT((JC(),U(O(OLt,1),Z,492,0,[ELt,DLt])))}function UHe(){UHe=C,zLt=nT((Gy(),U(O(RLt,1),Z,438,0,[x3,b3])))}function WHe(){WHe=C,TRt=nT((cw(),U(O(wRt,1),Z,437,0,[k3,CRt])))}function GHe(){GHe=C,WBt=nT((zf(),U(O(P5,1),Z,347,0,[HBt,UBt])))}function KHe(){return GT(),U(O(a8,1),Z,88,0,[r8,n8,t8,e8,i8])}function qHe(){return nP(),U(O(_5,1),TR,64,0,[h5,Z8,X8,m5,g5])}function JHe(e,t,n){return P(t==null?XA(e.f,null,n):uE(e.i,t,n),288)}function YHe(e){return(e.k==(DA(),JJ)||e.k==GJ)&&yd(e,(Y(),bQ))}function cy(e){return e.c&&e.d?Gze(e.c)+`->`+Gze(e.d):`e_`+td(e)}function ly(e,t){var n,r;for(Gh(t),r=e.Kc();r.Ob();)n=r.Pb(),t.Cd(n)}function XHe(e,t){var n=new bi;qg(n,`x`,t.a),qg(n,`y`,t.b),Dh(e,n)}function ZHe(e,t){var n=new bi;qg(n,`x`,t.a),qg(n,`y`,t.b),Dh(e,n)}function QHe(e,t){for(var n=t;n;)Sd(e,-n.i,-n.j),n=I_(n);return e}function $He(e,t){for(var n=t,r=0;n>0;)r+=e.a[n],n-=n&-n;return r}function uy(e,t,n){var r=(ov(t,e.c.length),e.c[t]);return e.c[t]=n,r}function eUe(e,t,n){e.a.c.length=0,Tmt(e,t,n),e.a.c.length==0||Mut(e,t)}function dy(e){e.i=0,is(e.b,null),is(e.c,null),e.a=null,e.e=null,++e.g}function fy(){fy=C,_K=!0,mEt=!1,hEt=!1,_Et=!1,gEt=!1}function py(e){fy(),!_K&&(this.c=e,this.e=!0,this.a=new T)}function tUe(e,t){this.c=0,this.b=t,oCe.call(this,e,17493),this.a=this.c}function nUe(e){Cvt(),lge(this),this.a=new vo,tQe(this,e),up(this.a,e)}function rUe(){au(this),this.b=new k(cI,cI),this.a=new k(lI,lI)}function my(){my=C,s3=new sSe(YR,0),yLt=new sSe(`TARGET_WIDTH`,1)}function hy(e,t){return(lE(e),Xa(new Mp(e,new UGe(t,e.a)))).Bd(SK)}function iUe(){return vA(),U(O(CJ,1),Z,367,0,[vJ,yJ,bJ,xJ,SJ])}function aUe(){return tA(),U(O(JOt,1),Z,375,0,[TX,DX,OX,EX,wX])}function oUe(){return FD(),U(O(fZ,1),Z,348,0,[cZ,sZ,uZ,dZ,lZ])}function sUe(){return CO(),U(O(RMt,1),Z,323,0,[LMt,H0,U0,V0,W0])}function cUe(){return XE(),U(O(y$,1),Z,171,0,[v$,m$,h$,g$,_$])}function lUe(){return iA(),U(O(FFt,1),Z,368,0,[T4,S4,E4,C4,w4])}function uUe(){return Wj(),U(O(jLt,1),Z,373,0,[u3,l3,f3,d3,p3])}function dUe(){return MA(),U(O(ULt,1),Z,324,0,[BLt,S3,HLt,C3,VLt])}function fUe(){return uO(),U(O(L3,1),Z,170,0,[F3,P3,M3,I3,N3])}function pUe(){return pO(),U(O(I8,1),Z,256,0,[P8,F8,wBt,N8,TBt])}function mUe(e){return Qi(),function(){return XBe(e,this,arguments)}}function gy(e){return!e.c||!e.d?!1:!!e.c.i&&e.c.i==e.d.i}function hUe(e,t){return j(t,143)?ff(e.c,P(t,143).c):!1}function _y(e){return e.t||(e.t=new Bhe(e),WT(new K_e(e),0,e.t)),e.t}function gUe(e){this.b=e,Lu.call(this,e),this.a=P(NC(this.b.a,4),129)}function _Ue(e){this.b=e,ld.call(this,e),this.a=P(NC(this.b.a,4),129)}function vy(e,t,n,r,i){KUe.call(this,t,r,i),this.c=e,this.b=n}function vUe(e,t,n,r,i){eBe.call(this,t,r,i),this.c=e,this.a=n}function yUe(e,t,n,r,i){tBe.call(this,t,r,i),this.c=e,this.a=n}function bUe(e,t,n,r,i){KUe.call(this,t,r,i),this.c=e,this.a=n}function yy(e,t){return P(ix(e.d,t),23)||P(ix(e.e,t),23)}function xUe(e,t){var n=t.ld(),r=e.Fe(n);return!!r&&rg(r.e,t.md())}function SUe(e,t){var n=t.ld();return new oo(n,e.e.pc(n,P(t.md(),16)))}function CUe(e,t){return e.a.get(t)??V(WW,FP,1,0,5,1)}function wUe(e){var t=e.length;return ff(fI.substr(fI.length-t,t),e)}function by(e){if(Cj(e))return e.c=e.a,e.a.Pb();throw E(new Hr)}function TUe(e,t){return t==0||e.e==0?e:t>0?Cst(e,t):F0e(e,-t)}function xy(e,t){return t==0||e.e==0?e:t>0?F0e(e,t):Cst(e,-t)}function EUe(e){txe.call(this,e==null?IP:PE(e),j(e,82)?P(e,82):null)}function DUe(e){var t;return e.c||(t=e.r,j(t,90)&&(e.c=P(t,29))),e.c}function Sy(e){var t=new i_;return VC(t,e),W(t,(mP(),j1),null),t}function OUe(e){var t=e.c.i,n=e.d.i;return t.k==(DA(),GJ)&&n.k==GJ}function Cy(e){return vu(e&QF,e>>22&QF,e<0?$F:0)}function kUe(e){var t,n,r,i;for(n=e,r=0,i=n.length;r=0?e.Lh(r,n,!0):mj(e,t,n)}function jUe(e,t,n){return aE(Ou(cO(e),xu(t.b)),Ou(cO(e),xu(n.b)))}function MUe(e,t,n){return aE(Ou(cO(e),xu(t.e)),Ou(cO(e),xu(n.e)))}function NUe(e,t){return r.Math.min(ab(t.a,e.d.d.c),ab(t.b,e.d.d.c))}function Ty(e,t){e._i(e.i+1),Au(e,e.i,e.Zi(e.i,t)),e.Mi(e.i++,t),e.Ni()}function Ey(e){var t,n;++e.j,t=e.g,n=e.i,e.g=null,e.i=0,e.Oi(n,t),e.Ni()}function PUe(e,t,n){var r=new Rwe(e.a);mC(r,e.a.a),XA(r.f,t,n),e.a.a=r}function FUe(e,t,n,r){var i;for(i=0;it)throw E(new Mi(ptt(e,t,`index`)));return e}function Ay(e,t){var n=(ov(t,e.c.length),e.c[t]);return wye(e.c,t,1),n}function zUe(e,t){var n=(Gh(e),e),r=(Gh(t),t);return n==r?0:nt.p?-1:0}function tWe(e){var t;return e.a||(t=e.r,j(t,156)&&(e.a=P(t,156))),e.a}function nWe(e,t,n){var r;return++e.e,--e.f,r=P(e.d[t].gd(n),136),r.md()}function rWe(e){var t=e.ld();return qf(P(e.md(),16).Nc(),new cde(t))}function iWe(e,t){return km(e.a,t)?(My(e.a,t),!0):!1}function Iy(e,t,n){return Tv(t,e.e.Rd().gc()),Tv(n,e.c.Rd().gc()),e.a[t][n]}function Ly(e,t,n){this.a=e,this.b=t,this.c=n,M(e.t,this),M(t.i,this)}function Ry(e,t,n,r){this.f=e,this.e=t,this.d=n,this.b=r,this.c=r?r.d:null}function zy(){this.b=new vo,this.a=new vo,this.b=new vo,this.a=new vo}function By(){By=C;var e,t;u9=(Ra(),t=new Ur,t),d9=(e=new oi,e)}function aWe(e){var t;return lE(e),t=new Mje(e,e.a.e,e.a.d|4),new fDe(e,t)}function oWe(e){var t;for(Hh(e),t=0;e.a.Bd(new Be);)t=yE(t,1);return t}function Vy(e,t){return Gh(t),e.c=0,`Initial capacity must not be negative`)}function Uy(){Uy=C,G3=new yr(`org.eclipse.elk.labels.labelManager`)}function sWe(){sWe=C,fX=new Wd(`separateLayerConnections`,(iw(),gX))}function Wy(){Wy=C,A2=new nSe(`REGULAR`,0),k2=new nSe(`CRITICAL`,1)}function Gy(){Gy=C,x3=new lSe(`FIXED`,0),b3=new lSe(`CENTER_NODE`,1)}function Ky(){Ky=C,XX=new Lxe(`QUADRATIC`,0),ZX=new Lxe(`SCANLINE`,1)}function cWe(){cWe=C,ikt=nT((bS(),U(O(nZ,1),Z,322,0,[eZ,$X,tZ])))}function lWe(){lWe=C,akt=nT((lS(),U(O(oZ,1),Z,351,0,[rZ,aZ,iZ])))}function uWe(){uWe=C,ekt=nT((kS(),U(O(MX,1),Z,372,0,[jX,AX,kX])))}function dWe(){dWe=C,lkt=nT((_w(),U(O(ckt,1),Z,460,0,[_Z,gZ,vZ])))}function fWe(){fWe=C,hkt=nT((qC(),U(O(rQ,1),Z,299,0,[tQ,nQ,eQ])))}function pWe(){pWe=C,_kt=nT((Zb(),U(O(gkt,1),Z,311,0,[aQ,oQ,iQ])))}function mWe(){mWe=C,FMt=nT((hT(),U(O(PMt,1),Z,390,0,[P0,NMt,F0])))}function hWe(){hWe=C,nNt=nT((CC(),U(O(tNt,1),Z,387,0,[$Mt,a2,eNt])))}function gWe(){gWe=C,iNt=nT((Nw(),U(O(rNt,1),Z,349,0,[c2,o2,s2])))}function _We(){_We=C,QMt=nT((uS(),U(O(ZMt,1),Z,463,0,[i2,n2,r2])))}function vWe(){vWe=C,sNt=nT((Xw(),U(O(oNt,1),Z,350,0,[l2,aNt,u2])))}function yWe(){yWe=C,dNt=nT((cS(),U(O(uNt,1),Z,352,0,[lNt,d2,cNt])))}function bWe(){bWe=C,pNt=nT((sw(),U(O(fNt,1),Z,388,0,[p2,m2,f2])))}function xWe(){xWe=C,IPt=nT((Pw(),U(O(FPt,1),Z,392,0,[PPt,B2,z2])))}function SWe(){SWe=C,UFt=nT((Yw(),U(O(HFt,1),Z,393,0,[O4,BFt,VFt])))}function CWe(){CWe=C,OIt=nT((SC(),U(O(DIt,1),Z,300,0,[I4,EIt,TIt])))}function wWe(){wWe=C,AIt=nT((ED(),U(O(kIt,1),Z,445,0,[L4,R4,z4])))}function TWe(){TWe=C,MIt=nT((LO(),U(O(jIt,1),Z,456,0,[B4,H4,V4])))}function EWe(){EWe=C,RIt=nT((TE(),U(O(LIt,1),Z,394,0,[IIt,Q4,FIt])))}function DWe(){DWe=C,TLt=nT((Tb(),U(O(wLt,1),Z,439,0,[c3,CLt,SLt])))}function OWe(){OWe=C,jNt=nT((sS(),U(O(ANt,1),Z,464,0,[h2,g2,_2])))}function kWe(){kWe=C,PEt=nT((Cb(),U(O(NEt,1),Z,471,0,[rq,nq,iq])))}function AWe(){AWe=C,MEt=nT((Ix(),U(O($K,1),Z,237,0,[XK,ZK,QK])))}function jWe(){jWe=C,LEt=nT((Xb(),U(O(IEt,1),Z,472,0,[sq,oq,aq])))}function MWe(){MWe=C,vEt=nT((Zw(),U(O(xK,1),Z,108,0,[vK,yK,bK])))}function NWe(){NWe=C,aOt=nT((Yb(),U(O(_J,1),Z,391,0,[hJ,mJ,gJ])))}function PWe(){PWe=C,bBt=nT((_T(),U(O(yBt,1),Z,346,0,[_8,g8,v8])))}function FWe(){FWe=C,NLt=nT((KT(),U(O(_3,1),Z,444,0,[m3,h3,g3])))}function IWe(){IWe=C,iBt=nT((Lx(),U(O(rBt,1),Z,278,0,[o8,s8,c8])))}function LWe(){LWe=C,VBt=nT((gT(),U(O(BBt,1),Z,280,0,[zBt,M5,N5])))}function qy(e,t){return!e.o&&(e.o=new lb((lP(),Z5),n7,e,0)),uD(e.o,t)}function RWe(e,t){var n;e.C&&(n=P(ig(e.b,t),127).n,n.d=e.C.d,n.a=e.C.a)}function zWe(e){var t,n,r,i=e.d;t=e.a,n=e.b,r=e.c,e.d=n,e.a=r,e.b=i,e.c=t}function BWe(e){return!e.g&&(e.g=new on),!e.g.b&&(e.g.b=new Ihe(e)),e.g.b}function Jy(e){return!e.g&&(e.g=new on),!e.g.c&&(e.g.c=new zhe(e)),e.g.c}function VWe(e){return!e.g&&(e.g=new on),!e.g.d&&(e.g.d=new Lhe(e)),e.g.d}function HWe(e){return!e.g&&(e.g=new on),!e.g.a&&(e.g.a=new Rhe(e)),e.g.a}function UWe(e,t,n,r){return n&&(r=n.Rh(t,eD(n.Dh(),e.c.uk()),null,r)),r}function WWe(e,t,n,r){return n&&(r=n.Th(t,eD(n.Dh(),e.c.uk()),null,r)),r}function Yy(e,t,n,r){var i=V(q9,HF,28,t+1,15,1);return Gdt(i,e,t,n,r),i}function V(e,t,n,r,i,a){var o=b3e(i,r);return i!=10&&U(O(e,a),t,n,i,o),o}function GWe(e,t,n){var r,i=new WC(t,e);for(r=0;rn||t=0?e.Lh(n,!0,!0):mj(e,t,!0)}function gGe(e,t,n){var r=kZe(e,t,n);return e.b=new VS(r.c.length),Xst(e,r)}function _Ge(e){if(e.b<=0)throw E(new Hr);return--e.b,e.a-=e.c.c,G(e.a)}function vGe(e){var t;if(!e.a)throw E(new fIe);return t=e.a,e.a=I_(e.a),t}function yGe(e){for(;!e.a;)if(!DOe(e.c,new Ufe(e)))return!1;return!0}function hb(e){var t;return ph(e),j(e,204)?(t=P(e,204),t):new gde(e)}function bGe(e){gb(),P(e.of((vP(),z6)),181).Fc((rj(),K8)),e.qf(R6,null)}function gb(){gb=C,jRt=new Hoe,NRt=new Uoe,MRt=oQe((vP(),R6),jRt,D6,NRt)}function _b(){_b=C,LFt=new oSe(`LEAF_NUMBER`,0),D4=new oSe(`NODE_SIZE`,1)}function vb(e){e.a=V(q9,HF,28,e.b+1,15,1),e.c=V(q9,HF,28,e.b,15,1),e.d=0}function xGe(e,t){e.a.Ne(t.d,e.b)>0&&(M(e.c,new Pje(t.c,t.d,e.d)),e.b=t.d)}function SGe(e,t){if(e.g==null||t>=e.i)throw E(new wl(t,e.i));return e.g[t]}function CGe(e,t,n){if(Aw(e,n),n!=null&&!e.fk(n))throw E(new Ir);return n}function yb(e,t){return lx(t)!=10&&U($w(t),t.Sm,t.__elementTypeId$,lx(t),e),e}function bb(e,t,n,r){var i;r=(Bg(),r||nK),i=e.slice(t,n),mtt(i,e,t,n,-t,r)}function xb(e,t,n,r,i){return t<0?mj(e,n,r):P(n,69).wk().yk(e,e.hi(),t,r,i)}function wGe(e,t){return aE(D(N(K(e,(Y(),$Q)))),D(N(K(t,$Q))))}function TGe(){TGe=C,dEt=nT((Sb(),U(O(mK,1),Z,304,0,[uK,dK,fK,pK])))}function Sb(){Sb=C,uK=new ls(`All`,0),dK=new WCe,fK=new Owe,pK=new UCe}function Cb(){Cb=C,rq=new hs(cL,0),nq=new hs(sL,1),iq=new hs(lL,2)}function EGe(){EGe=C,_N(),VHt=cI,BHt=lI,UHt=new Rn(cI),HHt=new Rn(lI)}function DGe(){DGe=C,cDt=nT((KC(),U(O(sDt,1),Z,417,0,[mq,dq,fq,pq])))}function OGe(){OGe=C,mDt=nT((wO(),U(O(pDt,1),Z,406,0,[wq,Cq,Tq,Eq])))}function kGe(){kGe=C,uDt=nT((TO(),U(O(lDt,1),Z,332,0,[gq,hq,_q,vq])))}function AGe(){AGe=C,xOt=nT((YD(),U(O(zJ,1),Z,389,0,[RJ,IJ,FJ,LJ])))}function jGe(){jGe=C,hOt=nT((ow(),U(O(mOt,1),Z,416,0,[kJ,MJ,AJ,jJ])))}function MGe(){MGe=C,qOt=nT((aw(),U(O(KOt,1),Z,421,0,[bX,xX,SX,CX])))}function NGe(){NGe=C,IOt=nT((iw(),U(O(FOt,1),Z,371,0,[gX,mX,hX,pX])))}function PGe(){PGe=C,IMt=nT((IO(),U(O(B0,1),Z,203,0,[R0,z0,L0,I0])))}function FGe(){FGe=C,JMt=nT((ID(),U(O(qMt,1),Z,284,0,[Z0,KMt,Q0,$0])))}function wb(){wb=C,DZ=new Hs(wR,0),EZ=new Hs(`IMPROVE_STRAIGHTNESS`,1)}function IGe(e,t){var n,r=t/e.c.Rd().gc()|0;return n=t%e.c.Rd().gc(),Iy(e,r,n)}function LGe(e){var t;if(e.nl())for(t=e.i-1;t>=0;--t)H(e,t);return zVe(e)}function RGe(e){var t,n;if(!e.b)return null;for(n=e.b;t=n.a[0];)n=t;return n}function zGe(e){var t,n;if(!e.b)return null;for(n=e.b;t=n.a[1];)n=t;return n}function BGe(e){return j(e,180)?``+P(e,180).a:e==null?null:PE(e)}function VGe(e){return j(e,180)?``+P(e,180).a:e==null?null:PE(e)}function HGe(e,t){if(t.a)throw E(new yi(xyt));Lm(e.a,t),t.a=e,!e.j&&(e.j=t)}function UGe(e,t){vl.call(this,t.zd(),t.yd()&-16449),Gh(e),this.a=e,this.c=t}function WGe(e,t){return new Vf(t,Sd(xu(t.e),t.f.a+e,t.f.b+e),(rd(),!1))}function GGe(e,t){return Rf(),M(e,new Kc(t,G(t.e.c.length+t.g.c.length)))}function KGe(e,t){return Rf(),M(e,new Kc(t,G(t.e.c.length+t.g.c.length)))}function qGe(){qGe=C,wIt=nT((uk(),U(O(CIt,1),Z,354,0,[F4,xIt,SIt,bIt])))}function JGe(){JGe=C,TFt=nT((Jw(),U(O(wFt,1),Z,353,0,[_4,h4,g4,m4])))}function YGe(){YGe=C,bPt=nT((Ok(),U(O(yPt,1),Z,405,0,[N2,P2,F2,I2])))}function XGe(){XGe=C,aBt=nT((wE(),U(O(p8,1),Z,223,0,[f8,u8,l8,d8])))}function ZGe(){ZGe=C,SBt=nT((kk(),U(O(xBt,1),Z,291,0,[S8,y8,b8,x8])))}function QGe(){QGe=C,IBt=nT((TD(),U(O(S5,1),Z,386,0,[b5,x5,y5,v5])))}function $Ge(){$Ge=C,YBt=nT((ZE(),U(O(JBt,1),Z,320,0,[F5,GBt,qBt,KBt])))}function eKe(){eKe=C,tVt=nT((Mw(),U(O(eVt,1),Z,415,0,[I5,QBt,ZBt,$Bt])))}function Tb(){Tb=C,c3=new Cc(_xt,0),CLt=new Cc(vV,1),SLt=new Cc(wR,2)}function Eb(e,t,n,r,i){return Gh(e),Gh(t),Gh(n),Gh(r),Gh(i),new Vm(e,t,r)}function tKe(e,t){var n=P(My(e.e,t),400);return n?(pMe(n),n.e):null}function Db(e,t){var n=Ab(e,t,0);return n!=-1&&(Ay(e,n),!0)}function nKe(e,t,n){var r;return Hh(e),r=new Re,r.a=t,e.a.Nb(new uxe(r,n)),r.a}function rKe(e){var t;return Hh(e),t=V(Z9,hI,28,0,15,1),Qa(e.a,new Bfe(t)),t}function Ob(e){var t;if(!DS(e))throw E(new Hr);return e.e=1,t=e.d,e.d=null,t}function kb(e){var t;return Il(e)&&(t=0-e,!isNaN(t))?t:MC(mw(e))}function Ab(e,t,n){for(;n=0?jO(e,n,!0,!0):mj(e,t,!0)}function qb(e){var t=rS(NC(e,32));return t??=(WD(e),rS(NC(e,32))),t}function Jb(e){var t;return e.Oh()||(t=bh(e.Dh())-e.ji(),e.$h().Mk(t)),e.zh()}function fKe(e,t){bq=new Mt,fDt=t,yq=e,P(yq.b,68),ZWe(yq,bq,null),Jpt(yq)}function Yb(){Yb=C,hJ=new Cs(`XY`,0),mJ=new Cs(`X`,1),gJ=new Cs(`Y`,2)}function Xb(){Xb=C,sq=new gs(`TOP`,0),oq=new gs(sL,1),aq=new gs(Lyt,2)}function Zb(){Zb=C,aQ=new qs(wR,0),oQ=new qs(`TOP`,1),iQ=new qs(Lyt,2)}function Qb(){Qb=C,e2=new nc(`INPUT_ORDER`,0),t2=new nc(`PORT_DEGREE`,1)}function $b(){$b=C,hG=vu(QF,QF,524287),BTt=vu(0,0,eI),gG=Cy(1),Cy(2),_G=Cy(0)}function ex(e){var t;return e.d!=e.r&&(t=Ik(e),e.e=!!t&&t.lk()==xwt,e.d=t),e.e}function tx(e,t,n){var r=e.g[t];return Au(e,t,e.Zi(t,n)),e.Ri(t,n,r),e.Ni(),r}function nx(e,t){var n=e.dd(t);return n>=0&&(e.gd(n),!0)}function rx(e,t){var n;for(ph(e),ph(t),n=!1;t.Ob();)n|=e.Fc(t.Pb());return n}function ix(e,t){var n=P(xh(e.e,t),400);return n?(Ywe(e,n),n.e):null}function pKe(e){var t=e/60|0,n=e%60;return n==0?``+t:``+t+`:`+(``+n)}function ax(e,t){var n=e.a[t],r=(vw(),pG)[typeof n];return r?r(n):XQe(typeof n)}function ox(e,t){var n,r;return lE(e),r=new WUe(t,e.a),n=new zOe(r),new Mp(e,n)}function sx(e){var t=e.b.c.length==0?null:Ep(e.b,0);return t!=null&&LS(e,0),t}function mKe(e,t){var n,r,i=t.c.i;n=P(xh(e.f,i),60),r=n.d.c-n.e.c,eC(t.a,r,0)}function cx(e,t){var n;for(++e.d,++e.c[t],n=t+1;n{(function(t){if(typeof e==`object`&&n!==void 0)n.exports=t();else if(typeof define==`function`&&define.amd)define([],t);else{var r=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this;r.ELK=t()}})(function(){return(function(){function e(n,r,i){function a(s,c){if(!r[s]){if(!n[s]){var l=typeof t==`function`&&t;if(!c&&l)return l(s,!0);if(o)return o(s,!0);var u=Error(`Cannot find module '`+s+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=r[s]={exports:{}};n[s][0].call(d.exports,function(e){var t=n[s][1][e];return a(t||e)},d,d.exports,e,n,r,i)}return r[s].exports}for(var o=typeof t==`function`&&t,s=0;s0&&arguments[0]!==void 0?arguments[0]:{},r=n.defaultLayoutOptions,o=r===void 0?{}:r,s=n.algorithms,c=s===void 0?[`layered`,`stress`,`mrtree`,`radial`,`force`,`disco`,`sporeOverlap`,`sporeCompaction`,`rectpacking`]:s,l=n.workerFactory,u=n.workerUrl;if(i(this,e),this.defaultLayoutOptions=o,this.initialized=!1,u===void 0&&l===void 0)throw Error(`Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.`);var d=l;u!==void 0&&l===void 0&&(d=function(e){return new Worker(e)});var f=d(u);if(typeof f.postMessage!=`function`)throw TypeError(`Created worker does not provide the required 'postMessage' function.`);this.worker=new a(f),this.worker.postMessage({cmd:`register`,algorithms:c}).then(function(e){return t.initialized=!0}).catch(console.err)}return r(e,[{key:`layout`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.layoutOptions,r=n===void 0?this.defaultLayoutOptions:n,i=t.logging,a=i!==void 0&&i,o=t.measureExecutionTime,s=o!==void 0&&o;return e?this.worker.postMessage({cmd:`layout`,graph:e,layoutOptions:r,options:{logging:a,measureExecutionTime:s}}):Promise.reject(Error(`Missing mandatory parameter 'graph'.`))}},{key:`knownLayoutAlgorithms`,value:function(){return this.worker.postMessage({cmd:`algorithms`})}},{key:`knownLayoutOptions`,value:function(){return this.worker.postMessage({cmd:`options`})}},{key:`knownLayoutCategories`,value:function(){return this.worker.postMessage({cmd:`categories`})}},{key:`terminateWorker`,value:function(){this.worker&&this.worker.terminate()}}]),e}();var a=function(){function e(t){var n=this;if(i(this,e),t===void 0)throw Error(`Missing mandatory parameter 'worker'.`);this.resolvers={},this.worker=t,this.worker.onmessage=function(e){setTimeout(function(){n.receive(n,e)},0)}}return r(e,[{key:`postMessage`,value:function(e){var t=this.id||0;this.id=t+1,e.id=t;var n=this;return new Promise(function(r,i){n.resolvers[t]=function(e,t){e?(n.convertGwtStyleError(e),i(e)):r(t)},n.worker.postMessage(e)})}},{key:`receive`,value:function(e,t){var n=t.data,r=e.resolvers[n.id];r&&(delete e.resolvers[n.id],n.error?r(n.error):r(null,n.data))}},{key:`terminate`,value:function(){this.worker&&this.worker.terminate()}},{key:`convertGwtStyleError`,value:function(e){if(e){var t=e.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(e.cause=t.cause.backingJsObject,this.convertGwtStyleError(e.cause)),delete e.__java$exception)}}}]),e}()},{}],2:[function(e,t,n){(function(e){(function(){var r;typeof window<`u`?r=window:e===void 0?typeof self<`u`&&(r=self):r=e;var i;function a(){}function o(){}function s(){}function c(){}function l(){}function u(){}function d(){}function f(){}function p(){}function m(){}function h(){}function g(){}function _(){}function v(){}function y(){}function b(){}function x(){}function S(){}function ee(){}function te(){}function ne(){}function C(){}function re(){}function ie(){}function ae(){}function oe(){}function se(){}function ce(){}function le(){}function ue(){}function de(){}function fe(){}function pe(){}function me(){}function he(){}function ge(){}function _e(){}function ve(){}function ye(){}function be(){}function xe(){}function Se(){}function Ce(){}function we(){}function Te(){}function Ee(){}function De(){}function Oe(){}function ke(){}function Ae(){}function je(){}function Me(){}function Ne(){}function Pe(){}function Fe(){}function Ie(){}function Le(){}function Re(){}function ze(){}function Be(){}function Ve(){}function He(){}function Ue(){}function We(){}function Ge(){}function Ke(){}function qe(){}function Je(){}function Ye(){}function Xe(){}function Ze(){}function Qe(){}function $e(){}function et(){}function tt(){}function nt(){}function rt(){}function it(){}function at(){}function ot(){}function st(){}function ct(){}function lt(){}function ut(){}function dt(){}function ft(){}function pt(){}function mt(){}function ht(){}function gt(){}function _t(){}function vt(){}function yt(){}function bt(){}function xt(){}function St(){}function Ct(){}function wt(){}function Tt(){}function Et(){}function Dt(){}function Ot(){}function kt(){}function At(){}function jt(){}function Mt(){}function Nt(){}function Pt(){}function Ft(){}function It(){}function Lt(){}function Rt(){}function zt(){}function Bt(){}function eee(){}function Vt(){}function tee(){}function nee(){}function Ht(){}function ree(){}function iee(){}function aee(){}function oee(){}function see(){}function cee(){}function lee(){}function uee(){}function dee(){}function fee(){}function pee(){}function mee(){}function hee(){}function Ut(){}function gee(){}function _ee(){}function vee(){}function yee(){}function bee(){}function xee(){}function See(){}function Cee(){}function wee(){}function Wt(){}function Gt(){}function Tee(){}function Eee(){}function Dee(){}function Oee(){}function kee(){}function Aee(){}function jee(){}function Mee(){}function Nee(){}function Pee(){}function Fee(){}function Iee(){}function Lee(){}function Ree(){}function zee(){}function Bee(){}function Vee(){}function Hee(){}function Uee(){}function Wee(){}function Gee(){}function Kee(){}function qee(){}function Jee(){}function Yee(){}function Xee(){}function Zee(){}function Qee(){}function $ee(){}function ete(){}function tte(){}function nte(){}function rte(){}function ite(){}function ate(){}function ote(){}function ste(){}function cte(){}function lte(){}function ute(){}function dte(){}function fte(){}function pte(){}function mte(){}function hte(){}function gte(){}function _te(){}function vte(){}function yte(){}function bte(){}function xte(){}function Ste(){}function Cte(){}function wte(){}function Tte(){}function Ete(){}function Dte(){}function Ote(){}function kte(){}function Ate(){}function jte(){}function Mte(){}function Nte(){}function Pte(){}function Fte(){}function Ite(){}function Lte(){}function Rte(){}function zte(){}function Bte(){}function Vte(){}function Hte(){}function Ute(){}function Wte(){}function Gte(){}function Kte(){}function qte(){}function Jte(){}function Yte(){}function Xte(){}function Zte(){}function Qte(){}function $te(){}function ene(){}function tne(){}function nne(){}function rne(){}function ine(){}function ane(){}function one(){}function sne(){}function cne(){}function lne(){}function une(){}function dne(){}function fne(){}function pne(){}function mne(){}function hne(){}function gne(){}function Kt(){}function _ne(){}function vne(){}function yne(){}function bne(){}function xne(){}function Sne(){}function Cne(){}function wne(){}function Tne(){}function Ene(){}function Dne(){}function One(){}function kne(){}function Ane(){}function jne(){}function Mne(){}function Nne(){}function Pne(){}function Fne(){}function Ine(){}function Lne(){}function Rne(){}function zne(){}function Bne(){}function Vne(){}function Hne(){}function Une(){}function Wne(){}function Gne(){}function Kne(){}function qne(){}function Jne(){}function Yne(){}function Xne(){}function Zne(){}function Qne(){}function $ne(){}function ere(){}function tre(){}function nre(){}function rre(){}function ire(){}function are(){}function ore(){}function sre(){}function cre(){}function lre(){}function ure(){}function dre(){}function fre(){}function pre(){}function mre(){}function hre(){}function gre(){}function _re(){}function vre(){}function yre(){}function bre(){}function xre(){}function Sre(){}function Cre(){}function wre(){}function Tre(){}function Ere(){}function Dre(){}function Ore(){}function kre(){}function Are(){}function jre(){}function Mre(){}function Nre(){}function Pre(){}function Fre(){}function qt(){}function Ire(){}function Lre(){}function Rre(){}function zre(){}function Bre(){}function Vre(){}function Hre(){}function Ure(){}function Wre(){}function Gre(){}function Kre(){}function qre(){}function Jre(){}function Yre(){}function Xre(){}function Zre(){}function Qre(){}function $re(){}function eie(){}function tie(){}function nie(){}function rie(){}function iie(){}function aie(){}function oie(){}function sie(){}function cie(){}function lie(){}function uie(){}function die(){}function fie(){}function pie(){}function mie(){}function hie(){}function gie(){}function _ie(){}function vie(){}function yie(){}function bie(){}function xie(){}function Sie(){}function Cie(){}function wie(){}function Tie(){}function Eie(){}function Die(){}function Oie(){}function kie(){}function Aie(){}function jie(){}function Mie(){}function Nie(){}function Pie(){}function Fie(){}function Iie(){}function Lie(){}function Rie(){}function zie(){}function Bie(){}function Vie(){}function Hie(){}function Uie(){}function Wie(){}function Gie(){}function Kie(){}function qie(){}function Jie(){}function Yie(){}function Xie(){}function Zie(){}function Qie(){}function $ie(){}function eae(){}function tae(){}function nae(){}function rae(){}function iae(){}function aae(){}function oae(){}function sae(){}function cae(){}function lae(){}function uae(){}function dae(){}function fae(){}function pae(){}function mae(){}function hae(){}function gae(){}function _ae(){}function vae(){}function yae(){}function bae(){}function xae(){}function Sae(){}function Cae(){}function wae(){}function Tae(){}function Eae(){}function Dae(){}function Oae(){}function kae(){}function Aae(){}function jae(){}function Mae(){}function Nae(){}function Pae(){}function Fae(){}function Iae(){}function Lae(){}function Rae(){}function zae(){}function Bae(){}function Vae(){}function Hae(){}function Uae(){}function Wae(){}function Gae(){}function Kae(){}function qae(){}function Jae(){}function Yae(){}function Xae(){}function Zae(){}function Qae(){}function $ae(){}function eoe(){}function toe(){}function noe(){}function roe(){}function ioe(){}function aoe(){}function ooe(){}function soe(){}function coe(){}function loe(){}function uoe(){}function doe(){}function foe(){}function poe(){}function moe(){}function hoe(){}function goe(){}function _oe(){}function voe(){}function yoe(){}function boe(){}function xoe(){}function Jt(){}function Yt(){}function Soe(){}function Xt(){}function Coe(){}function woe(){}function Toe(){}function Eoe(){}function Doe(){}function Ooe(){}function koe(){}function Aoe(){}function joe(){}function Moe(){}function Noe(){}function Poe(){}function Foe(){}function Ioe(){}function Loe(){}function Roe(){}function zoe(){}function Boe(){}function Voe(){}function Hoe(){}function Uoe(){}function Woe(){}function Zt(){}function Goe(){}function Qt(){}function Koe(){}function qoe(){}function Joe(){}function Yoe(){}function Xoe(){}function Zoe(){}function Qoe(){}function $oe(){}function ese(){}function tse(){}function nse(){}function rse(){}function ise(){}function ase(){}function ose(){}function sse(){}function cse(){}function lse(){}function use(){}function dse(){}function $t(){}function fse(){}function pse(){}function mse(){}function hse(){}function gse(){}function _se(){}function vse(){}function yse(){}function bse(){}function xse(){}function Sse(){}function Cse(){}function wse(){}function en(){}function Tse(){}function Ese(){}function Dse(){}function tn(){}function Ose(){}function nn(){}function rn(){}function kse(){}function Ase(){}function jse(){}function Mse(){}function Nse(){}function Pse(){}function Fse(){}function Ise(){}function an(){}function Lse(){}function Rse(){}function on(){}function zse(){}function sn(){}function Bse(){}function Vse(){}function Hse(){}function cn(){}function Use(){}function Wse(){}function Gse(){}function Kse(){}function qse(){}function Jse(){}function Yse(){}function Xse(){}function Zse(){}function Qse(){}function $se(){}function ece(){}function tce(){}function nce(){}function rce(){}function ice(){}function ln(){}function un(){}function ace(){}function oce(){}function sce(){}function cce(){}function lce(){}function uce(){}function dce(){}function fce(){}function pce(){}function mce(){}function hce(){}function gce(){}function _ce(){}function vce(){}function yce(){}function bce(){}function xce(){}function Sce(){}function Cce(){}function wce(){}function Tce(){}function Ece(){}function Dce(){}function Oce(){}function kce(){}function Ace(){}function jce(){}function Mce(){}function Nce(){}function Pce(){}function Fce(){}function Ice(){}function Lce(){}function Rce(){}function zce(){}function Bce(){}function Vce(){}function Hce(){}function Uce(){}function Wce(){}function Gce(){}function Kce(){}function qce(){}function Jce(){}function Yce(){}function Xce(){}function Zce(){}function Qce(){}function $ce(){}function ele(){}function tle(){}function nle(){}function rle(){}function ile(){}function ale(){}function ole(){}function sle(){}function cle(){}function lle(){}function ule(){}function dle(){}function fle(){}function ple(){}function mle(){}function hle(){}function gle(){}function _le(){}function vle(){}function yle(){}function ble(){}function xle(){}function Sle(){}function Cle(){}function wle(){}function Tle(){}function Ele(){}function Dle(){}function Ole(){}function kle(){}function Ale(){}function jle(){}function Mle(){}function Nle(){}function Ple(){}function Fle(){}function Ile(){}function Lle(){}function Rle(){}function zle(){}function Ble(){}function Vle(){}function Hle(){}function Ule(){}function Wle(){}function Gle(){}function Kle(){}function qle(){}function Jle(){}function Yle(){}function Xle(){}function Zle(){}function Qle(){}function $le(){}function eue(){}function dn(){fi()}function tue(){Fo()}function nue(){Rk()}function rue(){qw()}function iue(){bO()}function aue(){I9e()}function oue(){XM()}function sue(){e6e()}function cue(){Nk()}function lue(){Io()}function uue(){Ff()}function due(){Ibe()}function fue(){cC()}function pue(){sWe()}function mue(){mJe()}function hue(){DRe()}function gue(){gJe()}function _ue(){eGe()}function vue(){TRe()}function yue(){Fw()}function bue(){vJe()}function xue(){_Je()}function Sue(){HBe()}function Cue(){yJe()}function wue(){wA()}function Tue(){Ro()}function Eue(){bP()}function Due(){mP()}function Oue(){bJe()}function kue(){kYe()}function Aue(){ORe()}function jue(){o6e()}function Mue(){kRe()}function Nue(){Aut()}function Pue(){Hrt()}function Fue(){zx()}function Iue(){Q$e()}function Lue(){rN()}function Rue(){fze()}function zue(){Rx()}function Bue(){Ylt()}function Vue(){PA()}function Hue(){Qlt()}function Uue(){gM()}function Wue(){yA()}function Gue(){bM()}function Kue(){ek()}function fn(){rke()}function que(){gb()}function Jue(){bA()}function Yue(){vP()}function Xue(){Iw()}function Zue(){wD()}function Que(){uC()}function $ue(){_N()}function ede(){Odt()}function tde(e){Gh(e)}function nde(e){this.a=e}function pn(e){this.a=e}function rde(e){this.a=e}function ide(e){this.a=e}function ade(e){this.a=e}function ode(e){this.a=e}function sde(e){this.a=e}function cde(e){this.a=e}function mn(e){this.a=e}function hn(e){this.a=e}function lde(e){this.a=e}function ude(e){this.a=e}function gn(e){this.a=e}function dde(e){this.a=e}function fde(e){this.a=e}function _n(e){this.a=e}function vn(e){this.a=e}function pde(e){this.a=e}function yn(e){this.a=e}function mde(e){this.a=e}function hde(e){this.a=e}function gde(e){this.a=e}function bn(e){this.b=e}function _de(e){this.c=e}function vde(e){this.a=e}function yde(e){this.a=e}function bde(e){this.a=e}function xde(e){this.a=e}function Sde(e){this.a=e}function Cde(e){this.a=e}function wde(e){this.a=e}function Tde(e){this.a=e}function Ede(e){this.a=e}function Dde(e){this.a=e}function Ode(e){this.a=e}function kde(e){this.a=e}function Ade(e){this.a=e}function xn(e){this.a=e}function Sn(e){this.a=e}function Cn(e){this.a=e}function wn(e){this.a=e}function Tn(){this.a=[]}function jde(e,t){e.a=t}function Mde(e,t){e.a=t}function Nde(e,t){e.b=t}function Pde(e,t){e.b=t}function Fde(e,t){e.b=t}function Ide(e,t){e.j=t}function Lde(e,t){e.g=t}function Rde(e,t){e.i=t}function zde(e,t){e.c=t}function Bde(e,t){e.c=t}function Vde(e,t){e.d=t}function Hde(e,t){e.d=t}function En(e,t){e.k=t}function Ude(e,t){e.c=t}function Wde(e,t){e.c=t}function Gde(e,t){e.a=t}function Kde(e,t){e.a=t}function qde(e,t){e.f=t}function Jde(e,t){e.a=t}function Yde(e,t){e.b=t}function Dn(e,t){e.d=t}function On(e,t){e.i=t}function Xde(e,t){e.o=t}function Zde(e,t){e.r=t}function Qde(e,t){e.a=t}function $de(e,t){e.b=t}function efe(e,t){e.e=t}function tfe(e,t){e.f=t}function nfe(e,t){e.g=t}function rfe(e,t){e.e=t}function ife(e,t){e.f=t}function afe(e,t){e.f=t}function kn(e,t){e.a=t}function An(e,t){e.b=t}function ofe(e,t){e.n=t}function sfe(e,t){e.a=t}function cfe(e,t){e.c=t}function lfe(e,t){e.c=t}function ufe(e,t){e.c=t}function dfe(e,t){e.a=t}function ffe(e,t){e.a=t}function pfe(e,t){e.d=t}function mfe(e,t){e.d=t}function hfe(e,t){e.e=t}function gfe(e,t){e.e=t}function _fe(e,t){e.g=t}function vfe(e,t){e.f=t}function yfe(e,t){e.j=t}function bfe(e,t){e.a=t}function xfe(e,t){e.a=t}function Sfe(e,t){e.b=t}function Cfe(e){e.b=e.a}function wfe(e){e.c=e.d.d}function jn(e){this.a=e}function Mn(e){this.a=e}function Nn(e){this.a=e}function Pn(e){this.a=e}function Fn(e){this.a=e}function In(e){this.a=e}function Tfe(e){this.a=e}function Ln(e){this.a=e}function Rn(e){this.a=e}function zn(e){this.a=e}function Bn(e){this.a=e}function Vn(e){this.a=e}function Efe(e){this.a=e}function Dfe(e){this.a=e}function Hn(e){this.b=e}function Un(e){this.b=e}function Wn(e){this.b=e}function Gn(e){this.a=e}function Ofe(e){this.a=e}function Kn(e){this.c=e}function w(e){this.c=e}function kfe(e){this.c=e}function qn(e){this.d=e}function Jn(e){this.a=e}function Yn(e){this.a=e}function Afe(e){this.a=e}function Xn(e){this.a=e}function Zn(e){this.a=e}function Qn(e){this.a=e}function $n(e){this.a=e}function er(e){this.a=e}function tr(e){this.a=e}function nr(e){this.a=e}function jfe(e){this.a=e}function Mfe(e){this.a=e}function rr(e){this.a=e}function Nfe(e){this.a=e}function Pfe(e){this.a=e}function Ffe(e){this.a=e}function Ife(e){this.a=e}function Lfe(e){this.a=e}function Rfe(e){this.a=e}function zfe(e){this.a=e}function Bfe(e){this.a=e}function Vfe(e){this.a=e}function Hfe(e){this.a=e}function Ufe(e){this.a=e}function Wfe(e){this.a=e}function Gfe(e){this.a=e}function Kfe(e){this.a=e}function qfe(e){this.a=e}function ir(e){this.a=e}function Jfe(e){this.a=e}function Yfe(e){this.a=e}function Xfe(e){this.a=e}function Zfe(e){this.a=e}function ar(e){this.a=e}function Qfe(e){this.a=e}function $fe(e){this.a=e}function or(e){this.a=e}function sr(e){this.a=e}function epe(e){this.a=e}function tpe(e){this.a=e}function npe(e){this.a=e}function rpe(e){this.a=e}function ipe(e){this.a=e}function ape(e){this.a=e}function cr(e){this.a=e}function lr(e){this.a=e}function ur(e){this.a=e}function dr(e){this.a=e}function fr(e){this.e=e}function pr(e){this.a=e}function ope(e){this.a=e}function mr(e){this.a=e}function spe(e){this.a=e}function cpe(e){this.a=e}function lpe(e){this.a=e}function upe(e){this.a=e}function dpe(e){this.a=e}function fpe(e){this.a=e}function ppe(e){this.a=e}function mpe(e){this.a=e}function hpe(e){this.a=e}function gpe(e){this.a=e}function _pe(e){this.a=e}function vpe(e){this.a=e}function ype(e){this.a=e}function bpe(e){this.a=e}function xpe(e){this.a=e}function Spe(e){this.a=e}function Cpe(e){this.a=e}function wpe(e){this.a=e}function Tpe(e){this.a=e}function Epe(e){this.a=e}function Dpe(e){this.a=e}function Ope(e){this.a=e}function kpe(e){this.a=e}function Ape(e){this.a=e}function jpe(e){this.a=e}function Mpe(e){this.a=e}function Npe(e){this.a=e}function Ppe(e){this.a=e}function Fpe(e){this.a=e}function Ipe(e){this.a=e}function Lpe(e){this.a=e}function Rpe(e){this.a=e}function zpe(e){this.a=e}function Bpe(e){this.a=e}function Vpe(e){this.a=e}function Hpe(e){this.a=e}function Upe(e){this.a=e}function Wpe(e){this.a=e}function Gpe(e){this.a=e}function Kpe(e){this.a=e}function qpe(e){this.a=e}function Jpe(e){this.a=e}function Ype(e){this.a=e}function Xpe(e){this.a=e}function Zpe(e){this.a=e}function Qpe(e){this.a=e}function $pe(e){this.a=e}function eme(e){this.a=e}function tme(e){this.a=e}function nme(e){this.a=e}function rme(e){this.a=e}function ime(e){this.c=e}function ame(e){this.b=e}function ome(e){this.a=e}function sme(e){this.a=e}function cme(e){this.a=e}function lme(e){this.a=e}function ume(e){this.a=e}function dme(e){this.a=e}function fme(e){this.a=e}function pme(e){this.a=e}function mme(e){this.a=e}function hme(e){this.a=e}function gme(e){this.a=e}function _me(e){this.a=e}function vme(e){this.a=e}function yme(e){this.a=e}function bme(e){this.a=e}function xme(e){this.a=e}function Sme(e){this.a=e}function Cme(e){this.a=e}function wme(e){this.a=e}function Tme(e){this.a=e}function Eme(e){this.a=e}function Dme(e){this.a=e}function Ome(e){this.a=e}function kme(e){this.a=e}function Ame(e){this.a=e}function jme(e){this.a=e}function Mme(e){this.a=e}function hr(e){this.a=e}function gr(e){this.a=e}function Nme(e){this.a=e}function Pme(e){this.a=e}function Fme(e){this.a=e}function Ime(e){this.a=e}function Lme(e){this.a=e}function Rme(e){this.a=e}function zme(e){this.a=e}function Bme(e){this.a=e}function Vme(e){this.a=e}function Hme(e){this.a=e}function Ume(e){this.a=e}function Wme(e){this.a=e}function Gme(e){this.a=e}function Kme(e){this.a=e}function qme(e){this.a=e}function Jme(e){this.a=e}function Yme(e){this.a=e}function Xme(e){this.a=e}function Zme(e){this.a=e}function Qme(e){this.a=e}function $me(e){this.a=e}function ehe(e){this.a=e}function the(e){this.a=e}function nhe(e){this.a=e}function rhe(e){this.a=e}function ihe(e){this.a=e}function _r(e){this.a=e}function ahe(e){this.f=e}function ohe(e){this.a=e}function she(e){this.a=e}function che(e){this.a=e}function lhe(e){this.a=e}function uhe(e){this.a=e}function dhe(e){this.a=e}function fhe(e){this.a=e}function phe(e){this.a=e}function mhe(e){this.a=e}function hhe(e){this.a=e}function ghe(e){this.a=e}function _he(e){this.a=e}function vhe(e){this.a=e}function yhe(e){this.a=e}function bhe(e){this.a=e}function xhe(e){this.a=e}function She(e){this.a=e}function Che(e){this.a=e}function whe(e){this.a=e}function The(e){this.a=e}function Ehe(e){this.a=e}function Dhe(e){this.a=e}function Ohe(e){this.a=e}function khe(e){this.a=e}function Ahe(e){this.a=e}function jhe(e){this.a=e}function Mhe(e){this.a=e}function Nhe(e){this.a=e}function vr(e){this.a=e}function Phe(e){this.a=e}function yr(e){this.b=e}function Fhe(e){this.a=e}function Ihe(e){this.a=e}function Lhe(e){this.a=e}function Rhe(e){this.a=e}function zhe(e){this.a=e}function Bhe(e){this.a=e}function Vhe(e){this.a=e}function Hhe(e){this.b=e}function Uhe(e){this.a=e}function br(e){this.a=e}function Whe(e){this.a=e}function Ghe(e){this.a=e}function Khe(e){this.c=e}function xr(e){this.e=e}function Sr(e){this.a=e}function Cr(e){this.a=e}function wr(e){this.a=e}function qhe(e){this.d=e}function Jhe(e){this.a=e}function Yhe(e){this.a=e}function Xhe(e){this.a=e}function Tr(e){this.e=e}function Er(){this.a=0}function Dr(){Pm(this)}function T(){au(this)}function Or(){_Fe(this)}function Zhe(){}function kr(){this.c=nHt}function Qhe(e,t){e.b+=t}function $he(e,t){t.Wb(e)}function ege(e){return e.a}function tge(e){return e.a}function nge(e){return e.a}function rge(e){return e.a}function ige(e){return e.a}function E(e){return e.e}function age(){return null}function oge(){return null}function sge(){La(),P_t()}function cge(e){e.b.Of(e.e)}function lge(e){e.b=new la}function Ar(e,t){e.b=t-e.b}function jr(e,t){e.a=t-e.a}function Mr(e,t){e.push(t)}function uge(e,t){e.sort(t)}function dge(e,t){t.jd(e.a)}function fge(e,t){tj(t,e)}function pge(e,t,n){e.Yd(n,t)}function Nr(e,t){e.e=t,t.b=e}function mge(e){wf(),this.a=e}function hge(e){wf(),this.a=e}function gge(e){wf(),this.a=e}function Pr(e){gh(),this.a=e}function _ge(e){Xg(),lG.le(e)}function vge(){vge=C,new Dr}function Fr(){WTe.call(this)}function yge(){WTe.call(this)}function bge(){Fr.call(this)}function Ir(){Fr.call(this)}function xge(){Fr.call(this)}function Lr(){Fr.call(this)}function Rr(){Fr.call(this)}function zr(){Fr.call(this)}function Br(){Fr.call(this)}function Vr(){Fr.call(this)}function Sge(){Fr.call(this)}function Hr(){Fr.call(this)}function Cge(){Fr.call(this)}function wge(){this.a=this}function Ur(){this.Bb|=256}function Tge(){this.b=new lCe}function Wr(e,t){e.length=t}function Gr(e,t){M(e.a,t)}function Ege(e,t){tet(e.c,t)}function Dge(e,t){Lm(e.b,t)}function Oge(e,t){JO(e.a,t)}function kge(e,t){$T(e.a,t)}function Kr(e,t){AC(e.e,t)}function qr(e){_j(e.c,e.b)}function Age(e,t){e.kc().Nb(t)}function jge(e){this.a=y1e(e)}function Jr(){this.a=new Dr}function Mge(){this.a=new Dr}function Nge(){this.a=new gbe}function Yr(){this.a=new T}function Xr(){this.a=new T}function Pge(){this.a=new T}function Zr(){this.a=new Xe}function Qr(){this.a=new qUe}function Fge(){this.a=new Vt}function Ige(){this.a=new wRe}function Lge(){this.a=new eOe}function Rge(){this.a=new T}function zge(){this.a=new T}function Bge(){this.a=new T}function Vge(){this.a=new T}function Hge(){this.d=new T}function Uge(){this.a=new Qze}function Wge(){this.a=new Jr}function Gge(){this.a=new Dr}function Kge(){this.b=new Dr}function qge(){this.b=new T}function Jge(){this.e=new T}function Yge(){this.a=new wue}function Xge(){this.d=new T}function Zge(){QIe.call(this)}function Qge(){QIe.call(this)}function $ge(){T.call(this)}function e_e(){bge.call(this)}function $r(){Yr.call(this)}function t_e(){Qd.call(this)}function n_e(){Vge.call(this)}function ei(){Zhe.call(this)}function ti(){ei.call(this)}function ni(){Zhe.call(this)}function ri(){ni.call(this)}function r_e(){b_e.call(this)}function i_e(){b_e.call(this)}function a_e(){b_e.call(this)}function o_e(){C_e.call(this)}function ii(){Ose.call(this)}function s_e(){Ose.call(this)}function ai(){vo.call(this)}function c_e(){E_e.call(this)}function l_e(){E_e.call(this)}function u_e(){Dr.call(this)}function d_e(){Dr.call(this)}function f_e(){Dr.call(this)}function oi(){EJe.call(this)}function p_e(){Jr.call(this)}function m_e(){Ur.call(this)}function si(){gTe.call(this)}function ci(){Dr.call(this)}function li(){gTe.call(this)}function ui(){Dr.call(this)}function h_e(){Dr.call(this)}function g_e(){sn.call(this)}function __e(){g_e.call(this)}function v_e(){sn.call(this)}function y_e(){Qle.call(this)}function b_e(){this.a=new Jr}function x_e(){this.a=new Dr}function S_e(){this.a=new T}function C_e(){this.a=new Dr}function di(){this.a=new vo}function w_e(){this.j=new T}function T_e(){this.a=new bye}function E_e(){this.a=new zse}function D_e(){this.a=new goe}function fi(){fi=C,GW=new o}function pi(){pi=C,XW=new k_e}function mi(){mi=C,ZW=new O_e}function O_e(){_n.call(this,``)}function k_e(){_n.call(this,``)}function A_e(e){mqe.call(this,e)}function j_e(e){mqe.call(this,e)}function M_e(e){mn.call(this,e)}function N_e(e){nbe.call(this,e)}function P_e(e){nbe.call(this,e)}function F_e(e){N_e.call(this,e)}function I_e(e){N_e.call(this,e)}function L_e(e){N_e.call(this,e)}function R_e(e){ny.call(this,e)}function z_e(e){ny.call(this,e)}function B_e(e){VOe.call(this,e)}function V_e(e){obe.call(this,e)}function hi(e){lo.call(this,e)}function gi(e){lo.call(this,e)}function H_e(e){lo.call(this,e)}function _i(e){P9e.call(this,e)}function vi(e){_i.call(this,e)}function yi(e){KNe.call(this,e)}function U_e(e){yi.call(this,e)}function bi(){wn.call(this,{})}function W_e(){W_e=C,zTt=new te}function xi(){xi=C,tG=new Vwe}function G_e(){G_e=C,iG=new a}function Si(){Si=C,cG=new v}function Ci(){Ci=C,dG=new x}function wi(e){Bu(),this.a=e}function Ti(e){lC(),this.a=e}function Ei(e){em(),this.f=e}function Di(e){em(),this.f=e}function K_e(e){nke(),this.a=e}function q_e(e){e.b=null,e.c=0}function J_e(e,t){e.e=t,Sst(e,t)}function Y_e(e,t){e.a=t,ott(e)}function Oi(e,t,n){e.a[t.g]=n}function X_e(e,t,n){y8e(n,e,t)}function Z_e(e,t){HOe(t.i,e.n)}function Q_e(e,t){ZZe(e).Cd(t)}function $_e(e,t){e.a.ec().Mc(t)}function eve(e,t){return e.g-t.g}function tve(e,t){return e*e/t}function ki(e){return Gh(e),e}function D(e){return Gh(e),e}function Ai(e){return Gh(e),e}function nve(e){return new Cn(e)}function rve(e){return new mh(e)}function ive(e){return Gh(e),e}function ave(e){return Gh(e),e}function ji(e){yi.call(this,e)}function Mi(e){yi.call(this,e)}function ove(e){yi.call(this,e)}function Ni(e){KNe.call(this,e)}function Pi(e){yi.call(this,e)}function Fi(e){yi.call(this,e)}function Ii(e){yi.call(this,e)}function sve(e){yi.call(this,e)}function Li(e){yi.call(this,e)}function Ri(e){yi.call(this,e)}function zi(e){yi.call(this,e)}function Bi(e){yi.call(this,e)}function Vi(e){yi.call(this,e)}function Hi(e){yi.call(this,e)}function Ui(e){yi.call(this,e)}function Wi(e){Gh(e),this.a=e}function Gi(e){return Tw(e),e}function Ki(e){CPe(e,e.length)}function qi(e){return e.b==e.c}function Ji(e){return!!e&&e.b}function cve(e){return!!e&&e.k}function lve(e){return!!e&&e.j}function uve(e,t,n){e.c.Ef(t,n)}function dve(e,t){e.be(t),t.ae(e)}function Yi(e){wf(),this.a=ph(e)}function Xi(){this.a=kd(ph(PP))}function fve(){throw E(new Br)}function pve(){throw E(new Br)}function Zi(){throw E(new Br)}function mve(){throw E(new Br)}function hve(){throw E(new Br)}function gve(){throw E(new Br)}function Qi(){Qi=C,Xg()}function $i(){In.call(this,``)}function ea(){In.call(this,``)}function ta(){In.call(this,``)}function na(){In.call(this,``)}function ra(e){Mi.call(this,e)}function ia(e){Mi.call(this,e)}function aa(e){Fi.call(this,e)}function oa(e){Wn.call(this,e)}function _ve(e){oa.call(this,e)}function sa(e){qu.call(this,e)}function ca(e){sEe.call(this,e,0)}function la(){URe.call(this,12,3)}function O(e,t){return _Re(e,t)}function ua(e,t){return yb(e,t)}function vve(e,t){return e.a-t.a}function yve(e,t){return e.a-t.a}function bve(e,t){return e.a-t.a}function xve(e,t){return t in e.a}function Sve(e){return e.a?e.b:0}function Cve(e){return e.a?e.b:0}function wve(e,t,n){t.Cd(e.a[n])}function Tve(e,t,n){t.Pe(e.a[n])}function Eve(e,t){e.b=new Vl(t)}function Dve(e,t){return e.b=t,e}function Ove(e,t){return e.c=t,e}function kve(e,t){return e.f=t,e}function Ave(e,t){return e.g=t,e}function da(e,t){return e.a=t,e}function fa(e,t){return e.f=t,e}function jve(e,t){return e.k=t,e}function pa(e,t){return e.a=t,e}function Mve(e,t){return e.e=t,e}function ma(e,t){return e.e=t,e}function Nve(e,t){return e.f=t,e}function Pve(e,t){e.b=!0,e.d=t}function Fve(e,t){return e.b-t.b}function Ive(e,t){return e.g-t.g}function Lve(e,t){return e?0:t-1}function Rve(e,t){return e?0:t-1}function zve(e,t){return e?t-1:0}function Bve(e,t){return e.s-t.s}function Vve(e,t){return t.rg(e)}function ha(e,t){return e.b=t,e}function ga(e,t){return e.a=t,e}function _a(e,t){return e.c=t,e}function va(e,t){return e.d=t,e}function ya(e,t){return e.e=t,e}function ba(e,t){return e.f=t,e}function xa(e,t){return e.a=t,e}function Sa(e,t){return e.b=t,e}function Ca(e,t){return e.c=t,e}function wa(e,t){return e.c=t,e}function Ta(e,t){return e.b=t,e}function Ea(e,t){return e.d=t,e}function Da(e,t){return e.e=t,e}function Hve(e,t){return e.f=t,e}function Oa(e,t){return e.g=t,e}function ka(e,t){return e.a=t,e}function Aa(e,t){return e.i=t,e}function ja(e,t){return e.j=t,e}function Uve(e,t){wA(),G_(t,e)}function Wve(e,t,n){CNe(e.a,t,n)}function Ma(e){yf.call(this,e)}function Gve(e){L1e.call(this,e)}function Kve(e){uIe.call(this,e)}function Na(e){uIe.call(this,e)}function Pa(e){kx.call(this,e)}function qve(e){Ig.call(this,e)}function Jve(e){Ig.call(this,e)}function Yve(){Dwe.call(this,``)}function Fa(){this.a=0,this.b=0}function Xve(){this.b=0,this.a=0}function Zve(e,t){e.b=0,Qx(e,t)}function Qve(e,t){return e.k=t,e}function $ve(e,t){return e.j=t,e}function eye(e,t){e.c=t,e.b=!0}function tye(){tye=C,rEt=c5e()}function Ia(){Ia=C,iVt=X6e()}function nye(){nye=C,Y5=X5e()}function La(){La=C,h7=dS()}function Ra(){Ra=C,R7=Z6e()}function rye(){rye=C,wHt=Q6e()}function za(){za=C,b9=rtt()}function Ba(e){return e.e&&e.e()}function iye(e){return e.l|e.m<<22}function aye(e,t){return e.c._b(t)}function oye(e,t){return E$e(e.b,t)}function Va(e){return e?e.d:null}function sye(e){return e?e.g:null}function cye(e){return e?e.i:null}function Ha(e){return Ad(e),e.o}function Ua(e,t){return e.a+=t,e}function Wa(e,t){return e.a+=t,e}function Ga(e,t){return e.a+=t,e}function Ka(e,t){return e.a+=t,e}function lye(e,t){for(;e.Bd(t););}function qa(e){this.a=new go(e)}function uye(){throw E(new Br)}function dye(){throw E(new Br)}function fye(){throw E(new Br)}function pye(){throw E(new Br)}function mye(){throw E(new Br)}function hye(){throw E(new Br)}function Ja(e){this.a=new mm(e)}function gye(){this.a=new Yj(NFt)}function _ye(){this.b=new Yj(yPt)}function vye(){this.a=new Yj(kIt)}function yye(){this.b=new Yj(_3)}function bye(){this.b=new Yj(_3)}function Ya(e){this.a=0,this.b=e}function xye(e){Ngt(),tvt(this,e)}function Xa(e){return Hh(e),e.a}function Za(e){return e.b!=e.d.c}function Sye(e,t){return e.d[t.p]}function Cye(e,t){return bst(e,t)}function wye(e,t,n){e.splice(t,n)}function Qa(e,t){for(;e.Re(t););}function Tye(e){e.c?gct(e):_ct(e)}function Eye(){throw E(new Br)}function Dye(){throw E(new Br)}function Oye(){throw E(new Br)}function kye(){throw E(new Br)}function Aye(){throw E(new Br)}function jye(){throw E(new Br)}function Mye(){throw E(new Br)}function Nye(){throw E(new Br)}function Pye(){throw E(new Br)}function Fye(){throw E(new Br)}function Iye(){throw E(new Hr)}function Lye(){throw E(new Hr)}function $a(e){this.a=new Rye(e)}function Rye(e){IJe(this,e,B9e())}function eo(e){return!e||mFe(e)}function to(e){return A9[e]!=-1}function zye(){oG!=0&&(oG=0),sG=-1}function Bye(){xTt??=[]}function no(e,t){zu.call(this,e,t)}function ro(e,t){no.call(this,e,t)}function Vye(e,t){this.a=e,this.b=t}function Hye(e,t){this.a=e,this.b=t}function Uye(e,t){this.a=e,this.b=t}function Wye(e,t){this.a=e,this.b=t}function Gye(e,t){this.a=e,this.b=t}function Kye(e,t){this.a=e,this.b=t}function qye(e,t){this.a=e,this.b=t}function io(e,t){this.e=e,this.d=t}function Jye(e,t){this.b=e,this.c=t}function Yye(e,t){this.b=e,this.a=t}function Xye(e,t){this.b=e,this.a=t}function Zye(e,t){this.b=e,this.a=t}function Qye(e,t){this.b=e,this.a=t}function $ye(e,t){this.a=e,this.b=t}function ao(e,t){this.a=e,this.b=t}function ebe(e,t){this.a=e,this.f=t}function oo(e,t){this.g=e,this.i=t}function so(e,t){this.f=e,this.g=t}function tbe(e,t){this.b=e,this.c=t}function nbe(e){vTe(e.dc()),this.c=e}function rbe(e,t){this.a=e,this.b=t}function ibe(e,t){this.a=e,this.b=t}function abe(e){this.a=P(ph(e),15)}function obe(e){this.a=P(ph(e),15)}function sbe(e){this.a=P(ph(e),85)}function co(e){this.b=P(ph(e),85)}function lo(e){this.b=P(ph(e),51)}function uo(){this.q=new r.Date}function fo(e,t){this.a=e,this.b=t}function cbe(e,t){return km(e.b,t)}function po(e,t){return e.b.Hc(t)}function lbe(e,t){return e.b.Ic(t)}function ube(e,t){return e.b.Qc(t)}function dbe(e,t){return e.b.Hc(t)}function fbe(e,t){return e.c.uc(t)}function pbe(e,t){return NT(e.c,t)}function mo(e,t){return e.a._b(t)}function mbe(e,t){return e>t&&t0}function rs(e,t){return dT(e,t)<0}function exe(e,t){return Gp(e.a,t)}function txe(e,t){yRe.call(this,e,t)}function nxe(e){_h(),VOe.call(this,e)}function rxe(e,t){mNe(e,e.length,t)}function is(e,t){NPe(e,e.length,t)}function as(e,t){return e.a.get(t)}function ixe(e,t){return km(e.e,t)}function os(e){return Gh(e),!1}function ss(e){this.a=P(ph(e),229)}function cs(e){cv.call(this,e,21)}function ls(e,t){so.call(this,e,t)}function us(e,t){so.call(this,e,t)}function axe(e,t){this.b=e,this.a=t}function ds(e,t){this.d=e,this.e=t}function oxe(e,t){this.a=e,this.b=t}function sxe(e,t){this.a=e,this.b=t}function cxe(e,t){this.a=e,this.b=t}function lxe(e,t){this.a=e,this.b=t}function fs(e,t){this.a=e,this.b=t}function uxe(e,t){this.b=e,this.a=t}function dxe(e,t){this.b=e,this.a=t}function fxe(e,t){so.call(this,e,t)}function pxe(e,t){so.call(this,e,t)}function ps(e,t){so.call(this,e,t)}function ms(e,t){so.call(this,e,t)}function hs(e,t){so.call(this,e,t)}function gs(e,t){so.call(this,e,t)}function _s(e,t){so.call(this,e,t)}function vs(e,t){this.b=e,this.a=t}function ys(e,t){so.call(this,e,t)}function bs(e,t){this.b=e,this.a=t}function xs(e,t){so.call(this,e,t)}function mxe(e,t){this.b=e,this.a=t}function Ss(e,t){so.call(this,e,t)}function Cs(e,t){so.call(this,e,t)}function ws(e,t){so.call(this,e,t)}function Ts(e,t,n){e.splice(t,0,n)}function hxe(e,t,n){e.Mb(n)&&t.Cd(n)}function gxe(e,t,n){t.Pe(e.a.Ye(n))}function _xe(e,t,n){t.Dd(e.a.Ze(n))}function vxe(e,t,n){t.Cd(e.a.Kb(n))}function yxe(e,t){return $u(e.c,t)}function bxe(e,t){return $u(e.e,t)}function Es(e,t){so.call(this,e,t)}function Ds(e,t){so.call(this,e,t)}function Os(e,t){so.call(this,e,t)}function xxe(e,t){so.call(this,e,t)}function ks(e,t){so.call(this,e,t)}function As(e,t){so.call(this,e,t)}function Sxe(e,t){this.a=e,this.b=t}function Cxe(e,t){this.a=e,this.b=t}function wxe(e,t){this.a=e,this.b=t}function Txe(e,t){this.a=e,this.b=t}function Exe(e,t){this.a=e,this.b=t}function Dxe(e,t){this.a=e,this.b=t}function Oxe(e,t){this.b=e,this.a=t}function kxe(e,t){this.b=e,this.a=t}function Axe(e,t){this.b=e,this.a=t}function js(e,t){this.c=e,this.d=t}function jxe(e,t){this.e=e,this.d=t}function Mxe(e,t){this.a=e,this.b=t}function Nxe(e,t){this.a=e,this.b=t}function Pxe(e,t){this.a=e,this.b=t}function Fxe(e,t){this.b=e,this.a=t}function Ixe(e,t){this.b=t,this.c=e}function Ms(e,t){so.call(this,e,t)}function Ns(e,t){so.call(this,e,t)}function Ps(e,t){so.call(this,e,t)}function Lxe(e,t){so.call(this,e,t)}function Fs(e,t){so.call(this,e,t)}function Is(e,t){so.call(this,e,t)}function Ls(e,t){so.call(this,e,t)}function Rs(e,t){so.call(this,e,t)}function zs(e,t){so.call(this,e,t)}function Bs(e,t){so.call(this,e,t)}function Vs(e,t){so.call(this,e,t)}function Hs(e,t){so.call(this,e,t)}function Us(e,t){so.call(this,e,t)}function Ws(e,t){so.call(this,e,t)}function Gs(e,t){so.call(this,e,t)}function Ks(e,t){so.call(this,e,t)}function qs(e,t){so.call(this,e,t)}function Js(e,t){so.call(this,e,t)}function Ys(e,t){so.call(this,e,t)}function Xs(e,t){so.call(this,e,t)}function Zs(e,t){so.call(this,e,t)}function Qs(e,t){so.call(this,e,t)}function $s(e,t){so.call(this,e,t)}function ec(e,t){so.call(this,e,t)}function tc(e,t){so.call(this,e,t)}function nc(e,t){so.call(this,e,t)}function rc(e,t){so.call(this,e,t)}function ic(e,t){so.call(this,e,t)}function ac(e,t){so.call(this,e,t)}function oc(e,t){so.call(this,e,t)}function sc(e,t){so.call(this,e,t)}function cc(e,t){so.call(this,e,t)}function lc(e,t){so.call(this,e,t)}function Rxe(e,t){this.b=e,this.a=t}function zxe(e,t){so.call(this,e,t)}function Bxe(e,t){this.a=e,this.b=t}function Vxe(e,t){this.a=e,this.b=t}function Hxe(e,t){this.a=e,this.b=t}function Uxe(e,t){so.call(this,e,t)}function Wxe(e,t){so.call(this,e,t)}function Gxe(e,t){this.a=e,this.b=t}function Kxe(e,t){return Rf(),t!=e}function uc(e){return jd(e.a),e.b}function dc(e){return Drt(e,e.c),e}function qxe(){return tye(),new rEt}function Jxe(){If(),this.a=new Zd}function Yxe(){rM(),this.a=new Jr}function Xxe(){B_(),this.b=new Jr}function Zxe(e,t){this.b=e,this.d=t}function Qxe(e,t){this.a=e,this.b=t}function $xe(e,t){this.a=e,this.b=t}function eSe(e,t){this.a=e,this.b=t}function tSe(e,t){this.b=e,this.a=t}function nSe(e,t){so.call(this,e,t)}function rSe(e,t){so.call(this,e,t)}function fc(e,t){so.call(this,e,t)}function pc(e,t){so.call(this,e,t)}function mc(e,t){so.call(this,e,t)}function hc(e,t){so.call(this,e,t)}function iSe(e,t){so.call(this,e,t)}function aSe(e,t){so.call(this,e,t)}function gc(e,t){so.call(this,e,t)}function oSe(e,t){so.call(this,e,t)}function _c(e,t){so.call(this,e,t)}function vc(e,t){so.call(this,e,t)}function yc(e,t){so.call(this,e,t)}function bc(e,t){so.call(this,e,t)}function xc(e,t){so.call(this,e,t)}function Sc(e,t){so.call(this,e,t)}function sSe(e,t){so.call(this,e,t)}function Cc(e,t){so.call(this,e,t)}function cSe(e,t){so.call(this,e,t)}function wc(e,t){so.call(this,e,t)}function Tc(e,t){so.call(this,e,t)}function lSe(e,t){so.call(this,e,t)}function Ec(e,t){so.call(this,e,t)}function uSe(e,t){so.call(this,e,t)}function dSe(e,t){this.b=e,this.a=t}function fSe(e,t){this.b=e,this.a=t}function pSe(e,t){this.b=e,this.a=t}function mSe(e,t){this.b=e,this.a=t}function hSe(e,t){this.a=e,this.b=t}function gSe(e,t){this.a=e,this.b=t}function _Se(e,t){this.a=e,this.b=t}function k(e,t){this.a=e,this.b=t}function Dc(e,t){so.call(this,e,t)}function Oc(e,t){so.call(this,e,t)}function kc(e,t){so.call(this,e,t)}function Ac(e,t){so.call(this,e,t)}function jc(e,t){so.call(this,e,t)}function Mc(e,t){so.call(this,e,t)}function Nc(e,t){so.call(this,e,t)}function Pc(e,t){so.call(this,e,t)}function Fc(e,t){so.call(this,e,t)}function Ic(e,t){so.call(this,e,t)}function Lc(e,t){so.call(this,e,t)}function Rc(e,t){so.call(this,e,t)}function zc(e,t){so.call(this,e,t)}function Bc(e,t){so.call(this,e,t)}function Vc(e,t){so.call(this,e,t)}function Hc(e,t){so.call(this,e,t)}function Uc(e,t){so.call(this,e,t)}function Wc(e,t){so.call(this,e,t)}function vSe(e,t){so.call(this,e,t)}function Gc(e,t){so.call(this,e,t)}function ySe(e,t){this.a=e,this.b=t}function bSe(e,t){this.a=e,this.b=t}function xSe(e,t){this.a=e,this.b=t}function SSe(e,t){this.a=e,this.b=t}function CSe(e,t){this.a=e,this.b=t}function wSe(e,t){this.a=e,this.b=t}function Kc(e,t){this.a=e,this.b=t}function TSe(e,t){this.a=e,this.b=t}function ESe(e,t){this.a=e,this.b=t}function DSe(e,t){this.a=e,this.b=t}function OSe(e,t){this.a=e,this.b=t}function kSe(e,t){this.a=e,this.b=t}function ASe(e,t){this.a=e,this.b=t}function jSe(e,t){this.b=e,this.a=t}function MSe(e,t){this.b=e,this.a=t}function NSe(e,t){this.b=e,this.a=t}function PSe(e,t){this.b=e,this.a=t}function FSe(e,t){this.a=e,this.b=t}function ISe(e,t){this.a=e,this.b=t}function qc(e,t){so.call(this,e,t)}function LSe(e,t){this.a=e,this.b=t}function RSe(e,t){this.a=e,this.b=t}function Jc(e,t){so.call(this,e,t)}function zSe(e,t){this.f=e,this.c=t}function Yc(e,t){return $u(e.g,t)}function BSe(e,t){return $u(t.b,e)}function VSe(e,t){return uD(e.a,t)}function HSe(e,t){return-e.b.af(t)}function USe(e,t){e&&Qh(f7,e,t)}function Xc(e,t){e.i=null,OS(e,t)}function WSe(e,t,n){I8e(t,KA(e,n))}function GSe(e,t,n){I8e(t,KA(e,n))}function KSe(e,t){not(e.a,P(t,58))}function qSe(e,t){KGe(e.a,P(t,12))}function Zc(e,t){this.a=e,this.b=t}function JSe(e,t){this.a=e,this.b=t}function YSe(e,t){this.a=e,this.b=t}function XSe(e,t){this.a=e,this.b=t}function ZSe(e,t){this.a=e,this.b=t}function QSe(e,t){this.d=e,this.b=t}function $Se(e,t){this.e=e,this.a=t}function Qc(e,t){this.b=e,this.c=t}function $c(e,t){this.i=e,this.g=t}function el(e,t){this.d=e,this.e=t}function eCe(e,t){kKe(new Lu(e),t)}function tl(e){return lD(e.c,e.b)}function nl(e){return e?e.md():null}function A(e){return e??null}function rl(e){return typeof e===OP}function il(e){return typeof e===DP}function al(e){return typeof e===Vvt}function ol(e,t){return dT(e,t)==0}function sl(e,t){return dT(e,t)>=0}function cl(e,t){return dT(e,t)!=0}function ll(e,t){return VYe(e.Kc(),t)}function ul(e,t){return e.Rd().Xb(t)}function tCe(e){return RE(e),e.d.gc()}function dl(e){return bp(e==null),e}function fl(e,t){return e.a+=``+t,e}function pl(e,t){return e.a+=``+t,e}function ml(e,t){return e.a+=``+t,e}function hl(e,t){return e.a+=``+t,e}function gl(e,t){return e.a+=``+t,e}function _l(e,t){return e.a+=``+t,e}function nCe(e){return``+(Gh(e),e)}function rCe(e){Pm(this),mC(this,e)}function iCe(){ERe(),bNe.call(this)}function aCe(e,t){GNe.call(this,e,t)}function oCe(e,t){GNe.call(this,e,t)}function vl(e,t){GNe.call(this,e,t)}function yl(e,t){iy(e,t,e.c.b,e.c)}function bl(e,t){iy(e,t,e.a,e.a.a)}function xl(e){return ov(e,0),null}function sCe(){this.b=0,this.a=!1}function cCe(){this.b=0,this.a=!1}function lCe(){this.b=new go(xx(12))}function uCe(){uCe=C,oDt=nT(sO())}function dCe(){dCe=C,NOt=nT(wot())}function fCe(){fCe=C,NPt=nT(qYe())}function Sl(){Sl=C,vge(),uG=new Dr}function Cl(e){return e.a=0,e.b=0,e}function pCe(e,t){return e.a=t.g+1,e}function wl(e,t){lf.call(this,e,t)}function Tl(e,t){Wd.call(this,e,t)}function El(e,t){$c.call(this,e,t)}function mCe(e,t){ad.call(this,e,t)}function Dl(e,t){WC.call(this,e,t)}function Ol(e,t){Jo(),Qh(v7,e,t)}function hCe(e,t){e.q.setTime(Dv(t))}function gCe(e){r.clearTimeout(e)}function _Ce(e){return ph(e),new Hl(e)}function vCe(e,t){return A(e)===A(t)}function yCe(e,t){return e.a.a.a.cc(t)}function kl(e,t){return p_(e.a,0,t)}function Al(e){return zPe(P(e,74))}function jl(e){return C_((Gh(e),e))}function bCe(e){return C_((Gh(e),e))}function xCe(e){return vu(e.l,e.m,e.h)}function Ml(e,t){return _u(e.a,t.a)}function SCe(e,t){return DPe(e.a,t.a)}function CCe(e,t){return aE(e.a,t.a)}function Nl(e,t){return e.indexOf(t)}function wCe(e,t){return e.j[t.p]==2}function Pl(e,t){return e==t?0:e?1:-1}function Fl(e){return e<10?`0`+e:``+e}function Il(e){return typeof e===Vvt}function TCe(e){return e==kJ||e==MJ}function ECe(e){return e==kJ||e==AJ}function DCe(e,t){return _u(e.g,t.g)}function Ll(e){return Ab(e.b.b,e,0)}function OCe(){Np.call(this,0,0,0,0)}function Rl(){Xn.call(this,new ry)}function zl(e,t){bb(e,0,e.length,t)}function kCe(e,t){return M(e.a,t),t}function ACe(e,t){return Lf(),t.a+=e}function jCe(e,t){return Lf(),t.a+=e}function MCe(e,t){return Lf(),t.c+=e}function NCe(e,t){return M(e.c,t),e}function Bl(e,t){return OC(e.a,t),e}function PCe(e){this.a=qxe(),this.b=e}function FCe(e){this.a=qxe(),this.b=e}function Vl(e){this.a=e.a,this.b=e.b}function Hl(e){this.a=e,dn.call(this)}function ICe(e){this.a=e,dn.call(this)}function Ul(){wg.call(this,0,0,0,0)}function Wl(e){return OC(new Zh,e)}function LCe(e){return ag(P(e,123))}function Gl(e){return e.vh()&&e.wh()}function Kl(e){return e!=V8&&e!=H8}function ql(e){return e==t8||e==n8}function Jl(e){return e==i8||e==e8}function RCe(e){return e==L0||e==I0}function zCe(e,t){return _u(e.g,t.g)}function BCe(e,t){return new WC(t,e)}function VCe(e,t){return new WC(t,e)}function Yl(e){return wje(e.b.Kc(),e.a)}function Xl(e,t){Gw(e,t),eS(e,e.D)}function Zl(e,t,n){Xx(e,t),Vx(e,n)}function Ql(e,t,n){Wx(e,t),Ux(e,n)}function $l(e,t,n){Gx(e,t),Kx(e,n)}function eu(e,t,n){Hx(e,t),Jx(e,n)}function tu(e,t,n){qx(e,t),Yx(e,n)}function HCe(e,t,n){mDe.call(this,e,t,n)}function nu(e){zSe.call(this,e,!0)}function UCe(){ls.call(this,`Tail`,3)}function WCe(){ls.call(this,`Head`,1)}function ru(e){AM(),IYe.call(this,e)}function iu(e){Np.call(this,e,e,e,e)}function au(e){e.c=V(WW,FP,1,0,5,1)}function GCe(e){return e.b&&yN(e),e.a}function KCe(e){return e.b&&yN(e),e.c}function qCe(e,t){_K||(e.b=t)}function JCe(e,t){return e[e.length]=t}function YCe(e,t){return e[e.length]=t}function XCe(e,t){return Ex(t,E_(e))}function ZCe(e,t){return Ex(t,E_(e))}function QCe(e,t){return yS(uh(e.d),t)}function $Ce(e,t){return yS(uh(e.g),t)}function ewe(e,t){return yS(uh(e.j),t)}function ou(e,t){Wd.call(this,e.b,t)}function twe(e,t){tb(Jv(e.a),IRe(t))}function nwe(e,t){tb(Ib(e.a),LRe(t))}function rwe(e,t,n){$l(n,n.i+e,n.j+t)}function iwe(e,t,n){Sh(e.c[t.g],t.g,n)}function awe(e,t,n){P(e.c,71).Gi(t,n)}function su(e,t,n){return Sh(e,t,n),n}function owe(e){Dx(e.Sf(),new Zfe(e))}function cu(e){return e==null?0:US(e)}function swe(e){return e==null?0:US(e)}function lu(e){xP(),Tr.call(this,e)}function cwe(e){this.a=e,xje.call(this,e)}function uu(){uu=C,r.Math.log(2)}function du(){du=C,s9=(Xbe(),mVt)}function lwe(){lwe=C,D2=new NE(p8)}function fu(){fu=C,new uwe,new T}function uwe(){new Dr,new Dr,new Dr}function dwe(){throw E(new Ri(_Tt))}function fwe(){throw E(new Ri(_Tt))}function pwe(){throw E(new Ri(vTt))}function mwe(){throw E(new Ri(vTt))}function pu(e){this.a=e,co.call(this,e)}function mu(e){this.a=e,co.call(this,e)}function hwe(e,t){gh(),this.a=e,this.b=t}function gwe(e,t){ph(t),bg(e).Jc(new m)}function hu(e,t){qp(e.c,e.c.length,t)}function gu(e){return e.at)}function ywe(e,t){return dT(e,t)>0?e:t}function vu(e,t,n){return{l:e,m:t,h:n}}function bwe(e,t){e.a!=null&&qSe(t,e.a)}function xwe(e){U_(e,null),K_(e,null)}function Swe(e,t,n){return Qh(e.g,n,t)}function yu(e,t,n){return AD(t,n,e.c)}function Cwe(e,t,n){return Qh(e.k,n,t)}function wwe(e,t,n){return kht(e,t,n),n}function Twe(e,t){return z_(),t.n.b+=e}function Ewe(e){r_.call(this),this.b=e}function Dwe(e){$De.call(this),this.a=e}function Owe(){ls.call(this,`Range`,2)}function bu(e){this.b=e,this.a=new T}function kwe(e){this.b=new jt,this.a=e}function Awe(e){e.a=new me,e.c=new me}function jwe(e){e.a=new Dr,e.d=new Dr}function Mwe(e){q_(e,null),J_(e,null)}function Nwe(e,t){return Nht(e.a,t,null)}function Pwe(e,t){return Qh(e.a,t.a,t)}function xu(e){return new k(e.a,e.b)}function Fwe(e){return new k(e.c,e.d)}function Iwe(e){return new k(e.c,e.d)}function Su(e,t){return xmt(e.c,e.b,t)}function j(e,t){return e!=null&&kO(e,t)}function Cu(e,t){return XXe(e.Kc(),t)!=-1}function wu(e){return e.Ob()?e.Pb():null}function Lwe(e){this.b=(Vg(),new Kn(e))}function Rwe(e){this.a=e,Dr.call(this)}function zwe(){ad.call(this,null,null)}function Bwe(){od.call(this,null,null)}function Vwe(){so.call(this,`INSTANCE`,0)}function Hwe(){i8e(),this.a=new Yj(CJ)}function Uwe(e){return ND(e,0,e.length)}function Wwe(e,t){return new PTe(e.Kc(),t)}function Gwe(e,t){return e.a.Bc(t)!=null}function Kwe(e,t){RN(e),e.Gc(P(t,15))}function qwe(e,t,n){e.c.bd(t,P(n,136))}function Jwe(e,t,n){e.c.Ui(t,P(n,136))}function Ywe(e,t){e.c&&(pMe(t),LLe(t))}function Xwe(e,t){e.q.setHours(t),dN(e,t)}function Zwe(e,t){Sd(t,e.a.a.a,e.a.a.b)}function Qwe(e,t,n,r){Sh(e.a[t.g],n.g,r)}function Tu(e,t,n){return e.a[t.g][n.g]}function $we(e,t){return e.e[t.c.p][t.p]}function eTe(e,t){return e.c[t.c.p][t.p]}function Eu(e,t){return e.a[t.c.p][t.p]}function tTe(e,t){return e.j[t.p]=Aat(t)}function Du(e,t){return e.a.Bc(t)!=null}function nTe(e,t){return D(N(t.a))<=e}function rTe(e,t){return D(N(t.a))>=e}function iTe(e,t){return zUe(e.f,t.Pg())}function Ou(e,t){return e.a*t.a+e.b*t.b}function aTe(e,t){return e.a0?t/(e*e):t*100}function SEe(e,t){return e>0?t*t/e:t*t*100}function xd(e,t){return P(ix(e.a,t),34)}function CEe(e,t){return wA(),fj(e,t.e,t)}function wEe(e,t,n){return zo(),n.Mg(e,t)}function TEe(e){return zx(),e.e.a+e.f.a/2}function EEe(e,t,n){return zx(),n.e.a-e*t}function DEe(e){return zx(),e.e.b+e.f.b/2}function OEe(e,t,n){return zx(),n.e.b-e*t}function kEe(e){e.d=new gEe(e),e.e=new Dr}function AEe(){this.a=new g_,this.b=new g_}function jEe(e){this.c=e,this.a=1,this.b=1}function MEe(e){dP(),lge(this),this.Ff(e)}function NEe(e,t,n){gb(),e.pf(t)&&n.Cd(e)}function PEe(e,t,n){return M(t,Y1e(e,n))}function Sd(e,t,n){return e.a+=t,e.b+=n,e}function FEe(e,t,n){return e.a*=t,e.b*=n,e}function IEe(e,t){return e.a=t.a,e.b=t.b,e}function Cd(e){return e.a=-e.a,e.b=-e.b,e}function wd(e,t,n){return e.a-=t,e.b-=n,e}function LEe(e){vo.call(this),_S(this,e)}function REe(){so.call(this,`GROW_TREE`,0)}function zEe(){so.call(this,`POLYOMINO`,0)}function Td(e,t,n){lb.call(this,e,t,n,2)}function BEe(e,t,n){WT(Jv(e.a),t,IRe(n))}function VEe(e,t){Yo(),ad.call(this,e,t)}function HEe(e,t){Xo(),od.call(this,e,t)}function UEe(e,t){Xo(),HEe.call(this,e,t)}function WEe(e,t){Xo(),od.call(this,e,t)}function GEe(e,t){return e.c.Fc(P(t,136))}function KEe(e,t,n){WT(Ib(e.a),t,LRe(n))}function qEe(e){this.c=e,Gx(e,0),Kx(e,0)}function Ed(e,t){du(),Bp.call(this,e,t)}function JEe(e,t){du(),Ed.call(this,e,t)}function YEe(e,t){du(),Ed.call(this,e,t)}function XEe(e,t){du(),Bp.call(this,e,t)}function ZEe(e,t){du(),YEe.call(this,e,t)}function QEe(e,t){du(),XEe.call(this,e,t)}function $Ee(e,t){du(),Bp.call(this,e,t)}function eDe(e,t,n){return t.zl(e.e,e.c,n)}function tDe(e,t,n){return t.Al(e.e,e.c,n)}function nDe(e,t,n){return jN(Lb(e,t),n)}function Dd(e,t){return pT(e.e,P(t,54))}function rDe(e){return e==null?null:Fgt(e)}function iDe(e){return e==null?null:G9e(e)}function aDe(e){return e==null?null:PE(e)}function oDe(e){return e==null?null:PE(e)}function Od(e){return bp(e==null||il(e)),e}function N(e){return bp(e==null||al(e)),e}function kd(e){return bp(e==null||rl(e)),e}function Ad(e){e.o??zit(e)}function sDe(e){if(!e)throw E(new Lr)}function cDe(e){if(!e)throw E(new Ir)}function jd(e){if(!e)throw E(new Hr)}function Md(e){if(!e)throw E(new Rr)}function lDe(e){if(!e)throw E(new Vr)}function Nd(){Nd=C,_7=new c_e,new l_e}function Pd(){Pd=C,y4=new yr(`root`)}function uDe(){EJe.call(this),this.Bb|=pI}function dDe(e,t){this.d=e,wfe(this),this.b=t}function fDe(e,t){Qy.call(this,e),this.a=t}function pDe(e,t){Qy.call(this,e),this.a=t}function mDe(e,t,n){Ry.call(this,e,t,n,null)}function hDe(e,t,n){Ry.call(this,e,t,n,null)}function Fd(e,t){this.c=e,io.call(this,e,t)}function Id(e,t){this.a=e,Fd.call(this,e,t)}function gDe(e){this.q=new r.Date(Dv(e))}function _De(e){return e>8?0:e+1}function vDe(e,t){_K||M(e.a,t)}function yDe(e,t){return Io(),jC(t.d.i,e)}function bDe(e,t){return cC(),new Ilt(t,e)}function xDe(e,t,n){return e.Ne(t,n)<=0?n:t}function SDe(e,t,n){return e.Ne(t,n)<=0?t:n}function CDe(e,t){return P(ix(e.b,t),143)}function wDe(e,t){return P(ix(e.c,t),233)}function Ld(e){return P(Ep(e.a,e.b),294)}function TDe(e){return new k(e.c,e.d+e.a)}function EDe(e){return Gh(e),e?1231:1237}function DDe(e){return z_(),RCe(P(e,203))}function Rd(){Rd=C,lq=sE((TD(),x5))}function ODe(e,t){t.a?Irt(e,t):Du(e.a,t.b)}function zd(e,t,n){++e.j,e.tj(),Xy(e,t,n)}function kDe(e,t,n){++e.j,e.qj(t,e.Zi(t,n))}function ADe(e,t,n){e.fd(t).Rb(n)}function jDe(e,t,n){return n=qM(e,t,6,n),n}function Bd(e,t,n){return n=qM(e,t,3,n),n}function Vd(e,t,n){return n=qM(e,t,9,n),n}function Hd(e,t){return c_(t,Iyt),e.f=t,e}function MDe(e,t){return(t&AP)%e.d.length}function NDe(e,t,n){return Xft(e.c,e.b,t,n)}function PDe(e,t){this.c=e,kx.call(this,t)}function FDe(e,t){this.a=e,Hhe.call(this,t)}function Ud(e,t){this.a=e,Hhe.call(this,t)}function Wd(e,t){yr.call(this,e),this.a=t}function IDe(e,t){Khe.call(this,e),this.a=t}function Gd(e,t){Khe.call(this,e),this.a=t}function LDe(e){iD.call(this,0,0),this.f=e}function RDe(e,t,n){return e.a+=ND(t,0,n),e}function Kd(e){return!e.a&&(e.a=new ee),e.a}function zDe(e,t){var n=e.e;return e.e=t,n}function BDe(e,t){var n=t;return!!e.Fe(n)}function VDe(e,t){return rd(),e==t?0:e?1:-1}function qd(e,t){e.a.bd(e.b,t),++e.b,e.c=-1}function Jd(e){e.b?Jd(e.b):e.f.c.zc(e.e,e.d)}function HDe(e){Pm(e.e),e.d.b=e.d,e.d.a=e.d}function UDe(e,t,n){wo(),jde(e,t.Ve(e.a,n))}function WDe(e,t,n){return zm(e,P(t,22),n)}function Yd(e,t){return ua(Array(t),e)}function GDe(e){return nm(um(e,32))^nm(e)}function Xd(e){return String.fromCharCode(e)}function KDe(e){return e==null?null:e.message}function qDe(e,t,n){return e.apply(t,n)}function JDe(e,t){e[TI].call(e,t)}function YDe(e,t){e[TI].call(e,t)}function XDe(e,t){return Io(),!jC(t.d.i,e)}function ZDe(e,t,n,r){Np.call(this,e,t,n,r)}function QDe(){Qd.call(this),this.a=new Fa}function $De(){this.n=new Fa,this.o=new Fa}function eOe(){this.b=new Fa,this.c=new T}function tOe(){this.a=new T,this.b=new T}function nOe(){this.a=new Vt,this.b=new Tge}function Zd(){this.b=new ry,this.a=new ry}function rOe(){this.b=new Jr,this.a=new Jr}function iOe(){this.b=new Dr,this.a=new Dr}function aOe(){this.b=new _ye,this.a=new iae}function oOe(){this.a=new Tue,this.b=new Ure}function sOe(){this.a=new T,this.d=new T}function Qd(){this.n=new ni,this.i=new Ul}function cOe(e){this.a=(vS(e,hF),new Hy(e))}function lOe(e){this.a=(vS(e,hF),new Hy(e))}function uOe(e){return e<100?null:new Pa(e)}function dOe(e,t){return e.n.a=(Gh(t),t+10)}function fOe(e,t){return e.n.a=(Gh(t),t+10)}function pOe(e,t){return t==e||Uk(zj(t),e)}function mOe(e,t){return Qh(e.a,t,``)==null}function hOe(e,t){return t.qi(e.a)}function $d(e,t){return e.a+=t.a,e.b+=t.b,e}function ef(e,t){return e.a-=t.a,e.b-=t.b,e}function gOe(e){return Wr(e.j.c,0),e.a=-1,e}function tf(e,t,n){return n=qM(e,t,11,n),n}function _Oe(e,t,n){n!=null&&TS(t,dk(e,n))}function vOe(e,t,n){n!=null&&ES(t,dk(e,n))}function nf(e,t,n,r){F.call(this,e,t,n,r)}function rf(e,t,n,r){F.call(this,e,t,n,r)}function yOe(e,t,n,r){rf.call(this,e,t,n,r)}function bOe(e,t,n,r){wm.call(this,e,t,n,r)}function af(e,t,n,r){wm.call(this,e,t,n,r)}function of(e,t,n,r){wm.call(this,e,t,n,r)}function xOe(e,t,n,r){af.call(this,e,t,n,r)}function sf(e,t,n,r){af.call(this,e,t,n,r)}function cf(e,t,n,r){of.call(this,e,t,n,r)}function SOe(e,t,n,r){sf.call(this,e,t,n,r)}function COe(e,t,n,r){dPe.call(this,e,t,n,r)}function lf(e,t){Mi.call(this,PU+e+bU+t)}function uf(e,t){return e.jk().wi().ri(e,t)}function df(e,t){return e.jk().wi().ti(e,t)}function wOe(e,t){return Gh(e),A(e)===A(t)}function ff(e,t){return Gh(e),A(e)===A(t)}function TOe(e,t){return e.b.Bd(new sxe(e,t))}function EOe(e,t){return e.b.Bd(new cxe(e,t))}function DOe(e,t){return e.b.Bd(new lxe(e,t))}function OOe(e,t){return e.e=P(e.d.Kb(t),159)}function pf(e,t,n){return e.lastIndexOf(t,n)}function kOe(e,t,n){return aE(e[t.a],e[n.a])}function AOe(e,t){return W(t,(mP(),d1),e)}function jOe(e,t){return _u(t.a.d.p,e.a.d.p)}function MOe(e,t){return _u(e.a.d.p,t.a.d.p)}function NOe(e,t){return aE(e.c-e.s,t.c-t.s)}function POe(e,t){return aE(e.b.e.a,t.b.e.a)}function FOe(e,t){return aE(e.c.e.a,t.c.e.a)}function IOe(e){return e.c?Ab(e.c.a,e,0):-1}function mf(e){return e==L8||e==z8||e==R8}function LOe(e,t){this.c=e,Hm.call(this,e,t)}function ROe(e,t,n){this.a=e,sEe.call(this,t,n)}function zOe(e){this.c=e,vl.call(this,tF,0)}function BOe(e,t,n){this.c=t,this.b=n,this.a=e}function hf(e){Rf(),this.d=e,this.a=new Iu}function VOe(e){wf(),this.a=(Vg(),new oa(e))}function HOe(e,t){ql(e.f)?Ait(e,t):f7e(e,t)}function UOe(e,t){kje.call(this,e,e.length,t)}function WOe(e,t){_K||t&&(e.d=t)}function GOe(e,t){return j(t,15)&&Mct(e.c,t)}function KOe(e,t,n){return P(e.c,71).Wk(t,n)}function gf(e,t,n){return P(e.c,71).Xk(t,n)}function qOe(e,t,n){return eDe(e,P(t,343),n)}function JOe(e,t,n){return tDe(e,P(t,343),n)}function YOe(e,t,n){return E5e(e,P(t,343),n)}function XOe(e,t,n){return A7e(e,P(t,343),n)}function _f(e,t){return t==null?null:TT(e.b,t)}function ZOe(e){return al(e)?(Gh(e),e):e.ue()}function vf(e){return!isNaN(e)&&!isFinite(e)}function yf(e){Awe(this),Fg(this),XS(this,e)}function bf(e){au(this),Fje(this.c,0,e.Pc())}function xf(e,t,n){this.a=e,this.b=t,this.c=n}function QOe(e,t,n){this.a=e,this.b=t,this.c=n}function $Oe(e,t,n){this.d=e,this.b=n,this.a=t}function eke(e){this.a=e,yo(),LC(Date.now())}function tke(e){Fh(e.a),KWe(e.c,e.b),e.b=null}function Sf(){Sf=C,aK=new he,oEt=new ge}function nke(){nke=C,TVt=V(WW,FP,1,0,5,1)}function rke(){rke=C,QVt=V(WW,FP,1,0,5,1)}function Cf(){Cf=C,$Vt=V(WW,FP,1,0,5,1)}function wf(){wf=C,new mge((Vg(),Vg(),QG))}function ike(e){return Sb(),iS((TGe(),dEt),e)}function ake(e){return Zw(),iS((MWe(),vEt),e)}function oke(e){return fO(),iS((wHe(),DEt),e)}function ske(e){return dx(),iS((THe(),OEt),e)}function cke(e){return vM(),iS((CXe(),kEt),e)}function lke(e){return Ix(),iS((AWe(),MEt),e)}function uke(e){return Cb(),iS((kWe(),PEt),e)}function dke(e){return Xb(),iS((jWe(),LEt),e)}function fke(e){return SP(),iS((uCe(),oDt),e)}function pke(e){return KC(),iS((DGe(),cDt),e)}function mke(e){return TO(),iS((kGe(),uDt),e)}function hke(e){return wO(),iS((OGe(),mDt),e)}function gke(e){return No(),iS((VBe(),hDt),e)}function _ke(e){return fx(),iS((EHe(),NDt),e)}function vke(e){return Yb(),iS((NWe(),aOt),e)}function yke(e){return vA(),iS((PKe(),lOt),e)}function bke(e){return ow(),iS((jGe(),hOt),e)}function xke(e){return YD(),iS((AGe(),xOt),e)}function Tf(e,t){if(!e)throw E(new Fi(t))}function Ef(e){if(!e)throw E(new Ii(Wvt))}function Df(e,t){if(e!=t)throw E(new Vr)}function Ske(e,t,n){this.a=e,this.b=t,this.c=n}function Of(e,t,n){this.a=e,this.b=t,this.c=n}function Cke(e,t,n){this.a=e,this.b=t,this.c=n}function kf(e,t,n){this.b=e,this.a=t,this.c=n}function Af(e,t,n){this.b=e,this.c=t,this.a=n}function jf(e,t,n){this.a=e,this.b=t,this.c=n}function Mf(e,t,n){this.e=t,this.b=e,this.d=n}function wke(e,t,n){this.b=e,this.a=t,this.c=n}function Tke(e,t,n){return wo(),e.a.Yd(t,n),t}function Nf(e){var t=new Ze;return t.e=e,t}function Pf(e){var t=new Hge;return t.b=e,t}function Ff(){Ff=C,oY=new vte,sY=new yte}function If(){If=C,ROt=new Kte,LOt=new qte}function Lf(){Lf=C,UOt=new tre,WOt=new nre}function Eke(e){return kS(),iS((uWe(),ekt),e)}function Dke(e){return yP(),iS((dCe(),NOt),e)}function Oke(e){return iw(),iS((NGe(),IOt),e)}function kke(e){return aw(),iS((MGe(),qOt),e)}function Ake(e){return tA(),iS((FKe(),YOt),e)}function jke(e){return dM(),iS((KYe(),tkt),e)}function Mke(e){return GA(),iS((Eqe(),nkt),e)}function Nke(e){return Ky(),iS((NHe(),rkt),e)}function Pke(e){return bS(),iS((cWe(),ikt),e)}function Fke(e){return lS(),iS((lWe(),akt),e)}function Ike(e){return FD(),iS((IKe(),okt),e)}function Lke(e){return px(),iS((kHe(),skt),e)}function Rke(e){return TA(),iS((kqe(),pkt),e)}function zke(e){return uM(),iS((gZe(),mkt),e)}function Bke(e){return qC(),iS((fWe(),hkt),e)}function Vke(e){return Zb(),iS((pWe(),_kt),e)}function Hke(e){return Bv(),iS((OHe(),vkt),e)}function Uke(e){return qk(),iS((Oqe(),fkt),e)}function Wke(e){return _w(),iS((dWe(),lkt),e)}function Gke(e){return kA(),iS((Dqe(),ukt),e)}function Kke(e){return wb(),iS((AHe(),dkt),e)}function qke(e){return XE(),iS((RKe(),ykt),e)}function Jke(e){return Zj(),iS((bXe(),MMt),e)}function Yke(e){return hT(),iS((mWe(),FMt),e)}function Xke(e){return IO(),iS((PGe(),IMt),e)}function Zke(e){return CO(),iS((LKe(),zMt),e)}function Qke(e){return FM(),iS((_Ze(),GMt),e)}function $ke(e){return ID(),iS((FGe(),JMt),e)}function eAe(e){return Qb(),iS((jHe(),XMt),e)}function tAe(e){return uS(),iS((_We(),QMt),e)}function nAe(e){return CC(),iS((hWe(),nNt),e)}function rAe(e){return Nw(),iS((gWe(),iNt),e)}function iAe(e){return Xw(),iS((vWe(),sNt),e)}function aAe(e){return cS(),iS((yWe(),dNt),e)}function oAe(e){return sw(),iS((bWe(),pNt),e)}function sAe(e){return sS(),iS((OWe(),jNt),e)}function cAe(e){return Vv(),iS((MHe(),RNt),e)}function lAe(e){return O_(),iS((IHe(),qNt),e)}function uAe(e){return k_(),iS((LHe(),YNt),e)}function dAe(e){return Wy(),iS((RHe(),dPt),e)}function fAe(e){return D_(),iS((zHe(),vPt),e)}function pAe(e){return Ok(),iS((YGe(),bPt),e)}function mAe(e){return LM(),iS((fCe(),NPt),e)}function hAe(e){return Pw(),iS((xWe(),IPt),e)}function gAe(e){return Jw(),iS((JGe(),TFt),e)}function _Ae(e){return iv(),iS((PHe(),OFt),e)}function vAe(e){return AS(),iS((FHe(),PFt),e)}function yAe(e){return iA(),iS((zKe(),IFt),e)}function bAe(e){return Yw(),iS((SWe(),UFt),e)}function xAe(e){return _b(),iS((BHe(),zFt),e)}function SAe(e){return uk(),iS((qGe(),wIt),e)}function CAe(e){return SC(),iS((CWe(),OIt),e)}function wAe(e){return ED(),iS((wWe(),AIt),e)}function TAe(e){return LO(),iS((TWe(),MIt),e)}function EAe(e){return TE(),iS((EWe(),RIt),e)}function DAe(e){return my(),iS((VHe(),xLt),e)}function OAe(e){return dC(),iS((DHe(),AOt),e)}function kAe(e){return DA(),iS((Aqe(),TOt),e)}function AAe(e){return Tb(),iS((DWe(),TLt),e)}function jAe(e){return JC(),iS((HHe(),kLt),e)}function MAe(e){return Wj(),iS((BKe(),MLt),e)}function NAe(e){return Bo(),iS((sVe(),FLt),e)}function PAe(e){return KT(),iS((FWe(),NLt),e)}function FAe(e){return Vo(),iS((cVe(),LLt),e)}function IAe(e){return Gy(),iS((UHe(),zLt),e)}function LAe(e){return MA(),iS((VKe(),WLt),e)}function RAe(e){return Ho(),iS((lVe(),SRt),e)}function zAe(e){return cw(),iS((WHe(),TRt),e)}function BAe(e){return uO(),iS((UKe(),FRt),e)}function VAe(e){return VA(),iS((WYe(),RRt),e)}function HAe(e){return RO(),iS((jqe(),HRt),e)}function UAe(e){return eA(),iS((Mqe(),ezt),e)}function WAe(e){return GT(),iS((HKe(),nBt),e)}function GAe(e){return Lx(),iS((IWe(),iBt),e)}function KAe(e){return wE(),iS((XGe(),aBt),e)}function qAe(e){return hA(),iS((Nqe(),fBt),e)}function JAe(e){return _T(),iS((PWe(),bBt),e)}function YAe(e){return kk(),iS((ZGe(),SBt),e)}function XAe(e){return Ej(),iS((SXe(),CBt),e)}function ZAe(e){return pO(),iS((WKe(),EBt),e)}function QAe(e){return rA(),iS((Pqe(),OBt),e)}function $Ae(e){return rj(),iS((Fqe(),kBt),e)}function eje(e){return nP(),iS((GKe(),ABt),e)}function tje(e){return TD(),iS((QGe(),IBt),e)}function nje(e){return UM(),iS((xXe(),RBt),e)}function rje(e){return gT(),iS((LWe(),VBt),e)}function ije(e,t){return Gh(e),e+(Gh(t),t)}function aje(e){return zf(),iS((GHe(),WBt),e)}function oje(e){return ZE(),iS(($Ge(),YBt),e)}function sje(e){return Mw(),iS((eKe(),tVt),e)}function Rf(){Rf=C,PNt=(nP(),g5),v2=X8}function zf(){zf=C,HBt=new AMe,UBt=new cPe}function cje(e){return!e.e&&(e.e=new T),e.e}function Bf(e,t){this.c=e,this.a=t,this.b=t-e}function lje(e,t,n){this.a=e,this.b=t,this.c=n}function Vf(e,t,n){this.a=e,this.b=t,this.c=n}function Hf(e,t,n){this.a=e,this.b=t,this.c=n}function Uf(e,t,n){this.a=e,this.b=t,this.c=n}function uje(e,t,n){this.a=e,this.b=t,this.c=n}function dje(e,t,n){this.a=e,this.b=t,this.c=n}function Wf(e,t,n){this.e=e,this.a=t,this.c=n}function fje(e,t,n){du(),ILe.call(this,e,t,n)}function Gf(e,t,n){du(),Ph.call(this,e,t,n)}function pje(e,t,n){du(),Ph.call(this,e,t,n)}function mje(e,t,n){du(),Ph.call(this,e,t,n)}function hje(e,t,n){du(),Gf.call(this,e,t,n)}function gje(e,t,n){du(),Gf.call(this,e,t,n)}function _je(e,t,n){du(),gje.call(this,e,t,n)}function vje(e,t,n){du(),pje.call(this,e,t,n)}function yje(e,t,n){du(),mje.call(this,e,t,n)}function Kf(e){Np.call(this,e.d,e.c,e.a,e.b)}function bje(e){Np.call(this,e.d,e.c,e.a,e.b)}function xje(e){this.d=e,wfe(this),this.b=FNe(e.d)}function Sje(e){return Sj(),iS((GYe(),bVt),e)}function qf(e,t){return ph(e),ph(t),new Hye(e,t)}function Jf(e,t){return ph(e),ph(t),new oMe(e,t)}function Cje(e,t){return ph(e),ph(t),new sMe(e,t)}function wje(e,t){return ph(e),ph(t),new Qye(e,t)}function Yf(e){return jd(e.b!=0),Ox(e,e.a.a)}function Tje(e){return jd(e.b!=0),Ox(e,e.c.b)}function Eje(e){return!e.c&&(e.c=new ln),e.c}function Xf(e){var t=new T;return rx(t,e),t}function Dje(e){var t=new Jr;return rx(t,e),t}function Oje(e){var t=new Nge;return HS(t,e),t}function Zf(e){var t=new vo;return HS(t,e),t}function P(e,t){return bp(e==null||kO(e,t)),e}function kje(e,t,n){WNe.call(this,t,n),this.a=e}function Aje(e,t){this.c=e,this.b=t,this.a=!1}function jje(){this.a=`;,;`,this.b=``,this.c=``}function Mje(e,t,n){this.b=e,aCe.call(this,t,n)}function Nje(e,t,n){this.c=e,ds.call(this,t,n)}function Pje(e,t,n){js.call(this,e,t),this.b=n}function Fje(e,t,n){art(n,0,e,t,n.length,!1)}function Qf(e,t,n,r,i){e.b=t,e.c=n,e.d=r,e.a=i}function Ije(e,t,n,r,i){e.d=t,e.c=n,e.a=r,e.b=i}function Lje(e,t){t&&(e.b=t,e.a=(Hh(t),t.a))}function $f(e,t){if(!e)throw E(new Fi(t))}function ep(e,t){if(!e)throw E(new Ii(t))}function Rje(e,t){if(!e)throw E(new ove(t))}function zje(e,t){return Ro(),_u(e.d.p,t.d.p)}function Bje(e,t){return zx(),aE(e.e.b,t.e.b)}function Vje(e,t){return zx(),aE(e.e.a,t.e.a)}function Hje(e,t){return _u(bMe(e.d),bMe(t.d))}function tp(e,t){return t&&Lh(e,t.d)?t:null}function Uje(e,t){return t==(nP(),g5)?e.c:e.d}function Wje(e){return MC(gPe(Il(e)?zC(e):e))}function Gje(e){return new k(e.c+e.b,e.d+e.a)}function Kje(e){return e!=null&&!zE(e,y7,b7)}function qje(e,t){return(R$e(e)<<4|R$e(t))&OF}function Jje(e,t,n,r,i){e.c=t,e.d=n,e.b=r,e.a=i}function Yje(e){var t=e.b;e.b=e.c,e.c=t}function Xje(e){var t,n=e.d;t=e.a,e.d=t,e.a=n}function Zje(e,t){var n=e.c;return PJe(e,t),n}function Qje(e,t){return e.g=t<0?-1:t,e}function np(e,t){return bqe(e),e.a*=t,e.b*=t,e}function $je(e,t,n){pqe.call(this,t,n),this.d=e}function rp(e,t,n){el.call(this,e,t),this.c=n}function ip(e,t,n){el.call(this,e,t),this.c=n}function eMe(e){Cf(),sn.call(this),this.ci(e)}function tMe(){By(),uFe.call(this,(qo(),N7))}function nMe(e){return xP(),++W9,new zp(0,e)}function rMe(){rMe=C,f9=(Vg(),new Gn(xW))}function ap(){ap=C,new FO((mi(),ZW),(pi(),XW))}function iMe(){iMe=C,OG=V(DG,X,17,256,0,1)}function aMe(){this.b=D(N(hO((XM(),eJ))))}function op(e){this.b=e,this.a=am(this.b.a).Od()}function oMe(e,t){this.b=e,this.a=t,dn.call(this)}function sMe(e,t){this.a=e,this.b=t,dn.call(this)}function cMe(e,t,n){this.a=e,El.call(this,t,n)}function lMe(e,t,n){this.a=e,El.call(this,t,n)}function sp(e,t,n){hx(e,t,new mh(n))}function uMe(e,t,n){var r=e[t];return e[t]=n,r}function cp(e){return yb(e.slice(),e)}function lp(e){var t=e.n;return e.a.b+t.d+t.a}function dMe(e){var t=e.n;return e.e.b+t.d+t.a}function fMe(e){var t=e.n;return e.e.a+t.b+t.c}function pMe(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function up(e,t){return iy(e,t,e.c.b,e.c),!0}function mMe(e){return e.a?e.a:xg(e)}function hMe(e){return Ug(),xA(e)==I_(SA(e))}function gMe(e){return Ug(),SA(e)==I_(xA(e))}function dp(e,t){return Bk(e,new js(t.a,t.b))}function _Me(e,t){return eg(),ik(e,t),new jFe(e,t)}function vMe(e,t){return e.c=t)throw E(new e_e)}function _m(e,t){return MT(e,(Gh(t),new jfe(t)))}function vm(e,t){return MT(e,(Gh(t),new Mfe(t)))}function XNe(e,t,n){return kvt(e,P(t,12),P(n,12))}function ZNe(e){return fC(),P(e,12).g.c.length!=0}function QNe(e){return fC(),P(e,12).e.c.length!=0}function $Ne(e,t){return cC(),aE(t.a.o.a,e.a.o.a)}function ePe(e,t){(t.Bb&GH)!=0&&!e.a.o&&(e.a.o=t)}function tPe(e,t){t.Ug(`General 'Rotator`,1),vgt(e)}function nPe(e,t,n){t.qf(n,D(N(xh(e.b,n)))*e.a)}function rPe(e,t,n){return fM(),_C(e,t)&&_C(e,n)}function ym(e){return rj(),!e.Hc(G8)&&!e.Hc(q8)}function iPe(e){return e.e?$Ue(e.e):null}function bm(e){return Il(e)?``+e:Ect(e)}function aPe(e){for(var t=e;t.f;)t=t.f;return t}function oPe(e,t,n){return Sh(t,0,Op(t[0],n[0])),t}function xm(e,t,n,r){var i=e.i;i.i=t,i.a=n,i.b=r}function F(e,t,n,r){ju.call(this,e,t,n),this.b=r}function Sm(e,t,n,r,i){ub.call(this,e,t,n,r,i,-1)}function Cm(e,t,n,r,i){db.call(this,e,t,n,r,i,-1)}function wm(e,t,n,r){rp.call(this,e,t,n),this.b=r}function sPe(e){zSe.call(this,e,!1),this.a=!1}function cPe(){vSe.call(this,`LOOKAHEAD_LAYOUT`,1)}function lPe(e){this.b=e,cd.call(this,e),CTe(this)}function uPe(e){this.b=e,ud.call(this,e),wTe(this)}function Tm(e,t,n){this.a=e,nf.call(this,t,n,5,6)}function dPe(e,t,n,r){this.b=e,ju.call(this,t,n,r)}function fPe(e,t){this.b=e,_de.call(this,e.b),this.a=t}function pPe(e){this.a=m4e(e.a),this.b=new bf(e.b)}function mPe(e,t){gh(),rbe.call(this,e,bT(new Wi(t)))}function Em(e,t){return xP(),++W9,new Nh(e,t,0)}function Dm(e,t){return xP(),++W9,new Nh(6,e,t)}function Om(e,t){for(Gh(t);e.Ob();)t.Cd(e.Pb())}function km(e,t){return rl(t)?e_(e,t):!!Kp(e.f,t)}function Am(e,t){return t.Vh()?pT(e.b,P(t,54)):t}function hPe(e,t){return ff(e.substr(0,t.length),t)}function jm(e){return new pm(new ATe(e.a.length,e.a))}function Mm(e){return new k(e.c+e.b/2,e.d+e.a/2)}function gPe(e){return vu(~e.l&QF,~e.m&QF,~e.h&$F)}function Nm(e){return typeof e===EP||typeof e===kP}function Pm(e){e.f=new PCe(e),e.i=new FCe(e),++e.g}function _Pe(e){if(!e)throw E(new Hr);return e.d}function Fm(e){var t=yw(e);return jd(t!=null),t}function vPe(e){var t=u1e(e);return jd(t!=null),t}function Im(e,t){var n=e.a.gc();return RUe(t,n),n-t}function Lm(e,t){return e.a.zc(t,e)==null}function Rm(e,t){return e.a.zc(t,(rd(),vG))==null}function yPe(e){return new Mp(null,OPe(e,e.length))}function bPe(e,t,n){return ypt(e,P(t,42),P(n,176))}function zm(e,t,n){return PS(e.a,t),uMe(e.b,t.g,n)}function xPe(e,t,n){gm(n,e.a.c.length),uy(e.a,n,t)}function I(e,t,n,r){TQe(t,n,e.length),SPe(e,t,n,r)}function SPe(e,t,n,r){var i;for(i=t;i0?r.Math.log(e/t):-100}function DPe(e,t){return dT(e,t)<0?-1:+(dT(e,t)>0)}function qm(e,t){Kwe(e,j(t,160)?t:P(t,2036).Rl())}function Jm(e,t){if(e==null)throw E(new Li(t))}function OPe(e,t){return gqe(t,e.length),new kMe(e,t)}function Ym(e,t){return t?XS(e,t):!1}function kPe(){return xi(),U(O(MTt,1),Z,549,0,[tG])}function Xm(e){return e.e==0?e:new Bm(-e.e,e.d,e.a)}function APe(e,t){return aE(e.c.c+e.c.b,t.c.c+t.c.b)}function Zm(e,t){iy(e.d,t,e.b.b,e.b),++e.a,e.c=null}function jPe(e,t){return e.c?jPe(e.c,t):M(e.b,t),e}function MPe(e,t,n){var r=ax(e,t);return Yv(e,t,n),r}function NPe(e,t,n){var r;for(r=0;r=e.g}function Sh(e,t,n){return cDe(n==null||mdt(e,n)),e[t]=n}function Ch(e,t){return sv(t,e.length+1),e.substr(t)}function wh(e,t){for(Gh(t);e.c=e?new _be:RJe(e-1)}function Bh(e){return!e.a&&e.c?e.c.b:e.a}function Vh(e){return j(e,616)?e:new KLe(e)}function Hh(e){e.c?Hh(e.c):(lE(e),e.d=!0)}function Uh(e){e.c?e.c.$e():(e.d=!0,bot(e))}function _Fe(e){e.b=!1,e.c=!1,e.d=!1,e.a=!1}function vFe(e){return e.c.i.c==e.d.i.c}function yFe(e,t){var n=e.Ih(t);n>=0?e.ki(n):Qtt(e,t)}function bFe(e,t){e.c<0||e.b.b0;)e=e<<1|e<0;return e}function BFe(e,t){var n=new Eh(e);return Mr(t.c,n),n}function VFe(e,t){e.u.Hc((rj(),G8))&&bnt(e,t),RWe(e,t)}function rg(e,t){return A(e)===A(t)||e!=null&&NT(e,t)}function ig(e,t){return Gp(e.a,t)?e.b[P(t,22).g]:null}function HFe(){return No(),U(O(Oq,1),Z,489,0,[Dq])}function UFe(){return Bo(),U(O(PLt,1),Z,490,0,[v3])}function WFe(){return Vo(),U(O(ILt,1),Z,558,0,[y3])}function GFe(){return Ho(),U(O(xRt,1),Z,539,0,[O3])}function ag(e){return!e.n&&(e.n=new F(Q5,e,1,7)),e.n}function og(e){return!e.c&&(e.c=new F(e7,e,9,9)),e.c}function sg(e){return!e.c&&(e.c=new cf(H5,e,5,8)),e.c}function KFe(e){return!e.b&&(e.b=new cf(H5,e,4,7)),e.b}function cg(e){return e.j.c.length=0,yg(e.c),gOe(e.a),e}function lg(e){return e.e==SW&&gfe(e,p2e(e.g,e.b)),e.e}function ug(e){return e.f==SW&&vfe(e,O6e(e.g,e.b)),e.f}function dg(e,t,n,r){return lXe(e,t,n,!1),LT(e,r),e}function qFe(e,t){this.b=e,Hm.call(this,e,t),CTe(this)}function JFe(e,t){this.b=e,LOe.call(this,e,t),wTe(this)}function fg(e){this.d=e,this.a=this.d.b,this.b=this.d.c}function pg(e,t){this.b=e,this.c=t,this.a=new _o(this.b)}function mg(e,t){return sv(t,e.length),e.charCodeAt(t)}function YFe(e,t){fE(e,D(nS(t,`x`)),D(nS(t,`y`)))}function XFe(e,t){fE(e,D(nS(t,`x`)),D(nS(t,`y`)))}function hg(e,t){return lE(e),new Mp(e,new UGe(t,e.a))}function gg(e,t){return lE(e),new Mp(e,new WUe(t,e.a))}function _g(e,t){return lE(e),new fDe(e,new HUe(t,e.a))}function vg(e,t){return lE(e),new pDe(e,new UUe(t,e.a))}function ZFe(e,t){return new VIe(P(ph(e),50),P(ph(t),50))}function QFe(e,t){return aE(e.d.c+e.d.b/2,t.d.c+t.d.b/2)}function $Fe(e,t,n){n.a?Kx(e,t.b-e.f/2):Gx(e,t.a-e.g/2)}function eIe(e,t){return aE(e.g.c+e.g.b/2,t.g.c+t.g.b/2)}function tIe(e,t){return Pbe(),aE((Gh(e),e),(Gh(t),t))}function nIe(e){return e!=null&&po(x7,e.toLowerCase())}function yg(e){var t;for(t=e.Kc();t.Ob();)t.Pb(),t.Qb()}function bg(e){var t=e.b;return!t&&(e.b=t=new lde(e)),t}function xg(e){return HJe(e)||null}function rIe(e,t){var n=e/t,r=C_(n);return n>r&&++r,r}function iIe(e,t,n){var r=P(e.d.Kb(n),159);r&&r.Nb(t)}function aIe(e,t,n){gpt(e.a,n),PXe(n),sit(e.b,n),Wpt(t,n)}function Sg(e,t,n,r){this.a=e,this.c=t,this.b=n,this.d=r}function Cg(e,t,n,r){this.c=e,this.b=t,this.a=n,this.d=r}function oIe(e,t,n,r){this.c=e,this.b=t,this.d=n,this.a=r}function wg(e,t,n,r){this.c=e,this.d=t,this.b=n,this.a=r}function sIe(e,t,n,r){this.a=e,this.d=t,this.c=n,this.b=r}function Tg(e,t,n,r){this.a=e,this.e=t,this.d=n,this.c=r}function cIe(e,t,n,r){this.a=e,this.c=t,this.d=n,this.b=r}function Eg(e,t,n){this.a=ryt,this.d=e,this.b=t,this.c=n}function Dg(e,t,n,r){so.call(this,e,t),this.a=n,this.b=r}function lIe(e,t){this.d=(Gh(e),e),this.a=16449,this.c=t}function uIe(e){this.a=new T,this.e=V(q9,X,53,e,0,2)}function dIe(e){e.Ug(`No crossing minimization`,1),e.Vg()}function fIe(){yi.call(this,`There is no more element.`)}function pIe(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r}function mIe(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r}function Og(e,t,n,r){this.e=e,this.a=t,this.c=n,this.d=r}function hIe(e,t,n,r){this.a=e,this.c=t,this.d=n,this.b=r}function gIe(e,t,n,r){du(),GUe.call(this,t,n,r),this.a=e}function _Ie(e,t,n,r){du(),GUe.call(this,t,n,r),this.a=e}function kg(e,t,n){var r=n_t(e);return t.ti(n,r)}function Ag(e){var t,n=(t=new kr,t);return Nx(n,e),n}function jg(e){var t,n=(t=new kr,t);return i9e(n,e),n}function vIe(e,t){return yC(t,xh(e.f,t)),null}function yIe(e){return!e.b&&(e.b=new F(U5,e,12,3)),e.b}function bIe(e){return bp(e==null||Nm(e)&&e.Tm!==ne),e}function Mg(e){return e.n&&(e.e!==eyt&&e.je(),e.j=null),e}function Ng(e){if(RE(e.d),e.d.d!=e.c)throw E(new Vr)}function Pg(e){return jd(e.b0&&d8e(this)}function xIe(e,t){this.a=e,dDe.call(this,e,P(e.d,15).fd(t))}function SIe(e,t){return aE(Lp(e)*Ip(e),Lp(t)*Ip(t))}function CIe(e,t){return aE(Lp(e)*Ip(e),Lp(t)*Ip(t))}function wIe(e){return uj(e)&&ki(Od(J(e,(mP(),A1))))}function TIe(e,t){return fj(e,P(K(t,(mP(),Y1)),17),t)}function EIe(e,t){return P(K(e,(Y(),PQ)),15).Fc(t),t}function Lg(e,t){return e.b=t.b,e.c=t.c,e.d=t.d,e.a=t.a,e}function DIe(e,t,n,r){this.b=e,this.c=r,vl.call(this,t,n)}function OIe(e,t,n){e.i=0,e.e=0,t!=n&&RZe(e,t,n)}function kIe(e,t,n){e.i=0,e.e=0,t!=n&&zZe(e,t,n)}function AIe(e,t,n){return Lo(),N1e(P(xh(e.e,t),529),n)}function Rg(e){var t;return t=e.f,t||(e.f=new io(e,e.c))}function jIe(e,t){return CT(e.j,t.s,t.c)+CT(t.e,e.s,e.c)}function MIe(e,t){e.e&&!e.e.a&&(Qhe(e.e,t),MIe(e.e,t))}function NIe(e,t){e.d&&!e.d.a&&(Qhe(e.d,t),NIe(e.d,t))}function PIe(e,t){return-aE(Lp(e)*Ip(e),Lp(t)*Ip(t))}function FIe(e){return P(e.ld(),149).Pg()+`:`+PE(e.md())}function IIe(){EA(this,new $ue),this.wb=(vh(),z7),Ra()}function LIe(e){this.b=new T,nw(this.b,this.b),this.a=e}function zg(e,t){new vo,this.a=new ai,this.b=e,this.c=t}function Bg(){Bg=C,nK=new ue,rK=new ue,iK=new de}function Vg(){Vg=C,QG=new ae,$G=new se,eK=new ce}function Hg(){Hg=C,wEt=new Ge,EEt=new yNe,TEt=new Ke}function Ug(){Ug=C,zq=new T,Rq=new Dr,Lq=new T}function Wg(e,t){if(e==null)throw E(new Li(t));return e}function Gg(e){return!e.a&&(e.a=new F($5,e,10,11)),e.a}function Kg(e){return!e.q&&(e.q=new F(M7,e,11,10)),e.q}function R(e){return!e.s&&(e.s=new F(w7,e,21,17)),e.s}function RIe(e){return ph(e),z4e(new pm(Vu(e.a.Kc(),new d)))}function zIe(e,t){return $w(e),$w(t),eve(P(e,22),P(t,22))}function qg(e,t,n){hx(e,t,new Cn(ZOe(n)))}function Jg(e,t,n,r,i,a){db.call(this,e,t,n,r,i,a?-2:-1)}function BIe(e,t,n,r){el.call(this,t,n),this.b=e,this.a=r}function VIe(e,t){F_e.call(this,new mm(e)),this.a=e,this.b=t}function Yg(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function HIe(e){Lf();var t=P(e.g,10);t.n.a=e.d.c+t.d.b}function Xg(){Xg=C;var e,t=!L0e();e=new b,lG=t?new y:e}function Zg(e){return Vg(),j(e,59)?new sa(e):new qu(e)}function Qg(e){return j(e,16)?new jp(P(e,16)):Dje(e.Kc())}function UIe(e){return new DTe(e,e.e.Rd().gc()*e.c.Rd().gc())}function WIe(e){return new OTe(e,e.e.Rd().gc()*e.c.Rd().gc())}function $g(e){return e&&e.hashCode?e.hashCode():td(e)}function e_(e,t){return t==null?!!Kp(e.f,null):dNe(e.i,t)}function GIe(e,t){var n=Gwe(e.a,t);return n&&(t.d=null),n}function KIe(e,t,n){return e.f?e.f.ef(t,n):!1}function t_(e,t,n,r){Sh(e.c[t.g],n.g,r),Sh(e.c[n.g],t.g,r)}function n_(e,t,n,r){Sh(e.c[t.g],t.g,n),Sh(e.b[t.g],t.g,r)}function qIe(e,t,n){return D(N(n.a))<=e&&D(N(n.b))>=t}function JIe(e,t){this.g=e,this.d=U(O(UJ,1),jR,10,0,[t])}function YIe(e){this.c=e,this.b=new Ja(P(ph(new qe),50))}function XIe(e){this.c=e,this.b=new Ja(P(ph(new dee),50))}function ZIe(e){this.b=e,this.a=new Ja(P(ph(new At),50))}function QIe(){this.b=new Jr,this.d=new vo,this.e=new $r}function r_(){this.c=new Fa,this.d=new Fa,this.e=new Fa}function i_(){this.a=new ai,this.b=(vS(3,hF),new Hy(3))}function a_(e,t){this.e=e,this.a=WW,this.b=glt(t),this.c=t}function o_(e){this.c=e.c,this.d=e.d,this.b=e.b,this.a=e.a}function $Ie(e,t,n,r,i,a){this.a=e,xS.call(this,t,n,r,i,a)}function eLe(e,t,n,r,i,a){this.a=e,xS.call(this,t,n,r,i,a)}function s_(e,t,n,r,i,a,o){return new ey(e.e,t,n,r,i,a,o)}function tLe(e,t,n){return n>=0&&ff(e.substr(n,t.length),t)}function nLe(e,t){return j(t,149)&&ff(e.b,P(t,149).Pg())}function rLe(e,t){return e.a?t.Gh().Kc():P(t.Gh(),71).Ii()}function iLe(e,t){var n=e.b.Qc(t);return bHe(n,e.b.gc()),n}function c_(e,t){if(e==null)throw E(new Li(t));return e}function l_(e){return e.u||=(_y(e),new FDe(e,e)),e.u}function u_(e){this.a=(Vg(),j(e,59)?new sa(e):new qu(e))}function d_(e){return P(NC(e,16),29)||e.ii()}function f_(e,t){var n=Ha(e.Rm);return t==null?n:n+`: `+t}function p_(e,t,n){return Zy(t,n,e.length),e.substr(t,n-t)}function aLe(e,t){Qd.call(this),Px(this),this.a=e,this.c=t}function oLe(e){!e||f_(e,e.ie())}function sLe(e){Qi(),r.setTimeout(function(){throw e},0)}function cLe(){return fO(),U(O(DK,1),Z,436,0,[EK,TK])}function lLe(){return dx(),U(O(AK,1),Z,435,0,[OK,kK])}function uLe(){return fx(),U(O(Uq,1),Z,432,0,[Vq,Hq])}function dLe(){return dC(),U(O(kOt,1),Z,517,0,[aY,iY])}function fLe(){return Bv(),U(O(lQ,1),Z,429,0,[sQ,cQ])}function pLe(){return px(),U(O(hZ,1),Z,428,0,[pZ,mZ])}function mLe(){return Ky(),U(O(QX,1),Z,431,0,[XX,ZX])}function hLe(){return Qb(),U(O(YMt,1),Z,430,0,[e2,t2])}function gLe(){return Vv(),U(O(LNt,1),Z,531,0,[b2,y2])}function _Le(){return AS(),U(O(NFt,1),Z,501,0,[b4,x4])}function vLe(){return O_(),U(O(KNt,1),Z,523,0,[w2,C2])}function yLe(){return k_(),U(O(JNt,1),Z,522,0,[T2,E2])}function bLe(){return Wy(),U(O(uPt,1),Z,528,0,[A2,k2])}function xLe(){return wb(),U(O(OZ,1),Z,488,0,[DZ,EZ])}function SLe(){return my(),U(O(bLt,1),Z,491,0,[s3,yLt])}function CLe(){return JC(),U(O(OLt,1),Z,492,0,[ELt,DLt])}function wLe(){return iv(),U(O(DFt,1),Z,433,0,[v4,EFt])}function TLe(){return _b(),U(O(RFt,1),Z,434,0,[LFt,D4])}function ELe(){return D_(),U(O(_Pt,1),Z,465,0,[j2,M2])}function DLe(){return Gy(),U(O(RLt,1),Z,438,0,[x3,b3])}function OLe(){return cw(),U(O(wRt,1),Z,437,0,[k3,CRt])}function kLe(){return zf(),U(O(P5,1),Z,347,0,[HBt,UBt])}function m_(e,t,n,r){return n>=0?e.Uh(t,n,r):e.Ch(null,n,r)}function h_(e){return e.b.b==0?e.a.sf():Yf(e.b)}function ALe(e){if(e.p!=5)throw E(new Rr);return nm(e.f)}function jLe(e){if(e.p!=5)throw E(new Rr);return nm(e.k)}function MLe(e){return A(e.a)===A((uC(),r9))&&bmt(e),e.a}function NLe(e,t){e.b=t,e.c>0&&e.b>0&&(e.g=Pp(e.c,e.b,e.a))}function PLe(e,t){e.c=t,e.c>0&&e.b>0&&(e.g=Pp(e.c,e.b,e.a))}function FLe(e,t){Qde(this,new k(e.a,e.b)),$de(this,Zf(t))}function g_(){I_e.call(this,new go(xx(12))),vTe(!0),this.a=2}function __(e,t,n){xP(),Tr.call(this,e),this.b=t,this.a=n}function ILe(e,t,n){du(),xr.call(this,t),this.a=e,this.b=n}function LLe(e){var t=e.c.d.b;e.b=t,e.a=e.c.d,t.a=e.c.d.b=e}function RLe(e){return e.b==0?null:(jd(e.b!=0),Ox(e,e.a.a))}function v_(e,t){return t==null?nl(Kp(e.f,null)):as(e.i,t)}function zLe(e,t,n,r,i){return new IA(e,(Sb(),fK),t,n,r,i)}function y_(e,t){return dHe(t),eJe(e,V(q9,HF,28,t,15,1),t)}function b_(e,t){return Wg(e,`set1`),Wg(t,`set2`),new ibe(e,t)}function BLe(e,t){return aG[e.charCodeAt(0)]??e}function VLe(e,t){var n=t,r=new ve;return Aht(e,n,r),r.d}function x_(e,t,n,r){var i=new QDe;t.a[n.g]=i,zm(e.b,r,i)}function HLe(e,t){return $d(Cd(Bqe(e.f,t)),e.f.d)}function S_(e){var t;xJe(e.a),owe(e.a),t=new ar(e.a),KE(t)}function ULe(e,t){Uct(e,!0),Dx(e.e.Rf(),new Af(e,!0,t))}function WLe(e,t){return Ug(),e==I_(xA(t))||e==I_(SA(t))}function GLe(e,t){return zx(),P(K(t,(rN(),p4)),17).a==e}function C_(e){return Math.max(Math.min(e,AP),-2147483648)|0}function KLe(e){this.a=P(ph(e),277),this.b=(Vg(),new UTe(e))}function qLe(e,t,n){this.i=new T,this.b=e,this.g=t,this.a=n}function JLe(e,t,n){this.a=new T,this.e=e,this.f=t,this.c=n}function w_(e,t,n){this.c=new T,this.e=e,this.f=t,this.b=n}function YLe(e){Qd.call(this),Px(this),this.a=e,this.c=!0}function XLe(e){function t(){}return t.prototype=e||{},new t}function ZLe(e){if(e.Ae())return null;var t=e.n;return UW[t]}function T_(e){return e.Db>>16==3?P(e.Cb,27):null}function E_(e){return e.Db>>16==9?P(e.Cb,27):null}function QLe(e){return e.Db>>16==6?P(e.Cb,74):null}function D_(){D_=C,j2=new rSe(cL,0),M2=new rSe(lL,1)}function O_(){O_=C,w2=new Uxe(lL,0),C2=new Uxe(cL,1)}function k_(){k_=C,T2=new Wxe(hL,0),E2=new Wxe(`UP`,1)}function $Le(){$Le=C,NTt=nT((xi(),U(O(MTt,1),Z,549,0,[tG])))}function eRe(e){var t=new qa(xx(e.length));return wZe(t,e),t}function tRe(e,t){return e.b+=t.b,e.c+=t.c,e.d+=t.d,e.a+=t.a,e}function nRe(e,t){return IXe(e,t)?(oJe(e),!0):!1}function A_(e,t){if(t==null)throw E(new zr);return K0e(e,t)}function j_(e,t){var n=e.q.getHours();e.q.setDate(t),dN(e,n)}function rRe(e,t,n){var r=e.Ih(t);r>=0?e.bi(r,n):Pat(e,t,n)}function iRe(e,t){var n=e.Ih(t);return n>=0?e.Wh(n):cj(e,t)}function aRe(e,t){var n;for(ph(t),n=e.a;n;n=n.c)t.Yd(n.g,n.i)}function M_(e,t,n){e.b=new VS(kZe(e,t,n).c.length)}function N_(e,t,n){R_(),e&&Qh(p7,e,t),e&&Qh(f7,e,n)}function oRe(e,t){return If(),rd(),P(t.a,17).a0}function lRe(e){var t=e.d;return t=e.bj(e.f),tb(e,t),t.Ob()}function uRe(e,t){var n=new Ap(t);return L7e(n,e),new bf(n)}function dRe(e){if(e.p!=0)throw E(new Rr);return cl(e.f,0)}function fRe(e){if(e.p!=0)throw E(new Rr);return cl(e.k,0)}function pRe(e){return e.Db>>16==7?P(e.Cb,241):null}function F_(e){return e.Db>>16==6?P(e.Cb,241):null}function mRe(e){return e.Db>>16==7?P(e.Cb,167):null}function I_(e){return e.Db>>16==11?P(e.Cb,27):null}function L_(e){return e.Db>>16==17?P(e.Cb,29):null}function hRe(e){return e.Db>>16==3?P(e.Cb,155):null}function gRe(e){var t;return lE(e),t=new Jr,hg(e,new Wfe(t))}function _Re(e,t){var n=e.a=e.a||[];return n[t]||(n[t]=e.ve(t))}function vRe(e,t){var n=e.q.getHours();e.q.setMonth(t),dN(e,n)}function yRe(e,t){Fu(this),this.f=t,this.g=e,Mg(this),this.je()}function bRe(e,t){this.a=e,this.c=xu(this.a),this.b=new o_(t)}function xRe(e,t,n){this.a=t,this.c=e,this.b=(ph(n),new bf(n))}function SRe(e,t,n){this.a=t,this.c=e,this.b=(ph(n),new bf(n))}function CRe(e){this.a=e,this.b=V(MNt,X,2043,e.e.length,0,2)}function wRe(){this.a=new Rl,this.e=new Jr,this.g=0,this.i=0}function R_(){R_=C,p7=new Dr,f7=new Dr,USe(tEt,new Ise)}function TRe(){TRe=C,mNt=tm(new Zh,(vA(),SJ),(yP(),nX))}function ERe(){ERe=C,hNt=tm(new Zh,(vA(),SJ),(yP(),nX))}function DRe(){DRe=C,_Nt=tm(new Zh,(vA(),SJ),(yP(),nX))}function ORe(){ORe=C,zNt=vp(new Zh,(vA(),SJ),(yP(),OY))}function z_(){z_=C,HNt=vp(new Zh,(vA(),SJ),(yP(),OY))}function kRe(){kRe=C,GNt=vp(new Zh,(vA(),SJ),(yP(),OY))}function B_(){B_=C,XNt=vp(new Zh,(vA(),SJ),(yP(),OY))}function V_(e,t,n,r,i,a){return new Hb(e.e,t,e.Lj(),n,r,i,a)}function H_(e,t,n){return t==null?XA(e.f,null,n):uE(e.i,t,n)}function U_(e,t){e.c&&Db(e.c.g,e),e.c=t,e.c&&M(e.c.g,e)}function W_(e,t){e.c&&Db(e.c.a,e),e.c=t,e.c&&M(e.c.a,e)}function G_(e,t){e.i&&Db(e.i.j,e),e.i=t,e.i&&M(e.i.j,e)}function K_(e,t){e.d&&Db(e.d.e,e),e.d=t,e.d&&M(e.d.e,e)}function q_(e,t){e.a&&Db(e.a.k,e),e.a=t,e.a&&M(e.a.k,e)}function J_(e,t){e.b&&Db(e.b.f,e),e.b=t,e.b&&M(e.b.f,e)}function ARe(e,t){rFe(e,e.b,e.c),P(e.b.b,68),t&&P(t.b,68).b}function jRe(e,t){return aE(P(e.c,65).c.e.b,P(t.c,65).c.e.b)}function MRe(e,t){return aE(P(e.c,65).c.e.a,P(t.c,65).c.e.a)}function NRe(e){return Qw(),rd(),P(e.a,86).d.e!=0}function Y_(e,t){j(e.Cb,184)&&(P(e.Cb,184).tb=null),GS(e,t)}function X_(e,t){j(e.Cb,90)&&$A(_y(P(e.Cb,90)),4),GS(e,t)}function PRe(e,t){hE(e,t),j(e.Cb,90)&&$A(_y(P(e.Cb,90)),2)}function FRe(e,t){t.c!=null&&Dh(e,new mh(t.c))}function IRe(e){var t,n=(Ra(),t=new kr,t);return Nx(n,e),n}function LRe(e){var t,n=(Ra(),t=new kr,t);return Nx(n,e),n}function RRe(e){for(var t;;)if(t=e.Pb(),!e.Ob())return t}function zRe(e,t,n){return M(e.a,(eg(),ik(t,n),new oo(t,n))),e}function Z_(e,t){return Qo(),ex(t)?new hp(t,e):new Qc(t,e)}function Q_(e){return AM(),dT(e,0)>=0?yD(e):Xm(yD(kb(e)))}function BRe(e){var t=P(cp(e.b),9);return new xf(e.a,t,e.c)}function VRe(e,t){var n=P(TT(Rg(e.a),t),16);return n?n.gc():0}function HRe(e,t,n){var r;I$e(t,n,e.c.length),r=n-t,wye(e.c,t,r)}function $_(e,t,n){I$e(t,n,e.gc()),this.c=e,this.a=t,this.b=n-t}function ev(e){this.c=new vo,this.b=e.b,this.d=e.c,this.a=e.a}function tv(e){this.a=r.Math.cos(e),this.b=r.Math.sin(e)}function nv(e,t,n,r){this.c=e,this.d=r,q_(this,t),J_(this,n)}function URe(e,t){P_e.call(this,new go(xx(e))),vS(t,Jvt),this.a=t}function WRe(e,t,n){return new IA(e,(Sb(),dK),null,!1,t,n)}function GRe(e,t,n){return new IA(e,(Sb(),pK),t,n,null,!1)}function KRe(){return Zw(),U(O(xK,1),Z,108,0,[vK,yK,bK])}function qRe(){return Xb(),U(O(IEt,1),Z,472,0,[sq,oq,aq])}function JRe(){return Cb(),U(O(NEt,1),Z,471,0,[rq,nq,iq])}function YRe(){return Ix(),U(O($K,1),Z,237,0,[XK,ZK,QK])}function XRe(){return Yb(),U(O(_J,1),Z,391,0,[hJ,mJ,gJ])}function ZRe(){return kS(),U(O(MX,1),Z,372,0,[jX,AX,kX])}function QRe(){return bS(),U(O(nZ,1),Z,322,0,[eZ,$X,tZ])}function $Re(){return lS(),U(O(oZ,1),Z,351,0,[rZ,aZ,iZ])}function eze(){return _w(),U(O(ckt,1),Z,460,0,[_Z,gZ,vZ])}function tze(){return qC(),U(O(rQ,1),Z,299,0,[tQ,nQ,eQ])}function nze(){return Zb(),U(O(gkt,1),Z,311,0,[aQ,oQ,iQ])}function rze(){return hT(),U(O(PMt,1),Z,390,0,[P0,NMt,F0])}function ize(){return uS(),U(O(ZMt,1),Z,463,0,[i2,n2,r2])}function aze(){return CC(),U(O(tNt,1),Z,387,0,[$Mt,a2,eNt])}function oze(){return Nw(),U(O(rNt,1),Z,349,0,[c2,o2,s2])}function sze(){return Xw(),U(O(oNt,1),Z,350,0,[l2,aNt,u2])}function cze(){return cS(),U(O(uNt,1),Z,352,0,[lNt,d2,cNt])}function lze(){return sw(),U(O(fNt,1),Z,388,0,[p2,m2,f2])}function uze(){return sS(),U(O(ANt,1),Z,464,0,[h2,g2,_2])}function rv(e){return Sw(U(O(K3,1),X,8,0,[e.i.n,e.n,e.a]))}function dze(){return Pw(),U(O(FPt,1),Z,392,0,[PPt,B2,z2])}function fze(){fze=C,kFt=tm(new Zh,(Ok(),F2),(LM(),CPt))}function iv(){iv=C,v4=new iSe(`DFS`,0),EFt=new iSe(`BFS`,1)}function pze(e,t,n){var r=new zie;r.b=t,r.a=n,++t.b,M(e.d,r)}function mze(e,t,n){var r=new Vl(n.d);$d(r,e),fE(t,r.a,r.b)}function hze(e,t){cTe(e,nm(uv(lm(t,24),jI)),nm(uv(t,jI)))}function av(e,t){if(e<0||e>t)throw E(new Mi(HI+e+UI+t))}function ov(e,t){if(e<0||e>=t)throw E(new Mi(HI+e+UI+t))}function sv(e,t){if(e<0||e>=t)throw E(new ra(HI+e+UI+t))}function cv(e,t){this.b=(Gh(e),e),this.a=(t&uI)==0?t|64|ZP:t}function gze(e){var t;return lE(e),t=(Bg(),Bg(),rK),Cx(e,t)}function _ze(e,t,n){var r=vN(e,t,!1);return r.b<=t&&r.a<=n}function vze(){return Tb(),U(O(wLt,1),Z,439,0,[c3,CLt,SLt])}function yze(){return TE(),U(O(LIt,1),Z,394,0,[IIt,Q4,FIt])}function bze(){return ED(),U(O(kIt,1),Z,445,0,[L4,R4,z4])}function xze(){return LO(),U(O(jIt,1),Z,456,0,[B4,H4,V4])}function Sze(){return Yw(),U(O(HFt,1),Z,393,0,[O4,BFt,VFt])}function Cze(){return SC(),U(O(DIt,1),Z,300,0,[I4,EIt,TIt])}function wze(){return _T(),U(O(yBt,1),Z,346,0,[_8,g8,v8])}function Tze(){return KT(),U(O(_3,1),Z,444,0,[m3,h3,g3])}function Eze(){return Lx(),U(O(rBt,1),Z,278,0,[o8,s8,c8])}function Dze(){return gT(),U(O(BBt,1),Z,280,0,[zBt,M5,N5])}function lv(e){return ph(e),j(e,16)?new bf(P(e,16)):Xf(e.Kc())}function Oze(e,t){return e&&e.equals?e.equals(t):A(e)===A(t)}function uv(e,t){return MC(BNe(Il(e)?zC(e):e,Il(t)?zC(t):t))}function dv(e,t){return MC(VNe(Il(e)?zC(e):e,Il(t)?zC(t):t))}function fv(e,t){return MC(HNe(Il(e)?zC(e):e,Il(t)?zC(t):t))}function kze(e,t){var n=(Gh(e),e).g;return sDe(!!n),Gh(t),n(t)}function Aze(e,t){var n,r=Im(e,t);return n=e.a.fd(r),new tbe(e,n)}function jze(e){return e.Db>>16==6?P(xj(e),241):null}function Mze(e){if(e.p!=2)throw E(new Rr);return nm(e.f)&OF}function Nze(e){if(e.p!=2)throw E(new Rr);return nm(e.k)&OF}function z(e){return jd(e.ar)}function Yze(e,t){var n=jb(t);return P(xh(e.c,n),17).a}function gv(e,t,n){var r=e.d[t.p];e.d[t.p]=e.d[n.p],e.d[n.p]=r}function Xze(e,t,n){var r;e.n&&t&&n&&(r=new Ese,M(e.e,r))}function _v(e,t){if(Lm(e.a,t),t.d)throw E(new yi(xyt));t.d=e}function Zze(e,t){this.a=new T,this.d=new T,this.f=e,this.c=t}function Qze(){this.c=new Hwe,this.a=new JUe,this.b=new Kge,Fbe()}function $ze(){lw(),this.b=new Dr,this.a=new Dr,this.c=new T}function eBe(e,t,n){this.d=e,this.j=t,this.e=n,this.o=-1,this.p=3}function tBe(e,t,n){this.d=e,this.k=t,this.f=n,this.o=-1,this.p=5}function nBe(e,t,n,r,i,a){Gqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function rBe(e,t,n,r,i,a){Kqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function iBe(e,t,n,r,i,a){vUe.call(this,e,t,n,r,i),a&&(this.o=-2)}function aBe(e,t,n,r,i,a){Yqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function oBe(e,t,n,r,i,a){yUe.call(this,e,t,n,r,i),a&&(this.o=-2)}function sBe(e,t,n,r,i,a){qqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function cBe(e,t,n,r,i,a){Jqe.call(this,e,t,n,r,i),a&&(this.o=-2)}function lBe(e,t,n,r,i,a){bUe.call(this,e,t,n,r,i),a&&(this.o=-2)}function uBe(e,t,n,r){xr.call(this,n),this.b=e,this.c=t,this.d=r}function dBe(e,t){this.f=e,this.a=(By(),u9),this.c=u9,this.b=t}function fBe(e,t){this.g=e,this.d=(By(),d9),this.a=d9,this.b=t}function pBe(e,t){!e.c&&(e.c=new DC(e,0)),ON(e.c,(UN(),w9),t)}function mBe(e,t){return Wit(e,t,j(t,102)&&(P(t,19).Bb&pI)!=0)}function hBe(e,t){return DPe(LC(e.q.getTime()),LC(t.q.getTime()))}function gBe(e){return yp(e.e.Rd().gc()*e.c.Rd().gc(),16,new ode(e))}function _Be(e){return!!e.u&&Jv(e.u.a).i!=0&&!(e.n&&QO(e.n))}function vBe(e){return!!e.a&&Ib(e.a.a).i!=0&&!(e.b&&$O(e.b))}function yBe(e,t){return t==0?!!e.o&&e.o.f!=0:mO(e,t)}function bBe(e,t,n){var r=P(e.Zb().xc(t),16);return!!r&&r.Hc(n)}function xBe(e,t,n){var r=P(e.Zb().xc(t),16);return!!r&&r.Mc(n)}function SBe(e,t){var n=1-t;return e.a[n]=FS(e.a[n],n),FS(e,t)}function CBe(e,t){var n,r=uv(e,_I);return n=cm(t,32),dv(n,r)}function wBe(e,t,n){Z3e(new xRe((ph(e),new bf(e)),t,n))}function vv(e,t,n){Q3e(new SRe((ph(e),new bf(e)),t,n))}function yv(e,t,n,r,i,a){return lXe(e,t,n,a),IT(e,r),zT(e,i),e}function TBe(e,t,n,r){return e.a+=``+p_(t==null?IP:PE(t),n,r),e}function bv(e,t){this.a=e,qn.call(this,e),av(t,e.gc()),this.b=t}function EBe(e){this.a=V(WW,FP,1,dZe(r.Math.max(8,e))<<1,5,1)}function xv(e){return P(rO(e,V(UJ,jR,10,e.c.length,0,1)),199)}function Sv(e){return P(rO(e,V(VJ,AR,18,e.c.length,0,1)),483)}function DBe(e){return e.a?e.e.length==0?e.a.a:e.a.a+(``+e.e):e.c}function Cv(e){for(;e.d>0&&e.a[--e.d]==0;);e.a[e.d++]==0&&(e.e=0)}function OBe(e){return jd(e.b.b!=e.d.a),e.c=e.b=e.b.b,--e.a,e.c.c}function kBe(e,t,n){e.a=t,e.c=n,e.b.a.$b(),Fg(e.d),Wr(e.e.a.c,0)}function ABe(e,t){var n;e.e=new D_e,n=sM(t),hu(n,e.c),pct(e,n,0)}function wv(e,t,n,r){var i=new Koe;i.a=t,i.b=n,i.c=r,up(e.a,i)}function B(e,t,n,r){var i=new Koe;i.a=t,i.b=n,i.c=r,up(e.b,i)}function jBe(e,t,n){if(e<0||tn)throw E(new Mi(yet(e,t,n)))}function Tv(e,t){if(e<0||e>=t)throw E(new Mi(jtt(e,t)));return e}function MBe(e){if(!(`stack`in e))try{throw e}catch{}return e}function Ev(e){return Lo(),j(e.g,10)?P(e.g,10):null}function NBe(e){return!bg(e).dc()&&(gwe(e,new h),!0)}function Dv(e){var t;return Il(e)?(t=e,t==-0?0:t):lKe(e)}function PBe(e,t){return j(t,44)?lk(e.a,P(t,44)):!1}function FBe(e,t){return j(t,44)?lk(e.a,P(t,44)):!1}function IBe(e,t){return j(t,44)?lk(e.a,P(t,44)):!1}function LBe(e){var t;return Hh(e),t=new fe,Qa(e.a,new Vfe(t)),t}function RBe(){var e,t=(n=(e=new kr,e),n),n;return M(fHt,t),t}function Ov(e){var t;return Hh(e),t=new pe,Qa(e.a,new Hfe(t)),t}function zBe(e,t){return e.a<=e.b&&(t.Dd(e.a++),!0)}function BBe(e){rC.call(this,e,(Sb(),uK),null,!1,null,!1)}function VBe(){VBe=C,hDt=nT((No(),U(O(Oq,1),Z,489,0,[Dq])))}function HBe(){HBe=C,wNt=LFe(G(1),G(4)),CNt=LFe(G(1),G(2))}function UBe(e,t){return new Vf(t,wd(xu(t.e),e,e),(rd(),!0))}function kv(e){return new Hy((vS(e,_F),bx(yE(yE(5,e),e/10|0))))}function WBe(e){return yp(e.e.Rd().gc()*e.c.Rd().gc(),273,new ade(e))}function GBe(e){return P(rO(e,V(EOt,Sbt,12,e.c.length,0,1)),2042)}function KBe(e){return z_(),!gy(e)&&!(!gy(e)&&e.c.i.c==e.d.i.c)}function qBe(e,t){return Rx(),P(K(t,(rN(),u4)),17).a>=e.gc()}function Av(e,t){L_t(t,e),Yje(e.d),Yje(P(K(e,(mP(),L1)),214))}function jv(e,t){R_t(t,e),Xje(e.d),Xje(P(K(e,(mP(),L1)),214))}function JBe(e,t,n){e.d&&Db(e.d.e,e),e.d=t,e.d&&Jp(e.d.e,n,e)}function YBe(e,t,n){return n.f.c.length>0?bPe(e.a,t,n):bPe(e.b,t,n)}function XBe(e,t,n){var r=b2e();try{return qDe(e,t,n)}finally{CHe(r)}}function Mv(e,t){var n=A_(e,t),r=null;return n&&(r=n.pe()),r}function Nv(e,t){var n=A_(e,t),r=null;return n&&(r=n.se()),r}function Pv(e,t){var n=ax(e,t),r=null;return n&&(r=n.se()),r}function Fv(e,t){var n=A_(e,t),r=null;return n&&(r=ket(n)),r}function ZBe(e,t,n){var r=RD(n);return PM(e.g,r,t),PM(e.i,t,n),t}function QBe(e,t,n){this.d=new nme(this),this.e=e,this.i=t,this.f=n}function $Be(e,t,n,r){this.e=null,this.c=e,this.d=t,this.a=n,this.b=r}function eVe(e,t,n,r){jwe(this),this.c=e,this.e=t,this.f=n,this.b=r}function tVe(e,t,n,r){this.d=e,this.n=t,this.g=n,this.o=r,this.p=-1}function nVe(e,t,n,r){return j(n,59)?new lEe(e,t,n,r):new qNe(e,t,n,r)}function Iv(e){return j(e,16)?P(e,16).dc():!e.Kc().Ob()}function rVe(e){if(e.e.g!=e.b)throw E(new Vr);return!!e.c&&e.d>0}function Lv(e){return jd(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function iVe(e,t){Gh(t),Sh(e.a,e.c,t),e.c=e.c+1&e.a.length-1,L3e(e)}function Rv(e,t){Gh(t),e.b=e.b-1&e.a.length-1,Sh(e.a,e.b,t),L3e(e)}function aVe(e){var t=e.Gh();this.a=j(t,71)?P(t,71).Ii():t.Kc()}function oVe(e){return new cv(wqe(P(e.a.md(),16).gc(),e.a.ld()),16)}function sVe(){sVe=C,FLt=nT((Bo(),U(O(PLt,1),Z,490,0,[v3])))}function cVe(){cVe=C,LLt=nT((Vo(),U(O(ILt,1),Z,558,0,[y3])))}function lVe(){lVe=C,SRt=nT((Ho(),U(O(xRt,1),Z,539,0,[O3])))}function uVe(){return YD(),U(O(zJ,1),Z,389,0,[RJ,IJ,FJ,LJ])}function dVe(){return Sb(),U(O(mK,1),Z,304,0,[uK,dK,fK,pK])}function fVe(){return TO(),U(O(lDt,1),Z,332,0,[gq,hq,_q,vq])}function pVe(){return wO(),U(O(pDt,1),Z,406,0,[wq,Cq,Tq,Eq])}function mVe(){return KC(),U(O(sDt,1),Z,417,0,[mq,dq,fq,pq])}function hVe(){return ow(),U(O(mOt,1),Z,416,0,[kJ,MJ,AJ,jJ])}function gVe(){return aw(),U(O(KOt,1),Z,421,0,[bX,xX,SX,CX])}function _Ve(){return iw(),U(O(FOt,1),Z,371,0,[gX,mX,hX,pX])}function vVe(){return IO(),U(O(B0,1),Z,203,0,[R0,z0,L0,I0])}function yVe(){return ID(),U(O(qMt,1),Z,284,0,[Z0,KMt,Q0,$0])}function bVe(e){var t;return e.j==(nP(),m5)&&(t=krt(e),$u(t,X8))}function xVe(e,t){var n=t.a;U_(n,t.c.d),K_(n,t.d.d),vC(n.a,e.n)}function SVe(e,t){var n=P(ix(e.b,t),67);return!n&&(n=new vo),n}function zv(e){return Lo(),j(e.g,154)?P(e.g,154):null}function CVe(e){e.a=null,e.e=null,Wr(e.b.c,0),Wr(e.f.c,0),e.c=null}function Bv(){Bv=C,sQ=new Js(sL,0),cQ=new Js(`TOP_LEFT`,1)}function Vv(){Vv=C,b2=new zxe(`UPPER`,0),y2=new zxe(`LOWER`,1)}function wVe(e,t){return Ou(new k(t.e.a+t.f.a/2,t.e.b+t.f.b/2),e)}function TVe(e,t){return P(Ju(_m(P(Dy(e.k,t),15).Oc(),HX)),113)}function EVe(e,t){return P(Ju(vm(P(Dy(e.k,t),15).Oc(),HX)),113)}function DVe(){return Ok(),U(O(yPt,1),Z,405,0,[N2,P2,F2,I2])}function OVe(){return Jw(),U(O(wFt,1),Z,353,0,[_4,h4,g4,m4])}function kVe(){return uk(),U(O(CIt,1),Z,354,0,[F4,xIt,SIt,bIt])}function AVe(){return TD(),U(O(S5,1),Z,386,0,[b5,x5,y5,v5])}function jVe(){return kk(),U(O(xBt,1),Z,291,0,[S8,y8,b8,x8])}function MVe(){return wE(),U(O(p8,1),Z,223,0,[f8,u8,l8,d8])}function NVe(){return ZE(),U(O(JBt,1),Z,320,0,[F5,GBt,qBt,KBt])}function PVe(){return Mw(),U(O(eVt,1),Z,415,0,[I5,QBt,ZBt,$Bt])}function FVe(e){return R_(),km(p7,e)?P(xh(p7,e),341).Qg():null}function Hv(e,t,n){return t<0?cj(e,n):P(n,69).wk().Bk(e,e.hi(),t)}function IVe(e,t,n){var r=RD(n);return PM(e.j,r,t),Qh(e.k,t,n),t}function LVe(e,t,n){var r=RD(n);return PM(e.d,r,t),Qh(e.e,t,n),t}function RVe(e){var t=(Ia(),n=new nn,n),n;return e&&Hj(t,e),t}function zVe(e){var t=e.aj(e.i);return e.i>0&&tN(e.g,0,t,0,e.i),t}function BVe(e,t){var n;for(n=e.j.c.length;n>24}function WVe(e){if(e.p!=1)throw E(new Rr);return nm(e.k)<<24>>24}function GVe(e){if(e.p!=7)throw E(new Rr);return nm(e.k)<<16>>16}function KVe(e){if(e.p!=7)throw E(new Rr);return nm(e.f)<<16>>16}function Uv(e,t){return t.e==0||e.e==0?JG:(pM(),Xj(e,t))}function qVe(e,t){return A(t)===A(e)?`(this Map)`:t==null?IP:PE(t)}function JVe(e,t,n){return dm(N(nl(Kp(e.f,t))),N(nl(Kp(e.f,n))))}function YVe(e,t,n){var r=P(xh(e.g,n),60);M(e.a.c,new Kc(t,r))}function XVe(e,t,n){e.i=0,e.e=0,t!=n&&(zZe(e,t,n),RZe(e,t,n))}function ZVe(e,t,n,r,i){M(t,vtt(i,mat(i,n,r))),p9e(e,i,t)}function QVe(e,t,n,r,i){this.i=e,this.a=t,this.e=n,this.j=r,this.f=i}function $Ve(e,t){r_.call(this),this.a=e,this.b=t,M(this.a.b,this)}function eHe(e){this.b=new Dr,this.c=new Dr,this.d=new Dr,this.a=e}function tHe(e,t){var n=new na;return e.Gd(n),n.a+=`..`,t.Hd(n),n.a}function nHe(e,t){for(var n=t;n;)Sd(e,n.i,n.j),n=I_(n);return e}function rHe(e,t,n){var r=RD(n);return Qh(e.b,r,t),Qh(e.c,t,n),t}function Wv(e){for(var t=0;e.Ob();)e.Pb(),t=yE(t,1);return bx(t)}function Gv(e,t){Qo();var n=P(e,69).vk();return L9e(n,t),n.xl(t)}function iHe(e,t,n){if(n){var r=n.oe();e.a[t]=r(n)}else delete e.a[t]}function aHe(e,t){var n=e.q.getHours();e.q.setFullYear(t+VF),dN(e,n)}function oHe(e,t){return P(t==null?nl(Kp(e.f,null)):as(e.i,t),288)}function sHe(e,t){return e==(DA(),JJ)&&t==JJ?4:e==JJ||t==JJ?8:32}function Kv(e,t,n){return sN(e,t,n,j(t,102)&&(P(t,19).Bb&pI)!=0)}function cHe(e,t,n){return pN(e,t,n,j(t,102)&&(P(t,19).Bb&pI)!=0)}function lHe(e,t,n){return tat(e,t,n,j(t,102)&&(P(t,19).Bb&pI)!=0)}function uHe(e){e.b!=e.c&&(e.a=V(WW,FP,1,8,5,1),e.b=0,e.c=0)}function qv(e){return jd(e.a=0&&e.a[n]===t[n];n--);return n<0}function oy(e){var t;return e?new Ap(e):(t=new Rl,HS(t,e),t)}function SHe(e,t){var n,r=!1;do n=mZe(e,t),r|=n;while(n);return r}function CHe(e){e&&OKe((Si(),cG)),--oG,e&&sG!=-1&&(gCe(sG),sG=-1)}function sy(e){s7e(),cTe(this,nm(uv(lm(e,24),jI)),nm(uv(e,jI)))}function wHe(){wHe=C,DEt=nT((fO(),U(O(DK,1),Z,436,0,[EK,TK])))}function THe(){THe=C,OEt=nT((dx(),U(O(AK,1),Z,435,0,[OK,kK])))}function EHe(){EHe=C,NDt=nT((fx(),U(O(Uq,1),Z,432,0,[Vq,Hq])))}function DHe(){DHe=C,AOt=nT((dC(),U(O(kOt,1),Z,517,0,[aY,iY])))}function OHe(){OHe=C,vkt=nT((Bv(),U(O(lQ,1),Z,429,0,[sQ,cQ])))}function kHe(){kHe=C,skt=nT((px(),U(O(hZ,1),Z,428,0,[pZ,mZ])))}function AHe(){AHe=C,dkt=nT((wb(),U(O(OZ,1),Z,488,0,[DZ,EZ])))}function jHe(){jHe=C,XMt=nT((Qb(),U(O(YMt,1),Z,430,0,[e2,t2])))}function MHe(){MHe=C,RNt=nT((Vv(),U(O(LNt,1),Z,531,0,[b2,y2])))}function NHe(){NHe=C,rkt=nT((Ky(),U(O(QX,1),Z,431,0,[XX,ZX])))}function PHe(){PHe=C,OFt=nT((iv(),U(O(DFt,1),Z,433,0,[v4,EFt])))}function FHe(){FHe=C,PFt=nT((AS(),U(O(NFt,1),Z,501,0,[b4,x4])))}function IHe(){IHe=C,qNt=nT((O_(),U(O(KNt,1),Z,523,0,[w2,C2])))}function LHe(){LHe=C,YNt=nT((k_(),U(O(JNt,1),Z,522,0,[T2,E2])))}function RHe(){RHe=C,dPt=nT((Wy(),U(O(uPt,1),Z,528,0,[A2,k2])))}function zHe(){zHe=C,vPt=nT((D_(),U(O(_Pt,1),Z,465,0,[j2,M2])))}function BHe(){BHe=C,zFt=nT((_b(),U(O(RFt,1),Z,434,0,[LFt,D4])))}function VHe(){VHe=C,xLt=nT((my(),U(O(bLt,1),Z,491,0,[s3,yLt])))}function HHe(){HHe=C,kLt=nT((JC(),U(O(OLt,1),Z,492,0,[ELt,DLt])))}function UHe(){UHe=C,zLt=nT((Gy(),U(O(RLt,1),Z,438,0,[x3,b3])))}function WHe(){WHe=C,TRt=nT((cw(),U(O(wRt,1),Z,437,0,[k3,CRt])))}function GHe(){GHe=C,WBt=nT((zf(),U(O(P5,1),Z,347,0,[HBt,UBt])))}function KHe(){return GT(),U(O(a8,1),Z,88,0,[r8,n8,t8,e8,i8])}function qHe(){return nP(),U(O(_5,1),TR,64,0,[h5,Z8,X8,m5,g5])}function JHe(e,t,n){return P(t==null?XA(e.f,null,n):uE(e.i,t,n),288)}function YHe(e){return(e.k==(DA(),JJ)||e.k==GJ)&&yd(e,(Y(),bQ))}function cy(e){return e.c&&e.d?Gze(e.c)+`->`+Gze(e.d):`e_`+td(e)}function ly(e,t){var n,r;for(Gh(t),r=e.Kc();r.Ob();)n=r.Pb(),t.Cd(n)}function XHe(e,t){var n=new bi;qg(n,`x`,t.a),qg(n,`y`,t.b),Dh(e,n)}function ZHe(e,t){var n=new bi;qg(n,`x`,t.a),qg(n,`y`,t.b),Dh(e,n)}function QHe(e,t){for(var n=t;n;)Sd(e,-n.i,-n.j),n=I_(n);return e}function $He(e,t){for(var n=t,r=0;n>0;)r+=e.a[n],n-=n&-n;return r}function uy(e,t,n){var r=(ov(t,e.c.length),e.c[t]);return e.c[t]=n,r}function eUe(e,t,n){e.a.c.length=0,Tmt(e,t,n),e.a.c.length==0||Mut(e,t)}function dy(e){e.i=0,is(e.b,null),is(e.c,null),e.a=null,e.e=null,++e.g}function fy(){fy=C,_K=!0,mEt=!1,hEt=!1,_Et=!1,gEt=!1}function py(e){fy(),!_K&&(this.c=e,this.e=!0,this.a=new T)}function tUe(e,t){this.c=0,this.b=t,oCe.call(this,e,17493),this.a=this.c}function nUe(e){Cvt(),lge(this),this.a=new vo,tQe(this,e),up(this.a,e)}function rUe(){au(this),this.b=new k(cI,cI),this.a=new k(lI,lI)}function my(){my=C,s3=new sSe(YR,0),yLt=new sSe(`TARGET_WIDTH`,1)}function hy(e,t){return(lE(e),Xa(new Mp(e,new UGe(t,e.a)))).Bd(SK)}function iUe(){return vA(),U(O(CJ,1),Z,367,0,[vJ,yJ,bJ,xJ,SJ])}function aUe(){return tA(),U(O(JOt,1),Z,375,0,[TX,DX,OX,EX,wX])}function oUe(){return FD(),U(O(fZ,1),Z,348,0,[cZ,sZ,uZ,dZ,lZ])}function sUe(){return CO(),U(O(RMt,1),Z,323,0,[LMt,H0,U0,V0,W0])}function cUe(){return XE(),U(O(y$,1),Z,171,0,[v$,m$,h$,g$,_$])}function lUe(){return iA(),U(O(FFt,1),Z,368,0,[T4,S4,E4,C4,w4])}function uUe(){return Wj(),U(O(jLt,1),Z,373,0,[u3,l3,f3,d3,p3])}function dUe(){return MA(),U(O(ULt,1),Z,324,0,[BLt,S3,HLt,C3,VLt])}function fUe(){return uO(),U(O(L3,1),Z,170,0,[F3,P3,M3,I3,N3])}function pUe(){return pO(),U(O(I8,1),Z,256,0,[P8,F8,wBt,N8,TBt])}function mUe(e){return Qi(),function(){return XBe(e,this,arguments)}}function gy(e){return!e.c||!e.d?!1:!!e.c.i&&e.c.i==e.d.i}function hUe(e,t){return j(t,143)?ff(e.c,P(t,143).c):!1}function _y(e){return e.t||(e.t=new Bhe(e),WT(new K_e(e),0,e.t)),e.t}function gUe(e){this.b=e,Lu.call(this,e),this.a=P(NC(this.b.a,4),129)}function _Ue(e){this.b=e,ld.call(this,e),this.a=P(NC(this.b.a,4),129)}function vy(e,t,n,r,i){KUe.call(this,t,r,i),this.c=e,this.b=n}function vUe(e,t,n,r,i){eBe.call(this,t,r,i),this.c=e,this.a=n}function yUe(e,t,n,r,i){tBe.call(this,t,r,i),this.c=e,this.a=n}function bUe(e,t,n,r,i){KUe.call(this,t,r,i),this.c=e,this.a=n}function yy(e,t){return P(ix(e.d,t),23)||P(ix(e.e,t),23)}function xUe(e,t){var n=t.ld(),r=e.Fe(n);return!!r&&rg(r.e,t.md())}function SUe(e,t){var n=t.ld();return new oo(n,e.e.pc(n,P(t.md(),16)))}function CUe(e,t){return e.a.get(t)??V(WW,FP,1,0,5,1)}function wUe(e){var t=e.length;return ff(fI.substr(fI.length-t,t),e)}function by(e){if(Cj(e))return e.c=e.a,e.a.Pb();throw E(new Hr)}function TUe(e,t){return t==0||e.e==0?e:t>0?Cst(e,t):F0e(e,-t)}function xy(e,t){return t==0||e.e==0?e:t>0?F0e(e,t):Cst(e,-t)}function EUe(e){txe.call(this,e==null?IP:PE(e),j(e,82)?P(e,82):null)}function DUe(e){var t;return e.c||(t=e.r,j(t,90)&&(e.c=P(t,29))),e.c}function Sy(e){var t=new i_;return VC(t,e),W(t,(mP(),j1),null),t}function OUe(e){var t=e.c.i,n=e.d.i;return t.k==(DA(),GJ)&&n.k==GJ}function Cy(e){return vu(e&QF,e>>22&QF,e<0?$F:0)}function kUe(e){var t,n,r,i;for(n=e,r=0,i=n.length;r=0?e.Lh(r,n,!0):mj(e,t,n)}function jUe(e,t,n){return aE(Ou(cO(e),xu(t.b)),Ou(cO(e),xu(n.b)))}function MUe(e,t,n){return aE(Ou(cO(e),xu(t.e)),Ou(cO(e),xu(n.e)))}function NUe(e,t){return r.Math.min(ab(t.a,e.d.d.c),ab(t.b,e.d.d.c))}function Ty(e,t){e._i(e.i+1),Au(e,e.i,e.Zi(e.i,t)),e.Mi(e.i++,t),e.Ni()}function Ey(e){var t,n;++e.j,t=e.g,n=e.i,e.g=null,e.i=0,e.Oi(n,t),e.Ni()}function PUe(e,t,n){var r=new Rwe(e.a);mC(r,e.a.a),XA(r.f,t,n),e.a.a=r}function FUe(e,t,n,r){var i;for(i=0;it)throw E(new Mi(ptt(e,t,`index`)));return e}function Ay(e,t){var n=(ov(t,e.c.length),e.c[t]);return wye(e.c,t,1),n}function zUe(e,t){var n=(Gh(e),e),r=(Gh(t),t);return n==r?0:nt.p?-1:0}function tWe(e){var t;return e.a||(t=e.r,j(t,156)&&(e.a=P(t,156))),e.a}function nWe(e,t,n){var r;return++e.e,--e.f,r=P(e.d[t].gd(n),136),r.md()}function rWe(e){var t=e.ld();return qf(P(e.md(),16).Nc(),new cde(t))}function iWe(e,t){return km(e.a,t)?(My(e.a,t),!0):!1}function Iy(e,t,n){return Tv(t,e.e.Rd().gc()),Tv(n,e.c.Rd().gc()),e.a[t][n]}function Ly(e,t,n){this.a=e,this.b=t,this.c=n,M(e.t,this),M(t.i,this)}function Ry(e,t,n,r){this.f=e,this.e=t,this.d=n,this.b=r,this.c=r?r.d:null}function zy(){this.b=new vo,this.a=new vo,this.b=new vo,this.a=new vo}function By(){By=C;var e,t;u9=(Ra(),t=new Ur,t),d9=(e=new oi,e)}function aWe(e){var t;return lE(e),t=new Mje(e,e.a.e,e.a.d|4),new fDe(e,t)}function oWe(e){var t;for(Hh(e),t=0;e.a.Bd(new Be);)t=yE(t,1);return t}function Vy(e,t){return Gh(t),e.c=0,`Initial capacity must not be negative`)}function Uy(){Uy=C,G3=new yr(`org.eclipse.elk.labels.labelManager`)}function sWe(){sWe=C,fX=new Wd(`separateLayerConnections`,(iw(),gX))}function Wy(){Wy=C,A2=new nSe(`REGULAR`,0),k2=new nSe(`CRITICAL`,1)}function Gy(){Gy=C,x3=new lSe(`FIXED`,0),b3=new lSe(`CENTER_NODE`,1)}function Ky(){Ky=C,XX=new Lxe(`QUADRATIC`,0),ZX=new Lxe(`SCANLINE`,1)}function cWe(){cWe=C,ikt=nT((bS(),U(O(nZ,1),Z,322,0,[eZ,$X,tZ])))}function lWe(){lWe=C,akt=nT((lS(),U(O(oZ,1),Z,351,0,[rZ,aZ,iZ])))}function uWe(){uWe=C,ekt=nT((kS(),U(O(MX,1),Z,372,0,[jX,AX,kX])))}function dWe(){dWe=C,lkt=nT((_w(),U(O(ckt,1),Z,460,0,[_Z,gZ,vZ])))}function fWe(){fWe=C,hkt=nT((qC(),U(O(rQ,1),Z,299,0,[tQ,nQ,eQ])))}function pWe(){pWe=C,_kt=nT((Zb(),U(O(gkt,1),Z,311,0,[aQ,oQ,iQ])))}function mWe(){mWe=C,FMt=nT((hT(),U(O(PMt,1),Z,390,0,[P0,NMt,F0])))}function hWe(){hWe=C,nNt=nT((CC(),U(O(tNt,1),Z,387,0,[$Mt,a2,eNt])))}function gWe(){gWe=C,iNt=nT((Nw(),U(O(rNt,1),Z,349,0,[c2,o2,s2])))}function _We(){_We=C,QMt=nT((uS(),U(O(ZMt,1),Z,463,0,[i2,n2,r2])))}function vWe(){vWe=C,sNt=nT((Xw(),U(O(oNt,1),Z,350,0,[l2,aNt,u2])))}function yWe(){yWe=C,dNt=nT((cS(),U(O(uNt,1),Z,352,0,[lNt,d2,cNt])))}function bWe(){bWe=C,pNt=nT((sw(),U(O(fNt,1),Z,388,0,[p2,m2,f2])))}function xWe(){xWe=C,IPt=nT((Pw(),U(O(FPt,1),Z,392,0,[PPt,B2,z2])))}function SWe(){SWe=C,UFt=nT((Yw(),U(O(HFt,1),Z,393,0,[O4,BFt,VFt])))}function CWe(){CWe=C,OIt=nT((SC(),U(O(DIt,1),Z,300,0,[I4,EIt,TIt])))}function wWe(){wWe=C,AIt=nT((ED(),U(O(kIt,1),Z,445,0,[L4,R4,z4])))}function TWe(){TWe=C,MIt=nT((LO(),U(O(jIt,1),Z,456,0,[B4,H4,V4])))}function EWe(){EWe=C,RIt=nT((TE(),U(O(LIt,1),Z,394,0,[IIt,Q4,FIt])))}function DWe(){DWe=C,TLt=nT((Tb(),U(O(wLt,1),Z,439,0,[c3,CLt,SLt])))}function OWe(){OWe=C,jNt=nT((sS(),U(O(ANt,1),Z,464,0,[h2,g2,_2])))}function kWe(){kWe=C,PEt=nT((Cb(),U(O(NEt,1),Z,471,0,[rq,nq,iq])))}function AWe(){AWe=C,MEt=nT((Ix(),U(O($K,1),Z,237,0,[XK,ZK,QK])))}function jWe(){jWe=C,LEt=nT((Xb(),U(O(IEt,1),Z,472,0,[sq,oq,aq])))}function MWe(){MWe=C,vEt=nT((Zw(),U(O(xK,1),Z,108,0,[vK,yK,bK])))}function NWe(){NWe=C,aOt=nT((Yb(),U(O(_J,1),Z,391,0,[hJ,mJ,gJ])))}function PWe(){PWe=C,bBt=nT((_T(),U(O(yBt,1),Z,346,0,[_8,g8,v8])))}function FWe(){FWe=C,NLt=nT((KT(),U(O(_3,1),Z,444,0,[m3,h3,g3])))}function IWe(){IWe=C,iBt=nT((Lx(),U(O(rBt,1),Z,278,0,[o8,s8,c8])))}function LWe(){LWe=C,VBt=nT((gT(),U(O(BBt,1),Z,280,0,[zBt,M5,N5])))}function qy(e,t){return!e.o&&(e.o=new lb((lP(),Z5),n7,e,0)),uD(e.o,t)}function RWe(e,t){var n;e.C&&(n=P(ig(e.b,t),127).n,n.d=e.C.d,n.a=e.C.a)}function zWe(e){var t,n,r,i=e.d;t=e.a,n=e.b,r=e.c,e.d=n,e.a=r,e.b=i,e.c=t}function BWe(e){return!e.g&&(e.g=new on),!e.g.b&&(e.g.b=new Ihe(e)),e.g.b}function Jy(e){return!e.g&&(e.g=new on),!e.g.c&&(e.g.c=new zhe(e)),e.g.c}function VWe(e){return!e.g&&(e.g=new on),!e.g.d&&(e.g.d=new Lhe(e)),e.g.d}function HWe(e){return!e.g&&(e.g=new on),!e.g.a&&(e.g.a=new Rhe(e)),e.g.a}function UWe(e,t,n,r){return n&&(r=n.Rh(t,eD(n.Dh(),e.c.uk()),null,r)),r}function WWe(e,t,n,r){return n&&(r=n.Th(t,eD(n.Dh(),e.c.uk()),null,r)),r}function Yy(e,t,n,r){var i=V(q9,HF,28,t+1,15,1);return Gdt(i,e,t,n,r),i}function V(e,t,n,r,i,a){var o=b3e(i,r);return i!=10&&U(O(e,a),t,n,i,o),o}function GWe(e,t,n){var r,i=new WC(t,e);for(r=0;rn||t=0?e.Lh(n,!0,!0):mj(e,t,!0)}function gGe(e,t,n){var r=kZe(e,t,n);return e.b=new VS(r.c.length),Xst(e,r)}function _Ge(e){if(e.b<=0)throw E(new Hr);return--e.b,e.a-=e.c.c,G(e.a)}function vGe(e){var t;if(!e.a)throw E(new fIe);return t=e.a,e.a=I_(e.a),t}function yGe(e){for(;!e.a;)if(!DOe(e.c,new Ufe(e)))return!1;return!0}function hb(e){var t;return ph(e),j(e,204)?(t=P(e,204),t):new gde(e)}function bGe(e){gb(),P(e.of((vP(),z6)),181).Fc((rj(),K8)),e.qf(R6,null)}function gb(){gb=C,jRt=new Hoe,NRt=new Uoe,MRt=oQe((vP(),R6),jRt,D6,NRt)}function _b(){_b=C,LFt=new oSe(`LEAF_NUMBER`,0),D4=new oSe(`NODE_SIZE`,1)}function vb(e){e.a=V(q9,HF,28,e.b+1,15,1),e.c=V(q9,HF,28,e.b,15,1),e.d=0}function xGe(e,t){e.a.Ne(t.d,e.b)>0&&(M(e.c,new Pje(t.c,t.d,e.d)),e.b=t.d)}function SGe(e,t){if(e.g==null||t>=e.i)throw E(new wl(t,e.i));return e.g[t]}function CGe(e,t,n){if(Aw(e,n),n!=null&&!e.fk(n))throw E(new Ir);return n}function yb(e,t){return lx(t)!=10&&U($w(t),t.Sm,t.__elementTypeId$,lx(t),e),e}function bb(e,t,n,r){var i;r=(Bg(),r||nK),i=e.slice(t,n),mtt(i,e,t,n,-t,r)}function xb(e,t,n,r,i){return t<0?mj(e,n,r):P(n,69).wk().yk(e,e.hi(),t,r,i)}function wGe(e,t){return aE(D(N(K(e,(Y(),$Q)))),D(N(K(t,$Q))))}function TGe(){TGe=C,dEt=nT((Sb(),U(O(mK,1),Z,304,0,[uK,dK,fK,pK])))}function Sb(){Sb=C,uK=new ls(`All`,0),dK=new WCe,fK=new Owe,pK=new UCe}function Cb(){Cb=C,rq=new hs(cL,0),nq=new hs(sL,1),iq=new hs(lL,2)}function EGe(){EGe=C,_N(),VHt=cI,BHt=lI,UHt=new Rn(cI),HHt=new Rn(lI)}function DGe(){DGe=C,cDt=nT((KC(),U(O(sDt,1),Z,417,0,[mq,dq,fq,pq])))}function OGe(){OGe=C,mDt=nT((wO(),U(O(pDt,1),Z,406,0,[wq,Cq,Tq,Eq])))}function kGe(){kGe=C,uDt=nT((TO(),U(O(lDt,1),Z,332,0,[gq,hq,_q,vq])))}function AGe(){AGe=C,xOt=nT((YD(),U(O(zJ,1),Z,389,0,[RJ,IJ,FJ,LJ])))}function jGe(){jGe=C,hOt=nT((ow(),U(O(mOt,1),Z,416,0,[kJ,MJ,AJ,jJ])))}function MGe(){MGe=C,qOt=nT((aw(),U(O(KOt,1),Z,421,0,[bX,xX,SX,CX])))}function NGe(){NGe=C,IOt=nT((iw(),U(O(FOt,1),Z,371,0,[gX,mX,hX,pX])))}function PGe(){PGe=C,IMt=nT((IO(),U(O(B0,1),Z,203,0,[R0,z0,L0,I0])))}function FGe(){FGe=C,JMt=nT((ID(),U(O(qMt,1),Z,284,0,[Z0,KMt,Q0,$0])))}function wb(){wb=C,DZ=new Hs(wR,0),EZ=new Hs(`IMPROVE_STRAIGHTNESS`,1)}function IGe(e,t){var n,r=t/e.c.Rd().gc()|0;return n=t%e.c.Rd().gc(),Iy(e,r,n)}function LGe(e){var t;if(e.nl())for(t=e.i-1;t>=0;--t)H(e,t);return zVe(e)}function RGe(e){var t,n;if(!e.b)return null;for(n=e.b;t=n.a[0];)n=t;return n}function zGe(e){var t,n;if(!e.b)return null;for(n=e.b;t=n.a[1];)n=t;return n}function BGe(e){return j(e,180)?``+P(e,180).a:e==null?null:PE(e)}function VGe(e){return j(e,180)?``+P(e,180).a:e==null?null:PE(e)}function HGe(e,t){if(t.a)throw E(new yi(xyt));Lm(e.a,t),t.a=e,!e.j&&(e.j=t)}function UGe(e,t){vl.call(this,t.zd(),t.yd()&-16449),Gh(e),this.a=e,this.c=t}function WGe(e,t){return new Vf(t,Sd(xu(t.e),t.f.a+e,t.f.b+e),(rd(),!1))}function GGe(e,t){return Rf(),M(e,new Kc(t,G(t.e.c.length+t.g.c.length)))}function KGe(e,t){return Rf(),M(e,new Kc(t,G(t.e.c.length+t.g.c.length)))}function qGe(){qGe=C,wIt=nT((uk(),U(O(CIt,1),Z,354,0,[F4,xIt,SIt,bIt])))}function JGe(){JGe=C,TFt=nT((Jw(),U(O(wFt,1),Z,353,0,[_4,h4,g4,m4])))}function YGe(){YGe=C,bPt=nT((Ok(),U(O(yPt,1),Z,405,0,[N2,P2,F2,I2])))}function XGe(){XGe=C,aBt=nT((wE(),U(O(p8,1),Z,223,0,[f8,u8,l8,d8])))}function ZGe(){ZGe=C,SBt=nT((kk(),U(O(xBt,1),Z,291,0,[S8,y8,b8,x8])))}function QGe(){QGe=C,IBt=nT((TD(),U(O(S5,1),Z,386,0,[b5,x5,y5,v5])))}function $Ge(){$Ge=C,YBt=nT((ZE(),U(O(JBt,1),Z,320,0,[F5,GBt,qBt,KBt])))}function eKe(){eKe=C,tVt=nT((Mw(),U(O(eVt,1),Z,415,0,[I5,QBt,ZBt,$Bt])))}function Tb(){Tb=C,c3=new Cc(_xt,0),CLt=new Cc(vV,1),SLt=new Cc(wR,2)}function Eb(e,t,n,r,i){return Gh(e),Gh(t),Gh(n),Gh(r),Gh(i),new Vm(e,t,r)}function tKe(e,t){var n=P(My(e.e,t),400);return n?(pMe(n),n.e):null}function Db(e,t){var n=Ab(e,t,0);return n!=-1&&(Ay(e,n),!0)}function nKe(e,t,n){var r;return Hh(e),r=new Re,r.a=t,e.a.Nb(new uxe(r,n)),r.a}function rKe(e){var t;return Hh(e),t=V(Z9,hI,28,0,15,1),Qa(e.a,new Bfe(t)),t}function Ob(e){var t;if(!DS(e))throw E(new Hr);return e.e=1,t=e.d,e.d=null,t}function kb(e){var t;return Il(e)&&(t=0-e,!isNaN(t))?t:MC(mw(e))}function Ab(e,t,n){for(;n=0?jO(e,n,!0,!0):mj(e,t,!0)}function qb(e){var t=rS(NC(e,32));return t??=(WD(e),rS(NC(e,32))),t}function Jb(e){var t;return e.Oh()||(t=bh(e.Dh())-e.ji(),e.$h().Mk(t)),e.zh()}function fKe(e,t){bq=new Mt,fDt=t,yq=e,P(yq.b,68),ZWe(yq,bq,null),Jpt(yq)}function Yb(){Yb=C,hJ=new Cs(`XY`,0),mJ=new Cs(`X`,1),gJ=new Cs(`Y`,2)}function Xb(){Xb=C,sq=new gs(`TOP`,0),oq=new gs(sL,1),aq=new gs(Lyt,2)}function Zb(){Zb=C,aQ=new qs(wR,0),oQ=new qs(`TOP`,1),iQ=new qs(Lyt,2)}function Qb(){Qb=C,e2=new nc(`INPUT_ORDER`,0),t2=new nc(`PORT_DEGREE`,1)}function $b(){$b=C,hG=vu(QF,QF,524287),BTt=vu(0,0,eI),gG=Cy(1),Cy(2),_G=Cy(0)}function ex(e){var t;return e.d!=e.r&&(t=Ik(e),e.e=!!t&&t.lk()==xwt,e.d=t),e.e}function tx(e,t,n){var r=e.g[t];return Au(e,t,e.Zi(t,n)),e.Ri(t,n,r),e.Ni(),r}function nx(e,t){var n=e.dd(t);return n>=0&&(e.gd(n),!0)}function rx(e,t){var n;for(ph(e),ph(t),n=!1;t.Ob();)n|=e.Fc(t.Pb());return n}function ix(e,t){var n=P(xh(e.e,t),400);return n?(Ywe(e,n),n.e):null}function pKe(e){var t=e/60|0,n=e%60;return n==0?``+t:``+t+`:`+(``+n)}function ax(e,t){var n=e.a[t],r=(vw(),pG)[typeof n];return r?r(n):XQe(typeof n)}function ox(e,t){var n,r;return lE(e),r=new WUe(t,e.a),n=new zOe(r),new Mp(e,n)}function sx(e){var t=e.b.c.length==0?null:Ep(e.b,0);return t!=null&&LS(e,0),t}function mKe(e,t){var n,r,i=t.c.i;n=P(xh(e.f,i),60),r=n.d.c-n.e.c,eC(t.a,r,0)}function cx(e,t){var n;for(++e.d,++e.c[t],n=t+1;n=0;)++t[0]}function _Ke(e,t){Gx(e,t==null||vf((Gh(t),t))||isNaN((Gh(t),t))?0:(Gh(t),t))}function vKe(e,t){Kx(e,t==null||vf((Gh(t),t))||isNaN((Gh(t),t))?0:(Gh(t),t))}function yKe(e,t){Wx(e,t==null||vf((Gh(t),t))||isNaN((Gh(t),t))?0:(Gh(t),t))}function bKe(e,t){Ux(e,t==null||vf((Gh(t),t))||isNaN((Gh(t),t))?0:(Gh(t),t))}function xKe(e,t,n){return Ou(new k(n.e.a+n.f.a/2,n.e.b+n.f.b/2),e)==(Gh(t),t)}function SKe(e,t){return j(t,102)&&(P(t,19).Bb&pI)!=0?new Dl(t,e):new WC(t,e)}function CKe(e,t){return j(t,102)&&(P(t,19).Bb&pI)!=0?new Dl(t,e):new WC(t,e)}function lx(e){return e.__elementTypeCategory$==null?10:e.__elementTypeCategory$}function wKe(e,t){return t==(Sf(),Sf(),oEt)?e.toLocaleLowerCase():e.toLowerCase()}function TKe(e){if(!e.e)throw E(new Hr);return e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function ux(e){if(!e.c)throw E(new Hr);return e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function EKe(e){var t;for(++e.a,t=e.c.a.length;e.ae.a[r]&&(r=n);return r}function MKe(e){var t=P(K(e,(Y(),fQ)),313);return t?t.a==e:!1}function NKe(e){var t=P(K(e,(Y(),fQ)),313);return t?t.i==e:!1}function PKe(){PKe=C,lOt=nT((vA(),U(O(CJ,1),Z,367,0,[vJ,yJ,bJ,xJ,SJ])))}function FKe(){FKe=C,YOt=nT((tA(),U(O(JOt,1),Z,375,0,[TX,DX,OX,EX,wX])))}function IKe(){IKe=C,okt=nT((FD(),U(O(fZ,1),Z,348,0,[cZ,sZ,uZ,dZ,lZ])))}function LKe(){LKe=C,zMt=nT((CO(),U(O(RMt,1),Z,323,0,[LMt,H0,U0,V0,W0])))}function RKe(){RKe=C,ykt=nT((XE(),U(O(y$,1),Z,171,0,[v$,m$,h$,g$,_$])))}function zKe(){zKe=C,IFt=nT((iA(),U(O(FFt,1),Z,368,0,[T4,S4,E4,C4,w4])))}function BKe(){BKe=C,MLt=nT((Wj(),U(O(jLt,1),Z,373,0,[u3,l3,f3,d3,p3])))}function VKe(){VKe=C,WLt=nT((MA(),U(O(ULt,1),Z,324,0,[BLt,S3,HLt,C3,VLt])))}function HKe(){HKe=C,nBt=nT((GT(),U(O(a8,1),Z,88,0,[r8,n8,t8,e8,i8])))}function UKe(){UKe=C,FRt=nT((uO(),U(O(L3,1),Z,170,0,[F3,P3,M3,I3,N3])))}function WKe(){WKe=C,EBt=nT((pO(),U(O(I8,1),Z,256,0,[P8,F8,wBt,N8,TBt])))}function GKe(){GKe=C,ABt=nT((nP(),U(O(_5,1),TR,64,0,[h5,Z8,X8,m5,g5])))}function dx(){dx=C,OK=new pxe(`BY_SIZE`,0),kK=new pxe(`BY_SIZE_AND_SHAPE`,1)}function fx(){fx=C,Vq=new Ss(`EADES`,0),Hq=new Ss(`FRUCHTERMAN_REINGOLD`,1)}function px(){px=C,pZ=new zs(`READING_DIRECTION`,0),mZ=new zs(`ROTATION`,1)}function mx(){mx=C,vOt=new mee,yOt=new _ee,gOt=new vee,_Ot=new gee,bOt=new yee}function KKe(e){this.b=new T,this.a=new T,this.c=new T,this.d=new T,this.e=e}function qKe(e){this.g=e,this.f=new T,this.a=r.Math.min(this.g.c.c,this.g.d.c)}function JKe(e,t,n){Qd.call(this),Px(this),this.a=e,this.c=n,this.b=t.d,this.f=t.e}function YKe(e,t,n){var r,i;for(i=new w(n);i.a=0&&t0?t-1:t;return Qve($ve(Uqe(Qje(new di,n),e.n),e.j),e.k)}function vx(e){var t,n=(t=new si,t);tb((!e.q&&(e.q=new F(M7,e,11,10)),e.q),n)}function yx(e){return(e.i&2?`interface `:e.i&1?``:`class `)+(Ad(e),e.o)}function bx(e){return dT(e,AP)>0?AP:dT(e,xF)<0?xF:nm(e)}function xx(e){return e<3?(vS(e,Qvt),e+1):e=-.01&&e.a<=fL&&(e.a=0),e.b>=-.01&&e.b<=fL&&(e.b=0),e}function Tx(e){fM();var t,n=zV;for(t=0;tn&&(n=e[t]);return n}function lqe(e,t){var n=Qj(e.Dh(),t);if(!n)throw E(new Fi(HH+t+WH));return n}function Ex(e,t){for(var n=e;I_(n);)if(n=I_(n),n==t)return!0;return!1}function uqe(e,t){var n,r=t.a.ld(),i;for(n=P(t.a.md(),16).gc(),i=0;ie||e>t)throw E(new ia(`fromIndex: 0, toIndex: `+e+MI+t))}function kx(e){if(e<0)throw E(new Fi(`Illegal Capacity: `+e));this.g=this.aj(e)}function Ax(e,t){return uu(),fS(bF),r.Math.abs(e-t)<=bF||e==t||isNaN(e)&&isNaN(t)}function jx(e,t){var n,r,i,a;for(r=e.d,i=0,a=r.length;i0&&(e.a/=t,e.b/=t),e}function Mx(e){var t;return e.w?e.w:(t=jze(e),t&&!t.Vh()&&(e.w=t),t)}function Nx(e,t){var n,r=e.a;n=V$e(e,t,null),r!=t&&!e.e&&(n=JN(e,t,n)),n&&n.oj()}function xqe(e,t,n){var r=t,i;do i=D(e.p[r.p])+n,e.p[r.p]=i,r=e.a[r.p];while(r!=t)}function Sqe(e,t,n){var r=function(){return e.apply(r,arguments)};return t.apply(r,n),r}function Cqe(e){var t;return e==null?null:(t=P(e,195),E7e(t,t.length))}function H(e,t){if(e.g==null||t>=e.i)throw E(new wl(t,e.i));return e.Wi(t,e.g[t])}function wqe(e,t){Vg();var n,r=new T;for(n=0;n=14&&t<=16))),e}function iS(e,t){var n;return Gh(t),n=e[`:`+t],$f(!!n,`Enum constant undefined: `+t),n}function aS(e,t,n,r,i,a){var o=fh(e,t);return Wqe(n,o),o.i=i?8:0,o.f=r,o.e=i,o.g=a,o}function Gqe(e,t,n,r,i){this.d=t,this.k=r,this.f=i,this.o=-1,this.p=1,this.c=e,this.a=n}function Kqe(e,t,n,r,i){this.d=t,this.k=r,this.f=i,this.o=-1,this.p=2,this.c=e,this.a=n}function qqe(e,t,n,r,i){this.d=t,this.k=r,this.f=i,this.o=-1,this.p=6,this.c=e,this.a=n}function Jqe(e,t,n,r,i){this.d=t,this.k=r,this.f=i,this.o=-1,this.p=7,this.c=e,this.a=n}function Yqe(e,t,n,r,i){this.d=t,this.j=r,this.e=i,this.o=-1,this.p=4,this.c=e,this.a=n}function Xqe(e,t){var n,r,i,a;for(r=t,i=0,a=r.length;i=0))throw E(new Fi(`tolerance (`+e+`) must be >= 0`));return e}function aJe(e,t){var n;return j(t,44)?e.c.Mc(t):(n=uD(e,t),BD(e,t),n)}function pS(e,t,n){return aT(e,t),GS(e,n),Zx(e,0),Qx(e,1),RT(e,!0),FT(e,!0),e}function mS(e,t){var n=e.gc();if(t<0||t>n)throw E(new lf(t,n));return new LOe(e,t)}function hS(e,t){e.b=r.Math.max(e.b,t.d),e.e+=t.r+(e.a.c.length==0?0:e.c),M(e.a,t)}function oJe(e){Md(e.c>=0),Q0e(e.d,e.c)<0&&(e.a=e.a-1&e.d.a.length-1,e.b=e.d.c),e.c=-1}function gS(e){var t,n;for(n=e.c.Cc().Kc();n.Ob();)t=P(n.Pb(),16),t.$b();e.c.$b(),e.d=0}function sJe(e){var t,n,r,i;for(n=e.a,r=0,i=n.length;r=0}function kJe(e,t){e.r>0&&e.c0&&e.g!=0&&kJe(e.i,t/e.r*e.i.d))}function AJe(e,t){var n=e.c;e.c=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,1,n,e.c))}function SS(e,t){var n=e.c;e.c=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,4,n,e.c))}function CS(e,t){var n=e.k;e.k=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,2,n,e.k))}function wS(e,t){var n=e.D;e.D=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,2,n,e.D))}function TS(e,t){var n=e.f;e.f=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,8,n,e.f))}function ES(e,t){var n=e.i;e.i=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,7,n,e.i))}function jJe(e,t){var n=e.a;e.a=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,8,n,e.a))}function MJe(e,t){var n=e.b;e.b=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,0,n,e.b))}function NJe(e,t){var n=e.b;e.b=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,0,n,e.b))}function PJe(e,t){var n=e.c;e.c=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,1,n,e.c))}function FJe(e,t){var n=e.d;e.d=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,1,n,e.d))}function IJe(e,t,n){var r;e.b=t,e.a=n,r=(e.a&512)==512?new y_e:new Qle,e.c=Ust(r,e.b,e.a)}function LJe(e,t){return aM(e.e,t)?(Qo(),ex(t)?new hp(t,e):new Qc(t,e)):new ZSe(t,e)}function RJe(e){var t,n;return 0>e?new _be:(t=e+1,n=new tUe(t,e),new pDe(null,n))}function zJe(e,t){Vg();var n=new go(1);return rl(e)?H_(n,e,t):XA(n.f,e,t),new Kn(n)}function BJe(e,t){var n=e.c,r=t.e[e.p];return r>0?P(Ep(n.a,r-1),10):null}function VJe(e,t){var n=e.o+e.p,r=t.o+t.p;return nt?(t<<=1,t>0?t:mF):t}function DS(e){switch(yTe(e.e!=3),e.e){case 2:return!1;case 0:return!0}return VUe(e)}function WJe(e,t){var n;return j(t,8)?(n=P(t,8),e.a==n.a&&e.b==n.b):!1}function GJe(e,t){var n=new Mt;P(t.b,68),P(t.b,68),P(t.b,68),Dx(t.a,new Uf(e,n,t))}function KJe(e,t){var n,r;for(r=t.vc().Kc();r.Ob();)n=P(r.Pb(),44),Hk(e,n.ld(),n.md())}function qJe(e,t){var n=e.d;e.d=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,11,n,e.d))}function OS(e,t){var n=e.j;e.j=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,13,n,e.j))}function JJe(e,t){var n=e.b;e.b=t,e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,1,21,n,e.b))}function YJe(e,t){(fy(),_K?null:t.c).length==0&&vDe(t,new xe),H_(e.a,_K?null:t.c,t)}function XJe(e,t){t.Ug(`Hierarchical port constraint processing`,1),G2e(e),pvt(e),t.Vg()}function kS(){kS=C,jX=new Ps(`START`,0),AX=new Ps(`MIDDLE`,1),kX=new Ps(`END`,2)}function AS(){AS=C,b4=new aSe(`P1_NODE_PLACEMENT`,0),x4=new aSe(`P2_EDGE_ROUTING`,1)}function jS(){jS=C,iJ=new yr(sbt),aJ=new yr(cbt),rJ=new yr(lbt),nJ=new yr(ubt)}function MS(e){var t;return Df(e.f.g,e.d),jd(e.b),e.c=e.a,t=P(e.a.Pb(),44),e.b=FXe(e),t}function NS(e){var t;return e.b==null?(Xo(),Xo(),a9):(t=e.ul()?e.tl():e.sl(),t)}function ZJe(e,t){var n=t==null?-1:Ab(e.b,t,0);return n<0?!1:(LS(e,n),!0)}function PS(e,t){var n;return Gh(t),n=t.g,!e.b[n]&&(Sh(e.b,n,t),++e.c,!0)}function FS(e,t){var n=1-t,r=e.a[n];return e.a[n]=r.a[t],r.a[t]=e,e.b=!0,r.b=!1,r}function QJe(e,t){var n,r;for(r=t.Kc();r.Ob();)n=P(r.Pb(),272),e.b=!0,Lm(e.e,n),n.b=e}function $Je(e,t){var n=P(K(e,(mP(),n0)),8),r=P(K(t,n0),8);return aE(n.b,r.b)}function IS(e,t,n){var r,i,a=t>>5;return i=t&31,r=uv(um(e.n[n][a],nm(cm(i,1))),3),r}function eYe(e,t,n){var r,i,a=e.a.length-1;for(i=e.b,r=0;r0):(!e.c&&(e.c=Q_(LC(e.f))),e.c).e}function fYe(e,t){t?e.B??(e.B=e.D,e.D=null):e.B!=null&&(e.D=e.B,e.B=null)}function pYe(e,t){return ow(),e==kJ&&t==MJ||e==MJ&&t==kJ||e==jJ&&t==AJ||e==AJ&&t==jJ}function mYe(e,t){return ow(),e==kJ&&t==AJ||e==kJ&&t==jJ||e==MJ&&t==jJ||e==MJ&&t==AJ}function hYe(e,t){return uu(),fS(fL),r.Math.abs(0-t)<=fL||t==0?0:e/t}function gYe(e,t){return D(N(Ju(MT(gg(new Mp(null,new cv(e.c.b,16)),new Zpe(e)),t))))}function $S(e,t){return D(N(Ju(MT(gg(new Mp(null,new cv(e.c.b,16)),new Xpe(e)),t))))}function _Ye(){return uM(),U(O($Z,1),Z,259,0,[WZ,KZ,qZ,JZ,YZ,XZ,QZ,UZ,GZ,ZZ])}function vYe(){return FM(),U(O(WMt,1),Z,243,0,[Y0,q0,J0,VMt,HMt,BMt,UMt,X0,G0,K0])}function yYe(e,t){var n;t.Ug(`General Compactor`,1),n=$1e(P(J(e,(PA(),A4)),393)),n.Cg(e)}function bYe(e,t){var n=P(J(e,(PA(),j4)),17),r=P(J(t,j4),17);return _u(n.a,r.a)}function eC(e,t,n){var r,i;for(i=dO(e,0);i.b!=i.d.c;)r=P(Lv(i),8),r.a+=t,r.b+=n;return e}function tC(e,t,n){var r;for(r=e.b[n&e.f];r;r=r.b)if(n==r.a&&zh(t,r.g))return r;return null}function nC(e,t,n){var r;for(r=e.c[n&e.f];r;r=r.d)if(n==r.f&&zh(t,r.i))return r;return null}function xYe(e,t,n){var r=0,i,a;for(i=0;i>>31;r!=0&&(e[n]=r)}function rC(e,t,n,r,i,a){var o;this.c=e,o=new T,t3e(e,o,t,e.b,n,r,i,a),this.a=new bv(o,0)}function SYe(){this.c=new Ya(0),this.b=new Ya(PV),this.d=new Ya(txt),this.a=new Ya(RL)}function iC(e,t,n,r,i,a,o){so.call(this,e,t),this.d=n,this.e=r,this.c=i,this.b=a,this.a=Oy(o)}function aC(e,t,n,r,i,a,o,s,c,l,u,d,f){return ftt(e,t,n,r,i,a,o,s,c,l,u,d,f),mE(e,!1),e}function CYe(e){return e.b.c.i.k==(DA(),GJ)?P(K(e.b.c.i,(Y(),WQ)),12):e.b.c}function wYe(e){return e.b.d.i.k==(DA(),GJ)?P(K(e.b.d.i,(Y(),WQ)),12):e.b.d}function TYe(e){var t=Ov(e);return ol(t.a,0)?(So(),So(),sEt):(So(),new _Ee(t.b))}function oC(e){var t=LBe(e);return ol(t.a,0)?(xo(),xo(),sK):(xo(),new gd(t.b))}function sC(e){var t=LBe(e);return ol(t.a,0)?(xo(),xo(),sK):(xo(),new gd(t.c))}function EYe(e){switch(e.g){case 2:return nP(),g5;case 4:return nP(),X8;default:return e}}function DYe(e){switch(e.g){case 1:return nP(),m5;case 3:return nP(),Z8;default:return e}}function OYe(e){switch(e.g){case 0:return new Doe;case 1:return new Ooe;default:return null}}function cC(){cC=C,dX=new Wd(`edgelabelcenterednessanalysis.includelabel`,(rd(),vG))}function lC(){lC=C,kNt=HD(pCe(vp(vp(new Zh,(vA(),bJ),(yP(),KY)),xJ,IY),SJ),GY)}function kYe(){kYe=C,NNt=HD(pCe(vp(vp(new Zh,(vA(),bJ),(yP(),KY)),xJ,IY),SJ),GY)}function uC(){uC=C,n9=new p_e,r9=U(O(w7,1),qU,179,0,[]),eHt=U(O(M7,1),Cwt,62,0,[])}function dC(){dC=C,aY=new xxe(`TO_INTERNAL_LTR`,0),iY=new xxe(`TO_INPUT_DIRECTION`,1)}function fC(){fC=C,tY=new Tee,$J=new Eee,eY=new Dee,QJ=new Oee,nY=new kee,rY=new Aee}function AYe(e,t){t.Ug(Mbt,1),KE(kbe(new ar((Po(),new Tg(e,!1,!1,new Wt))))),t.Vg()}function jYe(e,t,n){n.Ug(`DFS Treeifying phase`,1),k0e(e,t),Yot(e,t),e.a=null,e.b=null,n.Vg()}function pC(e,t){return rd(),rl(e)?zUe(e,kd(t)):al(e)?dm(e,N(t)):il(e)?UNe(e,Od(t)):e.Fd(t)}function mC(e,t){var n,r;for(Gh(t),r=t.vc().Kc();r.Ob();)n=P(r.Pb(),44),e.zc(n.ld(),n.md())}function MYe(e,t,n){var r;for(r=n.Kc();r.Ob();)if(!Kv(e,t,r.Pb()))return!1;return!0}function NYe(e,t,n,r,i){var a;return n&&(a=eD(t.Dh(),e.c),i=n.Rh(t,-1-(a==-1?r:a),null,i)),i}function PYe(e,t,n,r,i){var a;return n&&(a=eD(t.Dh(),e.c),i=n.Th(t,-1-(a==-1?r:a),null,i)),i}function FYe(e){var t;if(e.b==-2){if(e.e==0)t=-1;else for(t=0;e.a[t]==0;t++);e.b=t}return e.b}function IYe(e){if(Gh(e),e.length==0)throw E(new aa(`Zero length BigInteger`));uut(this,e)}function hC(e){this.i=e.gc(),this.i>0&&(this.g=this.aj(this.i+(this.i/8|0)+1),e.Qc(this.g))}function LYe(e,t,n){this.g=e,this.d=t,this.e=n,this.a=new T,Utt(this),Vg(),hu(this.a,null)}function gC(e,t){t.q=e,e.d=r.Math.max(e.d,t.r),e.b+=t.d+(e.a.c.length==0?0:e.c),M(e.a,t)}function _C(e,t){var n,r,i=e.c,a;return n=e.c+e.b,a=e.d,r=e.d+e.a,t.a>i&&t.aa&&t.bi?n=i:sv(t,n+1),e.a=p_(e.a,0,t)+(``+r)+Ch(e.a,n)}function QYe(e,t){e.a=yE(e.a,1),e.c=r.Math.min(e.c,t),e.b=r.Math.max(e.b,t),e.d=yE(e.d,t)}function $Ye(e,t){return t1||e.Ob())return++e.a,e.g=0,t=e.i,e.Ob(),t;throw E(new Hr)}function fXe(e){switch(e.a.g){case 1:return new Yxe;case 3:return new P3e;default:return new Nue}}function pXe(e,t){switch(t){case 1:return!!e.n&&e.n.i!=0;case 2:return e.k!=null}return yBe(e,t)}function LC(e){return iI>22),i=e.h+t.h+(r>>22);return vu(n&QF,r&QF,i&$F)}function NXe(e,t){var n=e.l-t.l,r=e.m-t.m+(n>>22),i=e.h-t.h+(r>>22);return vu(n&QF,r&QF,i&$F)}function PXe(e){var t,n;for(Wgt(e),n=new w(e.d);n.ar)throw E(new lf(t,r));return e.Si()&&(n=uRe(e,n)),e.Ei(t,n)}function pw(e,t,n,r,i){var a,o;for(o=n;o<=i;o++)for(a=t;a<=r;a++)sk(e,a,o)||EM(e,a,o,!0,!1)}function uZe(e){fM();var t,n=V(K3,X,8,2,0,1),r=0;for(t=0;t<2;t++)r+=.5,n[t]=Y4e(r,e);return n}function mw(e){var t=~e.l+1&QF,n=~e.m+ +(t==0)&QF;return vu(t,n,~e.h+ +(t==0&&n==0)&$F)}function dZe(e){var t;if(e<0)return xF;if(e==0)return 0;for(t=mF;(t&e)==0;t>>=1);return t}function hw(e,t,n){return e>=128?!1:cl(e<64?uv(cm(1,e),n):uv(cm(1,e-64),t),0)}function gw(e,t,n){return n==null?(!e.q&&(e.q=new Dr),My(e.q,t)):(!e.q&&(e.q=new Dr),Qh(e.q,t,n)),e}function W(e,t,n){return n==null?(!e.q&&(e.q=new Dr),My(e.q,t)):(!e.q&&(e.q=new Dr),Qh(e.q,t,n)),e}function fZe(e){var t,n=new Py;return VC(n,e),W(n,(jS(),iJ),e),t=new Dr,gft(e,n,t),$ht(e,n,t),n}function pZe(e){var t=e.t-e.k[e.o.p]*e.d+e.j[e.o.p]>e.f,n=e.u+e.e[e.o.p]*e.d>e.f*e.s*e.d;return t||n}function mZe(e,t){var n=!1,r=e.a[t].length,i,a;for(a=0;a=0,`Negative initial capacity`),$f(t>=0,`Non-positive load factor`),Pm(this)}function CZe(e,t,n,r,i){var a,o=e.length;if(a=n.length,t<0||r<0||i<0||t+i>o||r+i>a)throw E(new bge)}function wZe(e,t){Vg();var n,r,i,a,o=!1;for(r=t,i=0,a=r.length;i1||t>=0&&e.b<3)}function ww(e){var t=~e.l+1&QF,n=~e.m+ +(t==0)&QF,r=~e.h+ +(t==0&&n==0)&$F;e.l=t,e.m=n,e.h=r}function IZe(e){Vg();var t,n,r=1;for(n=e.Kc();n.Ob();)t=n.Pb(),r=31*r+(t==null?0:US(t)),r|=0;return r}function LZe(e,t,n,r,i){var a=$rt(e,t);return n&&ww(a),i&&(e=s3e(e,t),mG=r?mw(e):vu(e.l,e.m,e.h)),a}function RZe(e,t,n){e.g=WA(e,t,(nP(),X8),e.b),e.d=WA(e,n,X8,e.b),e.g.c!=0&&e.d.c!=0&&f9e(e)}function zZe(e,t,n){e.g=WA(e,t,(nP(),g5),e.j),e.d=WA(e,n,g5,e.j),e.g.c!=0&&e.d.c!=0&&f9e(e)}function BZe(e,t){switch(t){case 7:return!!e.e&&e.e.i!=0;case 8:return!!e.d&&e.d.i!=0}return JE(e,t)}function VZe(e,t){switch(t.g){case 0:j(e.b,641)||(e.b=new XYe);break;case 1:j(e.b,642)||(e.b=new aMe)}}function HZe(e){switch(e.g){case 0:return new Poe;default:throw E(new Fi(fH+(e.f==null?``+e.g:e.f)))}}function UZe(e){switch(e.g){case 0:return new Moe;default:throw E(new Fi(fH+(e.f==null?``+e.g:e.f)))}}function WZe(e,t,n){return!Xa(hg(new Mp(null,new cv(e.c,16)),new rr(new bSe(t,n)))).Bd((wo(),SK))}function GZe(e,t){return Ou(cO(P(K(t,(rN(),c4)),88)),new k(e.c.e.a-e.b.e.a,e.c.e.b-e.b.e.b))<=0}function KZe(e,t){for(;e.g==null&&!e.c?lRe(e):e.g==null||e.i!=0&&P(e.g[e.i-1],51).Ob();)KSe(t,Pj(e))}function Tw(e){var t,n;for(n=new w(e.a.b);n.ar)}function ZZe(e){return M(e.c,(lw(),ORt)),Ax(e.a,D(N(hO((aD(),O0)))))?new Sse:new nhe(e)}function QZe(e){for(;!e.d||!e.d.Ob();)if(e.b&&!qi(e.b))e.d=P(Fm(e.b),51);else return null;return e.d}function $Ze(e){switch(e.g){case 1:return txt;default:case 2:return 0;case 3:return RL;case 4:return PV}}function eQe(){xP();var e;return JHt||(e=uEe(oP(`M`,!0)),e=Rp(oP(`M`,!1),e),JHt=e,JHt)}function Mw(){Mw=C,I5=new qc(`ELK`,0),QBt=new qc(`JSON`,1),ZBt=new qc(`DOT`,2),$Bt=new qc(`SVG`,3)}function Nw(){Nw=C,c2=new ac(`STACKED`,0),o2=new ac(`REVERSE_STACKED`,1),s2=new ac(`SEQUENCED`,2)}function Pw(){Pw=C,PPt=new mc(wR,0),B2=new mc(`MIDDLE_TO_MIDDLE`,1),z2=new mc(`AVOID_OVERLAP`,2)}function Fw(){Fw=C,vX=new cne,yX=new lne,VOt=new one,BOt=new une,zOt=new sne,_X=(Gh(zOt),new le)}function Iw(){Iw=C,vBt=new iu(15),_Bt=new ou((vP(),A6),vBt),h8=V6,pBt=rzt,mBt=w6,gBt=E6,hBt=T6}function Lw(e,t){var n,r,i,a,o;for(r=t,i=0,a=r.length;i=e.b.c.length||(sQe(e,2*t+1),n=2*t+2,n0&&(t.Cd(n),n.i&&n1e(n))}function lQe(e,t,n){var r;for(r=n-1;r>=0&&e[r]===t[r];r--);return r<0?0:rs(uv(e[r],_I),uv(t[r],_I))?-1:1}function uQe(e,t,n){var r,i;this.g=e,this.c=t,this.a=this,this.d=this,i=UJe(n),r=V(PTt,fF,227,i,0,1),this.b=r}function Vw(e,t,n,r,i){var a,o;for(o=n;o<=i;o++)for(a=t;a<=r;a++)if(sk(e,a,o))return!0;return!1}function dQe(e,t){var n,r;for(r=e.Zb().Cc().Kc();r.Ob();)if(n=P(r.Pb(),16),n.Hc(t))return!0;return!1}function fQe(e,t,n){var r,i,a,o;for(Gh(n),o=!1,a=e.fd(t),i=n.Kc();i.Ob();)r=i.Pb(),a.Rb(r),o=!0;return o}function Hw(e,t){var n,r=P(NC(e.a,4),129);return n=V(g7,FU,424,t,0,1),r!=null&&tN(r,0,n,0,r.length),n}function pQe(e,t){var n=new yM(!!(e.f&256),e.i,e.a,e.d,!!(e.f&16),e.j,e.g,t);return e.e??(n.c=e),n}function mQe(e,t){var n;return e===t?!0:j(t,85)?(n=P(t,85),eet(am(e),n.vc())):!1}function hQe(e,t,n){var r,i;for(i=n.Kc();i.Ob();)if(r=P(i.Pb(),44),e.Be(t,r.md()))return!0;return!1}function gQe(e,t,n){return e.d[t.p][n.p]||(p4e(e,t,n),e.d[t.p][n.p]=!0,e.d[n.p][t.p]=!0),e.a[t.p][n.p]}function _Qe(e,t){var n;return!e||e==t||!yd(t,(Y(),NQ))?!1:(n=P(K(t,(Y(),NQ)),10),n!=e)}function Uw(e){switch(e.i){case 2:return!0;case 1:return!1;case-1:++e.c;default:return e.$l()}}function vQe(e){switch(e.i){case-2:return!0;case-1:return!1;case 1:--e.c;default:return e._l()}}function yQe(e){yRe.call(this,`The given string does not match the expected format for individual spacings.`,e)}function bQe(e,t){var n;t.Ug(`Min Size Preprocessing`,1),n=Zet(e),OO(e,(xM(),Y4),n.a),OO(e,K4,n.b),t.Vg()}function xQe(e){var t=0,n,r=V(K3,X,8,e.b,0,1);for(n=dO(e,0);n.b!=n.d.c;)r[t++]=P(Lv(n),8);return r}function Ww(e,t,n){var r=new vo,i,a;for(a=dO(n,0);a.b!=a.d.c;)i=P(Lv(a),8),up(r,new Vl(i));fQe(e,t,r)}function SQe(e,t){var n=yE(e,t);return rs(fv(e,t),0)|sl(fv(e,n),0)?n:yE(tF,fv(um(n,63),1))}function CQe(e,t){var n=P(e.d.Bc(t),16),r;return n?(r=e.e.hc(),r.Gc(n),e.e.d-=n.gc(),n.$b(),r):null}function wQe(e){var t=e.a.c.length;if(t>0)return gm(t-1,e.a.c.length),Ay(e.a,t-1);throw E(new Sge)}function TQe(e,t,n){if(e>t)throw E(new Fi(BI+e+vyt+t));if(e<0||t>n)throw E(new ia(BI+e+VI+t+MI+n))}function Gw(e,t){e.D==null&&e.B!=null&&(e.D=e.B,e.B=null),wS(e,t==null?null:(Gh(t),t)),e.C&&e.hl(null)}function EQe(e,t){var n=hO((aD(),O0))!=null&&t.Sg()!=null?D(N(t.Sg()))/D(N(hO(O0))):1;Qh(e.b,t,n)}function DQe(e,t){var n,r=e.c[t];if(r!=0)for(e.c[t]=0,e.d-=r,n=t+1;nNV?e-n>NV:n-e>NV}function ZQe(e,t){var n;for(n=0;ni&&(Z8e(t.q,i),r=n!=t.q.d)),r}function e$e(e,t){var n,i,a,o,s,c,l=t.i,u=t.j;return i=e.f,a=i.i,o=i.j,s=l-a,c=u-o,n=r.Math.sqrt(s*s+c*c),n}function t$e(e,t){var n,r=KD(e);return r||(!_Vt&&(_Vt=new Jse),n=(NN(),Vit(t)),r=new qhe(n),tb(r.El(),e)),r}function sT(e,t){var n=P(e.c.Bc(t),16),r;return n?(r=e.hc(),r.Gc(n),e.d-=n.gc(),n.$b(),e.mc(r)):e.jc()}function n$e(e,t){var n,r=Lj(e.d,1)!=0;for(n=!0;n;)n=!1,n=t.c.mg(t.e,r),n|=$j(e,t,r,!1),r=!r;WS(e)}function r$e(e,t,n,r){var i,a;e.a=t,a=+!r,e.f=(i=new uet(e.c,e.a,n,a),new Hct(n,e.a,i,e.e,e.b,e.c==(sS(),g2)))}function cT(e){var t;return jd(e.a!=e.b),t=e.d.a[e.a],lDe(e.b==e.d.c&&t!=null),e.c=e.a,e.a=e.a+1&e.d.a.length-1,t}function i$e(e){var t;if(e.c!=0)return e.c;for(t=0;t=e.c.b:e.a<=e.c.b))throw E(new Hr);return t=e.a,e.a+=e.c.c,++e.b,G(t)}function lT(e){var t=new Dwe(e.a);return VC(t,e),W(t,(Y(),WQ),e),t.o.a=e.g,t.o.b=e.f,t.n.a=e.i,t.n.b=e.j,t}function uT(e){return(nP(),c5).Hc(e.j)?D(N(K(e,(Y(),c$)))):Sw(U(O(K3,1),X,8,0,[e.i.n,e.n,e.a])).b}function o$e(e){var t=Wl(ONt);return P(K(e,(Y(),OQ)),21).Hc((uM(),YZ))&&vp(t,(vA(),bJ),(yP(),eX)),t}function s$e(e){var t,n,r,i=new Jr;for(r=new w(e);r.a=0?t:-t;r>0;)r%2==0?(n*=n,r=r/2|0):(i*=n,--r);return t<0?1/i:i}function f$e(e,t){var n,r,i=1;for(n=e,r=t>=0?t:-t;r>0;)r%2==0?(n*=n,r=r/2|0):(i*=n,--r);return t<0?1/i:i}function pT(e,t){var n,r,i,a=(i=e?KD(e):null,btt((r=t,i&&i.Gl(),r)));return a==t&&(n=KD(e),n&&n.Gl()),a}function p$e(e,t,n){var r,i=e.f;return e.f=t,e.Db&4&&!(e.Db&1)&&(r=new Sm(e,1,0,i,t),n?n.nj(r):n=r),n}function m$e(e,t,n){var r,i=e.b;return e.b=t,e.Db&4&&!(e.Db&1)&&(r=new Sm(e,1,3,i,t),n?n.nj(r):n=r),n}function mT(e,t,n){var r,i=e.a;return e.a=t,e.Db&4&&!(e.Db&1)&&(r=new Sm(e,1,1,i,t),n?n.nj(r):n=r),n}function h$e(e){var t,n,r,i;if(e!=null){for(n=0;n=r||t-129&&e<128?(iMe(),t=e+128,n=OG[t],!n&&(n=OG[t]=new jn(e)),n):new jn(e)}function xT(e){var t,n;return e>-129&&e<128?(GMe(),t=e+128,n=FG[t],!n&&(n=FG[t]=new Nn(e)),n):new Nn(e)}function C$e(e,t){var n;e.a.c.length>0&&(n=P(Ep(e.a,e.a.c.length-1),579),tQe(n,t))||M(e.a,new nUe(t))}function w$e(e){Lf();var t=e.d.c-e.e.c,n=P(e.g,154);Dx(n.b,new Rpe(t)),Dx(n.c,new zpe(t)),ly(n.i,new Bpe(t))}function T$e(e){var t=new ta;return t.a+=`VerticalSegment `,hl(t,e.e),t.a+=` `,gl(t,_Te(new Xi,new w(e.k))),t.a}function ST(e,t){var n=0,r,i;for(i=SE(e,t).Kc();i.Ob();)r=P(i.Pb(),12),n+=K(r,(Y(),QQ))==null?0:1;return n}function CT(e,t,n){var r=0,i,a;for(a=dO(e,0);a.b!=a.d.c&&(i=D(N(Lv(a))),!(i>n));)i>=t&&++r;return r}function E$e(e,t){ph(e);try{return e._b(t)}catch(e){if(e=ew(e),j(e,212)||j(e,169))return!1;throw E(e)}}function wT(e,t){ph(e);try{return e.Hc(t)}catch(e){if(e=ew(e),j(e,212)||j(e,169))return!1;throw E(e)}}function D$e(e,t){ph(e);try{return e.Mc(t)}catch(e){if(e=ew(e),j(e,212)||j(e,169))return!1;throw E(e)}}function TT(e,t){ph(e);try{return e.xc(t)}catch(e){if(e=ew(e),j(e,212)||j(e,169))return null;throw E(e)}}function O$e(e,t){ph(e);try{return e.Bc(t)}catch(e){if(e=ew(e),j(e,212)||j(e,169))return null;throw E(e)}}function ET(e,t){switch(t.g){case 2:case 1:return SE(e,t);case 3:case 4:return UE(SE(e,t))}return Vg(),Vg(),QG}function DT(e){var t;return e.Db&64?Aj(e):(t=new Wu(Aj(e)),t.a+=` (name: `,pl(t,e.zb),t.a+=`)`,t.a)}function k$e(e){var t=P(ix(e.c.c,``),233);return t||(t=new ev(Ca(Sa(new Qt,``),`Other`)),oO(e.c.c,``,t)),t}function OT(e,t,n){var r,i=e.sb;return e.sb=t,e.Db&4&&!(e.Db&1)&&(r=new Sm(e,1,4,i,t),n?n.nj(r):n=r),n}function kT(e,t,n){var r,i=e.r;return e.r=t,e.Db&4&&!(e.Db&1)&&(r=new Sm(e,1,8,i,e.r),n?n.nj(r):n=r),n}function A$e(e,t,n){var r=new Hb(e.e,4,13,(i=t.c,i||(CP(),q7)),null,NO(e,t),!1),i;return n?n.nj(r):n=r,n}function j$e(e,t,n){var r=new Hb(e.e,3,13,null,(i=t.c,i||(CP(),q7)),NO(e,t),!1),i;return n?n.nj(r):n=r,n}function AT(e,t){var n=P(t,691),r=n.el();return!r&&n.fl(r=j(t,90)?new QSe(e,P(t,29)):new dBe(e,P(t,156))),r}function jT(e,t,n){var r;e._i(e.i+1),r=e.Zi(t,n),t!=e.i&&tN(e.g,t,e.g,t+1,e.i-t),Sh(e.g,t,r),++e.i,e.Mi(t,n),e.Ni()}function M$e(e,t){var n;return t.a&&(n=t.a.a.length,e.a?gl(e.a,e.b):e.a=new Gu(e.d),TBe(e.a,t.a,t.d.length,n)),e}function N$e(e,t){var n;e.c=t,e.a=a0e(t),e.a<54&&(e.f=(n=t.d>1?CBe(t.a[0],t.a[1]):CBe(t.a[0],0),Dv(t.e>0?n:kb(n))))}function MT(e,t){var n=new Re;return e.a.Bd(n)?(Bu(),new wi(Gh(nKe(e,n.a,t)))):(Hh(e),Bu(),Bu(),oK)}function P$e(e,t){var n;e.c.length!=0&&(n=P(rO(e,V(UJ,jR,10,e.c.length,0,1)),199),zl(n,new mte),Unt(n,t))}function F$e(e,t){var n;e.c.length!=0&&(n=P(rO(e,V(UJ,jR,10,e.c.length,0,1)),199),zl(n,new hte),Unt(n,t))}function NT(e,t){return rl(e)?ff(e,t):al(e)?wOe(e,t):il(e)?(Gh(e),A(e)===A(t)):RNe(e)?e.Fb(t):Wp(e)?vCe(e,t):Oze(e,t)}function PT(e,t,n){if(t<0)Qtt(e,n);else{if(!n.rk())throw E(new Fi(HH+n.xe()+UH));P(n,69).wk().Ek(e,e.hi(),t)}}function I$e(e,t,n){if(e<0||t>n)throw E(new Mi(BI+e+VI+t+`, size: `+n));if(e>t)throw E(new Fi(BI+e+vyt+t))}function L$e(e){var t;return e.Db&64?Aj(e):(t=new Wu(Aj(e)),t.a+=` (source: `,pl(t,e.d),t.a+=`)`,t.a)}function R$e(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e>=48&&e<=57?e-48:0}function z$e(e){SP();var t,n,r,i;for(n=sO(),r=0,i=n.length;r=0?yD(e):Xm(yD(kb(e))))}function W$e(e,t,n,r,i,a){this.e=new T,this.f=(uS(),i2),M(this.e,e),this.d=t,this.a=n,this.b=r,this.f=i,this.c=a}function G$e(e,t,n){e.n=Dp(Y9,[X,dI],[376,28],14,[n,C_(r.Math.ceil(t/32))],2),e.o=t,e.p=n,e.j=t-1>>1,e.k=n-1>>1}function K$e(e){return e-=e>>1&1431655765,e=(e>>2&858993459)+(e&858993459),e=(e>>4)+e&252645135,e+=e>>8,e+=e>>16,e&63}function q$e(e,t){var n,r;for(r=new Lu(e);r.e!=r.i.gc();)if(n=P(gO(r),142),A(t)===A(n))return!0;return!1}function J$e(e,t,n){var r,i,a=(i=Mj(e.b,t),i);return a&&(r=P(jN(Lb(e,a),``),29),r)?Hit(e,r,t,n):null}function UT(e,t,n){var r,i,a=(i=Mj(e.b,t),i);return a&&(r=P(jN(Lb(e,a),``),29),r)?Uit(e,r,t,n):null}function Y$e(e,t){var n=Bx(e.i,t);if(n==null)throw E(new Vi(`Node did not exist in input.`));return yC(t,n),null}function X$e(e,t){var n=Qj(e,t);if(j(n,331))return P(n,35);throw E(new Fi(HH+t+`' is not a valid attribute`))}function WT(e,t,n){var r=e.gc();if(t>r)throw E(new lf(t,r));if(e.Si()&&e.Hc(n))throw E(new Fi(vU));e.Gi(t,n)}function Z$e(e,t){t.Ug(`Sort end labels`,1),To(hg(ox(new Mp(null,new cv(e.b,16)),new Qee),new $ee),new ete),t.Vg()}function GT(){GT=C,r8=new jc(dL,0),n8=new jc(lL,1),t8=new jc(cL,2),e8=new jc(hL,3),i8=new jc(`UP`,4)}function KT(){KT=C,m3=new Tc(`P1_STRUCTURE`,0),h3=new Tc(`P2_PROCESSING_ORDER`,1),g3=new Tc(`P3_EXECUTION`,2)}function Q$e(){Q$e=C,jFt=HD(HD(Go(HD(HD(Go(vp(new Zh,(Ok(),P2),(LM(),R2)),F2),OPt),APt),I2),wPt),jPt)}function $$e(e){switch(P(K(e,(Y(),MQ)),311).g){case 1:W(e,MQ,(Zb(),iQ));break;case 2:W(e,MQ,(Zb(),oQ))}}function e1e(e){switch(e){case 0:return new a_e;case 1:return new r_e;case 2:return new i_e;default:throw E(new Lr)}}function t1e(e){switch(e.g){case 2:return n8;case 1:return t8;case 4:return e8;case 3:return i8;default:return r8}}function qT(e,t){switch(e.b.g){case 0:case 1:return t;case 2:case 3:return new wg(t.d,0,t.a,t.b);default:return null}}function JT(e){switch(e.g){case 1:return g5;case 2:return Z8;case 3:return X8;case 4:return m5;default:return h5}}function YT(e){switch(e.g){case 1:return m5;case 2:return g5;case 3:return Z8;case 4:return X8;default:return h5}}function XT(e){switch(e.g){case 1:return X8;case 2:return m5;case 3:return g5;case 4:return Z8;default:return h5}}function ZT(e,t,n,r){switch(t){case 1:return!e.n&&(e.n=new F(Q5,e,1,7)),e.n;case 2:return e.k}return W3e(e,t,n,r)}function QT(e,t,n){var r,i;return e.Pj()?(i=e.Qj(),r=dj(e,t,n),e.Jj(e.Ij(7,G(n),r,t,i)),r):dj(e,t,n)}function $T(e,t){var n,r,i;e.d==null?(++e.e,--e.f):(i=t.ld(),n=t.Bi(),r=(n&AP)%e.d.length,nWe(e,r,Zit(e,r,n,i)))}function eE(e,t){var n=(e.Bb&pF)!=0;t?e.Bb|=pF:e.Bb&=-1025,e.Db&4&&!(e.Db&1)&&AC(e,new vy(e,1,10,n,t))}function tE(e,t){var n=(e.Bb&uI)!=0;t?e.Bb|=uI:e.Bb&=-4097,e.Db&4&&!(e.Db&1)&&AC(e,new vy(e,1,12,n,t))}function nE(e,t){var n=(e.Bb&RU)!=0;t?e.Bb|=RU:e.Bb&=-8193,e.Db&4&&!(e.Db&1)&&AC(e,new vy(e,1,15,n,t))}function rE(e,t){var n=(e.Bb&zU)!=0;t?e.Bb|=zU:e.Bb&=-2049,e.Db&4&&!(e.Db&1)&&AC(e,new vy(e,1,11,n,t))}function n1e(e){var t;e.g&&(t=e.c.kg()?e.f:e.a,Ost(t.a,e.o,!0),Ost(t.a,e.o,!1),W(e.o,(mP(),Q1),(rA(),L8)))}function r1e(e){var t;if(!e.a)throw E(new Ii(`Cannot offset an unassigned cut.`));t=e.c-e.b,e.b+=t,NIe(e,t),MIe(e,t)}function i1e(e,t){var n=xh(e.k,t);if(n==null)throw E(new Vi(`Port did not exist in input.`));return yC(t,n),null}function a1e(e){var t,n;for(n=Git(Mx(e)).Kc();n.Ob();)if(t=kd(n.Pb()),JM(e,t))return _He((Zbe(),VVt),t);return null}function o1e(e){var t,n;for(n=e.p.a.ec().Kc();n.Ob();)if(t=P(n.Pb(),218),t.f&&e.b[t.c]<-1e-10)return t;return null}function s1e(e){var t,n=jh(new ta,91);for(t=!0;e.Ob();)t||(n.a+=PP),t=!1,hl(n,e.Pb());return(n.a+=`]`,n).a}function c1e(e){var t=new T,n,r;for(r=new w(e.b);r.at?1:e==t?e==0?aE(1/e,1/t):0:isNaN(e)?+!isNaN(t):-1}function u1e(e){var t=e.a[e.c-1&e.a.length-1];return t==null?null:(e.c=e.c-1&e.a.length-1,Sh(e.a,e.c,null),t)}function d1e(e){var t,n,r=0;for(n=e.length,t=0;t=1?n8:e8):n}function g1e(e){switch(P(K(e,(mP(),S1)),223).g){case 1:return new zre;case 3:return new Wre;default:return new Rre}}function lE(e){if(e.c)lE(e.c);else if(e.d)throw E(new Ii(`Stream already terminated, can't be modified or used`))}function uE(e,t,n){var r=e.a.get(t);return e.a.set(t,n===void 0?null:n),r===void 0?(++e.c,++e.b.g):++e.d,r}function _1e(e,t,n){var r,i;for(i=e.a.ec().Kc();i.Ob();)if(r=P(i.Pb(),10),$C(n,P(Ep(t,r.p),16)))return r;return null}function dE(e,t,n){var r=0;return t&&(Jl(e.a)?r+=t.f.a/2:r+=t.f.b/2),n&&(Jl(e.a)?r+=n.f.a/2:r+=n.f.b/2),r}function v1e(e,t,n){var r=n;!r&&(r=Qje(new di,0)),r.Ug(_bt,2),v4e(e.b,t,r.eh(1)),fmt(e,t,r.eh(1)),u_t(t,r.eh(1)),r.Vg()}function fE(e,t,n){var r=(Ia(),i=new tn,i),i;return Xx(r,t),Vx(r,n),e&&tb((!e.a&&(e.a=new ju(z5,e,5)),e.a),r),r}function pE(e){var t;return e.Db&64?Aj(e):(t=new Wu(Aj(e)),t.a+=` (identifier: `,pl(t,e.k),t.a+=`)`,t.a)}function mE(e,t){var n=(e.Bb&GH)!=0;t?e.Bb|=GH:e.Bb&=-32769,e.Db&4&&!(e.Db&1)&&AC(e,new vy(e,1,18,n,t))}function hE(e,t){var n=(e.Bb&GH)!=0;t?e.Bb|=GH:e.Bb&=-32769,e.Db&4&&!(e.Db&1)&&AC(e,new vy(e,1,18,n,t))}function gE(e,t){var n=(e.Bb&ZP)!=0;t?e.Bb|=ZP:e.Bb&=-16385,e.Db&4&&!(e.Db&1)&&AC(e,new vy(e,1,16,n,t))}function _E(e,t){var n=(e.Bb&pI)!=0;t?e.Bb|=pI:e.Bb&=-65537,e.Db&4&&!(e.Db&1)&&AC(e,new vy(e,1,20,n,t))}function vE(e){var t=V(K9,EF,28,2,15,1);return e-=pI,t[0]=(e>>10)+mI&OF,t[1]=(e&1023)+56320&OF,ND(t,0,t.length)}function y1e(e){var t=OA(e);return t>34028234663852886e22?cI:t<-34028234663852886e22?lI:t}function yE(e,t){var n;return Il(e)&&Il(t)&&(n=e+t,iI`+hv(t.c):`e_`+US(t),e.b&&e.c?hv(e.b)+`->`+hv(e.c):`e_`+US(e))}function S1e(e,t){return ff(t.b&&t.c?hv(t.b)+`->`+hv(t.c):`e_`+US(t),e.b&&e.c?hv(e.b)+`->`+hv(e.c):`e_`+US(e))}function CE(e,t){return uu(),fS(bF),r.Math.abs(e-t)<=bF||e==t||isNaN(e)&&isNaN(t)?0:et?1:Pl(isNaN(e),isNaN(t))}function wE(){wE=C,f8=new Nc(dL,0),u8=new Nc(`POLYLINE`,1),l8=new Nc(`ORTHOGONAL`,2),d8=new Nc(`SPLINES`,3)}function TE(){TE=C,IIt=new Sc(`ASPECT_RATIO_DRIVEN`,0),Q4=new Sc(`MAX_SCALE_DRIVEN`,1),FIt=new Sc(`AREA_DRIVEN`,2)}function C1e(e,t,n){var r;try{MZe(e,t,n)}catch(e){throw e=ew(e),j(e,606)?(r=e,E(new EUe(r))):E(e)}return t}function w1e(e){var t,n,r;for(n=0,r=e.length;nt&&r.Ne(e[a-1],e[a])>0;--a)o=e[a],Sh(e,a,e[a-1]),Sh(e,a-1,o)}function jE(e,t){var n=t.f,r,i,a,o;if(oO(e.c.d,n,t),t.g!=null)for(i=t.g,a=0,o=i.length;at){OBe(n);break}}Zm(n,t)}function A1e(e,t){var n,i=D(N(gD(Ev(t),(mP(),c0))));n=r.Math.max(0,i/2-.5),zk(t,n,1),M(e,new Oxe(t,n))}function j1e(e,t,n){var r;n.Ug(`Straight Line Edge Routing`,1),n.dh(t,mxt),r=P(J(t,(Pd(),y4)),27),ppt(e,r),n.dh(t,YV)}function ME(e,t){e.n.c.length==0&&M(e.n,new w_(e.s,e.t,e.i)),M(e.b,t),q4e(P(Ep(e.n,e.n.c.length-1),209),t),tft(e,t)}function NE(e){var t;this.a=(t=P(e.e&&e.e(),9),new xf(t,P(Yd(t,t.length),9),0)),this.b=V(WW,FP,1,this.a.a.length,5,1)}function PE(e){var t;return Array.isArray(e)&&e.Tm===ne?Ha($w(e))+`@`+(t=US(e)>>>0,t.toString(16)):e.toString()}function M1e(e,t){return e.h==eI&&e.m==0&&e.l==0?(t&&(mG=vu(0,0,0)),xCe(($b(),gG))):(t&&(mG=vu(e.l,e.m,e.h)),vu(0,0,0))}function N1e(e,t){switch(t.g){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function P1e(e,t){switch(t.g){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function FE(e,t,n,r){switch(t){case 3:return e.f;case 4:return e.g;case 5:return e.i;case 6:return e.j}return ZT(e,t,n,r)}function IE(e,t){if(t==e.d)return e.e;if(t==e.e)return e.d;throw E(new Fi(`Node `+t+` not part of edge `+e))}function F1e(e,t){var n=Qj(e.Dh(),t);if(j(n,102))return P(n,19);throw E(new Fi(HH+t+`' is not a valid reference`))}function LE(e,t,n,r){if(t<0)Pat(e,n,r);else{if(!n.rk())throw E(new Fi(HH+n.xe()+UH));P(n,69).wk().Ck(e,e.hi(),t,r)}}function RE(e){var t;if(e.b){if(RE(e.b),e.b.d!=e.c)throw E(new Vr)}else e.d.dc()&&(t=P(e.f.c.xc(e.e),16),t&&(e.d=t))}function I1e(e){Rd();var t=e.o.b,n,r,i;for(r=P(P(Dy(e.r,(nP(),m5)),21),87).Kc();r.Ob();)n=P(r.Pb(),117),i=n.e,i.b+=t}function L1e(e){var t,n,r;for(this.a=new Rl,r=new w(e);r.a=i)return t.c+n;return t.c+t.b.gc()}function z1e(e,t){Nd();var n,r=LGe(e),i=t,a;for(bb(r,0,r.length,i),n=0;n0&&(r+=i,++n);return n>1&&(r+=e.d*(n-1)),r}function V1e(e){var t,n,r,i,a=m7e(e);return n=eo(e.c),r=!n,r&&(i=new Tn,hx(a,`knownLayouters`,i),t=new Mhe(i),ly(e.c,t)),a}function HE(e){var t,n,r=new $i;for(r.a+=`[`,t=0,n=e.gc();t0&&(sv(t-1,e.length),e.charCodeAt(t-1)==58)&&!zE(e,y7,b7))}function WE(e,t){var n;return A(e)===A(t)?!0:j(t,92)?(n=P(t,92),e.e==n.e&&e.d==n.d&&xHe(e,n.a)):!1}function GE(e){switch(nP(),e.g){case 4:return Z8;case 1:return X8;case 3:return m5;case 2:return g5;default:return h5}}function G1e(e){var t,n;if(e.b)return e.b;for(n=_K?null:e.d;n;){if(t=_K?null:n.b,t)return t;n=_K?null:n.d}return Co(),hK}function KE(e){var t,n,r=D(N(e.a.of((vP(),q6))));for(n=new w(e.a.Sf());n.a>5,t=e&31,r=V(q9,HF,28,n+1,15,1),r[n]=1<3;)i*=10,--a;e=(e+(i>>1))/i|0}return r.i=e,!0}function eD(e,t){var n=(e.i??aN(e),e.i),r=t.Lj(),i;if(r!=-1){for(i=n.length;r=0;--r)for(t=n[r],i=0;i>1,this.k=t-1>>1}function f0e(e){gb(),P(e.of((vP(),D6)),181).Hc((UM(),A5))&&(P(e.of(z6),181).Fc((rj(),J8)),P(e.of(D6),181).Mc(A5))}function p0e(e){var t=e.d==(GA(),WX),n=x5e(e);t&&!n||!t&&n?W(e.a,(mP(),J$),(RO(),Z3)):W(e.a,(mP(),J$),(RO(),X3))}function aD(){aD=C,zo(),O0=(mP(),v0),EMt=Oy(U(O(j3,1),_V,149,0,[s0,c0,u0,d0,m0,h0,g0,_0,b0,S0,l0,f0,y0]))}function m0e(e,t){var n=P(ay(e,cb(new Te,new we,new Ne,U(O(xK,1),Z,108,0,[(Zw(),yK)]))),15);return n.Qc(MMe(n.gc()))}function h0e(e,t){var n,r=new nr(e.a.ad(t,!0));if(r.a.gc()<=1)throw E(new zr);return n=r.a.ec().Kc(),n.Pb(),P(n.Pb(),40)}function g0e(e,t,n){var r=D(e.p[t.i.p])+D(e.d[t.i.p])+t.n.b+t.a.b;return D(e.p[n.i.p])+D(e.d[n.i.p])+n.n.b+n.a.b-r}function oD(e,t){var n;return e.i>0&&(t.lengthe.i&&Sh(t,e.i,null),t}function sD(e){var t;return e.Db&64?DT(e):(t=new Wu(DT(e)),t.a+=` (instanceClassName: `,pl(t,e.D),t.a+=`)`,t.a)}function cD(e){var t,n,r,i=0;for(n=0,r=e.length;n0&&(e._j(),r=t==null?0:US(t),i=(r&AP)%e.d.length,n=Zit(e,i,r,t),n!=-1)}function v0e(e,t){var n,i;e.a=yE(e.a,1),e.c=r.Math.min(e.c,t),e.b=r.Math.max(e.b,t),e.d+=t,n=t-e.f,i=e.e+n,e.f=i-e.e-n,e.e=i}function dD(e,t){switch(t){case 3:Ux(e,0);return;case 4:Wx(e,0);return;case 5:Gx(e,0);return;case 6:Kx(e,0);return}vT(e,t)}function fD(e,t){switch(t.g){case 1:return Jf(e.j,(fC(),$J));case 2:return Jf(e.j,(fC(),tY));default:return Vg(),Vg(),QG}}function pD(e){gh();var t=e.Pc();switch(t.length){case 0:return QW;case 1:return new wp(ph(t[0]));default:return new u_(w1e(t))}}function y0e(e,t){e.Xj();try{e.d.bd(e.e++,t),e.f=e.d.j,e.g=-1}catch(e){throw e=ew(e),j(e,77)?E(new Vr):E(e)}}function mD(){mD=C,c9=new Xse,iHt=new Zse,aHt=new Qse,oHt=new $se,sHt=new ece,cHt=new tce,lHt=new nce,uHt=new rce,dHt=new ice}function hD(e,t){Sl();var n=Kd((Ci(),Ci(),dG)),r=null;return t==n&&(r=P(v_(uG,e),624)),r||(r=new ZPe(e),t==n&&H_(uG,e,r)),r}function b0e(e){return IO(),(e.q?e.q:(Vg(),Vg(),$G))._b((mP(),V1))?P(K(e,V1),203):P(K(Bh(e),H1),203)}function gD(e,t){var n,r=null;return yd(e,(mP(),p0))&&(n=P(K(e,p0),96),n.pf(t)&&(r=n.of(t))),r??=K(Bh(e),t),r}function x0e(e,t){var n,r,i;return j(t,44)?(n=P(t,44),r=n.ld(),i=TT(e.Rc(),r),zh(i,n.md())&&(i!=null||e.Rc()._b(r))):!1}function _D(e,t){var n,r,i;return e.f>0&&(e._j(),r=t==null?0:US(t),i=(r&AP)%e.d.length,n=Knt(e,i,r,t),n)?n.md():null}function vD(e,t,n){var r,i,a;return e.Pj()?(r=e.i,a=e.Qj(),jT(e,r,t),i=e.Ij(3,null,t,r,a),n?n.nj(i):n=i):jT(e,e.i,t),n}function S0e(e,t,n){var r=new Hb(e.e,4,10,(i=t.c,j(i,90)?P(i,29):(CP(),J7)),null,NO(e,t),!1),i;return n?n.nj(r):n=r,n}function C0e(e,t,n){var r=new Hb(e.e,3,10,null,(i=t.c,j(i,90)?P(i,29):(CP(),J7)),NO(e,t),!1),i;return n?n.nj(r):n=r,n}function w0e(e){Rd();var t=new Vl(P(e.e.of((vP(),E6)),8));return e.B.Hc((UM(),T5))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function yD(e){AM();var t,n=nm(e);return t=nm(um(e,32)),t==0?n>10||n<0?new Xv(1,n):YTt[n]:new Ize(n,t)}function bD(e,t){var n;return Il(e)&&Il(t)&&(n=e%t,iI=0?a=a.a[1]:(i=a,a=a.a[0])}return i}function OD(e,t,n){for(var r,i=null,a=e.b;a;){if(r=e.a.Ne(t,a.d),n&&r==0)return a;r<=0?a=a.a[0]:(i=a,a=a.a[1])}return i}function N0e(e,t,n,r){var i=!1,a,o;return mht(e.f,n,r)&&(_2e(e.f,e.a[t][n],e.a[t][r]),a=e.a[t],o=a[r],a[r]=a[n],a[n]=o,i=!0),i}function P0e(e,t,n){var r,i=P(xh(e.b,n),183),a,o;for(r=0,o=new w(t.j);o.a>5,r,i,a;return t&=31,i=e.d+n+(t==0?0:1),r=V(q9,HF,28,i,15,1),v7e(r,e.a,n,t),a=new Bm(e.e,i,r),Cv(a),a}function I0e(e,t){var n,r,i;for(r=new pm(Vu(OE(e).a.Kc(),new d));Cj(r);)if(n=P(by(r),18),i=n.d.i,i.c==t)return!1;return!0}function AD(e,t,n){var i,a,o,s=e.k,c=t.k;return i=n[s.g][c.g],a=N(gD(e,i)),o=N(gD(t,i)),r.Math.max((Gh(a),a),(Gh(o),o))}function L0e(){return Error.stackTraceLimit>0?(r.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):`stack`in Error()}function R0e(e,t){return uu(),uu(),fS(bF),(r.Math.abs(e-t)<=bF||e==t||isNaN(e)&&isNaN(t)?0:et?1:Pl(isNaN(e),isNaN(t)))>0}function jD(e,t){return uu(),uu(),fS(bF),(r.Math.abs(e-t)<=bF||e==t||isNaN(e)&&isNaN(t)?0:et?1:Pl(isNaN(e),isNaN(t)))<0}function z0e(e,t){return uu(),uu(),fS(bF),(r.Math.abs(e-t)<=bF||e==t||isNaN(e)&&isNaN(t)?0:et?1:Pl(isNaN(e),isNaN(t)))<=0}function MD(e,t){for(var n=0;!t[n]||t[n]==``;)n++;for(var r=t[n++];n0&&this.b>0&&(this.g=Pp(this.c,this.b,this.a))}function K0e(e,t){var n=e.a,r;t=String(t),n.hasOwnProperty(t)&&(r=n[t]);var i=(vw(),pG)[typeof r];return i?i(r):XQe(typeof r)}function RD(e){var t,n,r=null;if(t=dU in e.a,n=!t,n)throw E(new Vi(`Every element must have an id.`));return r=ij(A_(e,dU)),r}function zD(e){var t,n=vet(e);for(t=null;e.c==2;)hP(e),t||(t=(xP(),xP(),++W9,new lu(2)),LN(t,n),n=t),n.Jm(vet(e));return n}function BD(e,t){var n,r,i;return e._j(),r=t==null?0:US(t),i=(r&AP)%e.d.length,n=Knt(e,i,r,t),n?(aJe(e,n),n.md()):null}function q0e(e,t){return e.e>t.e?1:e.et.d?e.e:e.d=48&&e<48+r.Math.min(10,10)?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function Y0e(e,t){if(t.c==e)return t.d;if(t.d==e)return t.c;throw E(new Fi(`Input edge is not connected to the input port.`))}function X0e(e){if(qD(DH,e))return rd(),yG;if(qD(OH,e))return rd(),vG;throw E(new Fi(`Expecting true or false`))}function VD(e){switch(typeof e){case OP:return jw(e);case Vvt:return jl(e);case DP:return EDe(e);default:return e==null?0:td(e)}}function HD(e,t){if(e.a<0)throw E(new Ii(`Did not call before(...) or after(...) before calling add(...).`));return mEe(e,e.a,t),e}function UD(e){return R_(),j(e,162)?P(xh(f7,tEt),295).Rg(e):km(f7,$w(e))?P(xh(f7,$w(e)),295).Rg(e):null}function WD(e){var t,n;return e.Db&32||(n=(t=P(NC(e,16),29),bh(t||e.ii())-bh(e.ii())),n!=0&&GD(e,32,V(WW,FP,1,n,5,1))),e}function GD(e,t,n){var r;(e.Db&t)==0?n!=null&&pst(e,t,n):n==null?jrt(e,t):(r=pk(e,t),r==-1?e.Eb=n:Sh(rS(e.Eb),r,n))}function Z0e(e,t,n,r){var i,a;t.c.length!=0&&(i=Lat(n,r),a=ent(t),To(Cx(new Mp(null,new cv(a,1)),new Yie),new sIe(e,n,i,r)))}function Q0e(e,t){var n,r=e.a.length-1,i,a;return n=t-e.b&r,a=e.c-t&r,i=e.c-e.b&r,lDe(n=a?(PQe(e,t),-1):(NQe(e,t),1)}function KD(e){var t,n,r=e.Jh();if(!r)for(t=0,n=e.Ph();n;n=n.Ph()){if(++t>gI)return n.Qh();if(r=n.Jh(),r||n==e)break}return r}function $0e(e,t){var n;return A(t)===A(e)?!0:!j(t,21)||(n=P(t,21),n.gc()!=e.gc())?!1:e.Ic(n)}function e2e(e,t){return e.et.e?1:e.ft.f?1:US(e)-US(t)}function qD(e,t){return Gh(e),t==null?!1:ff(e,t)?!0:e.length==t.length&&ff(e.toLowerCase(),t.toLowerCase())}function JD(e){var t,n;return dT(e,-129)>0&&dT(e,128)<0?(WMe(),t=nm(e)+128,n=AG[t],!n&&(n=AG[t]=new Mn(e)),n):new Mn(e)}function YD(){YD=C,RJ=new Ds(wR,0),IJ=new Ds(`INSIDE_PORT_SIDE_GROUPS`,1),FJ=new Ds(`GROUP_MODEL_ORDER`,2),LJ=new Ds(vbt,3)}function t2e(e){var t;return e.b||eye(e,(t=hOe(e.e,e.a),!t||!ff(OH,_D((!t.b&&(t.b=new Td((CP(),$7),o9,t)),t.b),`qualified`)))),e.c}function n2e(e,t){for(var n=(sv(t,e.length),e.charCodeAt(t)),r=t+1;r2e3&&(ITt=e,sG=r.setTimeout(zye,10))),oG++==0&&(DKe((Si(),cG)),!0)}function x2e(e,t,n){var r;(mEt?(G1e(e),!0):hEt||_Et?(Co(),!0):gEt&&(Co(),!1))&&(r=new eke(t),r.b=n,w9e(e,r))}function eO(e,t){var n=!e.A.Hc((TD(),x5))||e.q==(rA(),R8);e.u.Hc((rj(),G8))?n?Qgt(e,t):Dgt(e,t):e.u.Hc(q8)&&(n?igt(e,t):x_t(e,t))}function S2e(e){var t;A(J(e,(vP(),g6)))===A((_T(),_8))&&(I_(e)?(t=P(J(I_(e),g6),346),OO(e,g6,t)):OO(e,g6,v8))}function C2e(e){var t,n;return yd(e.d.i,(mP(),Y1))?(t=P(K(e.c.i,Y1),17),n=P(K(e.d.i,Y1),17),_u(t.a,n.a)>0):!1}function w2e(e,t,n){return new wg(r.Math.min(e.a,t.a)-n/2,r.Math.min(e.b,t.b)-n/2,r.Math.abs(e.a-t.a)+n,r.Math.abs(e.b-t.b)+n)}function T2e(e){var t;this.d=new T,this.j=new Fa,this.g=new Fa,t=e.g.b,this.f=P(K(Bh(t),(mP(),_1)),88),this.e=D(N(yO(t,m0)))}function E2e(e){this.d=new T,this.e=new ry,this.c=V(q9,HF,28,(nP(),U(O(_5,1),TR,64,0,[h5,Z8,X8,m5,g5])).length,15,1),this.b=e}function tO(e,t,n){var r=n[e.g][t];switch(e.g){case 1:case 3:return new k(0,r);case 2:case 4:return new k(r,0);default:return null}}function D2e(e,t,n){var r,i=P(h_(t.f),205);try{i.rf(e,n),bFe(t.f,i)}catch(e){throw e=ew(e),j(e,103)?(r=e,E(r)):E(e)}}function O2e(e,t,n){var r=null,i,a,o,s=Ymt(dS(),t),c;return a=null,s&&(i=null,c=Pmt(s,n),o=null,c!=null&&(o=e.qf(s,c)),i=o,a=i),r=a,r}function nO(e,t,n,r){var i=e.length;if(t>=i)return i;for(t=t>0?t:0;tr&&Sh(t,r,null),t}function k2e(e,t){var n,r=e.a.length;for(t.lengthr&&Sh(t,r,null),t}function iO(e,t){var n,r;if(++e.j,t!=null&&(n=(r=e.a.Cb,j(r,99)?P(r,99).th():null),Jnt(t,n))){GD(e.a,4,n);return}GD(e.a,4,P(t,129))}function A2e(e){var t;if(e==null)return null;if(t=Qit(EN(e,!0)),t==null)throw E(new Hi(`Invalid hexBinary value: '`+e+`'`));return t}function aO(e,t,n){var r;t.a.length>0&&(M(e.b,new Aje(t.a,n)),r=t.a.length,0r&&(t.a+=Uwe(V(K9,EF,28,-r,15,1))))}function j2e(e,t,n){var r,i,a;if(!n[t.d])for(n[t.d]=!0,i=new w(eT(t));i.a=e.b>>1)for(r=e.c,n=e.b;n>t;--n)r=r.b;else for(r=e.a.a,n=0;n=0?e.Wh(i):cj(e,r)):n<0?cj(e,r):P(r,69).wk().Bk(e,e.hi(),n)}function H2e(e){var t,n,r=(!e.o&&(e.o=new lb((lP(),Z5),n7,e,0)),e.o);for(n=r.c.Kc();n.e!=n.i.gc();)t=P(n.Yj(),44),t.md();return Jy(r)}function hO(e){var t;if(j(e.a,4)){if(t=UD(e.a),t==null)throw E(new Ii(lSt+e.b+`'. `+sSt+(Ad(m7),m7.k)+cSt));return t}return e.a}function U2e(e,t){var n,r;if(e.j.length!=t.j.length)return!1;for(n=0,r=e.j.length;n=64&&t<128&&(i=dv(i,cm(1,t-64)));return i}function yO(e,t){var n,r=null;return yd(e,(vP(),K6))&&(n=P(K(e,K6),96),n.pf(t)&&(r=n.of(t))),r==null&&Bh(e)&&(r=K(Bh(e),t)),r}function W2e(e,t){var n=P(K(e,(mP(),j1)),75);return Cu(t,SOt)?n?Fg(n):(n=new ai,W(e,j1,n)):n&&W(e,j1,null),n}function bO(){bO=C,Iq=(vP(),Bzt),Pq=fzt,yDt=c6,Fq=A6,CDt=(Rk(),FK),SDt=NK,wDt=LK,xDt=MK,bDt=(qw(),kq),jq=gDt,Mq=_Dt,Nq=vDt}function xO(e){switch(Pbe(),this.c=new T,this.d=e,e.g){case 0:case 2:this.a=$h(NJ),this.b=cI;break;case 3:case 1:this.a=NJ,this.b=lI}}function G2e(e){var t;mf(P(K(e,(mP(),Q1)),101))&&(t=e.b,Znt((ov(0,t.c.length),P(t.c[0],30))),Znt(P(Ep(t,t.c.length-1),30)))}function K2e(e,t){t.Ug(`Self-Loop post-processing`,1),To(hg(hg(ox(new Mp(null,new cv(e.b,16)),new vne),new yne),new bne),new xne),t.Vg()}function q2e(e,t,n){var r,i;if(e.c)Gx(e.c,e.c.i+t),Kx(e.c,e.c.j+n);else for(i=new w(e.b);i.a=0&&(n.d=e.t);break;case 3:e.t>=0&&(n.a=e.t)}e.C&&(n.b=e.C.b,n.c=e.C.c)}function CO(){CO=C,LMt=new $s(vV,0),H0=new $s(JR,1),U0=new $s(`LINEAR_SEGMENTS`,2),V0=new $s(`BRANDES_KOEPF`,3),W0=new $s(Qbt,4)}function wO(){wO=C,wq=new xs(_L,0),Cq=new xs(vL,1),Tq=new xs(yL,2),Eq=new xs(bL,3),wq.a=!1,Cq.a=!0,Tq.a=!1,Eq.a=!0}function TO(){TO=C,gq=new ys(_L,0),hq=new ys(vL,1),_q=new ys(yL,2),vq=new ys(bL,3),gq.a=!1,hq.a=!0,_q.a=!1,vq.a=!0}function EO(e,t,n,r){var i;return n>=0?e.Sh(t,n,r):(e.Ph()&&(r=(i=e.Fh(),i>=0?e.Ah(r):e.Ph().Th(e,-1-i,null,r))),e.Ch(t,n,r))}function DO(e,t){switch(t){case 7:!e.e&&(e.e=new cf(U5,e,7,4)),RN(e.e);return;case 8:!e.d&&(e.d=new cf(U5,e,8,5)),RN(e.d);return}dD(e,t)}function OO(e,t,n){return n==null?(!e.o&&(e.o=new lb((lP(),Z5),n7,e,0)),BD(e.o,t)):(!e.o&&(e.o=new lb((lP(),Z5),n7,e,0)),Hk(e.o,t,n)),e}function t4e(e,t){Vg();var n=e,r,i,a=t;for(j(e,21)&&!j(t,21)&&(n=t,a=e),i=n.Kc();i.Ob();)if(r=i.Pb(),a.Hc(r))return!1;return!0}function n4e(e,t,n,r){return t.an.b)}function kO(e,t){return rl(e)?!!TTt[t]:e.Sm?!!e.Sm[t]:al(e)?!!wTt[t]:il(e)?!!CTt[t]:!1}function r4e(e){var t=e.a;do t=P(by(new pm(Vu(DE(t).a.Kc(),new d))),18).c.i,t.k==(DA(),qJ)&&e.b.Fc(t);while(t.k==(DA(),qJ));e.b=UE(e.b)}function i4e(e,t){var n,i,a=e;for(i=new pm(Vu(DE(t).a.Kc(),new d));Cj(i);)n=P(by(i),18),n.c.i.c&&(a=r.Math.max(a,n.c.i.c.p));return a}function a4e(e,t){var n,r,i=0;for(r=P(P(Dy(e.r,t),21),87).Kc();r.Ob();)n=P(r.Pb(),117),i+=n.d.d+n.b.Mf().b+n.d.a,r.Ob()&&(i+=e.w);return i}function o4e(e,t){var n,r,i=0;for(r=P(P(Dy(e.r,t),21),87).Kc();r.Ob();)n=P(r.Pb(),117),i+=n.d.b+n.b.Mf().a+n.d.c,r.Ob()&&(i+=e.w);return i}function s4e(e){var t,n,r=0,i=sM(e);if(i.c.length==0)return 1;for(n=new w(i);n.a=0?e.Lh(o,n,!0):mj(e,a,n)):P(a,69).wk().yk(e,e.hi(),i,n,r)}function d4e(e,t,n,r){var i=z$e(t.pf((vP(),C6))?P(t.of(C6),21):e.j);i!=(SP(),cq)&&(n&&!PD(i)||tet($it(e,i,r),t))}function f4e(e){switch(e.g){case 1:return KC(),mq;case 3:return KC(),dq;case 2:return KC(),pq;case 4:return KC(),fq;default:return null}}function p4e(e,t,n){if(e.e)switch(e.b){case 1:OIe(e.c,t,n);break;case 0:kIe(e.c,t,n)}else XVe(e.c,t,n);e.a[t.p][n.p]=e.c.i,e.a[n.p][t.p]=e.c.e}function m4e(e){var t,n;if(e==null)return null;for(n=V(UJ,X,199,e.length,0,2),t=0;t=0)return i;if(e.ol()){for(r=0;r=i)throw E(new lf(t,i));if(e.Si()&&(r=e.dd(n),r>=0&&r!=t))throw E(new Fi(vU));return e.Xi(t,n)}function FO(e,t){if(this.a=P(ph(e),253),this.b=P(ph(t),253),e.Ed(t)>0||e==(pi(),XW)||t==(mi(),ZW))throw E(new Fi(`Invalid range: `+tHe(e,t)))}function g4e(e){var t,n;for(this.b=new T,this.c=e,this.a=!1,n=new w(e.a);n.a0),(t&-t)==t)return C_(t*Lj(e,31)*4656612873077393e-25);do n=Lj(e,31),r=n%t;while(n-r+(t-1)<0);return C_(r)}function C4e(e,t,n){switch(n.g){case 1:e.a=t.a/2,e.b=0;break;case 2:e.a=t.a,e.b=t.b/2;break;case 3:e.a=t.a/2,e.b=t.b;break;case 4:e.a=0,e.b=t.b/2}}function HO(e,t,n,r){var i,a;for(i=t;i1&&(a=_4e(e,t)),a}function T4e(e){var t=D(N(J(e,(vP(),X6))))*r.Math.sqrt((!e.a&&(e.a=new F($5,e,10,11)),e.a).i);return new k(t,t/D(N(J(e,Y6))))}function GO(e){var t;return e.f&&e.f.Vh()&&(t=P(e.f,54),e.f=P(pT(e,t),84),e.f!=t&&e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,9,8,t,e.f))),e.f}function KO(e){var t;return e.i&&e.i.Vh()&&(t=P(e.i,54),e.i=P(pT(e,t),84),e.i!=t&&e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,9,7,t,e.i))),e.i}function qO(e){var t;return e.b&&e.b.Db&64&&(t=e.b,e.b=P(pT(e,t),19),e.b!=t&&e.Db&4&&!(e.Db&1)&&AC(e,new Sm(e,9,21,t,e.b))),e.b}function JO(e,t){var n,r,i;e.d==null?(++e.e,++e.f):(r=t.Bi(),hot(e,e.f+1),i=(r&AP)%e.d.length,n=e.d[i],!n&&(n=e.d[i]=e.dk()),n.Fc(t),++e.f)}function YO(e,t,n){var r;return t.tk()?!1:t.Ik()==-2?t.qk()==e.e.Dh()&&n==null:(r=t.ik(),r==null?n==null:NT(r,n))}function XO(){var e;vS(16,Qvt),e=UJe(16),this.b=V($W,fF,303,e,0,1),this.c=V($W,fF,303,e,0,1),this.a=null,this.e=null,this.i=0,this.f=e-1,this.g=0}function ZO(e){$De.call(this),this.k=(DA(),JJ),this.j=(vS(6,hF),new Hy(6)),this.b=(vS(2,hF),new Hy(2)),this.d=new ti,this.f=new ri,this.a=e}function E4e(e){var t,n;e.c.length<=1||(t=oct(e,(nP(),m5)),Tet(e,P(t.a,17).a,P(t.b,17).a),n=oct(e,g5),Tet(e,P(n.a,17).a,P(n.b,17).a))}function D4e(e,t,n){var r,i=e.a.b;for(r=i.c.length;r102?-1:e<=57?e-48:e<65?-1:e<=70?e-65+10:e<97?-1:e-97+10}function ik(e,t){if(e==null)throw E(new Li(`null key in entry: null=`+t));if(t==null)throw E(new Li(`null value in entry: `+e+`=null`))}function M4e(e,t){for(var n,r;e.Ob();)if(!t.Ob()||(n=e.Pb(),r=t.Pb(),!(A(n)===A(r)||n!=null&&NT(n,r))))return!1;return!t.Ob()}function N4e(e,t){var n=U(O(Z9,1),hI,28,15,[rT(e.a[0],t),rT(e.a[1],t),rT(e.a[2],t)]);return e.d&&(n[0]=r.Math.max(n[0],n[2]),n[2]=n[0]),n}function P4e(e,t){var n=U(O(Z9,1),hI,28,15,[iT(e.a[0],t),iT(e.a[1],t),iT(e.a[2],t)]);return e.d&&(n[0]=r.Math.max(n[0],n[2]),n[2]=n[0]),n}function ak(e,t,n){mf(P(K(t,(mP(),Q1)),101))||(eUe(e,t,NA(t,n)),eUe(e,t,NA(t,(nP(),m5))),eUe(e,t,NA(t,Z8)),Vg(),hu(t.j,new tme(e)))}function F4e(e){var t,n;for(e.c||wmt(e),n=new ai,t=new w(e.a),z(t);t.a0&&(sv(0,t.length),t.charCodeAt(0)==43)?(sv(1,t.length+1),t.substr(1)):t))}function e3e(e){var t;return e==null?null:new ru((t=EN(e,!0),t.length>0&&(sv(0,t.length),t.charCodeAt(0)==43)?(sv(1,t.length+1),t.substr(1)):t))}function t3e(e,t,n,r,i,a,o,s){var c,l;r&&(c=r.a[0],c&&t3e(e,t,n,c,i,a,o,s),Tk(e,n,r.d,i,a,o,s)&&t.Fc(r),l=r.a[1],l&&t3e(e,t,n,l,i,a,o,s))}function sk(e,t,n){try{return ol(IS(e,t,n),1)}catch(r){throw r=ew(r),j(r,333)?E(new Mi(SL+e.o+`*`+e.p+CL+t+PP+n+wL)):E(r)}}function n3e(e,t,n){try{return ol(IS(e,t,n),0)}catch(r){throw r=ew(r),j(r,333)?E(new Mi(SL+e.o+`*`+e.p+CL+t+PP+n+wL)):E(r)}}function r3e(e,t,n){try{return ol(IS(e,t,n),2)}catch(r){throw r=ew(r),j(r,333)?E(new Mi(SL+e.o+`*`+e.p+CL+t+PP+n+wL)):E(r)}}function i3e(e,t){if(e.g==-1)throw E(new Rr);e.Xj();try{e.d.hd(e.g,t),e.f=e.d.j}catch(e){throw e=ew(e),j(e,77)?E(new Vr):E(e)}}function a3e(e){var t,n,r,i,a;for(r=new w(e.b);r.aa&&Sh(t,a,null),t}function o3e(e,t){var n,r=e.gc();if(t==null){for(n=0;n0&&(c+=i),l[u]=o,o+=s*(c+r)}function _3e(e){var t,n,r=e.f;for(e.n=V(Z9,hI,28,r,15,1),e.d=V(Z9,hI,28,r,15,1),t=0;t0?e.c:0),++a;e.b=i,e.d=o}function S3e(e,t){var n=U(O(Z9,1),hI,28,15,[BO(e,(Ix(),XK),t),BO(e,ZK,t),BO(e,QK,t)]);return e.f&&(n[0]=r.Math.max(n[0],n[2]),n[2]=n[0]),n}function C3e(e,t,n){var r;try{EM(e,t+e.j,n+e.k,!1,!0)}catch(e){throw e=ew(e),j(e,77)?(r=e,E(new Mi(r.g+TL+t+PP+n+`).`))):E(e)}}function w3e(e,t,n){var r;try{EM(e,t+e.j,n+e.k,!0,!1)}catch(e){throw e=ew(e),j(e,77)?(r=e,E(new Mi(r.g+TL+t+PP+n+`).`))):E(e)}}function T3e(e){var t;yd(e,(mP(),R1))&&(t=P(K(e,R1),21),t.Hc((Ej(),w8))?(t.Mc(w8),t.Fc(E8)):t.Hc(E8)&&(t.Mc(E8),t.Fc(w8)))}function E3e(e){var t;yd(e,(mP(),R1))&&(t=P(K(e,R1),21),t.Hc((Ej(),j8))?(t.Mc(j8),t.Fc(k8)):t.Hc(k8)&&(t.Mc(k8),t.Fc(j8)))}function gk(e,t,n,r){var i,a,o,s;return e.a??j9e(e,t),o=t.b.j.c.length,a=n.d.p,s=r.d.p,i=s-1,i<0&&(i=o-1),a<=i?e.a[i]-e.a[a]:e.a[o-1]-e.a[a]+e.a[i]}function D3e(e){var t,n;if(!e.b)for(e.b=kv(P(e.f,27).kh().i),n=new Lu(P(e.f,27).kh());n.e!=n.i.gc();)t=P(gO(n),135),M(e.b,new Di(t));return e.b}function O3e(e){var t,n;if(!e.e)for(e.e=kv(og(P(e.f,27)).i),n=new Lu(og(P(e.f,27)));n.e!=n.i.gc();)t=P(gO(n),123),M(e.e,new ahe(t));return e.e}function k3e(e){var t,n;if(!e.a)for(e.a=kv(Gg(P(e.f,27)).i),n=new Lu(Gg(P(e.f,27)));n.e!=n.i.gc();)t=P(gO(n),27),M(e.a,new sd(e,t));return e.a}function _k(e){var t;if(!e.C&&(e.D!=null||e.B!=null))if(t=qht(e),t)e.hl(t);else try{e.hl(null)}catch(e){if(e=ew(e),!j(e,63))throw E(e)}return e.C}function A3e(e){switch(e.q.g){case 5:h8e(e,(nP(),Z8)),h8e(e,m5);break;case 4:Lmt(e,(nP(),Z8)),Lmt(e,m5);break;default:Het(e,(nP(),Z8)),Het(e,m5)}}function j3e(e){switch(e.q.g){case 5:g8e(e,(nP(),X8)),g8e(e,g5);break;case 4:Rmt(e,(nP(),X8)),Rmt(e,g5);break;default:Uet(e,(nP(),X8)),Uet(e,g5)}}function vk(e,t){var n,i,a=new Fa;for(i=e.Kc();i.Ob();)n=P(i.Pb(),36),kM(n,a.a,0),a.a+=n.f.a+t,a.b=r.Math.max(a.b,n.f.b);return a.b>0&&(a.b+=t),a}function yk(e,t){var n,i,a=new Fa;for(i=e.Kc();i.Ob();)n=P(i.Pb(),36),kM(n,0,a.b),a.b+=n.f.b+t,a.a=r.Math.max(a.a,n.f.a);return a.a>0&&(a.a+=t),a}function M3e(e){var t,n,i=AP;for(n=new w(e.a);n.a>16==6?e.Cb.Th(e,5,J5,t):(r=qO(P(_x((n=P(NC(e,16),29),n||e.ii()),e.Db>>16),19)),e.Cb.Th(e,r.n,r.f,t))}function F3e(e){Xg();var t=e.e;if(t&&t.stack){var n=t.stack,r=t+` `;return n.substring(0,r.length)==r&&(n=n.substring(r.length)),n.split(` @@ -23,5 +23,5 @@ import{i as e,r as t,t as n}from"./app-rolldown-runtime.js";import{n as r}from". `),i.length!=2)throw E(new Fi(`Exactly two numbers are expected, `+i.length+` were found.`));try{this.a=OA(qA(i[0])),this.b=OA(qA(i[1]))}catch(e){throw e=ew(e),j(e,130)?(n=e,E(new Fi(Tbt+n))):E(e)}},Q.Ib=function(){return`(`+this.a+`,`+this.b+`)`},Q.a=0,Q.b=0;var K3=L(MR,`KVector`,8);q(75,67,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1,75:1,423:1},ai,Ma,LEe),Q.Pc=function(){return xQe(this)},Q.cg=function(e){var t,n,r=nN(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | `),i,a,o;Fg(this);try{for(n=0,a=0,i=0,o=0;n0&&(a%2==0?i=OA(r[n]):o=OA(r[n]),a>0&&a%2!=0&&up(this,new k(i,o)),++a),++n}catch(e){throw e=ew(e),j(e,130)?(t=e,E(new Fi(`The given string does not match the expected format for vectors.`+t))):E(e)}},Q.Ib=function(){for(var e=new Gu(`(`),t=dO(this,0),n;t.b!=t.d.c;)n=P(Lv(t),8),gl(e,n.a+`,`+n.b),t.b!=t.d.c&&(e.a+=`; `);return(e.a+=`)`,e).a};var BRt=L(MR,`KVectorChain`,75);q(255,22,{3:1,34:1,22:1,255:1},Dc);var q3,J3,Y3,X3,Z3,Q3,VRt=aS(AH,`Alignment`,255,eG,lGe,HAe),HRt;q(991,1,nL,Jue),Q.hf=function(e){cdt(e)};var URt,$3,WRt,GRt,KRt,qRt,JRt,YRt,XRt,ZRt,QRt,$Rt;L(AH,`BoxLayouterOptions`,991),q(992,1,{},fse),Q.sf=function(){var e;return e=new hse,e},Q.tf=function(e){},L(AH,`BoxLayouterOptions/BoxFactory`,992),q(298,22,{3:1,34:1,22:1,298:1},Ac);var e6,t6,n6,r6,i6,a6,o6=aS(AH,`ContentAlignment`,298,eG,uGe,UAe),ezt;q(699,1,nL,Yue),Q.hf=function(e){jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,pSt),``),`Layout Algorithm`),`Select a specific layout algorithm.`),(VA(),W3)),LG),sE((uO(),F3))))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,mSt),``),`Resolved Layout Algorithm`),`Meta data associated with the selected algorithm.`),U3),PRt),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,GB),``),`Alignment`),`Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.`),nzt),B3),VRt),sE(P3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,FL),``),`Aspect Ratio`),`The desired aspect ratio of the drawing, that is the quotient of width by height.`),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,hSt),``),`Bend Points`),`A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points.`),U3),BRt),sE(M3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,rV),``),`Content Alignment`),`Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option.`),szt),V3),o6),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,WB),``),`Debug Mode`),`Whether additional debug information shall be generated.`),(rd(),!1)),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,JB),``),Vyt),`Overall direction of edges: horizontal (right / left) or vertical (down / up).`),czt),B3),a8),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,xB),``),`Edge Routing`),`What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline.`),dzt),B3),p8),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,dSt),``),`Expand Nodes`),`If active, nodes are expanded to fill the area of their parent.`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,bB),``),`Hierarchy Handling`),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),hzt),B3),yBt),Zp(F3,U(O(L3,1),Z,170,0,[P3]))))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,IL),``),`Padding`),`The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately.`),Tzt),U3),ZJ),Zp(F3,U(O(L3,1),Z,170,0,[P3]))))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,tR),``),`Interactive`),`Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible.`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,hV),``),`interactive Layout`),`Whether the graph should be changeable interactively and by setting constraints`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,iR),``),`Omit Node Micro Layout`),`Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout.`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,nR),``),`Port Constraints`),`Defines constraints of the position of the ports of a node.`),Nzt),B3),DBt),sE(P3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,fV),``),`Position`),`The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position.`),U3),K3),Zp(P3,U(O(L3,1),Z,170,0,[I3,N3]))))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,XL),``),`Priority`),`Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.`),H3),DG),Zp(P3,U(O(L3,1),Z,170,0,[M3]))))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,$L),``),`Randomization Seed`),`Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time).`),H3),DG),sE(F3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,eR),``),`Separate Connected Components`),`Whether each connected component should be processed separately.`),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,iV),``),`Junction Points`),`This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order.`),_zt),U3),BRt),sE(M3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,sV),``),`Comment Box`),`Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related.`),!1),R3),bG),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,cV),``),`Hypernode`),`Whether the node should be handled as a hypernode.`),!1),R3),bG),sE(P3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,gSt),``),`Label Manager`),`Label managers can shorten labels upon a layout algorithm's request.`),U3),uUt),Zp(F3,U(O(L3,1),Z,170,0,[N3]))))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,pV),``),`Margins`),`Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels.`),vzt),U3),HJ),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,HB),``),`No Layout`),`No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node.`),!1),R3),bG),Zp(P3,U(O(L3,1),Z,170,0,[M3,I3,N3]))))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,_St),``),`Scale Factor`),`The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set.`),1),z3),TG),sE(P3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,vSt),``),`Child Area Width`),`The width of the area occupied by the laid out children of a node.`),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,ySt),``),`Child Area Height`),`The height of the area occupied by the laid out children of a node.`),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,uR),``),aSt),`Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'`),!1),R3),bG),sE(F3)))),wv(e,uR,mR,null),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,bSt),``),`Animate`),`Whether the shift from the old layout to the new computed layout shall be animated.`),!0),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,xSt),``),`Animation Time Factor`),`Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'.`),G(100)),H3),DG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,SSt),``),`Layout Ancestors`),`Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process.`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,CSt),``),`Maximal Animation Time`),`The maximal time for animations, in milliseconds.`),G(4e3)),H3),DG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,wSt),``),`Minimal Animation Time`),`The minimal time for animations, in milliseconds.`),G(400)),H3),DG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,TSt),``),`Progress Bar`),`Whether a progress bar shall be displayed during layout computations.`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,ESt),``),`Validate Graph`),`Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,DSt),``),`Validate Options`),`Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.`),!0),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,OSt),``),`Zoom to Fit`),`Whether the zoom level shall be set to view the whole diagram after layout.`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,fSt),`box`),`Box Layout Mode`),`Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better.`),azt),B3),JBt),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,AB),SB),`Comment Comment Spacing`),`Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing.`),10),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,jB),SB),`Comment Node Spacing`),`Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing.`),10),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,NL),SB),`Components Spacing`),`Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated.`),20),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,MB),SB),`Edge Spacing`),`Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines.`),10),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,QL),SB),`Edge Label Spacing`),`The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option.`),2),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,NB),SB),`Edge Node Spacing`),`Spacing to be preserved between nodes and edges.`),10),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,PB),SB),`Label Spacing`),`Determines the amount of space to be left between two labels of the same graph element.`),0),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,LB),SB),`Label Node Spacing`),`Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option.`),5),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,FB),SB),`Horizontal spacing between Label and Port`),`Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option.`),1),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,IB),SB),`Vertical spacing between Label and Port`),`Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option.`),1),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,ZL),SB),`Node Spacing`),`The minimal distance to be preserved between each two nodes.`),20),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,RB),SB),`Node Self Loop Spacing`),`Spacing to be preserved between a node and its self loops.`),10),z3),TG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,zB),SB),`Port Spacing`),`Spacing between pairs of ports of the same node.`),10),z3),TG),Zp(F3,U(O(L3,1),Z,170,0,[P3]))))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,BB),SB),`Individual Spacing`),`Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent.`),U3),XBt),Zp(P3,U(O(L3,1),Z,170,0,[M3,I3,N3]))))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,mV),SB),`Additional Port Space`),`Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border.`),Yzt),U3),HJ),sE(F3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,dV),PSt),`Layout Partition`),`Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction).`),H3),DG),Zp(F3,U(O(L3,1),Z,170,0,[P3]))))),wv(e,dV,uV,kzt),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,uV),PSt),`Layout Partitioning`),`Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle.`),Dzt),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,YB),FSt),`Node Label Padding`),`Define padding for node labels that are placed inside of a node.`),bzt),U3),ZJ),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,cR),FSt),`Node Label Placement`),`Hints for where node labels are to be placed; if empty, the node label's position is not modified.`),xzt),V3),M8),Zp(P3,U(O(L3,1),Z,170,0,[N3]))))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,QB),MH),`Port Alignment`),`Defines the default port distribution for a node. May be overridden for each side individually.`),jzt),B3),I8),sE(P3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,$B),MH),`Port Alignment (North)`),`Defines how ports on the northern side are placed, overriding the node's general port alignment.`),B3),I8),sE(P3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,eV),MH),`Port Alignment (South)`),`Defines how ports on the southern side are placed, overriding the node's general port alignment.`),B3),I8),sE(P3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,tV),MH),`Port Alignment (West)`),`Defines how ports on the western side are placed, overriding the node's general port alignment.`),B3),I8),sE(P3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,nV),MH),`Port Alignment (East)`),`Defines how ports on the eastern side are placed, overriding the node's general port alignment.`),B3),I8),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,sR),NH),`Node Size Constraints`),`What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed.`),Szt),V3),S5),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,oR),NH),`Node Size Options`),`Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.`),wzt),V3),LBt),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,gR),NH),`Node Size Minimum`),`The minimal size to which a node can be reduced.`),Czt),U3),K3),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,aR),NH),`Fixed Graph Size`),`By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so.`),!1),R3),bG),sE(F3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,aV),OB),`Edge Label Placement`),`Gives a hint on where to put edge labels.`),lzt),B3),rBt),sE(N3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,rR),OB),`Inline Edge Labels`),`If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible.`),!1),R3),bG),sE(N3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,kSt),`font`),`Font Name`),`Font name used for a label.`),W3),LG),sE(N3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,ASt),`font`),`Font Size`),`Font size used for a label.`),H3),DG),sE(N3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,lV),PH),`Port Anchor Offset`),`The offset to the port position where connections shall be attached.`),U3),K3),sE(I3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,oV),PH),`Port Index`),`The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case.`),H3),DG),sE(I3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,UB),PH),`Port Side`),`The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports.`),Izt),B3),_5),sE(I3)))),jE(e,new zA(Aa(ka(ja(wa(Oa(Ea(Da(new $t,VB),PH),`Port Border Offset`),`The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border.`),z3),TG),sE(I3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,lR),ISt),`Port Label Placement`),`Decides on a placement method for port labels; if empty, the node label's position is not modified.`),Pzt),V3),Y8),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,XB),ISt),`Port Labels Next to Port`),`Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE.`),!1),R3),bG),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,ZB),ISt),`Treat Port Labels as Group`),`If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port.`),!0),R3),bG),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,dR),FH),`Topdown Scale Factor`),`The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes.`),1),z3),TG),sE(F3)))),wv(e,dR,mR,$zt),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,jSt),FH),`Topdown Size Approximator`),`The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size.`),null),B3),P5),sE(P3)))),wv(e,jSt,mR,tBt),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,fR),FH),`Topdown Hierarchical Node Width`),`The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.`),150),z3),TG),Zp(F3,U(O(L3,1),Z,170,0,[P3]))))),wv(e,fR,mR,null),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,pR),FH),`Topdown Hierarchical Node Aspect Ratio`),`The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.`),1.414),z3),TG),Zp(F3,U(O(L3,1),Z,170,0,[P3]))))),wv(e,pR,mR,null),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,mR),FH),`Topdown Node Type`),`The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes.`),null),B3),BBt),sE(P3)))),wv(e,mR,aR,null),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,MSt),FH),`Topdown Scale Cap`),`Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes.`),1),z3),TG),sE(F3)))),wv(e,MSt,mR,Qzt),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,KB),LSt),`Activate Inside Self Loops`),`Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports.`),!1),R3),bG),sE(P3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,qB),LSt),`Inside Self Loop`),`Whether a self loop should be routed inside a node instead of around that node.`),!1),R3),bG),sE(M3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,PL),`edge`),`Edge Thickness`),`The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it.`),1),z3),TG),sE(M3)))),jE(e,new zA(Aa(ka(ja(Ta(wa(Oa(Ea(Da(new $t,NSt),`edge`),`Edge Type`),`The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.`),pzt),B3),dBt),sE(M3)))),Uo(e,new ev(xa(Ca(Sa(new Qt,fI),`Layered`),`The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.`))),Uo(e,new ev(xa(Ca(Sa(new Qt,`org.eclipse.elk.orthogonal`),`Orthogonal`),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),Uo(e,new ev(xa(Ca(Sa(new Qt,YL),`Force`),`Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984.`))),Uo(e,new ev(xa(Ca(Sa(new Qt,`org.eclipse.elk.circle`),`Circle`),`Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph.`))),Uo(e,new ev(xa(Ca(Sa(new Qt,dxt),`Tree`),`Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.`))),Uo(e,new ev(xa(Ca(Sa(new Qt,`org.eclipse.elk.planar`),`Planar`),`Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable.`))),Uo(e,new ev(xa(Ca(Sa(new Qt,iH),`Radial`),`Radial layout algorithms usually position the nodes of the graph on concentric circles.`))),Klt((new Xue,e)),cdt((new Jue,e)),bct((new Zue,e))};var s6,tzt,nzt,c6,rzt,izt,azt,l6,u6,ozt,d6,szt,f6,p6,czt,m6,h6,lzt,uzt,dzt,fzt,pzt,mzt,g6,hzt,gzt,_6,v6,y6,b6,x6,_zt,S6,vzt,yzt,bzt,C6,xzt,w6,Szt,T6,E6,Czt,D6,wzt,O6,k6,A6,Tzt,Ezt,Dzt,Ozt,kzt,Azt,jzt,j6,M6,N6,P6,Mzt,F6,I6,Nzt,L6,R6,z6,Pzt,Fzt,B6,Izt,V6,H6,U6,W6,Lzt,G6,Rzt,zzt,Bzt,Vzt,Hzt,Uzt,K6,Wzt,q6,Gzt,Kzt,J6,qzt,Jzt,Yzt,Xzt,Y6,X6,Z6,Q6,Zzt,Qzt,$6,$zt,eBt,tBt;L(AH,`CoreOptions`,699),q(88,22,{3:1,34:1,22:1,88:1},jc);var e8,t8,n8,r8,i8,a8=aS(AH,Vyt,88,eG,KHe,WAe),nBt;q(278,22,{3:1,34:1,22:1,278:1},Mc);var o8,s8,c8,rBt=aS(AH,`EdgeLabelPlacement`,278,eG,Eze,GAe),iBt;q(223,22,{3:1,34:1,22:1,223:1},Nc);var l8,u8,d8,f8,p8=aS(AH,`EdgeRouting`,223,eG,MVe,KAe),aBt;q(321,22,{3:1,34:1,22:1,321:1},Pc);var oBt,sBt,cBt,lBt,m8,uBt,dBt=aS(AH,`EdgeType`,321,eG,cGe,qAe),fBt;q(989,1,nL,Xue),Q.hf=function(e){Klt(e)};var pBt,mBt,hBt,gBt,_Bt,vBt,h8;L(AH,`FixedLayouterOptions`,989),q(990,1,{},pse),Q.sf=function(){var e;return e=new wse,e},Q.tf=function(e){},L(AH,`FixedLayouterOptions/FixedFactory`,990),q(346,22,{3:1,34:1,22:1,346:1},Fc);var g8,_8,v8,yBt=aS(AH,`HierarchyHandling`,346,eG,wze,JAe),bBt;q(291,22,{3:1,34:1,22:1,291:1},Ic);var y8,b8,x8,S8,xBt=aS(AH,`LabelSide`,291,eG,jVe,YAe),SBt;q(95,22,{3:1,34:1,22:1,95:1},Lc);var C8,w8,T8,E8,D8,O8,k8,A8,j8,M8=aS(AH,`NodeLabelPlacement`,95,eG,Lqe,XAe),CBt;q(256,22,{3:1,34:1,22:1,256:1},Rc);var wBt,N8,P8,TBt,F8,I8=aS(AH,`PortAlignment`,256,eG,pUe,ZAe),EBt;q(101,22,{3:1,34:1,22:1,101:1},zc);var L8,R8,z8,B8,V8,H8,DBt=aS(AH,`PortConstraints`,101,eG,sGe,QAe),OBt;q(279,22,{3:1,34:1,22:1,279:1},Bc);var U8,W8,G8,K8,q8,J8,Y8=aS(AH,`PortLabelPlacement`,279,eG,oGe,$Ae),kBt;q(64,22,{3:1,34:1,22:1,64:1},Vc);var X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5=aS(AH,`PortSide`,64,eG,qHe,eje),ABt;q(993,1,nL,Zue),Q.hf=function(e){bct(e)};var jBt,MBt,NBt,PBt,FBt;L(AH,`RandomLayouterOptions`,993),q(994,1,{},mse),Q.sf=function(){var e;return e=new xse,e},Q.tf=function(e){},L(AH,`RandomLayouterOptions/RandomFactory`,994),q(386,22,{3:1,34:1,22:1,386:1},Hc);var v5,y5,b5,x5,S5=aS(AH,`SizeConstraint`,386,eG,AVe,tje),IBt;q(264,22,{3:1,34:1,22:1,264:1},Uc);var C5,w5,T5,E5,D5,O5,k5,A5,j5,LBt=aS(AH,`SizeOptions`,264,eG,fJe,nje),RBt;q(280,22,{3:1,34:1,22:1,280:1},Wc);var M5,zBt,N5,BBt=aS(AH,`TopdownNodeTypes`,280,eG,Dze,rje),VBt;q(347,22,RSt);var HBt,UBt,P5=aS(AH,`TopdownSizeApproximator`,347,eG,kLe,aje);q(987,347,RSt,AMe),Q.Tg=function(e){return T4e(e)},aS(AH,`TopdownSizeApproximator/1`,987,P5,null,null),q(988,347,RSt,cPe),Q.Tg=function(e){var t=P(J(e,(vP(),W6)),143),n,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,ee=(Ia(),m=new ii,m),te,ne,C;for(qj(ee,e),te=new Dr,o=new Lu((!e.a&&(e.a=new F($5,e,10,11)),e.a));o.e!=o.i.gc();)i=P(gO(o),27),y=(p=new ii,p),Gj(y,ee),qj(y,i),C=T4e(i),Ql(y,r.Math.max(i.g,C.a),r.Math.max(i.f,C.b)),XA(te.f,i,y);for(a=new Lu((!e.a&&(e.a=new F($5,e,10,11)),e.a));a.e!=a.i.gc();)for(i=P(gO(a),27),d=new Lu((!i.e&&(i.e=new cf(U5,i,7,4)),i.e));d.e!=d.i.gc();)u=P(gO(d),74),x=P(nl(Kp(te.f,i)),27),S=P(xh(te,H((!u.c&&(u.c=new cf(H5,u,5,8)),u.c),0)),27),b=(f=new nn,f),tb((!b.b&&(b.b=new cf(H5,b,4,7)),b.b),x),tb((!b.c&&(b.c=new cf(H5,b,5,8)),b.c),S),Hj(b,I_(x)),qj(b,u);g=P(h_(t.f),205);try{g.rf(ee,new Dse),bFe(t.f,g)}catch(e){throw e=ew(e),j(e,103)?(h=e,E(h)):E(e)}return qy(ee,u6)||qy(ee,l6)||G_t(ee),l=D(N(J(ee,u6))),c=D(N(J(ee,l6))),s=l/c,n=D(N(J(ee,X6)))*r.Math.sqrt((!ee.a&&(ee.a=new F($5,ee,10,11)),ee.a).i),ne=P(J(ee,A6),107),v=ne.b+ne.c+1,_=ne.d+ne.a+1,new k(r.Math.max(v,n),r.Math.max(_,n/s))},aS(AH,`TopdownSizeApproximator/2`,988,P5,null,null);var WBt;q(344,1,{871:1},di),Q.Ug=function(e,t){return p7e(this,e,t)},Q.Vg=function(){Q9e(this)},Q.Wg=function(){return this.q},Q.Xg=function(){return this.f?Zg(this.f):null},Q.Yg=function(){return Zg(this.a)},Q.Zg=function(){return this.p},Q.$g=function(){return!1},Q._g=function(){return this.n},Q.ah=function(){return this.p!=null&&!this.b},Q.bh=function(e){var t;this.n&&(t=e,M(this.f,t))},Q.dh=function(e,t){var n,r;this.n&&e&&Xze(this,(n=new GPe,r=WM(n,e),Yht(n),r),(Mw(),I5))},Q.eh=function(e){var t;return this.b?null:(t=XKe(this,this.g),up(this.a,t),t.i=this,this.d=e,t)},Q.fh=function(e){e>0&&!this.b&&kJe(this,e)},Q.b=!1,Q.c=0,Q.d=-1,Q.e=null,Q.f=null,Q.g=-1,Q.j=!1,Q.k=!1,Q.n=!1,Q.o=0,Q.q=0,Q.r=0,L(gV,`BasicProgressMonitor`,344),q(717,205,OL,hse),Q.rf=function(e,t){Xdt(e,t)},L(gV,`BoxLayoutProvider`,717),q(983,1,GI,ehe),Q.Ne=function(e,t){return mot(this,P(e,27),P(t,27))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new Yn(this)},Q.a=!1,L(gV,`BoxLayoutProvider/1`,983),q(163,1,{163:1},Fx,qEe),Q.Ib=function(){return this.c?Elt(this.c):CA(this.b)},L(gV,`BoxLayoutProvider/Group`,163),q(320,22,{3:1,34:1,22:1,320:1},Gc);var GBt,KBt,qBt,F5,JBt=aS(gV,`BoxLayoutProvider/PackingMode`,320,eG,NVe,oje),YBt;q(984,1,GI,gse),Q.Ne=function(e,t){return PIe(P(e,163),P(t,163))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new Yn(this)},L(gV,`BoxLayoutProvider/lambda$0$Type`,984),q(985,1,GI,_se),Q.Ne=function(e,t){return SIe(P(e,163),P(t,163))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new Yn(this)},L(gV,`BoxLayoutProvider/lambda$1$Type`,985),q(986,1,GI,vse),Q.Ne=function(e,t){return CIe(P(e,163),P(t,163))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new Yn(this)},L(gV,`BoxLayoutProvider/lambda$2$Type`,986),q(1384,1,{845:1},yse),Q.Mg=function(e,t){return zo(),!j(t,167)||Cye((lw(),P(e,167)),t)},L(gV,`ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type`,1384),q(1385,1,$P,the),Q.Cd=function(e){EQe(this.a,P(e,149))},L(gV,`ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type`,1385),q(1386,1,$P,Sse),Q.Cd=function(e){P(e,96),zo()},L(gV,`ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type`,1386),q(1390,1,$P,nhe),Q.Cd=function(e){sYe(this.a,P(e,96))},L(gV,`ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type`,1390),q(1388,1,vF,ySe),Q.Mb=function(e){return WZe(this.a,this.b,P(e,149))},L(gV,`ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type`,1388),q(1387,1,vF,bSe),Q.Mb=function(e){return wEe(this.a,this.b,P(e,845))},L(gV,`ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type`,1387),q(1389,1,$P,xSe),Q.Cd=function(e){nPe(this.a,this.b,P(e,149))},L(gV,`ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type`,1389),q(947,1,{},Cse),Q.Kb=function(e){return LCe(e)},Q.Fb=function(e){return this===e},L(gV,`ElkUtil/lambda$0$Type`,947),q(948,1,$P,SSe),Q.Cd=function(e){Gnt(this.a,this.b,P(e,74))},Q.a=0,Q.b=0,L(gV,`ElkUtil/lambda$1$Type`,948),q(949,1,$P,CSe),Q.Cd=function(e){X_e(this.a,this.b,P(e,166))},Q.a=0,Q.b=0,L(gV,`ElkUtil/lambda$2$Type`,949),q(950,1,$P,wSe),Q.Cd=function(e){rwe(this.a,this.b,P(e,135))},Q.a=0,Q.b=0,L(gV,`ElkUtil/lambda$3$Type`,950),q(951,1,$P,rhe),Q.Cd=function(e){jMe(this.a,P(e,377))},L(gV,`ElkUtil/lambda$4$Type`,951),q(325,1,{34:1,325:1},Er),Q.Fd=function(e){return aTe(this,P(e,242))},Q.Fb=function(e){var t;return j(e,325)?(t=P(e,325),this.a==t.a):!1},Q.Hb=function(){return C_(this.a)},Q.Ib=function(){return this.a+` (exclusive)`},Q.a=0,L(gV,`ExclusiveBounds/ExclusiveLowerBound`,325),q(1119,205,OL,wse),Q.rf=function(e,t){var n,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S,ee,te,ne,C;for(t.Ug(`Fixed Layout`,1),o=P(J(e,(vP(),uzt)),223),p=0,m=0,b=new Lu((!e.a&&(e.a=new F($5,e,10,11)),e.a));b.e!=b.i.gc();){for(v=P(gO(b),27),C=P(J(v,(Iw(),h8)),8),C&&($l(v,C.a,C.b),P(J(v,mBt),181).Hc((TD(),v5))&&(h=P(J(v,gBt),8),h.a>0&&h.b>0&&iP(v,h.a,h.b,!0,!0))),p=r.Math.max(p,v.i+v.g),m=r.Math.max(m,v.j+v.f),u=new Lu((!v.n&&(v.n=new F(Q5,v,1,7)),v.n));u.e!=u.i.gc();)c=P(gO(u),135),C=P(J(c,h8),8),C&&$l(c,C.a,C.b),p=r.Math.max(p,v.i+c.i+c.g),m=r.Math.max(m,v.j+c.j+c.f);for(ee=new Lu((!v.c&&(v.c=new F(e7,v,9,9)),v.c));ee.e!=ee.i.gc();)for(S=P(gO(ee),123),C=P(J(S,h8),8),C&&$l(S,C.a,C.b),te=v.i+S.i,ne=v.j+S.j,p=r.Math.max(p,te+S.g),m=r.Math.max(m,ne+S.f),l=new Lu((!S.n&&(S.n=new F(Q5,S,1,7)),S.n));l.e!=l.i.gc();)c=P(gO(l),135),C=P(J(c,h8),8),C&&$l(c,C.a,C.b),p=r.Math.max(p,te+c.i+c.g),m=r.Math.max(m,ne+c.j+c.f);for(a=new pm(Vu(Ij(v).a.Kc(),new d));Cj(a);)n=P(by(a),74),f=r_t(n),p=r.Math.max(p,f.a),m=r.Math.max(m,f.b);for(i=new pm(Vu(Fj(v).a.Kc(),new d));Cj(i);)n=P(by(i),74),I_(xA(n))!=e&&(f=r_t(n),p=r.Math.max(p,f.a),m=r.Math.max(m,f.b))}if(o==(wE(),l8))for(y=new Lu((!e.a&&(e.a=new F($5,e,10,11)),e.a));y.e!=y.i.gc();)for(v=P(gO(y),27),i=new pm(Vu(Ij(v).a.Kc(),new d));Cj(i);)n=P(by(i),74),s=Sdt(n),s.b==0?OO(n,x6,null):OO(n,x6,s);ki(Od(J(e,(Iw(),hBt))))||(x=P(J(e,_Bt),107),_=p+x.b+x.c,g=m+x.d+x.a,iP(e,_,g,!0,!0)),t.Vg()},L(gV,`FixedLayoutProvider`,1119),q(385,137,{3:1,423:1,385:1,96:1,137:1},en,uKe),Q.cg=function(e){var t,n,r,i,a,o,s,c,l;if(e)try{for(c=nN(e,`;,;`),a=c,o=0,s=a.length;o>16&OF|t^r<<16},Q.Kc=function(){return new ihe(this)},Q.Ib=function(){return this.a==null&&this.b==null?`pair(null,null)`:this.a==null?`pair(null,`+PE(this.b)+`)`:this.b==null?`pair(`+PE(this.a)+`,null)`:`pair(`+PE(this.a)+`,`+PE(this.b)+`)`},L(gV,`Pair`,42),q(995,1,VP,ihe),Q.Nb=function(e){Om(this,e)},Q.Ob=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},Q.Pb=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw E(new Hr)},Q.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),E(new Rr)},Q.b=!1,Q.c=!1,L(gV,`Pair/1`,995),q(455,1,{455:1},cIe),Q.Fb=function(e){return rg(this.a,P(e,455).a)&&rg(this.c,P(e,455).c)&&rg(this.d,P(e,455).d)&&rg(this.b,P(e,455).b)},Q.Hb=function(){return tT(U(O(WW,1),FP,1,5,[this.a,this.c,this.d,this.b]))},Q.Ib=function(){return`(`+this.a+PP+this.c+PP+this.d+PP+this.b+`)`},L(gV,`Quadruple`,455),q(1108,205,OL,xse),Q.rf=function(e,t){var n,r,i,a,o;if(t.Ug(`Random Layout`,1),(!e.a&&(e.a=new F($5,e,10,11)),e.a).i==0){t.Vg();return}a=P(J(e,(wD(),PBt)),17),i=a&&a.a!=0?new sy(a.a):new YE,n=Ai(N(J(e,jBt))),o=Ai(N(J(e,FBt))),r=P(J(e,MBt),107),wgt(e,i,n,o,r),t.Vg()},L(gV,`RandomLayoutProvider`,1108),q(240,1,{240:1},Vf),Q.Fb=function(e){return rg(this.a,P(e,240).a)&&rg(this.b,P(e,240).b)&&rg(this.c,P(e,240).c)},Q.Hb=function(){return tT(U(O(WW,1),FP,1,5,[this.a,this.b,this.c]))},Q.Ib=function(){return`(`+this.a+PP+this.b+PP+this.c+`)`},L(gV,`Triple`,240);var nVt;q(562,1,{}),Q.Lf=function(){return new k(this.f.i,this.f.j)},Q.of=function(e){return nLe(e,(vP(),F6))?J(this.f,rVt):J(this.f,e)},Q.Mf=function(){return new k(this.f.g,this.f.f)},Q.Nf=function(){return this.g},Q.pf=function(e){return qy(this.f,e)},Q.Of=function(e){Gx(this.f,e.a),Kx(this.f,e.b)},Q.Pf=function(e){Wx(this.f,e.a),Ux(this.f,e.b)},Q.Qf=function(e){this.g=e},Q.g=0;var rVt;L(RH,`ElkGraphAdapters/AbstractElkGraphElementAdapter`,562),q(563,1,{853:1},_r),Q.Rf=function(){var e,t;if(!this.b)for(this.b=kv(ag(this.a).i),t=new Lu(ag(this.a));t.e!=t.i.gc();)e=P(gO(t),135),M(this.b,new Di(e));return this.b},Q.b=null,L(RH,`ElkGraphAdapters/ElkEdgeAdapter`,563),q(289,562,{},Ei),Q.Sf=function(){return k3e(this)},Q.a=null,L(RH,`ElkGraphAdapters/ElkGraphAdapter`,289),q(640,562,{187:1},Di),L(RH,`ElkGraphAdapters/ElkLabelAdapter`,640),q(639,562,{695:1},sd),Q.Rf=function(){return D3e(this)},Q.Vf=function(){var e;return e=P(J(this.f,(vP(),S6)),140),!e&&(e=new ei),e},Q.Xf=function(){return O3e(this)},Q.Zf=function(e){var t=new Kf(e);OO(this.f,(vP(),S6),t)},Q.$f=function(e){OO(this.f,(vP(),A6),new bje(e))},Q.Tf=function(){return this.d},Q.Uf=function(){var e,t;if(!this.a)for(this.a=new T,t=new pm(Vu(Fj(P(this.f,27)).a.Kc(),new d));Cj(t);)e=P(by(t),74),M(this.a,new _r(e));return this.a},Q.Wf=function(){var e,t;if(!this.c)for(this.c=new T,t=new pm(Vu(Ij(P(this.f,27)).a.Kc(),new d));Cj(t);)e=P(by(t),74),M(this.c,new _r(e));return this.c},Q.Yf=function(){return Gg(P(this.f,27)).i!=0||ki(Od(P(this.f,27).of((vP(),_6))))},Q._f=function(){dKe(this,(Ko(),nVt))},Q.a=null,Q.b=null,Q.c=null,Q.d=null,Q.e=null,L(RH,`ElkGraphAdapters/ElkNodeAdapter`,639),q(1284,562,{852:1},ahe),Q.Rf=function(){return H3e(this)},Q.Uf=function(){var e,t;if(!this.a)for(this.a=dd(P(this.f,123).hh().i),t=new Lu(P(this.f,123).hh());t.e!=t.i.gc();)e=P(gO(t),74),M(this.a,new _r(e));return this.a},Q.Wf=function(){var e,t;if(!this.c)for(this.c=dd(P(this.f,123).ih().i),t=new Lu(P(this.f,123).ih());t.e!=t.i.gc();)e=P(gO(t),74),M(this.c,new _r(e));return this.c},Q.ag=function(){return P(P(this.f,123).of((vP(),B6)),64)},Q.bg=function(){var e,t,n,r=E_(P(this.f,123)),i,a,o,s;for(n=new Lu(P(this.f,123).ih());n.e!=n.i.gc();)for(e=P(gO(n),74),s=new Lu((!e.c&&(e.c=new cf(H5,e,5,8)),e.c));s.e!=s.i.gc();)if(o=P(gO(s),84),Ex(cA(o),r)||cA(o)==r&&ki(Od(J(e,(vP(),v6)))))return!0;for(t=new Lu(P(this.f,123).hh());t.e!=t.i.gc();)for(e=P(gO(t),74),a=new Lu((!e.b&&(e.b=new cf(H5,e,4,7)),e.b));a.e!=a.i.gc();)if(i=P(gO(a),84),Ex(cA(i),r))return!0;return!1},Q.a=null,Q.b=null,Q.c=null,L(RH,`ElkGraphAdapters/ElkPortAdapter`,1284),q(1285,1,GI,bse),Q.Ne=function(e,t){return Tlt(P(e,123),P(t,123))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new Yn(this)},L(RH,`ElkGraphAdapters/PortComparator`,1285);var L5=gp(zH,`EObject`),R5=gp(BH,VSt),z5=gp(BH,HSt),B5=gp(BH,USt),V5=gp(BH,`ElkShape`),H5=gp(BH,WSt),U5=gp(BH,GSt),W5=gp(BH,KSt),G5=gp(zH,qSt),K5=gp(zH,`EFactory`),iVt,q5=gp(zH,JSt),J5=gp(zH,`EPackage`),Y5,aVt,oVt,sVt,X5,cVt,lVt,uVt,dVt,Z5,fVt,pVt,Q5=gp(BH,YSt),$5=gp(BH,XSt),e7=gp(BH,ZSt);q(93,1,QSt),Q.th=function(){return this.uh(),null},Q.uh=function(){return null},Q.vh=function(){return this.uh(),!1},Q.wh=function(){return!1},Q.xh=function(e){AC(this,e)},L(VH,`BasicNotifierImpl`,93),q(99,93,nCt),Q.Yh=function(){return Gl(this)},Q.yh=function(e,t){return e},Q.zh=function(){throw E(new Br)},Q.Ah=function(e){var t;return t=qO(P(_x(this.Dh(),this.Fh()),19)),this.Ph().Th(this,t.n,t.f,e)},Q.Bh=function(e,t){throw E(new Br)},Q.Ch=function(e,t,n){return qM(this,e,t,n)},Q.Dh=function(){var e;return this.zh()&&(e=this.zh().Nk(),e)?e:this.ii()},Q.Eh=function(){return xj(this)},Q.Fh=function(){throw E(new Br)},Q.Gh=function(){var e,t=this.$h().Ok();return!t&&this.zh().Tk(t=(Yo(),e=MLe(aN(this.Dh())),e==null?i9:new ad(this,e))),t},Q.Hh=function(e,t){return e},Q.Ih=function(e){return e.pk()?e.Lj():eD(this.Dh(),e)},Q.Jh=function(){var e=this.zh();return e?e.Qk():null},Q.Kh=function(){return this.zh()?this.zh().Nk():null},Q.Lh=function(e,t,n){return jO(this,e,t,n)},Q.Mh=function(e){return mb(this,e)},Q.Nh=function(e,t){return wy(this,e,t)},Q.Oh=function(){var e=this.zh();return!!e&&e.Rk()},Q.Ph=function(){throw E(new Br)},Q.Qh=function(){return KD(this)},Q.Rh=function(e,t,n,r){return EO(this,e,t,r)},Q.Sh=function(e,t,n){var r;return r=P(_x(this.Dh(),t),69),r.wk().zk(this,this.hi(),t-this.ji(),e,n)},Q.Th=function(e,t,n,r){return m_(this,e,t,r)},Q.Uh=function(e,t,n){var r;return r=P(_x(this.Dh(),t),69),r.wk().Ak(this,this.hi(),t-this.ji(),e,n)},Q.Vh=function(){return!!this.zh()&&!!this.zh().Pk()},Q.Wh=function(e){return mO(this,e)},Q.Xh=function(e){return iRe(this,e)},Q.Zh=function(e){return Iht(this,e)},Q.$h=function(){throw E(new Br)},Q._h=function(){return this.zh()?this.zh().Pk():null},Q.ai=function(){return KD(this)},Q.bi=function(e,t){QA(this,e,t)},Q.ci=function(e){this.$h().Sk(e)},Q.di=function(e){this.$h().Vk(e)},Q.ei=function(e){this.$h().Uk(e)},Q.fi=function(e,t){var n,r,i,a=this.Jh();return a&&e&&(t=AO(a.El(),this,t),a.Il(this)),r=this.Ph(),r&&((IM(this,this.Ph(),this.Fh()).Bb&pI)==0?(t=(n=this.Fh(),n>=0?this.Ah(t):this.Ph().Th(this,-1-n,null,t)),t=this.Ch(null,-1,t)):(i=r.Qh(),i&&(e?!a&&i.Il(this):i.Hl(this)))),this.di(e),t},Q.gi=function(e){var t,n=this.Dh(),r,i,a=eD(n,e),o,s,c;if(t=this.ji(),a>=t)return P(e,69).wk().Dk(this,this.hi(),a-t);if(a<=-1)if(o=HN((UA(),l9),n,e),o){if(Qo(),P(o,69).xk()||(o=mv(Rb(l9,o))),i=(r=this.Ih(o),P(r>=0?this.Lh(r,!0,!0):mj(this,o,!0),160)),c=o.Ik(),c>1||c==-1)return P(P(i,220).Sl(e,!1),79)}else throw E(new Fi(HH+e.xe()+WH));else if(e.Jk())return r=this.Ih(e),P(r>=0?this.Lh(r,!1,!0):mj(this,e,!1),79);return s=new JSe(this,e),s},Q.hi=function(){return Jb(this)},Q.ii=function(){return(vh(),z7).S},Q.ji=function(){return bh(this.ii())},Q.ki=function(e){BA(this,e)},Q.Ib=function(){return Aj(this)},L(KH,`BasicEObjectImpl`,99);var mVt;q(119,99,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1}),Q.li=function(e){return qb(this)[e]},Q.mi=function(e,t){Sh(qb(this),e,t)},Q.ni=function(e){Sh(qb(this),e,null)},Q.th=function(){return P(NC(this,4),129)},Q.uh=function(){throw E(new Br)},Q.vh=function(){return!!(this.Db&4)},Q.zh=function(){throw E(new Br)},Q.oi=function(e){GD(this,2,e)},Q.Bh=function(e,t){this.Db=t<<16|this.Db&255,this.oi(e)},Q.Dh=function(){return d_(this)},Q.Fh=function(){return this.Db>>16},Q.Gh=function(){var e,t;return Yo(),t=MLe(aN((e=P(NC(this,16),29),e||this.ii()))),t==null?i9:new ad(this,t)},Q.wh=function(){return!(this.Db&1)},Q.Jh=function(){return P(NC(this,128),2034)},Q.Kh=function(){return P(NC(this,16),29)},Q.Oh=function(){return!!(this.Db&32)},Q.Ph=function(){return P(NC(this,2),54)},Q.Vh=function(){return!!(this.Db&64)},Q.$h=function(){throw E(new Br)},Q._h=function(){return P(NC(this,64),288)},Q.ci=function(e){GD(this,16,e)},Q.di=function(e){GD(this,128,e)},Q.ei=function(e){GD(this,64,e)},Q.hi=function(){return WD(this)},Q.Db=0,L(KH,`MinimalEObjectImpl`,119),q(120,119,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.oi=function(e){this.Cb=e},Q.Ph=function(){return this.Cb},L(KH,`MinimalEObjectImpl/Container`,120),q(2083,120,{110:1,342:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.Lh=function(e,t,n){return W3e(this,e,t,n)},Q.Uh=function(e,t,n){return x9e(this,e,t,n)},Q.Wh=function(e){return yBe(this,e)},Q.bi=function(e,t){qZe(this,e,t)},Q.ii=function(){return lP(),pVt},Q.ki=function(e){sZe(this,e)},Q.nf=function(){return H2e(this)},Q.gh=function(){return!this.o&&(this.o=new lb((lP(),Z5),n7,this,0)),this.o},Q.of=function(e){return J(this,e)},Q.pf=function(e){return qy(this,e)},Q.qf=function(e,t){return OO(this,e,t)},L(qH,`EMapPropertyHolderImpl`,2083),q(572,120,{110:1,377:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},tn),Q.Lh=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return jO(this,e,t,n)},Q.Wh=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return mO(this,e)},Q.bi=function(e,t){switch(e){case 0:Xx(this,D(N(t)));return;case 1:Vx(this,D(N(t)));return}QA(this,e,t)},Q.ii=function(){return lP(),aVt},Q.ki=function(e){switch(e){case 0:Xx(this,0);return;case 1:Vx(this,0);return}BA(this,e)},Q.Ib=function(){var e;return this.Db&64?Aj(this):(e=new Wu(Aj(this)),e.a+=` (x: `,Ua(e,this.a),e.a+=`, y: `,Ua(e,this.b),e.a+=`)`,e.a)},Q.a=0,Q.b=0,L(qH,`ElkBendPointImpl`,572),q(739,2083,{110:1,342:1,167:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.Lh=function(e,t,n){return ZT(this,e,t,n)},Q.Sh=function(e,t,n){return uA(this,e,t,n)},Q.Uh=function(e,t,n){return XC(this,e,t,n)},Q.Wh=function(e){return pXe(this,e)},Q.bi=function(e,t){V8e(this,e,t)},Q.ii=function(){return lP(),cVt},Q.ki=function(e){vT(this,e)},Q.jh=function(){return this.k},Q.kh=function(){return ag(this)},Q.Ib=function(){return pE(this)},Q.k=null,L(qH,`ElkGraphElementImpl`,739),q(740,739,{110:1,342:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.Lh=function(e,t,n){return FE(this,e,t,n)},Q.Wh=function(e){return JE(this,e)},Q.bi=function(e,t){H8e(this,e,t)},Q.ii=function(){return lP(),fVt},Q.ki=function(e){dD(this,e)},Q.lh=function(){return this.f},Q.mh=function(){return this.g},Q.nh=function(){return this.i},Q.oh=function(){return this.j},Q.ph=function(e,t){Ql(this,e,t)},Q.qh=function(e,t){$l(this,e,t)},Q.rh=function(e){Gx(this,e)},Q.sh=function(e){Kx(this,e)},Q.Ib=function(){return AA(this)},Q.f=0,Q.g=0,Q.i=0,Q.j=0,L(qH,`ElkShapeImpl`,740),q(741,740,{110:1,342:1,84:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.Lh=function(e,t,n){return tk(this,e,t,n)},Q.Sh=function(e,t,n){return b8e(this,e,t,n)},Q.Uh=function(e,t,n){return x8e(this,e,t,n)},Q.Wh=function(e){return BZe(this,e)},Q.bi=function(e,t){cit(this,e,t)},Q.ii=function(){return lP(),oVt},Q.ki=function(e){DO(this,e)},Q.hh=function(){return!this.d&&(this.d=new cf(U5,this,8,5)),this.d},Q.ih=function(){return!this.e&&(this.e=new cf(U5,this,7,4)),this.e},L(qH,`ElkConnectableShapeImpl`,741),q(326,739,{110:1,342:1,74:1,167:1,326:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},nn),Q.Ah=function(e){return P6e(this,e)},Q.Lh=function(e,t,n){switch(e){case 3:return T_(this);case 4:return!this.b&&(this.b=new cf(H5,this,4,7)),this.b;case 5:return!this.c&&(this.c=new cf(H5,this,5,8)),this.c;case 6:return!this.a&&(this.a=new F(W5,this,6,6)),this.a;case 7:return rd(),!this.b&&(this.b=new cf(H5,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new cf(H5,this,5,8)),this.c.i<=1));case 8:return rd(),!!yj(this);case 9:return rd(),!!uj(this);case 10:return rd(),!this.b&&(this.b=new cf(H5,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new cf(H5,this,5,8)),this.c.i!=0)}return ZT(this,e,t,n)},Q.Sh=function(e,t,n){var r;switch(t){case 3:return this.Cb&&(n=(r=this.Db>>16,r>=0?P6e(this,n):this.Cb.Th(this,-1-r,null,n))),Bd(this,P(e,27),n);case 4:return!this.b&&(this.b=new cf(H5,this,4,7)),vD(this.b,e,n);case 5:return!this.c&&(this.c=new cf(H5,this,5,8)),vD(this.c,e,n);case 6:return!this.a&&(this.a=new F(W5,this,6,6)),vD(this.a,e,n)}return uA(this,e,t,n)},Q.Uh=function(e,t,n){switch(t){case 3:return Bd(this,null,n);case 4:return!this.b&&(this.b=new cf(H5,this,4,7)),AO(this.b,e,n);case 5:return!this.c&&(this.c=new cf(H5,this,5,8)),AO(this.c,e,n);case 6:return!this.a&&(this.a=new F(W5,this,6,6)),AO(this.a,e,n)}return XC(this,e,t,n)},Q.Wh=function(e){switch(e){case 3:return!!T_(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new cf(H5,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new cf(H5,this,5,8)),this.c.i<=1));case 8:return yj(this);case 9:return uj(this);case 10:return!this.b&&(this.b=new cf(H5,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new cf(H5,this,5,8)),this.c.i!=0)}return pXe(this,e)},Q.bi=function(e,t){switch(e){case 3:Hj(this,P(t,27));return;case 4:!this.b&&(this.b=new cf(H5,this,4,7)),RN(this.b),!this.b&&(this.b=new cf(H5,this,4,7)),th(this.b,P(t,16));return;case 5:!this.c&&(this.c=new cf(H5,this,5,8)),RN(this.c),!this.c&&(this.c=new cf(H5,this,5,8)),th(this.c,P(t,16));return;case 6:!this.a&&(this.a=new F(W5,this,6,6)),RN(this.a),!this.a&&(this.a=new F(W5,this,6,6)),th(this.a,P(t,16));return}V8e(this,e,t)},Q.ii=function(){return lP(),sVt},Q.ki=function(e){switch(e){case 3:Hj(this,null);return;case 4:!this.b&&(this.b=new cf(H5,this,4,7)),RN(this.b);return;case 5:!this.c&&(this.c=new cf(H5,this,5,8)),RN(this.c);return;case 6:!this.a&&(this.a=new F(W5,this,6,6)),RN(this.a);return}vT(this,e)},Q.Ib=function(){return ipt(this)},L(qH,`ElkEdgeImpl`,326),q(452,2083,{110:1,342:1,166:1,452:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},rn),Q.Ah=function(e){return b6e(this,e)},Q.Lh=function(e,t,n){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new ju(z5,this,5)),this.a;case 6:return QLe(this);case 7:return t?KO(this):this.i;case 8:return t?GO(this):this.f;case 9:return!this.g&&(this.g=new cf(W5,this,9,10)),this.g;case 10:return!this.e&&(this.e=new cf(W5,this,10,9)),this.e;case 11:return this.d}return W3e(this,e,t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?b6e(this,n):this.Cb.Th(this,-1-i,null,n))),jDe(this,P(e,74),n);case 9:return!this.g&&(this.g=new cf(W5,this,9,10)),vD(this.g,e,n);case 10:return!this.e&&(this.e=new cf(W5,this,10,9)),vD(this.e,e,n)}return a=P(_x((r=P(NC(this,16),29),r||(lP(),X5)),t),69),a.wk().zk(this,WD(this),t-bh((lP(),X5)),e,n)},Q.Uh=function(e,t,n){switch(t){case 5:return!this.a&&(this.a=new ju(z5,this,5)),AO(this.a,e,n);case 6:return jDe(this,null,n);case 9:return!this.g&&(this.g=new cf(W5,this,9,10)),AO(this.g,e,n);case 10:return!this.e&&(this.e=new cf(W5,this,10,9)),AO(this.e,e,n)}return x9e(this,e,t,n)},Q.Wh=function(e){switch(e){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!QLe(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return yBe(this,e)},Q.bi=function(e,t){switch(e){case 1:qx(this,D(N(t)));return;case 2:Yx(this,D(N(t)));return;case 3:Hx(this,D(N(t)));return;case 4:Jx(this,D(N(t)));return;case 5:!this.a&&(this.a=new ju(z5,this,5)),RN(this.a),!this.a&&(this.a=new ju(z5,this,5)),th(this.a,P(t,16));return;case 6:Jat(this,P(t,74));return;case 7:ES(this,P(t,84));return;case 8:TS(this,P(t,84));return;case 9:!this.g&&(this.g=new cf(W5,this,9,10)),RN(this.g),!this.g&&(this.g=new cf(W5,this,9,10)),th(this.g,P(t,16));return;case 10:!this.e&&(this.e=new cf(W5,this,10,9)),RN(this.e),!this.e&&(this.e=new cf(W5,this,10,9)),th(this.e,P(t,16));return;case 11:qJe(this,kd(t));return}qZe(this,e,t)},Q.ii=function(){return lP(),X5},Q.ki=function(e){switch(e){case 1:qx(this,0);return;case 2:Yx(this,0);return;case 3:Hx(this,0);return;case 4:Jx(this,0);return;case 5:!this.a&&(this.a=new ju(z5,this,5)),RN(this.a);return;case 6:Jat(this,null);return;case 7:ES(this,null);return;case 8:TS(this,null);return;case 9:!this.g&&(this.g=new cf(W5,this,9,10)),RN(this.g);return;case 10:!this.e&&(this.e=new cf(W5,this,10,9)),RN(this.e);return;case 11:qJe(this,null);return}sZe(this,e)},Q.Ib=function(){return xrt(this)},Q.b=0,Q.c=0,Q.d=null,Q.j=0,Q.k=0,L(qH,`ElkEdgeSectionImpl`,452),q(158,120,{110:1,94:1,93:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),Q.Lh=function(e,t,n){var r;return e==0?(!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab):xb(this,e-bh(this.ii()),_x((r=P(NC(this,16),29),r||this.ii()),e),t,n)},Q.Sh=function(e,t,n){var r,i;return t==0?(!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n)):(i=P(_x((r=P(NC(this,16),29),r||this.ii()),t),69),i.wk().zk(this,WD(this),t-bh(this.ii()),e,n))},Q.Uh=function(e,t,n){var r,i;return t==0?(!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n)):(i=P(_x((r=P(NC(this,16),29),r||this.ii()),t),69),i.wk().Ak(this,WD(this),t-bh(this.ii()),e,n))},Q.Wh=function(e){var t;return e==0?!!this.Ab&&this.Ab.i!=0:Hv(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.Zh=function(e){return rP(this,e)},Q.bi=function(e,t){var n;if(e===0){!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return}LE(this,e-bh(this.ii()),_x((n=P(NC(this,16),29),n||this.ii()),e),t)},Q.di=function(e){GD(this,128,e)},Q.ii=function(){return CP(),qVt},Q.ki=function(e){var t;if(e===0){!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return}PT(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.pi=function(){this.Bb|=1},Q.qi=function(e){return JM(this,e)},Q.Bb=0,L(KH,`EModelElementImpl`,158),q(720,158,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},$ue),Q.ri=function(e,t){return yht(this,e,t)},Q.si=function(e){var t,n,r,i,a;if(this.a!=Mx(e)||e.Bb&256)throw E(new Fi($H+e.zb+XH));for(r=l_(e);Jv(r.a).i!=0;){if(n=P(GN(r,0,(t=P(H(Jv(r.a),0),89),a=t.c,j(a,90)?P(a,29):(CP(),J7))),29),_k(n))return i=Mx(n).wi().si(n),P(i,54).ci(e),i;r=l_(n)}return(e.D==null?e.B:e.D)==`java.util.Map$Entry`?new OMe(e):new eMe(e)},Q.ti=function(e,t){return uP(this,e,t)},Q.Lh=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.a}return xb(this,e-bh((CP(),G7)),_x((r=P(NC(this,16),29),r||G7),e),t,n)},Q.Sh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 1:return this.a&&(n=P(this.a,54).Th(this,4,J5,n)),mT(this,P(e,241),n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),G7)),t),69),i.wk().zk(this,WD(this),t-bh((CP(),G7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 1:return mT(this,null,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),G7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),G7)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Hv(this,e-bh((CP(),G7)),_x((t=P(NC(this,16),29),t||G7),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:r9e(this,P(t,241));return}LE(this,e-bh((CP(),G7)),_x((n=P(NC(this,16),29),n||G7),e),t)},Q.ii=function(){return CP(),G7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:r9e(this,null);return}PT(this,e-bh((CP(),G7)),_x((t=P(NC(this,16),29),t||G7),e))};var t7,hVt,gVt;L(KH,`EFactoryImpl`,720),q(1037,720,{110:1,2113:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},kse),Q.ri=function(e,t){switch(e.hk()){case 12:return P(t,149).Pg();case 13:return PE(t);default:throw E(new Fi(YH+e.xe()+XH))}},Q.si=function(e){var t,n,r,i,a,o,s,c;switch(e.G==-1&&(e.G=(t=Mx(e),t?NO(t.vi(),e):-1)),e.G){case 4:return a=new Ase,a;case 6:return o=new ii,o;case 7:return s=new s_e,s;case 8:return r=new nn,r;case 9:return n=new tn,n;case 10:return i=new rn,i;case 11:return c=new jse,c;default:throw E(new Fi($H+e.zb+XH))}},Q.ti=function(e,t){switch(e.hk()){case 13:case 12:return null;default:throw E(new Fi(YH+e.xe()+XH))}},L(qH,`ElkGraphFactoryImpl`,1037),q(448,158,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),Q.Gh=function(){var e,t=(e=P(NC(this,16),29),MLe(aN(e||this.ii())));return t==null?(Yo(),Yo(),i9):new VEe(this,t)},Q.Lh=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.xe()}return xb(this,e-bh(this.ii()),_x((r=P(NC(this,16),29),r||this.ii()),e),t,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Hv(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:this.ui(kd(t));return}LE(this,e-bh(this.ii()),_x((n=P(NC(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return CP(),JVt},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:this.ui(null);return}PT(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.xe=function(){return this.zb},Q.ui=function(e){GS(this,e)},Q.Ib=function(){return DT(this)},Q.zb=null,L(KH,`ENamedElementImpl`,448),q(184,448,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},IIe),Q.Ah=function(e){return w6e(this,e)},Q.Lh=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new Tm(this,E7,this)),this.rb;case 6:return!this.vb&&(this.vb=new nf(J5,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?P(this.Cb,241):null:pRe(this)}return xb(this,e-bh((CP(),X7)),_x((r=P(NC(this,16),29),r||X7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 4:return this.sb&&(n=P(this.sb,54).Th(this,1,K5,n)),OT(this,P(e,480),n);case 5:return!this.rb&&(this.rb=new Tm(this,E7,this)),vD(this.rb,e,n);case 6:return!this.vb&&(this.vb=new nf(J5,this,6,7)),vD(this.vb,e,n);case 7:return this.Cb&&(n=(i=this.Db>>16,i>=0?w6e(this,n):this.Cb.Th(this,-1-i,null,n))),qM(this,e,7,n)}return a=P(_x((r=P(NC(this,16),29),r||(CP(),X7)),t),69),a.wk().zk(this,WD(this),t-bh((CP(),X7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 4:return OT(this,null,n);case 5:return!this.rb&&(this.rb=new Tm(this,E7,this)),AO(this.rb,e,n);case 6:return!this.vb&&(this.vb=new nf(J5,this,6,7)),AO(this.vb,e,n);case 7:return qM(this,null,7,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),X7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),X7)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!pRe(this)}return Hv(this,e-bh((CP(),X7)),_x((t=P(NC(this,16),29),t||X7),e))},Q.Zh=function(e){return Mot(this,e)||rP(this,e)},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:GS(this,kd(t));return;case 2:qS(this,kd(t));return;case 3:KS(this,kd(t));return;case 4:EA(this,P(t,480));return;case 5:!this.rb&&(this.rb=new Tm(this,E7,this)),RN(this.rb),!this.rb&&(this.rb=new Tm(this,E7,this)),th(this.rb,P(t,16));return;case 6:!this.vb&&(this.vb=new nf(J5,this,6,7)),RN(this.vb),!this.vb&&(this.vb=new nf(J5,this,6,7)),th(this.vb,P(t,16));return}LE(this,e-bh((CP(),X7)),_x((n=P(NC(this,16),29),n||X7),e),t)},Q.ei=function(e){var t,n;if(e&&this.rb)for(n=new Lu(this.rb);n.e!=n.i.gc();)t=gO(n),j(t,364)&&(P(t,364).w=null);GD(this,64,e)},Q.ii=function(){return CP(),X7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:GS(this,null);return;case 2:qS(this,null);return;case 3:KS(this,null);return;case 4:EA(this,null);return;case 5:!this.rb&&(this.rb=new Tm(this,E7,this)),RN(this.rb);return;case 6:!this.vb&&(this.vb=new nf(J5,this,6,7)),RN(this.vb);return}PT(this,e-bh((CP(),X7)),_x((t=P(NC(this,16),29),t||X7),e))},Q.pi=function(){Ck(this)},Q.vi=function(){return!this.rb&&(this.rb=new Tm(this,E7,this)),this.rb},Q.wi=function(){return this.sb},Q.xi=function(){return this.ub},Q.yi=function(){return this.xb},Q.zi=function(){return this.yb},Q.Ai=function(e){this.ub=e},Q.Ib=function(){var e;return this.Db&64?DT(this):(e=new Wu(DT(this)),e.a+=` (nsURI: `,pl(e,this.yb),e.a+=`, nsPrefix: `,pl(e,this.xb),e.a+=`)`,e.a)},Q.xb=null,Q.yb=null;var _Vt;L(KH,`EPackageImpl`,184),q(569,184,{110:1,2115:1,569:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},Urt),Q.q=!1,Q.r=!1;var vVt=!1;L(qH,`ElkGraphPackageImpl`,569),q(366,740,{110:1,342:1,167:1,135:1,422:1,366:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Ase),Q.Ah=function(e){return x6e(this,e)},Q.Lh=function(e,t,n){switch(e){case 7:return mRe(this);case 8:return this.a}return FE(this,e,t,n)},Q.Sh=function(e,t,n){var r;return t===7?(this.Cb&&(n=(r=this.Db>>16,r>=0?x6e(this,n):this.Cb.Th(this,-1-r,null,n))),jNe(this,P(e,167),n)):uA(this,e,t,n)},Q.Uh=function(e,t,n){return t==7?jNe(this,null,n):XC(this,e,t,n)},Q.Wh=function(e){switch(e){case 7:return!!mRe(this);case 8:return!ff(``,this.a)}return JE(this,e)},Q.bi=function(e,t){switch(e){case 7:kot(this,P(t,167));return;case 8:jJe(this,kd(t));return}H8e(this,e,t)},Q.ii=function(){return lP(),lVt},Q.ki=function(e){switch(e){case 7:kot(this,null);return;case 8:jJe(this,``);return}dD(this,e)},Q.Ib=function(){return get(this)},Q.a=``,L(qH,`ElkLabelImpl`,366),q(207,741,{110:1,342:1,84:1,167:1,27:1,422:1,207:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},ii),Q.Ah=function(e){return F6e(this,e)},Q.Lh=function(e,t,n){switch(e){case 9:return!this.c&&(this.c=new F(e7,this,9,9)),this.c;case 10:return!this.a&&(this.a=new F($5,this,10,11)),this.a;case 11:return I_(this);case 12:return!this.b&&(this.b=new F(U5,this,12,3)),this.b;case 13:return rd(),!this.a&&(this.a=new F($5,this,10,11)),this.a.i>0}return tk(this,e,t,n)},Q.Sh=function(e,t,n){var r;switch(t){case 9:return!this.c&&(this.c=new F(e7,this,9,9)),vD(this.c,e,n);case 10:return!this.a&&(this.a=new F($5,this,10,11)),vD(this.a,e,n);case 11:return this.Cb&&(n=(r=this.Db>>16,r>=0?F6e(this,n):this.Cb.Th(this,-1-r,null,n))),tf(this,P(e,27),n);case 12:return!this.b&&(this.b=new F(U5,this,12,3)),vD(this.b,e,n)}return b8e(this,e,t,n)},Q.Uh=function(e,t,n){switch(t){case 9:return!this.c&&(this.c=new F(e7,this,9,9)),AO(this.c,e,n);case 10:return!this.a&&(this.a=new F($5,this,10,11)),AO(this.a,e,n);case 11:return tf(this,null,n);case 12:return!this.b&&(this.b=new F(U5,this,12,3)),AO(this.b,e,n)}return x8e(this,e,t,n)},Q.Wh=function(e){switch(e){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!I_(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new F($5,this,10,11)),this.a.i>0}return BZe(this,e)},Q.bi=function(e,t){switch(e){case 9:!this.c&&(this.c=new F(e7,this,9,9)),RN(this.c),!this.c&&(this.c=new F(e7,this,9,9)),th(this.c,P(t,16));return;case 10:!this.a&&(this.a=new F($5,this,10,11)),RN(this.a),!this.a&&(this.a=new F($5,this,10,11)),th(this.a,P(t,16));return;case 11:Gj(this,P(t,27));return;case 12:!this.b&&(this.b=new F(U5,this,12,3)),RN(this.b),!this.b&&(this.b=new F(U5,this,12,3)),th(this.b,P(t,16));return}cit(this,e,t)},Q.ii=function(){return lP(),uVt},Q.ki=function(e){switch(e){case 9:!this.c&&(this.c=new F(e7,this,9,9)),RN(this.c);return;case 10:!this.a&&(this.a=new F($5,this,10,11)),RN(this.a);return;case 11:Gj(this,null);return;case 12:!this.b&&(this.b=new F(U5,this,12,3)),RN(this.b);return}DO(this,e)},Q.Ib=function(){return Elt(this)},L(qH,`ElkNodeImpl`,207),q(193,741,{110:1,342:1,84:1,167:1,123:1,422:1,193:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},s_e),Q.Ah=function(e){return S6e(this,e)},Q.Lh=function(e,t,n){return e==9?E_(this):tk(this,e,t,n)},Q.Sh=function(e,t,n){var r;return t===9?(this.Cb&&(n=(r=this.Db>>16,r>=0?S6e(this,n):this.Cb.Th(this,-1-r,null,n))),Vd(this,P(e,27),n)):b8e(this,e,t,n)},Q.Uh=function(e,t,n){return t==9?Vd(this,null,n):x8e(this,e,t,n)},Q.Wh=function(e){return e==9?!!E_(this):BZe(this,e)},Q.bi=function(e,t){if(e===9){Yat(this,P(t,27));return}cit(this,e,t)},Q.ii=function(){return lP(),dVt},Q.ki=function(e){if(e===9){Yat(this,null);return}DO(this,e)},Q.Ib=function(){return Dlt(this)},L(qH,`ElkPortImpl`,193);var yVt=gp(uU,`BasicEMap/Entry`);q(1122,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,119:1,120:1},jse),Q.Fb=function(e){return this===e},Q.ld=function(){return this.b},Q.Hb=function(){return td(this)},Q.Di=function(e){MJe(this,P(e,149))},Q.Lh=function(e,t,n){switch(e){case 0:return this.b;case 1:return this.c}return jO(this,e,t,n)},Q.Wh=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return mO(this,e)},Q.bi=function(e,t){switch(e){case 0:MJe(this,P(t,149));return;case 1:AJe(this,t);return}QA(this,e,t)},Q.ii=function(){return lP(),Z5},Q.ki=function(e){switch(e){case 0:MJe(this,null);return;case 1:AJe(this,null);return}BA(this,e)},Q.Bi=function(){var e;return this.a==-1&&(e=this.b,this.a=e?US(e):0),this.a},Q.md=function(){return this.c},Q.Ci=function(e){this.a=e},Q.nd=function(e){var t=this.c;return AJe(this,e),t},Q.Ib=function(){var e;return this.Db&64?Aj(this):(e=new ta,gl(gl(gl(e,this.b?this.b.Pg():IP),kR),Uu(this.c)),e.a)},Q.a=-1,Q.c=null;var n7=L(qH,`ElkPropertyToValueMapEntryImpl`,1122);q(996,1,{},Pse),L(fU,`JsonAdapter`,996),q(216,63,SF,Vi),L(fU,`JsonImportException`,216),q(868,1,{},E6e),L(fU,`JsonImporter`,868),q(903,1,{},TSe),L(fU,`JsonImporter/lambda$0$Type`,903),q(904,1,{},ESe),L(fU,`JsonImporter/lambda$1$Type`,904),q(912,1,{},ohe),L(fU,`JsonImporter/lambda$10$Type`,912),q(914,1,{},DSe),L(fU,`JsonImporter/lambda$11$Type`,914),q(915,1,{},OSe),L(fU,`JsonImporter/lambda$12$Type`,915),q(921,1,{},pIe),L(fU,`JsonImporter/lambda$13$Type`,921),q(920,1,{},mIe),L(fU,`JsonImporter/lambda$14$Type`,920),q(916,1,{},kSe),L(fU,`JsonImporter/lambda$15$Type`,916),q(917,1,{},ASe),L(fU,`JsonImporter/lambda$16$Type`,917),q(918,1,{},jSe),L(fU,`JsonImporter/lambda$17$Type`,918),q(919,1,{},MSe),L(fU,`JsonImporter/lambda$18$Type`,919),q(924,1,{},she),L(fU,`JsonImporter/lambda$19$Type`,924),q(905,1,{},che),L(fU,`JsonImporter/lambda$2$Type`,905),q(922,1,{},lhe),L(fU,`JsonImporter/lambda$20$Type`,922),q(923,1,{},uhe),L(fU,`JsonImporter/lambda$21$Type`,923),q(927,1,{},dhe),L(fU,`JsonImporter/lambda$22$Type`,927),q(925,1,{},fhe),L(fU,`JsonImporter/lambda$23$Type`,925),q(926,1,{},phe),L(fU,`JsonImporter/lambda$24$Type`,926),q(929,1,{},mhe),L(fU,`JsonImporter/lambda$25$Type`,929),q(928,1,{},hhe),L(fU,`JsonImporter/lambda$26$Type`,928),q(930,1,$P,NSe),Q.Cd=function(e){mGe(this.b,this.a,kd(e))},L(fU,`JsonImporter/lambda$27$Type`,930),q(931,1,$P,PSe),Q.Cd=function(e){hGe(this.b,this.a,kd(e))},L(fU,`JsonImporter/lambda$28$Type`,931),q(932,1,{},FSe),L(fU,`JsonImporter/lambda$29$Type`,932),q(908,1,{},ghe),L(fU,`JsonImporter/lambda$3$Type`,908),q(933,1,{},ISe),L(fU,`JsonImporter/lambda$30$Type`,933),q(934,1,{},_he),L(fU,`JsonImporter/lambda$31$Type`,934),q(935,1,{},vhe),L(fU,`JsonImporter/lambda$32$Type`,935),q(936,1,{},yhe),L(fU,`JsonImporter/lambda$33$Type`,936),q(937,1,{},bhe),L(fU,`JsonImporter/lambda$34$Type`,937),q(870,1,{},xhe),L(fU,`JsonImporter/lambda$35$Type`,870),q(941,1,{},uje),L(fU,`JsonImporter/lambda$36$Type`,941),q(938,1,$P,She),Q.Cd=function(e){XHe(this.a,P(e,377))},L(fU,`JsonImporter/lambda$37$Type`,938),q(939,1,$P,LSe),Q.Cd=function(e){WSe(this.a,this.b,P(e,166))},L(fU,`JsonImporter/lambda$38$Type`,939),q(940,1,$P,RSe),Q.Cd=function(e){GSe(this.a,this.b,P(e,166))},L(fU,`JsonImporter/lambda$39$Type`,940),q(906,1,{},Che),L(fU,`JsonImporter/lambda$4$Type`,906),q(942,1,$P,whe),Q.Cd=function(e){ZHe(this.a,P(e,8))},L(fU,`JsonImporter/lambda$40$Type`,942),q(907,1,{},The),L(fU,`JsonImporter/lambda$5$Type`,907),q(911,1,{},Ehe),L(fU,`JsonImporter/lambda$6$Type`,911),q(909,1,{},Dhe),L(fU,`JsonImporter/lambda$7$Type`,909),q(910,1,{},Ohe),L(fU,`JsonImporter/lambda$8$Type`,910),q(913,1,{},khe),L(fU,`JsonImporter/lambda$9$Type`,913),q(961,1,$P,Ahe),Q.Cd=function(e){Dh(this.a,new mh(kd(e)))},L(fU,`JsonMetaDataConverter/lambda$0$Type`,961),q(962,1,$P,jhe),Q.Cd=function(e){VPe(this.a,P(e,245))},L(fU,`JsonMetaDataConverter/lambda$1$Type`,962),q(963,1,$P,Mhe),Q.Cd=function(e){FRe(this.a,P(e,143))},L(fU,`JsonMetaDataConverter/lambda$2$Type`,963),q(964,1,$P,Nhe),Q.Cd=function(e){HPe(this.a,P(e,170))},L(fU,`JsonMetaDataConverter/lambda$3$Type`,964),q(245,22,{3:1,34:1,22:1,245:1},Jc);var r7,i7,a7,o7,s7,c7,l7,u7,d7=aS(EL,`GraphFeature`,245,eG,nqe,Sje),bVt;q(11,1,{34:1,149:1},yr,Wd,Tl,ou),Q.Fd=function(e){return oTe(this,P(e,149))},Q.Fb=function(e){return nLe(this,e)},Q.Sg=function(){return hO(this)},Q.Pg=function(){return this.b},Q.Hb=function(){return jw(this.b)},Q.Ib=function(){return this.b},L(EL,`Property`,11),q(671,1,GI,vr),Q.Ne=function(e,t){return h1e(this,P(e,96),P(t,96))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new Yn(this)},L(EL,`PropertyHolderComparator`,671),q(709,1,VP,Phe),Q.Nb=function(e){Om(this,e)},Q.Pb=function(){return vGe(this)},Q.Qb=function(){uye()},Q.Ob=function(){return!!this.a},L(_U,`ElkGraphUtil/AncestorIterator`,709);var xVt=gp(uU,`EList`);q(70,56,{20:1,31:1,56:1,16:1,15:1,70:1,61:1}),Q.bd=function(e,t){WT(this,e,t)},Q.Fc=function(e){return tb(this,e)},Q.cd=function(e,t){return lZe(this,e,t)},Q.Gc=function(e){return th(this,e)},Q.Ii=function(){return new ld(this)},Q.Ji=function(){return new ud(this)},Q.Ki=function(e){return mS(this,e)},Q.Li=function(){return!0},Q.Mi=function(e,t){},Q.Ni=function(){},Q.Oi=function(e,t){Xy(this,e,t)},Q.Pi=function(e,t,n){},Q.Qi=function(e,t){},Q.Ri=function(e,t,n){},Q.Fb=function(e){return Mct(this,e)},Q.Hb=function(){return qXe(this)},Q.Si=function(){return!1},Q.Kc=function(){return new Lu(this)},Q.ed=function(){return new cd(this)},Q.fd=function(e){var t=this.gc();if(e<0||e>t)throw E(new lf(e,t));return new Hm(this,e)},Q.Ui=function(e,t){this.Ti(e,this.dd(t))},Q.Mc=function(e){return nx(this,e)},Q.Wi=function(e,t){return t},Q.hd=function(e,t){return PO(this,e,t)},Q.Ib=function(){return HE(this)},Q.Yi=function(){return!0},Q.Zi=function(e,t){return Aw(this,t)},L(uU,`AbstractEList`,70),q(66,70,SU,an,kx,hC),Q.Ei=function(e,t){return dA(this,e,t)},Q.Fi=function(e){return X4e(this,e)},Q.Gi=function(e,t){jT(this,e,t)},Q.Hi=function(e){Ty(this,e)},Q.$i=function(e){return SGe(this,e)},Q.$b=function(){Ey(this)},Q.Hc=function(e){return Uk(this,e)},Q.Xb=function(e){return H(this,e)},Q._i=function(e){var t,n,r;++this.j,n=this.g==null?0:this.g.length,e>n&&(r=this.g,t=n+(n/2|0)+4,t=0&&(this.gd(t),!0)},Q.Xi=function(e,t){return this.Dj(e,this.Zi(e,t))},Q.gc=function(){return this.Ej()},Q.Pc=function(){return this.Fj()},Q.Qc=function(e){return this.Gj(e)},Q.Ib=function(){return this.Hj()},L(uU,`DelegatingEList`,2093),q(2094,2093,rwt),Q.Ei=function(e,t){return wdt(this,e,t)},Q.Fi=function(e){return this.Ei(this.Ej(),e)},Q.Gi=function(e,t){Wrt(this,e,t)},Q.Hi=function(e){_rt(this,e)},Q.Li=function(){return!this.Mj()},Q.$b=function(){zN(this)},Q.Ij=function(e,t,n,r,i){return new eLe(this,e,t,n,r,i)},Q.Jj=function(e){AC(this.jj(),e)},Q.Kj=function(){return null},Q.Lj=function(){return-1},Q.jj=function(){return null},Q.Mj=function(){return!1},Q.Nj=function(e,t){return t},Q.Oj=function(e,t){return t},Q.Pj=function(){return!1},Q.Qj=function(){return!this.Aj()},Q.Ti=function(e,t){var n,r;return this.Pj()?(r=this.Qj(),n=e9e(this,e,t),this.Jj(this.Ij(7,G(t),n,e,r)),n):e9e(this,e,t)},Q.gd=function(e){var t,n,r,i;return this.Pj()?(n=null,r=this.Qj(),t=this.Ij(4,i=_p(this,e),null,e,r),this.Mj()&&i&&(n=this.Oj(i,n)),n?(n.nj(t),n.oj()):this.Jj(t),i):(i=_p(this,e),this.Mj()&&i&&(n=this.Oj(i,null),n&&n.oj()),i)},Q.Xi=function(e,t){return Tdt(this,e,t)},L(VH,`DelegatingNotifyingListImpl`,2094),q(152,1,NU),Q.nj=function(e){return T5e(this,e)},Q.oj=function(){Pb(this)},Q.gj=function(){return this.d},Q.Kj=function(){return null},Q.Rj=function(){return null},Q.hj=function(e){return-1},Q.ij=function(){return Ast(this)},Q.jj=function(){return null},Q.kj=function(){return jst(this)},Q.lj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},Q.Sj=function(){return!1},Q.mj=function(e){var t,n,r,i,a,o,s,c,l,u,d;switch(this.d){case 1:case 2:switch(i=e.gj(),i){case 1:case 2:if(a=e.jj(),A(a)===A(this.jj())&&this.hj(null)==e.hj(null))return this.g=e.ij(),e.gj()==1&&(this.d=1),!0}case 4:if(i=e.gj(),i===4&&(a=e.jj(),A(a)===A(this.jj())&&this.hj(null)==e.hj(null)))return l=Fmt(this),c=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,o=e.lj(),this.d=6,d=new kx(2),c<=o?(tb(d,this.n),tb(d,e.kj()),this.g=U(O(q9,1),HF,28,15,[this.o=c,o+1])):(tb(d,e.kj()),tb(d,this.n),this.g=U(O(q9,1),HF,28,15,[this.o=o,c])),this.n=d,l||(this.o=-2-this.o-1),!0;break;case 6:if(i=e.gj(),i===4&&(a=e.jj(),A(a)===A(this.jj())&&this.hj(null)==e.hj(null))){for(l=Fmt(this),o=e.lj(),u=P(this.g,53),r=V(q9,HF,28,u.length+1,15,1),t=0;t>>0,t.toString(16)));switch(r.a+=` (eventType: `,this.d){case 1:r.a+=`SET`;break;case 2:r.a+=`UNSET`;break;case 3:r.a+=`ADD`;break;case 5:r.a+=`ADD_MANY`;break;case 4:r.a+=`REMOVE`;break;case 6:r.a+=`REMOVE_MANY`;break;case 7:r.a+=`MOVE`;break;case 8:r.a+=`REMOVING_ADAPTER`;break;case 9:r.a+=`RESOLVE`;break;default:Wa(r,this.d)}if(Ult(this)&&(r.a+=`, touch: true`),r.a+=`, position: `,Wa(r,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),r.a+=`, notifier: `,fl(r,this.jj()),r.a+=`, feature: `,fl(r,this.Kj()),r.a+=`, oldValue: `,fl(r,jst(this)),r.a+=`, newValue: `,this.d==6&&j(this.g,53)){for(n=P(this.g,53),r.a+=`[`,e=0;e10?((!this.b||this.c.j!=this.a)&&(this.b=new jp(this),this.a=this.j),mo(this.b,e)):Uk(this,e)},Q.Yi=function(){return!0},Q.a=0,L(uU,`AbstractEList/1`,966),q(302,77,oI,lf),L(uU,`AbstractEList/BasicIndexOutOfBoundsException`,302),q(37,1,VP,Lu),Q.Nb=function(e){Om(this,e)},Q.Xj=function(){if(this.i.j!=this.f)throw E(new Vr)},Q.Yj=function(){return gO(this)},Q.Ob=function(){return this.e!=this.i.gc()},Q.Pb=function(){return this.Yj()},Q.Qb=function(){Yk(this)},Q.e=0,Q.f=0,Q.g=-1,L(uU,`AbstractEList/EIterator`,37),q(286,37,YP,cd,Hm),Q.Qb=function(){Yk(this)},Q.Rb=function(e){y0e(this,e)},Q.Zj=function(){var e;try{return e=this.d.Xb(--this.e),this.Xj(),this.g=this.e,e}catch(e){throw e=ew(e),j(e,77)?(this.Xj(),E(new Hr)):E(e)}},Q.$j=function(e){i3e(this,e)},Q.Sb=function(){return this.e!=0},Q.Tb=function(){return this.e},Q.Ub=function(){return this.Zj()},Q.Vb=function(){return this.e-1},Q.Wb=function(e){this.$j(e)},L(uU,`AbstractEList/EListIterator`,286),q(355,37,VP,ld),Q.Yj=function(){return _O(this)},Q.Qb=function(){throw E(new Br)},L(uU,`AbstractEList/NonResolvingEIterator`,355),q(398,286,YP,ud,LOe),Q.Rb=function(e){throw E(new Br)},Q.Yj=function(){var e;try{return e=this.c.Vi(this.e),this.Xj(),this.g=this.e++,e}catch(e){throw e=ew(e),j(e,77)?(this.Xj(),E(new Hr)):E(e)}},Q.Zj=function(){var e;try{return e=this.c.Vi(--this.e),this.Xj(),this.g=this.e,e}catch(e){throw e=ew(e),j(e,77)?(this.Xj(),E(new Hr)):E(e)}},Q.Qb=function(){throw E(new Br)},Q.Wb=function(e){throw E(new Br)},L(uU,`AbstractEList/NonResolvingEListIterator`,398),q(2080,70,iwt),Q.Ei=function(e,t){var n,r,i=t.gc(),a,o,s,c,l,u,d,f;if(i!=0){for(l=P(NC(this.a,4),129),u=l==null?0:l.length,f=u+i,r=Hw(this,f),d=u-e,d>0&&tN(l,e,r,e+i,d),c=t.Kc(),o=0;on)throw E(new lf(e,n));return new JFe(this,e)},Q.$b=function(){var e,t;++this.j,e=P(NC(this.a,4),129),t=e==null?0:e.length,iO(this,null),Xy(this,t,e)},Q.Hc=function(e){var t=P(NC(this.a,4),129),n,r,i,a;if(t!=null){if(e!=null){for(r=t,i=0,a=r.length;i=n)throw E(new lf(e,n));return t[e]},Q.dd=function(e){var t=P(NC(this.a,4),129),n,r;if(t!=null){if(e!=null){for(n=0,r=t.length;nn)throw E(new lf(e,n));return new qFe(this,e)},Q.Ti=function(e,t){var n=B0e(this),r,i=n==null?0:n.length;if(e>=i)throw E(new Mi(yU+e+bU+i));if(t>=i)throw E(new Mi(xU+t+bU+i));return r=n[t],e!=t&&(e0&&tN(e,0,t,0,n),t},Q.Qc=function(e){var t=P(NC(this.a,4),129),n,r=t==null?0:t.length;return r>0&&(e.lengthr&&Sh(e,r,null),e};var TVt;L(uU,`ArrayDelegatingEList`,2080),q(1051,37,VP,gUe),Q.Xj=function(){if(this.b.j!=this.f||A(P(NC(this.b.a,4),129))!==A(this.a))throw E(new Vr)},Q.Qb=function(){Yk(this),this.a=P(NC(this.b.a,4),129)},L(uU,`ArrayDelegatingEList/EIterator`,1051),q(722,286,YP,lPe,qFe),Q.Xj=function(){if(this.b.j!=this.f||A(P(NC(this.b.a,4),129))!==A(this.a))throw E(new Vr)},Q.$j=function(e){i3e(this,e),this.a=P(NC(this.b.a,4),129)},Q.Qb=function(){Yk(this),this.a=P(NC(this.b.a,4),129)},L(uU,`ArrayDelegatingEList/EListIterator`,722),q(1052,355,VP,_Ue),Q.Xj=function(){if(this.b.j!=this.f||A(P(NC(this.b.a,4),129))!==A(this.a))throw E(new Vr)},L(uU,`ArrayDelegatingEList/NonResolvingEIterator`,1052),q(723,398,YP,uPe,JFe),Q.Xj=function(){if(this.b.j!=this.f||A(P(NC(this.b.a,4),129))!==A(this.a))throw E(new Vr)},L(uU,`ArrayDelegatingEList/NonResolvingEListIterator`,723),q(615,302,oI,wl),L(uU,`BasicEList/BasicIndexOutOfBoundsException`,615),q(710,66,SU,$c),Q.bd=function(e,t){throw E(new Br)},Q.Fc=function(e){throw E(new Br)},Q.cd=function(e,t){throw E(new Br)},Q.Gc=function(e){throw E(new Br)},Q.$b=function(){throw E(new Br)},Q._i=function(e){throw E(new Br)},Q.Kc=function(){return this.Ii()},Q.ed=function(){return this.Ji()},Q.fd=function(e){return this.Ki(e)},Q.Ti=function(e,t){throw E(new Br)},Q.Ui=function(e,t){throw E(new Br)},Q.gd=function(e){throw E(new Br)},Q.Mc=function(e){throw E(new Br)},Q.hd=function(e,t){throw E(new Br)},L(uU,`BasicEList/UnmodifiableEList`,710),q(721,1,{3:1,20:1,16:1,15:1,61:1,597:1}),Q.bd=function(e,t){qwe(this,e,P(t,44))},Q.Fc=function(e){return GEe(this,P(e,44))},Q.Jc=function(e){ly(this,e)},Q.Xb=function(e){return P(H(this.c,e),136)},Q.Ti=function(e,t){return P(this.c.Ti(e,t),44)},Q.Ui=function(e,t){Jwe(this,e,P(t,44))},Q.Lc=function(){return new Mp(null,new cv(this,16))},Q.gd=function(e){return P(this.c.gd(e),44)},Q.hd=function(e,t){return BPe(this,e,P(t,44))},Q.jd=function(e){zS(this,e)},Q.Nc=function(){return new cv(this,16)},Q.Oc=function(){return new Mp(null,new cv(this,16))},Q.cd=function(e,t){return this.c.cd(e,t)},Q.Gc=function(e){return this.c.Gc(e)},Q.$b=function(){this.c.$b()},Q.Hc=function(e){return this.c.Hc(e)},Q.Ic=function(e){return $C(this.c,e)},Q._j=function(){var e,t,n;if(this.d==null){for(this.d=V(SVt,awt,66,2*this.f+1,0,1),n=this.e,this.f=0,t=this.c.Kc();t.e!=t.i.gc();)e=P(t.Yj(),136),JO(this,e);this.e=n}},Q.Fb=function(e){return GOe(this,e)},Q.Hb=function(){return qXe(this.c)},Q.dd=function(e){return this.c.dd(e)},Q.ak=function(){this.c=new Fhe(this)},Q.dc=function(){return this.f==0},Q.Kc=function(){return this.c.Kc()},Q.ed=function(){return this.c.ed()},Q.fd=function(e){return this.c.fd(e)},Q.bk=function(){return Jy(this)},Q.ck=function(e,t,n){return new dje(e,t,n)},Q.dk=function(){return new Rse},Q.Mc=function(e){return aJe(this,e)},Q.gc=function(){return this.f},Q.kd=function(e,t){return new $_(this.c,e,t)},Q.Pc=function(){return this.c.Pc()},Q.Qc=function(e){return this.c.Qc(e)},Q.Ib=function(){return HE(this.c)},Q.e=0,Q.f=0,L(uU,`BasicEMap`,721),q(1046,66,SU,Fhe),Q.Mi=function(e,t){Oge(this,P(t,136))},Q.Pi=function(e,t,n){var r;++(r=this,P(t,136),r).a.e},Q.Qi=function(e,t){kge(this,P(t,136))},Q.Ri=function(e,t,n){hEe(this,P(t,136),P(n,136))},Q.Oi=function(e,t){sXe(this.a)},L(uU,`BasicEMap/1`,1046),q(1047,66,SU,Rse),Q.aj=function(e){return V(EVt,owt,621,e,0,1)},L(uU,`BasicEMap/2`,1047),q(1048,GP,KP,Ihe),Q.$b=function(){this.a.c.$b()},Q.Hc=function(e){return uD(this.a,e)},Q.Kc=function(){return this.a.f==0?(Nd(),_7.a):new qve(this.a)},Q.Mc=function(e){var t=this.a.f;return BD(this.a,e),this.a.f!=t},Q.gc=function(){return this.a.f},L(uU,`BasicEMap/3`,1048),q(1049,31,WP,Lhe),Q.$b=function(){this.a.c.$b()},Q.Hc=function(e){return Nct(this.a,e)},Q.Kc=function(){return this.a.f==0?(Nd(),_7.a):new Jve(this.a)},Q.gc=function(){return this.a.f},L(uU,`BasicEMap/4`,1049),q(1050,GP,KP,Rhe),Q.$b=function(){this.a.c.$b()},Q.Hc=function(e){var t,n,r,i,a,o,s,c,l;if(this.a.f>0&&j(e,44)&&(this.a._j(),c=P(e,44),s=c.ld(),i=s==null?0:US(s),a=MDe(this.a,i),t=this.a.d[a],t)){for(n=P(t.g,379),l=t.i,o=0;o`+this.c},Q.a=0;var EVt=L(uU,`BasicEMap/EntryImpl`,621);q(546,1,{},on),L(uU,`BasicEMap/View`,546);var _7;q(783,1,{}),Q.Fb=function(e){return lit((Vg(),QG),e)},Q.Hb=function(){return IZe((Vg(),QG))},Q.Ib=function(){return CA((Vg(),QG))},L(uU,`ECollections/BasicEmptyUnmodifiableEList`,783),q(1348,1,YP,zse),Q.Nb=function(e){Om(this,e)},Q.Rb=function(e){throw E(new Br)},Q.Ob=function(){return!1},Q.Sb=function(){return!1},Q.Pb=function(){throw E(new Hr)},Q.Tb=function(){return 0},Q.Ub=function(){throw E(new Hr)},Q.Vb=function(){return-1},Q.Qb=function(){throw E(new Br)},Q.Wb=function(e){throw E(new Br)},L(uU,`ECollections/BasicEmptyUnmodifiableEList/1`,1348),q(1346,783,{20:1,16:1,15:1,61:1},c_e),Q.bd=function(e,t){Eye()},Q.Fc=function(e){return Dye()},Q.cd=function(e,t){return Oye()},Q.Gc=function(e){return kye()},Q.$b=function(){Aye()},Q.Hc=function(e){return!1},Q.Ic=function(e){return!1},Q.Jc=function(e){ly(this,e)},Q.Xb=function(e){return xl((Vg(),e)),null},Q.dd=function(e){return-1},Q.dc=function(){return!0},Q.Kc=function(){return this.a},Q.ed=function(){return this.a},Q.fd=function(e){return this.a},Q.Ti=function(e,t){return jye()},Q.Ui=function(e,t){Mye()},Q.Lc=function(){return new Mp(null,new cv(this,16))},Q.gd=function(e){return Nye()},Q.Mc=function(e){return Pye()},Q.hd=function(e,t){return Fye()},Q.gc=function(){return 0},Q.jd=function(e){zS(this,e)},Q.Nc=function(){return new cv(this,16)},Q.Oc=function(){return new Mp(null,new cv(this,16))},Q.kd=function(e,t){return Vg(),new $_(QG,e,t)},Q.Pc=function(){return INe((Vg(),QG))},Q.Qc=function(e){return Vg(),ck(QG,e)},L(uU,`ECollections/EmptyUnmodifiableEList`,1346),q(1347,783,{20:1,16:1,15:1,61:1,597:1},l_e),Q.bd=function(e,t){Eye()},Q.Fc=function(e){return Dye()},Q.cd=function(e,t){return Oye()},Q.Gc=function(e){return kye()},Q.$b=function(){Aye()},Q.Hc=function(e){return!1},Q.Ic=function(e){return!1},Q.Jc=function(e){ly(this,e)},Q.Xb=function(e){return xl((Vg(),e)),null},Q.dd=function(e){return-1},Q.dc=function(){return!0},Q.Kc=function(){return this.a},Q.ed=function(){return this.a},Q.fd=function(e){return this.a},Q.Ti=function(e,t){return jye()},Q.Ui=function(e,t){Mye()},Q.Lc=function(){return new Mp(null,new cv(this,16))},Q.gd=function(e){return Nye()},Q.Mc=function(e){return Pye()},Q.hd=function(e,t){return Fye()},Q.gc=function(){return 0},Q.jd=function(e){zS(this,e)},Q.Nc=function(){return new cv(this,16)},Q.Oc=function(){return new Mp(null,new cv(this,16))},Q.kd=function(e,t){return Vg(),new $_(QG,e,t)},Q.Pc=function(){return INe((Vg(),QG))},Q.Qc=function(e){return Vg(),ck(QG,e)},Q.bk=function(){return Vg(),Vg(),$G},L(uU,`ECollections/EmptyUnmodifiableEMap`,1347);var DVt=gp(uU,`Enumerator`),v7;q(288,1,{288:1},yM),Q.Fb=function(e){var t;return this===e?!0:j(e,288)?(t=P(e,288),this.f==t.f&&rNe(this.i,t.i)&&Fp(this.a,this.f&256?t.f&256?t.a:null:t.f&256?null:t.a)&&Fp(this.d,t.d)&&Fp(this.g,t.g)&&Fp(this.e,t.e)&&U2e(this,t)):!1},Q.Hb=function(){return this.f},Q.Ib=function(){return qut(this)},Q.f=0;var OVt=0,kVt=0,AVt=0,jVt=0,MVt=0,NVt=0,PVt=0,FVt=0,IVt=0,LVt,y7=0,b7=0,RVt=0,zVt=0,x7,BVt;L(uU,`URI`,288),q(1121,45,CI,u_e),Q.zc=function(e,t){return P(H_(this,kd(e),P(t,288)),288)},L(uU,`URI/URICache`,1121),q(506,66,SU,Nse,Hp),Q.Si=function(){return!0},L(uU,`UniqueEList`,506),q(590,63,SF,Nb),L(uU,`WrappedException`,590);var S7=gp(zH,lwt),C7=gp(zH,uwt),w7=gp(zH,dwt),T7=gp(zH,fwt),E7=gp(zH,pwt),D7=gp(zH,`EClass`),O7=gp(zH,`EDataType`),VVt;q(1233,45,CI,d_e),Q.xc=function(e){return rl(e)?v_(this,e):nl(Kp(this.f,e))},L(zH,`EDataType/Internal/ConversionDelegate/Factory/Registry/Impl`,1233);var k7=gp(zH,`EEnum`),A7=gp(zH,mwt),j7=gp(zH,hwt),M7=gp(zH,gwt),N7,P7=gp(zH,_wt),F7=gp(zH,vwt);q(1042,1,{},Mse),Q.Ib=function(){return`NIL`},L(zH,`EStructuralFeature/Internal/DynamicValueHolder/1`,1042);var HVt;q(1041,45,CI,f_e),Q.xc=function(e){return rl(e)?v_(this,e):nl(Kp(this.f,e))},L(zH,`EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl`,1041);var I7=gp(zH,ywt),L7=gp(zH,`EValidator/PatternMatcher`),UVt,R7,z7,B7,V7,H7,WVt,GVt,KVt,U7,W7,G7,K7,q7,qVt,JVt,J7,Y7,YVt,X7,Z7,Q7,$7,XVt,ZVt,e9,t9=gp(IU,`FeatureMap/Entry`);q(545,1,{76:1},Zc),Q.Lk=function(){return this.a},Q.md=function(){return this.b},L(KH,`BasicEObjectImpl/1`,545),q(1040,1,LU,JSe),Q.Fk=function(e){return wy(this.a,this.b,e)},Q.Qj=function(){return iRe(this.a,this.b)},Q.Wb=function(e){rRe(this.a,this.b,e)},Q.Gk=function(){yFe(this.a,this.b)},L(KH,`BasicEObjectImpl/4`,1040),q(2081,1,{114:1}),Q.Mk=function(e){this.e=e==0?QVt:V(WW,FP,1,e,5,1)},Q.li=function(e){return this.e[e]},Q.mi=function(e,t){this.e[e]=t},Q.ni=function(e){this.e[e]=null},Q.Nk=function(){return this.c},Q.Ok=function(){throw E(new Br)},Q.Pk=function(){throw E(new Br)},Q.Qk=function(){return this.d},Q.Rk=function(){return this.e!=null},Q.Sk=function(e){this.c=e},Q.Tk=function(e){throw E(new Br)},Q.Uk=function(e){throw E(new Br)},Q.Vk=function(e){this.d=e};var QVt;L(KH,`BasicEObjectImpl/EPropertiesHolderBaseImpl`,2081),q(192,2081,{114:1},fn),Q.Ok=function(){return this.a},Q.Pk=function(){return this.b},Q.Tk=function(e){this.a=e},Q.Uk=function(e){this.b=e},L(KH,`BasicEObjectImpl/EPropertiesHolderImpl`,192),q(516,99,nCt,sn),Q.uh=function(){return this.f},Q.zh=function(){return this.k},Q.Bh=function(e,t){this.g=e,this.i=t},Q.Dh=function(){return this.j&2?this.$h().Nk():this.ii()},Q.Fh=function(){return this.i},Q.wh=function(){return!!(this.j&1)},Q.Ph=function(){return this.g},Q.Vh=function(){return!!(this.j&4)},Q.$h=function(){return!this.k&&(this.k=new fn),this.k},Q.ci=function(e){this.$h().Sk(e),e?this.j|=2:this.j&=-3},Q.ei=function(e){this.$h().Uk(e),e?this.j|=4:this.j&=-5},Q.ii=function(){return(vh(),z7).S},Q.i=0,Q.j=1,L(KH,`EObjectImpl`,516),q(798,516,{110:1,94:1,93:1,58:1,114:1,54:1,99:1},eMe),Q.li=function(e){return this.e[e]},Q.mi=function(e,t){this.e[e]=t},Q.ni=function(e){this.e[e]=null},Q.Dh=function(){return this.d},Q.Ih=function(e){return eD(this.d,e)},Q.Kh=function(){return this.d},Q.Oh=function(){return this.e!=null},Q.$h=function(){return!this.k&&(this.k=new Bse),this.k},Q.ci=function(e){this.d=e},Q.hi=function(){var e;return this.e??=(e=bh(this.d),e==0?$Vt:V(WW,FP,1,e,5,1)),this},Q.ji=function(){return 0};var $Vt;L(KH,`DynamicEObjectImpl`,798),q(1522,798,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1},OMe),Q.Fb=function(e){return this===e},Q.Hb=function(){return td(this)},Q.ci=function(e){this.d=e,this.b=Qj(e,`key`),this.c=Qj(e,tU)},Q.Bi=function(){var e;return this.a==-1&&(e=Kb(this,this.b),this.a=e==null?0:US(e)),this.a},Q.ld=function(){return Kb(this,this.b)},Q.md=function(){return Kb(this,this.c)},Q.Ci=function(e){this.a=e},Q.Di=function(e){rRe(this,this.b,e)},Q.nd=function(e){var t=Kb(this,this.c);return rRe(this,this.c,e),t},Q.a=0,L(KH,`DynamicEObjectImpl/BasicEMapEntry`,1522),q(1523,1,{114:1},Bse),Q.Mk=function(e){throw E(new Br)},Q.li=function(e){throw E(new Br)},Q.mi=function(e,t){throw E(new Br)},Q.ni=function(e){throw E(new Br)},Q.Nk=function(){throw E(new Br)},Q.Ok=function(){return this.a},Q.Pk=function(){return this.b},Q.Qk=function(){return this.c},Q.Rk=function(){throw E(new Br)},Q.Sk=function(e){throw E(new Br)},Q.Tk=function(e){this.a=e},Q.Uk=function(e){this.b=e},Q.Vk=function(e){this.c=e},L(KH,`DynamicEObjectImpl/DynamicEPropertiesHolderImpl`,1523),q(519,158,{110:1,94:1,93:1,598:1,155:1,58:1,114:1,54:1,99:1,519:1,158:1,119:1,120:1},Vse),Q.Ah=function(e){return T6e(this,e)},Q.Lh=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.d;case 2:return n?(!this.b&&(this.b=new Td((CP(),$7),o9,this)),this.b):(!this.b&&(this.b=new Td((CP(),$7),o9,this)),Jy(this.b));case 3:return hRe(this);case 4:return!this.a&&(this.a=new ju(L5,this,4)),this.a;case 5:return!this.c&&(this.c=new Pu(L5,this,5)),this.c}return xb(this,e-bh((CP(),B7)),_x((r=P(NC(this,16),29),r||B7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 3:return this.Cb&&(n=(i=this.Db>>16,i>=0?T6e(this,n):this.Cb.Th(this,-1-i,null,n))),MNe(this,P(e,155),n)}return a=P(_x((r=P(NC(this,16),29),r||(CP(),B7)),t),69),a.wk().zk(this,WD(this),t-bh((CP(),B7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 2:return!this.b&&(this.b=new Td((CP(),$7),o9,this)),gf(this.b,e,n);case 3:return MNe(this,null,n);case 4:return!this.a&&(this.a=new ju(L5,this,4)),AO(this.a,e,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),B7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),B7)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!hRe(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Hv(this,e-bh((CP(),B7)),_x((t=P(NC(this,16),29),t||B7),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:PMe(this,kd(t));return;case 2:!this.b&&(this.b=new Td((CP(),$7),o9,this)),bC(this.b,t);return;case 3:Aot(this,P(t,155));return;case 4:!this.a&&(this.a=new ju(L5,this,4)),RN(this.a),!this.a&&(this.a=new ju(L5,this,4)),th(this.a,P(t,16));return;case 5:!this.c&&(this.c=new Pu(L5,this,5)),RN(this.c),!this.c&&(this.c=new Pu(L5,this,5)),th(this.c,P(t,16));return}LE(this,e-bh((CP(),B7)),_x((n=P(NC(this,16),29),n||B7),e),t)},Q.ii=function(){return CP(),B7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:FJe(this,null);return;case 2:!this.b&&(this.b=new Td((CP(),$7),o9,this)),this.b.c.$b();return;case 3:Aot(this,null);return;case 4:!this.a&&(this.a=new ju(L5,this,4)),RN(this.a);return;case 5:!this.c&&(this.c=new Pu(L5,this,5)),RN(this.c);return}PT(this,e-bh((CP(),B7)),_x((t=P(NC(this,16),29),t||B7),e))},Q.Ib=function(){return L$e(this)},Q.d=null,L(KH,`EAnnotationImpl`,519),q(141,721,bwt,lb),Q.Gi=function(e,t){awe(this,e,P(t,44))},Q.Wk=function(e,t){return KOe(this,P(e,44),t)},Q.$i=function(e){return P(P(this.c,71).$i(e),136)},Q.Ii=function(){return P(this.c,71).Ii()},Q.Ji=function(){return P(this.c,71).Ji()},Q.Ki=function(e){return P(this.c,71).Ki(e)},Q.Xk=function(e,t){return gf(this,e,t)},Q.Fk=function(e){return P(this.c,79).Fk(e)},Q.ak=function(){},Q.Qj=function(){return P(this.c,79).Qj()},Q.ck=function(e,t,n){var r=P(Mx(this.b).wi().si(this.b),136);return r.Ci(e),r.Di(t),r.nd(n),r},Q.dk=function(){return new Yhe(this)},Q.Wb=function(e){bC(this,e)},Q.Gk=function(){P(this.c,79).Gk()},L(IU,`EcoreEMap`,141),q(165,141,bwt,Td),Q._j=function(){var e,t,n,r,i,a;if(this.d==null){for(a=V(SVt,awt,66,2*this.f+1,0,1),n=this.c.Kc();n.e!=n.i.gc();)t=P(n.Yj(),136),r=t.Bi(),i=(r&AP)%a.length,e=a[i],!e&&(e=a[i]=new Yhe(this)),e.Fc(t);this.d=a}},L(KH,`EAnnotationImpl/1`,165),q(292,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,481:1,54:1,99:1,158:1,292:1,119:1,120:1}),Q.Lh=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return rd(),!!(this.Bb&256);case 3:return rd(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return rd(),!!this.Jk();case 7:return rd(),i=this.s,i>=1;case 8:return t?Ik(this):this.r;case 9:return this.q}return xb(this,e-bh(this.ii()),_x((r=P(NC(this,16),29),r||this.ii()),e),t,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 9:return nh(this,n)}return i=P(_x((r=P(NC(this,16),29),r||this.ii()),t),69),i.wk().Ak(this,WD(this),t-bh(this.ii()),e,n)},Q.Wh=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Jk();case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&kh(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&kh(this.q).i==0)}return Hv(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:this.ui(kd(t));return;case 2:FT(this,ki(Od(t)));return;case 3:RT(this,ki(Od(t)));return;case 4:Zx(this,P(t,17).a);return;case 5:this.Zk(P(t,17).a);return;case 8:aT(this,P(t,142));return;case 9:r=fA(this,P(t,89),null),r&&r.oj();return}LE(this,e-bh(this.ii()),_x((n=P(NC(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return CP(),ZVt},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:this.ui(null);return;case 2:FT(this,!0);return;case 3:RT(this,!0);return;case 4:Zx(this,0);return;case 5:this.Zk(1);return;case 8:aT(this,null);return;case 9:n=fA(this,null,null),n&&n.oj();return}PT(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.pi=function(){Ik(this),this.Bb|=1},Q.Hk=function(){return Ik(this)},Q.Ik=function(){return this.t},Q.Jk=function(){var e;return e=this.t,e>1||e==-1},Q.Si=function(){return!!(this.Bb&512)},Q.Yk=function(e,t){return kT(this,e,t)},Q.Zk=function(e){Qx(this,e)},Q.Ib=function(){return Srt(this)},Q.s=0,Q.t=1,L(KH,`ETypedElementImpl`,292),q(462,292,{110:1,94:1,93:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,462:1,292:1,119:1,120:1,692:1}),Q.Ah=function(e){return X3e(this,e)},Q.Lh=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return rd(),!!(this.Bb&256);case 3:return rd(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return rd(),!!this.Jk();case 7:return rd(),i=this.s,i>=1;case 8:return t?Ik(this):this.r;case 9:return this.q;case 10:return rd(),(this.Bb&pF)!=0;case 11:return rd(),(this.Bb&zU)!=0;case 12:return rd(),(this.Bb&uI)!=0;case 13:return this.j;case 14:return Uj(this);case 15:return rd(),(this.Bb&RU)!=0;case 16:return rd(),(this.Bb&ZP)!=0;case 17:return L_(this)}return xb(this,e-bh(this.ii()),_x((r=P(NC(this,16),29),r||this.ii()),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 17:return this.Cb&&(n=(i=this.Db>>16,i>=0?X3e(this,n):this.Cb.Th(this,-1-i,null,n))),qM(this,e,17,n)}return a=P(_x((r=P(NC(this,16),29),r||this.ii()),t),69),a.wk().zk(this,WD(this),t-bh(this.ii()),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 9:return nh(this,n);case 17:return qM(this,null,17,n)}return i=P(_x((r=P(NC(this,16),29),r||this.ii()),t),69),i.wk().Ak(this,WD(this),t-bh(this.ii()),e,n)},Q.Wh=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Jk();case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&kh(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&kh(this.q).i==0);case 10:return(this.Bb&pF)==0;case 11:return(this.Bb&zU)!=0;case 12:return(this.Bb&uI)!=0;case 13:return this.j!=null;case 14:return Uj(this)!=null;case 15:return(this.Bb&RU)!=0;case 16:return(this.Bb&ZP)!=0;case 17:return!!L_(this)}return Hv(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:X_(this,kd(t));return;case 2:FT(this,ki(Od(t)));return;case 3:RT(this,ki(Od(t)));return;case 4:Zx(this,P(t,17).a);return;case 5:this.Zk(P(t,17).a);return;case 8:aT(this,P(t,142));return;case 9:r=fA(this,P(t,89),null),r&&r.oj();return;case 10:eE(this,ki(Od(t)));return;case 11:rE(this,ki(Od(t)));return;case 12:tE(this,ki(Od(t)));return;case 13:Xc(this,kd(t));return;case 15:nE(this,ki(Od(t)));return;case 16:gE(this,ki(Od(t)));return}LE(this,e-bh(this.ii()),_x((n=P(NC(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return CP(),XVt},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:j(this.Cb,90)&&$A(_y(P(this.Cb,90)),4),GS(this,null);return;case 2:FT(this,!0);return;case 3:RT(this,!0);return;case 4:Zx(this,0);return;case 5:this.Zk(1);return;case 8:aT(this,null);return;case 9:n=fA(this,null,null),n&&n.oj();return;case 10:eE(this,!0);return;case 11:rE(this,!1);return;case 12:tE(this,!1);return;case 13:this.i=null,OS(this,null);return;case 15:nE(this,!1);return;case 16:gE(this,!1);return}PT(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.pi=function(){lg(Rb((UA(),l9),this)),Ik(this),this.Bb|=1},Q.pk=function(){return this.f},Q.ik=function(){return Uj(this)},Q.qk=function(){return L_(this)},Q.uk=function(){return null},Q.$k=function(){return this.k},Q.Lj=function(){return this.n},Q.vk=function(){return $k(this)},Q.wk=function(){var e,t,n,r,i,a,o,s,c;return this.p||(n=L_(this),(n.i??aN(n),n.i).length,r=this.uk(),r&&bh(L_(r)),i=Ik(this),o=i.kk(),e=o?o.i&1?o==J9?bG:o==q9?DG:o==Q9?EG:o==Z9?TG:o==Y9?kG:o==$9?PG:o==X9?xG:CG:o:null,t=Uj(this),s=i.ik(),E1e(this),(this.Bb&ZP)!=0&&((a=C8e((UA(),l9),n))&&a!=this||(a=mv(Rb(l9,this))))?this.p=new XSe(this,a):this.Jk()?this.al()?this.p=r?(this.Bb&RU)==0?e?this.bl()?new Og(49,e,this,r):new Og(7,e,this,r):this.bl()?new ty(48,this,r):new ty(6,this,r):e?this.bl()?new Og(47,e,this,r):new Og(5,e,this,r):this.bl()?new ty(46,this,r):new ty(4,this,r):(this.Bb&RU)==0?e?e==YW?new Wf(41,yVt,this):this.bl()?new Wf(45,e,this):new Wf(3,e,this):this.bl()?new a_(44,this):new a_(2,this):e?e==YW?new Wf(50,yVt,this):this.bl()?new Wf(43,e,this):new Wf(1,e,this):this.bl()?new a_(42,this):new a_(0,this):j(i,156)?this.p=e==t9?new a_(40,this):this.Bb&512?(this.Bb&RU)==0?e?new Wf(11,e,this):new a_(10,this):e?new Wf(9,e,this):new a_(8,this):(this.Bb&RU)==0?e?new Wf(15,e,this):new a_(14,this):e?new Wf(13,e,this):new a_(12,this):r?(c=r.t,this.p=c>1||c==-1?this.bl()?(this.Bb&RU)==0?e?new Og(27,e,this,r):new ty(26,this,r):e?new Og(25,e,this,r):new ty(24,this,r):(this.Bb&RU)==0?e?new Og(31,e,this,r):new ty(30,this,r):e?new Og(29,e,this,r):new ty(28,this,r):this.bl()?(this.Bb&RU)==0?e?new Og(35,e,this,r):new ty(34,this,r):e?new Og(33,e,this,r):new ty(32,this,r):(this.Bb&RU)==0?e?new Og(39,e,this,r):new ty(38,this,r):e?new Og(37,e,this,r):new ty(36,this,r)):this.p=this.bl()?(this.Bb&RU)==0?e?new Wf(19,e,this):new a_(18,this):e?new Wf(17,e,this):new a_(16,this):(this.Bb&RU)==0?e?new Wf(23,e,this):new a_(22,this):e?new Wf(21,e,this):new a_(20,this):this.p=this._k()?this.bl()?new fje(P(i,29),this,r):new ILe(P(i,29),this,r):j(i,156)?e==t9?new a_(40,this):(this.Bb&RU)==0?e?new kNe(t,s,this,(mD(),o==q9?lHt:o==J9?iHt:o==Y9?uHt:o==Q9?cHt:o==Z9?sHt:o==$9?dHt:o==X9?aHt:o==K9?oHt:c9)):new gIe(P(i,156),t,s,this):e?new ANe(t,s,this,(mD(),o==q9?lHt:o==J9?iHt:o==Y9?uHt:o==Q9?cHt:o==Z9?sHt:o==$9?dHt:o==X9?aHt:o==K9?oHt:c9)):new _Ie(P(i,156),t,s,this):this.al()?r?(this.Bb&RU)==0?this.bl()?new hje(P(i,29),this,r):new Gf(P(i,29),this,r):this.bl()?new _je(P(i,29),this,r):new gje(P(i,29),this,r):(this.Bb&RU)==0?this.bl()?new JEe(P(i,29),this):new Ed(P(i,29),this):this.bl()?new ZEe(P(i,29),this):new YEe(P(i,29),this):this.bl()?r?(this.Bb&RU)==0?new pje(P(i,29),this,r):new vje(P(i,29),this,r):(this.Bb&RU)==0?new XEe(P(i,29),this):new QEe(P(i,29),this):r?(this.Bb&RU)==0?new mje(P(i,29),this,r):new yje(P(i,29),this,r):(this.Bb&RU)==0?new Bp(P(i,29),this):new $Ee(P(i,29),this)),this.p},Q.rk=function(){return(this.Bb&pF)!=0},Q._k=function(){return!1},Q.al=function(){return!1},Q.sk=function(){return(this.Bb&ZP)!=0},Q.xk=function(){return ex(this)},Q.bl=function(){return!1},Q.tk=function(){return(this.Bb&RU)!=0},Q.cl=function(e){this.k=e},Q.ui=function(e){X_(this,e)},Q.Ib=function(){return SM(this)},Q.e=!1,Q.n=0,L(KH,`EStructuralFeatureImpl`,462),q(331,462,{110:1,94:1,93:1,35:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,331:1,158:1,462:1,292:1,119:1,120:1,692:1},oi),Q.Lh=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return rd(),!!(this.Bb&256);case 3:return rd(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return rd(),!!Dnt(this);case 7:return rd(),i=this.s,i>=1;case 8:return t?Ik(this):this.r;case 9:return this.q;case 10:return rd(),(this.Bb&pF)!=0;case 11:return rd(),(this.Bb&zU)!=0;case 12:return rd(),(this.Bb&uI)!=0;case 13:return this.j;case 14:return Uj(this);case 15:return rd(),(this.Bb&RU)!=0;case 16:return rd(),(this.Bb&ZP)!=0;case 17:return L_(this);case 18:return rd(),(this.Bb&GH)!=0;case 19:return t?QC(this):tWe(this)}return xb(this,e-bh((CP(),V7)),_x((r=P(NC(this,16),29),r||V7),e),t,n)},Q.Wh=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return Dnt(this);case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&kh(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&kh(this.q).i==0);case 10:return(this.Bb&pF)==0;case 11:return(this.Bb&zU)!=0;case 12:return(this.Bb&uI)!=0;case 13:return this.j!=null;case 14:return Uj(this)!=null;case 15:return(this.Bb&RU)!=0;case 16:return(this.Bb&ZP)!=0;case 17:return!!L_(this);case 18:return(this.Bb&GH)!=0;case 19:return!!tWe(this)}return Hv(this,e-bh((CP(),V7)),_x((t=P(NC(this,16),29),t||V7),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:X_(this,kd(t));return;case 2:FT(this,ki(Od(t)));return;case 3:RT(this,ki(Od(t)));return;case 4:Zx(this,P(t,17).a);return;case 5:Zve(this,P(t,17).a);return;case 8:aT(this,P(t,142));return;case 9:r=fA(this,P(t,89),null),r&&r.oj();return;case 10:eE(this,ki(Od(t)));return;case 11:rE(this,ki(Od(t)));return;case 12:tE(this,ki(Od(t)));return;case 13:Xc(this,kd(t));return;case 15:nE(this,ki(Od(t)));return;case 16:gE(this,ki(Od(t)));return;case 18:mE(this,ki(Od(t)));return}LE(this,e-bh((CP(),V7)),_x((n=P(NC(this,16),29),n||V7),e),t)},Q.ii=function(){return CP(),V7},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:j(this.Cb,90)&&$A(_y(P(this.Cb,90)),4),GS(this,null);return;case 2:FT(this,!0);return;case 3:RT(this,!0);return;case 4:Zx(this,0);return;case 5:this.b=0,Qx(this,1);return;case 8:aT(this,null);return;case 9:n=fA(this,null,null),n&&n.oj();return;case 10:eE(this,!0);return;case 11:rE(this,!1);return;case 12:tE(this,!1);return;case 13:this.i=null,OS(this,null);return;case 15:nE(this,!1);return;case 16:gE(this,!1);return;case 18:mE(this,!1);return}PT(this,e-bh((CP(),V7)),_x((t=P(NC(this,16),29),t||V7),e))},Q.pi=function(){QC(this),lg(Rb((UA(),l9),this)),Ik(this),this.Bb|=1},Q.Jk=function(){return Dnt(this)},Q.Yk=function(e,t){return this.b=0,this.a=null,kT(this,e,t)},Q.Zk=function(e){Zve(this,e)},Q.Ib=function(){var e;return this.Db&64?SM(this):(e=new Wu(SM(this)),e.a+=` (iD: `,Ga(e,(this.Bb&GH)!=0),e.a+=`)`,e.a)},Q.b=0,L(KH,`EAttributeImpl`,331),q(364,448,{110:1,94:1,93:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1}),Q.dl=function(e){return e.Dh()==this},Q.Ah=function(e){return bk(this,e)},Q.Bh=function(e,t){this.w=null,this.Db=t<<16|this.Db&255,this.Cb=e},Q.Lh=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return _k(this);case 4:return this.ik();case 5:return this.F;case 6:return t?Mx(this):F_(this);case 7:return!this.A&&(this.A=new Nu(I7,this,7)),this.A}return xb(this,e-bh(this.ii()),_x((r=P(NC(this,16),29),r||this.ii()),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?bk(this,n):this.Cb.Th(this,-1-i,null,n))),qM(this,e,6,n)}return a=P(_x((r=P(NC(this,16),29),r||this.ii()),t),69),a.wk().zk(this,WD(this),t-bh(this.ii()),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 6:return qM(this,null,6,n);case 7:return!this.A&&(this.A=new Nu(I7,this,7)),AO(this.A,e,n)}return i=P(_x((r=P(NC(this,16),29),r||this.ii()),t),69),i.wk().Ak(this,WD(this),t-bh(this.ii()),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!_k(this);case 4:return this.ik()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!F_(this);case 7:return!!this.A&&this.A.i!=0}return Hv(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:Y_(this,kd(t));return;case 2:Xl(this,kd(t));return;case 5:qN(this,kd(t));return;case 7:!this.A&&(this.A=new Nu(I7,this,7)),RN(this.A),!this.A&&(this.A=new Nu(I7,this,7)),th(this.A,P(t,16));return}LE(this,e-bh(this.ii()),_x((n=P(NC(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return CP(),WVt},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:j(this.Cb,184)&&(P(this.Cb,184).tb=null),GS(this,null);return;case 2:Gw(this,null),eS(this,this.D);return;case 5:qN(this,null);return;case 7:!this.A&&(this.A=new Nu(I7,this,7)),RN(this.A);return}PT(this,e-bh(this.ii()),_x((t=P(NC(this,16),29),t||this.ii()),e))},Q.hk=function(){var e;return this.G==-1&&(this.G=(e=Mx(this),e?NO(e.vi(),this):-1)),this.G},Q.ik=function(){return null},Q.jk=function(){return Mx(this)},Q.el=function(){return this.v},Q.kk=function(){return _k(this)},Q.lk=function(){return this.D==null?this.B:this.D},Q.mk=function(){return this.F},Q.fk=function(e){return QM(this,e)},Q.fl=function(e){this.v=e},Q.gl=function(e){fYe(this,e)},Q.hl=function(e){this.C=e},Q.ui=function(e){Y_(this,e)},Q.Ib=function(){return sD(this)},Q.C=null,Q.D=null,Q.G=-1,L(KH,`EClassifierImpl`,364),q(90,364,{110:1,94:1,93:1,29:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,90:1,364:1,158:1,482:1,119:1,120:1,691:1},Que),Q.dl=function(e){return pOe(this,e.Dh())},Q.Lh=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return _k(this);case 4:return null;case 5:return this.F;case 6:return t?Mx(this):F_(this);case 7:return!this.A&&(this.A=new Nu(I7,this,7)),this.A;case 8:return rd(),!!(this.Bb&256);case 9:return rd(),!!(this.Bb&512);case 10:return l_(this);case 11:return!this.q&&(this.q=new F(M7,this,11,10)),this.q;case 12:return bN(this);case 13:return gN(this);case 14:return gN(this),this.r;case 15:return bN(this),this.k;case 16:return Qet(this);case 17:return fN(this);case 18:return aN(this);case 19:return zj(this);case 20:return bN(this),this.o;case 21:return!this.s&&(this.s=new F(w7,this,21,17)),this.s;case 22:return Jv(this);case 23:return _M(this)}return xb(this,e-bh((CP(),H7)),_x((r=P(NC(this,16),29),r||H7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?bk(this,n):this.Cb.Th(this,-1-i,null,n))),qM(this,e,6,n);case 11:return!this.q&&(this.q=new F(M7,this,11,10)),vD(this.q,e,n);case 21:return!this.s&&(this.s=new F(w7,this,21,17)),vD(this.s,e,n)}return a=P(_x((r=P(NC(this,16),29),r||(CP(),H7)),t),69),a.wk().zk(this,WD(this),t-bh((CP(),H7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 6:return qM(this,null,6,n);case 7:return!this.A&&(this.A=new Nu(I7,this,7)),AO(this.A,e,n);case 11:return!this.q&&(this.q=new F(M7,this,11,10)),AO(this.q,e,n);case 21:return!this.s&&(this.s=new F(w7,this,21,17)),AO(this.s,e,n);case 22:return AO(Jv(this),e,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),H7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),H7)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!_k(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!F_(this);case 7:return!!this.A&&this.A.i!=0;case 8:return!!(this.Bb&256);case 9:return!!(this.Bb&512);case 10:return!!this.u&&Jv(this.u.a).i!=0&&!(this.n&&QO(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return bN(this).i!=0;case 13:return gN(this).i!=0;case 14:return gN(this),this.r.i!=0;case 15:return bN(this),this.k.i!=0;case 16:return Qet(this).i!=0;case 17:return fN(this).i!=0;case 18:return aN(this).i!=0;case 19:return zj(this).i!=0;case 20:return bN(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&QO(this.n);case 23:return _M(this).i!=0}return Hv(this,e-bh((CP(),H7)),_x((t=P(NC(this,16),29),t||H7),e))},Q.Zh=function(e){return(this.i==null||this.q&&this.q.i!=0?null:Qj(this,e))||rP(this,e)},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:Y_(this,kd(t));return;case 2:Xl(this,kd(t));return;case 5:qN(this,kd(t));return;case 7:!this.A&&(this.A=new Nu(I7,this,7)),RN(this.A),!this.A&&(this.A=new Nu(I7,this,7)),th(this.A,P(t,16));return;case 8:IT(this,ki(Od(t)));return;case 9:zT(this,ki(Od(t)));return;case 10:zN(l_(this)),th(l_(this),P(t,16));return;case 11:!this.q&&(this.q=new F(M7,this,11,10)),RN(this.q),!this.q&&(this.q=new F(M7,this,11,10)),th(this.q,P(t,16));return;case 21:!this.s&&(this.s=new F(w7,this,21,17)),RN(this.s),!this.s&&(this.s=new F(w7,this,21,17)),th(this.s,P(t,16));return;case 22:RN(Jv(this)),th(Jv(this),P(t,16));return}LE(this,e-bh((CP(),H7)),_x((n=P(NC(this,16),29),n||H7),e),t)},Q.ii=function(){return CP(),H7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:j(this.Cb,184)&&(P(this.Cb,184).tb=null),GS(this,null);return;case 2:Gw(this,null),eS(this,this.D);return;case 5:qN(this,null);return;case 7:!this.A&&(this.A=new Nu(I7,this,7)),RN(this.A);return;case 8:IT(this,!1);return;case 9:zT(this,!1);return;case 10:this.u&&zN(this.u);return;case 11:!this.q&&(this.q=new F(M7,this,11,10)),RN(this.q);return;case 21:!this.s&&(this.s=new F(w7,this,21,17)),RN(this.s);return;case 22:this.n&&RN(this.n);return}PT(this,e-bh((CP(),H7)),_x((t=P(NC(this,16),29),t||H7),e))},Q.pi=function(){var e,t;if(bN(this),gN(this),Qet(this),fN(this),aN(this),zj(this),_M(this),Ey(Eje(_y(this))),this.s)for(e=0,t=this.s.i;e=0;--t)H(this,t);return oD(this,e)},Q.Gk=function(){RN(this)},Q.Zi=function(e,t){return Hqe(this,e,t)},L(IU,`EcoreEList`,632),q(505,632,JU,rp),Q.Li=function(){return!1},Q.Lj=function(){return this.c},Q.Mj=function(){return!1},Q.ol=function(){return!0},Q.Si=function(){return!0},Q.Wi=function(e,t){return t},Q.Yi=function(){return!1},Q.c=0,L(IU,`EObjectEList`,505),q(83,505,JU,ju),Q.Mj=function(){return!0},Q.ml=function(){return!1},Q.al=function(){return!0},L(IU,`EObjectContainmentEList`,83),q(555,83,JU,Mu),Q.Ni=function(){this.b=!0},Q.Qj=function(){return this.b},Q.Gk=function(){var e;RN(this),Gl(this.e)?(e=this.b,this.b=!1,AC(this.e,new vy(this.e,2,this.c,e,!1))):this.b=!1},Q.b=!1,L(IU,`EObjectContainmentEList/Unsettable`,555),q(1161,555,JU,DNe),Q.Ti=function(e,t){var n,r;return n=P(QT(this,e,t),89),Gl(this.e)&&Kr(this,new db(this.a,7,(CP(),GVt),G(t),(r=n.c,j(r,90)?P(r,29):J7),e)),n},Q.Uj=function(e,t){return C0e(this,P(e,89),t)},Q.Vj=function(e,t){return S0e(this,P(e,89),t)},Q.Wj=function(e,t,n){return L8e(this,P(e,89),P(t,89),n)},Q.Ij=function(e,t,n,r,i){switch(e){case 3:return V_(this,e,t,n,r,this.i>1);case 5:return V_(this,e,t,n,r,this.i-P(n,15).gc()>0);default:return new Hb(this.e,e,this.c,t,n,r,!0)}},Q.Tj=function(){return!0},Q.Qj=function(){return QO(this)},Q.Gk=function(){RN(this)},L(KH,`EClassImpl/1`,1161),q(1175,1174,nwt),Q.dj=function(e){var t,n=e.gj(),r,i,a,o,s;if(n!=8){if(r=N2e(e),r==0)switch(n){case 1:case 9:s=e.kj(),s!=null&&(t=_y(P(s,482)),!t.c&&(t.c=new ln),nx(t.c,e.jj())),o=e.ij(),o!=null&&(i=P(o,482),i.Bb&1||(t=_y(i),!t.c&&(t.c=new ln),tb(t.c,P(e.jj(),29))));break;case 3:o=e.ij(),o!=null&&(i=P(o,482),i.Bb&1||(t=_y(i),!t.c&&(t.c=new ln),tb(t.c,P(e.jj(),29))));break;case 5:if(o=e.ij(),o!=null)for(a=P(o,16).Kc();a.Ob();)i=P(a.Pb(),482),i.Bb&1||(t=_y(i),!t.c&&(t.c=new ln),tb(t.c,P(e.jj(),29)));break;case 4:s=e.kj(),s!=null&&(i=P(s,482),i.Bb&1||(t=_y(i),!t.c&&(t.c=new ln),nx(t.c,e.jj())));break;case 6:if(s=e.kj(),s!=null)for(a=P(s,16).Kc();a.Ob();)i=P(a.Pb(),482),i.Bb&1||(t=_y(i),!t.c&&(t.c=new ln),nx(t.c,e.jj()))}this.ql(r)}},Q.ql=function(e){Zct(this,e)},Q.b=63,L(KH,`ESuperAdapter`,1175),q(1176,1175,nwt,Bhe),Q.ql=function(e){$A(this,e)},L(KH,`EClassImpl/10`,1176),q(1165,710,JU),Q.Ei=function(e,t){return dA(this,e,t)},Q.Fi=function(e){return X4e(this,e)},Q.Gi=function(e,t){jT(this,e,t)},Q.Hi=function(e){Ty(this,e)},Q.$i=function(e){return SGe(this,e)},Q.Xi=function(e,t){return tx(this,e,t)},Q.Wk=function(e,t){throw E(new Br)},Q.Ii=function(){return new ld(this)},Q.Ji=function(){return new ud(this)},Q.Ki=function(e){return mS(this,e)},Q.Xk=function(e,t){throw E(new Br)},Q.Fk=function(e){return this},Q.Qj=function(){return this.i!=0},Q.Wb=function(e){throw E(new Br)},Q.Gk=function(){throw E(new Br)},L(IU,`EcoreEList/UnmodifiableEList`,1165),q(328,1165,JU,El),Q.Yi=function(){return!1},L(IU,`EcoreEList/UnmodifiableEList/FastCompare`,328),q(1168,328,JU,bZe),Q.dd=function(e){var t,n,r;if(j(e,179)&&(t=P(e,179),n=t.Lj(),n!=-1)){for(r=this.i;n4)if(this.fk(e)){if(this.al()){if(r=P(e,54),n=r.Eh(),s=n==this.b&&(this.ml()?r.yh(r.Fh(),P(_x(d_(this.b),this.Lj()).Hk(),29).kk())==qO(P(_x(d_(this.b),this.Lj()),19)).n:-1-r.Fh()==this.Lj()),this.nl()&&!s&&!n&&r.Jh()){for(i=0;i1||r==-1)):!1},Q.ml=function(){var e,t=_x(d_(this.b),this.Lj()),n;return j(t,102)?(e=P(t,19),n=qO(e),!!n):!1},Q.nl=function(){var e,t=_x(d_(this.b),this.Lj());return j(t,102)?(e=P(t,19),(e.Bb&pI)!=0):!1},Q.dd=function(e){var t,n,r=this.zj(e),i;if(r>=0)return r;if(this.ol()){for(n=0,i=this.Ej();n=0;--e)GN(this,e,this.xj(e));return this.Fj()},Q.Qc=function(e){var t;if(this.nl())for(t=this.Ej()-1;t>=0;--t)GN(this,t,this.xj(t));return this.Gj(e)},Q.Gk=function(){zN(this)},Q.Zi=function(e,t){return CGe(this,e,t)},L(IU,`DelegatingEcoreEList`,756),q(1171,756,Ewt,FDe),Q.qj=function(e,t){BEe(this,e,P(t,29))},Q.rj=function(e){twe(this,P(e,29))},Q.xj=function(e){var t,n;return t=P(H(Jv(this.a),e),89),n=t.c,j(n,90)?P(n,29):(CP(),J7)},Q.Cj=function(e){var t,n;return t=P(lM(Jv(this.a),e),89),n=t.c,j(n,90)?P(n,29):(CP(),J7)},Q.Dj=function(e,t){return Q4e(this,e,P(t,29))},Q.Li=function(){return!1},Q.Ij=function(e,t,n,r,i){return null},Q.sj=function(){return new Uhe(this)},Q.tj=function(){RN(Jv(this.a))},Q.uj=function(e){return H$e(this,e)},Q.vj=function(e){var t,n;for(n=e.Kc();n.Ob();)if(t=n.Pb(),!H$e(this,t))return!1;return!0},Q.wj=function(e){var t,n,r;if(j(e,15)&&(r=P(e,15),r.gc()==Jv(this.a).i)){for(t=r.Kc(),n=new Lu(this);t.Ob();)if(A(t.Pb())!==A(gO(n)))return!1;return!0}return!1},Q.yj=function(){var e,t,n=1,r,i;for(t=new Lu(Jv(this.a));t.e!=t.i.gc();)e=P(gO(t),89),r=(i=e.c,j(i,90)?P(i,29):(CP(),J7)),n=31*n+(r?td(r):0);return n},Q.zj=function(e){var t,n,r=0,i;for(n=new Lu(Jv(this.a));n.e!=n.i.gc();){if(t=P(gO(n),89),A(e)===A((i=t.c,j(i,90)?P(i,29):(CP(),J7))))return r;++r}return-1},Q.Aj=function(){return Jv(this.a).i==0},Q.Bj=function(){return null},Q.Ej=function(){return Jv(this.a).i},Q.Fj=function(){var e,t,n,r,i,a=Jv(this.a).i;for(i=V(WW,FP,1,a,5,1),n=0,t=new Lu(Jv(this.a));t.e!=t.i.gc();)e=P(gO(t),89),i[n++]=(r=e.c,j(r,90)?P(r,29):(CP(),J7));return i},Q.Gj=function(e){var t,n,r,i,a,o,s=Jv(this.a).i;for(e.lengths&&Sh(e,s,null),r=0,n=new Lu(Jv(this.a));n.e!=n.i.gc();)t=P(gO(n),89),a=(o=t.c,j(o,90)?P(o,29):(CP(),J7)),Sh(e,r++,a);return e},Q.Hj=function(){var e,t,n,r,i=new $i;for(i.a+=`[`,e=Jv(this.a),t=0,r=Jv(this.a).i;t>16,i>=0?bk(this,n):this.Cb.Th(this,-1-i,null,n))),qM(this,e,6,n);case 9:return!this.a&&(this.a=new F(A7,this,9,5)),vD(this.a,e,n)}return a=P(_x((r=P(NC(this,16),29),r||(CP(),U7)),t),69),a.wk().zk(this,WD(this),t-bh((CP(),U7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 6:return qM(this,null,6,n);case 7:return!this.A&&(this.A=new Nu(I7,this,7)),AO(this.A,e,n);case 9:return!this.a&&(this.a=new F(A7,this,9,5)),AO(this.a,e,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),U7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),U7)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!_k(this);case 4:return!!AQe(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!F_(this);case 7:return!!this.A&&this.A.i!=0;case 8:return!(this.Bb&256);case 9:return!!this.a&&this.a.i!=0}return Hv(this,e-bh((CP(),U7)),_x((t=P(NC(this,16),29),t||U7),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:Y_(this,kd(t));return;case 2:Xl(this,kd(t));return;case 5:qN(this,kd(t));return;case 7:!this.A&&(this.A=new Nu(I7,this,7)),RN(this.A),!this.A&&(this.A=new Nu(I7,this,7)),th(this.A,P(t,16));return;case 8:LT(this,ki(Od(t)));return;case 9:!this.a&&(this.a=new F(A7,this,9,5)),RN(this.a),!this.a&&(this.a=new F(A7,this,9,5)),th(this.a,P(t,16));return}LE(this,e-bh((CP(),U7)),_x((n=P(NC(this,16),29),n||U7),e),t)},Q.ii=function(){return CP(),U7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:j(this.Cb,184)&&(P(this.Cb,184).tb=null),GS(this,null);return;case 2:Gw(this,null),eS(this,this.D);return;case 5:qN(this,null);return;case 7:!this.A&&(this.A=new Nu(I7,this,7)),RN(this.A);return;case 8:LT(this,!0);return;case 9:!this.a&&(this.a=new F(A7,this,9,5)),RN(this.a);return}PT(this,e-bh((CP(),U7)),_x((t=P(NC(this,16),29),t||U7),e))},Q.pi=function(){var e,t;if(this.a)for(e=0,t=this.a.i;e>16==5?P(this.Cb,685):null}return xb(this,e-bh((CP(),W7)),_x((r=P(NC(this,16),29),r||W7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 5:return this.Cb&&(n=(i=this.Db>>16,i>=0?C6e(this,n):this.Cb.Th(this,-1-i,null,n))),qM(this,e,5,n)}return a=P(_x((r=P(NC(this,16),29),r||(CP(),W7)),t),69),a.wk().zk(this,WD(this),t-bh((CP(),W7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 5:return qM(this,null,5,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),W7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),W7)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&P(this.Cb,685))}return Hv(this,e-bh((CP(),W7)),_x((t=P(NC(this,16),29),t||W7),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:GS(this,kd(t));return;case 2:$x(this,P(t,17).a);return;case 3:nrt(this,P(t,2039));return;case 4:SS(this,kd(t));return}LE(this,e-bh((CP(),W7)),_x((n=P(NC(this,16),29),n||W7),e),t)},Q.ii=function(){return CP(),W7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:GS(this,null);return;case 2:$x(this,0);return;case 3:nrt(this,null);return;case 4:SS(this,null);return}PT(this,e-bh((CP(),W7)),_x((t=P(NC(this,16),29),t||W7),e))},Q.Ib=function(){var e;return e=this.c,e??this.zb},Q.b=null,Q.c=null,Q.d=0,L(KH,`EEnumLiteralImpl`,582);var tHt=gp(KH,`EFactoryImpl/InternalEDateTimeFormat`);q(499,1,{2114:1},br),L(KH,`EFactoryImpl/1ClientInternalEDateTimeFormat`,499),q(248,120,{110:1,94:1,93:1,89:1,58:1,114:1,54:1,99:1,248:1,119:1,120:1},kr),Q.Ch=function(e,t,n){var r;return n=qM(this,e,t,n),this.e&&j(e,179)&&(r=Rj(this,this.e),r!=this.c&&(n=JN(this,r,n))),n},Q.Lh=function(e,t,n){var r;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new ju(j7,this,1)),this.d;case 2:return t?ZM(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?nk(this):this.a}return xb(this,e-bh((CP(),K7)),_x((r=P(NC(this,16),29),r||K7),e),t,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return p$e(this,null,n);case 1:return!this.d&&(this.d=new ju(j7,this,1)),AO(this.d,e,n);case 3:return m$e(this,null,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),K7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),K7)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Hv(this,e-bh((CP(),K7)),_x((t=P(NC(this,16),29),t||K7),e))},Q.bi=function(e,t){var n;switch(e){case 0:d5e(this,P(t,89));return;case 1:!this.d&&(this.d=new ju(j7,this,1)),RN(this.d),!this.d&&(this.d=new ju(j7,this,1)),th(this.d,P(t,16));return;case 3:u5e(this,P(t,89));return;case 4:i9e(this,P(t,850));return;case 5:Nx(this,P(t,142));return}LE(this,e-bh((CP(),K7)),_x((n=P(NC(this,16),29),n||K7),e),t)},Q.ii=function(){return CP(),K7},Q.ki=function(e){var t;switch(e){case 0:d5e(this,null);return;case 1:!this.d&&(this.d=new ju(j7,this,1)),RN(this.d);return;case 3:u5e(this,null);return;case 4:i9e(this,null);return;case 5:Nx(this,null);return}PT(this,e-bh((CP(),K7)),_x((t=P(NC(this,16),29),t||K7),e))},Q.Ib=function(){var e=new Gu(Aj(this));return e.a+=` (expression: `,kN(this,e),e.a+=`)`,e.a};var nHt;L(KH,`EGenericTypeImpl`,248),q(2067,2062,QU),Q.Gi=function(e,t){ADe(this,e,t)},Q.Wk=function(e,t){return ADe(this,this.gc(),e),t},Q.$i=function(e){return SO(this.pj(),e)},Q.Ii=function(){return this.Ji()},Q.pj=function(){return new Jhe(this)},Q.Ji=function(){return this.Ki(0)},Q.Ki=function(e){return this.pj().fd(e)},Q.Xk=function(e,t){return QE(this,e,!0),t},Q.Ti=function(e,t){var n,r=Mk(this,t);return n=this.fd(e),n.Rb(r),r},Q.Ui=function(e,t){var n;QE(this,t,!0),n=this.fd(e),n.Rb(t)},L(IU,`AbstractSequentialInternalEList`,2067),q(496,2067,QU,ad),Q.$i=function(e){return SO(this.pj(),e)},Q.Ii=function(){return this.b==null?(Xo(),Xo(),a9):this.sl()},Q.pj=function(){return new mCe(this.a,this.b)},Q.Ji=function(){return this.b==null?(Xo(),Xo(),a9):this.sl()},Q.Ki=function(e){var t,n;if(this.b==null){if(e<0||e>1)throw E(new Mi(PU+e+`, size=0`));return Xo(),Xo(),a9}for(n=this.sl(),t=0;t0;)if(t=this.c[--this.d],(!this.e||t.pk()!=R5||t.Lj()!=0)&&(!this.vl()||this.b.Xh(t))){if(a=this.b.Nh(t,this.ul()),this.f=(Qo(),P(t,69).xk()),this.f||t.Jk()){if(this.ul()?(r=P(a,15),this.k=r):(r=P(a,71),this.k=this.j=r),j(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ki(this.k.gc()):this.k.fd(this.k.gc()),this.p?Pet(this,this.p):ytt(this))return i=this.p?this.p.Ub():this.j?this.j.$i(--this.n):this.k.Xb(--this.n),this.f?(e=P(i,76),e.Lk(),n=e.md(),this.i=n):(n=i,this.i=n),this.g=-3,!0}else if(a!=null)return this.k=null,this.p=null,n=a,this.i=n,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}return i=this.p?this.p.Ub():this.j?this.j.$i(--this.n):this.k.Xb(--this.n),this.f?(e=P(i,76),e.Lk(),n=e.md(),this.i=n):(n=i,this.i=n),this.g=-3,!0}},Q.Pb=function(){return IC(this)},Q.Tb=function(){return this.a},Q.Ub=function(){var e;if(this.g<-1||this.Sb())return--this.a,this.g=0,e=this.i,this.Sb(),e;throw E(new Hr)},Q.Vb=function(){return this.a-1},Q.Qb=function(){throw E(new Br)},Q.ul=function(){return!1},Q.Wb=function(e){throw E(new Br)},Q.vl=function(){return!0},Q.a=0,Q.d=0,Q.f=!1,Q.g=0,Q.n=0,Q.o=0;var a9;L(IU,`EContentsEList/FeatureIteratorImpl`,287),q(711,287,$U,HEe),Q.ul=function(){return!0},L(IU,`EContentsEList/ResolvingFeatureIteratorImpl`,711),q(1178,711,$U,UEe),Q.vl=function(){return!1},L(KH,`ENamedElementImpl/1/1`,1178),q(1179,287,$U,WEe),Q.vl=function(){return!1},L(KH,`ENamedElementImpl/1/2`,1179),q(39,152,NU,Qv,$v,Sm,ub,Hb,vy,Gqe,nBe,Kqe,rBe,vUe,iBe,Yqe,aBe,yUe,oBe,qqe,sBe,Cm,db,Jg,Jqe,cBe,bUe,lBe),Q.Kj=function(){return eb(this)},Q.Rj=function(){var e=eb(this);return e?e.ik():null},Q.hj=function(e){return this.b==-1&&this.a&&(this.b=this.c.Hh(this.a.Lj(),this.a.pk())),this.c.yh(this.b,e)},Q.jj=function(){return this.c},Q.Sj=function(){var e=eb(this);return e?e.tk():!1},Q.b=-1,L(KH,`ENotificationImpl`,39),q(411,292,{110:1,94:1,93:1,155:1,197:1,58:1,62:1,114:1,481:1,54:1,99:1,158:1,411:1,292:1,119:1,120:1},si),Q.Ah=function(e){return I6e(this,e)},Q.Lh=function(e,t,n){var r,i,a;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return rd(),!!(this.Bb&256);case 3:return rd(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return rd(),a=this.t,a>1||a==-1;case 7:return rd(),i=this.s,i>=1;case 8:return t?Ik(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?P(this.Cb,29):null;case 11:return!this.d&&(this.d=new Nu(I7,this,11)),this.d;case 12:return!this.c&&(this.c=new F(P7,this,12,10)),this.c;case 13:return!this.a&&(this.a=new Ud(this,this)),this.a;case 14:return Ib(this)}return xb(this,e-bh((CP(),Y7)),_x((r=P(NC(this,16),29),r||Y7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 10:return this.Cb&&(n=(i=this.Db>>16,i>=0?I6e(this,n):this.Cb.Th(this,-1-i,null,n))),qM(this,e,10,n);case 12:return!this.c&&(this.c=new F(P7,this,12,10)),vD(this.c,e,n)}return a=P(_x((r=P(NC(this,16),29),r||(CP(),Y7)),t),69),a.wk().zk(this,WD(this),t-bh((CP(),Y7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 9:return nh(this,n);case 10:return qM(this,null,10,n);case 11:return!this.d&&(this.d=new Nu(I7,this,11)),AO(this.d,e,n);case 12:return!this.c&&(this.c=new F(P7,this,12,10)),AO(this.c,e,n);case 14:return AO(Ib(this),e,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),Y7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),Y7)),e,n)},Q.Wh=function(e){var t,n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&kh(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&kh(this.q).i==0);case 10:return!!(this.Db>>16==10&&P(this.Cb,29));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Ib(this.a.a).i!=0&&!(this.b&&$O(this.b));case 14:return!!this.b&&$O(this.b)}return Hv(this,e-bh((CP(),Y7)),_x((t=P(NC(this,16),29),t||Y7),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:GS(this,kd(t));return;case 2:FT(this,ki(Od(t)));return;case 3:RT(this,ki(Od(t)));return;case 4:Zx(this,P(t,17).a);return;case 5:Qx(this,P(t,17).a);return;case 8:aT(this,P(t,142));return;case 9:r=fA(this,P(t,89),null),r&&r.oj();return;case 11:!this.d&&(this.d=new Nu(I7,this,11)),RN(this.d),!this.d&&(this.d=new Nu(I7,this,11)),th(this.d,P(t,16));return;case 12:!this.c&&(this.c=new F(P7,this,12,10)),RN(this.c),!this.c&&(this.c=new F(P7,this,12,10)),th(this.c,P(t,16));return;case 13:!this.a&&(this.a=new Ud(this,this)),zN(this.a),!this.a&&(this.a=new Ud(this,this)),th(this.a,P(t,16));return;case 14:RN(Ib(this)),th(Ib(this),P(t,16));return}LE(this,e-bh((CP(),Y7)),_x((n=P(NC(this,16),29),n||Y7),e),t)},Q.ii=function(){return CP(),Y7},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:GS(this,null);return;case 2:FT(this,!0);return;case 3:RT(this,!0);return;case 4:Zx(this,0);return;case 5:Qx(this,1);return;case 8:aT(this,null);return;case 9:n=fA(this,null,null),n&&n.oj();return;case 11:!this.d&&(this.d=new Nu(I7,this,11)),RN(this.d);return;case 12:!this.c&&(this.c=new F(P7,this,12,10)),RN(this.c);return;case 13:this.a&&zN(this.a);return;case 14:this.b&&RN(this.b);return}PT(this,e-bh((CP(),Y7)),_x((t=P(NC(this,16),29),t||Y7),e))},Q.pi=function(){var e,t;if(this.c)for(e=0,t=this.c.i;es&&Sh(e,s,null),r=0,n=new Lu(Ib(this.a));n.e!=n.i.gc();)t=P(gO(n),89),a=(o=t.c,o||(CP(),q7)),Sh(e,r++,a);return e},Q.Hj=function(){var e,t,n,r,i=new $i;for(i.a+=`[`,e=Ib(this.a),t=0,r=Ib(this.a).i;t1);case 5:return V_(this,e,t,n,r,this.i-P(n,15).gc()>0);default:return new Hb(this.e,e,this.c,t,n,r,!0)}},Q.Tj=function(){return!0},Q.Qj=function(){return $O(this)},Q.Gk=function(){RN(this)},L(KH,`EOperationImpl/2`,1377),q(507,1,{2037:1,507:1},YSe),L(KH,`EPackageImpl/1`,507),q(14,83,JU,F),Q.il=function(){return this.d},Q.jl=function(){return this.b},Q.ml=function(){return!0},Q.b=0,L(IU,`EObjectContainmentWithInverseEList`,14),q(365,14,JU,nf),Q.nl=function(){return!0},Q.Wi=function(e,t){return vj(this,e,P(t,58))},L(IU,`EObjectContainmentWithInverseEList/Resolving`,365),q(308,365,JU,Tm),Q.Ni=function(){this.a.tb=null},L(KH,`EPackageImpl/2`,308),q(1278,1,{},Jse),L(KH,`EPackageImpl/3`,1278),q(733,45,CI,ci),Q._b=function(e){return rl(e)?e_(this,e):!!Kp(this.f,e)},L(KH,`EPackageRegistryImpl`,733),q(518,292,{110:1,94:1,93:1,155:1,197:1,58:1,2116:1,114:1,481:1,54:1,99:1,158:1,518:1,292:1,119:1,120:1},li),Q.Ah=function(e){return L6e(this,e)},Q.Lh=function(e,t,n){var r,i,a;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return rd(),!!(this.Bb&256);case 3:return rd(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return rd(),a=this.t,a>1||a==-1;case 7:return rd(),i=this.s,i>=1;case 8:return t?Ik(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?P(this.Cb,62):null}return xb(this,e-bh((CP(),Z7)),_x((r=P(NC(this,16),29),r||Z7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),vD(this.Ab,e,n);case 10:return this.Cb&&(n=(i=this.Db>>16,i>=0?L6e(this,n):this.Cb.Th(this,-1-i,null,n))),qM(this,e,10,n)}return a=P(_x((r=P(NC(this,16),29),r||(CP(),Z7)),t),69),a.wk().zk(this,WD(this),t-bh((CP(),Z7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 9:return nh(this,n);case 10:return qM(this,null,10,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),Z7)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),Z7)),e,n)},Q.Wh=function(e){var t,n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&kh(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&kh(this.q).i==0);case 10:return!!(this.Db>>16==10&&P(this.Cb,62))}return Hv(this,e-bh((CP(),Z7)),_x((t=P(NC(this,16),29),t||Z7),e))},Q.ii=function(){return CP(),Z7},L(KH,`EParameterImpl`,518),q(102,462,{110:1,94:1,93:1,155:1,197:1,58:1,19:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,102:1,462:1,292:1,119:1,120:1,692:1},uDe),Q.Lh=function(e,t,n){var r,i,a,o;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return rd(),!!(this.Bb&256);case 3:return rd(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return rd(),o=this.t,o>1||o==-1;case 7:return rd(),i=this.s,i>=1;case 8:return t?Ik(this):this.r;case 9:return this.q;case 10:return rd(),(this.Bb&pF)!=0;case 11:return rd(),(this.Bb&zU)!=0;case 12:return rd(),(this.Bb&uI)!=0;case 13:return this.j;case 14:return Uj(this);case 15:return rd(),(this.Bb&RU)!=0;case 16:return rd(),(this.Bb&ZP)!=0;case 17:return L_(this);case 18:return rd(),(this.Bb&GH)!=0;case 19:return rd(),a=qO(this),!!(a&&(a.Bb&GH)!=0);case 20:return rd(),(this.Bb&pI)!=0;case 21:return t?qO(this):this.b;case 22:return t?DZe(this):DUe(this);case 23:return!this.a&&(this.a=new Pu(T7,this,23)),this.a}return xb(this,e-bh((CP(),Q7)),_x((r=P(NC(this,16),29),r||Q7),e),t,n)},Q.Wh=function(e){var t,n,r,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return i=this.t,i>1||i==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&kh(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&kh(this.q).i==0);case 10:return(this.Bb&pF)==0;case 11:return(this.Bb&zU)!=0;case 12:return(this.Bb&uI)!=0;case 13:return this.j!=null;case 14:return Uj(this)!=null;case 15:return(this.Bb&RU)!=0;case 16:return(this.Bb&ZP)!=0;case 17:return!!L_(this);case 18:return(this.Bb&GH)!=0;case 19:return r=qO(this),!!r&&(r.Bb&GH)!=0;case 20:return(this.Bb&pI)==0;case 21:return!!this.b;case 22:return!!DUe(this);case 23:return!!this.a&&this.a.i!=0}return Hv(this,e-bh((CP(),Q7)),_x((t=P(NC(this,16),29),t||Q7),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:X_(this,kd(t));return;case 2:FT(this,ki(Od(t)));return;case 3:RT(this,ki(Od(t)));return;case 4:Zx(this,P(t,17).a);return;case 5:Qx(this,P(t,17).a);return;case 8:aT(this,P(t,142));return;case 9:r=fA(this,P(t,89),null),r&&r.oj();return;case 10:eE(this,ki(Od(t)));return;case 11:rE(this,ki(Od(t)));return;case 12:tE(this,ki(Od(t)));return;case 13:Xc(this,kd(t));return;case 15:nE(this,ki(Od(t)));return;case 16:gE(this,ki(Od(t)));return;case 18:PRe(this,ki(Od(t)));return;case 20:_E(this,ki(Od(t)));return;case 21:JJe(this,P(t,19));return;case 23:!this.a&&(this.a=new Pu(T7,this,23)),RN(this.a),!this.a&&(this.a=new Pu(T7,this,23)),th(this.a,P(t,16));return}LE(this,e-bh((CP(),Q7)),_x((n=P(NC(this,16),29),n||Q7),e),t)},Q.ii=function(){return CP(),Q7},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:j(this.Cb,90)&&$A(_y(P(this.Cb,90)),4),GS(this,null);return;case 2:FT(this,!0);return;case 3:RT(this,!0);return;case 4:Zx(this,0);return;case 5:Qx(this,1);return;case 8:aT(this,null);return;case 9:n=fA(this,null,null),n&&n.oj();return;case 10:eE(this,!0);return;case 11:rE(this,!1);return;case 12:tE(this,!1);return;case 13:this.i=null,OS(this,null);return;case 15:nE(this,!1);return;case 16:gE(this,!1);return;case 18:hE(this,!1),j(this.Cb,90)&&$A(_y(P(this.Cb,90)),2);return;case 20:_E(this,!0);return;case 21:JJe(this,null);return;case 23:!this.a&&(this.a=new Pu(T7,this,23)),RN(this.a);return}PT(this,e-bh((CP(),Q7)),_x((t=P(NC(this,16),29),t||Q7),e))},Q.pi=function(){DZe(this),lg(Rb((UA(),l9),this)),Ik(this),this.Bb|=1},Q.uk=function(){return qO(this)},Q._k=function(){var e;return e=qO(this),!!e&&(e.Bb&GH)!=0},Q.al=function(){return(this.Bb&GH)!=0},Q.bl=function(){return(this.Bb&pI)!=0},Q.Yk=function(e,t){return this.c=null,kT(this,e,t)},Q.Ib=function(){var e;return this.Db&64?SM(this):(e=new Wu(SM(this)),e.a+=` (containment: `,Ga(e,(this.Bb&GH)!=0),e.a+=`, resolveProxies: `,Ga(e,(this.Bb&pI)!=0),e.a+=`)`,e.a)},L(KH,`EReferenceImpl`,102),q(561,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,561:1,119:1,120:1},Yse),Q.Fb=function(e){return this===e},Q.ld=function(){return this.b},Q.md=function(){return this.c},Q.Hb=function(){return td(this)},Q.Di=function(e){FMe(this,kd(e))},Q.nd=function(e){return Zje(this,kd(e))},Q.Lh=function(e,t,n){var r;switch(e){case 0:return this.b;case 1:return this.c}return xb(this,e-bh((CP(),$7)),_x((r=P(NC(this,16),29),r||$7),e),t,n)},Q.Wh=function(e){var t;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return Hv(this,e-bh((CP(),$7)),_x((t=P(NC(this,16),29),t||$7),e))},Q.bi=function(e,t){var n;switch(e){case 0:IMe(this,kd(t));return;case 1:PJe(this,kd(t));return}LE(this,e-bh((CP(),$7)),_x((n=P(NC(this,16),29),n||$7),e),t)},Q.ii=function(){return CP(),$7},Q.ki=function(e){var t;switch(e){case 0:NJe(this,null);return;case 1:PJe(this,null);return}PT(this,e-bh((CP(),$7)),_x((t=P(NC(this,16),29),t||$7),e))},Q.Bi=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:jw(e)),this.a},Q.Ci=function(e){this.a=e},Q.Ib=function(){var e;return this.Db&64?Aj(this):(e=new Wu(Aj(this)),e.a+=` (key: `,pl(e,this.b),e.a+=`, value: `,pl(e,this.c),e.a+=`)`,e.a)},Q.a=-1,Q.b=null,Q.c=null;var o9=L(KH,`EStringToStringMapEntryImpl`,561),rHt=gp(IU,`FeatureMap/Entry/Internal`);q(576,1,eW),Q.xl=function(e){return this.yl(P(e,54))},Q.yl=function(e){return this.xl(e)},Q.Fb=function(e){var t,n;return this===e?!0:j(e,76)?(t=P(e,76),t.Lk()==this.c&&(n=this.md(),n==null?t.md()==null:NT(n,t.md()))):!1},Q.Lk=function(){return this.c},Q.Hb=function(){var e=this.md();return US(this.c)^(e==null?0:US(e))},Q.Ib=function(){var e=this.c,t=Mx(e.qk()).yi();return e.xe(),(t!=null&&t.length!=0?t+`:`+e.xe():e.xe())+`=`+this.md()},L(KH,`EStructuralFeatureImpl/BasicFeatureMapEntry`,576),q(791,576,eW,IDe),Q.yl=function(e){return new IDe(this.c,e)},Q.md=function(){return this.a},Q.zl=function(e,t,n){return NYe(this,e,this.a,t,n)},Q.Al=function(e,t,n){return PYe(this,e,this.a,t,n)},L(KH,`EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry`,791),q(1350,1,{},XSe),Q.yk=function(e,t,n,r,i){return P(mb(e,this.b),220).Yl(this.a).Fk(r)},Q.zk=function(e,t,n,r,i){return P(mb(e,this.b),220).Pl(this.a,r,i)},Q.Ak=function(e,t,n,r,i){return P(mb(e,this.b),220).Ql(this.a,r,i)},Q.Bk=function(e,t,n){return P(mb(e,this.b),220).Yl(this.a).Qj()},Q.Ck=function(e,t,n,r){P(mb(e,this.b),220).Yl(this.a).Wb(r)},Q.Dk=function(e,t,n){return P(mb(e,this.b),220).Yl(this.a)},Q.Ek=function(e,t,n){P(mb(e,this.b),220).Yl(this.a).Gk()},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator`,1350),q(91,1,{},Wf,Og,a_,ty),Q.yk=function(e,t,n,r,i){var a=t.li(n);if(a??t.mi(n,a=gP(this,e)),!i)switch(this.e){case 50:case 41:return P(a,597).bk();case 40:return P(a,220).Vl()}return a},Q.zk=function(e,t,n,r,i){var a,o=t.li(n);return o??t.mi(n,o=gP(this,e)),a=P(o,71).Wk(r,i),a},Q.Ak=function(e,t,n,r,i){var a=t.li(n);return a!=null&&(i=P(a,71).Xk(r,i)),i},Q.Bk=function(e,t,n){var r=t.li(n);return r!=null&&P(r,79).Qj()},Q.Ck=function(e,t,n,r){var i=P(t.li(n),79);!i&&t.mi(n,i=gP(this,e)),i.Wb(r)},Q.Dk=function(e,t,n){var r,i=t.li(n);return i??t.mi(n,i=gP(this,e)),j(i,79)?P(i,79):(r=P(t.li(n),15),new Ghe(r))},Q.Ek=function(e,t,n){var r=P(t.li(n),79);!r&&t.mi(n,r=gP(this,e)),r.Gk()},Q.b=0,Q.e=0,L(KH,`EStructuralFeatureImpl/InternalSettingDelegateMany`,91),q(512,1,{}),Q.zk=function(e,t,n,r,i){throw E(new Br)},Q.Ak=function(e,t,n,r,i){throw E(new Br)},Q.Dk=function(e,t,n){return new hIe(this,e,t,n)};var s9;L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingle`,512),q(1367,1,LU,hIe),Q.Fk=function(e){return this.a.yk(this.c,this.d,this.b,e,!0)},Q.Qj=function(){return this.a.Bk(this.c,this.d,this.b)},Q.Wb=function(e){this.a.Ck(this.c,this.d,this.b,e)},Q.Gk=function(){this.a.Ek(this.c,this.d,this.b)},Q.b=0,L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingle/1`,1367),q(784,512,{},ILe),Q.yk=function(e,t,n,r,i){return IM(e,e.Ph(),e.Fh())==this.b?this.bl()&&r?xj(e):e.Ph():null},Q.zk=function(e,t,n,r,i){var a,o;return e.Ph()&&(i=(a=e.Fh(),a>=0?e.Ah(i):e.Ph().Th(e,-1-a,null,i))),o=eD(e.Dh(),this.e),e.Ch(r,o,i)},Q.Ak=function(e,t,n,r,i){var a=eD(e.Dh(),this.e);return e.Ch(null,a,i)},Q.Bk=function(e,t,n){var r=eD(e.Dh(),this.e);return!!e.Ph()&&e.Fh()==r},Q.Ck=function(e,t,n,r){var i,a,o,s,c;if(r!=null&&!QM(this.a,r))throw E(new Pi(tW+(j(r,58)?o5e(P(r,58).Dh()):yx($w(r)))+nW+this.a+`'`));if(i=e.Ph(),o=eD(e.Dh(),this.e),A(r)!==A(i)||e.Fh()!=o&&r!=null){if(Pk(e,P(r,58)))throw E(new Fi(JH+e.Ib()));c=null,i&&(c=(a=e.Fh(),a>=0?e.Ah(c):e.Ph().Th(e,-1-a,null,c))),s=P(r,54),s&&(c=s.Rh(e,eD(s.Dh(),this.b),null,c)),c=e.Ch(s,o,c),c&&c.oj()}else e.vh()&&e.wh()&&AC(e,new Sm(e,1,o,r,r))},Q.Ek=function(e,t,n){var r=e.Ph(),i,a,o;r?(o=(i=e.Fh(),i>=0?e.Ah(null):e.Ph().Th(e,-1-i,null,null)),a=eD(e.Dh(),this.e),o=e.Ch(null,a,o),o&&o.oj()):e.vh()&&e.wh()&&AC(e,new Cm(e,1,this.e,null,null))},Q.bl=function(){return!1},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleContainer`,784),q(1351,784,{},fje),Q.bl=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving`,1351),q(574,512,{}),Q.yk=function(e,t,n,r,i){var a;return a=t.li(n),a==null?this.b:A(a)===A(s9)?null:a},Q.Bk=function(e,t,n){var r=t.li(n);return r!=null&&(A(r)===A(s9)||!NT(r,this.b))},Q.Ck=function(e,t,n,r){var i,a;e.vh()&&e.wh()?(i=(a=t.li(n),a==null?this.b:A(a)===A(s9)?null:a),r==null?this.c==null?this.b==null?t.mi(n,null):t.mi(n,s9):(t.mi(n,null),r=this.b):(this.Bl(r),t.mi(n,r)),AC(e,this.d.Cl(e,1,this.e,i,r))):r==null?this.c==null?this.b==null?t.mi(n,null):t.mi(n,s9):t.mi(n,null):(this.Bl(r),t.mi(n,r))},Q.Ek=function(e,t,n){var r,i;e.vh()&&e.wh()?(r=(i=t.li(n),i==null?this.b:A(i)===A(s9)?null:i),t.ni(n),AC(e,this.d.Cl(e,1,this.e,r,this.b))):t.ni(n)},Q.Bl=function(e){throw E(new xge)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData`,574),q(rW,1,{},Xse),Q.Cl=function(e,t,n,r,i){return new Cm(e,t,n,r,i)},Q.Dl=function(e,t,n,r,i,a){return new Jg(e,t,n,r,i,a)};var iHt,aHt,oHt,sHt,cHt,lHt,uHt,c9,dHt;L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator`,rW),q(1368,rW,{},Zse),Q.Cl=function(e,t,n,r,i){return new bUe(e,t,n,ki(Od(r)),ki(Od(i)))},Q.Dl=function(e,t,n,r,i,a){return new lBe(e,t,n,ki(Od(r)),ki(Od(i)),a)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1`,1368),q(1369,rW,{},Qse),Q.Cl=function(e,t,n,r,i){return new Gqe(e,t,n,P(r,222).a,P(i,222).a)},Q.Dl=function(e,t,n,r,i,a){return new nBe(e,t,n,P(r,222).a,P(i,222).a,a)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2`,1369),q(1370,rW,{},$se),Q.Cl=function(e,t,n,r,i){return new Kqe(e,t,n,P(r,180).a,P(i,180).a)},Q.Dl=function(e,t,n,r,i,a){return new rBe(e,t,n,P(r,180).a,P(i,180).a,a)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3`,1370),q(1371,rW,{},ece),Q.Cl=function(e,t,n,r,i){return new vUe(e,t,n,D(N(r)),D(N(i)))},Q.Dl=function(e,t,n,r,i,a){return new iBe(e,t,n,D(N(r)),D(N(i)),a)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4`,1371),q(1372,rW,{},tce),Q.Cl=function(e,t,n,r,i){return new Yqe(e,t,n,P(r,161).a,P(i,161).a)},Q.Dl=function(e,t,n,r,i,a){return new aBe(e,t,n,P(r,161).a,P(i,161).a,a)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5`,1372),q(1373,rW,{},nce),Q.Cl=function(e,t,n,r,i){return new yUe(e,t,n,P(r,17).a,P(i,17).a)},Q.Dl=function(e,t,n,r,i,a){return new oBe(e,t,n,P(r,17).a,P(i,17).a,a)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6`,1373),q(1374,rW,{},rce),Q.Cl=function(e,t,n,r,i){return new qqe(e,t,n,P(r,168).a,P(i,168).a)},Q.Dl=function(e,t,n,r,i,a){return new sBe(e,t,n,P(r,168).a,P(i,168).a,a)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7`,1374),q(1375,rW,{},ice),Q.Cl=function(e,t,n,r,i){return new Jqe(e,t,n,P(r,191).a,P(i,191).a)},Q.Dl=function(e,t,n,r,i,a){return new cBe(e,t,n,P(r,191).a,P(i,191).a,a)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8`,1375),q(1353,574,{},gIe),Q.Bl=function(e){if(!this.a.fk(e))throw E(new Pi(tW+$w(e)+nW+this.a+`'`))},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic`,1353),q(1354,574,{},kNe),Q.Bl=function(e){},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic`,1354),q(785,574,{}),Q.Bk=function(e,t,n){return t.li(n)!=null},Q.Ck=function(e,t,n,r){var i,a;e.vh()&&e.wh()?(i=!0,a=t.li(n),a==null?(i=!1,a=this.b):A(a)===A(s9)&&(a=null),r==null?this.c==null?t.mi(n,s9):(t.mi(n,null),r=this.b):(this.Bl(r),t.mi(n,r)),AC(e,this.d.Dl(e,1,this.e,a,r,!i))):r==null?this.c==null?t.mi(n,s9):t.mi(n,null):(this.Bl(r),t.mi(n,r))},Q.Ek=function(e,t,n){var r,i;e.vh()&&e.wh()?(r=!0,i=t.li(n),i==null?(r=!1,i=this.b):A(i)===A(s9)&&(i=null),t.ni(n),AC(e,this.d.Dl(e,2,this.e,i,this.b,r))):t.ni(n)},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable`,785),q(1355,785,{},_Ie),Q.Bl=function(e){if(!this.a.fk(e))throw E(new Pi(tW+$w(e)+nW+this.a+`'`))},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic`,1355),q(1356,785,{},ANe),Q.Bl=function(e){},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic`,1356),q(410,512,{},Bp),Q.yk=function(e,t,n,r,i){var a,o,s,c,l=t.li(n);if(this.tk()&&A(l)===A(s9))return null;if(this.bl()&&r&&l!=null){if(s=P(l,54),s.Vh()&&(c=pT(e,s),s!=c)){if(!QM(this.a,c))throw E(new Pi(tW+$w(c)+nW+this.a+`'`));t.mi(n,l=c),this.al()&&(a=P(c,54),o=s.Th(e,this.b?eD(s.Dh(),this.b):-1-eD(e.Dh(),this.e),null,null),!a.Ph()&&(o=a.Rh(e,this.b?eD(a.Dh(),this.b):-1-eD(e.Dh(),this.e),null,o)),o&&o.oj()),e.vh()&&e.wh()&&AC(e,new Cm(e,9,this.e,s,c))}return l}return l},Q.zk=function(e,t,n,r,i){var a,o=t.li(n);return A(o)===A(s9)&&(o=null),t.mi(n,r),this.Mj()?A(o)!==A(r)&&o!=null&&(a=P(o,54),i=a.Th(e,eD(a.Dh(),this.b),null,i)):this.al()&&o!=null&&(i=P(o,54).Th(e,-1-eD(e.Dh(),this.e),null,i)),e.vh()&&e.wh()&&(!i&&(i=new Pa(4)),i.nj(new Cm(e,1,this.e,o,r))),i},Q.Ak=function(e,t,n,r,i){var a=t.li(n);return A(a)===A(s9)&&(a=null),t.ni(n),e.vh()&&e.wh()&&(!i&&(i=new Pa(4)),this.tk()?i.nj(new Cm(e,2,this.e,a,null)):i.nj(new Cm(e,1,this.e,a,null))),i},Q.Bk=function(e,t,n){return t.li(n)!=null},Q.Ck=function(e,t,n,r){var i,a,o,s,c;if(r!=null&&!QM(this.a,r))throw E(new Pi(tW+(j(r,58)?o5e(P(r,58).Dh()):yx($w(r)))+nW+this.a+`'`));c=t.li(n),s=c!=null,this.tk()&&A(c)===A(s9)&&(c=null),o=null,this.Mj()?A(c)!==A(r)&&(c!=null&&(i=P(c,54),o=i.Th(e,eD(i.Dh(),this.b),null,o)),r!=null&&(i=P(r,54),o=i.Rh(e,eD(i.Dh(),this.b),null,o))):this.al()&&A(c)!==A(r)&&(c!=null&&(o=P(c,54).Th(e,-1-eD(e.Dh(),this.e),null,o)),r!=null&&(o=P(r,54).Rh(e,-1-eD(e.Dh(),this.e),null,o))),r==null&&this.tk()?t.mi(n,s9):t.mi(n,r),e.vh()&&e.wh()?(a=new Jg(e,1,this.e,c,r,this.tk()&&!s),o?(o.nj(a),o.oj()):AC(e,a)):o&&o.oj()},Q.Ek=function(e,t,n){var r,i,a,o,s=t.li(n);o=s!=null,this.tk()&&A(s)===A(s9)&&(s=null),a=null,s!=null&&(this.Mj()?(r=P(s,54),a=r.Th(e,eD(r.Dh(),this.b),null,a)):this.al()&&(a=P(s,54).Th(e,-1-eD(e.Dh(),this.e),null,a))),t.ni(n),e.vh()&&e.wh()?(i=new Jg(e,this.tk()?2:1,this.e,s,null,o),a?(a.nj(i),a.oj()):AC(e,i)):a&&a.oj()},Q.Mj=function(){return!1},Q.al=function(){return!1},Q.bl=function(){return!1},Q.tk=function(){return!1},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObject`,410),q(575,410,{},Ed),Q.al=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment`,575),q(1359,575,{},JEe),Q.bl=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving`,1359),q(787,575,{},YEe),Q.tk=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable`,787),q(1361,787,{},ZEe),Q.bl=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving`,1361),q(650,575,{},Gf),Q.Mj=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse`,650),q(1360,650,{},hje),Q.bl=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving`,1360),q(788,650,{},gje),Q.tk=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable`,788),q(1362,788,{},_je),Q.bl=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving`,1362),q(651,410,{},XEe),Q.bl=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving`,651),q(1363,651,{},QEe),Q.tk=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable`,1363),q(789,651,{},pje),Q.Mj=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse`,789),q(1364,789,{},vje),Q.tk=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable`,1364),q(1357,410,{},$Ee),Q.tk=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable`,1357),q(786,410,{},mje),Q.Mj=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse`,786),q(1358,786,{},yje),Q.tk=function(){return!0},L(KH,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable`,1358),q(790,576,eW,Mh),Q.yl=function(e){return new Mh(this.a,this.c,e)},Q.md=function(){return this.b},Q.zl=function(e,t,n){return UWe(this,e,this.b,n)},Q.Al=function(e,t,n){return WWe(this,e,this.b,n)},L(KH,`EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry`,790),q(1365,1,LU,Ghe),Q.Fk=function(e){return this.a},Q.Qj=function(){return j(this.a,97)?P(this.a,97).Qj():!this.a.dc()},Q.Wb=function(e){this.a.$b(),this.a.Gc(P(e,15))},Q.Gk=function(){j(this.a,97)?P(this.a,97).Gk():this.a.$b()},L(KH,`EStructuralFeatureImpl/SettingMany`,1365),q(1366,576,eW,gHe),Q.xl=function(e){return new Gd((UN(),k9),this.b.ri(this.a,e))},Q.md=function(){return null},Q.zl=function(e,t,n){return n},Q.Al=function(e,t,n){return n},L(KH,`EStructuralFeatureImpl/SimpleContentFeatureMapEntry`,1366),q(652,576,eW,Gd),Q.xl=function(e){return new Gd(this.c,e)},Q.md=function(){return this.a},Q.zl=function(e,t,n){return n},Q.Al=function(e,t,n){return n},L(KH,`EStructuralFeatureImpl/SimpleFeatureMapEntry`,652),q(403,506,SU,ln),Q.aj=function(e){return V(D7,FP,29,e,0,1)},Q.Yi=function(){return!1},L(KH,`ESuperAdapter/1`,403),q(457,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,850:1,54:1,99:1,158:1,457:1,119:1,120:1},un),Q.Lh=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new Vp(this,j7,this)),this.a}return xb(this,e-bh((CP(),e9)),_x((r=P(NC(this,16),29),r||e9),e),t,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(S7,this,0,3)),AO(this.Ab,e,n);case 2:return!this.a&&(this.a=new Vp(this,j7,this)),AO(this.a,e,n)}return i=P(_x((r=P(NC(this,16),29),r||(CP(),e9)),t),69),i.wk().Ak(this,WD(this),t-bh((CP(),e9)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Hv(this,e-bh((CP(),e9)),_x((t=P(NC(this,16),29),t||e9),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab),!this.Ab&&(this.Ab=new F(S7,this,0,3)),th(this.Ab,P(t,16));return;case 1:GS(this,kd(t));return;case 2:!this.a&&(this.a=new Vp(this,j7,this)),RN(this.a),!this.a&&(this.a=new Vp(this,j7,this)),th(this.a,P(t,16));return}LE(this,e-bh((CP(),e9)),_x((n=P(NC(this,16),29),n||e9),e),t)},Q.ii=function(){return CP(),e9},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(S7,this,0,3)),RN(this.Ab);return;case 1:GS(this,null);return;case 2:!this.a&&(this.a=new Vp(this,j7,this)),RN(this.a);return}PT(this,e-bh((CP(),e9)),_x((t=P(NC(this,16),29),t||e9),e))},L(KH,`ETypeParameterImpl`,457),q(458,83,JU,Vp),Q.Nj=function(e,t){return g7e(this,P(e,89),t)},Q.Oj=function(e,t){return _7e(this,P(e,89),t)},L(KH,`ETypeParameterImpl/1`,458),q(647,45,CI,ui),Q.ec=function(){return new Sr(this)},L(KH,`ETypeParameterImpl/2`,647),q(570,GP,KP,Sr),Q.Fc=function(e){return mOe(this,P(e,89))},Q.Gc=function(e){var t,n,r=!1;for(n=e.Kc();n.Ob();)t=P(n.Pb(),89),Qh(this.a,t,``)??(r=!0);return r},Q.$b=function(){Pm(this.a)},Q.Hc=function(e){return km(this.a,e)},Q.Kc=function(){var e;return e=new EC(new Fn(this.a).a),new Cr(e)},Q.Mc=function(e){return iWe(this,e)},Q.gc=function(){return ho(this.a)},L(KH,`ETypeParameterImpl/2/1`,570),q(571,1,VP,Cr),Q.Nb=function(e){Om(this,e)},Q.Pb=function(){return P(MS(this.a).ld(),89)},Q.Ob=function(){return this.a.b},Q.Qb=function(){aKe(this.a)},L(KH,`ETypeParameterImpl/2/1/1`,571),q(1329,45,CI,h_e),Q._b=function(e){return rl(e)?e_(this,e):!!Kp(this.f,e)},Q.xc=function(e){var t=rl(e)?v_(this,e):nl(Kp(this.f,e)),n;return j(t,851)?(n=P(t,851),t=n.Kk(),Qh(this,P(e,241),t),t):t??(e==null?(Zo(),yHt):null)},L(KH,`EValidatorRegistryImpl`,1329),q(1349,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,2040:1,54:1,99:1,158:1,119:1,120:1},ace),Q.ri=function(e,t){switch(e.hk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return t==null?null:PE(t);case 25:return Cqe(t);case 27:return BGe(t);case 28:return VGe(t);case 29:return t==null?null:Nwe(t7[0],P(t,206));case 41:return t==null?``:Ha(P(t,297));case 42:return PE(t);case 50:return kd(t);default:throw E(new Fi(YH+e.xe()+XH))}},Q.si=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g;switch(e.G==-1&&(e.G=(f=Mx(e),f?NO(f.vi(),e):-1)),e.G){case 0:return n=new oi,n;case 1:return t=new Vse,t;case 2:return r=new Que,r;case 4:return i=new Ur,i;case 5:return a=new m_e,a;case 6:return o=new wge,o;case 7:return s=new $ue,s;case 10:return l=new sn,l;case 11:return u=new si,u;case 12:return d=new IIe,d;case 13:return p=new li,p;case 14:return m=new uDe,m;case 17:return h=new Yse,h;case 18:return c=new kr,c;case 19:return g=new un,g;default:throw E(new Fi($H+e.zb+XH))}},Q.ti=function(e,t){switch(e.hk()){case 20:return t==null?null:new xye(t);case 21:return t==null?null:new ru(t);case 23:case 22:return t==null?null:X0e(t);case 26:case 24:return t==null?null:Gb(GM(t,-128,127)<<24>>24);case 25:return Rit(t);case 27:return G3e(t);case 28:return K3e(t);case 29:return q7e(t);case 32:case 31:return t==null?null:OA(t);case 38:case 37:return t==null?null:new jge(t);case 40:case 39:return t==null?null:G(GM(t,xF,AP));case 41:return null;case 42:return null;case 44:case 43:return t==null?null:JD(aP(t));case 49:case 48:return t==null?null:xT(GM(t,aW,32767)<<16>>16);case 50:return t;default:throw E(new Fi(YH+e.xe()+XH))}},L(KH,`EcoreFactoryImpl`,1349),q(560,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,2038:1,54:1,99:1,158:1,184:1,560:1,119:1,120:1,690:1},MFe),Q.gb=!1,Q.hb=!1;var fHt,pHt=!1;L(KH,`EcorePackageImpl`,560),q(1234,1,{851:1},oce),Q.Kk=function(){return xTe(),bHt},L(KH,`EcorePackageImpl/1`,1234),q(1243,1,lW,sce),Q.fk=function(e){return j(e,155)},Q.gk=function(e){return V(G5,FP,155,e,0,1)},L(KH,`EcorePackageImpl/10`,1243),q(1244,1,lW,cce),Q.fk=function(e){return j(e,197)},Q.gk=function(e){return V(q5,FP,197,e,0,1)},L(KH,`EcorePackageImpl/11`,1244),q(1245,1,lW,lce),Q.fk=function(e){return j(e,58)},Q.gk=function(e){return V(L5,FP,58,e,0,1)},L(KH,`EcorePackageImpl/12`,1245),q(1246,1,lW,uce),Q.fk=function(e){return j(e,411)},Q.gk=function(e){return V(M7,Cwt,62,e,0,1)},L(KH,`EcorePackageImpl/13`,1246),q(1247,1,lW,dce),Q.fk=function(e){return j(e,241)},Q.gk=function(e){return V(J5,FP,241,e,0,1)},L(KH,`EcorePackageImpl/14`,1247),q(1248,1,lW,fce),Q.fk=function(e){return j(e,518)},Q.gk=function(e){return V(P7,FP,2116,e,0,1)},L(KH,`EcorePackageImpl/15`,1248),q(1249,1,lW,pce),Q.fk=function(e){return j(e,102)},Q.gk=function(e){return V(F7,qU,19,e,0,1)},L(KH,`EcorePackageImpl/16`,1249),q(1250,1,lW,mce),Q.fk=function(e){return j(e,179)},Q.gk=function(e){return V(w7,qU,179,e,0,1)},L(KH,`EcorePackageImpl/17`,1250),q(1251,1,lW,hce),Q.fk=function(e){return j(e,481)},Q.gk=function(e){return V(C7,FP,481,e,0,1)},L(KH,`EcorePackageImpl/18`,1251),q(1252,1,lW,gce),Q.fk=function(e){return j(e,561)},Q.gk=function(e){return V(o9,owt,561,e,0,1)},L(KH,`EcorePackageImpl/19`,1252),q(1235,1,lW,_ce),Q.fk=function(e){return j(e,331)},Q.gk=function(e){return V(T7,qU,35,e,0,1)},L(KH,`EcorePackageImpl/2`,1235),q(1253,1,lW,vce),Q.fk=function(e){return j(e,248)},Q.gk=function(e){return V(j7,Twt,89,e,0,1)},L(KH,`EcorePackageImpl/20`,1253),q(1254,1,lW,yce),Q.fk=function(e){return j(e,457)},Q.gk=function(e){return V(I7,FP,850,e,0,1)},L(KH,`EcorePackageImpl/21`,1254),q(1255,1,lW,bce),Q.fk=function(e){return il(e)},Q.gk=function(e){return V(bG,X,485,e,8,1)},L(KH,`EcorePackageImpl/22`,1255),q(1256,1,lW,xce),Q.fk=function(e){return j(e,195)},Q.gk=function(e){return V(X9,X,195,e,0,2)},L(KH,`EcorePackageImpl/23`,1256),q(1257,1,lW,Sce),Q.fk=function(e){return j(e,222)},Q.gk=function(e){return V(xG,X,222,e,0,1)},L(KH,`EcorePackageImpl/24`,1257),q(1258,1,lW,Cce),Q.fk=function(e){return j(e,180)},Q.gk=function(e){return V(CG,X,180,e,0,1)},L(KH,`EcorePackageImpl/25`,1258),q(1259,1,lW,wce),Q.fk=function(e){return j(e,206)},Q.gk=function(e){return V(fG,X,206,e,0,1)},L(KH,`EcorePackageImpl/26`,1259),q(1260,1,lW,Tce),Q.fk=function(e){return!1},Q.gk=function(e){return V(dUt,FP,2215,e,0,1)},L(KH,`EcorePackageImpl/27`,1260),q(1261,1,lW,Ece),Q.fk=function(e){return al(e)},Q.gk=function(e){return V(TG,X,345,e,7,1)},L(KH,`EcorePackageImpl/28`,1261),q(1262,1,lW,Dce),Q.fk=function(e){return j(e,61)},Q.gk=function(e){return V(xVt,BL,61,e,0,1)},L(KH,`EcorePackageImpl/29`,1262),q(1236,1,lW,Oce),Q.fk=function(e){return j(e,519)},Q.gk=function(e){return V(S7,{3:1,4:1,5:1,2033:1},598,e,0,1)},L(KH,`EcorePackageImpl/3`,1236),q(1263,1,lW,kce),Q.fk=function(e){return j(e,582)},Q.gk=function(e){return V(DVt,FP,2039,e,0,1)},L(KH,`EcorePackageImpl/30`,1263),q(1264,1,lW,Ace),Q.fk=function(e){return j(e,160)},Q.gk=function(e){return V(vHt,BL,160,e,0,1)},L(KH,`EcorePackageImpl/31`,1264),q(1265,1,lW,jce),Q.fk=function(e){return j(e,76)},Q.gk=function(e){return V(t9,Iwt,76,e,0,1)},L(KH,`EcorePackageImpl/32`,1265),q(1266,1,lW,Mce),Q.fk=function(e){return j(e,161)},Q.gk=function(e){return V(EG,X,161,e,0,1)},L(KH,`EcorePackageImpl/33`,1266),q(1267,1,lW,Nce),Q.fk=function(e){return j(e,17)},Q.gk=function(e){return V(DG,X,17,e,0,1)},L(KH,`EcorePackageImpl/34`,1267),q(1268,1,lW,Pce),Q.fk=function(e){return j(e,297)},Q.gk=function(e){return V(DTt,FP,297,e,0,1)},L(KH,`EcorePackageImpl/35`,1268),q(1269,1,lW,Fce),Q.fk=function(e){return j(e,168)},Q.gk=function(e){return V(kG,X,168,e,0,1)},L(KH,`EcorePackageImpl/36`,1269),q(1270,1,lW,Ice),Q.fk=function(e){return j(e,85)},Q.gk=function(e){return V(kTt,FP,85,e,0,1)},L(KH,`EcorePackageImpl/37`,1270),q(1271,1,lW,Lce),Q.fk=function(e){return j(e,599)},Q.gk=function(e){return V(mHt,FP,599,e,0,1)},L(KH,`EcorePackageImpl/38`,1271),q(1272,1,lW,Rce),Q.fk=function(e){return!1},Q.gk=function(e){return V(fUt,FP,2216,e,0,1)},L(KH,`EcorePackageImpl/39`,1272),q(1237,1,lW,zce),Q.fk=function(e){return j(e,90)},Q.gk=function(e){return V(D7,FP,29,e,0,1)},L(KH,`EcorePackageImpl/4`,1237),q(1273,1,lW,Bce),Q.fk=function(e){return j(e,191)},Q.gk=function(e){return V(PG,X,191,e,0,1)},L(KH,`EcorePackageImpl/40`,1273),q(1274,1,lW,Vce),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(KH,`EcorePackageImpl/41`,1274),q(1275,1,lW,Hce),Q.fk=function(e){return j(e,596)},Q.gk=function(e){return V(CVt,FP,596,e,0,1)},L(KH,`EcorePackageImpl/42`,1275),q(1276,1,lW,Uce),Q.fk=function(e){return!1},Q.gk=function(e){return V(pUt,X,2217,e,0,1)},L(KH,`EcorePackageImpl/43`,1276),q(1277,1,lW,Wce),Q.fk=function(e){return j(e,44)},Q.gk=function(e){return V(YW,oF,44,e,0,1)},L(KH,`EcorePackageImpl/44`,1277),q(1238,1,lW,Gce),Q.fk=function(e){return j(e,142)},Q.gk=function(e){return V(E7,FP,142,e,0,1)},L(KH,`EcorePackageImpl/5`,1238),q(1239,1,lW,Kce),Q.fk=function(e){return j(e,156)},Q.gk=function(e){return V(O7,FP,156,e,0,1)},L(KH,`EcorePackageImpl/6`,1239),q(1240,1,lW,qce),Q.fk=function(e){return j(e,469)},Q.gk=function(e){return V(k7,FP,685,e,0,1)},L(KH,`EcorePackageImpl/7`,1240),q(1241,1,lW,Jce),Q.fk=function(e){return j(e,582)},Q.gk=function(e){return V(A7,FP,694,e,0,1)},L(KH,`EcorePackageImpl/8`,1241),q(1242,1,lW,Yce),Q.fk=function(e){return j(e,480)},Q.gk=function(e){return V(K5,FP,480,e,0,1)},L(KH,`EcorePackageImpl/9`,1242),q(1038,2080,iwt,K_e),Q.Mi=function(e,t){B$e(this,P(t,424))},Q.Qi=function(e,t){ntt(this,e,P(t,424))},L(KH,`MinimalEObjectImpl/1ArrayDelegatingAdapterList`,1038),q(1039,152,NU,cFe),Q.jj=function(){return this.a.a},L(KH,`MinimalEObjectImpl/1ArrayDelegatingAdapterList/1`,1039),q(1067,1066,{},uwe),L(`org.eclipse.emf.ecore.plugin`,`EcorePlugin`,1067);var mHt=gp(Lwt,`Resource`);q(799,1524,Rwt),Q.Hl=function(e){},Q.Il=function(e){},Q.El=function(){return!this.a&&(this.a=new wr(this)),this.a},Q.Fl=function(e){var t,n,r=e.length,i,a;if(r>0){if(sv(0,e.length),e.charCodeAt(0)==47){for(a=new Hy(4),i=1,t=1;t0&&(e=(Zy(0,n,e.length),e.substr(0,n))))}return hnt(this,e)},Q.Gl=function(){return this.c},Q.Ib=function(){var e;return Ha(this.Rm)+`@`+(e=US(this)>>>0,e.toString(16))+` uri='`+this.d+`'`},Q.b=!1,L(uW,`ResourceImpl`,799),q(1525,799,Rwt,qhe),L(uW,`BinaryResourceImpl`,1525),q(1190,708,CU),Q.bj=function(e){return j(e,58)?rLe(this,P(e,58)):j(e,599)?new Lu(P(e,599).El()):A(e)===A(this.f)?P(e,16).Kc():(Nd(),_7.a)},Q.Ob=function(){return ert(this)},Q.a=!1,L(IU,`EcoreUtil/ContentTreeIterator`,1190),q(1526,1190,CU,sPe),Q.bj=function(e){return A(e)===A(this.f)?P(e,15).Kc():new aVe(P(e,58))},L(uW,`ResourceImpl/5`,1526),q(658,2092,wwt,wr),Q.Hc=function(e){return this.i<=4?Uk(this,e):j(e,54)&&P(e,54).Jh()==this.a},Q.Mi=function(e,t){e==this.i-1&&(this.a.b||(this.a.b=!0))},Q.Oi=function(e,t){e==0?this.a.b||(this.a.b=!0):Xy(this,e,t)},Q.Qi=function(e,t){},Q.Ri=function(e,t,n){},Q.Lj=function(){return 2},Q.jj=function(){return this.a},Q.Mj=function(){return!0},Q.Nj=function(e,t){return t=P(e,54).fi(this.a,t),t},Q.Oj=function(e,t){return P(e,54).fi(null,t)},Q.Pj=function(){return!1},Q.Si=function(){return!0},Q.aj=function(e){return V(L5,FP,58,e,0,1)},Q.Yi=function(){return!1},L(uW,`ResourceImpl/ContentsEList`,658),q(970,2062,gF,Jhe),Q.fd=function(e){return this.a.Ki(e)},Q.gc=function(){return this.a.gc()},L(IU,`AbstractSequentialInternalEList/1`,970);var hHt,gHt,l9,_Ht;q(634,1,{},tMe);var u9,d9;L(IU,`BasicExtendedMetaData`,634),q(1181,1,{},QSe),Q.Jl=function(){return null},Q.Kl=function(){return this.a==-2&&sfe(this,F7e(this.d,this.b)),this.a},Q.Ll=function(){return null},Q.Ml=function(){return Vg(),Vg(),QG},Q.xe=function(){return this.c==SW&&cfe(this,f2e(this.d,this.b)),this.c},Q.Nl=function(){return 0},Q.a=-2,Q.c=SW,L(IU,`BasicExtendedMetaData/EClassExtendedMetaDataImpl`,1181),q(1182,1,{},dBe),Q.Jl=function(){return this.a==(By(),u9)&&dfe(this,olt(this.f,this.b)),this.a},Q.Kl=function(){return 0},Q.Ll=function(){return this.c==(By(),u9)&&lfe(this,slt(this.f,this.b)),this.c},Q.Ml=function(){return!this.d&&pfe(this,rft(this.f,this.b)),this.d},Q.xe=function(){return this.e==SW&&hfe(this,f2e(this.f,this.b)),this.e},Q.Nl=function(){return this.g==-2&&_fe(this,R5e(this.f,this.b)),this.g},Q.e=SW,Q.g=-2,L(IU,`BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl`,1182),q(1180,1,{},$Se),Q.b=!1,Q.c=!1,L(IU,`BasicExtendedMetaData/EPackageExtendedMetaDataImpl`,1180),q(1183,1,{},fBe),Q.c=-2,Q.e=SW,Q.f=SW,L(IU,`BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl`,1183),q(593,632,JU,ip),Q.Lj=function(){return this.c},Q.ol=function(){return!1},Q.Wi=function(e,t){return t},Q.c=0,L(IU,`EDataTypeEList`,593);var vHt=gp(IU,`FeatureMap`);q(78,593,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},DC),Q.bd=function(e,t){got(this,e,P(t,76))},Q.Fc=function(e){return xat(this,P(e,76))},Q.Hi=function(e){UPe(this,P(e,76))},Q.Nj=function(e,t){return qOe(this,P(e,76),t)},Q.Oj=function(e,t){return JOe(this,P(e,76),t)},Q.Ti=function(e,t){return Dut(this,e,t)},Q.Wi=function(e,t){return Umt(this,e,P(t,76))},Q.hd=function(e,t){return xst(this,e,P(t,76))},Q.Uj=function(e,t){return YOe(this,P(e,76),t)},Q.Vj=function(e,t){return XOe(this,P(e,76),t)},Q.Wj=function(e,t,n){return f5e(this,P(e,76),P(t,76),n)},Q.Zi=function(e,t){return aA(this,e,P(t,76))},Q.Ol=function(e,t){return cut(this,e,t)},Q.cd=function(e,t){var n,r,i,a,o,s,c,l=new kx(t.gc()),u;for(i=t.Kc();i.Ob();)if(r=P(i.Pb(),76),a=r.Lk(),aM(this.e,a))(!a.Si()||!Kv(this,a,r.md())&&!Uk(l,r))&&tb(l,r);else{for(u=nM(this.e.Dh(),a),n=P(this.g,124),o=!0,s=0;s=0;)if(t=e[this.c],this.k.am(t.Lk()))return this.j=this.f?t:t.md(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},L(IU,`BasicFeatureMap/FeatureEIterator`,420),q(676,420,YP,Dl),Q.ul=function(){return!0},L(IU,`BasicFeatureMap/ResolvingFeatureEIterator`,676),q(968,496,QU,zwe),Q.pj=function(){return this},L(IU,`EContentsEList/1`,968),q(969,496,QU,mCe),Q.ul=function(){return!1},L(IU,`EContentsEList/2`,969),q(967,287,$U,Bwe),Q.wl=function(e){},Q.Ob=function(){return!1},Q.Sb=function(){return!1},L(IU,`EContentsEList/FeatureIteratorImpl/1`,967),q(840,593,JU,uTe),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;RN(this),Gl(this.e)?(e=this.a,this.a=!1,AC(this.e,new vy(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(IU,`EDataTypeEList/Unsettable`,840),q(1958,593,JU,dTe),Q.Si=function(){return!0},L(IU,`EDataTypeUniqueEList`,1958),q(1959,840,JU,fTe),Q.Si=function(){return!0},L(IU,`EDataTypeUniqueEList/Unsettable`,1959),q(147,83,JU,Nu),Q.nl=function(){return!0},Q.Wi=function(e,t){return vj(this,e,P(t,58))},L(IU,`EObjectContainmentEList/Resolving`,147),q(1184,555,JU,pTe),Q.nl=function(){return!0},Q.Wi=function(e,t){return vj(this,e,P(t,58))},L(IU,`EObjectContainmentEList/Unsettable/Resolving`,1184),q(766,14,JU,rf),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;RN(this),Gl(this.e)?(e=this.a,this.a=!1,AC(this.e,new vy(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(IU,`EObjectContainmentWithInverseEList/Unsettable`,766),q(1222,766,JU,yOe),Q.nl=function(){return!0},Q.Wi=function(e,t){return vj(this,e,P(t,58))},L(IU,`EObjectContainmentWithInverseEList/Unsettable/Resolving`,1222),q(757,505,JU,mTe),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;RN(this),Gl(this.e)?(e=this.a,this.a=!1,AC(this.e,new vy(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(IU,`EObjectEList/Unsettable`,757),q(338,505,JU,Pu),Q.nl=function(){return!0},Q.Wi=function(e,t){return vj(this,e,P(t,58))},L(IU,`EObjectResolvingEList`,338),q(1844,757,JU,hTe),Q.nl=function(){return!0},Q.Wi=function(e,t){return vj(this,e,P(t,58))},L(IU,`EObjectResolvingEList/Unsettable`,1844),q(1527,1,{},Xce);var yHt;L(IU,`EObjectValidator`,1527),q(559,505,JU,wm),Q.il=function(){return this.d},Q.jl=function(){return this.b},Q.Mj=function(){return!0},Q.ml=function(){return!0},Q.b=0,L(IU,`EObjectWithInverseEList`,559),q(1225,559,JU,bOe),Q.ll=function(){return!0},L(IU,`EObjectWithInverseEList/ManyInverse`,1225),q(635,559,JU,af),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;RN(this),Gl(this.e)?(e=this.a,this.a=!1,AC(this.e,new vy(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(IU,`EObjectWithInverseEList/Unsettable`,635),q(1224,635,JU,xOe),Q.ll=function(){return!0},L(IU,`EObjectWithInverseEList/Unsettable/ManyInverse`,1224),q(767,559,JU,of),Q.nl=function(){return!0},Q.Wi=function(e,t){return vj(this,e,P(t,58))},L(IU,`EObjectWithInverseResolvingEList`,767),q(32,767,JU,cf),Q.ll=function(){return!0},L(IU,`EObjectWithInverseResolvingEList/ManyInverse`,32),q(768,635,JU,sf),Q.nl=function(){return!0},Q.Wi=function(e,t){return vj(this,e,P(t,58))},L(IU,`EObjectWithInverseResolvingEList/Unsettable`,768),q(1223,768,JU,SOe),Q.ll=function(){return!0},L(IU,`EObjectWithInverseResolvingEList/Unsettable/ManyInverse`,1223),q(1185,632,JU),Q.Li=function(){return!(this.b&1792)},Q.Ni=function(){this.b|=1},Q.kl=function(){return!!(this.b&4)},Q.Mj=function(){return!!(this.b&40)},Q.ll=function(){return!!(this.b&16)},Q.ml=function(){return!!(this.b&8)},Q.nl=function(){return(this.b&zU)!=0},Q.al=function(){return!!(this.b&32)},Q.ol=function(){return(this.b&pF)!=0},Q.fk=function(e){return this.d?HVe(this.d,e):this.Lk().Hk().fk(e)},Q.Qj=function(){return this.b&2?!!(this.b&1):this.i!=0},Q.Si=function(){return!!(this.b&128)},Q.Gk=function(){var e;RN(this),this.b&2&&(Gl(this.e)?(e=!!(this.b&1),this.b&=-2,Kr(this,new vy(this.e,2,eD(this.e.Dh(),this.Lk()),e,!1))):this.b&=-2)},Q.Yi=function(){return!(this.b&1536)},Q.b=0,L(IU,`EcoreEList/Generic`,1185),q(1186,1185,JU,BIe),Q.Lk=function(){return this.a},L(IU,`EcoreEList/Dynamic`,1186),q(765,66,SU,Yhe),Q.aj=function(e){return tS(this.a.a,e)},L(IU,`EcoreEMap/1`,765),q(764,83,JU,dPe),Q.Mi=function(e,t){JO(this.b,P(t,136))},Q.Oi=function(e,t){sXe(this.b)},Q.Pi=function(e,t,n){var r;++(r=this.b,P(t,136),r).e},Q.Qi=function(e,t){$T(this.b,P(t,136))},Q.Ri=function(e,t,n){$T(this.b,P(n,136)),A(n)===A(t)&&P(n,136).Ci(swe(P(t,136).ld())),JO(this.b,P(t,136))},L(IU,`EcoreEMap/DelegateEObjectContainmentEList`,764),q(1220,141,bwt,TJe),L(IU,`EcoreEMap/Unsettable`,1220),q(1221,764,JU,COe),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;RN(this),Gl(this.e)?(e=this.a,this.a=!1,AC(this.e,new vy(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(IU,`EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList`,1221),q(1189,215,CI,GPe),Q.a=!1,Q.b=!1,L(IU,`EcoreUtil/Copier`,1189),q(759,1,VP,aVe),Q.Nb=function(e){Om(this,e)},Q.Ob=function(){return M0e(this)},Q.Pb=function(){var e;return M0e(this),e=this.b,this.b=null,e},Q.Qb=function(){this.a.Qb()},L(IU,`EcoreUtil/ProperContentIterator`,759),q(1528,1527,{},ede);var bHt;L(IU,`EcoreValidator`,1528);var xHt;gp(IU,`FeatureMapUtil/Validator`),q(1295,1,{2041:1},Zce),Q.am=function(e){return!0},L(IU,`FeatureMapUtil/1`,1295),q(773,1,{2041:1},Egt),Q.am=function(e){var t;return this.c==e||(t=Od(xh(this.a,e)),t==null?_lt(this,e)?(PUe(this.a,e,(rd(),yG)),!0):(PUe(this.a,e,(rd(),vG)),!1):t==(rd(),yG))},Q.e=!1;var f9;L(IU,`FeatureMapUtil/BasicValidator`,773),q(774,45,CI,Rwe),L(IU,`FeatureMapUtil/BasicValidator/Cache`,774),q(509,56,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,71:1,97:1},Qc),Q.bd=function(e,t){Mst(this.c,this.b,e,t)},Q.Fc=function(e){return cut(this.c,this.b,e)},Q.cd=function(e,t){return vpt(this.c,this.b,e,t)},Q.Gc=function(e){return Su(this,e)},Q.Gi=function(e,t){$Ke(this.c,this.b,e,t)},Q.Wk=function(e,t){return plt(this.c,this.b,e,t)},Q.$i=function(e){return CN(this.c,this.b,e,!1)},Q.Ii=function(){return BCe(this.c,this.b)},Q.Ji=function(){return VCe(this.c,this.b)},Q.Ki=function(e){return GWe(this.c,this.b,e)},Q.Xk=function(e,t){return NDe(this,e,t)},Q.$b=function(){qr(this)},Q.Hc=function(e){return Kv(this.c,this.b,e)},Q.Ic=function(e){return MYe(this.c,this.b,e)},Q.Xb=function(e){return CN(this.c,this.b,e,!0)},Q.Fk=function(e){return this},Q.dd=function(e){return cHe(this.c,this.b,e)},Q.dc=function(){return tl(this)},Q.Qj=function(){return!lD(this.c,this.b)},Q.Kc=function(){return SKe(this.c,this.b)},Q.ed=function(){return CKe(this.c,this.b)},Q.fd=function(e){return p1e(this.c,this.b,e)},Q.Ti=function(e,t){return Ndt(this.c,this.b,e,t)},Q.Ui=function(e,t){XWe(this.c,this.b,e,t)},Q.gd=function(e){return _et(this.c,this.b,e)},Q.Mc=function(e){return eut(this.c,this.b,e)},Q.hd=function(e,t){return sft(this.c,this.b,e,t)},Q.Wb=function(e){_j(this.c,this.b),Su(this,P(e,15))},Q.gc=function(){return f1e(this.c,this.b)},Q.Pc=function(){return mBe(this.c,this.b)},Q.Qc=function(e){return lHe(this.c,this.b,e)},Q.Ib=function(){var e,t=new $i;for(t.a+=`[`,e=BCe(this.c,this.b);Uw(e);)pl(t,Uu(MO(e))),Uw(e)&&(t.a+=PP);return t.a+=`]`,t.a},Q.Gk=function(){_j(this.c,this.b)},L(IU,`FeatureMapUtil/FeatureEList`,509),q(644,39,NU,ey),Q.hj=function(e){return BT(this,e)},Q.mj=function(e){var t,n,r,i,a,o,s;switch(this.d){case 1:case 2:if(a=e.jj(),A(a)===A(this.c)&&BT(this,null)==e.hj(null))return this.g=e.ij(),e.gj()==1&&(this.d=1),!0;break;case 3:if(i=e.gj(),i===3&&(a=e.jj(),A(a)===A(this.c)&&BT(this,null)==e.hj(null)))return this.d=5,t=new kx(2),tb(t,this.g),tb(t,e.ij()),this.g=t,!0;break;case 5:if(i=e.gj(),i===3&&(a=e.jj(),A(a)===A(this.c)&&BT(this,null)==e.hj(null)))return n=P(this.g,16),n.Fc(e.ij()),!0;break;case 4:switch(i=e.gj(),i){case 3:if(a=e.jj(),A(a)===A(this.c)&&BT(this,null)==e.hj(null))return this.d=1,this.g=e.ij(),!0;break;case 4:if(a=e.jj(),A(a)===A(this.c)&&BT(this,null)==e.hj(null))return this.d=6,s=new kx(2),tb(s,this.n),tb(s,e.kj()),this.n=s,o=U(O(q9,1),HF,28,15,[this.o,e.lj()]),this.g=o,!0}break;case 6:if(i=e.gj(),i===4&&(a=e.jj(),A(a)===A(this.c)&&BT(this,null)==e.hj(null)))return n=P(this.n,16),n.Fc(e.kj()),o=P(this.g,53),r=V(q9,HF,28,o.length+1,15,1),tN(o,0,r,0,o.length),r[o.length]=e.lj(),this.g=r,!0}return!1},L(IU,`FeatureMapUtil/FeatureENotificationImpl`,644),q(564,509,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},hp),Q.Ol=function(e,t){return cut(this.c,e,t)},Q.Pl=function(e,t,n){return plt(this.c,e,t,n)},Q.Ql=function(e,t,n){return Xft(this.c,e,t,n)},Q.Rl=function(){return this},Q.Sl=function(e,t){return SN(this.c,e,t)},Q.Tl=function(e){return P(CN(this.c,this.b,e,!1),76).Lk()},Q.Ul=function(e){return P(CN(this.c,this.b,e,!1),76).md()},Q.Vl=function(){return this.a},Q.Wl=function(e){return!lD(this.c,e)},Q.Xl=function(e,t){ON(this.c,e,t)},Q.Yl=function(e){return LJe(this.c,e)},Q.Zl=function(e){v3e(this.c,e)},L(IU,`FeatureMapUtil/FeatureFeatureMap`,564),q(1294,1,LU,ZSe),Q.Fk=function(e){return CN(this.b,this.a,-1,e)},Q.Qj=function(){return!lD(this.b,this.a)},Q.Wb=function(e){ON(this.b,this.a,e)},Q.Gk=function(){_j(this.b,this.a)},L(IU,`FeatureMapUtil/FeatureValue`,1294);var p9,m9,h9,g9,SHt,_9=gp(wW,`AnyType`);q(680,63,SF,Hi),L(wW,`InvalidDatatypeValueException`,680);var v9=gp(wW,Hwt),y9=gp(wW,Uwt),CHt=gp(wW,Wwt),wHt,b9,THt,x9,EHt,DHt,OHt,kHt,AHt,jHt,MHt,NHt,PHt,FHt,IHt,S9,LHt,C9,w9,RHt,T9,E9,D9,zHt,O9,k9;q(844,516,{110:1,94:1,93:1,58:1,54:1,99:1,857:1},g_e),Q.Lh=function(e,t,n){switch(e){case 0:return n?(!this.c&&(this.c=new DC(this,0)),this.c):(!this.c&&(this.c=new DC(this,0)),this.c.b);case 1:return n?(!this.c&&(this.c=new DC(this,0)),P(Z_(this.c,(UN(),x9)),160)):(!this.c&&(this.c=new DC(this,0)),P(P(Z_(this.c,(UN(),x9)),160),220)).Vl();case 2:return n?(!this.b&&(this.b=new DC(this,2)),this.b):(!this.b&&(this.b=new DC(this,2)),this.b.b)}return xb(this,e-bh(this.ii()),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():this.ii(),e),t,n)},Q.Uh=function(e,t,n){var r;switch(t){case 0:return!this.c&&(this.c=new DC(this,0)),zM(this.c,e,n);case 1:return(!this.c&&(this.c=new DC(this,0)),P(P(Z_(this.c,(UN(),x9)),160),71)).Xk(e,n);case 2:return!this.b&&(this.b=new DC(this,2)),zM(this.b,e,n)}return r=P(_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():this.ii(),t),69),r.wk().Ak(this,Jb(this),t-bh(this.ii()),e,n)},Q.Wh=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new DC(this,0)),P(Z_(this.c,(UN(),x9)),160)).dc();case 2:return!!this.b&&this.b.i!=0}return Hv(this,e-bh(this.ii()),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():this.ii(),e))},Q.bi=function(e,t){switch(e){case 0:!this.c&&(this.c=new DC(this,0)),qm(this.c,t);return;case 1:(!this.c&&(this.c=new DC(this,0)),P(P(Z_(this.c,(UN(),x9)),160),220)).Wb(t);return;case 2:!this.b&&(this.b=new DC(this,2)),qm(this.b,t);return}LE(this,e-bh(this.ii()),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():this.ii(),e),t)},Q.ii=function(){return UN(),THt},Q.ki=function(e){switch(e){case 0:!this.c&&(this.c=new DC(this,0)),RN(this.c);return;case 1:(!this.c&&(this.c=new DC(this,0)),P(Z_(this.c,(UN(),x9)),160)).$b();return;case 2:!this.b&&(this.b=new DC(this,2)),RN(this.b);return}PT(this,e-bh(this.ii()),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():this.ii(),e))},Q.Ib=function(){var e;return this.j&4?Aj(this):(e=new Wu(Aj(this)),e.a+=` (mixed: `,fl(e,this.c),e.a+=`, anyAttribute: `,fl(e,this.b),e.a+=`)`,e.a)},L(TW,`AnyTypeImpl`,844),q(681,516,{110:1,94:1,93:1,58:1,54:1,99:1,2119:1,681:1},cle),Q.Lh=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return xb(this,e-bh((UN(),S9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():S9,e),t,n)},Q.Wh=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return Hv(this,e-bh((UN(),S9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():S9,e))},Q.bi=function(e,t){switch(e){case 0:bfe(this,kd(t));return;case 1:Sfe(this,kd(t));return}LE(this,e-bh((UN(),S9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():S9,e),t)},Q.ii=function(){return UN(),S9},Q.ki=function(e){switch(e){case 0:this.a=null;return;case 1:this.b=null;return}PT(this,e-bh((UN(),S9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():S9,e))},Q.Ib=function(){var e;return this.j&4?Aj(this):(e=new Wu(Aj(this)),e.a+=` (data: `,pl(e,this.a),e.a+=`, target: `,pl(e,this.b),e.a+=`)`,e.a)},Q.a=null,Q.b=null,L(TW,`ProcessingInstructionImpl`,681),q(682,844,{110:1,94:1,93:1,58:1,54:1,99:1,857:1,2120:1,682:1},__e),Q.Lh=function(e,t,n){switch(e){case 0:return n?(!this.c&&(this.c=new DC(this,0)),this.c):(!this.c&&(this.c=new DC(this,0)),this.c.b);case 1:return n?(!this.c&&(this.c=new DC(this,0)),P(Z_(this.c,(UN(),x9)),160)):(!this.c&&(this.c=new DC(this,0)),P(P(Z_(this.c,(UN(),x9)),160),220)).Vl();case 2:return n?(!this.b&&(this.b=new DC(this,2)),this.b):(!this.b&&(this.b=new DC(this,2)),this.b.b);case 3:return!this.c&&(this.c=new DC(this,0)),kd(SN(this.c,(UN(),w9),!0));case 4:return df(this.a,(!this.c&&(this.c=new DC(this,0)),kd(SN(this.c,(UN(),w9),!0))));case 5:return this.a}return xb(this,e-bh((UN(),C9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():C9,e),t,n)},Q.Wh=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new DC(this,0)),P(Z_(this.c,(UN(),x9)),160)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new DC(this,0)),kd(SN(this.c,(UN(),w9),!0))!=null;case 4:return df(this.a,(!this.c&&(this.c=new DC(this,0)),kd(SN(this.c,(UN(),w9),!0))))!=null;case 5:return!!this.a}return Hv(this,e-bh((UN(),C9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():C9,e))},Q.bi=function(e,t){switch(e){case 0:!this.c&&(this.c=new DC(this,0)),qm(this.c,t);return;case 1:(!this.c&&(this.c=new DC(this,0)),P(P(Z_(this.c,(UN(),x9)),160),220)).Wb(t);return;case 2:!this.b&&(this.b=new DC(this,2)),qm(this.b,t);return;case 3:pBe(this,kd(t));return;case 4:pBe(this,uf(this.a,t));return;case 5:xfe(this,P(t,156));return}LE(this,e-bh((UN(),C9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():C9,e),t)},Q.ii=function(){return UN(),C9},Q.ki=function(e){switch(e){case 0:!this.c&&(this.c=new DC(this,0)),RN(this.c);return;case 1:(!this.c&&(this.c=new DC(this,0)),P(Z_(this.c,(UN(),x9)),160)).$b();return;case 2:!this.b&&(this.b=new DC(this,2)),RN(this.b);return;case 3:!this.c&&(this.c=new DC(this,0)),ON(this.c,(UN(),w9),null);return;case 4:pBe(this,uf(this.a,null));return;case 5:this.a=null;return}PT(this,e-bh((UN(),C9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():C9,e))},L(TW,`SimpleAnyTypeImpl`,682),q(683,516,{110:1,94:1,93:1,58:1,54:1,99:1,2121:1,683:1},v_e),Q.Lh=function(e,t,n){switch(e){case 0:return n?(!this.a&&(this.a=new DC(this,0)),this.a):(!this.a&&(this.a=new DC(this,0)),this.a.b);case 1:return n?(!this.b&&(this.b=new lb((CP(),$7),o9,this,1)),this.b):(!this.b&&(this.b=new lb((CP(),$7),o9,this,1)),Jy(this.b));case 2:return n?(!this.c&&(this.c=new lb((CP(),$7),o9,this,2)),this.c):(!this.c&&(this.c=new lb((CP(),$7),o9,this,2)),Jy(this.c));case 3:return!this.a&&(this.a=new DC(this,0)),Z_(this.a,(UN(),E9));case 4:return!this.a&&(this.a=new DC(this,0)),Z_(this.a,(UN(),D9));case 5:return!this.a&&(this.a=new DC(this,0)),Z_(this.a,(UN(),O9));case 6:return!this.a&&(this.a=new DC(this,0)),Z_(this.a,(UN(),k9))}return xb(this,e-bh((UN(),T9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():T9,e),t,n)},Q.Uh=function(e,t,n){var r;switch(t){case 0:return!this.a&&(this.a=new DC(this,0)),zM(this.a,e,n);case 1:return!this.b&&(this.b=new lb((CP(),$7),o9,this,1)),gf(this.b,e,n);case 2:return!this.c&&(this.c=new lb((CP(),$7),o9,this,2)),gf(this.c,e,n);case 5:return!this.a&&(this.a=new DC(this,0)),NDe(Z_(this.a,(UN(),O9)),e,n)}return r=P(_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():(UN(),T9),t),69),r.wk().Ak(this,Jb(this),t-bh((UN(),T9)),e,n)},Q.Wh=function(e){switch(e){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new DC(this,0)),!tl(Z_(this.a,(UN(),E9)));case 4:return!this.a&&(this.a=new DC(this,0)),!tl(Z_(this.a,(UN(),D9)));case 5:return!this.a&&(this.a=new DC(this,0)),!tl(Z_(this.a,(UN(),O9)));case 6:return!this.a&&(this.a=new DC(this,0)),!tl(Z_(this.a,(UN(),k9)))}return Hv(this,e-bh((UN(),T9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():T9,e))},Q.bi=function(e,t){switch(e){case 0:!this.a&&(this.a=new DC(this,0)),qm(this.a,t);return;case 1:!this.b&&(this.b=new lb((CP(),$7),o9,this,1)),bC(this.b,t);return;case 2:!this.c&&(this.c=new lb((CP(),$7),o9,this,2)),bC(this.c,t);return;case 3:!this.a&&(this.a=new DC(this,0)),qr(Z_(this.a,(UN(),E9))),!this.a&&(this.a=new DC(this,0)),Su(Z_(this.a,E9),P(t,16));return;case 4:!this.a&&(this.a=new DC(this,0)),qr(Z_(this.a,(UN(),D9))),!this.a&&(this.a=new DC(this,0)),Su(Z_(this.a,D9),P(t,16));return;case 5:!this.a&&(this.a=new DC(this,0)),qr(Z_(this.a,(UN(),O9))),!this.a&&(this.a=new DC(this,0)),Su(Z_(this.a,O9),P(t,16));return;case 6:!this.a&&(this.a=new DC(this,0)),qr(Z_(this.a,(UN(),k9))),!this.a&&(this.a=new DC(this,0)),Su(Z_(this.a,k9),P(t,16));return}LE(this,e-bh((UN(),T9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():T9,e),t)},Q.ii=function(){return UN(),T9},Q.ki=function(e){switch(e){case 0:!this.a&&(this.a=new DC(this,0)),RN(this.a);return;case 1:!this.b&&(this.b=new lb((CP(),$7),o9,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new lb((CP(),$7),o9,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new DC(this,0)),qr(Z_(this.a,(UN(),E9)));return;case 4:!this.a&&(this.a=new DC(this,0)),qr(Z_(this.a,(UN(),D9)));return;case 5:!this.a&&(this.a=new DC(this,0)),qr(Z_(this.a,(UN(),O9)));return;case 6:!this.a&&(this.a=new DC(this,0)),qr(Z_(this.a,(UN(),k9)));return}PT(this,e-bh((UN(),T9)),_x(this.j&2?(!this.k&&(this.k=new fn),this.k).Nk():T9,e))},Q.Ib=function(){var e;return this.j&4?Aj(this):(e=new Wu(Aj(this)),e.a+=` (mixed: `,fl(e,this.a),e.a+=`)`,e.a)},L(TW,`XMLTypeDocumentRootImpl`,683),q(2028,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1,2122:1},Qce),Q.ri=function(e,t){switch(e.hk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return t==null?null:PE(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return kd(t);case 6:return rDe(P(t,195));case 12:case 47:case 49:case 11:return yht(this,e,t);case 13:return t==null?null:Cpt(P(t,247));case 15:case 14:return t==null?null:LPe(D(N(t)));case 17:return p5e((UN(),t));case 18:return p5e(t);case 21:case 20:return t==null?null:RPe(P(t,161).a);case 27:return iDe(P(t,195));case 30:return y3e((UN(),P(t,15)));case 31:return y3e(P(t,15));case 40:return oDe((UN(),t));case 42:return m5e((UN(),t));case 43:return m5e(t);case 59:case 48:return aDe((UN(),t));default:throw E(new Fi(YH+e.xe()+XH))}},Q.si=function(e){var t,n,r,i,a;switch(e.G==-1&&(e.G=(n=Mx(e),n?NO(n.vi(),e):-1)),e.G){case 0:return t=new g_e,t;case 1:return r=new cle,r;case 2:return i=new __e,i;case 3:return a=new v_e,a;default:throw E(new Fi($H+e.zb+XH))}},Q.ti=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;switch(e.hk()){case 5:case 52:case 4:return t;case 6:return J2e(t);case 8:case 7:return t==null?null:D5e(t);case 9:return t==null?null:Gb(GM((r=EN(t,!0),r.length>0&&(sv(0,r.length),r.charCodeAt(0)==43)?(sv(1,r.length+1),r.substr(1)):r),-128,127)<<24>>24);case 10:return t==null?null:Gb(GM((i=EN(t,!0),i.length>0&&(sv(0,i.length),i.charCodeAt(0)==43)?(sv(1,i.length+1),i.substr(1)):i),-128,127)<<24>>24);case 11:return kd(uP(this,(UN(),OHt),t));case 12:return kd(uP(this,(UN(),kHt),t));case 13:return t==null?null:new xye(EN(t,!0));case 15:case 14:return Eat(t);case 16:return kd(uP(this,(UN(),AHt),t));case 17:return V0e((UN(),t));case 18:return V0e(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return EN(t,!0);case 21:case 20:return zat(t);case 22:return kd(uP(this,(UN(),jHt),t));case 23:return kd(uP(this,(UN(),MHt),t));case 24:return kd(uP(this,(UN(),NHt),t));case 25:return kd(uP(this,(UN(),PHt),t));case 26:return kd(uP(this,(UN(),FHt),t));case 27:return A2e(t);case 30:return H0e((UN(),t));case 31:return H0e(t);case 32:return t==null?null:G(GM((u=EN(t,!0),u.length>0&&(sv(0,u.length),u.charCodeAt(0)==43)?(sv(1,u.length+1),u.substr(1)):u),xF,AP));case 33:return t==null?null:new ru((d=EN(t,!0),d.length>0&&(sv(0,d.length),d.charCodeAt(0)==43)?(sv(1,d.length+1),d.substr(1)):d));case 34:return t==null?null:G(GM((f=EN(t,!0),f.length>0&&(sv(0,f.length),f.charCodeAt(0)==43)?(sv(1,f.length+1),f.substr(1)):f),xF,AP));case 36:return t==null?null:JD(aP((p=EN(t,!0),p.length>0&&(sv(0,p.length),p.charCodeAt(0)==43)?(sv(1,p.length+1),p.substr(1)):p)));case 37:return t==null?null:JD(aP((m=EN(t,!0),m.length>0&&(sv(0,m.length),m.charCodeAt(0)==43)?(sv(1,m.length+1),m.substr(1)):m)));case 40:return e3e((UN(),t));case 42:return U0e((UN(),t));case 43:return U0e(t);case 44:return t==null?null:new ru((h=EN(t,!0),h.length>0&&(sv(0,h.length),h.charCodeAt(0)==43)?(sv(1,h.length+1),h.substr(1)):h));case 45:return t==null?null:new ru((g=EN(t,!0),g.length>0&&(sv(0,g.length),g.charCodeAt(0)==43)?(sv(1,g.length+1),g.substr(1)):g));case 46:return EN(t,!1);case 47:return kd(uP(this,(UN(),IHt),t));case 59:case 48:return $4e((UN(),t));case 49:return kd(uP(this,(UN(),LHt),t));case 50:return t==null?null:xT(GM((_=EN(t,!0),_.length>0&&(sv(0,_.length),_.charCodeAt(0)==43)?(sv(1,_.length+1),_.substr(1)):_),aW,32767)<<16>>16);case 51:return t==null?null:xT(GM((a=EN(t,!0),a.length>0&&(sv(0,a.length),a.charCodeAt(0)==43)?(sv(1,a.length+1),a.substr(1)):a),aW,32767)<<16>>16);case 53:return kd(uP(this,(UN(),RHt),t));case 55:return t==null?null:xT(GM((o=EN(t,!0),o.length>0&&(sv(0,o.length),o.charCodeAt(0)==43)?(sv(1,o.length+1),o.substr(1)):o),aW,32767)<<16>>16);case 56:return t==null?null:xT(GM((s=EN(t,!0),s.length>0&&(sv(0,s.length),s.charCodeAt(0)==43)?(sv(1,s.length+1),s.substr(1)):s),aW,32767)<<16>>16);case 57:return t==null?null:JD(aP((c=EN(t,!0),c.length>0&&(sv(0,c.length),c.charCodeAt(0)==43)?(sv(1,c.length+1),c.substr(1)):c)));case 58:return t==null?null:JD(aP((l=EN(t,!0),l.length>0&&(sv(0,l.length),l.charCodeAt(0)==43)?(sv(1,l.length+1),l.substr(1)):l)));case 60:return t==null?null:G(GM((n=EN(t,!0),n.length>0&&(sv(0,n.length),n.charCodeAt(0)==43)?(sv(1,n.length+1),n.substr(1)):n),xF,AP));case 61:return t==null?null:G(GM(EN(t,!0),xF,AP));default:throw E(new Fi(YH+e.xe()+XH))}};var BHt,VHt,HHt,UHt;L(TW,`XMLTypeFactoryImpl`,2028),q(594,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1,2044:1,594:1},NFe),Q.N=!1,Q.O=!1;var WHt=!1;L(TW,`XMLTypePackageImpl`,594),q(1961,1,{851:1},$ce),Q.Kk=function(){return Odt(),lUt},L(TW,`XMLTypePackageImpl/1`,1961),q(1970,1,lW,ele),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/10`,1970),q(1971,1,lW,tle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/11`,1971),q(1972,1,lW,nle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/12`,1972),q(1973,1,lW,rle),Q.fk=function(e){return al(e)},Q.gk=function(e){return V(TG,X,345,e,7,1)},L(TW,`XMLTypePackageImpl/13`,1973),q(1974,1,lW,ile),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/14`,1974),q(1975,1,lW,ale),Q.fk=function(e){return j(e,15)},Q.gk=function(e){return V(JW,BL,15,e,0,1)},L(TW,`XMLTypePackageImpl/15`,1975),q(1976,1,lW,ole),Q.fk=function(e){return j(e,15)},Q.gk=function(e){return V(JW,BL,15,e,0,1)},L(TW,`XMLTypePackageImpl/16`,1976),q(1977,1,lW,sle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/17`,1977),q(1978,1,lW,lle),Q.fk=function(e){return j(e,161)},Q.gk=function(e){return V(EG,X,161,e,0,1)},L(TW,`XMLTypePackageImpl/18`,1978),q(1979,1,lW,ule),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/19`,1979),q(1962,1,lW,dle),Q.fk=function(e){return j(e,857)},Q.gk=function(e){return V(_9,FP,857,e,0,1)},L(TW,`XMLTypePackageImpl/2`,1962),q(1980,1,lW,fle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/20`,1980),q(1981,1,lW,ple),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/21`,1981),q(1982,1,lW,mle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/22`,1982),q(1983,1,lW,hle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/23`,1983),q(1984,1,lW,gle),Q.fk=function(e){return j(e,195)},Q.gk=function(e){return V(X9,X,195,e,0,2)},L(TW,`XMLTypePackageImpl/24`,1984),q(1985,1,lW,_le),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/25`,1985),q(1986,1,lW,vle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/26`,1986),q(1987,1,lW,yle),Q.fk=function(e){return j(e,15)},Q.gk=function(e){return V(JW,BL,15,e,0,1)},L(TW,`XMLTypePackageImpl/27`,1987),q(1988,1,lW,ble),Q.fk=function(e){return j(e,15)},Q.gk=function(e){return V(JW,BL,15,e,0,1)},L(TW,`XMLTypePackageImpl/28`,1988),q(1989,1,lW,xle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/29`,1989),q(1963,1,lW,Sle),Q.fk=function(e){return j(e,681)},Q.gk=function(e){return V(v9,FP,2119,e,0,1)},L(TW,`XMLTypePackageImpl/3`,1963),q(1990,1,lW,Cle),Q.fk=function(e){return j(e,17)},Q.gk=function(e){return V(DG,X,17,e,0,1)},L(TW,`XMLTypePackageImpl/30`,1990),q(1991,1,lW,wle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/31`,1991),q(1992,1,lW,Tle),Q.fk=function(e){return j(e,168)},Q.gk=function(e){return V(kG,X,168,e,0,1)},L(TW,`XMLTypePackageImpl/32`,1992),q(1993,1,lW,Ele),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/33`,1993),q(1994,1,lW,Dle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/34`,1994),q(1995,1,lW,Ole),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/35`,1995),q(1996,1,lW,kle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/36`,1996),q(1997,1,lW,Ale),Q.fk=function(e){return j(e,15)},Q.gk=function(e){return V(JW,BL,15,e,0,1)},L(TW,`XMLTypePackageImpl/37`,1997),q(1998,1,lW,jle),Q.fk=function(e){return j(e,15)},Q.gk=function(e){return V(JW,BL,15,e,0,1)},L(TW,`XMLTypePackageImpl/38`,1998),q(1999,1,lW,Mle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/39`,1999),q(1964,1,lW,Nle),Q.fk=function(e){return j(e,682)},Q.gk=function(e){return V(y9,FP,2120,e,0,1)},L(TW,`XMLTypePackageImpl/4`,1964),q(2e3,1,lW,Ple),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/40`,2e3),q(2001,1,lW,Fle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/41`,2001),q(2002,1,lW,Ile),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/42`,2002),q(2003,1,lW,Lle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/43`,2003),q(2004,1,lW,Rle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/44`,2004),q(2005,1,lW,zle),Q.fk=function(e){return j(e,191)},Q.gk=function(e){return V(PG,X,191,e,0,1)},L(TW,`XMLTypePackageImpl/45`,2005),q(2006,1,lW,Ble),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/46`,2006),q(2007,1,lW,Vle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/47`,2007),q(2008,1,lW,Hle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/48`,2008),q(2009,1,lW,Ule),Q.fk=function(e){return j(e,191)},Q.gk=function(e){return V(PG,X,191,e,0,1)},L(TW,`XMLTypePackageImpl/49`,2009),q(1965,1,lW,Wle),Q.fk=function(e){return j(e,683)},Q.gk=function(e){return V(CHt,FP,2121,e,0,1)},L(TW,`XMLTypePackageImpl/5`,1965),q(2010,1,lW,Gle),Q.fk=function(e){return j(e,168)},Q.gk=function(e){return V(kG,X,168,e,0,1)},L(TW,`XMLTypePackageImpl/50`,2010),q(2011,1,lW,Kle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/51`,2011),q(2012,1,lW,qle),Q.fk=function(e){return j(e,17)},Q.gk=function(e){return V(DG,X,17,e,0,1)},L(TW,`XMLTypePackageImpl/52`,2012),q(1966,1,lW,Jle),Q.fk=function(e){return rl(e)},Q.gk=function(e){return V(LG,X,2,e,6,1)},L(TW,`XMLTypePackageImpl/6`,1966),q(1967,1,lW,Yle),Q.fk=function(e){return j(e,195)},Q.gk=function(e){return V(X9,X,195,e,0,2)},L(TW,`XMLTypePackageImpl/7`,1967),q(1968,1,lW,Xle),Q.fk=function(e){return il(e)},Q.gk=function(e){return V(bG,X,485,e,8,1)},L(TW,`XMLTypePackageImpl/8`,1968),q(1969,1,lW,Zle),Q.fk=function(e){return j(e,222)},Q.gk=function(e){return V(xG,X,222,e,0,1)},L(TW,`XMLTypePackageImpl/9`,1969);var A9,j9,M9,N9,$;q(55,63,SF,Ui),L(MW,`RegEx/ParseException`,55),q(836,1,{},Qle),Q.bm=function(e){return en*16)throw E(new Ui(TP((fu(),KCt))));n=n*16+i}while(!0);if(this.a!=125)throw E(new Ui(TP((fu(),qCt))));if(n>NW)throw E(new Ui(TP((fu(),JCt))));e=n}else{if(i=0,this.c!=0||(i=rk(this.a))<0||(n=i,hP(this),this.c!=0||(i=rk(this.a))<0))throw E(new Ui(TP((fu(),jU))));n=n*16+i,e=n}break;case 117:if(r=0,hP(this),this.c!=0||(r=rk(this.a))<0||(t=r,hP(this),this.c!=0||(r=rk(this.a))<0)||(t=t*16+r,hP(this),this.c!=0||(r=rk(this.a))<0)||(t=t*16+r,hP(this),this.c!=0||(r=rk(this.a))<0))throw E(new Ui(TP((fu(),jU))));t=t*16+r,e=t;break;case 118:if(hP(this),this.c!=0||(r=rk(this.a))<0||(t=r,hP(this),this.c!=0||(r=rk(this.a))<0)||(t=t*16+r,hP(this),this.c!=0||(r=rk(this.a))<0)||(t=t*16+r,hP(this),this.c!=0||(r=rk(this.a))<0)||(t=t*16+r,hP(this),this.c!=0||(r=rk(this.a))<0)||(t=t*16+r,hP(this),this.c!=0||(r=rk(this.a))<0))throw E(new Ui(TP((fu(),jU))));if(t=t*16+r,t>NW)throw E(new Ui(TP((fu(),`parser.descappe.4`))));e=t;break;case 65:case 90:case 122:throw E(new Ui(TP((fu(),YCt))))}return e},Q.dm=function(e){var t,n;switch(e){case 100:n=(this.e&32)==32?oP(`Nd`,!0):(xP(),z9);break;case 68:n=(this.e&32)==32?oP(`Nd`,!1):(xP(),QHt);break;case 119:n=(this.e&32)==32?oP(`IsWord`,!0):(xP(),U9);break;case 87:n=(this.e&32)==32?oP(`IsWord`,!1):(xP(),eUt);break;case 115:n=(this.e&32)==32?oP(`IsSpace`,!0):(xP(),H9);break;case 83:n=(this.e&32)==32?oP(`IsSpace`,!1):(xP(),$Ht);break;default:throw E(new yi((t=e,uTt+t.toString(16))))}return n},Q.em=function(e){var t,n,r,i,a,o,s,c,l,u,d,f;for(this.b=1,hP(this),t=null,this.c==0&&this.a==94?(hP(this),e?u=(xP(),xP(),++W9,new pv(5)):(t=(xP(),xP(),++W9,new pv(4)),oM(t,0,NW),u=(++W9,new pv(4)))):u=(xP(),xP(),++W9,new pv(4)),i=!0;(f=this.c)!=1&&!(f==0&&this.a==93&&!i);){if(i=!1,n=this.a,r=!1,f==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:DN(u,this.dm(n)),r=!0;break;case 105:case 73:case 99:case 67:n=this.um(u,n),n<0&&(r=!0);break;case 112:case 80:if(d=Ont(this,n),!d)throw E(new Ui(TP((fu(),OU))));DN(u,d),r=!0;break;default:n=this.cm()}else if(f==20){if(o=fd(this.i,58,this.d),o<0)throw E(new Ui(TP((fu(),RCt))));if(s=!0,mg(this.i,this.d)==94&&(++this.d,s=!1),a=p_(this.i,this.d,o),c=dGe(a,s,(this.e&512)==512),!c)throw E(new Ui(TP((fu(),zCt))));if(DN(u,c),r=!0,o+1>=this.j||mg(this.i,o+1)!=93)throw E(new Ui(TP((fu(),RCt))));this.d=o+2}if(hP(this),!r)if(this.c!=0||this.a!=45)oM(u,n,n);else{if(hP(this),(f=this.c)==1)throw E(new Ui(TP((fu(),kU))));f==0&&this.a==93?(oM(u,n,n),oM(u,45,45)):(l=this.a,f==10&&(l=this.cm()),hP(this),oM(u,n,l))}(this.e&pF)==pF&&this.c==0&&this.a==44&&hP(this)}if(this.c==1)throw E(new Ui(TP((fu(),kU))));return t&&(KN(t,u),u=t),kj(u),FN(u),this.b=0,hP(this),u},Q.fm=function(){for(var e,t,n=this.em(!1),r;(r=this.c)!=7;)if(e=this.a,r==0&&(e==45||e==38)||r==4){if(hP(this),this.c!=9)throw E(new Ui(TP((fu(),UCt))));if(t=this.em(!1),r==4)DN(n,t);else if(e==45)KN(n,t);else if(e==38)iht(n,t);else throw E(new yi(`ASSERT`))}else throw E(new Ui(TP((fu(),WCt))));return hP(this),n},Q.gm=function(){var e=this.a-48,t=(xP(),xP(),++W9,new __(12,null,e));return!this.g&&(this.g=new Yr),Gr(this.g,new Xhe(e)),hP(this),t},Q.hm=function(){return hP(this),xP(),nUt},Q.im=function(){return hP(this),xP(),tUt},Q.jm=function(){throw E(new Ui(TP((fu(),MU))))},Q.km=function(){throw E(new Ui(TP((fu(),MU))))},Q.lm=function(){return hP(this),eQe()},Q.mm=function(){return hP(this),xP(),iUt},Q.nm=function(){return hP(this),xP(),oUt},Q.om=function(){var e;if(this.d>=this.j||((e=mg(this.i,this.d++))&65504)!=64)throw E(new Ui(TP((fu(),PCt))));return hP(this),xP(),xP(),++W9,new zp(0,e-64)},Q.pm=function(){return hP(this),Qdt()},Q.qm=function(){return hP(this),xP(),sUt},Q.rm=function(){var e=(xP(),xP(),++W9,new zp(0,105));return hP(this),e},Q.sm=function(){return hP(this),xP(),aUt},Q.tm=function(){return hP(this),xP(),rUt},Q.um=function(e,t){return this.cm()},Q.vm=function(){return hP(this),xP(),XHt},Q.wm=function(){var e,t,n,r,i;if(this.d+1>=this.j)throw E(new Ui(TP((fu(),jCt))));if(r=-1,t=null,e=mg(this.i,this.d),49<=e&&e<=57){if(r=e-48,!this.g&&(this.g=new Yr),Gr(this.g,new Xhe(r)),++this.d,mg(this.i,this.d)!=41)throw E(new Ui(TP((fu(),DU))));++this.d}else switch(e==63&&--this.d,hP(this),t=Q_t(this),t.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw E(new Ui(TP((fu(),DU))));break;default:throw E(new Ui(TP((fu(),MCt))))}if(hP(this),i=zD(this),n=null,i.e==2){if(i.Pm()!=2)throw E(new Ui(TP((fu(),NCt))));n=i.Lm(1),i=i.Lm(0)}if(this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),xP(),xP(),++W9,new hKe(r,t,i,n)},Q.xm=function(){return hP(this),xP(),ZHt},Q.ym=function(){var e;if(hP(this),e=Em(24,zD(this)),this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),e},Q.zm=function(){var e;if(hP(this),e=Em(20,zD(this)),this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),e},Q.Am=function(){var e;if(hP(this),e=Em(22,zD(this)),this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),e},Q.Bm=function(){var e=0,t,n=0,r,i;for(t=-1;this.d=this.j)throw E(new Ui(TP((fu(),kCt))));if(t==45){for(++this.d;this.d=this.j)throw E(new Ui(TP((fu(),kCt))))}if(t==58){if(++this.d,hP(this),r=YPe(zD(this),e,n),this.c!=7)throw E(new Ui(TP((fu(),DU))));hP(this)}else if(t==41)++this.d,hP(this),r=YPe(zD(this),e,n);else throw E(new Ui(TP((fu(),ACt))));return r},Q.Cm=function(){var e;if(hP(this),e=Em(21,zD(this)),this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),e},Q.Dm=function(){var e;if(hP(this),e=Em(23,zD(this)),this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),e},Q.Em=function(){var e,t;if(hP(this),e=this.f++,t=Dm(zD(this),e),this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),t},Q.Fm=function(){var e;if(hP(this),e=Dm(zD(this),0),this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),e},Q.Gm=function(e){return hP(this),this.c==5?(hP(this),Rp(e,(xP(),xP(),++W9,new Zv(9,e)))):Rp(e,(xP(),xP(),++W9,new Zv(3,e)))},Q.Hm=function(e){var t;return hP(this),t=(xP(),xP(),++W9,new lu(2)),this.c==5?(hP(this),LN(t,B9),LN(t,e)):(LN(t,e),LN(t,B9)),t},Q.Im=function(e){return hP(this),this.c==5?(hP(this),xP(),xP(),++W9,new Zv(9,e)):(xP(),xP(),++W9,new Zv(3,e))},Q.a=0,Q.b=0,Q.c=0,Q.d=0,Q.e=0,Q.f=1,Q.g=null,Q.j=0,L(MW,`RegEx/RegexParser`,836),q(1947,836,{},y_e),Q.bm=function(e){return!1},Q.cm=function(){return Tct(this)},Q.dm=function(e){return KM(e)},Q.em=function(e){return _vt(this)},Q.fm=function(){throw E(new Ui(TP((fu(),MU))))},Q.gm=function(){throw E(new Ui(TP((fu(),MU))))},Q.hm=function(){throw E(new Ui(TP((fu(),MU))))},Q.im=function(){throw E(new Ui(TP((fu(),MU))))},Q.jm=function(){return hP(this),KM(67)},Q.km=function(){return hP(this),KM(73)},Q.lm=function(){throw E(new Ui(TP((fu(),MU))))},Q.mm=function(){throw E(new Ui(TP((fu(),MU))))},Q.nm=function(){throw E(new Ui(TP((fu(),MU))))},Q.om=function(){return hP(this),KM(99)},Q.pm=function(){throw E(new Ui(TP((fu(),MU))))},Q.qm=function(){throw E(new Ui(TP((fu(),MU))))},Q.rm=function(){return hP(this),KM(105)},Q.sm=function(){throw E(new Ui(TP((fu(),MU))))},Q.tm=function(){throw E(new Ui(TP((fu(),MU))))},Q.um=function(e,t){return DN(e,KM(t)),-1},Q.vm=function(){return hP(this),xP(),xP(),++W9,new zp(0,94)},Q.wm=function(){throw E(new Ui(TP((fu(),MU))))},Q.xm=function(){return hP(this),xP(),xP(),++W9,new zp(0,36)},Q.ym=function(){throw E(new Ui(TP((fu(),MU))))},Q.zm=function(){throw E(new Ui(TP((fu(),MU))))},Q.Am=function(){throw E(new Ui(TP((fu(),MU))))},Q.Bm=function(){throw E(new Ui(TP((fu(),MU))))},Q.Cm=function(){throw E(new Ui(TP((fu(),MU))))},Q.Dm=function(){throw E(new Ui(TP((fu(),MU))))},Q.Em=function(){var e;if(hP(this),e=Dm(zD(this),0),this.c!=7)throw E(new Ui(TP((fu(),DU))));return hP(this),e},Q.Fm=function(){throw E(new Ui(TP((fu(),MU))))},Q.Gm=function(e){return hP(this),Rp(e,(xP(),xP(),++W9,new Zv(3,e)))},Q.Hm=function(e){var t;return hP(this),t=(xP(),xP(),++W9,new lu(2)),LN(t,e),LN(t,B9),t},Q.Im=function(e){return hP(this),xP(),xP(),++W9,new Zv(3,e)};var P9=null,F9=null;L(MW,`RegEx/ParserForXMLSchema`,1947),q(122,1,VW,Tr),Q.Jm=function(e){throw E(new yi(`Not supported.`))},Q.Km=function(){return-1},Q.Lm=function(e){return null},Q.Mm=function(){return null},Q.Nm=function(e){},Q.Om=function(e){},Q.Pm=function(){return 0},Q.Ib=function(){return this.Qm(0)},Q.Qm=function(e){return this.e==11?`.`:``},Q.e=0;var GHt,I9,L9,KHt,qHt,R9=null,z9,JHt=null,YHt,B9,V9=null,XHt,ZHt,QHt,$Ht,eUt,tUt,H9,nUt,rUt,iUt,aUt,U9,oUt,sUt,W9=0,cUt=L(MW,`RegEx/Token`,122);q(138,122,{3:1,138:1,122:1},pv),Q.Qm=function(e){var t,n,r;if(this.e==4)if(this==YHt)n=`.`;else if(this==z9)n=`\\d`;else if(this==U9)n=`\\w`;else if(this==H9)n=`\\s`;else{for(r=new $i,r.a+=`[`,t=0;t0&&(r.a+=`,`),this.b[t]===this.b[t+1]?pl(r,uN(this.b[t])):(pl(r,uN(this.b[t])),r.a+=`-`,pl(r,uN(this.b[t+1])));r.a+=`]`,n=r.a}else if(this==QHt)n=`\\D`;else if(this==eUt)n=`\\W`;else if(this==$Ht)n=`\\S`;else{for(r=new $i,r.a+=`[^`,t=0;t0&&(r.a+=`,`),this.b[t]===this.b[t+1]?pl(r,uN(this.b[t])):(pl(r,uN(this.b[t])),r.a+=`-`,pl(r,uN(this.b[t+1])));r.a+=`]`,n=r.a}return n},Q.a=!1,Q.c=!1,L(MW,`RegEx/RangeToken`,138),q(592,1,{592:1},Xhe),Q.a=0,L(MW,`RegEx/RegexParser/ReferencePosition`,592),q(591,1,{3:1,591:1},Rye),Q.Fb=function(e){var t;return e==null||!j(e,591)?!1:(t=P(e,591),ff(this.b,t.b)&&this.a==t.a)},Q.Hb=function(){return jw(this.b+`/`+Xot(this.a))},Q.Ib=function(){return this.c.Qm(this.a)},Q.a=0,L(MW,`RegEx/RegularExpression`,591),q(228,122,VW,zp),Q.Km=function(){return this.a},Q.Qm=function(e){var t,n,r;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:r=`\\`+Xd(this.a&OF);break;case 12:r=`\\f`;break;case 10:r=`\\n`;break;case 13:r=`\\r`;break;case 9:r=`\\t`;break;case 27:r=`\\e`;break;default:this.a>=pI?(n=(t=this.a>>>0,`0`+t.toString(16)),r=`\\v`+p_(n,n.length-6,n.length)):r=``+Xd(this.a&OF)}break;case 8:r=this==XHt||this==ZHt?``+Xd(this.a&OF):`\\`+Xd(this.a&OF);break;default:r=null}return r},Q.a=0,L(MW,`RegEx/Token/CharToken`,228),q(318,122,VW,Zv),Q.Lm=function(e){return this.a},Q.Nm=function(e){this.b=e},Q.Om=function(e){this.c=e},Q.Pm=function(){return 1},Q.Qm=function(e){var t;if(this.e==3)if(this.c<0&&this.b<0)t=this.a.Qm(e)+`*`;else if(this.c==this.b)t=this.a.Qm(e)+`{`+this.c+`}`;else if(this.c>=0&&this.b>=0)t=this.a.Qm(e)+`{`+this.c+`,`+this.b+`}`;else if(this.c>=0&&this.b<0)t=this.a.Qm(e)+`{`+this.c+`,}`;else throw E(new yi(`Token#toString(): CLOSURE `+this.c+PP+this.b));else if(this.c<0&&this.b<0)t=this.a.Qm(e)+`*?`;else if(this.c==this.b)t=this.a.Qm(e)+`{`+this.c+`}?`;else if(this.c>=0&&this.b>=0)t=this.a.Qm(e)+`{`+this.c+`,`+this.b+`}?`;else if(this.c>=0&&this.b<0)t=this.a.Qm(e)+`{`+this.c+`,}?`;else throw E(new yi(`Token#toString(): NONGREEDYCLOSURE `+this.c+PP+this.b));return t},Q.b=0,Q.c=0,L(MW,`RegEx/Token/ClosureToken`,318),q(837,122,VW,Km),Q.Lm=function(e){return e==0?this.a:this.b},Q.Pm=function(){return 2},Q.Qm=function(e){return this.b.e==3&&this.b.Lm(0)==this.a?this.a.Qm(e)+`+`:this.b.e==9&&this.b.Lm(0)==this.a?this.a.Qm(e)+`+?`:this.a.Qm(e)+(``+this.b.Qm(e))},L(MW,`RegEx/Token/ConcatToken`,837),q(1945,122,VW,hKe),Q.Lm=function(e){if(e==0)return this.d;if(e==1)return this.b;throw E(new yi(`Internal Error: `+e))},Q.Pm=function(){return this.b?2:1},Q.Qm=function(e){var t=this.c>0?`(?(`+this.c+`)`:this.a.e==8?`(?(`+this.a+`)`:`(?`+this.a;return this.b?t+=this.d+`|`+this.b+`)`:t+=this.d+`)`,t},Q.c=0,L(MW,`RegEx/Token/ConditionToken`,1945),q(1946,122,VW,Lze),Q.Lm=function(e){return this.b},Q.Pm=function(){return 1},Q.Qm=function(e){return`(?`+(this.a==0?``:Xot(this.a))+(this.c==0?``:Xot(this.c))+`:`+this.b.Qm(e)+`)`},Q.a=0,Q.c=0,L(MW,`RegEx/Token/ModifierToken`,1946),q(838,122,VW,Nh),Q.Lm=function(e){return this.a},Q.Pm=function(){return 1},Q.Qm=function(e){var t=null;switch(this.e){case 6:t=this.b==0?`(?:`+this.a.Qm(e)+`)`:`(`+this.a.Qm(e)+`)`;break;case 20:t=`(?=`+this.a.Qm(e)+`)`;break;case 21:t=`(?!`+this.a.Qm(e)+`)`;break;case 22:t=`(?<=`+this.a.Qm(e)+`)`;break;case 23:t=`(?`+this.a.Qm(e)+`)`}return t},Q.b=0,L(MW,`RegEx/Token/ParenToken`,838),q(530,122,{3:1,122:1,530:1},__),Q.Mm=function(){return this.b},Q.Qm=function(e){return this.e==12?`\\`+this.a:oat(this.b)},Q.a=0,L(MW,`RegEx/Token/StringToken`,530),q(477,122,VW,lu),Q.Jm=function(e){LN(this,e)},Q.Lm=function(e){return P(Rh(this.a,e),122)},Q.Pm=function(){return this.a?this.a.a.c.length:0},Q.Qm=function(e){var t,n,r,i,a;if(this.e==1){if(this.a.a.c.length==2)t=P(Rh(this.a,0),122),n=P(Rh(this.a,1),122),i=n.e==3&&n.Lm(0)==t?t.Qm(e)+`+`:n.e==9&&n.Lm(0)==t?t.Qm(e)+`+?`:t.Qm(e)+(``+n.Qm(e));else{for(a=new $i,r=0;r=this.c.b:this.a<=this.c.b},Q.Sb=function(){return this.b>0},Q.Tb=function(){return this.b},Q.Vb=function(){return this.b-1},Q.Qb=function(){throw E(new Ri(yTt))},Q.a=0,Q.b=0,L(gTt,`ExclusiveRange/RangeIterator`,258);var K9=Jh(VU,`C`),q9=Jh(WU,`I`),J9=Jh(DP,`Z`),Y9=Jh(GU,`J`),X9=Jh(BU,`B`),Z9=Jh(HU,`D`),Q9=Jh(UU,`F`),$9=Jh(KU,`S`),uUt=gp(`org.eclipse.elk.core.labels`,`ILabelManager`),dUt=gp(uU,`DiagnosticChain`),fUt=gp(Lwt,`ResourceSet`),pUt=L(uU,`InvocationTargetException`,null),mUt=(Qi(),mUe),hUt=hUt=e5e;SJe(sge),uJe(`permProps`,[[[`locale`,`default`],[bTt,`gecko1_8`]],[[`locale`,`default`],[bTt,`safari`]]]),hUt(null,`elk`,null)}).call(this)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}],3:[function(e,t,n){function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function i(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function a(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(t){a(n,t);function n(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,n);var a=Object.assign({},t),o=!1;try{e.resolve(`web-worker`),o=!0}catch{}if(t.workerUrl)if(o){var s=e("web-worker");a.workerFactory=function(e){return new s(e)}}else console.warn(`Web worker requested but 'web-worker' package not installed. Consider installing the package or pass your own 'workerFactory' to ELK's constructor. -... Falling back to non-web worker version.`);if(!a.workerFactory){var c=e("./elk-worker.min.js").Worker;a.workerFactory=function(e){return new c(e)}}return i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,a))}return n}(e("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=o,o.default=o},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(e,t,n){t.exports=Worker},{}]},{},[3])(3)})}))(),1),p=r((e,t,{parentById:n})=>{let r=new Set,i=e;if(e===t)return n[e]||`root`;for(;i;){if(r.add(i),i===t)return i;i=n[i]}for(i=t;i;){if(r.has(i))return i;i=n[i]}return`root`},`findCommonAncestor`),m=6;function h(e,{measure:t}){let n=e.config?.elk?.lineHops;if(n===!1)return;let r=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}));d(t.groups.edgePaths,r,{enabled:!0,jumpRadius:m,jumpStyle:n===`gap`?`gap`:`arc`})}r(h,`applyElkLineJumps`);var g={},_={},v={},y={},b=1,x=10,S=r((e,t,n=.5)=>{let r=e.width/2,i=e.height/2,a=e.x-r,o=e.x+r,s=e.y-i,c=e.y+i,l=Math.abs(t.x-a)<=n&&t.y>=s-n&&t.y<=c+n,u=Math.abs(t.x-o)<=n&&t.y>=s-n&&t.y<=c+n,d=Math.abs(t.y-s)<=n&&t.x>=a-n&&t.x<=o+n,f=Math.abs(t.y-c)<=n&&t.x>=a-n&&t.x<=o+n;return l||u||d||f},`onBorder`),ee=r((e,t,n)=>{let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.xMath.abs(r-t.x)*c){let e=n.y{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`),ne=r((e,t,n=x)=>{let r=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y),a=e.width/2,o=e.height/2;if(Math.abs(r-a)0)return{x:e.x+r/a*(a+n),y:e.y+i/a*(a+n)}}return t},`ensureTrulyOutside`),C=r((e,t,n)=>{let r=Math.abs(t.x-e.x){if(!e?.intersect)return null;let r=e.intersect(n);return!r||n.xt.x||n.x>t.x&&r.xee(e,t,C(e,t,n)),`fallbackIntersection`),ae=20,oe=1e-6,se=r((e,t,n)=>{let r=e.intersect?.(n);return r?Math.hypot(n.x-t.x,n.y-t.y)<=Math.hypot(r.x-t.x,r.y-t.y)+1e-9:!1},`insideOutline`),ce=r((e,t,n,i)=>{if(!e?.intersect)return null;let a=i.x-n.x,o=i.y-n.y;if(a===0&&o===0||Math.abs(a)>oe&&Math.abs(o)>oe)return null;let s={x:t.x,y:t.y},c=Math.abs(a)>Math.abs(o),l=r(e=>c?{x:e,y:n.y}:{x:n.x,y:e},`along`),u=c?s.x:s.y,d=c?n.x:n.y;if(!se(e,s,l(u)))return null;if(se(e,s,l(d)))return{...n};for(let t=0;t{let i=ne(t,n);return re(e,t,i)??ie(t,i,r)},`computeNodeIntersection`),ue=r((e,t,n,r=.1)=>{if(!(!n||e.length===0))if(t===`start`)e.length>0&&Math.abs(e[0].x-n.x)0&&Math.abs(e[t].x-n.x)typeof e==`string`?Math.max(o[e]??0,s[e]??0):0,`markerPathOffset`),pe={arrow_open:[`none`,`none`],arrow_cross:[`none`,`arrow_cross`],double_arrow_cross:[`arrow_cross`,`arrow_cross`],arrow_point:[`none`,`arrow_point`],double_arrow_point:[`arrow_point`,`arrow_point`],arrow_circle:[`none`,`arrow_circle`],double_arrow_circle:[`arrow_circle`,`arrow_circle`]},me=12,he=`[top=${me},left=${me},bottom=${me},right=${me}]`,ge=24,_e=24,ve=50,ye=15,be=10,xe={"spacing.baseValue":15,"spacing.nodeNode":15,"elk.aspectRatio":`1.6`,"elk.expandNodes":`true`,"elk.rectpacking.trybox":`true`,"elk.rectpacking.packing.compaction.rowHeightReevaluation":`true`,"elk.rectpacking.packing.compaction.iterations":10,"elk.rectpacking.whiteSpaceElimination.strategy":`EQUAL_BETWEEN_STRUCTURES`,"elk.rectpacking.widthApproximation.strategy":`SCANLINE`},Se=[`nodeSize.constraints`,`nodeSize.minimum`,`elk.algorithm`,`elk.aspectRatio`,`elk.contentAlignment`,`elk.expandNodes`,`elk.padding`,...Object.keys(xe)];function Ce(e){for(let t of Se)delete e[t];e[`spacing.baseValue`]=_e,e[`spacing.nodeNode`]=ve}r(Ce,`clearContainerAlgorithmOptions`);var we=new Set([`elk.layered`,`elk.box`,`elk.rectpacking`,`elk.stress`,`elk.force`,`elk.mrtree`,`elk.radial`,`elk.sporeOverlap`]);function Te(e,t){if(typeof e==`string`){if(!we.has(e)){t?.warn(`Unknown container layout algorithm "${e}". Supported values: ${[...we].join(`, `)}. Falling back to the diagram's layout algorithm.`);return}return e}}r(Te,`resolveContainerAlgorithm`);function Ee(e){switch(e){case`LR`:return`RIGHT`;case`RL`:return`LEFT`;case`TB`:case`TD`:return`DOWN`;case`BT`:return`UP`;default:return`DOWN`}}r(Ee,`dir2ElkDirection`);function De(e){return c(e.shape)?(e.labelData?.width??e.labels?.[0]?.width??0)+(e.padding??0):0}r(De,`groupTitleWidth`);function Oe(e){return c(e.shape)?{"nodeSize.constraints":`[MINIMUM_SIZE, NODE_LABELS]`,"nodeSize.minimum":`(${De(e)}, 0)`}:{}}r(Oe,`groupTitleSizeOptions`);function ke(e,t,n,r){let i=(e.labelData?.width??0)+2*(e.padding??0),a=e.labelData?.height??0,o=Ve(t?.preset),s={...Oe(e),"spacing.baseValue":_e,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"spacing.nodeNode":ve,"elk.padding":`[top=${ge},left=${ge},bottom=${ge},right=${ge}]`,"nodeLabels.placement":`[H_CENTER V_TOP, INSIDE]`,"elk.layered.mergeEdges":t?.mergeEdges,"elk.layered.nodePlacement.bk.fixedAlignment":t?.nodePlacementAlignment??o.alignment,"elk.layered.nodePlacement.strategy":t?.nodePlacementStrategy??o.containerPlacement,"elk.layered.cycleBreaking.strategy":t?.cycleBreakingStrategy??o.cycleBreaking,"elk.layered.nodePlacement.networkSimplex.nodeFlexibility":`PORT_POSITION`,"elk.spacing.portsSurrounding":he},c=Te(e.metadata?.algorithm,r);if(c){let e=a+ye;if(s[`nodeSize.constraints`]=`[MINIMUM_SIZE, NODE_LABELS]`,s[`nodeSize.minimum`]=`(${i}, ${e+ye})`,s[`elk.algorithm`]=c,s[`elk.hierarchyHandling`]=`SEPARATE_CHILDREN`,s[`elk.aspectRatio`]=`2.0`,s[`elk.contentAlignment`]=`H_CENTER V_TOP`,s[`elk.expandNodes`]=`true`,s[`elk.padding`]=`[top=${e},left=${ye},bottom=${ye},right=${ye}]`,c===`elk.rectpacking`){let e=a+be;Object.assign(s,xe,{"elk.padding":`[top=${e},left=${be},bottom=${be},right=${be}]`,"nodeSize.minimum":`(${i}, ${e+be})`})}}else e.dir&&(s[`elk.algorithm`]=n,s[`elk.direction`]=Ee(e.dir),s[`elk.hierarchyHandling`]=`SEPARATE_CHILDREN`);return Object.assign(s,y),s}r(ke,`buildSubgraphLayoutOptions`);function Ae(e,t){let n=new Set,i=new Map;for(let{id:t,parentId:n}of e){let e=i.get(n);e?e.push(t):i.set(n,[t])}for(let e of i.values()){let i=new Set(e),a=new Map(e.map(e=>[e,0])),o=new Map(e.map(e=>[e,[]])),s=[];for(let e of t){let t=e.source==null?void 0:String(e.source),n=e.target==null?void 0:String(e.target);!t||!n||t===n||!i.has(t)||!i.has(n)||(a.set(n,(a.get(n)??0)+1),o.get(t).push(n),o.get(n).push(t),s.push([t,n]))}let c=new Map,l=0;for(let t of e){if(c.has(t))continue;let e=[t];for(c.set(t,l);e.length>0;){let t=e.pop();for(let n of o.get(t))c.has(n)||(c.set(n,l),e.push(n))}l++}let u=Array(l).fill(!1);for(let t of e)(a.get(t)??0)===0&&(u[c.get(t)]=!0);if(!u.includes(!1))continue;let d=new Map(e.map(e=>[e,[]])),f=new Map(e.map(e=>[e,0])),p=r((e,t)=>{let n=new Set([e]),r=[e];for(;r.length>0;){let e=r.pop();if(e===t)return!0;for(let t of d.get(e))n.has(t)||(n.add(t),r.push(t))}return!1},`reaches`);for(let[e,t]of s)p(t,e)||(d.get(e).push(t),f.set(t,(f.get(t)??0)+1));let m=Array(l).fill(!1);for(let t of e){let e=c.get(t);!u[e]&&!m[e]&&f.get(t)===0&&(n.add(t),m[e]=!0)}}return n}r(Ae,`findCyclicEntryNodes`);function je(e,t){if(!e.config.elk?.keepEntryNodeOnTop)return;let n=Ae(e.nodes,e.edges.map(e=>({source:e.start,target:e.end})));for(let e of n){let n=t[e];n&&(n.layoutOptions={...n.layoutOptions,"elk.layered.layering.layerConstraint":`FIRST`})}}r(je,`applyCyclicEntryConstraint`);function Me(e,t){let n=ze(t);return Ie(n),Tt(e,n),{algorithm:n.algorithm}}r(Me,`prepareLayoutForElk`);async function Ne(e,t){let n=ze(t),r=Pe(e,n),i=new f.default;n.log.info(`Drawing flowchart using v4 renderer`,i);let a=await $e(i,r.elkGraph,n.log);return et(e,a,r,n.log),Le(e.nodes),a}r(Ne,`runElkLayoutCore`);function Pe(e,t){let n={},r=He(e,t.algorithm,t.rootLayoutOptions),i=e.direction??`DOWN`;r.layoutOptions[`elk.direction`]=Ee(i);let a=Ue(e.nodes,t.log);return We(e.nodes,r,n,t),Je(e,r,n,t),Xe(e,n,a,t),Ze(r,n,a,t.log),je(e,n),{elkGraph:r,nodeDb:n,parentLookupDb:a}}r(Pe,`buildElkGraphFromLayoutData`);var Fe=u({afterPaint:h,prepareLayout:Me,measureLayout:r((e,t)=>l(e,t,{unwrapGroupLabels:!0}),`measureLayout`),runLayoutCore:Ne,paintOptions:{skipIntersect:!0}});function Ie(e){i(e.getConfig())}r(Ie,`syncHostConfig`);function Le(e){let t=new Map(e.map(e=>[e.id,e]));e.sort((e,n)=>e.isGroup===n.isGroup?e.isGroup&&n.isGroup?Re(e,t)-Re(n,t):0:e.isGroup?-1:1)}r(Le,`orderNodesForElkPaint`);function Re(e,t){let n=0,r=new Set,i=e.parentId;for(;i&&!r.has(i);){r.add(i);let e=t.get(i);if(!e?.isGroup)break;n++,i=e.parentId}return n}r(Re,`getGroupDepth`);function ze(e){let t=e.helpers;if(!t)throw Error(`ELK layout requires Mermaid internal helpers`);return{algorithm:e.preparedLayout?.algorithm??e.options?.algorithm,rootLayoutOptions:e.options?.rootLayoutOptions,common:t.common,getConfig:t.getConfig,interpolateToCurve:t.interpolateToCurve,log:t.log}}r(ze,`getElkLayoutContext`);var Be={default:{layering:`NETWORK_SIMPLEX`,placement:`BRANDES_KOEPF`,containerPlacement:`BRANDES_KOEPF`,alignment:`BALANCED`,cycleBreaking:`DEPTH_FIRST`},legacy:{layering:`NETWORK_SIMPLEX`,placement:`BRANDES_KOEPF`,containerPlacement:`BRANDES_KOEPF`,alignment:`NONE`,cycleBreaking:`GREEDY`},modelOrder:{layering:`NETWORK_SIMPLEX`,placement:`NETWORK_SIMPLEX`,containerPlacement:`BRANDES_KOEPF`,alignment:`NONE`,cycleBreaking:`GREEDY_MODEL_ORDER`},depthFirst:{layering:`NETWORK_SIMPLEX`,placement:`NETWORK_SIMPLEX`,containerPlacement:`BRANDES_KOEPF`,alignment:`NONE`,cycleBreaking:`DEPTH_FIRST`}};function Ve(e){return e!==void 0&&Object.hasOwn(Be,e)?Be[e]:Be.default}r(Ve,`resolveElkPreset`);function He(e,t,n){let r=Ve(e.config.elk?.preset),i={id:`root`,layoutOptions:{"elk.hierarchyHandling":`INCLUDE_CHILDREN`,"elk.algorithm":t,"elk.layered.nodePlacement.strategy":e.config.elk?.nodePlacementStrategy??r.placement,"elk.layered.nodePlacement.bk.fixedAlignment":e.config.elk?.nodePlacementAlignment??r.alignment,"elk.layered.mergeEdges":e.config.elk?.mergeEdges,"elk.direction":`DOWN`,"spacing.baseValue":40,"elk.layered.crossingMinimization.forceNodeModelOrder":e.config.elk?.forceNodeModelOrder,"elk.layered.considerModelOrder.strategy":e.config.elk?.considerModelOrder,"elk.layered.unnecessaryBendpoints":!0,"elk.layered.cycleBreaking.strategy":e.config.elk?.cycleBreakingStrategy??r.cycleBreaking,"elk.layered.layering.strategy":e.config.elk?.layeringStrategy??r.layering,"elk.layered.layering.coffmanGraham.layerBound":e.config.elk?.layeringLayerBound,"elk.layered.wrapping.multiEdge.improveCuts":!0,"elk.layered.wrapping.multiEdge.improveWrappedEdges":!0,"elk.layered.edgeRouting.selfLoopDistribution":`EQUALLY`,"elk.layered.mergeHierarchyEdges":!0,"elk.spacing.portsSurrounding":he},children:[],edges:[]};return t===`elk.rectpacking`&&Object.assign(i.layoutOptions,xe,{"elk.contentAlignment":`H_CENTER V_TOP`,"elk.padding":`[top=15,left=15,bottom=15,right=15]`}),n&&Object.assign(i.layoutOptions,n),Object.assign(i.layoutOptions,g,_,v),i}r(He,`createRootElkGraph`);function Ue(e,t){let n={parentById:{},childrenById:{}},r=e.filter(e=>e.isGroup);return t.info(`Subgraphs - `,r),r.forEach(t=>{e.filter(e=>e.parentId===t.id).forEach(e=>{n.parentById[e.id]=t.id,n.childrenById[t.id]??=[],n.childrenById[t.id].push(e.id)})}),n}r(Ue,`addSubGraphs`);function We(e,t,n,r,i){let a=e.filter(e=>e?.parentId===i);return r.log.info(`addVertices APA12`,a,i),a.forEach(i=>{Ge(t,e,i,n,r)}),t}r(We,`addVertices`);function Ge(e,t,n,r,i){let a=Ke(n);e.children.push(a),r[n.id]=a,n.isGroup&&(a.children=[],We(t,a,r,i,n.id),a.labelData=qe(n,i.getConfig()))}r(Ge,`addVertex`);function Ke(e){let t={...e};return delete t.domId,e.isGroup?t.children=[]:(t.width=e.width??0,t.height=e.height??0,e.spreadPorts&&(t.layoutOptions={...t.layoutOptions,"elk.portAlignment.default":`CENTER`})),t}r(Ke,`createElkNode`);function qe(e,t){return e.labelData||(e.labelBBox?{width:e.labelBBox.width,height:Math.max(0,e.labelBBox.height-2),wrappingWidth:e.wrappingWidth??t.flowchart?.wrappingWidth}:{width:0,height:0,wrappingWidth:e.wrappingWidth??t.flowchart?.wrappingWidth})}r(qe,`getMeasuredLabelData`);function Je(e,t,n,r){r.log.info(`abc78 DAGA edges = `,e);let i={};return e.edges.forEach(e=>{let a=e.id;i[a]=(i[a]??-1)+1;let o=a;e.id=o,r.log.info(`abc78 new link id to be used is`,a,o,i[a]);let{source:s,target:c,sourceId:l,targetId:u}=Ye(e,n);r.log.debug(`abc78 source and target`,s,c),t.edges.push({...e,sources:[s],targets:[c],sourceId:l,targetId:u,labels:[{width:e.width??0,height:e.height??0,orgWidth:e.width??0,orgHeight:e.height??0,text:e.label??``,layoutOptions:{"edgeLabels.inline":`true`,"edgeLabels.placement":`CENTER`}}]})}),t}r(Je,`addEdgesToElkGraph`);function Ye(e,t){let n=e.start,r=e.end,i=n,a=r,o=n?t[n]:void 0,s=r?t[r]:void 0;return!o||!s?{source:i,target:a}:{source:i,target:a,sourceId:n,targetId:r}}r(Ye,`getEdgeStartEndPoint`);function Xe(e,t,n,r){e.nodes.forEach(i=>{let a=t[i.id];!a||n.childrenById[a.id]===void 0||(a.labels=[{text:a.label,width:a?.labelData?.width??50,height:a?.labelData?.height??50}],r.log.debug(`UIO node label`,a?.labelData?.width,a.padding),a.layoutOptions=ke(a,e.config.elk,r.algorithm,r.log),delete a.x,delete a.y,delete a.width,delete a.height)})}r(Xe,`configureSubgraphNodes`);function Ze(e,t,n,r){r.debug(`APA01 processing edges, count:`,e.edges.length),e.edges.forEach((e,i)=>{r.debug(`APA01 processing edge`,i,`:`,e);let a=e.sources[0],o=e.targets[0];if(r.debug(`APA01 source:`,a,`target:`,o),r.debug(`APA01 nodeDb[source]:`,t[a]),r.debug(`APA01 nodeDb[target]:`,t[o]),t[a]&&t[o]&&t[a].parentId!==t[o].parentId){let e=p(a,o,n);Qe(t,a,e,r),Qe(t,o,e,r)}})}r(Ze,`configureCrossHierarchyEdges`);function Qe(e,t,n,r){let i=e[t];i&&(i.layoutOptions??={},i.layoutOptions[`elk.hierarchyHandling`]===`SEPARATE_CHILDREN`&&Te(i.metadata?.algorithm)&&(r.debug(`Dropping explicit algorithm for node`,i.id,`due to cross-boundary edges`),Ce(i.layoutOptions),Object.assign(i.layoutOptions,Oe(i))),i.layoutOptions[`elk.hierarchyHandling`]=`INCLUDE_CHILDREN`,i.id!==n&&i.parentId&&Qe(e,i.parentId,n,r))}r(Qe,`setIncludeChildrenPolicy`);async function $e(e,t,n){let r=globalThis.__mermaidProfiler;try{r?.begin(`layoutCore`);let i;try{i=await e.layout(t)}finally{r?.end()}return n.debug(`APA01 after - success`),n.debug(`APA01 layout result:`,i),i}catch(e){throw n.error(`ELK layout error:`,e),e}}r($e,`runElkLayout`);function et(e,t,n,r){let i=new Map(e.nodes.map(e=>[e.id,e]));it(t.children??[],n,i,0,0,0,r),rt(t.children??[],n,i,t),mt(e,t,n,r)}r(et,`applyElkLayoutResult`);function tt(e,t=new Set){for(let n of e.children??[])t.add(n.id),tt(n,t);return t}r(tt,`collectDescendantIds`);function nt(e,t,n,r){let i=[];for(let a of e.edges??[]){let e=a.sources?.[0]??a.start,o=a.targets?.[0]??a.end,s=t.has(e)&&t.has(o),c=e===r,l=o===r;if(!s&&!c&&!l)continue;let u=_t(e,o,n.parentLookupDb,n.nodeDb);for(let e of a.sections??[]){let t=s?[e.startPoint,...e.bendPoints??[],e.endPoint]:[c?e.startPoint:null,l?e.endPoint:null];for(let e of t)e&&i.push({x:e.x+u.x,y:e.y+u.y})}}return i}r(nt,`internalEdgePoints`);function rt(e,t,n,r={}){for(let i of e){if(!i?.isGroup)continue;let e=i.children??[];rt(e,t,n,r);let a=t.nodeDb[i.id],o=e.map(e=>t.nodeDb[e.id]).filter(e=>e?.offset&&e.width&&e.height);if(!a?.offset||o.length===0)continue;let s=nt(r,tt(i),t,i.id),c=[...o.map(e=>e.offset.posX),...o.map(e=>e.offset.posX+e.width),...s.map(e=>e.x)],l=[...o.map(e=>e.offset.posY),...o.map(e=>e.offset.posY+e.height),...s.map(e=>e.y)],u=a.offset,d=Math.max(u.posX,Math.min(...c)-ge),f=Math.min(u.posX+a.width,Math.max(...c)+ge),p=Math.min(u.posY+a.height,Math.max(...l)+ge),m=u.posY,h=De(i),g=d,_=f-d;if(_{if(!e)return;let s=t.nodeDb[e.id]??e,c=Math.max(e.width,e.labels&&e.labels[0]?.width||0),l={posX:e.x+r,posY:e.y+i,x:r,y:i,depth:a,width:c,height:e.height};s.offset=l,s.x=l.posX+e.width/2,s.y=l.posY+e.height/2,s.width=e.width,s.height=e.height;let u=n.get(e.id);if(u){u.x=s.x,u.y=s.y,u.width=e.isGroup?Math.max(e.width,e.labelData?.width??0):e.width,u.height=e.height;let t=u;t.labelData=e.labelData,t.labels=e.labels}e.isGroup?(o.debug(`Id abc88 subgraph = `,e.id,e.x,e.y,e.labelData),it(e.children??[],t,n,l.posX,l.posY,a+1,o)):o.info(`Id NODE = `,e.id,e.x,e.y,r,i,`translate(${s.x}, ${s.y})`)})}r(it,`applyElkNodePositions`);var at=16,ot=30,st=.01;function ct(e,t){let n=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y);if(n>st&&r<=st)return`h`;if(r>st&&n<=st)return`v`}r(ct,`axisOf`);function lt(e){let t=ut(e)??e,n=ut([...t].reverse());return n&&(t=n.reverse()),t}r(lt,`straightenTerminalJogs`);function ut(e){if(e.length<5)return null;let[t,n,r,i]=e,a=ct(t,n);if(!a||ct(r,i)!==a||ct(n,r)!==(a===`h`?`v`:`h`)||Math.hypot(n.x-t.x,n.y-t.y)>ot)return null;let o=Math.abs(a===`h`?r.y-n.y:r.x-n.x);if(oat||!(a===`h`?Math.sign(n.x-t.x)===Math.sign(i.x-r.x):Math.sign(n.y-t.y)===Math.sign(i.y-r.y)))return null;let s=3;for(;s+1(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),`side`),o=a(n,i,e),s=a(n,i,t),c=a(e,t,n),l=a(e,t,i);return(o>0&&s<0||o<0&&s>0)&&(c>0&&l<0||c<0&&l>0)}r(dt,`segmentsCrossStrict`);function ft(e,t){let n=0;for(let r=0;re.points??[]);for(let[n,r]of e.entries()){let e=t[n];if(e.length<5)continue;let i=lt(e);if(i===e)continue;let a=0,o=0;for(let[r,s]of t.entries())r===n||s.length<2||(a+=ft(e,s),o+=ft(i,s));o>a||(r.points=i,t[n]=i)}}r(pt,`straightenEdgeTerminals`);function mt(e,t,n,i){let a=new Map(e.edges.map(e=>[e.id,e])),o=e.config.elk?.straightenEdges!==!1,s=new Map(e.nodes.map(e=>[e.id,e])),c=new Set;t.edges?.forEach(e=>{if(!e.sections?.length)return;let t=n.nodeDb[e.sources?.[0]??e.start],r=n.nodeDb[e.targets?.[0]??e.end];if(!t||!r)return;let i=_t(e.start??e.sourceId??e.sources?.[0],e.end??e.targetId??e.targets?.[0],n.parentLookupDb,n.nodeDb),a=e.sections[0];t.shape!==`rect33`&&ht(t,{x:a.startPoint.x+i.x,y:a.startPoint.y+i.y},s,c),r.shape!==`rect33`&&ht(r,{x:a.endPoint.x+i.x,y:a.endPoint.y+i.y},s,c)}),t.edges?.forEach(e=>{let t=a.get(e.id);if(!t)return;let o=e.sources?.[0]??e.start,s=e.targets?.[0]??e.end,c=n.nodeDb[o],l=n.nodeDb[s];if(!c||!l)return;if(!e.sections?.length){let n=r(e=>({x:(e.offset?.posX??e.x??0)+(e.width??0)/2,y:(e.offset?.posY??e.y??0)+(e.height??0)/2}),`centre`),a=n(c),o=n(l);c.x=a.x,c.y=a.y,l.x=o.x,l.y=o.y;let s=vt([a,o],c,l,i);t.points=s,t.curve=`linear`;let u=s[0],d=s[s.length-1];t.x=(u.x+d.x)/2,t.y=(u.y+d.y)/2,i.debug(`APA18 no edge sections, using a straight line`,e.id,t.points);return}let u=e.start??e.sourceId??o,d=e.end??e.targetId??s,f=_t(u,d,n.parentLookupDb,n.nodeDb);i.debug(`APA18 offset`,f,u,` ==> `,d,`edge:`,e,c);let p=e.sections[0],m=gt(p,f);c.x=c.offset.posX+c.width/2,c.y=c.offset.posY+c.height/2,l.x=l.offset.posX+l.width/2,l.y=l.offset.posY+l.height/2,c.shape!==`rect33`&&m.unshift({x:c.x,y:c.y}),l.shape!==`rect33`&&m.push({x:l.x,y:l.y}),t.points=Ct(wt(vt(m,c,l,i),jt(l),xt(t),i),jt(c),St(t),i),t.curve=`rounded`;let h=e.labels?.[0];h&&(t.x=h.x+f.x+h.width/2,t.y=h.y+f.y+h.height/2)}),o&&pt(e.edges)}r(mt,`applyElkEdgeLayout`);function ht(e,t,n,r){let i=e.width??0,a=e.height??0,o=e.offset.posY,s=o+a,c=.5,l=Math.abs(t.y-o)<=c||Math.abs(t.y-s)<=c;if((l?i:a)>=2*me||r.has(e.id))return;r.add(e.id);let u=l?t.x-(e.offset.posX+i/2):t.y-(e.offset.posY+a/2);if(Math.abs(u)<.01)return;l?(e.offset.posX+=u,e.x=e.offset.posX+i/2):(e.offset.posY+=u,e.y=e.offset.posY+a/2);let d=n.get(e.id);d&&(d.x=e.offset.posX+i/2,d.y=e.offset.posY+a/2)}r(ht,`alignDegenerateNodeToAnchor`);function gt(e,t){let n=e.startPoint,r=e.endPoint,i=(e.bendPoints?e.bendPoints:[]).map(e=>({x:e.x+t.x,y:e.y+t.y}));return[{x:n.x+t.x,y:n.y+t.y},...i,{x:r.x+t.x,y:r.y+t.y}]}r(gt,`createEdgePointsFromSection`);function _t(e,t,n,r){let i=p(e,t,n);if(i===void 0||i===`root`)return{x:0,y:0};let a=r[i],o=a?.elkOrigin??a?.offset;return{x:o?.posX??0,y:o?.posY??0}}r(_t,`calcOffset`);function vt(e,t,n,r){let i=Array.isArray(e)?[...e]:[],a=jt(n);r.debug(`PPP cutter2: Points before cutter2:`,JSON.stringify(e),`endBounds:`,a,S(a,e[e.length-1]));let o;{let e=jt(t),a=jt(n),s=!!t?.isGroup,c=!!n?.isGroup,{candidate:l,centerApprox:u}=Pt(i,t,`start`),{candidate:d,centerApprox:f}=Pt(i,n,`end`),p=s&&S(e,l),m=c&&S(a,d);Ft(i,`start`,p&&u),Ft(i,`end`,m&&f),s&&!p&&(p=It(i,e,`start`)),c&&!m&&(m=It(i,a,`end`)),p||m?(p||Lt(i,t,e,r),m||Rt(i,n,a,r),r.debug(`PPP cutter2: skipping cutter2 due to on-border group endpoint(s)`,{skipStart:p,skipEnd:m,startCenterApprox:u,endCenterApprox:f,startCandidate:l,endCandidate:d}),o=i):o=Bt(t,n,i,r)}if(r.debug(`PPP cutter2: Points after cutter2:`,JSON.stringify(o)),!Array.isArray(o)||o.length<2||yt(o)){r.warn(`POI cutter2: Invalid points from cutter2, falling back to prevPoints`,o);let e=i.filter(e=>Number.isFinite(e?.x)&&Number.isFinite(e?.y));o=e.length>=2?e:i}return r.debug(`UIO cutter2: Points after cutter2 (sanitized):`,o),bt(o,r)}r(vt,`sanitizeElkEdgePoints`);function yt(e){return e?.some(e=>!Number.isFinite(e?.x)||!Number.isFinite(e?.y))}r(yt,`hasInvalidPoint`);function bt(e,t){let n=e.filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return Math.abs(e.x-r.x)>1e-6||Math.abs(e.y-r.y)>1e-6});return n.length!==e.length&&t.debug(`UIO cutter2: removed consecutive duplicate points`,{before:e,after:n}),n}r(bt,`dedupeConsecutivePoints`);function xt(e){return fe(e.arrowTypeEnd)}r(xt,`getEndMarkerPathOffset`);function St(e){return fe(e.arrowTypeStart)}r(St,`getStartMarkerPathOffset`);function Ct(e,t,n,r){if(n<=0||e.length<3)return e;let i=e[0],a=e[1],o=Math.hypot(a.x-i.x,a.y-i.y);if(o>=Math.max(de,n*2)||!S(t,a,1))return e;let s=[i,...e.slice(2)];return r.debug(`UIO cutter2: removed short start marker segment`,{before:e,after:s,markerOffset:n,segmentLength:o}),s}r(Ct,`ensureStartMarkerSegmentLength`);function wt(e,t,n,r){if(n<=0||e.length<3)return e;let i=e[e.length-1],a=e[e.length-2],o=Math.hypot(i.x-a.x,i.y-a.y);if(o>=Math.max(de,n*2)||!S(t,a,1))return e;let s=[...e.slice(0,-2),i];return r.debug(`UIO cutter2: removed short end marker segment`,{before:e,after:s,markerOffset:n,segmentLength:o}),s}r(wt,`ensureEndMarkerSegmentLength`);function Tt(e,t){let n=e.edges.defaultInterpolate,r=e.edges.defaultStyle,i=t.getConfig();e.edges.forEach(e=>{let a=kt(e,{defaultStyle:r,defaultInterpolate:n,confCurve:i.curve},t);Object.assign(e,a)})}r(Tt,`applyElkEdgeRenderData`);function Et(e){if(e.classes!==void 0)return e.classes;if(e.start&&e.end)return`flowchart-link LS_${e.start} LE_${e.end}`}r(Et,`buildFallbackEdgeClasses`);function Dt(e,t,n){let r=`normal`,i=`solid`,a=[],o=[];return e===`dotted`?(i=`dotted`,a=[`fill:none`,`stroke-width:2px`,`stroke-dasharray:3`]):e===`thick`?(r=`thick`,a=[`stroke-width: 3.5px`,`fill:none`]):(a=t??[`fill:none`],n!==void 0&&(o=n)),{thickness:r,pattern:i,style:a,labelStyle:o}}r(Dt,`computeStroke`);function Ot(e,t,n){return e===void 0?t===void 0?n:t:e}r(Ot,`getCurve`);function kt(e,t,n){let r={};r.minlen=e.minlen??e.length??1,r.text=e.text??e.label,r.arrowhead=e.arrowhead??(e.type===`arrow_open`?`none`:`normal`);let i=pe[e.type??`arrow_open`]??pe.arrow_open;r.arrowTypeStart=e.arrowTypeStart??i[0],r.arrowTypeEnd=e.arrowTypeEnd??i[1],r.startLabelRight=e.startLabelRight,r.endLabelLeft=e.endLabelLeft;let o=Dt(e.stroke,t.defaultStyle,t.defaultLabelStyle);r.thickness=e.thickness??o.thickness,r.pattern=e.pattern??o.pattern,r.style=e.style??o.style,r.labelStyle=e.labelStyle??o.labelStyle,r.classes=Et(e),r.curve=n.interpolateToCurve(Ot(e.curve??e.interpolate,t.defaultInterpolate,t.confCurve),a);let s=(r.text??``)!==``;return e.arrowheadStyle===void 0?(s||e.style!==void 0)&&(r.arrowheadStyle=`fill: #333`):r.arrowheadStyle=e.arrowheadStyle,r.labelpos=e.labelpos??(s?`c`:void 0),r.labelType=e.labelType,r.label=(e.label??r.text??``).replace(n.common.lineBreakRegex,` +... Falling back to non-web worker version.`);if(!a.workerFactory){var c=e("./elk-worker.min.js").Worker;a.workerFactory=function(e){return new c(e)}}return i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,a))}return n}(e("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=o,o.default=o},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(e,t,n){t.exports=Worker},{}]},{},[3])(3)})}))(),1),p=r((e,t,{parentById:n})=>{let r=new Set,i=e;if(e===t)return n[e]||`root`;for(;i;){if(r.add(i),i===t)return i;i=n[i]}for(i=t;i;){if(r.has(i))return i;i=n[i]}return`root`},`findCommonAncestor`),m=6;function h(e,{measure:t}){let n=e.config?.elk?.lineHops;if(n===!1)return;let r=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}));d(t.groups.edgePaths,r,{enabled:!0,jumpRadius:m,jumpStyle:n===`gap`?`gap`:`arc`})}r(h,`applyElkLineJumps`);var g={},_={},v={},y={},b=1,x=10,S=r((e,t,n=.5)=>{let r=e.width/2,i=e.height/2,a=e.x-r,o=e.x+r,s=e.y-i,c=e.y+i,l=Math.abs(t.x-a)<=n&&t.y>=s-n&&t.y<=c+n,u=Math.abs(t.x-o)<=n&&t.y>=s-n&&t.y<=c+n,d=Math.abs(t.y-s)<=n&&t.x>=a-n&&t.x<=o+n,f=Math.abs(t.y-c)<=n&&t.x>=a-n&&t.x<=o+n;return l||u||d||f},`onBorder`),ee=r((e,t,n)=>{let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.xMath.abs(r-t.x)*c){let e=n.y{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`),ne=r((e,t,n=x)=>{let r=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y),a=e.width/2,o=e.height/2;if(Math.abs(r-a)0)return{x:e.x+r/a*(a+n),y:e.y+i/a*(a+n)}}return t},`ensureTrulyOutside`),C=r((e,t,n)=>{let r=Math.abs(t.x-e.x){if(!e?.intersect)return null;let r=e.intersect(n);return!r||n.xt.x||n.x>t.x&&r.xee(e,t,C(e,t,n)),`fallbackIntersection`),ae=20,oe=1e-6,se=r((e,t,n)=>{let r=e.intersect?.(n);return r?Math.hypot(n.x-t.x,n.y-t.y)<=Math.hypot(r.x-t.x,r.y-t.y)+1e-9:!1},`insideOutline`),ce=r((e,t,n,i)=>{if(!e?.intersect)return null;let a=i.x-n.x,o=i.y-n.y;if(a===0&&o===0||Math.abs(a)>oe&&Math.abs(o)>oe)return null;let s={x:t.x,y:t.y},c=Math.abs(a)>Math.abs(o),l=r(e=>c?{x:e,y:n.y}:{x:n.x,y:e},`along`),u=c?s.x:s.y,d=c?n.x:n.y;if(!se(e,s,l(u)))return null;if(se(e,s,l(d)))return{...n};for(let t=0;t{let i=ne(t,n);return re(e,t,i)??ie(t,i,r)},`computeNodeIntersection`),ue=r((e,t,n,r=.1)=>{if(!(!n||e.length===0))if(t===`start`)e.length>0&&Math.abs(e[0].x-n.x)0&&Math.abs(e[t].x-n.x)typeof e==`string`?Math.max(s[e]??0,c[e]??0):0,`markerPathOffset`),pe={arrow_open:[`none`,`none`],arrow_cross:[`none`,`arrow_cross`],double_arrow_cross:[`arrow_cross`,`arrow_cross`],arrow_point:[`none`,`arrow_point`],double_arrow_point:[`arrow_point`,`arrow_point`],arrow_circle:[`none`,`arrow_circle`],double_arrow_circle:[`arrow_circle`,`arrow_circle`]},me=12,he=`[top=${me},left=${me},bottom=${me},right=${me}]`,ge=24,_e=24,ve=50,ye=15,be=10,xe={"spacing.baseValue":15,"spacing.nodeNode":15,"elk.aspectRatio":`1.6`,"elk.expandNodes":`true`,"elk.rectpacking.trybox":`true`,"elk.rectpacking.packing.compaction.rowHeightReevaluation":`true`,"elk.rectpacking.packing.compaction.iterations":10,"elk.rectpacking.whiteSpaceElimination.strategy":`EQUAL_BETWEEN_STRUCTURES`,"elk.rectpacking.widthApproximation.strategy":`SCANLINE`},Se=[`nodeSize.constraints`,`nodeSize.minimum`,`elk.algorithm`,`elk.aspectRatio`,`elk.contentAlignment`,`elk.expandNodes`,`elk.padding`,...Object.keys(xe)];function Ce(e){for(let t of Se)delete e[t];e[`spacing.baseValue`]=_e,e[`spacing.nodeNode`]=ve}r(Ce,`clearContainerAlgorithmOptions`);var we=new Set([`elk.layered`,`elk.box`,`elk.rectpacking`,`elk.stress`,`elk.force`,`elk.mrtree`,`elk.radial`,`elk.sporeOverlap`]);function Te(e,t){if(typeof e==`string`){if(!we.has(e)){t?.warn(`Unknown container layout algorithm "${e}". Supported values: ${[...we].join(`, `)}. Falling back to the diagram's layout algorithm.`);return}return e}}r(Te,`resolveContainerAlgorithm`);function Ee(e){switch(e){case`LR`:return`RIGHT`;case`RL`:return`LEFT`;case`TB`:case`TD`:return`DOWN`;case`BT`:return`UP`;default:return`DOWN`}}r(Ee,`dir2ElkDirection`);function De(e){return o(e.shape)?(e.labelData?.width??e.labels?.[0]?.width??0)+(e.padding??0):0}r(De,`groupTitleWidth`);function Oe(e){return o(e.shape)?{"nodeSize.constraints":`[MINIMUM_SIZE, NODE_LABELS]`,"nodeSize.minimum":`(${De(e)}, 0)`}:{}}r(Oe,`groupTitleSizeOptions`);function ke(e,t,n,r){let i=(e.labelData?.width??0)+2*(e.padding??0),a=e.labelData?.height??0,o=Ve(t?.preset),s={...Oe(e),"spacing.baseValue":_e,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"spacing.nodeNode":ve,"elk.padding":`[top=${ge},left=${ge},bottom=${ge},right=${ge}]`,"nodeLabels.placement":`[H_CENTER V_TOP, INSIDE]`,"elk.layered.mergeEdges":t?.mergeEdges,"elk.layered.nodePlacement.bk.fixedAlignment":t?.nodePlacementAlignment??o.alignment,"elk.layered.nodePlacement.strategy":t?.nodePlacementStrategy??o.containerPlacement,"elk.layered.cycleBreaking.strategy":t?.cycleBreakingStrategy??o.cycleBreaking,"elk.layered.nodePlacement.networkSimplex.nodeFlexibility":`PORT_POSITION`,"elk.spacing.portsSurrounding":he},c=Te(e.metadata?.algorithm,r);if(c){let e=a+ye;if(s[`nodeSize.constraints`]=`[MINIMUM_SIZE, NODE_LABELS]`,s[`nodeSize.minimum`]=`(${i}, ${e+ye})`,s[`elk.algorithm`]=c,s[`elk.hierarchyHandling`]=`SEPARATE_CHILDREN`,s[`elk.aspectRatio`]=`2.0`,s[`elk.contentAlignment`]=`H_CENTER V_TOP`,s[`elk.expandNodes`]=`true`,s[`elk.padding`]=`[top=${e},left=${ye},bottom=${ye},right=${ye}]`,c===`elk.rectpacking`){let e=a+be;Object.assign(s,xe,{"elk.padding":`[top=${e},left=${be},bottom=${be},right=${be}]`,"nodeSize.minimum":`(${i}, ${e+be})`})}}else e.dir&&(s[`elk.algorithm`]=n,s[`elk.direction`]=Ee(e.dir),s[`elk.hierarchyHandling`]=`SEPARATE_CHILDREN`);return Object.assign(s,y),s}r(ke,`buildSubgraphLayoutOptions`);function Ae(e,t){let n=new Set,i=new Map;for(let{id:t,parentId:n}of e){let e=i.get(n);e?e.push(t):i.set(n,[t])}for(let e of i.values()){let i=new Set(e),a=new Map(e.map(e=>[e,0])),o=new Map(e.map(e=>[e,[]])),s=[];for(let e of t){let t=e.source==null?void 0:String(e.source),n=e.target==null?void 0:String(e.target);!t||!n||t===n||!i.has(t)||!i.has(n)||(a.set(n,(a.get(n)??0)+1),o.get(t).push(n),o.get(n).push(t),s.push([t,n]))}let c=new Map,l=0;for(let t of e){if(c.has(t))continue;let e=[t];for(c.set(t,l);e.length>0;){let t=e.pop();for(let n of o.get(t))c.has(n)||(c.set(n,l),e.push(n))}l++}let u=Array(l).fill(!1);for(let t of e)(a.get(t)??0)===0&&(u[c.get(t)]=!0);if(!u.includes(!1))continue;let d=new Map(e.map(e=>[e,[]])),f=new Map(e.map(e=>[e,0])),p=r((e,t)=>{let n=new Set([e]),r=[e];for(;r.length>0;){let e=r.pop();if(e===t)return!0;for(let t of d.get(e))n.has(t)||(n.add(t),r.push(t))}return!1},`reaches`);for(let[e,t]of s)p(t,e)||(d.get(e).push(t),f.set(t,(f.get(t)??0)+1));let m=Array(l).fill(!1);for(let t of e){let e=c.get(t);!u[e]&&!m[e]&&f.get(t)===0&&(n.add(t),m[e]=!0)}}return n}r(Ae,`findCyclicEntryNodes`);function je(e,t){if(!e.config.elk?.keepEntryNodeOnTop)return;let n=Ae(e.nodes,e.edges.map(e=>({source:e.start,target:e.end})));for(let e of n){let n=t[e];n&&(n.layoutOptions={...n.layoutOptions,"elk.layered.layering.layerConstraint":`FIRST`})}}r(je,`applyCyclicEntryConstraint`);function Me(e,t){let n=ze(t);return Ie(n),Tt(e,n),{algorithm:n.algorithm}}r(Me,`prepareLayoutForElk`);async function Ne(e,t){let n=ze(t),r=Pe(e,n),i=new f.default;n.log.info(`Drawing flowchart using v4 renderer`,i);let a=await $e(i,r.elkGraph,n.log);return et(e,a,r,n.log),Le(e.nodes),a}r(Ne,`runElkLayoutCore`);function Pe(e,t){let n={},r=He(e,t.algorithm,t.rootLayoutOptions),i=e.direction??`DOWN`;r.layoutOptions[`elk.direction`]=Ee(i);let a=Ue(e.nodes,t.log);return We(e.nodes,r,n,t),Je(e,r,n,t),Xe(e,n,a,t),Ze(r,n,a,t.log),je(e,n),{elkGraph:r,nodeDb:n,parentLookupDb:a}}r(Pe,`buildElkGraphFromLayoutData`);var Fe=u({afterPaint:h,prepareLayout:Me,measureLayout:r((e,t)=>l(e,t,{unwrapGroupLabels:!0}),`measureLayout`),runLayoutCore:Ne,paintOptions:{skipIntersect:!0}});function Ie(e){i(e.getConfig())}r(Ie,`syncHostConfig`);function Le(e){let t=new Map(e.map(e=>[e.id,e]));e.sort((e,n)=>e.isGroup===n.isGroup?e.isGroup&&n.isGroup?Re(e,t)-Re(n,t):0:e.isGroup?-1:1)}r(Le,`orderNodesForElkPaint`);function Re(e,t){let n=0,r=new Set,i=e.parentId;for(;i&&!r.has(i);){r.add(i);let e=t.get(i);if(!e?.isGroup)break;n++,i=e.parentId}return n}r(Re,`getGroupDepth`);function ze(e){let t=e.helpers;if(!t)throw Error(`ELK layout requires Mermaid internal helpers`);return{algorithm:e.preparedLayout?.algorithm??e.options?.algorithm,rootLayoutOptions:e.options?.rootLayoutOptions,common:t.common,getConfig:t.getConfig,interpolateToCurve:t.interpolateToCurve,log:t.log}}r(ze,`getElkLayoutContext`);var Be={default:{layering:`NETWORK_SIMPLEX`,placement:`BRANDES_KOEPF`,containerPlacement:`BRANDES_KOEPF`,alignment:`BALANCED`,cycleBreaking:`DEPTH_FIRST`},legacy:{layering:`NETWORK_SIMPLEX`,placement:`BRANDES_KOEPF`,containerPlacement:`BRANDES_KOEPF`,alignment:`NONE`,cycleBreaking:`GREEDY`},modelOrder:{layering:`NETWORK_SIMPLEX`,placement:`NETWORK_SIMPLEX`,containerPlacement:`BRANDES_KOEPF`,alignment:`NONE`,cycleBreaking:`GREEDY_MODEL_ORDER`},depthFirst:{layering:`NETWORK_SIMPLEX`,placement:`NETWORK_SIMPLEX`,containerPlacement:`BRANDES_KOEPF`,alignment:`NONE`,cycleBreaking:`DEPTH_FIRST`}};function Ve(e){return e!==void 0&&Object.hasOwn(Be,e)?Be[e]:Be.default}r(Ve,`resolveElkPreset`);function He(e,t,n){let r=Ve(e.config.elk?.preset),i={id:`root`,layoutOptions:{"elk.hierarchyHandling":`INCLUDE_CHILDREN`,"elk.algorithm":t,"elk.layered.nodePlacement.strategy":e.config.elk?.nodePlacementStrategy??r.placement,"elk.layered.nodePlacement.bk.fixedAlignment":e.config.elk?.nodePlacementAlignment??r.alignment,"elk.layered.mergeEdges":e.config.elk?.mergeEdges,"elk.direction":`DOWN`,"spacing.baseValue":40,"elk.layered.crossingMinimization.forceNodeModelOrder":e.config.elk?.forceNodeModelOrder,"elk.layered.considerModelOrder.strategy":e.config.elk?.considerModelOrder,"elk.layered.unnecessaryBendpoints":!0,"elk.layered.cycleBreaking.strategy":e.config.elk?.cycleBreakingStrategy??r.cycleBreaking,"elk.layered.layering.strategy":e.config.elk?.layeringStrategy??r.layering,"elk.layered.layering.coffmanGraham.layerBound":e.config.elk?.layeringLayerBound,"elk.layered.wrapping.multiEdge.improveCuts":!0,"elk.layered.wrapping.multiEdge.improveWrappedEdges":!0,"elk.layered.edgeRouting.selfLoopDistribution":`EQUALLY`,"elk.layered.mergeHierarchyEdges":!0,"elk.spacing.portsSurrounding":he},children:[],edges:[]};return t===`elk.rectpacking`&&Object.assign(i.layoutOptions,xe,{"elk.contentAlignment":`H_CENTER V_TOP`,"elk.padding":`[top=15,left=15,bottom=15,right=15]`}),n&&Object.assign(i.layoutOptions,n),Object.assign(i.layoutOptions,g,_,v),i}r(He,`createRootElkGraph`);function Ue(e,t){let n={parentById:{},childrenById:{}},r=e.filter(e=>e.isGroup);return t.info(`Subgraphs - `,r),r.forEach(t=>{e.filter(e=>e.parentId===t.id).forEach(e=>{n.parentById[e.id]=t.id,n.childrenById[t.id]??=[],n.childrenById[t.id].push(e.id)})}),n}r(Ue,`addSubGraphs`);function We(e,t,n,r,i){let a=e.filter(e=>e?.parentId===i);return r.log.info(`addVertices APA12`,a,i),a.forEach(i=>{Ge(t,e,i,n,r)}),t}r(We,`addVertices`);function Ge(e,t,n,r,i){let a=Ke(n);e.children.push(a),r[n.id]=a,n.isGroup&&(a.children=[],We(t,a,r,i,n.id),a.labelData=qe(n,i.getConfig()))}r(Ge,`addVertex`);function Ke(e){let t={...e};return delete t.domId,e.isGroup?t.children=[]:(t.width=e.width??0,t.height=e.height??0,e.spreadPorts&&(t.layoutOptions={...t.layoutOptions,"elk.portAlignment.default":`CENTER`})),t}r(Ke,`createElkNode`);function qe(e,t){return e.labelData||(e.labelBBox?{width:e.labelBBox.width,height:Math.max(0,e.labelBBox.height-2),wrappingWidth:e.wrappingWidth??t.flowchart?.wrappingWidth}:{width:0,height:0,wrappingWidth:e.wrappingWidth??t.flowchart?.wrappingWidth})}r(qe,`getMeasuredLabelData`);function Je(e,t,n,r){r.log.info(`abc78 DAGA edges = `,e);let i={};return e.edges.forEach(e=>{let a=e.id;i[a]=(i[a]??-1)+1;let o=a;e.id=o,r.log.info(`abc78 new link id to be used is`,a,o,i[a]);let{source:s,target:c,sourceId:l,targetId:u}=Ye(e,n);r.log.debug(`abc78 source and target`,s,c),t.edges.push({...e,sources:[s],targets:[c],sourceId:l,targetId:u,labels:[{width:e.width??0,height:e.height??0,orgWidth:e.width??0,orgHeight:e.height??0,text:e.label??``,layoutOptions:{"edgeLabels.inline":`true`,"edgeLabels.placement":`CENTER`}}]})}),t}r(Je,`addEdgesToElkGraph`);function Ye(e,t){let n=e.start,r=e.end,i=n,a=r,o=n?t[n]:void 0,s=r?t[r]:void 0;return!o||!s?{source:i,target:a}:{source:i,target:a,sourceId:n,targetId:r}}r(Ye,`getEdgeStartEndPoint`);function Xe(e,t,n,r){e.nodes.forEach(i=>{let a=t[i.id];!a||n.childrenById[a.id]===void 0||(a.labels=[{text:a.label,width:a?.labelData?.width??50,height:a?.labelData?.height??50}],r.log.debug(`UIO node label`,a?.labelData?.width,a.padding),a.layoutOptions=ke(a,e.config.elk,r.algorithm,r.log),delete a.x,delete a.y,delete a.width,delete a.height)})}r(Xe,`configureSubgraphNodes`);function Ze(e,t,n,r){r.debug(`APA01 processing edges, count:`,e.edges.length),e.edges.forEach((e,i)=>{r.debug(`APA01 processing edge`,i,`:`,e);let a=e.sources[0],o=e.targets[0];if(r.debug(`APA01 source:`,a,`target:`,o),r.debug(`APA01 nodeDb[source]:`,t[a]),r.debug(`APA01 nodeDb[target]:`,t[o]),t[a]&&t[o]&&t[a].parentId!==t[o].parentId){let e=p(a,o,n);Qe(t,a,e,r),Qe(t,o,e,r)}})}r(Ze,`configureCrossHierarchyEdges`);function Qe(e,t,n,r){let i=e[t];i&&(i.layoutOptions??={},i.layoutOptions[`elk.hierarchyHandling`]===`SEPARATE_CHILDREN`&&Te(i.metadata?.algorithm)&&(r.debug(`Dropping explicit algorithm for node`,i.id,`due to cross-boundary edges`),Ce(i.layoutOptions),Object.assign(i.layoutOptions,Oe(i))),i.layoutOptions[`elk.hierarchyHandling`]=`INCLUDE_CHILDREN`,i.id!==n&&i.parentId&&Qe(e,i.parentId,n,r))}r(Qe,`setIncludeChildrenPolicy`);async function $e(e,t,n){let r=globalThis.__mermaidProfiler;try{r?.begin(`layoutCore`);let i;try{i=await e.layout(t)}finally{r?.end()}return n.debug(`APA01 after - success`),n.debug(`APA01 layout result:`,i),i}catch(e){throw n.error(`ELK layout error:`,e),e}}r($e,`runElkLayout`);function et(e,t,n,r){let i=new Map(e.nodes.map(e=>[e.id,e]));it(t.children??[],n,i,0,0,0,r),rt(t.children??[],n,i,t),mt(e,t,n,r)}r(et,`applyElkLayoutResult`);function tt(e,t=new Set){for(let n of e.children??[])t.add(n.id),tt(n,t);return t}r(tt,`collectDescendantIds`);function nt(e,t,n,r){let i=[];for(let a of e.edges??[]){let e=a.sources?.[0]??a.start,o=a.targets?.[0]??a.end,s=t.has(e)&&t.has(o),c=e===r,l=o===r;if(!s&&!c&&!l)continue;let u=_t(e,o,n.parentLookupDb,n.nodeDb);for(let e of a.sections??[]){let t=s?[e.startPoint,...e.bendPoints??[],e.endPoint]:[c?e.startPoint:null,l?e.endPoint:null];for(let e of t)e&&i.push({x:e.x+u.x,y:e.y+u.y})}}return i}r(nt,`internalEdgePoints`);function rt(e,t,n,r={}){for(let i of e){if(!i?.isGroup)continue;let e=i.children??[];rt(e,t,n,r);let a=t.nodeDb[i.id],o=e.map(e=>t.nodeDb[e.id]).filter(e=>e?.offset&&e.width&&e.height);if(!a?.offset||o.length===0)continue;let s=nt(r,tt(i),t,i.id),c=[...o.map(e=>e.offset.posX),...o.map(e=>e.offset.posX+e.width),...s.map(e=>e.x)],l=[...o.map(e=>e.offset.posY),...o.map(e=>e.offset.posY+e.height),...s.map(e=>e.y)],u=a.offset,d=Math.max(u.posX,Math.min(...c)-ge),f=Math.min(u.posX+a.width,Math.max(...c)+ge),p=Math.min(u.posY+a.height,Math.max(...l)+ge),m=u.posY,h=De(i),g=d,_=f-d;if(_{if(!e)return;let s=t.nodeDb[e.id]??e,c=Math.max(e.width,e.labels&&e.labels[0]?.width||0),l={posX:e.x+r,posY:e.y+i,x:r,y:i,depth:a,width:c,height:e.height};s.offset=l,s.x=l.posX+e.width/2,s.y=l.posY+e.height/2,s.width=e.width,s.height=e.height;let u=n.get(e.id);if(u){u.x=s.x,u.y=s.y,u.width=e.isGroup?Math.max(e.width,e.labelData?.width??0):e.width,u.height=e.height;let t=u;t.labelData=e.labelData,t.labels=e.labels}e.isGroup?(o.debug(`Id abc88 subgraph = `,e.id,e.x,e.y,e.labelData),it(e.children??[],t,n,l.posX,l.posY,a+1,o)):o.info(`Id NODE = `,e.id,e.x,e.y,r,i,`translate(${s.x}, ${s.y})`)})}r(it,`applyElkNodePositions`);var at=16,ot=30,st=.01;function ct(e,t){let n=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y);if(n>st&&r<=st)return`h`;if(r>st&&n<=st)return`v`}r(ct,`axisOf`);function lt(e){let t=ut(e)??e,n=ut([...t].reverse());return n&&(t=n.reverse()),t}r(lt,`straightenTerminalJogs`);function ut(e){if(e.length<5)return null;let[t,n,r,i]=e,a=ct(t,n);if(!a||ct(r,i)!==a||ct(n,r)!==(a===`h`?`v`:`h`)||Math.hypot(n.x-t.x,n.y-t.y)>ot)return null;let o=Math.abs(a===`h`?r.y-n.y:r.x-n.x);if(oat||!(a===`h`?Math.sign(n.x-t.x)===Math.sign(i.x-r.x):Math.sign(n.y-t.y)===Math.sign(i.y-r.y)))return null;let s=3;for(;s+1(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),`side`),o=a(n,i,e),s=a(n,i,t),c=a(e,t,n),l=a(e,t,i);return(o>0&&s<0||o<0&&s>0)&&(c>0&&l<0||c<0&&l>0)}r(dt,`segmentsCrossStrict`);function ft(e,t){let n=0;for(let r=0;re.points??[]);for(let[n,r]of e.entries()){let e=t[n];if(e.length<5)continue;let i=lt(e);if(i===e)continue;let a=0,o=0;for(let[r,s]of t.entries())r===n||s.length<2||(a+=ft(e,s),o+=ft(i,s));o>a||(r.points=i,t[n]=i)}}r(pt,`straightenEdgeTerminals`);function mt(e,t,n,i){let a=new Map(e.edges.map(e=>[e.id,e])),o=e.config.elk?.straightenEdges!==!1,s=new Map(e.nodes.map(e=>[e.id,e])),c=new Set;t.edges?.forEach(e=>{if(!e.sections?.length)return;let t=n.nodeDb[e.sources?.[0]??e.start],r=n.nodeDb[e.targets?.[0]??e.end];if(!t||!r)return;let i=_t(e.start??e.sourceId??e.sources?.[0],e.end??e.targetId??e.targets?.[0],n.parentLookupDb,n.nodeDb),a=e.sections[0];t.shape!==`rect33`&&ht(t,{x:a.startPoint.x+i.x,y:a.startPoint.y+i.y},s,c),r.shape!==`rect33`&&ht(r,{x:a.endPoint.x+i.x,y:a.endPoint.y+i.y},s,c)}),t.edges?.forEach(e=>{let t=a.get(e.id);if(!t)return;let o=e.sources?.[0]??e.start,s=e.targets?.[0]??e.end,c=n.nodeDb[o],l=n.nodeDb[s];if(!c||!l)return;if(!e.sections?.length){let n=r(e=>({x:(e.offset?.posX??e.x??0)+(e.width??0)/2,y:(e.offset?.posY??e.y??0)+(e.height??0)/2}),`centre`),a=n(c),o=n(l);c.x=a.x,c.y=a.y,l.x=o.x,l.y=o.y;let s=vt([a,o],c,l,i);t.points=s,t.curve=`linear`;let u=s[0],d=s[s.length-1];t.x=(u.x+d.x)/2,t.y=(u.y+d.y)/2,i.debug(`APA18 no edge sections, using a straight line`,e.id,t.points);return}let u=e.start??e.sourceId??o,d=e.end??e.targetId??s,f=_t(u,d,n.parentLookupDb,n.nodeDb);i.debug(`APA18 offset`,f,u,` ==> `,d,`edge:`,e,c);let p=e.sections[0],m=gt(p,f);c.x=c.offset.posX+c.width/2,c.y=c.offset.posY+c.height/2,l.x=l.offset.posX+l.width/2,l.y=l.offset.posY+l.height/2,c.shape!==`rect33`&&m.unshift({x:c.x,y:c.y}),l.shape!==`rect33`&&m.push({x:l.x,y:l.y}),t.points=Ct(wt(vt(m,c,l,i),jt(l),xt(t),i),jt(c),St(t),i),t.curve=`rounded`;let h=e.labels?.[0];h&&(t.x=h.x+f.x+h.width/2,t.y=h.y+f.y+h.height/2)}),o&&pt(e.edges)}r(mt,`applyElkEdgeLayout`);function ht(e,t,n,r){let i=e.width??0,a=e.height??0,o=e.offset.posY,s=o+a,c=.5,l=Math.abs(t.y-o)<=c||Math.abs(t.y-s)<=c;if((l?i:a)>=2*me||r.has(e.id))return;r.add(e.id);let u=l?t.x-(e.offset.posX+i/2):t.y-(e.offset.posY+a/2);if(Math.abs(u)<.01)return;l?(e.offset.posX+=u,e.x=e.offset.posX+i/2):(e.offset.posY+=u,e.y=e.offset.posY+a/2);let d=n.get(e.id);d&&(d.x=e.offset.posX+i/2,d.y=e.offset.posY+a/2)}r(ht,`alignDegenerateNodeToAnchor`);function gt(e,t){let n=e.startPoint,r=e.endPoint,i=(e.bendPoints?e.bendPoints:[]).map(e=>({x:e.x+t.x,y:e.y+t.y}));return[{x:n.x+t.x,y:n.y+t.y},...i,{x:r.x+t.x,y:r.y+t.y}]}r(gt,`createEdgePointsFromSection`);function _t(e,t,n,r){let i=p(e,t,n);if(i===void 0||i===`root`)return{x:0,y:0};let a=r[i],o=a?.elkOrigin??a?.offset;return{x:o?.posX??0,y:o?.posY??0}}r(_t,`calcOffset`);function vt(e,t,n,r){let i=Array.isArray(e)?[...e]:[],a=jt(n);r.debug(`PPP cutter2: Points before cutter2:`,JSON.stringify(e),`endBounds:`,a,S(a,e[e.length-1]));let o;{let e=jt(t),a=jt(n),s=!!t?.isGroup,c=!!n?.isGroup,{candidate:l,centerApprox:u}=Pt(i,t,`start`),{candidate:d,centerApprox:f}=Pt(i,n,`end`),p=s&&S(e,l),m=c&&S(a,d);Ft(i,`start`,p&&u),Ft(i,`end`,m&&f),s&&!p&&(p=It(i,e,`start`)),c&&!m&&(m=It(i,a,`end`)),p||m?(p||Lt(i,t,e,r),m||Rt(i,n,a,r),r.debug(`PPP cutter2: skipping cutter2 due to on-border group endpoint(s)`,{skipStart:p,skipEnd:m,startCenterApprox:u,endCenterApprox:f,startCandidate:l,endCandidate:d}),o=i):o=Bt(t,n,i,r)}if(r.debug(`PPP cutter2: Points after cutter2:`,JSON.stringify(o)),!Array.isArray(o)||o.length<2||yt(o)){r.warn(`POI cutter2: Invalid points from cutter2, falling back to prevPoints`,o);let e=i.filter(e=>Number.isFinite(e?.x)&&Number.isFinite(e?.y));o=e.length>=2?e:i}return r.debug(`UIO cutter2: Points after cutter2 (sanitized):`,o),bt(o,r)}r(vt,`sanitizeElkEdgePoints`);function yt(e){return e?.some(e=>!Number.isFinite(e?.x)||!Number.isFinite(e?.y))}r(yt,`hasInvalidPoint`);function bt(e,t){let n=e.filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return Math.abs(e.x-r.x)>1e-6||Math.abs(e.y-r.y)>1e-6});return n.length!==e.length&&t.debug(`UIO cutter2: removed consecutive duplicate points`,{before:e,after:n}),n}r(bt,`dedupeConsecutivePoints`);function xt(e){return fe(e.arrowTypeEnd)}r(xt,`getEndMarkerPathOffset`);function St(e){return fe(e.arrowTypeStart)}r(St,`getStartMarkerPathOffset`);function Ct(e,t,n,r){if(n<=0||e.length<3)return e;let i=e[0],a=e[1],o=Math.hypot(a.x-i.x,a.y-i.y);if(o>=Math.max(de,n*2)||!S(t,a,1))return e;let s=[i,...e.slice(2)];return r.debug(`UIO cutter2: removed short start marker segment`,{before:e,after:s,markerOffset:n,segmentLength:o}),s}r(Ct,`ensureStartMarkerSegmentLength`);function wt(e,t,n,r){if(n<=0||e.length<3)return e;let i=e[e.length-1],a=e[e.length-2],o=Math.hypot(i.x-a.x,i.y-a.y);if(o>=Math.max(de,n*2)||!S(t,a,1))return e;let s=[...e.slice(0,-2),i];return r.debug(`UIO cutter2: removed short end marker segment`,{before:e,after:s,markerOffset:n,segmentLength:o}),s}r(wt,`ensureEndMarkerSegmentLength`);function Tt(e,t){let n=e.edges.defaultInterpolate,r=e.edges.defaultStyle,i=t.getConfig();e.edges.forEach(e=>{let a=kt(e,{defaultStyle:r,defaultInterpolate:n,confCurve:i.curve},t);Object.assign(e,a)})}r(Tt,`applyElkEdgeRenderData`);function Et(e){if(e.classes!==void 0)return e.classes;if(e.start&&e.end)return`flowchart-link LS_${e.start} LE_${e.end}`}r(Et,`buildFallbackEdgeClasses`);function Dt(e,t,n){let r=`normal`,i=`solid`,a=[],o=[];return e===`dotted`?(i=`dotted`,a=[`fill:none`,`stroke-width:2px`,`stroke-dasharray:3`]):e===`thick`?(r=`thick`,a=[`stroke-width: 3.5px`,`fill:none`]):(a=t??[`fill:none`],n!==void 0&&(o=n)),{thickness:r,pattern:i,style:a,labelStyle:o}}r(Dt,`computeStroke`);function Ot(e,t,n){return e===void 0?t===void 0?n:t:e}r(Ot,`getCurve`);function kt(e,t,n){let r={};r.minlen=e.minlen??e.length??1,r.text=e.text??e.label,r.arrowhead=e.arrowhead??(e.type===`arrow_open`?`none`:`normal`);let i=pe[e.type??`arrow_open`]??pe.arrow_open;r.arrowTypeStart=e.arrowTypeStart??i[0],r.arrowTypeEnd=e.arrowTypeEnd??i[1],r.startLabelRight=e.startLabelRight,r.endLabelLeft=e.endLabelLeft;let o=Dt(e.stroke,t.defaultStyle,t.defaultLabelStyle);r.thickness=e.thickness??o.thickness,r.pattern=e.pattern??o.pattern,r.style=e.style??o.style,r.labelStyle=e.labelStyle??o.labelStyle,r.classes=Et(e),r.curve=n.interpolateToCurve(Ot(e.curve??e.interpolate,t.defaultInterpolate,t.confCurve),a);let s=(r.text??``)!==``;return e.arrowheadStyle===void 0?(s||e.style!==void 0)&&(r.arrowheadStyle=`fill: #333`):r.arrowheadStyle=e.arrowheadStyle,r.labelpos=e.labelpos??(s?`c`:void 0),r.labelType=e.labelType,r.label=(e.label??r.text??``).replace(n.common.lineBreakRegex,` `),r}r(kt,`buildEdgeData`);function At(e){return Math.max(e.width??0,De(e))}r(At,`getEffectiveGroupWidth`);function jt(e){let t=e?.isGroup?At(e):e.width;return{x:e.offset.posX+e.width/2,y:e.offset.posY+e.height/2,width:t??0,height:e.height??0,padding:e.padding}}r(jt,`boundsFor`);function Mt(e,t,n=1e-6){return Math.abs(e-t)1?e[1]:n,centerApprox:r}}{let n=e[e.length-1],r=Nt(n,t);return{candidate:r&&e.length>1?e[e.length-2]:n,centerApprox:r}}}r(Pt,`getCandidateBorderPoint`);function Ft(e,t,n){n&&(t===`start`?e.length>0&&e.shift():e.length>0&&e.pop())}r(Ft,`dropAutoCenterPoint`);function It(e,t,n){let r=n===`start`?1:-1,i=n===`start`?0:e.length-1,a=i;for(;i>=0&&i=e.length)return!1;let o=e[i],s=e[i-r],c=o.x-s.x,l=o.y-s.y,u=c===0?1/0:(t.x+Math.sign(c)*t.width/2-s.x)/c,d=l===0?1/0:(t.y+Math.sign(l)*t.height/2-s.y)/l,f=Math.min(u,d),p={x:s.x+f*c,y:s.y+f*l};return n===`start`?e.splice(0,i,p):e.splice(i+1,e.length-i-1,p),!0}r(It,`clipGroupEndpoint`);function Lt(e,t,n,r){let i=-1;for(let[t,r]of e.entries())if(te(n,r)){i=t;break}if(i!==-1){let a=e[i],o=e[0],s=le(t,n,a,o);ue(e,`start`,s),r.debug(`UIO cutter2: start-only intersection applied`,{startIntersection:s})}}r(Lt,`applyStartIntersectionIfNeeded`);function Rt(e,t,n,r){let i=-1;for(let t=e.length-1;t>=0;t--)if(te(n,e[t])){i=t;break}if(i!==-1){let a=e[i],o=e[e.length-1],s=le(t,n,a,o);ue(e,`end`,s),r.debug(`UIO cutter2: end-only intersection applied`,{endIntersection:s})}}r(Rt,`applyEndIntersectionIfNeeded`);function zt(e,t,n,r,i){if(e?.isGroup)return null;let a=n[r],o=n[r+i];return!a||!o?null:ce(e,t,a,o)}r(zt,`attachAlongDepartureAxis`);function Bt(e,t,n,r){let i=jt(e),a=jt(t);if(n.length===0)return[];let o=[...n],s=o[0],c=o[o.length-1];r.debug(`PPP cutter2: bounds`,{startBounds:i,endBounds:a}),r.debug(`PPP cutter2: original points`,n);let l=-1;for(let[e,t]of o.entries())l===-1&&te(i,t)&&(l=e);if(l!==-1){let t=o[l],n=zt(e,i,o,l,1)??le(e,i,t,s);r.debug(`UIO cutter2: start intersection`,n),ue(o,`start`,n)}let u=null,d=-1;for(let e=o.length-1;e>=0;e--)if(te(a,o[e])){u=o[e],d=e;break}if(!u&&o.length>1&&(u=o[o.length-2],d=o.length-2),u){let e=zt(t,a,o,d,-1)??le(t,a,u,c);r.debug(`UIO cutter2: end intersection`,{endIntersection:e,outsideIndexForEnd:d}),ue(o,`end`,e)}if(o.length>1){let e=o[o.length-1],t=o[o.length-2],n=Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2);n<2&&(r.debug(`UIO cutter2: trimming tail point (too close)`,{distance:n,lastPoint:e,secondLastPoint:t}),o.pop())}return r.debug(`UIO cutter2: final points`,o),o}r(Bt,`cutter2`);export{Fe as render}; \ No newline at end of file diff --git a/web/dist/app-erDiagram-OPXOYQCR.js b/web/dist/app-erDiagram-OPXOYQCR.js index f7ca1557f..cdeb480fb 100644 --- a/web/dist/app-erDiagram-OPXOYQCR.js +++ b/web/dist/app-erDiagram-OPXOYQCR.js @@ -1,9 +1,9 @@ -import{n as e,t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{H as i,U as a,a as o,it as s,q as c,s as l,v as u,w as d,x as f,y as p}from"./app-chunk-O7XYJQB3.js";import{t as m}from"./app-channel.js";import{c as h,g}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import{a as _,i as v,o as y,r as b,t as x}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import{t as S}from"./app-chunk-XXDRQBXY.js";import{t as C}from"./app-chunk-WEXAMYUT.js";import"./app-chunk-UA2S7LBM.js";import{r as w,t as T}from"./app-chunk-GNY47TPC.js";var E=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],i=[1,7],a=[1,9],o=[1,10],s=[1,11],c=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[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],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[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],V=[1,77],H=[1,76],U=[69,70,71,72,73],W=[1,91],G=[6,9,45,50],K=[6,9,12,44,45,50,51,52],q=[1,101],J=[1,100],Y=[1,99],X=[18,61],ee=[1,110],te=[1,109],ne=[20,43,51,53,54,55],Z=[18,61,64,66],Q={trace:e(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:e(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]},t(n,r,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},t(n,S,{1:[2,1]}),t(C,[2,3]),t(C,[2,4]),t(C,[2,5]),t(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t(C,[2,26]),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,r,{5:44}),t(k,[2,58]),t(k,[2,59]),t(k,[2,60]),t(k,[2,61]),t(k,[2,62]),t(C,[2,36]),t(C,[2,37]),t(C,[2,38]),t(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},t(N,[2,77]),t(N,[2,78]),t(N,[2,79]),t(N,[2,80]),t(N,[2,81]),t(C,[2,23]),t(C,[2,24]),t(C,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},t(z,[2,41]),t(z,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:B,9:V,19:[1,75],35:74,50:H},{12:[1,79],14:[1,80]},t(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},t(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},t(U,[2,82]),t(U,[2,83]),t(C,[2,31]),t(C,S),{6:B,9:V,35:90,45:W,50:H},{43:[1,92],44:[1,93]},t(G,[2,47],{49:94,12:P,44:F,51:L,52:R}),t(K,[2,49]),t(K,[2,54]),t(K,[2,55]),t(K,[2,56]),t(K,[2,57]),t(C,[2,45],{45:I}),{6:B,9:V,35:95,45:W,50:H},t(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},t(C,[2,51]),t(C,[2,52]),t(C,[2,53]),{13:98,43:q,53:J,76:Y},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},t(C,[2,11]),{18:[2,64]},t(X,[2,65],{59:106,60:107,63:108,65:ee,66:te}),t([18,61,65,66],[2,71]),{61:[2,70]},t(C,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},t(z,[2,43]),t(z,[2,44]),t(K,[2,50]),t(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},t(ne,[2,34]),t(C,[2,7]),t(C,[2,84]),t(C,[2,85]),t(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},t(C,[2,14]),t(X,[2,66],{60:120,64:[1,121],66:te}),t(X,[2,67]),t(Z,[2,72]),t(X,[2,75]),t(Z,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},t(G,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:B,9:V,35:125,50:H},t(ne,[2,35]),{13:126,43:q,53:J,76:Y},{15:127,43:A,44:j},{13:128,43:q,53:J,76:Y},t(C,[2,12]),t(X,[2,68]),{63:129,65:ee},{18:[1,130]},t(C,[2,19]),t(C,[2,22],{16:[1,131],45:I}),t(C,[2,33]),t(C,[2,10]),{12:[1,132],45:I},t(C,[2,9]),t(Z,[2,73]),t(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:q,53:J,76:Y},{18:[1,136]},t(C,[2,20]),t(C,[2,8]),t(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e,t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{H as i,U as a,a as o,it as s,q as c,s as l,v as u,w as d,x as f,y as p}from"./app-chunk-O7XYJQB3.js";import{t as m}from"./app-channel.js";import{c as h,g}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{a as _,i as v,o as y,r as b,t as x}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{r as S,t as C}from"./app-chunk-GNY47TPC.js";import{t as w}from"./app-chunk-XXDRQBXY.js";import{t as T}from"./app-chunk-WEXAMYUT.js";var E=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],i=[1,7],a=[1,9],o=[1,10],s=[1,11],c=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[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],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[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],V=[1,77],H=[1,76],U=[69,70,71,72,73],W=[1,91],G=[6,9,45,50],K=[6,9,12,44,45,50,51,52],q=[1,101],J=[1,100],Y=[1,99],X=[18,61],ee=[1,110],te=[1,109],ne=[20,43,51,53,54,55],Z=[18,61,64,66],Q={trace:e(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:e(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]},t(n,r,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},t(n,S,{1:[2,1]}),t(C,[2,3]),t(C,[2,4]),t(C,[2,5]),t(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t(C,[2,26]),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,r,{5:44}),t(k,[2,58]),t(k,[2,59]),t(k,[2,60]),t(k,[2,61]),t(k,[2,62]),t(C,[2,36]),t(C,[2,37]),t(C,[2,38]),t(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},t(N,[2,77]),t(N,[2,78]),t(N,[2,79]),t(N,[2,80]),t(N,[2,81]),t(C,[2,23]),t(C,[2,24]),t(C,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},t(z,[2,41]),t(z,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:B,9:V,19:[1,75],35:74,50:H},{12:[1,79],14:[1,80]},t(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},t(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},t(U,[2,82]),t(U,[2,83]),t(C,[2,31]),t(C,S),{6:B,9:V,35:90,45:W,50:H},{43:[1,92],44:[1,93]},t(G,[2,47],{49:94,12:P,44:F,51:L,52:R}),t(K,[2,49]),t(K,[2,54]),t(K,[2,55]),t(K,[2,56]),t(K,[2,57]),t(C,[2,45],{45:I}),{6:B,9:V,35:95,45:W,50:H},t(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},t(C,[2,51]),t(C,[2,52]),t(C,[2,53]),{13:98,43:q,53:J,76:Y},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},t(C,[2,11]),{18:[2,64]},t(X,[2,65],{59:106,60:107,63:108,65:ee,66:te}),t([18,61,65,66],[2,71]),{61:[2,70]},t(C,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},t(z,[2,43]),t(z,[2,44]),t(K,[2,50]),t(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},t(ne,[2,34]),t(C,[2,7]),t(C,[2,84]),t(C,[2,85]),t(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},t(C,[2,14]),t(X,[2,66],{60:120,64:[1,121],66:te}),t(X,[2,67]),t(Z,[2,72]),t(X,[2,75]),t(Z,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},t(G,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:B,9:V,35:125,50:H},t(ne,[2,35]),{13:126,43:q,53:J,76:Y},{15:127,43:A,44:j},{13:128,43:q,53:J,76:Y},t(C,[2,12]),t(X,[2,68]),{63:129,65:ee},{18:[1,130]},t(C,[2,19]),t(C,[2,22],{16:[1,131],45:I}),t(C,[2,33]),t(C,[2,10]),{12:[1,132],45:I},t(C,[2,9]),t(Z,[2,73]),t(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:q,53:J,76:Y},{18:[1,136]},t(C,[2,20]),t(C,[2,8]),t(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Q.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:e(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:e(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;at[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. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(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 $(){this.yy={}}return e($,`Parser`),$.prototype=Q,Q.Parser=$,new $})();E.parser=E;var D=E,O=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=a,this.getAccTitle=p,this.setAccDescription=i,this.getAccDescription=u,this.setDiagramTitle=c,this.getDiagramTitle=d,this.getConfig=e(()=>f().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{e(this,`ErDB`)}addEntity(e,t=``){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,n.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:f().look??`default`,cssClasses:`default`,cssStyles:[],labelType:`markdown`}),n.info(`Added new entity :`,e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),i;for(i=t.length-1;i>=0;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=``),r.attributes.push(t[i]),n.debug(`Added attribute `,t[i].name)}addRelationship(e,t,r,i){let a;if(this.subGraphLookup.has(e))a=e;else{let t=this.addEntity(e);if(!t)return;a=t.id}let o;if(this.subGraphLookup.has(r))o=r;else{let e=this.addEntity(r);if(!e)return;o=e.id}let s={entityA:a,roleA:t,entityB:o,relSpec:i};this.relationships.push(s),n.debug(`Added new relationship :`,s)}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(t,r,i){let a=t.text.trim(),o=i.text,s=e(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`)(r.flat()),c=s.nodeList,l=s.dir;a??=`subGraph`+this.subCount,o||=``,o=this.sanitizeText(o),this.subCount+=1;let u={id:a,nodes:c,title:o.trim(),classes:[],cssStyles:[],dir:l,labelType:this.sanitizeNodeLabelType(i?.type)};return n.info(`Adding`,u.id,u.nodes,u.dir),u.nodes=this.makeUniq(u,this.subGraphs).nodes,this.subGraphs.push(u),this.subGraphLookup.set(a,u),a}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 r=this.subgraphNodeCache(t),i=[];return e.nodes.forEach((t,a)=>{r.has(t)?n.warn(`Entity '${t}' already belongs to another subgraph and will be ignored`):i.push(e.nodes[a])}),{nodes:i}}sanitizeText(e){return l.sanitizeText(e,f())}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,o()}getData(){let e=[],t=[],n=f(),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 c=0;for(let e of this.relationships){let r={id:h(e.entityA,e.entityB,{prefix:`id`,counter:c++}),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}}},k={};t(k,{draw:()=>A});var A=e(async function(e,t,i,a){n.info(`REF0:`),n.info(`Drawing er diagram (unified)`,t);let{securityLevel:o,er:s,layout:c}=f(),l=a.db.getData(),u=S(t,o);l.type=a.type,l.layoutAlgorithm=T(c),l.config.flowchart.nodeSpacing=s?.nodeSpacing||140,l.config.flowchart.rankSpacing=s?.rankSpacing||80,l.direction=a.db.getDirection();let{config:d}=l,{look:p}=d;l.markers=p===`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`],l.diagramId=t,await w(l,u);let m=u.selectAll(`[id*="-background"]`);Array.from(m).length>0&&m.each(function(){let e=r(this),t=e.attr(`id`).replace(`-background`,``),n=u.select(`#${CSS.escape(t)}`);if(!n.empty()){let t=n.attr(`transform`);e.attr(`transform`,t)}}),g.insertTitle(u,`erDiagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),C(u,8,`erDiagram`,s?.useMaxWidth??!0)},`draw`),j=e((e,t)=>{let n=m,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return s(r,i,a,t)},`fade`),M=e(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!v(t,r))return``;let i=y(e.look),a=b(n),o=``;for(let e=0;e<_(r);e++){let t=r[e],s=a?`fill: ${n[e%n.length]};`:``;o+=` +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(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 $(){this.yy={}}return e($,`Parser`),$.prototype=Q,Q.Parser=$,new $})();E.parser=E;var D=E,O=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=a,this.getAccTitle=p,this.setAccDescription=i,this.getAccDescription=u,this.setDiagramTitle=c,this.getDiagramTitle=d,this.getConfig=e(()=>f().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{e(this,`ErDB`)}addEntity(e,t=``){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,n.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:f().look??`default`,cssClasses:`default`,cssStyles:[],labelType:`markdown`}),n.info(`Added new entity :`,e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),i;for(i=t.length-1;i>=0;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=``),r.attributes.push(t[i]),n.debug(`Added attribute `,t[i].name)}addRelationship(e,t,r,i){let a;if(this.subGraphLookup.has(e))a=e;else{let t=this.addEntity(e);if(!t)return;a=t.id}let o;if(this.subGraphLookup.has(r))o=r;else{let e=this.addEntity(r);if(!e)return;o=e.id}let s={entityA:a,roleA:t,entityB:o,relSpec:i};this.relationships.push(s),n.debug(`Added new relationship :`,s)}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(t,r,i){let a=t.text.trim(),o=i.text,s=e(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`)(r.flat()),c=s.nodeList,l=s.dir;a??=`subGraph`+this.subCount,o||=``,o=this.sanitizeText(o),this.subCount+=1;let u={id:a,nodes:c,title:o.trim(),classes:[],cssStyles:[],dir:l,labelType:this.sanitizeNodeLabelType(i?.type)};return n.info(`Adding`,u.id,u.nodes,u.dir),u.nodes=this.makeUniq(u,this.subGraphs).nodes,this.subGraphs.push(u),this.subGraphLookup.set(a,u),a}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 r=this.subgraphNodeCache(t),i=[];return e.nodes.forEach((t,a)=>{r.has(t)?n.warn(`Entity '${t}' already belongs to another subgraph and will be ignored`):i.push(e.nodes[a])}),{nodes:i}}sanitizeText(e){return l.sanitizeText(e,f())}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,o()}getData(){let e=[],t=[],n=f(),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 c=0;for(let e of this.relationships){let r={id:h(e.entityA,e.entityB,{prefix:`id`,counter:c++}),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}}},k={};t(k,{draw:()=>A});var A=e(async function(e,t,i,a){n.info(`REF0:`),n.info(`Drawing er diagram (unified)`,t);let{securityLevel:o,er:s,layout:c}=f(),l=a.db.getData(),u=w(t,o);l.type=a.type,l.layoutAlgorithm=C(c),l.config.flowchart.nodeSpacing=s?.nodeSpacing||140,l.config.flowchart.rankSpacing=s?.rankSpacing||80,l.direction=a.db.getDirection();let{config:d}=l,{look:p}=d;l.markers=p===`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`],l.diagramId=t,await S(l,u);let m=u.selectAll(`[id*="-background"]`);Array.from(m).length>0&&m.each(function(){let e=r(this),t=e.attr(`id`).replace(`-background`,``),n=u.select(`#${CSS.escape(t)}`);if(!n.empty()){let t=n.attr(`transform`);e.attr(`transform`,t)}}),g.insertTitle(u,`erDiagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),T(u,8,`erDiagram`,s?.useMaxWidth??!0)},`draw`),j=e((e,t)=>{let n=m,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return s(r,i,a,t)},`fade`),M=e(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!v(t,r))return``;let i=y(e.look),a=b(n),o=``;for(let e=0;e<_(r);e++){let t=r[e],s=a?`fill: ${n[e%n.length]};`:``;o+=` [data-look="${i}"][data-color-id="color-${e}"].node path { stroke: ${t}; diff --git a/web/dist/app-flowDiagram-KWPJA3E3.js b/web/dist/app-flowDiagram-KWPJA3E3.js index 084282984..ae835a6e3 100644 --- a/web/dist/app-flowDiagram-KWPJA3E3.js +++ b/web/dist/app-flowDiagram-KWPJA3E3.js @@ -1 +1 @@ -import"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import"./app-chunk-GWA4HPMP.js";import"./app-chunk-XXDRQBXY.js";import"./app-chunk-WEXAMYUT.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-GNY47TPC.js";import"./app-chunk-LNGE3PJU.js";import{n as e}from"./app-chunk-7M6MHVWA.js";export{e as diagram}; \ No newline at end of file +import"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import"./app-chunk-LNGE3PJU.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import"./app-chunk-GNY47TPC.js";import"./app-chunk-GWA4HPMP.js";import"./app-chunk-XXDRQBXY.js";import"./app-chunk-WEXAMYUT.js";import{n as e}from"./app-chunk-7M6MHVWA.js";export{e as diagram}; \ No newline at end of file diff --git a/web/dist/app-kanban-definition-PNTS6WVX.js b/web/dist/app-kanban-definition-PNTS6WVX.js index 8c1bf55ea..e0283a7fe 100644 --- a/web/dist/app-kanban-definition-PNTS6WVX.js +++ b/web/dist/app-kanban-definition-PNTS6WVX.js @@ -1,14 +1,14 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import{Y as n,et as r,f as i,rt as a,tt as o,x as s,z as c}from"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import{t as l}from"./app-chunk-6AEJRKK7.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{t as u}from"./app-chunk-5VM5RSS4.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-7INBJB4K.js";import{i as d,r as f}from"./app-chunk-5DYCD2WN.js";import{r as p}from"./app-chunk-UA2S7LBM.js";import{n as m,t as h}from"./app-chunk-LNGE3PJU.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(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:e(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:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import{Y as n,et as r,f as i,rt as a,tt as o,x as s,z as c}from"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import{t as l}from"./app-chunk-6AEJRKK7.js";import{n as u,t as d}from"./app-chunk-LNGE3PJU.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7INBJB4K.js";import{i as f,r as p}from"./app-chunk-5DYCD2WN.js";import{r as m}from"./app-chunk-UA2S7LBM.js";import{t as h}from"./app-chunk-5VM5RSS4.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(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:e(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:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:e(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:e(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;at[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. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(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,`
`),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 S(){this.yy={}}return e(S,`Parser`),S.prototype=x,x.Parser=S,new S})();g.parser=g;var _=g,v=[],y=[],b=0,x={},S=e(()=>{v=[],y=[],b=0,x={}},`clear`),C=e(e=>{if(v.length===0)return null;let t=v[0].level,n=null;for(let e=v.length-1;e>=0;e--)if(v[e].level===t&&!n&&(n=v[e]),v[e].levelt.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:c(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:s()}},`getData`),E=e((e,t,n,r,a)=>{let o=s(),l=o.mindmap?.padding??i.mindmap.padding;switch(r){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:l*=2}let u={id:c(t,o)||`kbn`+b++,level:e,label:c(n,o),width:o.mindmap?.maxNodeWidth??i.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(a!==void 0){let e;e=a.includes(` +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(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,`
`),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 S(){this.yy={}}return e(S,`Parser`),S.prototype=x,x.Parser=S,new S})();g.parser=g;var _=g,v=[],y=[],b=0,x={},S=e(()=>{v=[],y=[],b=0,x={}},`clear`),C=e(e=>{if(v.length===0)return null;let t=v[0].level,n=null;for(let e=v.length-1;e>=0;e--)if(v[e].level===t&&!n&&(n=v[e]),v[e].levelt.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:c(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:s()}},`getData`),E=e((e,t,n,r,a)=>{let o=s(),l=o.mindmap?.padding??i.mindmap.padding;switch(r){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:l*=2}let f={id:c(t,o)||`kbn`+b++,level:e,label:c(n,o),width:o.mindmap?.maxNodeWidth??i.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(a!==void 0){let e;e=a.includes(` `)?a+` `:`{ `+a+` -}`;let t=m(e,{schema:h});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`&&(u.shape=t?.shape),t?.label&&(u.label=t?.label),t?.icon&&(u.icon=t?.icon.toString()),t?.assigned&&(u.assigned=t?.assigned.toString()),t?.ticket&&(u.ticket=t?.ticket.toString()),t?.priority&&(u.priority=t?.priority)}let d=C(e);d?u.parentId=d.id||`kbn`+b++:y.push(u),v.push(u)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:e((e,n)=>{switch(t.debug(`In get type`,e,n),e){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:e((e,t)=>{x[e]=t},`setElementForId`),decorateNode:e(e=>{if(!e)return;let t=s(),n=v[v.length-1];e.icon&&(n.icon=c(e.icon,t)),e.class&&(n.cssClasses=c(e.class,t))},`decorateNode`),type2Str:e(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:e(()=>t,`getLogger`),getElementById:e(e=>x[e],`getElementById`)},k={draw:e(async(e,r,a,o)=>{t.debug(`Rendering kanban diagram -`+e);let c=o.db.getData(),u=s();u.htmlLabels=!1;let m=l(r);for(let e of c.nodes)e.domId=`${r}-${e.id}`;let h=m.append(`g`);h.attr(`class`,`sections`);let g=m.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=u?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await p(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=u?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){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 f(g,t,{config:u})).node().getBBox();t.y=i+r.height/2,await d(t),i=t.y+r.height/2+10/2}let o=t.cluster.select(`rect`),s=Math.max(i-r+30,50)+(b-25);o.attr(`height`,s)}n(void 0,m,u.mindmap?.padding??i.kanban.padding,u.mindmap?.useMaxWidth??i.kanban.useMaxWidth)},`draw`)},A=e(t=>{let n=``;for(let e=0;et.darkMode?r(e,n):o(e,n),`adjuster`);for(let e=0;e{switch(t.debug(`In get type`,e,n),e){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:e((e,t)=>{x[e]=t},`setElementForId`),decorateNode:e(e=>{if(!e)return;let t=s(),n=v[v.length-1];e.icon&&(n.icon=c(e.icon,t)),e.class&&(n.cssClasses=c(e.class,t))},`decorateNode`),type2Str:e(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:e(()=>t,`getLogger`),getElementById:e(e=>x[e],`getElementById`)},k={draw:e(async(e,r,a,o)=>{t.debug(`Rendering kanban diagram +`+e);let c=o.db.getData(),u=s();u.htmlLabels=!1;let d=l(r);for(let e of c.nodes)e.domId=`${r}-${e.id}`;let h=d.append(`g`);h.attr(`class`,`sections`);let g=d.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=u?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await m(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=u?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){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 p(g,t,{config:u})).node().getBBox();t.y=i+r.height/2,await f(t),i=t.y+r.height/2+10/2}let o=t.cluster.select(`rect`),s=Math.max(i-r+30,50)+(b-25);o.attr(`height`,s)}n(void 0,d,u.mindmap?.padding??i.kanban.padding,u.mindmap?.useMaxWidth??i.kanban.useMaxWidth)},`draw`)},A=e(t=>{let n=``;for(let e=0;et.darkMode?r(e,n):o(e,n),`adjuster`);for(let e=0;e= 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 h(r)}var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:e(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:e(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:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(m,[2,14],{7:h,11:g}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:h,11:g}),t(_,[2,11]),t(_,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import{b as n,et as r,f as i,k as a,rt as o,tt as s,x as c,z as l}from"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{r as u,t as d}from"./app-chunk-GNY47TPC.js";import{t as f}from"./app-chunk-XXDRQBXY.js";import{t as p}from"./app-chunk-WEXAMYUT.js";var m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function h(e,t=0){return(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+`-`+m[e[t+4]]+m[e[t+5]]+`-`+m[e[t+6]]+m[e[t+7]]+`-`+m[e[t+8]]+m[e[t+9]]+`-`+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase()}var g=new Uint8Array(16);function _(){return crypto.getRandomValues(g)}function v(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():y(e,t,n)}function y(e,t,n){e||={};let r=e.random??e.rng?.()??_();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 h(r)}var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:e(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:e(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:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(m,[2,14],{7:h,11:g}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:h,11:g}),t(_,[2,11]),t(_,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};v.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:e(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:e(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;at[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. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(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 y(){this.yy={}}return e(y,`Parser`),y.prototype=v,v.Parser=y,new y})();b.parser=b;var x=b,S=12,C={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=C,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{e(this,`MindmapDB`)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level0?this.nodes[0]:null}addNode(e,n,r,a){t.info(`addNode`,e,n,r,a);let o=!1;this.nodes.length===0?(this.baseLevel=e,e=0,o=!0):this.baseLevel!==void 0&&(e-=this.baseLevel,o=!1);let s=c(),u=s.mindmap?.padding??i.mindmap.padding;switch(a){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:u*=2}let d={id:this.count++,nodeId:l(n,s),level:e,descr:l(r,s),type:a,children:[],width:s.mindmap?.maxNodeWidth??i.mindmap.maxNodeWidth,padding:u,isRoot:o},f=this.getParent(e);if(f)f.children.push(d),this.nodes.push(d);else if(o)this.nodes.push(d);else throw Error(`There can be only one root. No parent could be found for ("${d.descr}")`)}getType(e,n){switch(t.debug(`In get type`,e,n),e){case`[`:return this.nodeType.RECT;case`(`:return n===`)`?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=c(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=l(e.icon,t)),e.class&&(n.class=l(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%(S-1):t;this.assignSections(r,i)}}flattenNodes(t,n){let r=c(),i=[`mindmap-node`];t.isRoot===!0?i.push(`section-root`,`section--1`):t.section!==void 0&&i.push(`section-${t.section}`),t.class&&i.push(t.class);let a=i.join(` `),o=e(e=>{let t=(r.theme?.toLowerCase()??``).includes(`redux`);switch(e){case C.CIRCLE:return`mindmapCircle`;case C.RECT:return`rect`;case C.ROUNDED_RECT:return`rounded`;case C.CLOUD:return`cloud`;case C.BANG:return`bang`;case C.HEXAGON:return`hexagon`;case C.DEFAULT:return t?`rounded`:`defaultMindmapNode`;case C.NO_BORDER:default:return`rect`}},`getShapeFromType`),s={id:t.id.toString(),domId:`node_`+t.id.toString(),label:t.descr,labelType:`markdown`,isGroup:!1,shape:o(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:a,cssStyles:[],look:r.look,icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(n.push(s),t.children)for(let e of t.children)this.flattenNodes(e,n)}generateEdges(e,t){if(!e.children)return;let n=c();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(),n=c(),r=a().layout!==void 0,i=n;if(r||(i.layout=`cose-bilkent`),!e)return{nodes:[],edges:[],config:i};t.debug(`getData: mindmapRoot`,e,n),this.assignSections(e);let o=[],s=[];this.flattenNodes(e,o),this.generateEdges(e,s),t.debug(`getData: processed ${o.length} nodes and ${s.length} edges`);let l=new Map;for(let e of o)l.set(e.id,{shape:e.shape,width:e.width,height:e.height,padding:e.padding});return{nodes:o,edges:s,config:i,rootNode:e,markers:[`point`],direction:`TB`,nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(l),type:`mindmap`,diagramId:`mindmap-`+v()}}getLogger(){return t}},T={draw:e(async(e,r,a,o)=>{t.debug(`Rendering mindmap diagram -`+e);let s=o.db,c=s.getData(),l=u(r,c.config.securityLevel);if(c.type=o.type,c.layoutAlgorithm=p(c.config.layout,{fallback:`cose-bilkent`}),c.diagramId=r,!s.getMindmap())return;c.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 f(c,l);let{themeVariables:m}=n(),{useGradient:h,gradientStart:g,gradientStop:_}=m;if(h&&g&&_){let e=l.attr(`id`),t=l.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`,g).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,_).attr(`stop-opacity`,1)}d(l,c.config.mindmap?.padding??i.mindmap.padding,`mindmapDiagram`,c.config.mindmap?.useMaxWidth??i.mindmap.useMaxWidth)},`draw`)},E=e(e=>{let{theme:t,look:n}=e,i=``;for(let t=0;t{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 u(c,l);let{themeVariables:m}=n(),{useGradient:h,gradientStart:g,gradientStop:_}=m;if(h&&g&&_){let e=l.attr(`id`),t=l.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`,g).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,_).attr(`stop-opacity`,1)}p(l,c.config.mindmap?.padding??i.mindmap.padding,`mindmapDiagram`,c.config.mindmap?.useMaxWidth??i.mindmap.useMaxWidth)},`draw`)},E=e(e=>{let{theme:t,look:n}=e,i=``;for(let t=0;t{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=t(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=t(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=t(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=t(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(h(e)))},`populateDb`),_={parser:{parse:t(e=>{a.clear(),n.debug(`[PEG Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[PEG Parser] Parsed rules:`,r.rules.length),g(r),n.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{_ as diagram}; \ No newline at end of file +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-6AEJRKK7.js";import{n}from"./app-chunk-747NJXEK.js";import{n as r,r as i,t as a}from"./app-chunk-GTNCS2PH.js";import{t as o}from"./app-chunk-JWPE2WC7.js";import{t as s}from"./app-mermaid-parser.core.js";var c=n().RailroadPeg.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=e(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=e(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=e(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=e(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=e(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=e(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(h(e)))},`populateDb`),_={parser:{parse:e(e=>{a.clear(),t.debug(`[PEG Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new s(n);let r=n.value;t.debug(`[PEG Parser] Parsed rules:`,r.rules.length),g(r),t.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{_ as diagram}; \ No newline at end of file diff --git a/web/dist/app-railroadDiagram-XR7U4H2S.js b/web/dist/app-railroadDiagram-XR7U4H2S.js index f243f535a..1c28847b3 100644 --- a/web/dist/app-railroadDiagram-XR7U4H2S.js +++ b/web/dist/app-railroadDiagram-XR7U4H2S.js @@ -1 +1 @@ -import{n as e}from"./app-chunk-OUJLGHUK.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-6AEJRKK7.js";import{n as r,r as i,t as a}from"./app-chunk-GTNCS2PH.js";import{t as o}from"./app-chunk-JWPE2WC7.js";import{t as s}from"./app-mermaid-parser.core.js";var c=e().Railroad.parser.LangiumParser,l=t(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(u(e)))},`populateDb`),f={parser:{parse:t(e=>{a.clear(),n.debug(`[Railroad Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[Railroad Parser] Parsed rules:`,r.rules.length),d(r),n.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{f as diagram}; \ No newline at end of file +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-6AEJRKK7.js";import{n}from"./app-chunk-OUJLGHUK.js";import{n as r,r as i,t as a}from"./app-chunk-GTNCS2PH.js";import{t as o}from"./app-chunk-JWPE2WC7.js";import{t as s}from"./app-mermaid-parser.core.js";var c=n().Railroad.parser.LangiumParser,l=e(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=e(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(u(e)))},`populateDb`),f={parser:{parse:e(e=>{a.clear(),t.debug(`[Railroad Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new s(n);let r=n.value;t.debug(`[Railroad Parser] Parsed rules:`,r.rules.length),d(r),t.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{f as diagram}; \ No newline at end of file diff --git a/web/dist/app-requirementDiagram-PLB6GJNP.js b/web/dist/app-requirementDiagram-PLB6GJNP.js index 2bde92b74..94e28e2a7 100644 --- a/web/dist/app-requirementDiagram-PLB6GJNP.js +++ b/web/dist/app-requirementDiagram-PLB6GJNP.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import{H as r,U as i,a,b as o,q as s,v as c,w as l,x as u,y as d}from"./app-chunk-O7XYJQB3.js";import{g as f}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import{a as p,i as m,o as h,r as g}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import{t as _}from"./app-chunk-XXDRQBXY.js";import{t as v}from"./app-chunk-WEXAMYUT.js";import"./app-chunk-UA2S7LBM.js";import{r as y,t as b}from"./app-chunk-GNY47TPC.js";var x=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[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],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[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],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(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:e(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:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{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]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{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]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{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]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[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:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e,t}from"./app-chunk-Y2CYZVJY.js";import{m as n}from"./app-src.js";import{H as r,U as i,a,b as o,q as s,v as c,w as l,x as u,y as d}from"./app-chunk-O7XYJQB3.js";import{g as f}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{a as p,i as m,o as h,r as g}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{r as _,t as v}from"./app-chunk-GNY47TPC.js";import{t as y}from"./app-chunk-XXDRQBXY.js";import{t as b}from"./app-chunk-WEXAMYUT.js";var x=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[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],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[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],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(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:e(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:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,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:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{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]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{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]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{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]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[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:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` @@ -81,4 +81,4 @@ Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l background-color: ${r??e.edgeLabelBackground}; } -`},`getStyles`),E={};t(E,{draw:()=>D});var D=e(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing requirement diagram (unified)`,t);let{securityLevel:a,state:o,layout:s,look:c}=u(),l=i.db.getData(),d=_(t,a);l.type=i.type,l.layoutAlgorithm=b(s),l.nodeSpacing=o?.nodeSpacing??50,l.rankSpacing=o?.rankSpacing??50,l.markers=c===`neo`?[`requirement_contains_neo`,`requirement_arrow_neo`]:[`requirement_contains`,`requirement_arrow`],l.diagramId=t,await y(l,d),f.insertTitle(d,`requirementDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),v(d,8,`requirementDiagram`,o?.useMaxWidth??!0)},`draw`),O={parser:S,get db(){return new C},renderer:E,styles:T};export{O as diagram}; \ No newline at end of file +`},`getStyles`),E={};t(E,{draw:()=>D});var D=e(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing requirement diagram (unified)`,t);let{securityLevel:a,state:o,layout:s,look:c}=u(),l=i.db.getData(),d=y(t,a);l.type=i.type,l.layoutAlgorithm=v(s),l.nodeSpacing=o?.nodeSpacing??50,l.rankSpacing=o?.rankSpacing??50,l.markers=c===`neo`?[`requirement_contains_neo`,`requirement_arrow_neo`]:[`requirement_contains`,`requirement_arrow`],l.diagramId=t,await _(l,d),f.insertTitle(d,`requirementDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),b(d,8,`requirementDiagram`,o?.useMaxWidth??!0)},`draw`),O={parser:S,get db(){return new C},renderer:E,styles:T};export{O as diagram}; \ No newline at end of file diff --git a/web/dist/app-sequenceDiagram-PO4LG4MO.js b/web/dist/app-sequenceDiagram-PO4LG4MO.js index e606b65ef..5602e44c0 100644 --- a/web/dist/app-sequenceDiagram-PO4LG4MO.js +++ b/web/dist/app-sequenceDiagram-PO4LG4MO.js @@ -1,4 +1,4 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{A as r,F as i,G as a,H as o,O as s,U as c,a as l,b as u,c as d,i as f,q as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./app-chunk-O7XYJQB3.js";import{t as x}from"./app-dist.js";import{g as S,p as C}from"./app-chunk-ZIGJFQKS.js";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./app-chunk-GWA4HPMP.js";import{n as A,t as j}from"./app-chunk-LNGE3PJU.js";import{t as M}from"./app-chunk-2Q5K7J3B.js";var N=x(),P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[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],ee=[1,74],te=[1,80],L=[1,81],ne=[1,82],re=[1,83],ie=[1,84],ae=[1,85],oe=[1,86],se=[1,87],ce=[1,88],le=[1,89],ue=[1,90],R=[1,91],de=[1,92],fe=[1,93],pe=[1,94],me=[1,95],z=[1,96],B=[1,97],he=[1,98],V=[1,99],H=[1,100],U=[1,101],ge=[1,102],_e=[1,103],ve=[1,104],ye=[1,105],W=[2,78],be=[4,5,17,51,53,54],G=[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],xe=[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],Se=[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],Ce=[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],we=[5,52],K=[70,71,72,73],q=[1,151],Te={trace:e(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:e(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:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([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],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(I,[2,30]),t(I,[2,31]),{33:[1,62]},{35:[1,63]},t(I,[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:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:te,79:L,80:ne,81:re,82:ie,83:ae,84:oe,85:se,86:ce,87:le,88:ue,89:R,90:de,91:fe,92:pe,93:me,94:z,95:B,96:he,97:V,98:H,99:U,100:ge,101:_e,102:ve,103:ye},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},t([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],W),t(I,[2,6]),t(I,[2,16]),t(be,[2,10],{11:114}),t(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(I,[2,22]),{5:[1,118]},{5:[1,119]},t(I,[2,25]),t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,32]),t(I,[2,33]),t(G,a,{7:120}),t(G,a,{7:121}),t(G,a,{7:122}),t(xe,a,{41:123,7:124}),t(Se,a,{43:125,7:126}),t(Se,a,{7:126,43:127}),t(Ce,a,{46:128,7:129}),t(G,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(we,W,{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:F},{69:146,78:te,79:L,80:ne,81:re,82:ie,83:ae,84:oe,85:se,86:ce,87:le,88:ue,89:R,90:de,91:fe,92:pe,93:me,94:z,95:B,96:he,97:V,98:H,99:U,100:ge,101:_e,102:ve,103:ye},t(K,[2,79]),t(K,[2,80]),t(K,[2,81]),t(K,[2,82]),t(K,[2,83]),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(K,[2,89]),t(K,[2,90]),t(K,[2,91]),t(K,[2,92]),t(K,[2,93]),t(K,[2,94]),t(K,[2,95]),t(K,[2,96]),t(K,[2,97]),t(K,[2,98]),t(K,[2,99]),t(K,[2,100]),t(K,[2,101]),t(K,[2,102]),t(K,[2,103]),t(K,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:q},{58:152,104:q},{58:153,104:q},{58:154,104:q},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},t(I,[2,20]),t(I,[2,21]),t(I,[2,23]),t(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},t(I,[2,50]),{16:[1,173]},t(I,[2,55]),t(we,[2,76]),{76:[1,174]},{16:[1,175]},t(I,[2,52]),{16:[1,176]},t(I,[2,57]),t(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:q},{23:181,72:[1,182],73:F},{58:183,104:q},{58:184,104:q},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(I,[2,17]),t(be,[2,11]),{13:186,51:D,53:O,54:k},t(be,[2,13]),t(be,[2,14]),t(I,[2,19]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),{16:[1,187]},t(I,[2,39]),{16:[1,188]},t(I,[2,40]),t(I,[2,41]),{16:[1,189]},t(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:q},{58:196,104:q},{58:197,104:q},{5:[2,75]},{58:198,104:q},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},t(be,[2,12]),t(xe,a,{7:124,41:201}),t(Se,a,{7:126,43:202}),t(Ce,a,{7:129,46:203}),t(I,[2,49]),t(I,[2,54]),t(we,[2,77]),t(I,[2,51]),t(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:q},{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:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{A as r,F as i,G as a,H as o,O as s,U as c,a as l,b as u,c as d,i as f,q as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./app-chunk-O7XYJQB3.js";import{t as x}from"./app-dist.js";import{g as S,p as C}from"./app-chunk-ZIGJFQKS.js";import{n as w,t as T}from"./app-chunk-LNGE3PJU.js";import{a as E,c as D,i as O,n as k,r as A,s as j}from"./app-chunk-GWA4HPMP.js";import{t as M}from"./app-chunk-2Q5K7J3B.js";var N=x(),P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[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],ee=[1,74],te=[1,80],L=[1,81],ne=[1,82],re=[1,83],ie=[1,84],ae=[1,85],oe=[1,86],se=[1,87],ce=[1,88],le=[1,89],ue=[1,90],R=[1,91],de=[1,92],fe=[1,93],pe=[1,94],me=[1,95],z=[1,96],B=[1,97],he=[1,98],V=[1,99],H=[1,100],U=[1,101],ge=[1,102],_e=[1,103],ve=[1,104],ye=[1,105],W=[2,78],be=[4,5,17,51,53,54],G=[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],xe=[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],Se=[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],Ce=[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],we=[5,52],K=[70,71,72,73],q=[1,151],Te={trace:e(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:e(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:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([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],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(I,[2,30]),t(I,[2,31]),{33:[1,62]},{35:[1,63]},t(I,[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:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:te,79:L,80:ne,81:re,82:ie,83:ae,84:oe,85:se,86:ce,87:le,88:ue,89:R,90:de,91:fe,92:pe,93:me,94:z,95:B,96:he,97:V,98:H,99:U,100:ge,101:_e,102:ve,103:ye},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},t([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],W),t(I,[2,6]),t(I,[2,16]),t(be,[2,10],{11:114}),t(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(I,[2,22]),{5:[1,118]},{5:[1,119]},t(I,[2,25]),t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,32]),t(I,[2,33]),t(G,a,{7:120}),t(G,a,{7:121}),t(G,a,{7:122}),t(xe,a,{41:123,7:124}),t(Se,a,{43:125,7:126}),t(Se,a,{7:126,43:127}),t(Ce,a,{46:128,7:129}),t(G,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(we,W,{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:F},{69:146,78:te,79:L,80:ne,81:re,82:ie,83:ae,84:oe,85:se,86:ce,87:le,88:ue,89:R,90:de,91:fe,92:pe,93:me,94:z,95:B,96:he,97:V,98:H,99:U,100:ge,101:_e,102:ve,103:ye},t(K,[2,79]),t(K,[2,80]),t(K,[2,81]),t(K,[2,82]),t(K,[2,83]),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(K,[2,89]),t(K,[2,90]),t(K,[2,91]),t(K,[2,92]),t(K,[2,93]),t(K,[2,94]),t(K,[2,95]),t(K,[2,96]),t(K,[2,97]),t(K,[2,98]),t(K,[2,99]),t(K,[2,100]),t(K,[2,101]),t(K,[2,102]),t(K,[2,103]),t(K,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:q},{58:152,104:q},{58:153,104:q},{58:154,104:q},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},t(I,[2,20]),t(I,[2,21]),t(I,[2,23]),t(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},t(I,[2,50]),{16:[1,173]},t(I,[2,55]),t(we,[2,76]),{76:[1,174]},{16:[1,175]},t(I,[2,52]),{16:[1,176]},t(I,[2,57]),t(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:q},{23:181,72:[1,182],73:F},{58:183,104:q},{58:184,104:q},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(I,[2,17]),t(be,[2,11]),{13:186,51:D,53:O,54:k},t(be,[2,13]),t(be,[2,14]),t(I,[2,19]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),{16:[1,187]},t(I,[2,39]),{16:[1,188]},t(I,[2,40]),t(I,[2,41]),{16:[1,189]},t(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:q},{58:196,104:q},{58:197,104:q},{5:[2,75]},{58:198,104:q},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},t(be,[2,12]),t(xe,a,{7:124,41:201}),t(Se,a,{7:126,43:202}),t(Ce,a,{7:129,46:203}),t(I,[2,49]),t(I,[2,54]),t(we,[2,77]),t(I,[2,51]),t(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:q},{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:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Te.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` @@ -7,7 +7,7 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l `)?i+` `:`{ `+i+` -}`,o=A(e,{schema:j})}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>-`,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?v().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),l()}parseMessage(e){let n=e.trim(),{wrap:r,cleanedText:i}=this.extractWrap(n),a={text:i,wrap:r};return t.debug(`parseMessage: ${JSON.stringify(a)}`),a}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?b(a,v()):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,n){let r=this.getActor(e);try{let e=b(n.text,v());e=e.replace(/=/g,`=`),e=e.replace(/&/g,`&`);let t=JSON.parse(e);this.insertLinks(r,t)}catch(e){t.error(`error while parsing actor link text`,e)}}addALink(e,n){let r=this.getActor(e);try{let e={},t=b(n.text,v()),i=t.indexOf(`@`);t=t.replace(/=/g,`=`),t=t.replace(/&/g,`&`);let a=t.slice(0,i-1).trim();e[a]=t.slice(i+1).trim(),this.insertLinks(r,e)}catch(e){t.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,n){let r=this.getActor(e);try{let e=b(n.text,v()),t=JSON.parse(e);this.insertProperties(r,t)}catch(e){t.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,n){let r=this.getActor(e),i=document.getElementById(n.text);try{let e=i.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(r,t.properties),t.links&&this.insertLinks(r,t.links)}catch(e){t.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`:c(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 v().sequence}},re=e(e=>{let t=e.dropShadow??`none`,{look:n}=v();return`.actor { +}`,o=w(e,{schema:T})}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>-`,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?v().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),l()}parseMessage(e){let n=e.trim(),{wrap:r,cleanedText:i}=this.extractWrap(n),a={text:i,wrap:r};return t.debug(`parseMessage: ${JSON.stringify(a)}`),a}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?b(a,v()):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,n){let r=this.getActor(e);try{let e=b(n.text,v());e=e.replace(/=/g,`=`),e=e.replace(/&/g,`&`);let t=JSON.parse(e);this.insertLinks(r,t)}catch(e){t.error(`error while parsing actor link text`,e)}}addALink(e,n){let r=this.getActor(e);try{let e={},t=b(n.text,v()),i=t.indexOf(`@`);t=t.replace(/=/g,`=`),t=t.replace(/&/g,`&`);let a=t.slice(0,i-1).trim();e[a]=t.slice(i+1).trim(),this.insertLinks(r,e)}catch(e){t.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,n){let r=this.getActor(e);try{let e=b(n.text,v()),t=JSON.parse(e);this.insertProperties(r,t)}catch(e){t.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,n){let r=this.getActor(e),i=document.getElementById(n.text);try{let e=i.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(r,t.properties),t.links&&this.insertLinks(r,t.links)}catch(e){t.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`:c(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 v().sequence}},re=e(e=>{let t=e.dropShadow??`none`,{look:n}=v();return`.actor { stroke: ${e.actorBorder}; fill: ${e.actorBkg}; stroke-width: ${e.strokeWidth??1}; @@ -153,17 +153,17 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l filter: ${t}; stroke: ${e.nodeBorder}; } -`},`getStyles`),ie=44,ae=6,oe=6,se=e((e,t)=>e.actorTextHeight??S.calculateTextDimensions(e.description??``,{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}).height,`actorLabelHeight`),ce=e(e=>ie+ae+e+oe,`actorStackHeight`),le=e((e,t,n)=>{let r=e+t,i=r-oe-n/2;return{lifelineStartY:r,glyphBottomY:r-oe-n-ae,labelCenterY:i}},`headerBands`),ue=e((e,t)=>{let n=e+oe,r=n+ie;return{glyphTopY:n,glyphBottomY:r,labelCenterY:r+ae+t/2,stackHeight:ce(t)}},`footerBands`),R=36,de=-5,fe=60,pe=fe-de,me=e((e,t,n,r)=>{if(t.look!==`neo`)return null;let i=se(e,t);return n?ue(r,i):le(r,e.height,i)},`neoBands`),z=`actor-top`,B=`actor-bottom`,he=`actor-box`,V=`actor-man`,H=new Set([`redux-color`,`redux-dark-color`]),U=e((e,t)=>e?.length?e[t%e.length]:void 0,`paletteColor`),ge=e(function(e,t){let n=w(e,t);return u().look===`neo`&&n.attr(`data-look`,`neo`),n},`drawRect`),_e=e(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 c=`none`;i&&(c=`block !important`);let l=e.append(`g`);l.attr(`id`,`actor`+o+`_popup`),l.attr(`class`,`actorPopupMenu`),l.attr(`display`,c);var u=``;s.class!==void 0&&(u=` `+s.class);let d=s.width>n?s.width:n,f=l.append(`rect`);if(f.attr(`class`,`actorPopupMenuPanel`+u),f.attr(`x`,s.x),f.attr(`y`,s.height),f.attr(`fill`,s.fill),f.attr(`stroke`,s.stroke),f.attr(`width`,d),f.attr(`height`,s.height),f.attr(`rx`,s.rx),f.attr(`ry`,s.ry),a!=null){var p=20;for(let e in a){var m=l.append(`a`),h=(0,N.sanitizeUrl)(a[e]);m.attr(`xlink:href`,h),m.attr(`target`,`_blank`),We(r)(e,m,s.x+10,s.height+p,d,20,{class:`actor`},r),p+=30}}return f.attr(`height`,p),{height:s.height+p,width:d}},`drawPopup`),ve=e(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),ye=e(async function(e,t,n=null){let r=e.append(`foreignObject`),a=await i(t.text,u()),o=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(a).node().getBoundingClientRect();if(r.attr(`height`,Math.round(o.height)).attr(`width`,Math.round(o.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,o.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-o.width/2)).attr(`y`,Math.round(i.y+i.height/2-o.height/2))}else if(n){let{startx:e,stopx:i,starty:a}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-o.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(a)):r.attr(`y`,Math.round(a-o.height))}return[r]},`drawKatex`),W=e(function(t,n){let r=0,i=0,a=n.text.split(h.lineBreakRegex),[o,s]=C(n.fontSize),c=[],l=0,u=e(()=>n.y,`yfunc`);if(n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0)switch(n.valign){case`top`:case`start`:u=e(()=>Math.round(n.y+n.textMargin),`yfunc`);break;case`middle`:case`center`:u=e(()=>Math.round(n.y+(r+i+n.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:u=e(()=>Math.round(n.y+(r+i+2*n.textMargin)-n.textMargin),`yfunc`)}if(n.anchor!==void 0&&n.textMargin!==void 0&&n.width!==void 0)switch(n.anchor){case`left`:case`start`:n.x=Math.round(n.x+n.textMargin),n.anchor=`start`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`middle`:case`center`:n.x=Math.round(n.x+n.width/2),n.anchor=`middle`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`right`:case`end`:n.x=Math.round(n.x+n.width-n.textMargin),n.anchor=`end`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`}for(let[e,d]of a.entries()){n.textMargin!==void 0&&n.textMargin===0&&o!==void 0&&(l=e*o);let a=t.append(`text`);a.attr(`x`,n.x),a.attr(`y`,u()),n.anchor!==void 0&&a.attr(`text-anchor`,n.anchor).attr(`dominant-baseline`,n.dominantBaseline).attr(`alignment-baseline`,n.alignmentBaseline),n.fontFamily!==void 0&&a.style(`font-family`,n.fontFamily),s!==void 0&&a.style(`font-size`,s),n.fontWeight!==void 0&&a.style(`font-weight`,n.fontWeight),n.fill!==void 0&&a.attr(`fill`,n.fill),n.class!==void 0&&a.attr(`class`,n.class),n.dy===void 0?l!==0&&a.attr(`dy`,l):a.attr(`dy`,n.dy);let f=d||`​`;if(n.tspan){let e=a.append(`tspan`);e.attr(`x`,n.x),n.fill!==void 0&&e.attr(`fill`,n.fill),e.text(f)}else a.text(f);n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0&&(i+=(a._groups||a)[0][0].getBBox().height,r=i),c.push(a)}return c},`drawText`),be=e(function(t,n){function r(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)}e(r,`genPoints`);let i=t.append(`polygon`);return i.attr(`points`,r(n.x,n.y,n.width,n.height,7)),i.attr(`class`,`labelBox`),n.y+=n.height/2,W(t,n),i},`drawLabel`),G=-1,xe=e((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`),Se=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=s+t.height,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m}=f,h=e.append(`g`).lower();var g=h;i||(G++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ve(`actor${G}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).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=G,t.links!=null&&g.attr(`id`,`root-`+G),u===`neo`&&g.attr(`data-look`,`neo`));let _=k();var v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,v+=i?` ${B}`:` ${z}`,_.x=t.x,_.y=s,_.width=t.width,_.height=t.height,_.class=v,_.rx=3,_.ry=3,_.name=t.name,u===`neo`&&(_.rx=6,_.ry=6);let y=ge(g,_),b=o.get(t.name)??0;if(H.has(d)&&(y.style(`stroke`,U(m,b)),y.style(`fill`,U(p,b))),u===`neo`&&y.attr(`filter`,`url(#${J(a)})`),t.rectData=_,t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?O(g,_.x+_.width-20,_.y+10,e.substr(1)):E(g,_.x+_.width-20,_.y+10,e)}i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`participant`),g.attr(`data-id`,t.name)),Y(n,r(t.description))(t.description,g,_.x,_.y,_.width,_.height,{class:`actor ${he}`},n);let x=t.height;if(y.node){let e=y.node().getBBox();n.look!==`neo`&&(t.height=e.height,x=e.height)}return x},`drawActorTypeParticipant`),Ce=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=s+t.height,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m}=f,h=e.append(`g`).lower();var g=h;i||(G++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ve(`actor${G}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).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=G,t.links!=null&&g.attr(`id`,`root-`+G),u===`neo`&&g.attr(`data-look`,`neo`));let _=k();var v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,v+=i?` ${B}`:` ${z}`,_.x=t.x,_.y=s,_.width=t.width,_.height=t.height,_.class=v,_.name=t.name,n.look===`neo`&&(_.height=t.height-6);let y={..._,x:_.x+-6,y:_.y+6,class:`actor`},b=ge(g,_),x=ge(g,y);t.rectData=_,u===`neo`&&g.attr(`filter`,`url(#${J(a)})`);let S=o.get(t.name)??0;if(H.has(d)&&(b.style(`stroke`,U(m,S)),b.style(`fill`,U(p,S)),x.style(`stroke`,U(m,S)),x.style(`fill`,U(p,S))),t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?O(g,_.x+_.width-20,_.y+10,e.substr(1)):E(g,_.x+_.width-20,_.y+10,e)}Y(n,r(t.description))(t.description,g,_.x-6,_.y+6,_.width,_.height,{class:`actor ${he}`},n);let C=t.height;if(b.node){let e=b.node().getBBox();n.look!==`neo`&&(t.height=e.height,C=e.height)}return i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`collections`),g.attr(`data-id`,t.name)),C},`drawActorTypeCollections`),we=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=s+t.height,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m}=f,h=e.append(`g`).lower(),g=h;i||(G++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ve(`actor${G}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).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=G,t.links!=null&&g.attr(`id`,`root-`+G),u===`neo`&&g.attr(`data-look`,`neo`));let _=k(),v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,v+=i?` ${B}`:` ${z}`,g.attr(`class`,v),_.x=t.x,_.y=s,_.width=t.width,_.height=t.height,_.name=t.name;let y=_.height/2,b=y/(2.5+_.height/50),x=g.append(`g`),S=g.append(`g`),C=`M ${_.x},${_.y+y} +`},`getStyles`),ie=44,ae=6,oe=6,se=e((e,t)=>e.actorTextHeight??S.calculateTextDimensions(e.description??``,{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}).height,`actorLabelHeight`),ce=e(e=>ie+ae+e+oe,`actorStackHeight`),le=e((e,t,n)=>{let r=e+t,i=r-oe-n/2;return{lifelineStartY:r,glyphBottomY:r-oe-n-ae,labelCenterY:i}},`headerBands`),ue=e((e,t)=>{let n=e+oe,r=n+ie;return{glyphTopY:n,glyphBottomY:r,labelCenterY:r+ae+t/2,stackHeight:ce(t)}},`footerBands`),R=36,de=-5,fe=60,pe=fe-de,me=e((e,t,n,r)=>{if(t.look!==`neo`)return null;let i=se(e,t);return n?ue(r,i):le(r,e.height,i)},`neoBands`),z=`actor-top`,B=`actor-bottom`,he=`actor-box`,V=`actor-man`,H=new Set([`redux-color`,`redux-dark-color`]),U=e((e,t)=>e?.length?e[t%e.length]:void 0,`paletteColor`),ge=e(function(e,t){let n=E(e,t);return u().look===`neo`&&n.attr(`data-look`,`neo`),n},`drawRect`),_e=e(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 c=`none`;i&&(c=`block !important`);let l=e.append(`g`);l.attr(`id`,`actor`+o+`_popup`),l.attr(`class`,`actorPopupMenu`),l.attr(`display`,c);var u=``;s.class!==void 0&&(u=` `+s.class);let d=s.width>n?s.width:n,f=l.append(`rect`);if(f.attr(`class`,`actorPopupMenuPanel`+u),f.attr(`x`,s.x),f.attr(`y`,s.height),f.attr(`fill`,s.fill),f.attr(`stroke`,s.stroke),f.attr(`width`,d),f.attr(`height`,s.height),f.attr(`rx`,s.rx),f.attr(`ry`,s.ry),a!=null){var p=20;for(let e in a){var m=l.append(`a`),h=(0,N.sanitizeUrl)(a[e]);m.attr(`xlink:href`,h),m.attr(`target`,`_blank`),We(r)(e,m,s.x+10,s.height+p,d,20,{class:`actor`},r),p+=30}}return f.attr(`height`,p),{height:s.height+p,width:d}},`drawPopup`),ve=e(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),ye=e(async function(e,t,n=null){let r=e.append(`foreignObject`),a=await i(t.text,u()),o=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(a).node().getBoundingClientRect();if(r.attr(`height`,Math.round(o.height)).attr(`width`,Math.round(o.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,o.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-o.width/2)).attr(`y`,Math.round(i.y+i.height/2-o.height/2))}else if(n){let{startx:e,stopx:i,starty:a}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-o.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(a)):r.attr(`y`,Math.round(a-o.height))}return[r]},`drawKatex`),W=e(function(t,n){let r=0,i=0,a=n.text.split(h.lineBreakRegex),[o,s]=C(n.fontSize),c=[],l=0,u=e(()=>n.y,`yfunc`);if(n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0)switch(n.valign){case`top`:case`start`:u=e(()=>Math.round(n.y+n.textMargin),`yfunc`);break;case`middle`:case`center`:u=e(()=>Math.round(n.y+(r+i+n.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:u=e(()=>Math.round(n.y+(r+i+2*n.textMargin)-n.textMargin),`yfunc`)}if(n.anchor!==void 0&&n.textMargin!==void 0&&n.width!==void 0)switch(n.anchor){case`left`:case`start`:n.x=Math.round(n.x+n.textMargin),n.anchor=`start`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`middle`:case`center`:n.x=Math.round(n.x+n.width/2),n.anchor=`middle`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`right`:case`end`:n.x=Math.round(n.x+n.width-n.textMargin),n.anchor=`end`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`}for(let[e,d]of a.entries()){n.textMargin!==void 0&&n.textMargin===0&&o!==void 0&&(l=e*o);let a=t.append(`text`);a.attr(`x`,n.x),a.attr(`y`,u()),n.anchor!==void 0&&a.attr(`text-anchor`,n.anchor).attr(`dominant-baseline`,n.dominantBaseline).attr(`alignment-baseline`,n.alignmentBaseline),n.fontFamily!==void 0&&a.style(`font-family`,n.fontFamily),s!==void 0&&a.style(`font-size`,s),n.fontWeight!==void 0&&a.style(`font-weight`,n.fontWeight),n.fill!==void 0&&a.attr(`fill`,n.fill),n.class!==void 0&&a.attr(`class`,n.class),n.dy===void 0?l!==0&&a.attr(`dy`,l):a.attr(`dy`,n.dy);let f=d||`​`;if(n.tspan){let e=a.append(`tspan`);e.attr(`x`,n.x),n.fill!==void 0&&e.attr(`fill`,n.fill),e.text(f)}else a.text(f);n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0&&(i+=(a._groups||a)[0][0].getBBox().height,r=i),c.push(a)}return c},`drawText`),be=e(function(t,n){function r(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)}e(r,`genPoints`);let i=t.append(`polygon`);return i.attr(`points`,r(n.x,n.y,n.width,n.height,7)),i.attr(`class`,`labelBox`),n.y+=n.height/2,W(t,n),i},`drawLabel`),G=-1,xe=e((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`),Se=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=s+t.height,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m}=f,h=e.append(`g`).lower();var g=h;i||(G++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ve(`actor${G}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).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=G,t.links!=null&&g.attr(`id`,`root-`+G),u===`neo`&&g.attr(`data-look`,`neo`));let _=j();var v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,v+=i?` ${B}`:` ${z}`,_.x=t.x,_.y=s,_.width=t.width,_.height=t.height,_.class=v,_.rx=3,_.ry=3,_.name=t.name,u===`neo`&&(_.rx=6,_.ry=6);let y=ge(g,_),b=o.get(t.name)??0;if(H.has(d)&&(y.style(`stroke`,U(m,b)),y.style(`fill`,U(p,b))),u===`neo`&&y.attr(`filter`,`url(#${J(a)})`),t.rectData=_,t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?A(g,_.x+_.width-20,_.y+10,e.substr(1)):O(g,_.x+_.width-20,_.y+10,e)}i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`participant`),g.attr(`data-id`,t.name)),Y(n,r(t.description))(t.description,g,_.x,_.y,_.width,_.height,{class:`actor ${he}`},n);let x=t.height;if(y.node){let e=y.node().getBBox();n.look!==`neo`&&(t.height=e.height,x=e.height)}return x},`drawActorTypeParticipant`),Ce=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=s+t.height,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m}=f,h=e.append(`g`).lower();var g=h;i||(G++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ve(`actor${G}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).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=G,t.links!=null&&g.attr(`id`,`root-`+G),u===`neo`&&g.attr(`data-look`,`neo`));let _=j();var v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,v+=i?` ${B}`:` ${z}`,_.x=t.x,_.y=s,_.width=t.width,_.height=t.height,_.class=v,_.name=t.name,n.look===`neo`&&(_.height=t.height-6);let y={..._,x:_.x+-6,y:_.y+6,class:`actor`},b=ge(g,_),x=ge(g,y);t.rectData=_,u===`neo`&&g.attr(`filter`,`url(#${J(a)})`);let S=o.get(t.name)??0;if(H.has(d)&&(b.style(`stroke`,U(m,S)),b.style(`fill`,U(p,S)),x.style(`stroke`,U(m,S)),x.style(`fill`,U(p,S))),t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?A(g,_.x+_.width-20,_.y+10,e.substr(1)):O(g,_.x+_.width-20,_.y+10,e)}Y(n,r(t.description))(t.description,g,_.x-6,_.y+6,_.width,_.height,{class:`actor ${he}`},n);let C=t.height;if(b.node){let e=b.node().getBBox();n.look!==`neo`&&(t.height=e.height,C=e.height)}return i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`collections`),g.attr(`data-id`,t.name)),C},`drawActorTypeCollections`),we=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=s+t.height,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m}=f,h=e.append(`g`).lower(),g=h;i||(G++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ve(`actor${G}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).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=G,t.links!=null&&g.attr(`id`,`root-`+G),u===`neo`&&g.attr(`data-look`,`neo`));let _=j(),v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,v+=i?` ${B}`:` ${z}`,g.attr(`class`,v),_.x=t.x,_.y=s,_.width=t.width,_.height=t.height,_.name=t.name;let y=_.height/2,b=y/(2.5+_.height/50),x=g.append(`g`),S=g.append(`g`),C=`M ${_.x},${_.y+y} a ${b},${y} 0 0 0 0,${_.height} h ${_.width-2*b} a ${b},${y} 0 0 0 0,-${_.height} Z `;x.append(`path`).attr(`d`,C),S.append(`path`).attr(`d`,`M ${_.x},${_.y+y} - a ${b},${y} 0 0 0 0,${_.height}`),x.attr(`transform`,`translate(${b}, ${-(_.height/2)})`),S.attr(`transform`,`translate(${_.width-b}, ${-_.height/2})`),t.rectData=_,u===`neo`&&x.attr(`filter`,`url(#${J(a)})`);let w=o.get(t.name)??0;if(H.has(d)&&(x.style(`stroke`,U(m,w)),x.style(`fill`,U(p,w)),S.style(`stroke`,U(m,w)),S.style(`fill`,U(p,w))),t.properties?.icon){let e=t.properties.icon.trim(),n=_.x+_.width-20,r=_.y+10;e.charAt(0)===`@`?O(g,n,r,e.substr(1)):E(g,n,r,e)}Y(n,r(t.description))(t.description,g,_.x,_.y,_.width,_.height,{class:`actor ${he}`},n);let T=t.height,D=x.select(`path:last-child`);if(D.node()){let e=D.node().getBBox();n.look!==`neo`&&(t.height=e.height,T=e.height)}return i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`queue`),g.attr(`data-id`,t.name)),T},`drawActorTypeQueue`),K=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=me(t,n,i,s),u=l?l.lifelineStartY:s+75,{look:d,theme:f,themeVariables:p}=n,{bkgColorArray:m,borderColorArray:h,actorBorder:g,actorBkg:_}=p,v=e.append(`g`).lower();i||(G++,v.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).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=G);let y=e.append(`g`),b=V;b+=i?` ${B}`:` ${z}`,y.attr(`class`,b),y.attr(`name`,t.name);let x=k();x.x=t.x,x.y=s,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height,x.class=`actor`;let S=t.x+t.width/2,C=l?l.glyphBottomY-22:s+32;y.append(`defs`).append(`marker`).attr(`id`,a+`-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`),y.append(`circle`).attr(`cx`,S).attr(`cy`,C).attr(`r`,22).attr(`filter`,`${d===`neo`?`url(#${J(a)})`:``}`),y.append(`line`).attr(`marker-end`,`url(#`+a+`-filled-head-control)`).attr(`transform`,`translate(${S}, ${C-22})`);let w=o.get(t.name)??0;return H.has(f)?(y.style(`stroke`,U(h,w)),y.style(`fill`,U(m,w))):(y.style(`stroke`,g),y.style(`fill`,_)),l||(t.height=y.node().getBBox().height+2*(n?.sequence?.labelBoxHeight??0)),Y(n,r(t.description))(t.description,y,x.x,l?l.labelCenterY-x.height/2:x.y+22+(i?5:12),x.width,x.height,{class:`actor ${V}`},n),i||(y.attr(`data-et`,`participant`),y.attr(`data-type`,`control`),y.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),q=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=me(t,n,i,s),u=l?l.lifelineStartY:s+75,{look:d,theme:f,themeVariables:p}=n,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower(),_=e.append(`g`),v=`actor`;v+=i?` ${B}`:` ${z}`,_.attr(`class`,v),_.attr(`name`,t.name);let y=k();y.x=t.x,y.y=s,y.fill=`#eaeaea`,y.width=t.width,y.height=t.height,y.class=`actor`;let b=t.x+t.width/2,x=l?l.glyphBottomY-22:s+(i?10:25);_.append(`circle`).attr(`cx`,b).attr(`cy`,x).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),_.append(`line`).attr(`x1`,b-22).attr(`x2`,b+22).attr(`y1`,x+22).attr(`y2`,x+22).attr(`stroke-width`,2),d===`neo`&&_.attr(`filter`,`url(#${J(a)})`);let S=o.get(t.name)??0;return H.has(f)&&(_.style(`stroke`,U(h,S)),_.style(`fill`,U(m,S))),l||(t.height=_.node().getBBox().height+(n?.sequence?.labelBoxHeight??0)),i||(G++,g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).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=G),Y(n,r(t.description))(t.description,_,y.x,l?l.labelCenterY-y.height/2:y.y+(i?15:30),y.width,y.height,{class:`actor ${V}`},n),l||_.attr(`transform`,`translate(0, ${i?22:22/2-5})`),i||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`entity`),_.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),Te=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=me(t,n,i,s),u=l?l.lifelineStartY:s+t.height+2*n.boxTextMargin,{theme:d,themeVariables:f,look:p}=n,{bkgColorArray:m,borderColorArray:h,actorBorder:g}=f,_=e.append(`g`).lower(),v=_;i||(G++,Object.keys(t.links||{}).length&&!n.forceMenus&&v.attr(`onclick`,ve(`actor${G}_popup`)).attr(`cursor`,`pointer`),v.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).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),v=_.append(`g`),t.actorCnt=G,t.links!=null&&v.attr(`id`,`root-`+G),p===`neo`&&v.attr(`data-look`,`neo`));let y=k(),b=`actor`;t.properties?.class?b=t.properties.class:y.fill=`#eaeaea`,b+=i?` ${B}`:` ${z}`,y.x=t.x,y.y=s,y.width=t.width,y.height=t.height,y.class=b,y.name=t.name,y.x=t.x,y.y=s;let x=y.width/3,S=x/2,C=S/(2.5+x/50),w=l?ie:y.width/3,T=l?l.glyphBottomY-w-C:y.y,E=v.append(`g`);E.attr(`class`,b);let D=` + a ${b},${y} 0 0 0 0,${_.height}`),x.attr(`transform`,`translate(${b}, ${-(_.height/2)})`),S.attr(`transform`,`translate(${_.width-b}, ${-_.height/2})`),t.rectData=_,u===`neo`&&x.attr(`filter`,`url(#${J(a)})`);let w=o.get(t.name)??0;if(H.has(d)&&(x.style(`stroke`,U(m,w)),x.style(`fill`,U(p,w)),S.style(`stroke`,U(m,w)),S.style(`fill`,U(p,w))),t.properties?.icon){let e=t.properties.icon.trim(),n=_.x+_.width-20,r=_.y+10;e.charAt(0)===`@`?A(g,n,r,e.substr(1)):O(g,n,r,e)}Y(n,r(t.description))(t.description,g,_.x,_.y,_.width,_.height,{class:`actor ${he}`},n);let T=t.height,E=x.select(`path:last-child`);if(E.node()){let e=E.node().getBBox();n.look!==`neo`&&(t.height=e.height,T=e.height)}return i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`queue`),g.attr(`data-id`,t.name)),T},`drawActorTypeQueue`),K=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=me(t,n,i,s),u=l?l.lifelineStartY:s+75,{look:d,theme:f,themeVariables:p}=n,{bkgColorArray:m,borderColorArray:h,actorBorder:g,actorBkg:_}=p,v=e.append(`g`).lower();i||(G++,v.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).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=G);let y=e.append(`g`),b=V;b+=i?` ${B}`:` ${z}`,y.attr(`class`,b),y.attr(`name`,t.name);let x=j();x.x=t.x,x.y=s,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height,x.class=`actor`;let S=t.x+t.width/2,C=l?l.glyphBottomY-22:s+32;y.append(`defs`).append(`marker`).attr(`id`,a+`-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`),y.append(`circle`).attr(`cx`,S).attr(`cy`,C).attr(`r`,22).attr(`filter`,`${d===`neo`?`url(#${J(a)})`:``}`),y.append(`line`).attr(`marker-end`,`url(#`+a+`-filled-head-control)`).attr(`transform`,`translate(${S}, ${C-22})`);let w=o.get(t.name)??0;return H.has(f)?(y.style(`stroke`,U(h,w)),y.style(`fill`,U(m,w))):(y.style(`stroke`,g),y.style(`fill`,_)),l||(t.height=y.node().getBBox().height+2*(n?.sequence?.labelBoxHeight??0)),Y(n,r(t.description))(t.description,y,x.x,l?l.labelCenterY-x.height/2:x.y+22+(i?5:12),x.width,x.height,{class:`actor ${V}`},n),i||(y.attr(`data-et`,`participant`),y.attr(`data-type`,`control`),y.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),q=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=me(t,n,i,s),u=l?l.lifelineStartY:s+75,{look:d,theme:f,themeVariables:p}=n,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower(),_=e.append(`g`),v=`actor`;v+=i?` ${B}`:` ${z}`,_.attr(`class`,v),_.attr(`name`,t.name);let y=j();y.x=t.x,y.y=s,y.fill=`#eaeaea`,y.width=t.width,y.height=t.height,y.class=`actor`;let b=t.x+t.width/2,x=l?l.glyphBottomY-22:s+(i?10:25);_.append(`circle`).attr(`cx`,b).attr(`cy`,x).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),_.append(`line`).attr(`x1`,b-22).attr(`x2`,b+22).attr(`y1`,x+22).attr(`y2`,x+22).attr(`stroke-width`,2),d===`neo`&&_.attr(`filter`,`url(#${J(a)})`);let S=o.get(t.name)??0;return H.has(f)&&(_.style(`stroke`,U(h,S)),_.style(`fill`,U(m,S))),l||(t.height=_.node().getBBox().height+(n?.sequence?.labelBoxHeight??0)),i||(G++,g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).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=G),Y(n,r(t.description))(t.description,_,y.x,l?l.labelCenterY-y.height/2:y.y+(i?15:30),y.width,y.height,{class:`actor ${V}`},n),l||_.attr(`transform`,`translate(0, ${i?22:22/2-5})`),i||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`entity`),_.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),Te=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=me(t,n,i,s),u=l?l.lifelineStartY:s+t.height+2*n.boxTextMargin,{theme:d,themeVariables:f,look:p}=n,{bkgColorArray:m,borderColorArray:h,actorBorder:g}=f,_=e.append(`g`).lower(),v=_;i||(G++,Object.keys(t.links||{}).length&&!n.forceMenus&&v.attr(`onclick`,ve(`actor${G}_popup`)).attr(`cursor`,`pointer`),v.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).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),v=_.append(`g`),t.actorCnt=G,t.links!=null&&v.attr(`id`,`root-`+G),p===`neo`&&v.attr(`data-look`,`neo`));let y=j(),b=`actor`;t.properties?.class?b=t.properties.class:y.fill=`#eaeaea`,b+=i?` ${B}`:` ${z}`,y.x=t.x,y.y=s,y.width=t.width,y.height=t.height,y.class=b,y.name=t.name,y.x=t.x,y.y=s;let x=y.width/3,S=x/2,C=S/(2.5+x/50),w=l?ie:y.width/3,T=l?l.glyphBottomY-w-C:y.y,E=v.append(`g`);E.attr(`class`,b);let D=` M ${y.x},${T+C} a ${S},${C} 0 0 0 ${x},0 a ${S},${C} 0 0 0 -${x},0 l 0,${w-2*C} a ${S},${C} 0 0 0 ${x},0 l 0,-${w-2*C} -`;E.append(`path`).attr(`d`,D),p===`neo`&&E.attr(`filter`,`url(#${J(a)})`);let O=o.get(t.name)??0;if(H.has(d)?(E.style(`stroke`,U(h,O)),E.style(`fill`,U(m,O))):E.style(`stroke`,g),E.attr(`transform`,`translate(${x}, ${C})`),t.rectData=y,Y(n,r(t.description))(t.description,v,y.x,l?l.labelCenterY-y.height/2:y.y+35,y.width,y.height,{class:`actor ${he}`},n),!l){let e=E.select(`path:last-child`);e.node()&&(t.height=e.node().getBBox().height+(n.sequence.labelBoxHeight??0))}return i||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`database`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),Ee=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=me(t,n,i,s),u=l?l.lifelineStartY:s+80,d=l?l.glyphBottomY-22:s+12,f=e.append(`g`).lower(),{look:p,theme:m,themeVariables:h}=n,{bkgColorArray:g,borderColorArray:_,actorBorder:v}=h;i||(G++,f.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).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=G);let y=e.append(`g`),b=V;b+=i?` ${B}`:` ${z}`,y.attr(`class`,b),y.attr(`name`,t.name);let x=k();x.x=t.x,x.y=s,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height,x.class=`actor`,y.append(`line`).attr(`id`,`actor-man-torso`+G).attr(`x1`,t.x+t.width/2-55).attr(`y1`,d).attr(`x2`,t.x+t.width/2-15).attr(`y2`,d),y.append(`line`).attr(`id`,`actor-man-arms`+G).attr(`x1`,t.x+t.width/2-55).attr(`y1`,d-10).attr(`x2`,t.x+t.width/2-55).attr(`y2`,d+10),y.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,d).attr(`r`,22),p===`neo`&&y.attr(`filter`,`url(#${J(a)})`);let S=o.get(t.name)??0;return H.has(m)?(y.style(`stroke`,U(_,S)),y.style(`fill`,U(g,S))):y.style(`stroke`,v),l||(t.height=y.node().getBBox().height+(n.sequence.labelBoxHeight??0)),Y(n,r(t.description))(t.description,y,x.x,l?l.labelCenterY-x.height/2:x.y+15,x.width,x.height,{class:`actor ${V}`},n),l||y.attr(`transform`,`translate(0,21)`),i||(y.attr(`data-et`,`participant`),y.attr(`data-type`,`boundary`),y.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),De=e(function(t,n,i,a,o){let s=a?n.stopy:n.starty,c=n.x+n.width/2,l=me(n,i,a,s),u=l?l.lifelineStartY:s+80,{theme:d,themeVariables:f}=i,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f,g=t.append(`g`).lower();a||(G++,g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,n.name).attr(`data-et`,`life-line`).attr(`data-id`,n.name),n.actorCnt=G);let _=t.append(`g`),v=V;v+=a?` ${B}`:` ${z}`,_.attr(`class`,v),_.attr(`name`,n.name),a||_.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,n.name);let y=l?ie/pe:1,b=e(e=>l?l.glyphBottomY-(fe-e)*y:s+e,`gy`),x=e(e=>c+e*y,`gx`);_.append(`line`).attr(`id`,`actor-man-torso`+G).attr(`x1`,c).attr(`y1`,b(25)).attr(`x2`,c).attr(`y2`,b(45)),_.append(`line`).attr(`id`,`actor-man-arms`+G).attr(`x1`,x(-R/2)).attr(`y1`,b(33)).attr(`x2`,x(R/2)).attr(`y2`,b(33)),_.append(`line`).attr(`x1`,x(-R/2)).attr(`y1`,b(60)).attr(`x2`,c).attr(`y2`,b(45)),_.append(`line`).attr(`x1`,c).attr(`y1`,b(45)).attr(`x2`,x(R/2-2)).attr(`y2`,b(60));let S=_.append(`circle`);S.attr(`cx`,n.x+n.width/2),S.attr(`cy`,b(10)),S.attr(`r`,15*y),S.attr(`width`,n.width),S.attr(`height`,n.height),l||(n.height=pe);let C=k();C.x=n.x,C.y=s,C.fill=`#eaeaea`,C.width=n.width,C.height=n.height,C.class=`actor`,C.rx=3,C.ry=3;let w=o.get(n.name)??0;return H.has(d)?(_.style(`stroke`,U(m,w)),_.style(`fill`,U(p,w))):_.style(`stroke`,h),Y(i,r(n.description))(n.description,_,C.x,l?l.labelCenterY-C.height/2:s+35,C.width,C.height,{class:`actor ${V}`},i),n.height},`drawActorTypeActor`),Oe=e(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 De(e,t,n,r,s);case`participant`:return await Se(e,t,n,r,i,s);case`boundary`:return await Ee(e,t,n,r,i,s);case`control`:return await K(e,t,n,r,i,s);case`entity`:return await q(e,t,n,r,i,s);case`database`:return await Te(e,t,n,r,i,s);case`collections`:return await Ce(e,t,n,r,i,s);case`queue`:return await we(e,t,n,r,i,s)}},`drawActor`),ke=e(function(e,t,n){let r=e.append(`g`);Ne(r,t),t.name&&Y(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),Ae=e(function(e){return e.append(`g`)},`anchorElement`),je=e(function(e,t,n,r,i,a,o){let{theme:s,themeVariables:c}=r,{bkgColorArray:l,borderColorArray:u,mainBkg:d}=c,f=k(),p=t.anchored,m=t.actor;f.x=t.startx,f.y=t.starty,f.class=`activation`+i%3,f.width=t.stopx-t.startx,f.height=n-t.starty;let h=ge(p,f),g=(o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(m)??0;H.has(s)&&(h.style(`stroke`,U(u,g)),h.style(`fill`,U(l,g)??d))},`drawActivation`),Me=e(async function(t,n,i,a,o){let{boxMargin:s,boxTextMargin:c,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:d,messageFontSize:f,messageFontWeight:p}=a,m=t.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+o.id),h=e(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(n.startx,n.starty,n.stopx,n.starty),h(n.stopx,n.starty,n.stopx,n.stopy),h(n.startx,n.stopy,n.stopx,n.stopy),h(n.startx,n.starty,n.startx,n.stopy),n.sections!==void 0&&n.sections.forEach(function(e){h(n.startx,e.y,n.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let g=T();g.text=i,g.x=n.startx,g.y=n.starty,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.width=Math.max(u??0,50),g.height=l+(a.look===`neo`?15:0)||20,g.textMargin=c,g.class=`labelText`,be(m,g),g=He(),g.text=n.title,g.x=n.startx+u/2+(n.stopx-n.startx)/2,g.y=n.starty+s+c,g.anchor=`middle`,g.valign=`middle`,g.textMargin=c,g.class=`loopText`,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=!0;let _=r(g.text)?await ye(m,g,n):W(m,g);if(n.sectionTitles!==void 0){for(let[e,t]of Object.entries(n.sectionTitles))if(t.message){g.text=t.message,g.x=n.startx+(n.stopx-n.startx)/2,g.y=n.sections[e].y+s+c,g.class=`sectionTitle`,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=n.wrap,r(g.text)?(n.starty=n.sections[e].y,await ye(m,g,n)):W(m,g);let i=Math.round(_.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.sections[e].height+=i-(s+c)}}return n.height=Math.round(n.stopy-n.starty),m},`drawLoop`),Ne=e(function(e,t){D(e,t)},`drawBackgroundRect`),Pe=e(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`),Fe=e(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`),Ie=e(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`),Le=e(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`),Re=e(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`),ze=e(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`),Be=e(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`),J=e(e=>e?`${e}-drop-shadow`:`drop-shadow`,`dropShadowId`),Ve=e(function(e,t,n){let{theme:r}=t;e.append(`defs`).append(`filter`).attr(`id`,J(n)).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${r===`redux`||r===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),He=e(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`),Ue=e(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),Y=(function(){function t(e,t,n,r,i,a,s){o(t.append(`text`).attr(`x`,n+i/2).attr(`y`,r+a/2+5).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,i,a,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,[f,p]=C(l),m=e.split(h.lineBreakRegex);for(let e=0;ee.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:e(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:e(function(e){this.boxes.push(e)},`addBox`),addActor:e(function(e){this.actors.push(e)},`addActor`),addLoop:e(function(e){this.loops.push(e)},`addLoop`),addMessage:e(function(e){this.messages.push(e)},`addMessage`),addNote:e(function(e){this.notes.push(e)},`addNote`),lastActor:e(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:e(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:e(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:e(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:e(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,tt(v())},`init`),updateVal:e(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,r,i){let a=this,o=0;function s(s){return e(function(e){o++;let c=a.sequenceItems.length-o+1;a.updateVal(e,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(e,`stopy`,i+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`startx`,t-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopx`,r+c*Z.boxMargin,Math.max),s!==`activation`&&(a.updateVal(e,`startx`,t-c*Z.boxMargin,Math.min),a.updateVal(e,`stopx`,r+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopy`,i+c*Z.boxMargin,Math.max))},`updateItemBounds`)}e(s,`updateFn`),this.sequenceItems.forEach(s()),this.activations.forEach(s(`activation`))},`updateBounds`),insert:e(function(e,t,n,r){let i=h.getMin(e,n),a=h.getMax(e,n),o=h.getMin(t,r),s=h.getMax(t,r);this.updateVal(Q.data,`startx`,i,Math.min),this.updateVal(Q.data,`starty`,o,Math.min),this.updateVal(Q.data,`stopx`,a,Math.max),this.updateVal(Q.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:e(function(e,t,n){let r=n.get(e.from),i=nt(e.from).length||0,a=r.x+r.width/2+(i-1)*Z.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Z.activationWidth,stopy:void 0,actor:e.from,anchored:X.anchorElement(t)})},`newActivation`),endActivation:e(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:e(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:e(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:e(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:e(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:e(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:e(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:e(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=h.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Ge=e(async function(e,t,n){Q.bumpVerticalPos(Z.boxMargin),t.height=Z.boxMargin,t.starty=Q.getVerticalPos();let i=k();i.x=t.startx,i.y=t.starty,i.width=t.width||Z.width,i.class=`note`;let a=e.append(`g`);a.attr(`data-et`,`note`),a.attr(`data-id`,`i`+n);let o=X.drawRect(a,i),s=T();s.x=t.startx,s.y=t.starty,s.width=i.width,s.dy=`1em`,s.text=t.message,s.class=`noteText`,s.fontFamily=Z.noteFontFamily,s.fontSize=Z.noteFontSize,s.fontWeight=Z.noteFontWeight,s.anchor=Z.noteAlign,s.textMargin=Z.noteMargin,s.valign=`center`;let c=r(s.text)?await ye(a,s):W(a,s),l=Math.round(c.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));o.attr(`height`,l+2*Z.noteMargin),t.height+=l+2*Z.noteMargin,Q.bumpVerticalPos(l+2*Z.noteMargin),t.stopy=t.starty+l+2*Z.noteMargin,t.stopx=t.startx+i.width,Q.insert(t.startx,t.starty,t.stopx,t.stopy),Q.models.addNote(t)},`drawNote`),Ke=e(function(t,n,r,i,a,o,s){let c=i.db.getActors(),l=c.get(n.from),u=c.get(n.to),d=r.sequenceVisible,f=l.x+l.width/2,p=u.x+u.width/2,m=f<=p,h=mt(n,i),g=t.append(`g`),_=e((e,t)=>{let n=e?16.5:-16.5;return t?-n:n},`getCircleOffset`),v=e(e=>{g.append(`circle`).attr(`cx`,e).attr(`cy`,s).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:y,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:x}=i.db.LINETYPE;if(d)switch(n.centralConnection){case y:h&&(p+=_(m,!0));break;case b:h||(f+=_(m,!1));break;case x:h?p+=_(m,!0):f+=_(m,!1)}switch(n.centralConnection){case y:v(p);break;case b:v(f);break;case x:v(f),v(p)}},`drawCentralConnection`),qe=e(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Je=e(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Ye=e(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function Xe(e,t){Q.bumpVerticalPos(10);let{startx:n,stopx:i,message:a}=t,o=h.splitBreaks(a).length,s=r(a),c=s?await f(a,v()):S.calculateTextDimensions(a,qe(Z));if(!s){let e=c.height/o;t.height+=e,Q.bumpVerticalPos(e)}let l,u=c.height-10,d=c.width;if(n===i){l=Q.getVerticalPos()+u,Z.rightAngles||(u+=Z.boxMargin,l=Q.getVerticalPos()+u),u+=30;let e=h.getMax(d/2,Z.width/2);Q.insert(n-e,Q.getVerticalPos()-10+u,i+e,Q.getVerticalPos()+30+u)}else u+=Z.boxMargin,l=Q.getVerticalPos()+u,Q.insert(n,l-10,i,l);return Q.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,Q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}e(Xe,`boundMessage`);var Ze=e(async function(e,t,n,i,a,o){let{startx:c,stopx:l,starty:u,message:d,type:f,sequenceIndex:p,sequenceVisible:m}=t,g=S.calculateTextDimensions(d,qe(Z)),_=T();_.x=Math.min(c,l),_.y=u+10,_.width=Math.abs(l-c),_.class=`messageText`,_.dy=`1em`,_.text=d,_.fontFamily=Z.messageFontFamily,_.fontSize=Z.messageFontSize,_.fontWeight=Z.messageFontWeight,_.anchor=Z.messageAlign,_.valign=`center`,_.textMargin=Z.wrapPadding,_.tspan=!1,r(_.text)?await ye(e,_,{startx:c,stopx:l,starty:n}):W(e,_);let v=g.width,y;if(c===l){let r=m||Z.showSequenceNumbers,o=mt(a,i),s=ht(a,i),u=c+(r&&(o||s)?10:0);y=Z.rightAngles?e.append(`path`).attr(`d`,`M ${u},${n} H ${c+h.getMax(Z.width/2,v/2)} V ${n+25} H ${c}`):e.append(`path`).attr(`d`,`M `+u+`,`+n+` C `+(u+60)+`,`+(n-10)+` `+(c+60)+`,`+(n+30)+` `+c+`,`+(n+20)),ft(a,i)&&Ke(e,a,t,i,c,l,n)}else y=e.append(`line`),y.attr(`x1`,c),y.attr(`y1`,n),y.attr(`x2`,l),y.attr(`y2`,n),ft(a,i)&&Ke(e,a,t,i,c,l,n);f===i.db.LINETYPE.DOTTED||f===i.db.LINETYPE.DOTTED_CROSS||f===i.db.LINETYPE.DOTTED_POINT||f===i.db.LINETYPE.DOTTED_OPEN||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED||f===i.db.LINETYPE.SOLID_TOP_DOTTED||f===i.db.LINETYPE.SOLID_BOTTOM_DOTTED||f===i.db.LINETYPE.STICK_TOP_DOTTED||f===i.db.LINETYPE.STICK_BOTTOM_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style(`stroke-dasharray`,`3, 3`),y.attr(`class`,`messageLine1`)):y.attr(`class`,`messageLine0`),y.attr(`data-et`,`message`),y.attr(`data-id`,`i`+t.id),y.attr(`data-from`,t.from),y.attr(`data-to`,t.to);let b=``;if(Z.arrowMarkerAbsolute&&(b=s(!0)),y.attr(`stroke-width`,2),y.attr(`stroke`,`none`),y.style(`fill`,`none`),(f===i.db.LINETYPE.SOLID_TOP||f===i.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===i.db.LINETYPE.SOLID_BOTTOM||f===i.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===i.db.LINETYPE.STICK_TOP||f===i.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===i.db.LINETYPE.STICK_BOTTOM||f===i.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===i.db.LINETYPE.SOLID||f===i.db.LINETYPE.DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`),(f===i.db.LINETYPE.BIDIRECTIONAL_SOLID||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr(`marker-start`,`url(`+b+`#`+o+`-arrowhead)`),y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`)),(f===i.db.LINETYPE.SOLID_POINT||f===i.db.LINETYPE.DOTTED_POINT)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-filled-head)`),(f===i.db.LINETYPE.SOLID_CROSS||f===i.db.LINETYPE.DOTTED_CROSS)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-crosshead)`),m||Z.showSequenceNumbers){let r=f===i.db.LINETYPE.BIDIRECTIONAL_SOLID||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED,s=f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,u=ft(a,i),d=c,m=l;r?(cc?m=l-12:(m=l-6,d+=a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),m+=u?15:0,y.attr(`x2`,m),y.attr(`x1`,d)):y.attr(`x1`,c+6);let h=0,g=c===l,_=c<=l;h=g?t.fromBounds+1:s?_?t.toBounds-1:t.fromBounds+1:_?t.fromBounds+1:t.toBounds-1;let v=`12px`,x=p.toString().length;x>5?v=`7px`:x>3&&(v=`9px`),e.append(`line`).attr(`x1`,h).attr(`y1`,n).attr(`x2`,h).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+b+`#`+o+`-sequencenumber)`),e.append(`text`).attr(`x`,h).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,v).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(p)}},`drawMessage`),Qe=e(function(e,t,n,r,i,a,o){let s=0,c=0,l,u=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||Q.models.addBox(l),c+=Z.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=h.getMax(r.width||Z.width,Z.width),r.height=h.getMax(r.height||Z.height,Z.height),r.margin=r.margin||Z.actorMargin,u=h.getMax(u,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=Q.getVerticalPos(),Q.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,Q.models.addActor(r)}l&&!o&&Q.models.addBox(l),Q.bumpVerticalPos(u)},`addActorRenderingData`),$e=e(async function(e,t,n,r,i,a,o){if(r){let r=0;Q.bumpVerticalPos(Z.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=Q.getVerticalPos();let c=await X.drawActor(e,n,Z,!0,i,a,o);r=h.getMax(r,c)}Q.bumpVerticalPos(r+Z.boxMargin)}else for(let r of n){let n=t.get(r);await X.drawActor(e,n,Z,!1,i,a,o)}},`drawActors`),et=e(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=st(n),c=X.drawPopup(e,n,s,Z,Z.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),tt=e(function(e){m(Z,e),e.fontFamily&&(Z.actorFontFamily=Z.noteFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.actorFontSize=Z.noteFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.actorFontWeight=Z.noteFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),nt=e(function(e){return Q.activations.filter(function(t){return t.actor===e})},`actorActivations`),rt=e(function(e,t){let n=t.get(e),r=nt(e);return[r.reduce(function(e,t){return h.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return h.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(e,n,r,i,a){Q.bumpVerticalPos(r);let o=i;if(n.id&&n.message&&e[n.id]){let r=e[n.id].width,a=qe(Z);n.message=S.wrapLabel(`[${n.message}]`,r-2*Z.wrapPadding,a),n.width=r,n.wrap=!0;let s=S.calculateTextDimensions(n.message,a),c=h.getMax(s.height,Z.labelBoxHeight);o=i+c,t.debug(`${c} - ${n.message}`)}a(n),Q.bumpVerticalPos(o)}e($,`adjustLoopHeightForWrap`);function it(t,n,r,i,a,o,s){function c(e,r){e.x{e.add(t.from),e.add(t.to)}),x=x.filter(t=>e.has(t))}let D=new Map(x.map((e,t)=>[g.get(e)?.name??e,t]));Qe(h,g,_,x,0,S,!1);let O=await _t(S,g,E,o);X.insertArrowHead(h,i),X.insertArrowCrossHead(h,i),X.insertArrowFilledHead(h,i),X.insertSequenceNumber(h,i),X.insertSolidTopArrowHead(h,i),X.insertSolidBottomArrowHead(h,i),X.insertStickTopArrowHead(h,i),X.insertStickBottomArrowHead(h,i),l===`neo`&&X.insertDropShadow(h,Z,i);function k(e,t){let n=Q.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),X.drawActivation(h,n,t,Z,nt(e.from).length,o,D),Q.insert(n.startx,t-10,n.stopx,t)}e(k,`activeEnd`);let A=1,j=1,M=[],N=[],P=0;for(let e of S){let n,r,i;switch(e.type){case o.db.LINETYPE.NOTE:Q.resetVerticalPos(),r=e.noteModel,await Ge(h,r,e.id);break;case o.db.LINETYPE.ACTIVE_START:Q.newActivation(e,h,g);break;case o.db.LINETYPE.CENTRAL_CONNECTION:Q.newActivation(e,h,g);break;case o.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Q.newActivation(e,h,g);break;case o.db.LINETYPE.ACTIVE_END:k(e,Q.getVerticalPos());break;case o.db.LINETYPE.LOOP_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.LOOP_END:n=Q.endLoop(),await X.drawLoop(h,n,`loop`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.RECT_START:$(O,e,Z.boxMargin,Z.boxMargin,e=>{let t=e.message;t||=u?.rectBkgColor||u?.actorBkg||`rgba(128, 128, 128, 0.5)`,Q.newLoop(void 0,t)});break;case o.db.LINETYPE.RECT_END:n=Q.endLoop(),N.push(n),Q.models.addLoop(n),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos());break;case o.db.LINETYPE.OPT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.OPT_END:n=Q.endLoop(),await X.drawLoop(h,n,`opt`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.ALT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.ALT_ELSE:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.ALT_END:n=Q.endLoop(),await X.drawLoop(h,n,`alt`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.PAR_START:case o.db.LINETYPE.PAR_OVER_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e)),Q.saveVerticalPos();break;case o.db.LINETYPE.PAR_AND:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.PAR_END:n=Q.endLoop(),await X.drawLoop(h,n,`par`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.AUTONUMBER:A=e.message.start||A,j=e.message.step||j,e.message.visible?o.db.enableSequenceNumbers():o.db.disableSequenceNumbers();break;case o.db.LINETYPE.CRITICAL_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.CRITICAL_OPTION:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.CRITICAL_END:n=Q.endLoop(),await X.drawLoop(h,n,`critical`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.BREAK_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.BREAK_END:n=Q.endLoop(),await X.drawLoop(h,n,`break`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;default:try{i=e.msgModel,i.starty=Q.getVerticalPos(),i.sequenceIndex=A,i.sequenceVisible=o.db.showSequenceNumbers(),i.id=e.id,i.from=e.from,i.to=e.to;let t=await Xe(h,i);it(e,i,t,P,g,_,y),M.push({messageModel:i,lineStartY:t,msg:e}),Q.models.addMessage(i)}catch(e){t.error(`error while drawing message`,e)}}[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.SOLID_TOP,o.db.LINETYPE.SOLID_BOTTOM,o.db.LINETYPE.STICK_TOP,o.db.LINETYPE.STICK_BOTTOM,o.db.LINETYPE.SOLID_TOP_DOTTED,o.db.LINETYPE.SOLID_BOTTOM_DOTTED,o.db.LINETYPE.STICK_TOP_DOTTED,o.db.LINETYPE.STICK_BOTTOM_DOTTED,o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,o.db.LINETYPE.STICK_ARROW_TOP_REVERSE,o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,o.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT,o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(A=Math.round((A+j)*100)/100),P++}t.debug(`createdActors`,_),t.debug(`destroyedActors`,y),await $e(h,g,x,!1,i,o,D);for(let e of M)await Ze(h,e.messageModel,e.lineStartY,o,e.msg,i);Z.mirrorActors&&await $e(h,g,x,!0,i,o,D),N.forEach(e=>X.drawBackgroundRect(h,e)),xe(h,g,x,Z);for(let e of Q.models.boxes){e.height=Q.getVerticalPos()-e.y,Q.insert(e.x,e.y,e.x+e.width,e.height);let t=Z.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)`,X.drawBox(h,e,Z)}w&&Q.bumpVerticalPos(Z.boxMargin);let F=et(h,g,x,m),{bounds:I}=Q.getBounds();I.startx===void 0&&(I.startx=0),I.starty===void 0&&(I.starty=0),I.stopx===void 0&&(I.stopx=0),I.stopy===void 0&&(I.stopy=0);let ee=I.stopy-I.starty;ee{let n=qe(Z),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),i=Z.boxMargin*8;r+=i,r-=2*Z.boxTextMargin,t.wrap&&(t.name=S.wrapLabel(t.name,r-2*Z.wrapPadding,n));let o=S.calculateTextDimensions(t.name,n);a=h.getMax(o.height,a);let s=h.getMax(r,o.width+2*Z.wrapPadding);if(t.margin=Z.boxTextMargin,re.textMaxHeight=a),h.getMax(i,Z.height)}e(ct,`calculateActorMargins`);var lt=e(async function(e,n,i){let a=n.get(e.from),o=n.get(e.to),s=a.x,c=o.x,l=e.wrap&&e.message,u=r(e.message)?await f(e.message,v()):S.calculateTextDimensions(l?S.wrapLabel(e.message,Z.width,Je(Z)):e.message,Je(Z)),d={width:l?Z.width:h.getMax(Z.width,u.width+2*Z.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===i.db.PLACEMENT.RIGHTOF?(d.width=l?h.getMax(Z.width,u.width):h.getMax(a.width/2+o.width/2,u.width+2*Z.noteMargin),d.startx=s+(a.width+Z.actorMargin)/2):e.placement===i.db.PLACEMENT.LEFTOF?(d.width=l?h.getMax(Z.width,u.width+2*Z.noteMargin):h.getMax(a.width/2+o.width/2,u.width+2*Z.noteMargin),d.startx=s-d.width+(a.width-Z.actorMargin)/2):e.to===e.from?(u=S.calculateTextDimensions(l?S.wrapLabel(e.message,h.getMax(Z.width,a.width),Je(Z)):e.message,Je(Z)),d.width=l?h.getMax(Z.width,a.width):h.getMax(a.width,Z.width,u.width+2*Z.noteMargin),d.startx=s+(a.width-d.width)/2):(d.width=Math.abs(s+a.width/2-(c+o.width/2))+Z.actorMargin,d.startx=s2,p=e(e=>l?-e:e,`adjustValue`);t.from===t.to?d=u:(t.activate&&!f&&(d+=p(Z.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(d+=p(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(u-=p(3)));let m=[a,o,s,c],g=Math.abs(u-d);t.wrap&&t.message&&(t.message=S.wrapLabel(t.message,h.getMax(g+2*Z.wrapPadding,Z.width),qe(Z)));let _=S.calculateTextDimensions(t.message,qe(Z));return{width:h.getMax(t.wrap?0:_.width+2*Z.wrapPadding,g+2*Z.wrapPadding,Z.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,m),toBounds:Math.max.apply(null,m)}},`buildMessageModel`),_t=e(async function(e,n,r,i){let a={},o=[],s,c,l;for(let t of e){switch(t.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:o.push({id:t.id,msg:t.message,from:2**53-1,to:-(2**53-1),width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:t.message&&(s=o.pop(),a[s.id]=s,a[t.id]=s,o.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=o.pop(),a[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{let e=n.get(t.from?t.from:t.to.actor),r=nt(t.from?t.from:t.to.actor).length,i=e.x+e.width/2+(r-1)*Z.activationWidth/2,a={startx:i,stopx:i+Z.activationWidth,actor:t.from,enabled:!0};Q.activations.push(a)}break;case i.db.LINETYPE.ACTIVE_END:{let e=Q.activations.map(e=>e.actor).lastIndexOf(t.from);Q.activations.splice(e,1).splice(0,1)}}t.placement===void 0?(l=gt(t,n,i),t.msgModel=l,l.startx&&l.stopx&&o.length>0&&o.forEach(e=>{if(s=e,l.startx===l.stopx){let e=n.get(t.from),r=n.get(t.to);s.from=h.getMin(e.x-l.width/2,e.x-e.width/2,s.from),s.to=h.getMax(r.x+l.width/2,r.x+e.width/2,s.to),s.width=h.getMax(s.width,Math.abs(s.to-s.from))-Z.labelBoxWidth}else s.from=h.getMin(l.startx,s.from),s.to=h.getMax(l.stopx,s.to),s.width=h.getMax(s.width,l.width)-Z.labelBoxWidth})):(c=await lt(t,n,i),t.noteModel=c,o.forEach(e=>{s=e,s.from=h.getMin(s.from,c.startx),s.to=h.getMax(s.to,c.startx+c.width),s.width=h.getMax(s.width,Math.abs(s.from-s.to))-Z.labelBoxWidth}))}return Q.activations=[],t.debug(`Loop type widths:`,a),a},`calculateLoopBounds`),vt={parser:F,get db(){return new ne},renderer:{bounds:Q,drawActors:$e,drawActorsPopup:et,setConf:tt,draw:at},styles:re,init:e(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,a({sequence:{wrap:e.wrap}}))},`init`)};export{vt as diagram}; \ No newline at end of file +`;E.append(`path`).attr(`d`,D),p===`neo`&&E.attr(`filter`,`url(#${J(a)})`);let O=o.get(t.name)??0;if(H.has(d)?(E.style(`stroke`,U(h,O)),E.style(`fill`,U(m,O))):E.style(`stroke`,g),E.attr(`transform`,`translate(${x}, ${C})`),t.rectData=y,Y(n,r(t.description))(t.description,v,y.x,l?l.labelCenterY-y.height/2:y.y+35,y.width,y.height,{class:`actor ${he}`},n),!l){let e=E.select(`path:last-child`);e.node()&&(t.height=e.node().getBBox().height+(n.sequence.labelBoxHeight??0))}return i||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`database`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),Ee=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=me(t,n,i,s),u=l?l.lifelineStartY:s+80,d=l?l.glyphBottomY-22:s+12,f=e.append(`g`).lower(),{look:p,theme:m,themeVariables:h}=n,{bkgColorArray:g,borderColorArray:_,actorBorder:v}=h;i||(G++,f.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).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=G);let y=e.append(`g`),b=V;b+=i?` ${B}`:` ${z}`,y.attr(`class`,b),y.attr(`name`,t.name);let x=j();x.x=t.x,x.y=s,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height,x.class=`actor`,y.append(`line`).attr(`id`,`actor-man-torso`+G).attr(`x1`,t.x+t.width/2-55).attr(`y1`,d).attr(`x2`,t.x+t.width/2-15).attr(`y2`,d),y.append(`line`).attr(`id`,`actor-man-arms`+G).attr(`x1`,t.x+t.width/2-55).attr(`y1`,d-10).attr(`x2`,t.x+t.width/2-55).attr(`y2`,d+10),y.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,d).attr(`r`,22),p===`neo`&&y.attr(`filter`,`url(#${J(a)})`);let S=o.get(t.name)??0;return H.has(m)?(y.style(`stroke`,U(_,S)),y.style(`fill`,U(g,S))):y.style(`stroke`,v),l||(t.height=y.node().getBBox().height+(n.sequence.labelBoxHeight??0)),Y(n,r(t.description))(t.description,y,x.x,l?l.labelCenterY-x.height/2:x.y+15,x.width,x.height,{class:`actor ${V}`},n),l||y.attr(`transform`,`translate(0,21)`),i||(y.attr(`data-et`,`participant`),y.attr(`data-type`,`boundary`),y.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),De=e(function(t,n,i,a,o){let s=a?n.stopy:n.starty,c=n.x+n.width/2,l=me(n,i,a,s),u=l?l.lifelineStartY:s+80,{theme:d,themeVariables:f}=i,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f,g=t.append(`g`).lower();a||(G++,g.append(`line`).attr(`id`,`actor`+G).attr(`x1`,c).attr(`y1`,u).attr(`x2`,c).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,n.name).attr(`data-et`,`life-line`).attr(`data-id`,n.name),n.actorCnt=G);let _=t.append(`g`),v=V;v+=a?` ${B}`:` ${z}`,_.attr(`class`,v),_.attr(`name`,n.name),a||_.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,n.name);let y=l?ie/pe:1,b=e(e=>l?l.glyphBottomY-(fe-e)*y:s+e,`gy`),x=e(e=>c+e*y,`gx`);_.append(`line`).attr(`id`,`actor-man-torso`+G).attr(`x1`,c).attr(`y1`,b(25)).attr(`x2`,c).attr(`y2`,b(45)),_.append(`line`).attr(`id`,`actor-man-arms`+G).attr(`x1`,x(-R/2)).attr(`y1`,b(33)).attr(`x2`,x(R/2)).attr(`y2`,b(33)),_.append(`line`).attr(`x1`,x(-R/2)).attr(`y1`,b(60)).attr(`x2`,c).attr(`y2`,b(45)),_.append(`line`).attr(`x1`,c).attr(`y1`,b(45)).attr(`x2`,x(R/2-2)).attr(`y2`,b(60));let S=_.append(`circle`);S.attr(`cx`,n.x+n.width/2),S.attr(`cy`,b(10)),S.attr(`r`,15*y),S.attr(`width`,n.width),S.attr(`height`,n.height),l||(n.height=pe);let C=j();C.x=n.x,C.y=s,C.fill=`#eaeaea`,C.width=n.width,C.height=n.height,C.class=`actor`,C.rx=3,C.ry=3;let w=o.get(n.name)??0;return H.has(d)?(_.style(`stroke`,U(m,w)),_.style(`fill`,U(p,w))):_.style(`stroke`,h),Y(i,r(n.description))(n.description,_,C.x,l?l.labelCenterY-C.height/2:s+35,C.width,C.height,{class:`actor ${V}`},i),n.height},`drawActorTypeActor`),Oe=e(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 De(e,t,n,r,s);case`participant`:return await Se(e,t,n,r,i,s);case`boundary`:return await Ee(e,t,n,r,i,s);case`control`:return await K(e,t,n,r,i,s);case`entity`:return await q(e,t,n,r,i,s);case`database`:return await Te(e,t,n,r,i,s);case`collections`:return await Ce(e,t,n,r,i,s);case`queue`:return await we(e,t,n,r,i,s)}},`drawActor`),ke=e(function(e,t,n){let r=e.append(`g`);Ne(r,t),t.name&&Y(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),Ae=e(function(e){return e.append(`g`)},`anchorElement`),je=e(function(e,t,n,r,i,a,o){let{theme:s,themeVariables:c}=r,{bkgColorArray:l,borderColorArray:u,mainBkg:d}=c,f=j(),p=t.anchored,m=t.actor;f.x=t.startx,f.y=t.starty,f.class=`activation`+i%3,f.width=t.stopx-t.startx,f.height=n-t.starty;let h=ge(p,f),g=(o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(m)??0;H.has(s)&&(h.style(`stroke`,U(u,g)),h.style(`fill`,U(l,g)??d))},`drawActivation`),Me=e(async function(t,n,i,a,o){let{boxMargin:s,boxTextMargin:c,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:d,messageFontSize:f,messageFontWeight:p}=a,m=t.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+o.id),h=e(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(n.startx,n.starty,n.stopx,n.starty),h(n.stopx,n.starty,n.stopx,n.stopy),h(n.startx,n.stopy,n.stopx,n.stopy),h(n.startx,n.starty,n.startx,n.stopy),n.sections!==void 0&&n.sections.forEach(function(e){h(n.startx,e.y,n.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let g=D();g.text=i,g.x=n.startx,g.y=n.starty,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.width=Math.max(u??0,50),g.height=l+(a.look===`neo`?15:0)||20,g.textMargin=c,g.class=`labelText`,be(m,g),g=He(),g.text=n.title,g.x=n.startx+u/2+(n.stopx-n.startx)/2,g.y=n.starty+s+c,g.anchor=`middle`,g.valign=`middle`,g.textMargin=c,g.class=`loopText`,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=!0;let _=r(g.text)?await ye(m,g,n):W(m,g);if(n.sectionTitles!==void 0){for(let[e,t]of Object.entries(n.sectionTitles))if(t.message){g.text=t.message,g.x=n.startx+(n.stopx-n.startx)/2,g.y=n.sections[e].y+s+c,g.class=`sectionTitle`,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=n.wrap,r(g.text)?(n.starty=n.sections[e].y,await ye(m,g,n)):W(m,g);let i=Math.round(_.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.sections[e].height+=i-(s+c)}}return n.height=Math.round(n.stopy-n.starty),m},`drawLoop`),Ne=e(function(e,t){k(e,t)},`drawBackgroundRect`),Pe=e(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`),Fe=e(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`),Ie=e(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`),Le=e(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`),Re=e(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`),ze=e(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`),Be=e(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`),J=e(e=>e?`${e}-drop-shadow`:`drop-shadow`,`dropShadowId`),Ve=e(function(e,t,n){let{theme:r}=t;e.append(`defs`).append(`filter`).attr(`id`,J(n)).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${r===`redux`||r===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),He=e(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`),Ue=e(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),Y=(function(){function t(e,t,n,r,i,a,s){o(t.append(`text`).attr(`x`,n+i/2).attr(`y`,r+a/2+5).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,i,a,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,[f,p]=C(l),m=e.split(h.lineBreakRegex);for(let e=0;ee.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:e(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:e(function(e){this.boxes.push(e)},`addBox`),addActor:e(function(e){this.actors.push(e)},`addActor`),addLoop:e(function(e){this.loops.push(e)},`addLoop`),addMessage:e(function(e){this.messages.push(e)},`addMessage`),addNote:e(function(e){this.notes.push(e)},`addNote`),lastActor:e(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:e(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:e(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:e(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:e(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,tt(v())},`init`),updateVal:e(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,r,i){let a=this,o=0;function s(s){return e(function(e){o++;let c=a.sequenceItems.length-o+1;a.updateVal(e,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(e,`stopy`,i+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`startx`,t-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopx`,r+c*Z.boxMargin,Math.max),s!==`activation`&&(a.updateVal(e,`startx`,t-c*Z.boxMargin,Math.min),a.updateVal(e,`stopx`,r+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopy`,i+c*Z.boxMargin,Math.max))},`updateItemBounds`)}e(s,`updateFn`),this.sequenceItems.forEach(s()),this.activations.forEach(s(`activation`))},`updateBounds`),insert:e(function(e,t,n,r){let i=h.getMin(e,n),a=h.getMax(e,n),o=h.getMin(t,r),s=h.getMax(t,r);this.updateVal(Q.data,`startx`,i,Math.min),this.updateVal(Q.data,`starty`,o,Math.min),this.updateVal(Q.data,`stopx`,a,Math.max),this.updateVal(Q.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:e(function(e,t,n){let r=n.get(e.from),i=nt(e.from).length||0,a=r.x+r.width/2+(i-1)*Z.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Z.activationWidth,stopy:void 0,actor:e.from,anchored:X.anchorElement(t)})},`newActivation`),endActivation:e(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:e(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:e(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:e(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:e(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:e(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:e(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:e(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=h.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Ge=e(async function(e,t,n){Q.bumpVerticalPos(Z.boxMargin),t.height=Z.boxMargin,t.starty=Q.getVerticalPos();let i=j();i.x=t.startx,i.y=t.starty,i.width=t.width||Z.width,i.class=`note`;let a=e.append(`g`);a.attr(`data-et`,`note`),a.attr(`data-id`,`i`+n);let o=X.drawRect(a,i),s=D();s.x=t.startx,s.y=t.starty,s.width=i.width,s.dy=`1em`,s.text=t.message,s.class=`noteText`,s.fontFamily=Z.noteFontFamily,s.fontSize=Z.noteFontSize,s.fontWeight=Z.noteFontWeight,s.anchor=Z.noteAlign,s.textMargin=Z.noteMargin,s.valign=`center`;let c=r(s.text)?await ye(a,s):W(a,s),l=Math.round(c.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));o.attr(`height`,l+2*Z.noteMargin),t.height+=l+2*Z.noteMargin,Q.bumpVerticalPos(l+2*Z.noteMargin),t.stopy=t.starty+l+2*Z.noteMargin,t.stopx=t.startx+i.width,Q.insert(t.startx,t.starty,t.stopx,t.stopy),Q.models.addNote(t)},`drawNote`),Ke=e(function(t,n,r,i,a,o,s){let c=i.db.getActors(),l=c.get(n.from),u=c.get(n.to),d=r.sequenceVisible,f=l.x+l.width/2,p=u.x+u.width/2,m=f<=p,h=mt(n,i),g=t.append(`g`),_=e((e,t)=>{let n=e?16.5:-16.5;return t?-n:n},`getCircleOffset`),v=e(e=>{g.append(`circle`).attr(`cx`,e).attr(`cy`,s).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:y,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:x}=i.db.LINETYPE;if(d)switch(n.centralConnection){case y:h&&(p+=_(m,!0));break;case b:h||(f+=_(m,!1));break;case x:h?p+=_(m,!0):f+=_(m,!1)}switch(n.centralConnection){case y:v(p);break;case b:v(f);break;case x:v(f),v(p)}},`drawCentralConnection`),qe=e(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Je=e(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Ye=e(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function Xe(e,t){Q.bumpVerticalPos(10);let{startx:n,stopx:i,message:a}=t,o=h.splitBreaks(a).length,s=r(a),c=s?await f(a,v()):S.calculateTextDimensions(a,qe(Z));if(!s){let e=c.height/o;t.height+=e,Q.bumpVerticalPos(e)}let l,u=c.height-10,d=c.width;if(n===i){l=Q.getVerticalPos()+u,Z.rightAngles||(u+=Z.boxMargin,l=Q.getVerticalPos()+u),u+=30;let e=h.getMax(d/2,Z.width/2);Q.insert(n-e,Q.getVerticalPos()-10+u,i+e,Q.getVerticalPos()+30+u)}else u+=Z.boxMargin,l=Q.getVerticalPos()+u,Q.insert(n,l-10,i,l);return Q.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,Q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}e(Xe,`boundMessage`);var Ze=e(async function(e,t,n,i,a,o){let{startx:c,stopx:l,starty:u,message:d,type:f,sequenceIndex:p,sequenceVisible:m}=t,g=S.calculateTextDimensions(d,qe(Z)),_=D();_.x=Math.min(c,l),_.y=u+10,_.width=Math.abs(l-c),_.class=`messageText`,_.dy=`1em`,_.text=d,_.fontFamily=Z.messageFontFamily,_.fontSize=Z.messageFontSize,_.fontWeight=Z.messageFontWeight,_.anchor=Z.messageAlign,_.valign=`center`,_.textMargin=Z.wrapPadding,_.tspan=!1,r(_.text)?await ye(e,_,{startx:c,stopx:l,starty:n}):W(e,_);let v=g.width,y;if(c===l){let r=m||Z.showSequenceNumbers,o=mt(a,i),s=ht(a,i),u=c+(r&&(o||s)?10:0);y=Z.rightAngles?e.append(`path`).attr(`d`,`M ${u},${n} H ${c+h.getMax(Z.width/2,v/2)} V ${n+25} H ${c}`):e.append(`path`).attr(`d`,`M `+u+`,`+n+` C `+(u+60)+`,`+(n-10)+` `+(c+60)+`,`+(n+30)+` `+c+`,`+(n+20)),ft(a,i)&&Ke(e,a,t,i,c,l,n)}else y=e.append(`line`),y.attr(`x1`,c),y.attr(`y1`,n),y.attr(`x2`,l),y.attr(`y2`,n),ft(a,i)&&Ke(e,a,t,i,c,l,n);f===i.db.LINETYPE.DOTTED||f===i.db.LINETYPE.DOTTED_CROSS||f===i.db.LINETYPE.DOTTED_POINT||f===i.db.LINETYPE.DOTTED_OPEN||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED||f===i.db.LINETYPE.SOLID_TOP_DOTTED||f===i.db.LINETYPE.SOLID_BOTTOM_DOTTED||f===i.db.LINETYPE.STICK_TOP_DOTTED||f===i.db.LINETYPE.STICK_BOTTOM_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style(`stroke-dasharray`,`3, 3`),y.attr(`class`,`messageLine1`)):y.attr(`class`,`messageLine0`),y.attr(`data-et`,`message`),y.attr(`data-id`,`i`+t.id),y.attr(`data-from`,t.from),y.attr(`data-to`,t.to);let b=``;if(Z.arrowMarkerAbsolute&&(b=s(!0)),y.attr(`stroke-width`,2),y.attr(`stroke`,`none`),y.style(`fill`,`none`),(f===i.db.LINETYPE.SOLID_TOP||f===i.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===i.db.LINETYPE.SOLID_BOTTOM||f===i.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===i.db.LINETYPE.STICK_TOP||f===i.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===i.db.LINETYPE.STICK_BOTTOM||f===i.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===i.db.LINETYPE.SOLID||f===i.db.LINETYPE.DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`),(f===i.db.LINETYPE.BIDIRECTIONAL_SOLID||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr(`marker-start`,`url(`+b+`#`+o+`-arrowhead)`),y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`)),(f===i.db.LINETYPE.SOLID_POINT||f===i.db.LINETYPE.DOTTED_POINT)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-filled-head)`),(f===i.db.LINETYPE.SOLID_CROSS||f===i.db.LINETYPE.DOTTED_CROSS)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-crosshead)`),m||Z.showSequenceNumbers){let r=f===i.db.LINETYPE.BIDIRECTIONAL_SOLID||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED,s=f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,u=ft(a,i),d=c,m=l;r?(cc?m=l-12:(m=l-6,d+=a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),m+=u?15:0,y.attr(`x2`,m),y.attr(`x1`,d)):y.attr(`x1`,c+6);let h=0,g=c===l,_=c<=l;h=g?t.fromBounds+1:s?_?t.toBounds-1:t.fromBounds+1:_?t.fromBounds+1:t.toBounds-1;let v=`12px`,x=p.toString().length;x>5?v=`7px`:x>3&&(v=`9px`),e.append(`line`).attr(`x1`,h).attr(`y1`,n).attr(`x2`,h).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+b+`#`+o+`-sequencenumber)`),e.append(`text`).attr(`x`,h).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,v).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(p)}},`drawMessage`),Qe=e(function(e,t,n,r,i,a,o){let s=0,c=0,l,u=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||Q.models.addBox(l),c+=Z.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=h.getMax(r.width||Z.width,Z.width),r.height=h.getMax(r.height||Z.height,Z.height),r.margin=r.margin||Z.actorMargin,u=h.getMax(u,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=Q.getVerticalPos(),Q.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,Q.models.addActor(r)}l&&!o&&Q.models.addBox(l),Q.bumpVerticalPos(u)},`addActorRenderingData`),$e=e(async function(e,t,n,r,i,a,o){if(r){let r=0;Q.bumpVerticalPos(Z.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=Q.getVerticalPos();let c=await X.drawActor(e,n,Z,!0,i,a,o);r=h.getMax(r,c)}Q.bumpVerticalPos(r+Z.boxMargin)}else for(let r of n){let n=t.get(r);await X.drawActor(e,n,Z,!1,i,a,o)}},`drawActors`),et=e(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=st(n),c=X.drawPopup(e,n,s,Z,Z.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),tt=e(function(e){m(Z,e),e.fontFamily&&(Z.actorFontFamily=Z.noteFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.actorFontSize=Z.noteFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.actorFontWeight=Z.noteFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),nt=e(function(e){return Q.activations.filter(function(t){return t.actor===e})},`actorActivations`),rt=e(function(e,t){let n=t.get(e),r=nt(e);return[r.reduce(function(e,t){return h.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return h.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(e,n,r,i,a){Q.bumpVerticalPos(r);let o=i;if(n.id&&n.message&&e[n.id]){let r=e[n.id].width,a=qe(Z);n.message=S.wrapLabel(`[${n.message}]`,r-2*Z.wrapPadding,a),n.width=r,n.wrap=!0;let s=S.calculateTextDimensions(n.message,a),c=h.getMax(s.height,Z.labelBoxHeight);o=i+c,t.debug(`${c} - ${n.message}`)}a(n),Q.bumpVerticalPos(o)}e($,`adjustLoopHeightForWrap`);function it(t,n,r,i,a,o,s){function c(e,r){e.x{e.add(t.from),e.add(t.to)}),x=x.filter(t=>e.has(t))}let D=new Map(x.map((e,t)=>[g.get(e)?.name??e,t]));Qe(h,g,_,x,0,S,!1);let O=await _t(S,g,E,o);X.insertArrowHead(h,i),X.insertArrowCrossHead(h,i),X.insertArrowFilledHead(h,i),X.insertSequenceNumber(h,i),X.insertSolidTopArrowHead(h,i),X.insertSolidBottomArrowHead(h,i),X.insertStickTopArrowHead(h,i),X.insertStickBottomArrowHead(h,i),l===`neo`&&X.insertDropShadow(h,Z,i);function k(e,t){let n=Q.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),X.drawActivation(h,n,t,Z,nt(e.from).length,o,D),Q.insert(n.startx,t-10,n.stopx,t)}e(k,`activeEnd`);let A=1,j=1,M=[],N=[],P=0;for(let e of S){let n,r,i;switch(e.type){case o.db.LINETYPE.NOTE:Q.resetVerticalPos(),r=e.noteModel,await Ge(h,r,e.id);break;case o.db.LINETYPE.ACTIVE_START:Q.newActivation(e,h,g);break;case o.db.LINETYPE.CENTRAL_CONNECTION:Q.newActivation(e,h,g);break;case o.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Q.newActivation(e,h,g);break;case o.db.LINETYPE.ACTIVE_END:k(e,Q.getVerticalPos());break;case o.db.LINETYPE.LOOP_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.LOOP_END:n=Q.endLoop(),await X.drawLoop(h,n,`loop`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.RECT_START:$(O,e,Z.boxMargin,Z.boxMargin,e=>{let t=e.message;t||=u?.rectBkgColor||u?.actorBkg||`rgba(128, 128, 128, 0.5)`,Q.newLoop(void 0,t)});break;case o.db.LINETYPE.RECT_END:n=Q.endLoop(),N.push(n),Q.models.addLoop(n),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos());break;case o.db.LINETYPE.OPT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.OPT_END:n=Q.endLoop(),await X.drawLoop(h,n,`opt`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.ALT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.ALT_ELSE:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.ALT_END:n=Q.endLoop(),await X.drawLoop(h,n,`alt`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.PAR_START:case o.db.LINETYPE.PAR_OVER_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e)),Q.saveVerticalPos();break;case o.db.LINETYPE.PAR_AND:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.PAR_END:n=Q.endLoop(),await X.drawLoop(h,n,`par`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.AUTONUMBER:A=e.message.start||A,j=e.message.step||j,e.message.visible?o.db.enableSequenceNumbers():o.db.disableSequenceNumbers();break;case o.db.LINETYPE.CRITICAL_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.CRITICAL_OPTION:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.CRITICAL_END:n=Q.endLoop(),await X.drawLoop(h,n,`critical`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.BREAK_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.BREAK_END:n=Q.endLoop(),await X.drawLoop(h,n,`break`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;default:try{i=e.msgModel,i.starty=Q.getVerticalPos(),i.sequenceIndex=A,i.sequenceVisible=o.db.showSequenceNumbers(),i.id=e.id,i.from=e.from,i.to=e.to;let t=await Xe(h,i);it(e,i,t,P,g,_,y),M.push({messageModel:i,lineStartY:t,msg:e}),Q.models.addMessage(i)}catch(e){t.error(`error while drawing message`,e)}}[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.SOLID_TOP,o.db.LINETYPE.SOLID_BOTTOM,o.db.LINETYPE.STICK_TOP,o.db.LINETYPE.STICK_BOTTOM,o.db.LINETYPE.SOLID_TOP_DOTTED,o.db.LINETYPE.SOLID_BOTTOM_DOTTED,o.db.LINETYPE.STICK_TOP_DOTTED,o.db.LINETYPE.STICK_BOTTOM_DOTTED,o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,o.db.LINETYPE.STICK_ARROW_TOP_REVERSE,o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,o.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT,o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(A=Math.round((A+j)*100)/100),P++}t.debug(`createdActors`,_),t.debug(`destroyedActors`,y),await $e(h,g,x,!1,i,o,D);for(let e of M)await Ze(h,e.messageModel,e.lineStartY,o,e.msg,i);Z.mirrorActors&&await $e(h,g,x,!0,i,o,D),N.forEach(e=>X.drawBackgroundRect(h,e)),xe(h,g,x,Z);for(let e of Q.models.boxes){e.height=Q.getVerticalPos()-e.y,Q.insert(e.x,e.y,e.x+e.width,e.height);let t=Z.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)`,X.drawBox(h,e,Z)}w&&Q.bumpVerticalPos(Z.boxMargin);let F=et(h,g,x,m),{bounds:I}=Q.getBounds();I.startx===void 0&&(I.startx=0),I.starty===void 0&&(I.starty=0),I.stopx===void 0&&(I.stopx=0),I.stopy===void 0&&(I.stopy=0);let ee=I.stopy-I.starty;ee{let n=qe(Z),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),i=Z.boxMargin*8;r+=i,r-=2*Z.boxTextMargin,t.wrap&&(t.name=S.wrapLabel(t.name,r-2*Z.wrapPadding,n));let o=S.calculateTextDimensions(t.name,n);a=h.getMax(o.height,a);let s=h.getMax(r,o.width+2*Z.wrapPadding);if(t.margin=Z.boxTextMargin,re.textMaxHeight=a),h.getMax(i,Z.height)}e(ct,`calculateActorMargins`);var lt=e(async function(e,n,i){let a=n.get(e.from),o=n.get(e.to),s=a.x,c=o.x,l=e.wrap&&e.message,u=r(e.message)?await f(e.message,v()):S.calculateTextDimensions(l?S.wrapLabel(e.message,Z.width,Je(Z)):e.message,Je(Z)),d={width:l?Z.width:h.getMax(Z.width,u.width+2*Z.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===i.db.PLACEMENT.RIGHTOF?(d.width=l?h.getMax(Z.width,u.width):h.getMax(a.width/2+o.width/2,u.width+2*Z.noteMargin),d.startx=s+(a.width+Z.actorMargin)/2):e.placement===i.db.PLACEMENT.LEFTOF?(d.width=l?h.getMax(Z.width,u.width+2*Z.noteMargin):h.getMax(a.width/2+o.width/2,u.width+2*Z.noteMargin),d.startx=s-d.width+(a.width-Z.actorMargin)/2):e.to===e.from?(u=S.calculateTextDimensions(l?S.wrapLabel(e.message,h.getMax(Z.width,a.width),Je(Z)):e.message,Je(Z)),d.width=l?h.getMax(Z.width,a.width):h.getMax(a.width,Z.width,u.width+2*Z.noteMargin),d.startx=s+(a.width-d.width)/2):(d.width=Math.abs(s+a.width/2-(c+o.width/2))+Z.actorMargin,d.startx=s2,p=e(e=>l?-e:e,`adjustValue`);t.from===t.to?d=u:(t.activate&&!f&&(d+=p(Z.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(d+=p(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(u-=p(3)));let m=[a,o,s,c],g=Math.abs(u-d);t.wrap&&t.message&&(t.message=S.wrapLabel(t.message,h.getMax(g+2*Z.wrapPadding,Z.width),qe(Z)));let _=S.calculateTextDimensions(t.message,qe(Z));return{width:h.getMax(t.wrap?0:_.width+2*Z.wrapPadding,g+2*Z.wrapPadding,Z.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,m),toBounds:Math.max.apply(null,m)}},`buildMessageModel`),_t=e(async function(e,n,r,i){let a={},o=[],s,c,l;for(let t of e){switch(t.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:o.push({id:t.id,msg:t.message,from:2**53-1,to:-(2**53-1),width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:t.message&&(s=o.pop(),a[s.id]=s,a[t.id]=s,o.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=o.pop(),a[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{let e=n.get(t.from?t.from:t.to.actor),r=nt(t.from?t.from:t.to.actor).length,i=e.x+e.width/2+(r-1)*Z.activationWidth/2,a={startx:i,stopx:i+Z.activationWidth,actor:t.from,enabled:!0};Q.activations.push(a)}break;case i.db.LINETYPE.ACTIVE_END:{let e=Q.activations.map(e=>e.actor).lastIndexOf(t.from);Q.activations.splice(e,1).splice(0,1)}}t.placement===void 0?(l=gt(t,n,i),t.msgModel=l,l.startx&&l.stopx&&o.length>0&&o.forEach(e=>{if(s=e,l.startx===l.stopx){let e=n.get(t.from),r=n.get(t.to);s.from=h.getMin(e.x-l.width/2,e.x-e.width/2,s.from),s.to=h.getMax(r.x+l.width/2,r.x+e.width/2,s.to),s.width=h.getMax(s.width,Math.abs(s.to-s.from))-Z.labelBoxWidth}else s.from=h.getMin(l.startx,s.from),s.to=h.getMax(l.stopx,s.to),s.width=h.getMax(s.width,l.width)-Z.labelBoxWidth})):(c=await lt(t,n,i),t.noteModel=c,o.forEach(e=>{s=e,s.from=h.getMin(s.from,c.startx),s.to=h.getMax(s.to,c.startx+c.width),s.width=h.getMax(s.width,Math.abs(s.from-s.to))-Z.labelBoxWidth}))}return Q.activations=[],t.debug(`Loop type widths:`,a),a},`calculateLoopBounds`),vt={parser:F,get db(){return new ne},renderer:{bounds:Q,drawActors:$e,drawActorsPopup:et,setConf:tt,draw:at},styles:re,init:e(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,a({sequence:{wrap:e.wrap}}))},`init`)};export{vt as diagram}; \ No newline at end of file diff --git a/web/dist/app-stateDiagram-v2-GCMORJYK.js b/web/dist/app-stateDiagram-v2-GCMORJYK.js index 3ea3ee37c..002315249 100644 --- a/web/dist/app-stateDiagram-v2-GCMORJYK.js +++ b/web/dist/app-stateDiagram-v2-GCMORJYK.js @@ -1,9 +1,9 @@ -import{t as e}from"./app-purify.es.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{H as i,U as a,a as o,q as s,s as c,v as l,w as u,x as d,y as f}from"./app-chunk-O7XYJQB3.js";import{g as p,s as m}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import{a as h,i as g,o as _,r as v}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import{t as y}from"./app-chunk-GWA4HPMP.js";import{t as b}from"./app-chunk-XXDRQBXY.js";import{t as x}from"./app-chunk-WEXAMYUT.js";import"./app-chunk-UA2S7LBM.js";import{r as S,t as C}from"./app-chunk-GNY47TPC.js";var w=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[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],j=[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],M=[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],N={trace:t(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:t(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 c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};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:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[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(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{t as e}from"./app-purify.es.js";import{n as t}from"./app-chunk-Y2CYZVJY.js";import{m as n,p as r}from"./app-src.js";import{H as i,U as a,a as o,q as s,s as c,v as l,w as u,x as d,y as f}from"./app-chunk-O7XYJQB3.js";import{g as p,s as m}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import{a as h,i as g,o as _,r as v}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{r as y,t as b}from"./app-chunk-GNY47TPC.js";import{t as x}from"./app-chunk-GWA4HPMP.js";import{t as S}from"./app-chunk-XXDRQBXY.js";import{t as C}from"./app-chunk-WEXAMYUT.js";var w=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[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],j=[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],M=[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],N={trace:t(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:t(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 c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};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:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[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(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(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:t(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:t(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:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(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:t(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:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:t(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:t(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;at[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. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,n,r,i){function a(){let t=n.yytext.indexOf(`%%`);if(t===0)return!1;if(t>0){let r=n.yytext.slice(0,t),i=n.yytext.slice(t);i&&e.lexer.unput(i),n.yytext=r}return!0}switch(t(a,`processId`),r){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(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),n.yytext=n.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 a()?(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: "`+n.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 a()?(this.popState(),`ID`):void 0;case 66:return a()?(this.popState(),this.pushState(`NOTE_TEXT`),24):void 0;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 68:return this.popState(),n.yytext=n.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 a()?24:void 0;case 74:return n.yytext=n.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,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}})();function P(){this.yy={}}return t(P,`Parser`),P.prototype=N,N.Parser=P,new P})();w.parser=w;var T=w,E=`TB`,D=`TB`,O=`dir`,k=`state`,A=`root`,j=`relation`,M=`classDef`,N=`style`,P=`applyClass`,F=`default`,ee=`divider`,te=`fill:none`,ne=`fill: #333`,re=`c`,ie=`markdown`,ae=`normal`,I=`rect`,L=`rectWithTitle`,oe=`stateStart`,se=`stateEnd`,R=`divider`,ce=`roundedWithTitle`,le=`note`,ue=`noteGroup`,z=`statediagram`,de=`${z}-state`,B=`transition`,fe=`note`,pe=`${B} note-edge`,me=`${z}-${fe}`,he=`${z}-cluster`,ge=`${z}-cluster-alt`,V=`parent`,H=`note`,_e=`state`,U=`----`,ve=`${U}${H}`,ye=`${U}${V}`,W=new Map,G=0,be=0,K=new Map,xe=t((e,t,n,r)=>{if(e===R&&n?.id!==void 0&&K.has(n.id)){let e=K.get(n.id);return K.set(t,e),e}let i=be++,a=r?void 0:i;return K.set(t,a),a},`colorSlotFor`);function q(e=``,t=0,n=``,r=U){return`${_e}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}t(q,`stateDomId`);var Se=t((e,t,r,i,a,o,s,l)=>{n.trace(`items`,t),t.forEach(t=>{switch(t.stmt){case k:X(e,t,r,i,a,o,s,l);break;case F:X(e,t,r,i,a,o,s,l);break;case j:{X(e,t.state1,r,i,a,o,s,l),X(e,t.state2,r,i,a,o,s,l);let n=s===`neo`,u={id:`edge`+G,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:n?`arrow_barb_neo`:`arrow_barb`,style:te,labelStyle:``,label:c.sanitizeText(t.description??``,d()),arrowheadStyle:ne,labelpos:re,labelType:ie,thickness:ae,classes:B,look:s};a.push(u),G++}}})},`setupDoc`),Ce=t((e,t=D)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function J(e,t,n){if(!t.id||t.id===``||t.id===``)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)}t(J,`insertOrUpdateNode`);function we(e){return e?.classes?.join(` `)??``}t(we,`getClassesFromDbInfo`);function Y(e){return e?.styles??[]}t(Y,`getStylesFromDbInfo`);var X=t((e,t,r,i,a,o,s,l)=>{let u=t.id,f=r.get(u),p=we(f),m=Y(f),h=d(),g=p.trim()!==``||m.length>0;if(n.info(`dataFetcher parsedItem`,t,f,m),u!==`root`){let r=I;t.start===!0?r=oe:t.start===!1&&(r=se),t.type!==F&&(r=t.type),W.get(u)||W.set(u,{id:u,shape:r,description:c.sanitizeText(u,h),cssClasses:`${p} ${de}`,cssStyles:m});let d=W.get(u);t.description&&(Array.isArray(d.description)?(d.shape=L,d.description.push(t.description)):d.description?.length&&d.description.length>0?(d.shape=L,d.description=d.description===u?[t.description]:[d.description,t.description]):(d.shape=I,d.description=t.description),d.description=c.sanitizeTextOrArray(d.description,h)),d.description?.length===1&&d.shape===L&&(d.shape=d.type===`group`?ce:I),!d.type&&t.doc&&(n.info(`Setting cluster for XCX`,u,Ce(t)),d.type=`group`,d.isGroup=!0,d.dir=Ce(t),d.shape=t.type===ee?R:ce,d.colorIndex=xe(d.shape,u,e,g),d.cssClasses=`${d.cssClasses} ${he} ${o?ge:``}`);let f={labelStyle:``,shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:u,dir:d.dir,domId:q(u,G),type:d.type,isGroup:d.type===`group`,colorIndex:d.colorIndex,padding:8,rx:10,ry:10,look:s,labelType:`markdown`};if(f.shape===R&&(f.label=``),e&&e.id!==`root`&&(n.trace(`Setting node `,u,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,t.note){let e={labelStyle:``,shape:le,label:t.note.text,labelType:`markdown`,cssClasses:me,cssStyles:[],cssCompiledStyles:[],id:u+ve+`-`+G,domId:q(u,G,H),type:`node`,isGroup:!1,padding:h.flowchart?.padding,look:s,position:t.note.position},n=u+ye,r={labelStyle:``,shape:ue,label:t.note.text,cssClasses:d.cssClasses,cssStyles:[],id:u+ye,domId:q(u,G,V),type:`group`,isGroup:!0,padding:16,look:s,position:t.note.position};G++,r.id=n,e.parentId=n,J(i,r,l),J(i,e,l),J(i,f,l);let o=u,c=e.id;t.note.position===`left of`&&(o=e.id,c=u),a.push({id:o+`-`+c,start:o,end:c,arrowhead:`none`,arrowTypeEnd:``,style:te,labelStyle:``,classes:pe,pattern:`dashed`,arrowheadStyle:ne,labelpos:re,labelType:ie,thickness:ae,look:s})}else J(i,f,l)}t.doc&&(n.trace(`Adding nodes children `),Se(t,t.doc,r,i,a,!o,s,l))},`dataFetcher`),Te=t(()=>{W.clear(),G=0,be=0,K.clear()},`reset`),Ee=t((e,t=D)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),De={getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing state diagram (v2)`,t);let{securityLevel:a,state:o,layout:s}=d();i.db.extract(i.db.getRootDocV2());let c=i.db.getData(),l=b(t,a);c.type=i.type,c.layoutAlgorithm=C(s),c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=d().look===`neo`?[`barbNeo`]:[`barb`],c.diagramId=t,await S(c,l);try{(typeof i.db.getLinks==`function`?i.db.getLinks():new Map).forEach((e,t)=>{let r=typeof t==`string`?t:typeof t?.id==`string`?t.id:``,i=c.nodes.find(e=>e.id===r);if(!r){n.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(t));return}let a=l.node()?.querySelectorAll(`g.node, g.rough-node`),o;if(a?.forEach(e=>{let t=e.textContent?.trim();(e.id===i?.domId||t===r)&&(o=e)}),!o){n.warn(`⚠️ Could not find node matching text:`,r);return}let s=o.parentNode;if(!s){n.warn(`⚠️ Node has no parent, cannot wrap:`,r);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),o.setAttribute(`title`,t)}s.replaceChild(u,o),u.appendChild(o),n.info(`🔗 Wrapped node in tag for:`,r,e.url)})}catch(e){n.error(`❌ Error injecting clickable links:`,e)}p.insertTitle(l,`statediagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),x(l,8,z,o?.useMaxWidth??!0)},`draw`),getDir:Ee},Z={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},Oe=t(()=>new Map,`newClassesList`),Q=t(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=t(e=>JSON.parse(JSON.stringify(e)),`clone`),ke=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Oe(),this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=f,this.setAccTitle=a,this.getAccDescription=l,this.setAccDescription=i,this.setDiagramTitle=s,this.getDiagramTitle=u,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{t(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 k:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case j:this.addRelation(t.state1,t.state2,t.description);break;case M:this.addStyleClass(t.id.trim(),t.classes);break;case N:this.handleStyleDef(t);break;case P:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip)}let t=this.getStates(),n=d();Te(),X(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){n.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===j){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===k&&(t.id===Z.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==A&&t.stmt!==k||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===ee){let t=$(e);t.doc=$(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:k,id:m(),type:`divider`,doc:$(i)};r.push($(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:A,stmt:A},{id:A,stmt:A,doc:this.rootDoc},!0),{id:A,doc:this.rootDoc}}addState(e,t=F,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,l=void 0){let u=e?.trim();if(!this.currentDocument.states.has(u))n.info(`Adding state `,u,i),this.currentDocument.states.set(u,{stmt:k,id:u,descriptions:[],type:t,doc:r,note:a,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(u);if(!e)throw Error(`State not found: ${u}`);e.doc||=r,e.type||=t}if(i&&(n.info(`Setting state description`,u,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(u,e.trim()))),a){let e=this.currentDocument.states.get(u);if(!e)throw Error(`State not found: ${u}`);e.note=a,e.note.text=c.sanitizeText(e.note.text,d())}o&&(n.info(`Setting state classes`,u,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setCssClass(u,e.trim()))),s&&(n.info(`Setting state styles`,u,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(u,e.trim()))),l&&(n.info(`Setting state styles`,u,s),(Array.isArray(l)?l:[l]).forEach(e=>this.setTextStyle(u,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Oe(),e||(this.links=new Map,o())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){n.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),n.warn(`Adding link`,e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Z.START_NODE?(this.startEndCount++,`${Z.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=F){return e===Z.START_NODE?Z.START_TYPE:t}endIdIfNeeded(e=``){return e===Z.END_NODE?(this.startEndCount++,`${Z.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=F){return e===Z.END_NODE?Z.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:c.sanitizeText(n,d())})}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?c.sanitizeText(n,d()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(c.sanitizeText(r,d()))}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(Z.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Z.COLOR_KEYWORD).exec(e)){let e=t.replace(Z.FILL_KEYWORD,Z.BG_FILL).replace(Z.COLOR_KEYWORD,Z.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setupToolTips(t){let n=y();r(t).select(`svg`).selectAll(`g.node, g.rough-node`).on(`mouseover`,t=>{let i=r(t.currentTarget),a=i.attr(`title`);if(a===null)return;let o=t.currentTarget?.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.style(`left`,window.scrollX+o.left+(o.right-o.left)/2+`px`).style(`top`,window.scrollY+o.bottom+`px`),n.html(e.sanitize(a)),i.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),r(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===O)}getDirection(){return this.getDirectionStatement()?.value??E}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:O,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=d();for(let t of this.nodes)t.wrappingWidth??=e.state?.wrappingWidth,t.isGroup||(t.minWidth??=e.state?.minNodeWidth);return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:Ee(this.getRootDocV2())}}getConfig(){return d().state}},Ae=t(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!g(t,r))return``;let i=_(e.look),a=v(n),o=``;for(let e=0;e0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,n,r,i){function a(){let t=n.yytext.indexOf(`%%`);if(t===0)return!1;if(t>0){let r=n.yytext.slice(0,t),i=n.yytext.slice(t);i&&e.lexer.unput(i),n.yytext=r}return!0}switch(t(a,`processId`),r){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(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),n.yytext=n.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 a()?(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: "`+n.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 a()?(this.popState(),`ID`):void 0;case 66:return a()?(this.popState(),this.pushState(`NOTE_TEXT`),24):void 0;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 68:return this.popState(),n.yytext=n.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 a()?24:void 0;case 74:return n.yytext=n.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,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}})();function P(){this.yy={}}return t(P,`Parser`),P.prototype=N,N.Parser=P,new P})();w.parser=w;var T=w,E=`TB`,D=`TB`,O=`dir`,k=`state`,A=`root`,j=`relation`,M=`classDef`,N=`style`,P=`applyClass`,F=`default`,ee=`divider`,te=`fill:none`,ne=`fill: #333`,re=`c`,ie=`markdown`,ae=`normal`,I=`rect`,L=`rectWithTitle`,oe=`stateStart`,se=`stateEnd`,R=`divider`,ce=`roundedWithTitle`,le=`note`,ue=`noteGroup`,z=`statediagram`,de=`${z}-state`,B=`transition`,fe=`note`,pe=`${B} note-edge`,me=`${z}-${fe}`,he=`${z}-cluster`,ge=`${z}-cluster-alt`,V=`parent`,H=`note`,_e=`state`,U=`----`,ve=`${U}${H}`,ye=`${U}${V}`,W=new Map,G=0,be=0,K=new Map,xe=t((e,t,n,r)=>{if(e===R&&n?.id!==void 0&&K.has(n.id)){let e=K.get(n.id);return K.set(t,e),e}let i=be++,a=r?void 0:i;return K.set(t,a),a},`colorSlotFor`);function q(e=``,t=0,n=``,r=U){return`${_e}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}t(q,`stateDomId`);var Se=t((e,t,r,i,a,o,s,l)=>{n.trace(`items`,t),t.forEach(t=>{switch(t.stmt){case k:X(e,t,r,i,a,o,s,l);break;case F:X(e,t,r,i,a,o,s,l);break;case j:{X(e,t.state1,r,i,a,o,s,l),X(e,t.state2,r,i,a,o,s,l);let n=s===`neo`,u={id:`edge`+G,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:n?`arrow_barb_neo`:`arrow_barb`,style:te,labelStyle:``,label:c.sanitizeText(t.description??``,d()),arrowheadStyle:ne,labelpos:re,labelType:ie,thickness:ae,classes:B,look:s};a.push(u),G++}}})},`setupDoc`),Ce=t((e,t=D)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function J(e,t,n){if(!t.id||t.id===``||t.id===``)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)}t(J,`insertOrUpdateNode`);function we(e){return e?.classes?.join(` `)??``}t(we,`getClassesFromDbInfo`);function Y(e){return e?.styles??[]}t(Y,`getStylesFromDbInfo`);var X=t((e,t,r,i,a,o,s,l)=>{let u=t.id,f=r.get(u),p=we(f),m=Y(f),h=d(),g=p.trim()!==``||m.length>0;if(n.info(`dataFetcher parsedItem`,t,f,m),u!==`root`){let r=I;t.start===!0?r=oe:t.start===!1&&(r=se),t.type!==F&&(r=t.type),W.get(u)||W.set(u,{id:u,shape:r,description:c.sanitizeText(u,h),cssClasses:`${p} ${de}`,cssStyles:m});let d=W.get(u);t.description&&(Array.isArray(d.description)?(d.shape=L,d.description.push(t.description)):d.description?.length&&d.description.length>0?(d.shape=L,d.description=d.description===u?[t.description]:[d.description,t.description]):(d.shape=I,d.description=t.description),d.description=c.sanitizeTextOrArray(d.description,h)),d.description?.length===1&&d.shape===L&&(d.shape=d.type===`group`?ce:I),!d.type&&t.doc&&(n.info(`Setting cluster for XCX`,u,Ce(t)),d.type=`group`,d.isGroup=!0,d.dir=Ce(t),d.shape=t.type===ee?R:ce,d.colorIndex=xe(d.shape,u,e,g),d.cssClasses=`${d.cssClasses} ${he} ${o?ge:``}`);let f={labelStyle:``,shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:u,dir:d.dir,domId:q(u,G),type:d.type,isGroup:d.type===`group`,colorIndex:d.colorIndex,padding:8,rx:10,ry:10,look:s,labelType:`markdown`};if(f.shape===R&&(f.label=``),e&&e.id!==`root`&&(n.trace(`Setting node `,u,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,t.note){let e={labelStyle:``,shape:le,label:t.note.text,labelType:`markdown`,cssClasses:me,cssStyles:[],cssCompiledStyles:[],id:u+ve+`-`+G,domId:q(u,G,H),type:`node`,isGroup:!1,padding:h.flowchart?.padding,look:s,position:t.note.position},n=u+ye,r={labelStyle:``,shape:ue,label:t.note.text,cssClasses:d.cssClasses,cssStyles:[],id:u+ye,domId:q(u,G,V),type:`group`,isGroup:!0,padding:16,look:s,position:t.note.position};G++,r.id=n,e.parentId=n,J(i,r,l),J(i,e,l),J(i,f,l);let o=u,c=e.id;t.note.position===`left of`&&(o=e.id,c=u),a.push({id:o+`-`+c,start:o,end:c,arrowhead:`none`,arrowTypeEnd:``,style:te,labelStyle:``,classes:pe,pattern:`dashed`,arrowheadStyle:ne,labelpos:re,labelType:ie,thickness:ae,look:s})}else J(i,f,l)}t.doc&&(n.trace(`Adding nodes children `),Se(t,t.doc,r,i,a,!o,s,l))},`dataFetcher`),Te=t(()=>{W.clear(),G=0,be=0,K.clear()},`reset`),Ee=t((e,t=D)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),De={getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing state diagram (v2)`,t);let{securityLevel:a,state:o,layout:s}=d();i.db.extract(i.db.getRootDocV2());let c=i.db.getData(),l=S(t,a);c.type=i.type,c.layoutAlgorithm=b(s),c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=d().look===`neo`?[`barbNeo`]:[`barb`],c.diagramId=t,await y(c,l);try{(typeof i.db.getLinks==`function`?i.db.getLinks():new Map).forEach((e,t)=>{let r=typeof t==`string`?t:typeof t?.id==`string`?t.id:``,i=c.nodes.find(e=>e.id===r);if(!r){n.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(t));return}let a=l.node()?.querySelectorAll(`g.node, g.rough-node`),o;if(a?.forEach(e=>{let t=e.textContent?.trim();(e.id===i?.domId||t===r)&&(o=e)}),!o){n.warn(`⚠️ Could not find node matching text:`,r);return}let s=o.parentNode;if(!s){n.warn(`⚠️ Node has no parent, cannot wrap:`,r);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),o.setAttribute(`title`,t)}s.replaceChild(u,o),u.appendChild(o),n.info(`🔗 Wrapped node in tag for:`,r,e.url)})}catch(e){n.error(`❌ Error injecting clickable links:`,e)}p.insertTitle(l,`statediagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),C(l,8,z,o?.useMaxWidth??!0)},`draw`),getDir:Ee},Z={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},Oe=t(()=>new Map,`newClassesList`),Q=t(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=t(e=>JSON.parse(JSON.stringify(e)),`clone`),ke=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Oe(),this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=f,this.setAccTitle=a,this.getAccDescription=l,this.setAccDescription=i,this.setDiagramTitle=s,this.getDiagramTitle=u,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{t(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 k:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case j:this.addRelation(t.state1,t.state2,t.description);break;case M:this.addStyleClass(t.id.trim(),t.classes);break;case N:this.handleStyleDef(t);break;case P:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip)}let t=this.getStates(),n=d();Te(),X(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){n.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===j){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===k&&(t.id===Z.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==A&&t.stmt!==k||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===ee){let t=$(e);t.doc=$(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:k,id:m(),type:`divider`,doc:$(i)};r.push($(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:A,stmt:A},{id:A,stmt:A,doc:this.rootDoc},!0),{id:A,doc:this.rootDoc}}addState(e,t=F,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,l=void 0){let u=e?.trim();if(!this.currentDocument.states.has(u))n.info(`Adding state `,u,i),this.currentDocument.states.set(u,{stmt:k,id:u,descriptions:[],type:t,doc:r,note:a,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(u);if(!e)throw Error(`State not found: ${u}`);e.doc||=r,e.type||=t}if(i&&(n.info(`Setting state description`,u,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(u,e.trim()))),a){let e=this.currentDocument.states.get(u);if(!e)throw Error(`State not found: ${u}`);e.note=a,e.note.text=c.sanitizeText(e.note.text,d())}o&&(n.info(`Setting state classes`,u,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setCssClass(u,e.trim()))),s&&(n.info(`Setting state styles`,u,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(u,e.trim()))),l&&(n.info(`Setting state styles`,u,s),(Array.isArray(l)?l:[l]).forEach(e=>this.setTextStyle(u,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Oe(),e||(this.links=new Map,o())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){n.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),n.warn(`Adding link`,e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Z.START_NODE?(this.startEndCount++,`${Z.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=F){return e===Z.START_NODE?Z.START_TYPE:t}endIdIfNeeded(e=``){return e===Z.END_NODE?(this.startEndCount++,`${Z.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=F){return e===Z.END_NODE?Z.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:c.sanitizeText(n,d())})}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?c.sanitizeText(n,d()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(c.sanitizeText(r,d()))}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(Z.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Z.COLOR_KEYWORD).exec(e)){let e=t.replace(Z.FILL_KEYWORD,Z.BG_FILL).replace(Z.COLOR_KEYWORD,Z.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setupToolTips(t){let n=x();r(t).select(`svg`).selectAll(`g.node, g.rough-node`).on(`mouseover`,t=>{let i=r(t.currentTarget),a=i.attr(`title`);if(a===null)return;let o=t.currentTarget?.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.style(`left`,window.scrollX+o.left+(o.right-o.left)/2+`px`).style(`top`,window.scrollY+o.bottom+`px`),n.html(e.sanitize(a)),i.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),r(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===O)}getDirection(){return this.getDirectionStatement()?.value??E}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:O,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=d();for(let t of this.nodes)t.wrappingWidth??=e.state?.wrappingWidth,t.isGroup||(t.minWidth??=e.state?.minNodeWidth);return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:Ee(this.getRootDocV2())}}getConfig(){return d().state}},Ae=t(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!g(t,r))return``;let i=_(e.look),a=v(n),o=``;for(let e=0;eArray.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));r(t.groups.edgePaths,a,{enabled:!0,jumpRadius:6,jumpStyle:i})}e(i,`applySwimlaneLineJumps`);var a=`__swimlane_default__`,o=21,s=20;function c(e){return Math.max(e.padding??s,s)}e(c,`topLaneHorizontalPadding`);function l(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 s=n-i/2,c=Math.min(a,n+i/2),l=s+Math.min(o,Math.max(0,c-s));if(l<=s){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:s,bottom:l}}e(l,`assignTopLaneTitleRect`);function u(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===a);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:a,label:``,isGroup:!0,shape:`swimlane`,padding:20,look:e.config?.look,colorIndex:n.reduce((e,t)=>Math.max(e,t.colorIndex??-1),-1)+1,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=a}e(u,`prepareLayoutForSwimlanes`);function d(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}}e(d,`toGraphView`);function f(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,u=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=u,e.order=t;let i=n.x[r]??t*s,c=n.y[r]??u*o;e.x=i,e.y=c,t++}u++}let d=i.nodes??[],f=new Map,p=[];for(let e of d){if(!e?.isGroup)continue;e.parentId||p.push(e);let t=d.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],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/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*c(e),s=t,l=Math.max(0,i-r)+n,u=Math.max(0,o-a)+s,d=(r+i)/2,p=(a+o)/2;e.x=d,e.y=p,e.width=l,e.height=u,f.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(p.length>0&&f.size>0){let e=1/0,t=-1/0,n=0;for(let r of p){let i=r.padding??20;i>n&&(n=i);let a=f.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 p)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...p].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],u=[];for(let e of a){let t=f.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*c(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),u.push(n)}let d=o.length;if(d>0){let e=new Map;if(d===1)e.set(o[0],u[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:P(t,n,r,i)}:void 0}e(g,`measuredNodeRect`);function _(e){if(e.isGroup)return;let t=g(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}e(_,`nodeBoundsInfoFor`);function v(e,t,n=h){return Math.abs(e.x-t.x)n}e(x,`isHorizontalSegment`);function S(e,t,n=h){return y(e,t,n)&&Math.abs(e.y-t.y)>n}e(S,`isVerticalSegment`);function C(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)))}e(C,`overlapLength`);function w(e,t,n=h){return e.horizontal&&t.horizontal&&b(e.a,t.a,n)?C(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&y(e.a,t.a,n)?C(e.a.y,e.b.y,t.a.y,t.b.y):0}e(w,`sameAxisSegmentOverlapLength`);function T(e,t=h){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!v(e,r,t))&&n.push({x:r.x,y:r.y})}return n}e(D,`dedupeConsecutivePoints`);function O(e,t=h){if(!e||e.length!==4)return;let[n,r,i,a]=e;return x(n,r,t)&&S(r,i,t)&&x(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:S(n,r,t)&&x(r,i,t)&&S(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}e(O,`classifyThreeSegmentRoute`);function k(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&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}e(j,`rectContainsRect`);function M(e,t){return e.leftt.left&&e.topt.top}e(M,`rectsOverlap`);function N(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}e(N,`inflateRect`);function P(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}e(P,`rectFromCenterSize`);function F(e){return g(e)?.rect}e(F,`rectOfNodeBounds`);function I(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}}}e(I,`portForRectSide`);function ee(e,t,n,r,i,a=h){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(b(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(b(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(y(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.yn.y))return;if(y(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.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}e(ee,`buildOrthogonalPortPath`);function L(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]}e(L,`buildSameSideTrackPath`);function R(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=_(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}e(R,`collectRealNodeBounds`);function z(e){let t=[],n=[];for(let r of e){let e=_(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}}e(z,`collectNodeRectEntries`);function te(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,...P(e,i,a,o)})}return n}e(te,`collectLayoutNodeRects`);function ne(e,t,n=h){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)m||f<_||f>v)return!1;let x=Math.abs(g-u.a.x)i:a&&s&&b(e,n,i)?C(e.x,t.x,n.x,r.x)>i:!1}e(ie,`sameAxisSegmentsOverlap`);function ae(e,t,n,r,{epsilon:i=h,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;rf+i&&mg+i&&d<_-i}e(V,`orthogonalSegmentsStrictlyCross`);function oe(e,t,n){let r=Math.min(t,n),i=Math.max(t,n);return e>r+h&&e=2?t[t.length-2]:void 0,n=e&&y(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||!v(t,e))&&n.push(e)}return n}e(W,`orthogonalizePolyline`);function G(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=U(t);if(t=e.points,!e.changed)break}return t}e(G,`simplifyPolyline`);var K=.001,se=.5,ce=4;function le(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=ue(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}e(de,`clipEndpoint`);function q(e,t){for(let n of e){let e=le(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=de(r,e.srcRect,!0)),e.dstRect&&(r=de(r,e.dstRect,!1)),r=G(W(r)),r=xe(r,e.srcRect,e.dstRect),e.edge.points=G(W(r))}}e(q,`clipEdgeEndpointsToNodeBoundaries`);function J(e,t,n,r=!1){if(b(e,t,K)){if(t.yn.bottom+K)return t;if(r){if(e.xn.right+K)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(y(e,t,K)){if(t.xn.right+K)return t;if(r){if(e.yn.bottom+K)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}e(J,`snapEndpointToBoundary`);function fe(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}e(he,`intersectRanges`);function ge(e,t){return t===`left`||t===`right`?pe(e.top,e.bottom):pe(e.left,e.right)}e(ge,`clearanceRangeForSide`);function _e(e,t,n){let r=e.y>=n.top-K&&e.y<=n.bottom+K,i=e.x>=n.left-K&&e.x<=n.right+K;if(b(e,t,K)&&r){if(Math.abs(e.x-n.left)0?he(a):void 0}e(ye,`straightClearanceRange`);function be(e,t,n,r,i){let a=ye(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)({...e}));for(let s=t;s>=0&&s=n.left-K&&Math.max(e.x,t.x)<=n.right+K,i=Math.min(e.y,t.y)>=n.top-K&&Math.max(e.y,t.y)<=n.bottom+K;if(Math.abs(e.y-n.top)r.bottom+K;case`left`:return b(t,n,K)&&n.xr.right+K}}e(Ee,`leavesOutward`);function De(e,t,n){if(e.length<3)return e;if(n){let n=Te(e[0],e[1],t);return n&&Ee(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=Te(e[r-1],e[r],t);return i&&Ee(i,e[r-1],e[r-2],t)?e.slice(0,r):e}e(De,`collapseOwnBorderStub`);function Oe(e,t,n){let r=e;if(t){let e=fe(r,0,1);if(e){let n=J(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=De(r,t,!0)}if(n){let e=r.length-1,t=fe(r,e,-1);if(t){let i=J(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=De(r,n,!1)}let i=xe(r,t,n);return i!==r||r.length===2?i:(t&&(r=we(r,t,!0)),n&&(r=we(r,n,!1)),r)}e(Oe,`snapAndCollapseEndpoints`);function ke(e,t){for(let n of e){let e=le(n,t,2);if(!e)continue;let r=Oe(D(e.points,K),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}}e(ke,`prepareEdgeEndpointsForRenderer`);function Ae(e){return new Map(e.map(e=>[e.id,e]))}e(Ae,`buildNodeMap`);function je(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}e(je,`resolveTopLevelGroupId`);function Me(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}e(Me,`groupDepth`);function Ne(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,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}e(Ne,`boundsForChildren`);function Pe(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}e(Pe,`applyGroupBounds`);function Fe(e){let t=Ae(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>Me(n,t)-Me(e,t));for(let t of n){let n=Ne(e.filter(e=>e.parentId===t.id));n&&Pe(t,n)}}e(Fe,`recomputeNestedGroupBounds`);function Ie(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=e(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}e(Ie,`mirrorAxis`);function Le(e){return!(e.nodes??[]).some(e=>!e.isGroup)||Ie(e,`y`)}e(Le,`applyBtDirectionTransform`);function Re(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;t0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+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)*d+36,r=e-a;t.x=n,t.y=r}Fe(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&Ie(e,`x`),!0;let p=Ae(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=je(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=Ne(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;ed.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+ze||t>=g.right-ze)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+ze||t>=g.bottom-ze)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=v(i,a,ze),m=v(a,c,ze);if(p&&m||!p&&B(i,a,r,[l],1)||!m&&B(a,c,r,[u],1))continue;let _=!p&&ae(i,a,e,t,{epsilon:ze,skipDegenerateOther:!0}),y=!m&&ae(a,c,e,t,{epsilon:ze,skipDegenerateOther:!0});if(!(_||y)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}e(He,`portSwapToLShape`);function Ue(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=z(n.values());for(let o of t){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=D(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;P={x:f.x,y:M},I={x:e?N.right:N.left,y:M}}if(B(P,I,i,E?[E]:[],-2)||B(P,I,a,[],-2))continue;if(O){let e=n.get(O),t=e?F(e):void 0;if(t&&A(P,t,2))continue}let ee=e((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),L=new Set;for(let e=0;e{for(let i of t){if(i===o||i.isLayoutOnly)continue;let t=i.points;if(!(!t||t.length<2))for(let i=0;i=0){let e=c[l-3],t=[O,E].filter(e=>!!e);if(B(e,P,i,t,-2)||R(e,P))continue}let z=[...c.slice(0,l-2),P,I];o.points=z;let te=o.labelNodeId;if(te){let e=n.get(te);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}e(Ue,`collapseShortTerminalStub`);var Y=.001,X=8,Z=T,We=e((e,t)=>y(e,t,Y)||b(e,t,Y),`orthogonallyAligned`);function Ge(t,n){let r=e((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`),i=e((e,t)=>{let i=D(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?F(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(We(l,u)&&(d=l),y(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(b(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=e((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=e((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)&&y(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&b(e.boundary,t.boundary,1),`sameTerminalFace`),s=e((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=X&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=e((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=e((t,n)=>{let r=D(t.edge.points??[]);if(r.length<2)return;let i=t.orientation===`V`?{x:t.boundary.x+n,y:t.boundary.y}:{x:t.boundary.x,y:t.boundary.y+n},a=t.orientation===`V`?{x:t.railEnd.x+n,y:t.railEnd.y}:{x:t.railEnd.x,y:t.railEnd.y+n};if(!e(()=>Math.abs(t.boundary.y-t.rect.top)<1||Math.abs(t.boundary.y-t.rect.bottom)<1?b(i,t.boundary,Y)&&i.x>=t.rect.left+1&&i.x<=t.rect.right-1:Math.abs(t.boundary.x-t.rect.left)<1||Math.abs(t.boundary.x-t.rect.right)<1?y(i,t.boundary,Y)&&i.y>=t.rect.top+1&&i.y<=t.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(t.atStart){let e=r.length>1&&v(r[1],t.railEnd,Y),n=r.slice(e?2:1),o=n[0];return o&&!We(o,a)?void 0:[i,a,...n]}let o=r.length>1&&v(r[r.length-2],t.railEnd,Y),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!We(c,a)))return[...s,a,i]},`shiftedCandidate`),u=e(e=>{let t=e.edge,r=D(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return b(f,p,Y)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||y(f,p,Y)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let e=0;e<8;e++){let e=t.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let t=0;t{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let t of p){for(let r of d){let a=l(t,r);if(!a)continue;let o=i({...t.edge,points:a},t.atStart);if(!(!o||e.some(e=>e.edge!==t.edge&&(s(o,e)||f&&c(o,e))))){t.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}e(Ge,`separateSharedRenderedTerminalLanes`);function Ke(t,n){let{realNodeRects:r,labelNodeRects:i}=z(n.values()),a=e((e,n)=>{let a=e.start,o=e.end,s=Z(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(B(e.a,e.b,r,c,-2)||B(e.a,e.b,i,[],-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of s)for(let n of Z(D(t)))if(w(e,n,.5)>=X||V(e.a,e.b,n.a,n.b,Y))return!1}}return!0},`candidateIsSafe`),o=e((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=x(n,r)&&S(r,i)&&x(i,a)&&S(a,o)&&y(n,a,Y)&&y(n,o,Y)&&y(r,i,Y)&&(r.x-n.x)*(a.x-i.x)<0,c=S(n,r)&&x(r,i)&&S(i,a)&&x(a,o)&&b(n,a,Y)&&b(n,o,Y)&&b(r,i,Y)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return D([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=S(n,r)&&x(r,i)&&S(i,a)&&x(a,o)&&S(o,l)&&y(n,o,Y)&&y(n,l,Y)&&y(i,a,Y)&&(i.x-r.x)*(o.x-a.x)<0,d=x(n,r)&&S(r,i)&&x(i,a)&&S(a,o)&&x(o,l)&&b(n,o,Y)&&b(n,l,Y)&&b(i,a,Y)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return D([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let e=0;e<8;e++){let e=!1;for(let n of t){if(n.isLayoutOnly)continue;let t=D(n.points??[]);for(let r=0;r<=t.length-5;r++){let i=o(t,r);if(!(!i||!a(n,i))){n.points=i,e=!0;break}}if(e)break}if(!e)return}}e(Ke,`collapseRedundantRectangularDoglegs`);function qe(t,n){let{realNodeRects:r,labelNodeRects:i}=z(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>D(e===t?n??[]:e.points??[]),`pointsFor`),s=e((e,t)=>{let n=0;for(let r=0;r{let t=Z(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=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?C(t.a.x,t.b.x,r.left,r.right)>=X&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:C(t.a.y,t.b.y,r.top,r.bottom)>=X&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=e((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=G(D(r));return Z(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=e((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Z(t);if(l.length!==t.length-1)return!1;for(let e of l)if(B(e.a,e.b,r,c,-2)||B(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Z(o(t)))if(w(e,n,.5)>=X)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){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}}e(qe,`liftObstacleHuggingSameSideRails`);function Je(t,n){let r=e(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`),i=e(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(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,c=i.bottom-i.top;if(!(c<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:C(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let e of t){if(e.isLayoutOnly)continue;let t=D(e.points??[]);for(let e of Z(t))for(let t of o)a(e,t.rect)&&(s=Math.max(s,t.rect.bottom-e.a.y+4))}if(!(s<=Y))for(let e of o){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-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}e(Je,`liftTopLaneTitleBandsAboveRails`);function Ye(t,n){let r=e(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`),i=e(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+Y||n>=t.right-Y?!1:C(e.a.y,e.b.y,t.top,t.bottom)>=X},`verticalSegmentIntersectsTitle`),o=e((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:C(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let e of t){if(e.isLayoutOnly)continue;let t=D(e.points??[]);for(let e of Z(t))for(let t of s)if(a(e,t.rect))c=Math.max(c,t.rect.right-e.a.x+4);else if(o(e,t.rect)){let n=Math.min(e.a.x,e.b.x);c=Math.max(c,t.rect.right-n+4)}}if(!(c<=Y))for(let e of s){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-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}e(Ye,`shiftLeftLaneTitleBandsLeftOfRails`);function Xe(t,n){let{realNodeRects:r}=z(n.values()),i=t.filter(e=>!e.isLayoutOnly),a=e((e,t=new Map)=>D(t.get(e)??e.points??[]),`replacementPointsFor`),o=e((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+E(a(n,e)),0),`totalBends`),c=e(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!x(n,r,Y)&&!S(n,r,Y)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=e((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(x(r,i,Y))o={x:i.x,y:t.tailStart.y};else if(S(r,i,Y))o={x:t.tailStart.x,y:i.y};else return;let s=G(D([r,i,o,t.tailStart,t.terminal]));return Z(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(B(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=e((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Z(t))for(let t of Z(a(r,n)))if(w(e,t,.5)>=X)return!0}return!1},`pathHasSharedTrack`),f=e((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=e(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}e(Xe,`swapDestinationTerminalTailsToReduceCrossings`);function Ze(t,n){let{realNodeRects:r,labelNodeRects:i}=z(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t=new Map)=>D(t.get(e)??e.points??[]),`replacementPointsFor`),s=e((e=new Map)=>{let t=0;for(let n=0;na.reduce((t,n)=>t+E(o(n,e)),0),`totalBends`),l=e(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?F(i):void 0,s=a?F(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=e((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=io+Y?`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=io+Y?`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=e(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Z(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=e((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&C(e.min,e.max,t.min,t.max)>=X,`railsInteract`),p=e(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`),m=e(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let n=t.map(e=>e.coord),r=m(t),i=[];if(t.length<=6){let a=Array(r.length).fill(!1),o=[],s=e(()=>{if(o.length===t.length){o.some((e,t)=>Math.abs(e-n[t])>=Y)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e{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=G(D(t));if(Z(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=e(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Z(n))if(B(t.a,t.b,r,e,-2)||B(t.a,t.b,i,[],-2))return!1}for(let t=0;t=X)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}e(Ze,`reassignCrossingExternalRailChannels`);function Qe(t,n){let{realNodeRects:r,labelNodeRects:i}=z(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>D(e===t?n??[]:e.points??[]),`pointsFor`),s=e(e=>Z(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`),c=e((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&C(e.a.x,e.b.x,t.left,t.right)>=X}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&C(e.a.y,e.b.y,t.top,t.bottom)>=X}return!1},`segmentRunsAlongRectBorder`),u=e(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?F(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=e((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=x(n,r,Y)&&S(r,i,Y)&&x(i,a,Y),s=S(n,r,Y)&&x(r,i,Y)&&S(i,a,Y);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 c=y(n,a,Y)||b(n,a,Y)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>G(D(e))).filter(e=>{if(Z(e).length!==e.length-1||!e.some(e=>v(e,a,Y)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return!u.has(t)&&(u.add(t),!0)})},`shortcutCandidatesAt`),f=e((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Z(t))if(B(e.a,e.b,r,s,-2)||B(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Z(t))for(let t of Z(o(n)))if(w(e,t,.5)>=X)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=E(a,Y),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=E(h,Y),o=s(h);if(!(ar||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}e(Qe,`shortcutRedundantOrthogonalJogs`);function $e(t,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=F(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={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},c=t.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=e(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=e((e,t=new Map)=>D(t.get(e)??e.points??[]),`replacementPointsFor`),f=e((e,t)=>{let n=0;for(let r of e)for(let e of t)V(r.a,r.b,e.a,e.b,Y)&&n++;return n},`crossingCountBetweenSegments`),p=e((e,t)=>f(Z(e),Z(t)),`crossingCountBetweenPaths`),m=e((t=new Map)=>{let n=0,r=[],i=new Set,a=[],o=e(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let e=0;e0&&(n+=l,r.push({first:i,second:e,count:l}),o(i),o(e))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=e((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{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`),_=e(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=e(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(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`),y=e((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=e(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`),C=e(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`),T=e((e=new Map)=>c.reduce((t,n)=>t+E(d(n,e)),0),`totalBends`),O=e((e=new Map)=>c.reduce((t,n)=>t+C(d(n,e)),0),`totalLength`),k=e((e,t,n=new Map)=>{let r=Z(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Z(d(t,n)))if(w(e,r,.5)>=X)return!0}return!1},`pathHasSegmentConflict`),A=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(B(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),j=e((e,t)=>{let n=G(D(t));Z(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),M=e(e=>e===`left`||e===`right`,`sideIsHorizontal`),N=e((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`),P=e((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[N(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)j(e,L(t,n,r,o+i*20*a))},`addSameSideCandidates`),R=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))j(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),z=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))j(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),te=e((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)j(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),ne=e((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)j(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),re=e(e=>{let t=new Set;return e.map(e=>D(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`),ie=e((e,t,n,r)=>{let i=[],a=ee(e,t,n,r,20,Y);a&&j(i,a),t===r&&P(i,e,t,n);let o=M(t),s=M(r);return o&&!s?R(i,e,t,n,r):!o&&s?z(i,e,t,n,r):o?te(i,e,t,n,r):ne(i,e,t,n,r),re(i)},`buildCandidatesForSides`),ae=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=I(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){j(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)j(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),oe=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=I(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){j(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)j(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),H=e(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=D(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return S(o,s,Y)?ae(c,o,s,r):x(o,s,Y)&&oe(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),U=e(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=I(r,e);for(let n of o)s.push(...ie(t,e,I(a,n),n))}return s.push(...H(e)),s},`candidatePathsFor`),W=e(()=>new Map(c.map(e=>[e,Z(d(e))])),`currentSegmentsByEdge`),K=e((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Z(d(i));t.some(e=>a.some(t=>w(e,t,.5)>=X))&&r.add(i)}return r},`sharedTrackConflictsFor`),se=e((e,t,n,r)=>{let i=new Set;return U(e).map(e=>G(D(e))).filter(t=>{if(A(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=Z(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Z(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:E(i,Y),totalBends:E(i),length:C(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:K(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ce=e((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 s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Z(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),le=e((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),ue=e((e,t)=>e.segments.some(e=>t.segments.some(t=>w(e,t,.5)>=X)),`candidatesShareTrack`),de=e((e,t,n,r)=>le(t,n.edge)&&le(r,e.edge)&&!ue(t,r),`pairCandidatesAreCompatible`),q=e((e,t,n,r,i)=>{let a=ce(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`),J=e((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!de(t,r,n,a))continue;let o=q(e,t,r,n,a);o&&J(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),pe=e(e=>{let t=T(),n=O(),r=W(),i=b(e),a=new Map(c.map(e=>[e,E(d(e))])),o=new Map(c.map(e=>[e,C(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=se(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=E(d(o),Y);for(let c of U(o)){let l=A(o,c),u=!l&&k(o,c),d=y(e,o,c),f=E(c,Y);l||u||(di||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=pe(e);if(!o)return;for(let[e,t]of o)e.points=t}}e($e,`resolveRenderedOrthogonalCrossings`);var et=.001,tt=8;function nt(t,n){let{nodeInfoById:r,realNodeRects:i}=R(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=e((e,t,n,r)=>{let i=[],a=ee(e,t,n,r,20,et);return a&&i.push(a),t===r&&i.push(L(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=e((e,t)=>{for(let n=0;n{let i=0,a=T(e,et),o=n.start,s=n.end;for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,c=e.end;if(!r&&o&&s&&(t===o||t===s||c===o||c===s))continue;let l=e.points;if(!(!l||l.length<2))for(let e of a)for(let t of T(l,et)){if(re(e.a,e.b,t.a,t.b,et,et)){i++;continue}w(e,t,et)>=tt&&i++}}return i},`pathConflictCount`),u=e((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{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points??[];if(t.length<1)continue;let n=e.id??``,i=e.start,a=e.end;if(i){let e=r.get(i);e&&f(i,u(t[0],e),n)}if(a){let e=r.get(a);e&&f(a,u(t[t.length-1],e),n)}}let p=e((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=E(t,et);if(n<4)continue;let i=e.start,o=e.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=e.id??``,_=l(t,e,!0),v=l(t,e),y,b=_,x=n;for(let t of a){if(p(i,t,g))continue;let n=I(m,t);for(let r of a){if(p(o,r,g))continue;let a=I(h,r);for(let u of s(n,t,a,r)){if(c(u,[i,o]))continue;let t=E(u,et);if(_>0){let n=l(u,e,!0);if(n>b||n===b&&t>=x)continue;b=n,x=t,y=u;continue}l(u,e)>v||te.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}e(nt,`simplifyDetouredEdges`);var Q=.001,rt=10,it=7;function at(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)t&&M(e,ot(t)))}e(st,`labelOverlapsOwnMarker`);function ct(t,n){let r=[];for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!(!t||t.length<2))for(let n=0;n{let n=N(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&M(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=e((e,t)=>{let n=N(t,3);for(let t of r)if(t.edgeId!==e&&k(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=e((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=e(e=>{for(let{id:t,rect:n}of a)if(j(n,e))return t},`findContainingLane`),d=e((e,t)=>l.some(n=>n.labelId!==e&&M(t,n.rect)),`overlapsPlacedLabel`);for(let r of t){if(r.isLayoutOnly)continue;let t=r.labelNodeId;if(!t)continue;let i=n.get(t);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=Q&&i>=Q||h.push({idx:e,length:r+i,orientation:r>=Q?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=e(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=e((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`),w=e((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=e((e,t)=>e.midX>=t.left-Q&&e.midX<=t.right+Q&&e.midY>=t.top-Q&&e.midY<=t.bottom+Q,`pointInsideRectInclusive`),E=e(e=>{let t=P(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=P(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=e((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=e((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+Q{let n=y(e);for(let e of n)for(let n of S){let i=C(e,n);if(!O(e,i))continue;let a=E(i);if(a&&!st(a.rect,f)&&!d(t,a.rect)&&!c(t,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=e((e,n,i=!1)=>{let a=y(e);for(let e of a){let a={midX:e.midX,midY:e.midY};if(n&&!O(e,a))continue;let c=E(a);if(c&&!st(c.rect,f)&&!d(t,c.rect)&&!o(t,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengthe.labelId===t);n>=0?l[n]={labelId:t,rect:e}:l.push({labelId:t,rect:e})}}}e(ct,`anchorLabelsToPolyline`);var lt=1e-6,ut=8/2,dt=3;function ft(e,t){return e{let s=ft(r,i),c=0,l=e(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,r=e.end;!t||!r||ft(t,r)===s&&l(e.labelNodeId)}return c>0?c+dt:0},`labelClearanceFor`);for(let e of t){if(e.isLayoutOnly)continue;let n=e.points;if(!O(n,lt))continue;let a=ne(e,r,lt);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(B(p,m,i,[s,c],1))continue;let h=o(e,s,c,d?`x`:`y`),g=h>ut?h:ut,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!B(r,a,i,[s,c],1)&&!ae(r,a,t,e,{epsilon:lt})){e.points=[r,a];break}}}}e(pt,`straightenCollinearSiblingDetours`);function mt(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=z(n.values()),o=e((e,t)=>T(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=e(()=>{let e=[];for(let n of t){if(n.isLayoutOnly)continue;let t=n.points;!t||t.length<2||e.push(...o(n,D(t)))}return e},`allSegments`),c=e((e,t)=>e.horizontal&&t.horizontal?C(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?C(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=e((e,n)=>{let s=e.start,l=e.end,u=o(e,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=e.labelNodeId?[e.labelNodeId]:[];for(let e of u)if(B(e.a,e.b,i,d,-2)||B(e.a,e.b,a,f,-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of u)for(let i of o(n,D(t)))if(c(e,i)||V(e.a,e.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=e((e,t)=>{let n=D(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 o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=e((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=e(e=>{let t=e.edge,r=D(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?F(i):void 0,s=a?F(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=e((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return D([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=e((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return D([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=e((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}e(mt,`nudgeSharedInteriorSubpaths`);function ht(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,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<.99&&f>p&&f<.99}e(ht,`segmentsIntersect`);function gt(e){let n=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!n.length)return i;let a=te(n),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(e.nodeId!==n&&e.nodeId!==r&&!(s&&e.nodeId===s)){for(let n=0;n0){let e=i.filter(e=>e.type===`edge-node-overlap`).length,n=i.filter(e=>e.type===`edge-edge-crossing`).length;t.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${e} edge-node overlap(s), ${n} edge crossing(s)`);for(let e of i)t.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return i}e(gt,`validateSwimlanesLayout`);function _t(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!Re(t,n)||n===`BT`&&a.length>0&&!Le(t))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=G(W(t)))}nt(i,r),pt(i,r),He(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);ct(i,o),q(i,o),Ue(i,o),mt(i,o),Ge(i,o),Ke(i,o),qe(i,o),Xe(i,o);let s=e(()=>{$e(i,o),Ze(i,o),Qe(i,o),ct(i,o),ke(i,o),qe(i,o),ct(i,o),ke(i,o)},`finalizeRenderedEdges`);s(),mt(i,o),s(),Je(i,o),Ye(i,o),Je(i,o),Ye(i,o)}e(_t,`postProcessSwimlaneLayout`);function vt(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}}e(vt,`normalizeGraph`);function yt(e,t){return e.edges.filter(e=>e.dst===t)}e(yt,`incoming`);function bt(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}e(bt,`buildSuccessorMap`);function xt(e){let t=bt(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}e(xt,`buildSortedSuccessorMap`);function St(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}e(St,`buildInDegreeMap`);function Ct(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}e(Ct,`sortedZeroInDegreeNodes`);function wt(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}}e(wt,`buildPredecessorSuccessorMaps`);function Tt(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}e(Tt,`buildLayersFromRanks`);function Et(e){let t=St(e),n=Ct(t),r=[],i=xt(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{if(i-e<=1)return 0;let a=e+i>>1,o=r(e,a)+r(a,i),s=e,c=a,l=e;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=e(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=St(n),c=[...n.nodes.filter(e=>(s.get(e)??0)===0),...n.nodes.filter(e=>(s.get(e)??0)!==0)];for(let e of c)i[e]===0&&o(e);let l=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),u=n.edges.map(e=>l.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:[...n.nodes],edges:u,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}e(kt,`removeCycles_DFS`);function At(t){let n=new Map,r=e(e=>{if(n.has(e))return n.get(e);let i=t.nodeById.get(e);if(!i)return n.set(e,null),null;let a=i.parentId;if(!a)return n.set(e,null),null;let o=r(a)??a;return n.set(e,o),o},`resolve`);for(let e of t.nodes)r(e);return n}e(At,`buildTopLaneMap`);function jt(e){let t=At(e);return e=>t.get(e)??null}e(jt,`createTopLaneResolver`);function Mt(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}e(Mt,`buildTopLaneOrder`);function Nt(e,t){let n=Mt(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}e(Nt,`resolveTopLaneOrder`);var Pt={EPSILON:1e-6},Ft={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},It={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Lt(t,n){let r=vt(t),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=wt(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=Et(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=Rt(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=zt(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=Bt(m),g=Vt(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=e(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}e(Lt,`buildDrivingTree`);function Rt(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],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}e(Rt,`chooseParent`);function zt(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}e(zt,`buildAdjacency`);function Bt(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}e(Bt,`assignComponents`);function Vt(t){let n=new Map,r=new Map,i=[],a=[],o=0,s=e((e,c)=>{n.set(e,++o),r.set(e,o);for(let l of t.get(e)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(e)??0)&&(i.push([e,l]),r.set(e,Math.min(r.get(e)??o,n.get(l)??o))):(i.push([e,l]),s(l,e),r.set(e,Math.min(r.get(e)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(e)??0)&&a.push(Ht(e,l,i,a.length))))},`visit`);for(let e of t.keys())n.has(e)||s(e,null);return a}e(Vt,`computeBlocks`);function Ht(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]}}e(Ht,`popBlock`);function Ut(t,n,r){let i=[...t.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;c[e]>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`),m=Array.from({length:o},()=>new Map);for(let e of t.edges){let t=e.src,r=e.dst,i=n[t],o=n[r];if(i==null||o==null||(i>o&&([t,r]=[r,t],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(t),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=e(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}e(Ut,`computeSubtreeCrossCounts`);function Wt(t,n,r){let i=new Map,a=e(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(Gt(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let e of t)a(e);return i}e(Wt,`annotateMinimumLayers`);function Gt(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}e(Gt,`compareByRankThenId`);function Kt(t,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=e(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let e of t)c(e);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}e(Kt,`emitNodesInTreeOrder`);function qt(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}e(qt,`deduplicateLayers`);function Jt(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.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),...c]}}e(Jt,`createChildOrderer`);function Yt(e,t,n){let r=Lt(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=Ut(e,t,r),s=[...a].sort(Gt(t)),c=Jt(i,t,o,Wt(s,i,t)),l=Kt(s,e.nodes,t,c);return l=qt(l),l}e(Yt,`buildMultitreeLayerOrder`);function Xt(e,t,n){let r=new Set(e),i=new Set(t),a=Dt(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return Ot(o)}e(Xt,`countCrossingsBetweenAdjacent`);function Zt(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,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=Zt(Yt(e,n,i),e.edges,n);u(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 c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}e($t,`adjustCrossLaneSources`);function en(e,t){let n=vt(e),r=Et(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=jt(n),o=Object.create(null);for(let e of r){let r=yt(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=Qt(n,o)),t?.ignoreCrossLaneEdges&&$t(n,o),{layers:Yt(n,o,a),rankOf:o,dummy:new Set}}e(en,`assignLayers_LongestPath`);function tn(t,n){let r=vt(t),i={...en(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=jt(r),{preds:o,succs:s}=wt(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=Et(r)??[...r.nodes],l=[...c].reverse(),u=e((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=Ft.GRAVITY_ITERATIONS,f=e(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=Math.round((a+c)/2),d=u(n,l);d!==i[n]&&(i[n]=d,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:Tt(r,c,i),rankOf:i,dummy:new Set}}e(tn,`assignLayers_Gravity`);function nn(e){let t=St(e),n=xt(e),r=Ct(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}e(nn,`topoSortByGenerationIfAcyclic`);function rn(t,n){let r=vt(t),i=n?.direction===`LR`?nn(r)??[...r.nodes].sort():Et(r)??[...r.nodes].sort(),a=jt(r),o=e(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=e((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=yt(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:Tt(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}e(rn,`assignLayers_LaneAwareCompact`);function an(t,n){let r=vt(n),{rankOf:i}=t,a=t.layers.map(e=>[...e]),o=new Set(t.dummy?[...t.dummy]:[]),s=0,c=new Map(r.nodeById),l=e(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.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=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}e(an,`makeProperLayering`);function on(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])}e(on,`median`);function sn(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}e(sn,`barycenter`);function cn(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}e(cn,`neighborPositionsFor`);function ln(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}e(ln,`currentOrderTieBreak`);function un(e,t,n){let r=new Set(e),i=new Set(t),a=Dt(e),o=Dt(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),Ot(s.map(e=>e.v))}e(un,`countCrossingsBetweenAdjacent`);function dn(e,t,n){return[...e].sort((e,r)=>{let i=on(t.get(e)??[]),a=on(t.get(r)??[]);return i===a?ln(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}e(dn,`sortByHeuristic`);function fn(e,t,n,r,i,a){let o=Dt(e),s=Dt(t),c=cn(t,o,n,r);if(!i||!a||a.length===0)return dn(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=dn(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=dn(d,c,s);for(let t of e){let e=sn(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(es.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=e(e=>{let n=un(t,e,u);return d&&i&&(n+=un(e,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=jt(t),o=Nt(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=fn(r[e+1],r[e],i,`up`,a,o),r[e]=pn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}e(mn,`orderLayers`);function hn(t,n,r){let i=r?.layerGap??It.DEFAULT_LAYER_GAP,a=r?.nodeGap??It.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=t.layers,u=Object.create(null),d=Object.create(null),f=e(e=>n.nodeById.get(e),`getNode`),p=e(e=>f(e)?.width??0,`getWidth`),m=e(e=>f(e)?.height??0,`getHeight`),h=jt(n),g=Nt(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(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+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;np(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.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&&n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}e(hn,`assignCoordinates`);var gn=8;function _n(e){let t=2166136261;for(let n=0;n>>0}e(_n,`hashString`);function vn(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}}e(vn,`mulberry32`);function yn(e,t){let n=[...e],r=vn(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}e(yn,`deterministicShuffle`);function bn(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}e(bn,`sourceDistance`);function xn(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}e(xn,`laneArrangementCost`);function Sn(e){let t=Mt(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=jt(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),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}e(Sn,`buildWeightedLaneEdges`);function Cn(e,t,n){let r=[...e],i=xn(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.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 _n(`${e.join(`|`)}#${r}#${n}`)}e(Tn,`seedForRestart`);function En(e,t={}){let n=Mt(e);if(n.length<2)return n;let r=Sn(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=Cn(n,r,i),o=Math.max(0,t.restarts??gn);for(let e=0;e$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}e(Pn,`chooseOrthogonalSide`);function Fn(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}e(Fn,`sharedLineEndpointCoord`);function In(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}e(In,`pointOnLine`);function Ln(t,n){let r=t.nodes??[],i=t.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let t of u){let n={id:t.id},i=e(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(t)}let d=r.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=On;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=e((e,t,n,r)=>{let i=c.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:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=e((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`),m=e((e,t,n)=>p(e,Pn(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=e((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex!==e&&t.orientation===`vertical`&&(t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v))}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex!==e&&t.orientation===`horizontal`&&(t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v))}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.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),x=e((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(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minYe.y&&c.maxX>i&&c.minXe.x&&c.maxY>o&&c.minYPn(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=e(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`),D=e(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=e((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=e(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),M=new Map;for(let e of T.values())M.has(e.dstId)||M.set(e.dstId,new Set),M.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=M.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let N=new Map;for(let[e,t]of S){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],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;N.set(r,t)}}let P=e(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),F=e((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>P(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>P(e)):!1,`faceHasLabelNode`),I=e((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),ee=e((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=N.get(`${e}:src`),d=N.get(`${e}:dst`);return u!==void 0&&(c=I(c,o,u)),d!==void 0&&(l=I(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let t of b){let n=a[t];if(g[t]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=ee(t,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+Mn:s.y-Mn:v.x=s.x>(r.x??0)?s.x+Mn:s.x-Mn,T?b.y=u.y>(i.y??0)?u.y+Mn:u.y-Mn:b.x=u.x>(i.x??0)?u.x+Mn:u.x-Mn;let E=e((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+kn:r.minX-kn,y:i?r.maxY+An:r.minY-An,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+kn:r.minX-kn,y:o?r.maxY+An:r.minY-An,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+Mn):Math.max(e.maxY+2,s.y-Mn);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+Mn):Math.max(e.maxX+2,s.x-Mn);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],M=E(b,k);if(M.inside&&M.obstacle){let e=M.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let e=kn,r=Math.abs(v.x-b.x)1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&F(n.start,p)||c>1&&F(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(t);let e=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${e}-${r.toFixed(0)}-${t}`,orientation:e,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:t,segmentIndex:0,orientation:e,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let P=Math.min(v.x,b.x)-50,I=Math.max(v.x,b.x)+50,L=Math.min(v.y,b.y)-50,R=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(P=Math.min(P,e.minX-jn),I=Math.max(I,e.maxX+jn),L=Math.min(L,e.minY-jn),R=Math.max(R,e.maxY+jn))}for(let e of d){if(e.maxXI||e.maxYR)continue;let t=kn;f(`horizontal`,e.minY-t,P,I),f(`horizontal`,e.maxY+t,P,I);let n=An;f(`vertical`,e.minX-n,L,R),f(`vertical`,e.maxX+n,L,R)}f(`horizontal`,v.y,P,I),f(`horizontal`,b.y,P,I);let z=c.filter(e=>e.orientation===`horizontal`&&e.coord>=L&&e.coord<=R),te=c.filter(e=>e.orientation===`vertical`&&e.coord>=P&&e.coord<=I),ne=e((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),B=ne(v.x,v.y),re=ne(b.x,b.y),ie=new Map,ae=new Map,V=new Map,oe=new Set,H=[];ie.set(B,0),V.set(B,`n`),H.push({key:B,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),oe.add(B);let U=[],W=e((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),G={x:b.x,y:v.y},K=W(v,G),se=W(G,b),ce=K||se,le={x:v.x,y:b.y},ue=W(v,le),de=W(le,b);if(ce?ue||de||(U=Math.abs(v.x-b.x)<$?[v,b]:[v,le,b]):U=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,G,b],U.length===0)for(;H.length>0;){H.sort((e,t)=>e.f-t.f);let e=H.shift();if(oe.delete(e.key),e.key===re){let e=re,t=b;for(U=[t];ae.has(e);){let n=ae.get(e);U.unshift(n),t=n,e=ne(n.x,n.y)}break}let r=e.pt.x,i=e.pt.y,a=te.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=z.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o0&&l.push({x:r,y:s[c-1].coord}),c>=0&&ce.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minXr&&e.maxY>c&&e.minYi&&e.maxX>o&&e.minX10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=V.get(e.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(ie.get(e.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(ie.get(u)??1/0))if(ae.set(u,e.pt),ie.set(u,E),V.set(u,w),!oe.has(u))H.push({key:u,f:E+D,pt:a}),oe.add(u);else{let e=H.findIndex(e=>e.key===u);e!==-1&&(H[e].f=E+D)}}}if(U.length===0&&(U=[v,{x:v.x,y:b.y},b]),U.length>4){let t=U[0],n=U[U.length-1],r=Math.min(t.x,n.x),i=Math.max(t.x,n.x),a=Math.min(t.y,n.y),o=Math.max(t.y,n.y);for(let e of U)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(t.x,n.x),c=re.minXr&&e.minYa);if(s.length>0){let r=Math.max(t.x,n.x);for(let t of s){let n=(t.minX+t.maxX)/2;if(t.visualXHalfExtent===void 0||isNaN(t.visualXHalfExtent))continue;let i=n+t.visualXHalfExtent+e;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minXMath.min(t.y,n.y));if(i.length>0){let a=Math.min(t.x,n.x);for(let t of i){let n=(t.minX+t.maxX)/2-t.visualXHalfExtent-e;a=Math.min(a,n)}r=a}}}let u=e(e=>{let r=n.y>t.y,i=d.filter(e=>{let r=Math.min(t.x,n.x)e.minX,i=Math.min(t.y,n.y)e.minY;return r&&i}),a=i;if(l&&i.length>0){let t=i.filter(t=>t.minXe);t.length>0&&(a=t)}if(a.length===0)return n.y;let o=kn;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=e(e=>{let r=u(e),i={x:e,y:t.y},a={x:e,y:r},o={x:n.x,y:r},s=W(t,i),c=W(i,a),l=W(a,o),d=r!==n.y&&W(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[t,i,a,n]:[t,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(U=p)}let q=[s,...O,...U,...j.reverse(),u];if(q.length>=3){let e=q[q.length-1],t=q[q.length-2],n=q[q.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;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)&&q.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)&&q.splice(-2,1)}}let J=[q[0]];for(let e=1;et.x!=r.x>n.x){J.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){J.push(n);continue}continue}J.push(n)}J.push(q[q.length-1]);for(let e=0;ee.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&L(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&L(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`),z=e(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),te=e((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=e((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&te(n,t)}},`moveSegmentChainToTrack`),B=e(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{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.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&L(e,t)))return n.index;return-1},`findAvailableTrack`),ae=e((e,t)=>{if(e.trackIndex===t.trackIndex)return L(e,t);let n=B(e),r=B(t);return n.some(e=>r.some(t=>re(e,t)))},`segmentsConflict`),V=e((e,t,n)=>{if(R(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=ie(e.pipe,t);n(t,r===-1?z(e.pipe):r)},`resolveTrackConflict`),oe=e(e=>{let t=0;for(let n=0;n{if(H.has(e))return H.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return H.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return H.set(e,a),a},`getDestInfo`),W=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=e(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let e of n.values()){e.sort((e,t)=>{let n=U(e),i=U(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[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 n=e.map(e=>h[g[e][0]]);t+=oe(n)}return t},`fixSourceHandleCrossings`),G=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((t,n)=>{let r=e(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(t),a=r(n);return Math.abs(i-a)>.1?i-a:t-n});let n=r.map(e=>h[g[e][g[e].length-1]]);t+=oe(n)}return t},`fixTargetHandleCrossings`),K=e(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;ir.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=U(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=e((e,r)=>{n.filter(t=>t.trackIndex===e).forEach(e=>{let n=_.has(e.edgeIndex)?t.coord:r;ce.set(`${e.edgeIndex}-${e.segmentIndex}`,n)})},`assignCoord`),l=0;for(let e of a)l++,c(e,t.coord-l*Nn);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let e of s){if(u===0)c(e,t.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(e,t.coord+n*r*Nn*.5)}u++}let d=0;for(let e of o)d++,c(e,t.coord+d*Nn)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=ee(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=ce.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$&&r.push(In(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:Fn(t,o);r.push(In(t,e),In(o,e))}else(e===0||e===s.length-2)&&r.push(In(t,Fn(t,o)));else if(c)r.push(In(t,o.coord));else{let e=Math.abs(t.from-i)$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}t.edges=(t.edges??[]).filter(e=>!e.isLayoutOnly);let le=e((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,c=r-a/2,l=r+a/2;if(e.xs||e.yl)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let e of t.edges){let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(t[0]=le(t[0],i)),a&&(t[t.length-1]=le(t[t.length-1],a))}return t}e(Ln,`routeEdgesOrthogonal`);function Rn(e){return e.direction??`TB`}e(Rn,`getSwimlaneDirection`);function zn(e){let t=d(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=Rn(e),{ordered:c,coordinates:l}=Dn(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});f(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;Ln(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return _t(e,s),gt(e),s}e(zn,`runSwimlaneLayoutCore`);function Bn(e){u(e);let t=m(e);e.nodes=t.nodes,e.edges=t.edges}e(Bn,`prepareSwimlaneLayout`);var Vn=n({prepareLayout:Bn,runLayoutCore:zn,afterPaint:i});export{Vn as render}; \ No newline at end of file +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t}from"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{r as n}from"./app-chunk-3FUC2YCW.js";import{t as r}from"./app-chunk-NETBCI7D.js";function i(e,{measure:t}){let n=e.config?.swimlane?.lineHops;if(n===!1)return;let i=n===`gap`?`gap`:`arc`,a=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}));r(t.groups.edgePaths,a,{enabled:!0,jumpRadius:6,jumpStyle:i})}e(i,`applySwimlaneLineJumps`);var a=`__swimlane_default__`,o=21,s=20;function c(e){return Math.max(e.padding??s,s)}e(c,`topLaneHorizontalPadding`);function l(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 s=n-i/2,c=Math.min(a,n+i/2),l=s+Math.min(o,Math.max(0,c-s));if(l<=s){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:s,bottom:l}}e(l,`assignTopLaneTitleRect`);function u(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===a);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:a,label:``,isGroup:!0,shape:`swimlane`,padding:20,look:e.config?.look,colorIndex:n.reduce((e,t)=>Math.max(e,t.colorIndex??-1),-1)+1,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=a}e(u,`prepareLayoutForSwimlanes`);function d(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}}e(d,`toGraphView`);function f(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,u=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=u,e.order=t;let i=n.x[r]??t*s,c=n.y[r]??u*o;e.x=i,e.y=c,t++}u++}let d=i.nodes??[],f=new Map,p=[];for(let e of d){if(!e?.isGroup)continue;e.parentId||p.push(e);let t=d.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],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/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*c(e),s=t,l=Math.max(0,i-r)+n,u=Math.max(0,o-a)+s,d=(r+i)/2,p=(a+o)/2;e.x=d,e.y=p,e.width=l,e.height=u,f.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(p.length>0&&f.size>0){let e=1/0,t=-1/0,n=0;for(let r of p){let i=r.padding??20;i>n&&(n=i);let a=f.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 p)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...p].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],u=[];for(let e of a){let t=f.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*c(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),u.push(n)}let d=o.length;if(d>0){let e=new Map;if(d===1)e.set(o[0],u[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:P(t,n,r,i)}:void 0}e(g,`measuredNodeRect`);function _(e){if(e.isGroup)return;let t=g(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}e(_,`nodeBoundsInfoFor`);function v(e,t,n=h){return Math.abs(e.x-t.x)n}e(x,`isHorizontalSegment`);function S(e,t,n=h){return y(e,t,n)&&Math.abs(e.y-t.y)>n}e(S,`isVerticalSegment`);function C(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)))}e(C,`overlapLength`);function w(e,t,n=h){return e.horizontal&&t.horizontal&&b(e.a,t.a,n)?C(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&y(e.a,t.a,n)?C(e.a.y,e.b.y,t.a.y,t.b.y):0}e(w,`sameAxisSegmentOverlapLength`);function T(e,t=h){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!v(e,r,t))&&n.push({x:r.x,y:r.y})}return n}e(D,`dedupeConsecutivePoints`);function O(e,t=h){if(!e||e.length!==4)return;let[n,r,i,a]=e;return x(n,r,t)&&S(r,i,t)&&x(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:S(n,r,t)&&x(r,i,t)&&S(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}e(O,`classifyThreeSegmentRoute`);function k(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&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}e(j,`rectContainsRect`);function M(e,t){return e.leftt.left&&e.topt.top}e(M,`rectsOverlap`);function N(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}e(N,`inflateRect`);function P(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}e(P,`rectFromCenterSize`);function F(e){return g(e)?.rect}e(F,`rectOfNodeBounds`);function I(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}}}e(I,`portForRectSide`);function ee(e,t,n,r,i,a=h){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(b(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(b(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(y(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.yn.y))return;if(y(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.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}e(ee,`buildOrthogonalPortPath`);function L(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]}e(L,`buildSameSideTrackPath`);function R(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=_(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}e(R,`collectRealNodeBounds`);function z(e){let t=[],n=[];for(let r of e){let e=_(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}}e(z,`collectNodeRectEntries`);function te(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,...P(e,i,a,o)})}return n}e(te,`collectLayoutNodeRects`);function ne(e,t,n=h){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)m||f<_||f>v)return!1;let x=Math.abs(g-u.a.x)i:a&&s&&b(e,n,i)?C(e.x,t.x,n.x,r.x)>i:!1}e(ie,`sameAxisSegmentsOverlap`);function ae(e,t,n,r,{epsilon:i=h,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;rf+i&&mg+i&&d<_-i}e(V,`orthogonalSegmentsStrictlyCross`);function oe(e,t,n){let r=Math.min(t,n),i=Math.max(t,n);return e>r+h&&e=2?t[t.length-2]:void 0,n=e&&y(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||!v(t,e))&&n.push(e)}return n}e(W,`orthogonalizePolyline`);function G(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=U(t);if(t=e.points,!e.changed)break}return t}e(G,`simplifyPolyline`);var K=.001,se=.5,ce=4;function le(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=ue(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}e(de,`clipEndpoint`);function q(e,t){for(let n of e){let e=le(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=de(r,e.srcRect,!0)),e.dstRect&&(r=de(r,e.dstRect,!1)),r=G(W(r)),r=xe(r,e.srcRect,e.dstRect),e.edge.points=G(W(r))}}e(q,`clipEdgeEndpointsToNodeBoundaries`);function J(e,t,n,r=!1){if(b(e,t,K)){if(t.yn.bottom+K)return t;if(r){if(e.xn.right+K)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(y(e,t,K)){if(t.xn.right+K)return t;if(r){if(e.yn.bottom+K)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}e(J,`snapEndpointToBoundary`);function fe(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}e(he,`intersectRanges`);function ge(e,t){return t===`left`||t===`right`?pe(e.top,e.bottom):pe(e.left,e.right)}e(ge,`clearanceRangeForSide`);function _e(e,t,n){let r=e.y>=n.top-K&&e.y<=n.bottom+K,i=e.x>=n.left-K&&e.x<=n.right+K;if(b(e,t,K)&&r){if(Math.abs(e.x-n.left)0?he(a):void 0}e(ye,`straightClearanceRange`);function be(e,t,n,r,i){let a=ye(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)({...e}));for(let s=t;s>=0&&s=n.left-K&&Math.max(e.x,t.x)<=n.right+K,i=Math.min(e.y,t.y)>=n.top-K&&Math.max(e.y,t.y)<=n.bottom+K;if(Math.abs(e.y-n.top)r.bottom+K;case`left`:return b(t,n,K)&&n.xr.right+K}}e(Ee,`leavesOutward`);function De(e,t,n){if(e.length<3)return e;if(n){let n=Te(e[0],e[1],t);return n&&Ee(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=Te(e[r-1],e[r],t);return i&&Ee(i,e[r-1],e[r-2],t)?e.slice(0,r):e}e(De,`collapseOwnBorderStub`);function Oe(e,t,n){let r=e;if(t){let e=fe(r,0,1);if(e){let n=J(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=De(r,t,!0)}if(n){let e=r.length-1,t=fe(r,e,-1);if(t){let i=J(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=De(r,n,!1)}let i=xe(r,t,n);return i!==r||r.length===2?i:(t&&(r=we(r,t,!0)),n&&(r=we(r,n,!1)),r)}e(Oe,`snapAndCollapseEndpoints`);function ke(e,t){for(let n of e){let e=le(n,t,2);if(!e)continue;let r=Oe(D(e.points,K),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}}e(ke,`prepareEdgeEndpointsForRenderer`);function Ae(e){return new Map(e.map(e=>[e.id,e]))}e(Ae,`buildNodeMap`);function je(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}e(je,`resolveTopLevelGroupId`);function Me(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}e(Me,`groupDepth`);function Ne(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,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}e(Ne,`boundsForChildren`);function Pe(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}e(Pe,`applyGroupBounds`);function Fe(e){let t=Ae(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>Me(n,t)-Me(e,t));for(let t of n){let n=Ne(e.filter(e=>e.parentId===t.id));n&&Pe(t,n)}}e(Fe,`recomputeNestedGroupBounds`);function Ie(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=e(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}e(Ie,`mirrorAxis`);function Le(e){return!(e.nodes??[]).some(e=>!e.isGroup)||Ie(e,`y`)}e(Le,`applyBtDirectionTransform`);function Re(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;t0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+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)*d+36,r=e-a;t.x=n,t.y=r}Fe(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&Ie(e,`x`),!0;let p=Ae(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=je(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=Ne(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;ed.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+ze||t>=g.right-ze)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+ze||t>=g.bottom-ze)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=v(i,a,ze),m=v(a,c,ze);if(p&&m||!p&&B(i,a,r,[l],1)||!m&&B(a,c,r,[u],1))continue;let _=!p&&ae(i,a,e,t,{epsilon:ze,skipDegenerateOther:!0}),y=!m&&ae(a,c,e,t,{epsilon:ze,skipDegenerateOther:!0});if(!(_||y)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}e(He,`portSwapToLShape`);function Ue(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=z(n.values());for(let o of t){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=D(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;P={x:f.x,y:M},I={x:e?N.right:N.left,y:M}}if(B(P,I,i,E?[E]:[],-2)||B(P,I,a,[],-2))continue;if(O){let e=n.get(O),t=e?F(e):void 0;if(t&&A(P,t,2))continue}let ee=e((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),L=new Set;for(let e=0;e{for(let i of t){if(i===o||i.isLayoutOnly)continue;let t=i.points;if(!(!t||t.length<2))for(let i=0;i=0){let e=c[l-3],t=[O,E].filter(e=>!!e);if(B(e,P,i,t,-2)||R(e,P))continue}let z=[...c.slice(0,l-2),P,I];o.points=z;let te=o.labelNodeId;if(te){let e=n.get(te);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}e(Ue,`collapseShortTerminalStub`);var Y=.001,X=8,Z=T,We=e((e,t)=>y(e,t,Y)||b(e,t,Y),`orthogonallyAligned`);function Ge(t,n){let r=e((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`),i=e((e,t)=>{let i=D(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?F(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(We(l,u)&&(d=l),y(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(b(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=e((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=e((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)&&y(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&b(e.boundary,t.boundary,1),`sameTerminalFace`),s=e((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=X&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=e((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=e((t,n)=>{let r=D(t.edge.points??[]);if(r.length<2)return;let i=t.orientation===`V`?{x:t.boundary.x+n,y:t.boundary.y}:{x:t.boundary.x,y:t.boundary.y+n},a=t.orientation===`V`?{x:t.railEnd.x+n,y:t.railEnd.y}:{x:t.railEnd.x,y:t.railEnd.y+n};if(!e(()=>Math.abs(t.boundary.y-t.rect.top)<1||Math.abs(t.boundary.y-t.rect.bottom)<1?b(i,t.boundary,Y)&&i.x>=t.rect.left+1&&i.x<=t.rect.right-1:Math.abs(t.boundary.x-t.rect.left)<1||Math.abs(t.boundary.x-t.rect.right)<1?y(i,t.boundary,Y)&&i.y>=t.rect.top+1&&i.y<=t.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(t.atStart){let e=r.length>1&&v(r[1],t.railEnd,Y),n=r.slice(e?2:1),o=n[0];return o&&!We(o,a)?void 0:[i,a,...n]}let o=r.length>1&&v(r[r.length-2],t.railEnd,Y),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!We(c,a)))return[...s,a,i]},`shiftedCandidate`),u=e(e=>{let t=e.edge,r=D(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return b(f,p,Y)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||y(f,p,Y)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let e=0;e<8;e++){let e=t.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let t=0;t{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let t of p){for(let r of d){let a=l(t,r);if(!a)continue;let o=i({...t.edge,points:a},t.atStart);if(!(!o||e.some(e=>e.edge!==t.edge&&(s(o,e)||f&&c(o,e))))){t.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}e(Ge,`separateSharedRenderedTerminalLanes`);function Ke(t,n){let{realNodeRects:r,labelNodeRects:i}=z(n.values()),a=e((e,n)=>{let a=e.start,o=e.end,s=Z(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(B(e.a,e.b,r,c,-2)||B(e.a,e.b,i,[],-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of s)for(let n of Z(D(t)))if(w(e,n,.5)>=X||V(e.a,e.b,n.a,n.b,Y))return!1}}return!0},`candidateIsSafe`),o=e((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=x(n,r)&&S(r,i)&&x(i,a)&&S(a,o)&&y(n,a,Y)&&y(n,o,Y)&&y(r,i,Y)&&(r.x-n.x)*(a.x-i.x)<0,c=S(n,r)&&x(r,i)&&S(i,a)&&x(a,o)&&b(n,a,Y)&&b(n,o,Y)&&b(r,i,Y)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return D([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=S(n,r)&&x(r,i)&&S(i,a)&&x(a,o)&&S(o,l)&&y(n,o,Y)&&y(n,l,Y)&&y(i,a,Y)&&(i.x-r.x)*(o.x-a.x)<0,d=x(n,r)&&S(r,i)&&x(i,a)&&S(a,o)&&x(o,l)&&b(n,o,Y)&&b(n,l,Y)&&b(i,a,Y)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return D([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let e=0;e<8;e++){let e=!1;for(let n of t){if(n.isLayoutOnly)continue;let t=D(n.points??[]);for(let r=0;r<=t.length-5;r++){let i=o(t,r);if(!(!i||!a(n,i))){n.points=i,e=!0;break}}if(e)break}if(!e)return}}e(Ke,`collapseRedundantRectangularDoglegs`);function qe(t,n){let{realNodeRects:r,labelNodeRects:i}=z(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>D(e===t?n??[]:e.points??[]),`pointsFor`),s=e((e,t)=>{let n=0;for(let r=0;r{let t=Z(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=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?C(t.a.x,t.b.x,r.left,r.right)>=X&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:C(t.a.y,t.b.y,r.top,r.bottom)>=X&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=e((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=G(D(r));return Z(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=e((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Z(t);if(l.length!==t.length-1)return!1;for(let e of l)if(B(e.a,e.b,r,c,-2)||B(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Z(o(t)))if(w(e,n,.5)>=X)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){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}}e(qe,`liftObstacleHuggingSameSideRails`);function Je(t,n){let r=e(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`),i=e(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(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,c=i.bottom-i.top;if(!(c<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:C(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let e of t){if(e.isLayoutOnly)continue;let t=D(e.points??[]);for(let e of Z(t))for(let t of o)a(e,t.rect)&&(s=Math.max(s,t.rect.bottom-e.a.y+4))}if(!(s<=Y))for(let e of o){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-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}e(Je,`liftTopLaneTitleBandsAboveRails`);function Ye(t,n){let r=e(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`),i=e(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+Y||n>=t.right-Y?!1:C(e.a.y,e.b.y,t.top,t.bottom)>=X},`verticalSegmentIntersectsTitle`),o=e((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:C(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let e of t){if(e.isLayoutOnly)continue;let t=D(e.points??[]);for(let e of Z(t))for(let t of s)if(a(e,t.rect))c=Math.max(c,t.rect.right-e.a.x+4);else if(o(e,t.rect)){let n=Math.min(e.a.x,e.b.x);c=Math.max(c,t.rect.right-n+4)}}if(!(c<=Y))for(let e of s){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-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}e(Ye,`shiftLeftLaneTitleBandsLeftOfRails`);function Xe(t,n){let{realNodeRects:r}=z(n.values()),i=t.filter(e=>!e.isLayoutOnly),a=e((e,t=new Map)=>D(t.get(e)??e.points??[]),`replacementPointsFor`),o=e((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+E(a(n,e)),0),`totalBends`),c=e(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!x(n,r,Y)&&!S(n,r,Y)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=e((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(x(r,i,Y))o={x:i.x,y:t.tailStart.y};else if(S(r,i,Y))o={x:t.tailStart.x,y:i.y};else return;let s=G(D([r,i,o,t.tailStart,t.terminal]));return Z(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(B(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=e((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Z(t))for(let t of Z(a(r,n)))if(w(e,t,.5)>=X)return!0}return!1},`pathHasSharedTrack`),f=e((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=e(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}e(Xe,`swapDestinationTerminalTailsToReduceCrossings`);function Ze(t,n){let{realNodeRects:r,labelNodeRects:i}=z(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t=new Map)=>D(t.get(e)??e.points??[]),`replacementPointsFor`),s=e((e=new Map)=>{let t=0;for(let n=0;na.reduce((t,n)=>t+E(o(n,e)),0),`totalBends`),l=e(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?F(i):void 0,s=a?F(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=e((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=io+Y?`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=io+Y?`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=e(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Z(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=e((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&C(e.min,e.max,t.min,t.max)>=X,`railsInteract`),p=e(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`),m=e(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let n=t.map(e=>e.coord),r=m(t),i=[];if(t.length<=6){let a=Array(r.length).fill(!1),o=[],s=e(()=>{if(o.length===t.length){o.some((e,t)=>Math.abs(e-n[t])>=Y)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e{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=G(D(t));if(Z(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=e(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Z(n))if(B(t.a,t.b,r,e,-2)||B(t.a,t.b,i,[],-2))return!1}for(let t=0;t=X)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}e(Ze,`reassignCrossingExternalRailChannels`);function Qe(t,n){let{realNodeRects:r,labelNodeRects:i}=z(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>D(e===t?n??[]:e.points??[]),`pointsFor`),s=e(e=>Z(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`),c=e((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&C(e.a.x,e.b.x,t.left,t.right)>=X}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&C(e.a.y,e.b.y,t.top,t.bottom)>=X}return!1},`segmentRunsAlongRectBorder`),u=e(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?F(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=e((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=x(n,r,Y)&&S(r,i,Y)&&x(i,a,Y),s=S(n,r,Y)&&x(r,i,Y)&&S(i,a,Y);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 c=y(n,a,Y)||b(n,a,Y)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>G(D(e))).filter(e=>{if(Z(e).length!==e.length-1||!e.some(e=>v(e,a,Y)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return!u.has(t)&&(u.add(t),!0)})},`shortcutCandidatesAt`),f=e((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Z(t))if(B(e.a,e.b,r,s,-2)||B(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Z(t))for(let t of Z(o(n)))if(w(e,t,.5)>=X)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=E(a,Y),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=E(h,Y),o=s(h);if(!(ar||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}e(Qe,`shortcutRedundantOrthogonalJogs`);function $e(t,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=F(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={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},c=t.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=e(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=e((e,t=new Map)=>D(t.get(e)??e.points??[]),`replacementPointsFor`),f=e((e,t)=>{let n=0;for(let r of e)for(let e of t)V(r.a,r.b,e.a,e.b,Y)&&n++;return n},`crossingCountBetweenSegments`),p=e((e,t)=>f(Z(e),Z(t)),`crossingCountBetweenPaths`),m=e((t=new Map)=>{let n=0,r=[],i=new Set,a=[],o=e(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let e=0;e0&&(n+=l,r.push({first:i,second:e,count:l}),o(i),o(e))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=e((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{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`),_=e(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=e(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(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`),y=e((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=e(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`),C=e(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`),T=e((e=new Map)=>c.reduce((t,n)=>t+E(d(n,e)),0),`totalBends`),O=e((e=new Map)=>c.reduce((t,n)=>t+C(d(n,e)),0),`totalLength`),k=e((e,t,n=new Map)=>{let r=Z(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Z(d(t,n)))if(w(e,r,.5)>=X)return!0}return!1},`pathHasSegmentConflict`),A=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(B(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),j=e((e,t)=>{let n=G(D(t));Z(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),M=e(e=>e===`left`||e===`right`,`sideIsHorizontal`),N=e((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`),P=e((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[N(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)j(e,L(t,n,r,o+i*20*a))},`addSameSideCandidates`),R=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))j(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),z=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))j(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),te=e((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)j(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),ne=e((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)j(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),re=e(e=>{let t=new Set;return e.map(e=>D(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`),ie=e((e,t,n,r)=>{let i=[],a=ee(e,t,n,r,20,Y);a&&j(i,a),t===r&&P(i,e,t,n);let o=M(t),s=M(r);return o&&!s?R(i,e,t,n,r):!o&&s?z(i,e,t,n,r):o?te(i,e,t,n,r):ne(i,e,t,n,r),re(i)},`buildCandidatesForSides`),ae=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=I(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){j(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)j(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),oe=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=I(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){j(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)j(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),H=e(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=D(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return S(o,s,Y)?ae(c,o,s,r):x(o,s,Y)&&oe(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),U=e(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=I(r,e);for(let n of o)s.push(...ie(t,e,I(a,n),n))}return s.push(...H(e)),s},`candidatePathsFor`),W=e(()=>new Map(c.map(e=>[e,Z(d(e))])),`currentSegmentsByEdge`),K=e((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Z(d(i));t.some(e=>a.some(t=>w(e,t,.5)>=X))&&r.add(i)}return r},`sharedTrackConflictsFor`),se=e((e,t,n,r)=>{let i=new Set;return U(e).map(e=>G(D(e))).filter(t=>{if(A(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=Z(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Z(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:E(i,Y),totalBends:E(i),length:C(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:K(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ce=e((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 s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Z(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),le=e((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),ue=e((e,t)=>e.segments.some(e=>t.segments.some(t=>w(e,t,.5)>=X)),`candidatesShareTrack`),de=e((e,t,n,r)=>le(t,n.edge)&&le(r,e.edge)&&!ue(t,r),`pairCandidatesAreCompatible`),q=e((e,t,n,r,i)=>{let a=ce(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`),J=e((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!de(t,r,n,a))continue;let o=q(e,t,r,n,a);o&&J(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),pe=e(e=>{let t=T(),n=O(),r=W(),i=b(e),a=new Map(c.map(e=>[e,E(d(e))])),o=new Map(c.map(e=>[e,C(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=se(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=E(d(o),Y);for(let c of U(o)){let l=A(o,c),u=!l&&k(o,c),d=y(e,o,c),f=E(c,Y);l||u||(di||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=pe(e);if(!o)return;for(let[e,t]of o)e.points=t}}e($e,`resolveRenderedOrthogonalCrossings`);var et=.001,tt=8;function nt(t,n){let{nodeInfoById:r,realNodeRects:i}=R(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=e((e,t,n,r)=>{let i=[],a=ee(e,t,n,r,20,et);return a&&i.push(a),t===r&&i.push(L(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=e((e,t)=>{for(let n=0;n{let i=0,a=T(e,et),o=n.start,s=n.end;for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,c=e.end;if(!r&&o&&s&&(t===o||t===s||c===o||c===s))continue;let l=e.points;if(!(!l||l.length<2))for(let e of a)for(let t of T(l,et)){if(re(e.a,e.b,t.a,t.b,et,et)){i++;continue}w(e,t,et)>=tt&&i++}}return i},`pathConflictCount`),u=e((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{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points??[];if(t.length<1)continue;let n=e.id??``,i=e.start,a=e.end;if(i){let e=r.get(i);e&&f(i,u(t[0],e),n)}if(a){let e=r.get(a);e&&f(a,u(t[t.length-1],e),n)}}let p=e((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=E(t,et);if(n<4)continue;let i=e.start,o=e.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=e.id??``,_=l(t,e,!0),v=l(t,e),y,b=_,x=n;for(let t of a){if(p(i,t,g))continue;let n=I(m,t);for(let r of a){if(p(o,r,g))continue;let a=I(h,r);for(let u of s(n,t,a,r)){if(c(u,[i,o]))continue;let t=E(u,et);if(_>0){let n=l(u,e,!0);if(n>b||n===b&&t>=x)continue;b=n,x=t,y=u;continue}l(u,e)>v||te.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}e(nt,`simplifyDetouredEdges`);var Q=.001,rt=10,it=7;function at(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)t&&M(e,ot(t)))}e(st,`labelOverlapsOwnMarker`);function ct(t,n){let r=[];for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!(!t||t.length<2))for(let n=0;n{let n=N(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&M(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=e((e,t)=>{let n=N(t,3);for(let t of r)if(t.edgeId!==e&&k(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=e((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=e(e=>{for(let{id:t,rect:n}of a)if(j(n,e))return t},`findContainingLane`),d=e((e,t)=>l.some(n=>n.labelId!==e&&M(t,n.rect)),`overlapsPlacedLabel`);for(let r of t){if(r.isLayoutOnly)continue;let t=r.labelNodeId;if(!t)continue;let i=n.get(t);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=Q&&i>=Q||h.push({idx:e,length:r+i,orientation:r>=Q?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=e(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=e((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`),w=e((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=e((e,t)=>e.midX>=t.left-Q&&e.midX<=t.right+Q&&e.midY>=t.top-Q&&e.midY<=t.bottom+Q,`pointInsideRectInclusive`),E=e(e=>{let t=P(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=P(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=e((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=e((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+Q{let n=y(e);for(let e of n)for(let n of S){let i=C(e,n);if(!O(e,i))continue;let a=E(i);if(a&&!st(a.rect,f)&&!d(t,a.rect)&&!c(t,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=e((e,n,i=!1)=>{let a=y(e);for(let e of a){let a={midX:e.midX,midY:e.midY};if(n&&!O(e,a))continue;let c=E(a);if(c&&!st(c.rect,f)&&!d(t,c.rect)&&!o(t,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengthe.labelId===t);n>=0?l[n]={labelId:t,rect:e}:l.push({labelId:t,rect:e})}}}e(ct,`anchorLabelsToPolyline`);var lt=1e-6,ut=8/2,dt=3;function ft(e,t){return e{let s=ft(r,i),c=0,l=e(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,r=e.end;!t||!r||ft(t,r)===s&&l(e.labelNodeId)}return c>0?c+dt:0},`labelClearanceFor`);for(let e of t){if(e.isLayoutOnly)continue;let n=e.points;if(!O(n,lt))continue;let a=ne(e,r,lt);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(B(p,m,i,[s,c],1))continue;let h=o(e,s,c,d?`x`:`y`),g=h>ut?h:ut,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!B(r,a,i,[s,c],1)&&!ae(r,a,t,e,{epsilon:lt})){e.points=[r,a];break}}}}e(pt,`straightenCollinearSiblingDetours`);function mt(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=z(n.values()),o=e((e,t)=>T(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=e(()=>{let e=[];for(let n of t){if(n.isLayoutOnly)continue;let t=n.points;!t||t.length<2||e.push(...o(n,D(t)))}return e},`allSegments`),c=e((e,t)=>e.horizontal&&t.horizontal?C(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?C(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=e((e,n)=>{let s=e.start,l=e.end,u=o(e,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=e.labelNodeId?[e.labelNodeId]:[];for(let e of u)if(B(e.a,e.b,i,d,-2)||B(e.a,e.b,a,f,-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of u)for(let i of o(n,D(t)))if(c(e,i)||V(e.a,e.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=e((e,t)=>{let n=D(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 o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=e((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=e(e=>{let t=e.edge,r=D(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?F(i):void 0,s=a?F(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=e((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return D([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=e((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return D([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=e((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}e(mt,`nudgeSharedInteriorSubpaths`);function ht(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,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<.99&&f>p&&f<.99}e(ht,`segmentsIntersect`);function gt(e){let n=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!n.length)return i;let a=te(n),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(e.nodeId!==n&&e.nodeId!==r&&!(s&&e.nodeId===s)){for(let n=0;n0){let e=i.filter(e=>e.type===`edge-node-overlap`).length,n=i.filter(e=>e.type===`edge-edge-crossing`).length;t.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${e} edge-node overlap(s), ${n} edge crossing(s)`);for(let e of i)t.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return i}e(gt,`validateSwimlanesLayout`);function _t(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!Re(t,n)||n===`BT`&&a.length>0&&!Le(t))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=G(W(t)))}nt(i,r),pt(i,r),He(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);ct(i,o),q(i,o),Ue(i,o),mt(i,o),Ge(i,o),Ke(i,o),qe(i,o),Xe(i,o);let s=e(()=>{$e(i,o),Ze(i,o),Qe(i,o),ct(i,o),ke(i,o),qe(i,o),ct(i,o),ke(i,o)},`finalizeRenderedEdges`);s(),mt(i,o),s(),Je(i,o),Ye(i,o),Je(i,o),Ye(i,o)}e(_t,`postProcessSwimlaneLayout`);function vt(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}}e(vt,`normalizeGraph`);function yt(e,t){return e.edges.filter(e=>e.dst===t)}e(yt,`incoming`);function bt(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}e(bt,`buildSuccessorMap`);function xt(e){let t=bt(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}e(xt,`buildSortedSuccessorMap`);function St(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}e(St,`buildInDegreeMap`);function Ct(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}e(Ct,`sortedZeroInDegreeNodes`);function wt(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}}e(wt,`buildPredecessorSuccessorMaps`);function Tt(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}e(Tt,`buildLayersFromRanks`);function Et(e){let t=St(e),n=Ct(t),r=[],i=xt(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{if(i-e<=1)return 0;let a=e+i>>1,o=r(e,a)+r(a,i),s=e,c=a,l=e;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=e(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=St(n),c=[...n.nodes.filter(e=>(s.get(e)??0)===0),...n.nodes.filter(e=>(s.get(e)??0)!==0)];for(let e of c)i[e]===0&&o(e);let l=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),u=n.edges.map(e=>l.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:[...n.nodes],edges:u,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}e(kt,`removeCycles_DFS`);function At(t){let n=new Map,r=e(e=>{if(n.has(e))return n.get(e);let i=t.nodeById.get(e);if(!i)return n.set(e,null),null;let a=i.parentId;if(!a)return n.set(e,null),null;let o=r(a)??a;return n.set(e,o),o},`resolve`);for(let e of t.nodes)r(e);return n}e(At,`buildTopLaneMap`);function jt(e){let t=At(e);return e=>t.get(e)??null}e(jt,`createTopLaneResolver`);function Mt(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}e(Mt,`buildTopLaneOrder`);function Nt(e,t){let n=Mt(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}e(Nt,`resolveTopLaneOrder`);var Pt={EPSILON:1e-6},Ft={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},It={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Lt(t,n){let r=vt(t),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=wt(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=Et(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=Rt(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=zt(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=Bt(m),g=Vt(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=e(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}e(Lt,`buildDrivingTree`);function Rt(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],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}e(Rt,`chooseParent`);function zt(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}e(zt,`buildAdjacency`);function Bt(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}e(Bt,`assignComponents`);function Vt(t){let n=new Map,r=new Map,i=[],a=[],o=0,s=e((e,c)=>{n.set(e,++o),r.set(e,o);for(let l of t.get(e)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(e)??0)&&(i.push([e,l]),r.set(e,Math.min(r.get(e)??o,n.get(l)??o))):(i.push([e,l]),s(l,e),r.set(e,Math.min(r.get(e)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(e)??0)&&a.push(Ht(e,l,i,a.length))))},`visit`);for(let e of t.keys())n.has(e)||s(e,null);return a}e(Vt,`computeBlocks`);function Ht(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]}}e(Ht,`popBlock`);function Ut(t,n,r){let i=[...t.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;c[e]>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`),m=Array.from({length:o},()=>new Map);for(let e of t.edges){let t=e.src,r=e.dst,i=n[t],o=n[r];if(i==null||o==null||(i>o&&([t,r]=[r,t],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(t),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=e(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}e(Ut,`computeSubtreeCrossCounts`);function Wt(t,n,r){let i=new Map,a=e(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(Gt(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let e of t)a(e);return i}e(Wt,`annotateMinimumLayers`);function Gt(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}e(Gt,`compareByRankThenId`);function Kt(t,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=e(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let e of t)c(e);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}e(Kt,`emitNodesInTreeOrder`);function qt(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}e(qt,`deduplicateLayers`);function Jt(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.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),...c]}}e(Jt,`createChildOrderer`);function Yt(e,t,n){let r=Lt(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=Ut(e,t,r),s=[...a].sort(Gt(t)),c=Jt(i,t,o,Wt(s,i,t)),l=Kt(s,e.nodes,t,c);return l=qt(l),l}e(Yt,`buildMultitreeLayerOrder`);function Xt(e,t,n){let r=new Set(e),i=new Set(t),a=Dt(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return Ot(o)}e(Xt,`countCrossingsBetweenAdjacent`);function Zt(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,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=Zt(Yt(e,n,i),e.edges,n);u(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 c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}e($t,`adjustCrossLaneSources`);function en(e,t){let n=vt(e),r=Et(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=jt(n),o=Object.create(null);for(let e of r){let r=yt(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=Qt(n,o)),t?.ignoreCrossLaneEdges&&$t(n,o),{layers:Yt(n,o,a),rankOf:o,dummy:new Set}}e(en,`assignLayers_LongestPath`);function tn(t,n){let r=vt(t),i={...en(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=jt(r),{preds:o,succs:s}=wt(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=Et(r)??[...r.nodes],l=[...c].reverse(),u=e((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=Ft.GRAVITY_ITERATIONS,f=e(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=Math.round((a+c)/2),d=u(n,l);d!==i[n]&&(i[n]=d,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:Tt(r,c,i),rankOf:i,dummy:new Set}}e(tn,`assignLayers_Gravity`);function nn(e){let t=St(e),n=xt(e),r=Ct(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}e(nn,`topoSortByGenerationIfAcyclic`);function rn(t,n){let r=vt(t),i=n?.direction===`LR`?nn(r)??[...r.nodes].sort():Et(r)??[...r.nodes].sort(),a=jt(r),o=e(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=e((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=yt(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:Tt(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}e(rn,`assignLayers_LaneAwareCompact`);function an(t,n){let r=vt(n),{rankOf:i}=t,a=t.layers.map(e=>[...e]),o=new Set(t.dummy?[...t.dummy]:[]),s=0,c=new Map(r.nodeById),l=e(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.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=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}e(an,`makeProperLayering`);function on(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])}e(on,`median`);function sn(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}e(sn,`barycenter`);function cn(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}e(cn,`neighborPositionsFor`);function ln(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}e(ln,`currentOrderTieBreak`);function un(e,t,n){let r=new Set(e),i=new Set(t),a=Dt(e),o=Dt(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),Ot(s.map(e=>e.v))}e(un,`countCrossingsBetweenAdjacent`);function dn(e,t,n){return[...e].sort((e,r)=>{let i=on(t.get(e)??[]),a=on(t.get(r)??[]);return i===a?ln(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}e(dn,`sortByHeuristic`);function fn(e,t,n,r,i,a){let o=Dt(e),s=Dt(t),c=cn(t,o,n,r);if(!i||!a||a.length===0)return dn(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=dn(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=dn(d,c,s);for(let t of e){let e=sn(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(es.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=e(e=>{let n=un(t,e,u);return d&&i&&(n+=un(e,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=jt(t),o=Nt(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=fn(r[e+1],r[e],i,`up`,a,o),r[e]=pn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}e(mn,`orderLayers`);function hn(t,n,r){let i=r?.layerGap??It.DEFAULT_LAYER_GAP,a=r?.nodeGap??It.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=t.layers,u=Object.create(null),d=Object.create(null),f=e(e=>n.nodeById.get(e),`getNode`),p=e(e=>f(e)?.width??0,`getWidth`),m=e(e=>f(e)?.height??0,`getHeight`),h=jt(n),g=Nt(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(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+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;np(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.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&&n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}e(hn,`assignCoordinates`);var gn=8;function _n(e){let t=2166136261;for(let n=0;n>>0}e(_n,`hashString`);function vn(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}}e(vn,`mulberry32`);function yn(e,t){let n=[...e],r=vn(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}e(yn,`deterministicShuffle`);function bn(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}e(bn,`sourceDistance`);function xn(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}e(xn,`laneArrangementCost`);function Sn(e){let t=Mt(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=jt(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),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}e(Sn,`buildWeightedLaneEdges`);function Cn(e,t,n){let r=[...e],i=xn(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.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 _n(`${e.join(`|`)}#${r}#${n}`)}e(Tn,`seedForRestart`);function En(e,t={}){let n=Mt(e);if(n.length<2)return n;let r=Sn(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=Cn(n,r,i),o=Math.max(0,t.restarts??gn);for(let e=0;e$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}e(Pn,`chooseOrthogonalSide`);function Fn(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}e(Fn,`sharedLineEndpointCoord`);function In(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}e(In,`pointOnLine`);function Ln(t,n){let r=t.nodes??[],i=t.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let t of u){let n={id:t.id},i=e(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(t)}let d=r.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=On;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=e((e,t,n,r)=>{let i=c.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:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=e((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`),m=e((e,t,n)=>p(e,Pn(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=e((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex!==e&&t.orientation===`vertical`&&(t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v))}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex!==e&&t.orientation===`horizontal`&&(t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v))}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.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),x=e((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(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minYe.y&&c.maxX>i&&c.minXe.x&&c.maxY>o&&c.minYPn(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=e(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`),D=e(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=e((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=e(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),M=new Map;for(let e of T.values())M.has(e.dstId)||M.set(e.dstId,new Set),M.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=M.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let N=new Map;for(let[e,t]of S){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],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;N.set(r,t)}}let P=e(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),F=e((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>P(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>P(e)):!1,`faceHasLabelNode`),I=e((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),ee=e((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=N.get(`${e}:src`),d=N.get(`${e}:dst`);return u!==void 0&&(c=I(c,o,u)),d!==void 0&&(l=I(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let t of b){let n=a[t];if(g[t]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=ee(t,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+Mn:s.y-Mn:v.x=s.x>(r.x??0)?s.x+Mn:s.x-Mn,T?b.y=u.y>(i.y??0)?u.y+Mn:u.y-Mn:b.x=u.x>(i.x??0)?u.x+Mn:u.x-Mn;let E=e((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+kn:r.minX-kn,y:i?r.maxY+An:r.minY-An,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+kn:r.minX-kn,y:o?r.maxY+An:r.minY-An,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+Mn):Math.max(e.maxY+2,s.y-Mn);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+Mn):Math.max(e.maxX+2,s.x-Mn);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],M=E(b,k);if(M.inside&&M.obstacle){let e=M.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let e=kn,r=Math.abs(v.x-b.x)1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&F(n.start,p)||c>1&&F(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(t);let e=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${e}-${r.toFixed(0)}-${t}`,orientation:e,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:t,segmentIndex:0,orientation:e,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let P=Math.min(v.x,b.x)-50,I=Math.max(v.x,b.x)+50,L=Math.min(v.y,b.y)-50,R=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(P=Math.min(P,e.minX-jn),I=Math.max(I,e.maxX+jn),L=Math.min(L,e.minY-jn),R=Math.max(R,e.maxY+jn))}for(let e of d){if(e.maxXI||e.maxYR)continue;let t=kn;f(`horizontal`,e.minY-t,P,I),f(`horizontal`,e.maxY+t,P,I);let n=An;f(`vertical`,e.minX-n,L,R),f(`vertical`,e.maxX+n,L,R)}f(`horizontal`,v.y,P,I),f(`horizontal`,b.y,P,I);let z=c.filter(e=>e.orientation===`horizontal`&&e.coord>=L&&e.coord<=R),te=c.filter(e=>e.orientation===`vertical`&&e.coord>=P&&e.coord<=I),ne=e((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),B=ne(v.x,v.y),re=ne(b.x,b.y),ie=new Map,ae=new Map,V=new Map,oe=new Set,H=[];ie.set(B,0),V.set(B,`n`),H.push({key:B,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),oe.add(B);let U=[],W=e((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),G={x:b.x,y:v.y},K=W(v,G),se=W(G,b),ce=K||se,le={x:v.x,y:b.y},ue=W(v,le),de=W(le,b);if(ce?ue||de||(U=Math.abs(v.x-b.x)<$?[v,b]:[v,le,b]):U=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,G,b],U.length===0)for(;H.length>0;){H.sort((e,t)=>e.f-t.f);let e=H.shift();if(oe.delete(e.key),e.key===re){let e=re,t=b;for(U=[t];ae.has(e);){let n=ae.get(e);U.unshift(n),t=n,e=ne(n.x,n.y)}break}let r=e.pt.x,i=e.pt.y,a=te.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=z.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o0&&l.push({x:r,y:s[c-1].coord}),c>=0&&ce.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minXr&&e.maxY>c&&e.minYi&&e.maxX>o&&e.minX10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=V.get(e.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(ie.get(e.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(ie.get(u)??1/0))if(ae.set(u,e.pt),ie.set(u,E),V.set(u,w),!oe.has(u))H.push({key:u,f:E+D,pt:a}),oe.add(u);else{let e=H.findIndex(e=>e.key===u);e!==-1&&(H[e].f=E+D)}}}if(U.length===0&&(U=[v,{x:v.x,y:b.y},b]),U.length>4){let t=U[0],n=U[U.length-1],r=Math.min(t.x,n.x),i=Math.max(t.x,n.x),a=Math.min(t.y,n.y),o=Math.max(t.y,n.y);for(let e of U)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(t.x,n.x),c=re.minXr&&e.minYa);if(s.length>0){let r=Math.max(t.x,n.x);for(let t of s){let n=(t.minX+t.maxX)/2;if(t.visualXHalfExtent===void 0||isNaN(t.visualXHalfExtent))continue;let i=n+t.visualXHalfExtent+e;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minXMath.min(t.y,n.y));if(i.length>0){let a=Math.min(t.x,n.x);for(let t of i){let n=(t.minX+t.maxX)/2-t.visualXHalfExtent-e;a=Math.min(a,n)}r=a}}}let u=e(e=>{let r=n.y>t.y,i=d.filter(e=>{let r=Math.min(t.x,n.x)e.minX,i=Math.min(t.y,n.y)e.minY;return r&&i}),a=i;if(l&&i.length>0){let t=i.filter(t=>t.minXe);t.length>0&&(a=t)}if(a.length===0)return n.y;let o=kn;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=e(e=>{let r=u(e),i={x:e,y:t.y},a={x:e,y:r},o={x:n.x,y:r},s=W(t,i),c=W(i,a),l=W(a,o),d=r!==n.y&&W(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[t,i,a,n]:[t,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(U=p)}let q=[s,...O,...U,...j.reverse(),u];if(q.length>=3){let e=q[q.length-1],t=q[q.length-2],n=q[q.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;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)&&q.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)&&q.splice(-2,1)}}let J=[q[0]];for(let e=1;et.x!=r.x>n.x){J.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){J.push(n);continue}continue}J.push(n)}J.push(q[q.length-1]);for(let e=0;ee.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&L(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&L(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`),z=e(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),te=e((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=e((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&te(n,t)}},`moveSegmentChainToTrack`),B=e(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{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.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&L(e,t)))return n.index;return-1},`findAvailableTrack`),ae=e((e,t)=>{if(e.trackIndex===t.trackIndex)return L(e,t);let n=B(e),r=B(t);return n.some(e=>r.some(t=>re(e,t)))},`segmentsConflict`),V=e((e,t,n)=>{if(R(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=ie(e.pipe,t);n(t,r===-1?z(e.pipe):r)},`resolveTrackConflict`),oe=e(e=>{let t=0;for(let n=0;n{if(H.has(e))return H.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return H.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return H.set(e,a),a},`getDestInfo`),W=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=e(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let e of n.values()){e.sort((e,t)=>{let n=U(e),i=U(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[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 n=e.map(e=>h[g[e][0]]);t+=oe(n)}return t},`fixSourceHandleCrossings`),G=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((t,n)=>{let r=e(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(t),a=r(n);return Math.abs(i-a)>.1?i-a:t-n});let n=r.map(e=>h[g[e][g[e].length-1]]);t+=oe(n)}return t},`fixTargetHandleCrossings`),K=e(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;ir.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=U(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=e((e,r)=>{n.filter(t=>t.trackIndex===e).forEach(e=>{let n=_.has(e.edgeIndex)?t.coord:r;ce.set(`${e.edgeIndex}-${e.segmentIndex}`,n)})},`assignCoord`),l=0;for(let e of a)l++,c(e,t.coord-l*Nn);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let e of s){if(u===0)c(e,t.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(e,t.coord+n*r*Nn*.5)}u++}let d=0;for(let e of o)d++,c(e,t.coord+d*Nn)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=ee(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=ce.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$&&r.push(In(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:Fn(t,o);r.push(In(t,e),In(o,e))}else(e===0||e===s.length-2)&&r.push(In(t,Fn(t,o)));else if(c)r.push(In(t,o.coord));else{let e=Math.abs(t.from-i)$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}t.edges=(t.edges??[]).filter(e=>!e.isLayoutOnly);let le=e((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,c=r-a/2,l=r+a/2;if(e.xs||e.yl)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let e of t.edges){let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(t[0]=le(t[0],i)),a&&(t[t.length-1]=le(t[t.length-1],a))}return t}e(Ln,`routeEdgesOrthogonal`);function Rn(e){return e.direction??`TB`}e(Rn,`getSwimlaneDirection`);function zn(e){let t=d(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=Rn(e),{ordered:c,coordinates:l}=Dn(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});f(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;Ln(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return _t(e,s),gt(e),s}e(zn,`runSwimlaneLayoutCore`);function Bn(e){u(e);let t=m(e);e.nodes=t.nodes,e.edges=t.edges}e(Bn,`prepareSwimlaneLayout`);var Vn=n({prepareLayout:Bn,runLayoutCore:zn,afterPaint:i});export{Vn as render}; \ No newline at end of file diff --git a/web/dist/app-swimlanesDiagram-TC7HE7FX.js b/web/dist/app-swimlanesDiagram-TC7HE7FX.js index d6bc0af9c..8c32c5dbc 100644 --- a/web/dist/app-swimlanesDiagram-TC7HE7FX.js +++ b/web/dist/app-swimlanesDiagram-TC7HE7FX.js @@ -1,4 +1,4 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import"./app-chunk-GWA4HPMP.js";import"./app-chunk-XXDRQBXY.js";import"./app-chunk-WEXAMYUT.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-GNY47TPC.js";import"./app-chunk-LNGE3PJU.js";import{r as t,t as n}from"./app-chunk-7M6MHVWA.js";var r=n({styles:e(e=>`${t(e)} +import{n as e}from"./app-chunk-Y2CYZVJY.js";import"./app-src.js";import"./app-chunk-O7XYJQB3.js";import"./app-chunk-ZIGJFQKS.js";import"./app-chunk-LNGE3PJU.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import"./app-chunk-MBY4JIJT.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import"./app-chunk-GNY47TPC.js";import"./app-chunk-GWA4HPMP.js";import"./app-chunk-XXDRQBXY.js";import"./app-chunk-WEXAMYUT.js";import{r as t,t as n}from"./app-chunk-7M6MHVWA.js";var r=n({styles:e(e=>`${t(e)} .swimlane.cluster:not([data-color-id]) rect { stroke: ${e.clusterBorder} !important; } diff --git a/web/dist/app-usecaseDiagram-POWQR4AR.js b/web/dist/app-usecaseDiagram-POWQR4AR.js index 1c5e4e6d4..1c6798fe0 100644 --- a/web/dist/app-usecaseDiagram-POWQR4AR.js +++ b/web/dist/app-usecaseDiagram-POWQR4AR.js @@ -1,4 +1,4 @@ -import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{H as r,U as i,a,b as o,f as s,q as c,v as l,w as u,x as d,y as f,z as p}from"./app-chunk-O7XYJQB3.js";import{g as m}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-742MDFTN.js";import{i as h}from"./app-chunk-MBY4JIJT.js";import"./app-chunk-7PRAP22T.js";import{a as g,i as ee,o as te,r as _}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-Z7XXMR3K.js";import{t as ne}from"./app-chunk-XXDRQBXY.js";import{t as re}from"./app-chunk-WEXAMYUT.js";import"./app-chunk-UA2S7LBM.js";import{r as ie,t as ae}from"./app-chunk-GNY47TPC.js";var oe=typeof global==`object`&&global&&global.Object===Object&&global,se=typeof self==`object`&&self&&self.Object===Object&&self,v=oe||se||Function(`return this`)(),y=v.Symbol,ce=Object.prototype,le=ce.hasOwnProperty,ue=ce.toString,de=y?y.toStringTag:void 0;function fe(e){var t=le.call(e,de),n=e[de];try{e[de]=void 0;var r=!0}catch{}var i=ue.call(e);return r&&(t?e[de]=n:delete e[de]),i}var pe=Object.prototype.toString;function me(e){return pe.call(e)}var he=`[object Null]`,ge=`[object Undefined]`,_e=y?y.toStringTag:void 0;function ve(e){return e==null?e===void 0?ge:he:_e&&_e in Object(e)?fe(e):me(e)}function ye(e){return typeof e==`object`&&!!e}var be=`[object Symbol]`;function xe(e){return typeof e==`symbol`||ye(e)&&ve(e)==be}function Se(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=mt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function vt(e){return function(){return e}}var yt=function(){try{var e=ct(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),bt=_t(yt?function(e,t){return yt(e,`toString`,{configurable:!0,enumerable:!1,value:vt(t),writable:!0})}:He);function xt(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var Dt=9007199254740991,Ot=/^(?:0|[1-9]\d*)$/;function kt(e,t){var n=typeof e;return t??=Dt,!!t&&(n==`number`||n!=`symbol`&&Ot.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Rt}function Bt(e){return e!=null&&zt(e.length)&&!qe(e)}function Vt(e,t,n){if(!je(n))return!1;var r=typeof t;return(r==`number`?Bt(n)&&kt(t,n.length):r==`string`&&t in n)?jt(n[t],e):!1}function Ht(e){return Lt(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&&Vt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1}function pr(e,t){var n=this.__data__,r=cr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function mr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?Br(s,t-1,n,r,i):Lr(i,s):r||(i[i.length]=s)}return i}function Vr(e){return e!=null&&e.length?Br(e,1):[]}var Hr=Rn(Object.getPrototypeOf,Object);function Ur(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);++rs))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&ro?new $a:void 0;for(a.set(e,t),a.set(t,e);++d2?t[2]:void 0;for(i&&Vt(t[0],t[1],i)&&(r=1);++n=us&&(a=to,o=!1,t=new $a(t));outer:for(;++i-1?i[a?t[o]:o]:void 0}}var Ss=Math.max;function Cs(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Ve(n);return i<0&&(i=Ss(r+i,0)),St(e,Xo(t,3),i)}var ws=xs(Cs);function Ts(e){return e&&e.length?e[0]:void 0}function Es(e,t){var n=-1,r=Bt(e)?Array(e.length):[];return ns(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function k(e,t){return(b(e)?Se:Es)(e,Xo(t,3))}function Ds(e,t){return Br(k(e,t),1)}var Os=Object.prototype.hasOwnProperty,ks=is(function(e,t,n){Os.call(e,n)?e[n].push(t):At(e,n,[t])}),As=Object.prototype.hasOwnProperty;function js(e,t){return e!=null&&As.call(e,t)}function A(e,t){return e!=null&&Ho(e,t,js)}var Ms=`[object String]`;function j(e){return typeof e==`string`||!b(e)&&ye(e)&&ve(e)==Ms}function Ns(e,t){return Se(t,function(t){return e[t]})}function M(e){return e==null?[]:Ns(e,C(e))}var Ps=Math.max;function N(e,t,n,r){e=Bt(e)?e:M(e),n=n&&!r?Ve(n):0;var i=e.length;return n<0&&(n=Ps(i+n,0)),j(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Tt(e,t,n)>-1}var Fs=Math.max;function Is(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Ve(n);return i<0&&(i=Fs(r+i,0)),Tt(e,t,i)}var Ls=`[object Map]`,Rs=`[object Set]`,zs=Object.prototype.hasOwnProperty;function P(e){if(e==null)return!0;if(Bt(e)&&(b(e)||typeof e==`string`||typeof e.splice==`function`||nn(e)||Fn(e)||Zt(e)))return!e.length;var t=ji(e);if(t==Ls||t==Rs)return!e.size;if(Wt(e))return!Vn(e).length;for(var n in e)if(zs.call(e,n))return!1;return!0}var Bs=`[object RegExp]`;function Vs(e){return ye(e)&&ve(e)==Bs}var Hs=Nn&&Nn.isRegExp,Us=Hs?kn(Hs):Vs;function Ws(e){return e===void 0}var Gs=`Expected a function`;function Ks(e){if(typeof e!=`function`)throw TypeError(Gs);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 qs(e,t,n,r){if(!je(e))return e;t=Mr(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i=tc){var l=t?null:ec(e);if(l)return oo(l);o=!1,i=to,c=new $a}else c=t?[]:s;outer:for(;++r{t.accept(e)})}},I=class extends uc{constructor(e){super([]),this.idx=1,w(this,Ys(e,e=>e!==void 0))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},dc=class extends uc{constructor(e){super(e.definition),this.orgText=``,w(this,Ys(e,e=>e!==void 0))}},L=class extends uc{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,w(this,Ys(e,e=>e!==void 0))}},R=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},fc=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},pc=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},z=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},mc=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},hc=class extends uc{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,w(this,Ys(e,e=>e!==void 0))}},B=class{constructor(e){this.idx=1,w(this,Ys(e,e=>e!==void 0))}accept(e){e.visit(this)}};function gc(e){return k(e,_c)}function _c(e){function t(e){return k(e,_c)}if(e instanceof I){let t={type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};return j(e.label)&&(t.label=e.label),t}if(e instanceof L)return{type:`Alternative`,definition:t(e.definition)};if(e instanceof R)return{type:`Option`,idx:e.idx,definition:t(e.definition)};if(e instanceof fc)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};if(e instanceof pc)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:_c(new B({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof mc)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:_c(new B({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof z)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};if(e instanceof hc)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};if(e instanceof B){let t={type:`Terminal`,name:e.terminalType.name,label:cc(e.terminalType),idx:e.idx};j(e.label)&&(t.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=Us(n)?n.source:n),t}if(e instanceof dc)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error(`non exhaustive match`)}var vc=class{visit(e){let t=e;switch(t.constructor){case I:return this.visitNonTerminal(t);case L:return this.visitAlternative(t);case R:return this.visitOption(t);case fc:return this.visitRepetitionMandatory(t);case pc:return this.visitRepetitionMandatoryWithSeparator(t);case mc:return this.visitRepetitionWithSeparator(t);case z:return this.visitRepetition(t);case hc:return this.visitAlternation(t);case B:return this.visitTerminal(t);case dc: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){}};function yc(e){return e instanceof L||e instanceof R||e instanceof z||e instanceof fc||e instanceof pc||e instanceof mc||e instanceof B||e instanceof dc}function bc(e,t=[]){return e instanceof R||e instanceof z||e instanceof mc?!0:e instanceof hc?$s(e.definition,e=>bc(e,t)):e instanceof I&&N(t,e)?!1:e instanceof uc&&(e instanceof I&&t.push(e),vs(e.definition,e=>bc(e,t)))}function xc(e){return e instanceof hc}function Sc(e){if(e instanceof I)return`SUBRULE`;if(e instanceof R)return`OPTION`;if(e instanceof hc)return`OR`;if(e instanceof fc)return`AT_LEAST_ONE`;if(e instanceof pc)return`AT_LEAST_ONE_SEP`;if(e instanceof mc)return`MANY_SEP`;if(e instanceof z)return`MANY`;if(e instanceof B)return`CONSUME`;throw Error(`non exhaustive match`)}var Cc=class{walk(e,t=[]){O(e.definition,(n,r)=>{let i=D(e.definition,r+1);if(n instanceof I)this.walkProdRef(n,i,t);else if(n instanceof B)this.walkTerminal(n,i,t);else if(n instanceof L)this.walkFlat(n,i,t);else if(n instanceof R)this.walkOption(n,i,t);else if(n instanceof fc)this.walkAtLeastOne(n,i,t);else if(n instanceof pc)this.walkAtLeastOneSep(n,i,t);else if(n instanceof mc)this.walkManySep(n,i,t);else if(n instanceof z)this.walkMany(n,i,t);else if(n instanceof hc)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 R({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=wc(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new R({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=wc(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);O(e.definition,e=>{let t=new L({definition:[e]});this.walk(t,r)})}};function wc(e,t,n){return[new R({definition:[new B({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function Tc(e){if(e instanceof I)return Tc(e.referencedRule);if(e instanceof B)return Oc(e);if(yc(e))return Ec(e);if(xc(e))return Dc(e);throw Error(`non exhaustive match`)}function Ec(e){let t=[],n=e.definition,r=0,i=n.length>r,a,o=!0;for(;i&&o;)a=n[r],o=bc(a),t=t.concat(Tc(a)),r+=1,i=n.length>r;return rc(t)}function Dc(e){return rc(Vr(k(e.definition,e=>Tc(e))))}function Oc(e){return[e.terminalType]}var kc=`_~IN~_`,Ac=class extends Cc{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=Mc(e.referencedRule,e.idx)+this.topProd.name,i=Tc(new L({definition:t.concat(n)}));this.follows[r]=i}};function jc(e){let t={};return O(e,e=>{let n=new Ac(e).startWalking();w(t,n)}),t}function Mc(e,t){return e.name+t+kc}function V(e){return e.charCodeAt(0)}function Nc(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Pc(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function Fc(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function Ic(){throw Error(`Internal Error - Should never get here!`)}function Lc(e){return e.type===`Character`}var Rc=[];for(let e=V(`0`);e<=V(`9`);e++)Rc.push(e);var zc=[V(`_`)].concat(Rc);for(let e=V(`a`);e<=V(`z`);e++)zc.push(e);for(let e=V(`A`);e<=V(`Z`);e++)zc.push(e);var Bc=[V(` `),V(`\f`),V(` +import{n as e}from"./app-chunk-Y2CYZVJY.js";import{m as t,p as n}from"./app-src.js";import{H as r,U as i,a,b as o,f as s,q as c,v as l,w as u,x as d,y as f,z as p}from"./app-chunk-O7XYJQB3.js";import{g as m}from"./app-chunk-ZIGJFQKS.js";import"./app-chunk-7PRAP22T.js";import"./app-chunk-742MDFTN.js";import{i as h}from"./app-chunk-MBY4JIJT.js";import{a as g,i as ee,o as te,r as _}from"./app-chunk-J5ZVWO5B.js";import"./app-chunk-7INBJB4K.js";import"./app-chunk-5DYCD2WN.js";import"./app-chunk-UA2S7LBM.js";import"./app-chunk-Z7XXMR3K.js";import{r as ne,t as re}from"./app-chunk-GNY47TPC.js";import{t as ie}from"./app-chunk-XXDRQBXY.js";import{t as ae}from"./app-chunk-WEXAMYUT.js";var oe=typeof global==`object`&&global&&global.Object===Object&&global,se=typeof self==`object`&&self&&self.Object===Object&&self,v=oe||se||Function(`return this`)(),y=v.Symbol,ce=Object.prototype,le=ce.hasOwnProperty,ue=ce.toString,de=y?y.toStringTag:void 0;function fe(e){var t=le.call(e,de),n=e[de];try{e[de]=void 0;var r=!0}catch{}var i=ue.call(e);return r&&(t?e[de]=n:delete e[de]),i}var pe=Object.prototype.toString;function me(e){return pe.call(e)}var he=`[object Null]`,ge=`[object Undefined]`,_e=y?y.toStringTag:void 0;function ve(e){return e==null?e===void 0?ge:he:_e&&_e in Object(e)?fe(e):me(e)}function ye(e){return typeof e==`object`&&!!e}var be=`[object Symbol]`;function xe(e){return typeof e==`symbol`||ye(e)&&ve(e)==be}function Se(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=mt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function vt(e){return function(){return e}}var yt=function(){try{var e=ct(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),bt=_t(yt?function(e,t){return yt(e,`toString`,{configurable:!0,enumerable:!1,value:vt(t),writable:!0})}:He);function xt(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var Dt=9007199254740991,Ot=/^(?:0|[1-9]\d*)$/;function kt(e,t){var n=typeof e;return t??=Dt,!!t&&(n==`number`||n!=`symbol`&&Ot.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Rt}function Bt(e){return e!=null&&zt(e.length)&&!qe(e)}function Vt(e,t,n){if(!je(n))return!1;var r=typeof t;return(r==`number`?Bt(n)&&kt(t,n.length):r==`string`&&t in n)?jt(n[t],e):!1}function Ht(e){return Lt(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&&Vt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1}function pr(e,t){var n=this.__data__,r=cr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function mr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?Br(s,t-1,n,r,i):Lr(i,s):r||(i[i.length]=s)}return i}function Vr(e){return e!=null&&e.length?Br(e,1):[]}var Hr=Rn(Object.getPrototypeOf,Object);function Ur(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);++rs))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&ro?new $a:void 0;for(a.set(e,t),a.set(t,e);++d2?t[2]:void 0;for(i&&Vt(t[0],t[1],i)&&(r=1);++n=us&&(a=to,o=!1,t=new $a(t));outer:for(;++i-1?i[a?t[o]:o]:void 0}}var Ss=Math.max;function Cs(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Ve(n);return i<0&&(i=Ss(r+i,0)),St(e,Xo(t,3),i)}var ws=xs(Cs);function Ts(e){return e&&e.length?e[0]:void 0}function Es(e,t){var n=-1,r=Bt(e)?Array(e.length):[];return ns(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function k(e,t){return(b(e)?Se:Es)(e,Xo(t,3))}function Ds(e,t){return Br(k(e,t),1)}var Os=Object.prototype.hasOwnProperty,ks=is(function(e,t,n){Os.call(e,n)?e[n].push(t):At(e,n,[t])}),As=Object.prototype.hasOwnProperty;function js(e,t){return e!=null&&As.call(e,t)}function A(e,t){return e!=null&&Ho(e,t,js)}var Ms=`[object String]`;function j(e){return typeof e==`string`||!b(e)&&ye(e)&&ve(e)==Ms}function Ns(e,t){return Se(t,function(t){return e[t]})}function M(e){return e==null?[]:Ns(e,C(e))}var Ps=Math.max;function N(e,t,n,r){e=Bt(e)?e:M(e),n=n&&!r?Ve(n):0;var i=e.length;return n<0&&(n=Ps(i+n,0)),j(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Tt(e,t,n)>-1}var Fs=Math.max;function Is(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Ve(n);return i<0&&(i=Fs(r+i,0)),Tt(e,t,i)}var Ls=`[object Map]`,Rs=`[object Set]`,zs=Object.prototype.hasOwnProperty;function P(e){if(e==null)return!0;if(Bt(e)&&(b(e)||typeof e==`string`||typeof e.splice==`function`||nn(e)||Fn(e)||Zt(e)))return!e.length;var t=ji(e);if(t==Ls||t==Rs)return!e.size;if(Wt(e))return!Vn(e).length;for(var n in e)if(zs.call(e,n))return!1;return!0}var Bs=`[object RegExp]`;function Vs(e){return ye(e)&&ve(e)==Bs}var Hs=Nn&&Nn.isRegExp,Us=Hs?kn(Hs):Vs;function Ws(e){return e===void 0}var Gs=`Expected a function`;function Ks(e){if(typeof e!=`function`)throw TypeError(Gs);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 qs(e,t,n,r){if(!je(e))return e;t=Mr(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i=tc){var l=t?null:ec(e);if(l)return oo(l);o=!1,i=to,c=new $a}else c=t?[]:s;outer:for(;++r{t.accept(e)})}},I=class extends uc{constructor(e){super([]),this.idx=1,w(this,Ys(e,e=>e!==void 0))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},dc=class extends uc{constructor(e){super(e.definition),this.orgText=``,w(this,Ys(e,e=>e!==void 0))}},L=class extends uc{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,w(this,Ys(e,e=>e!==void 0))}},R=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},fc=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},pc=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},z=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},mc=class extends uc{constructor(e){super(e.definition),this.idx=1,w(this,Ys(e,e=>e!==void 0))}},hc=class extends uc{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,w(this,Ys(e,e=>e!==void 0))}},B=class{constructor(e){this.idx=1,w(this,Ys(e,e=>e!==void 0))}accept(e){e.visit(this)}};function gc(e){return k(e,_c)}function _c(e){function t(e){return k(e,_c)}if(e instanceof I){let t={type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};return j(e.label)&&(t.label=e.label),t}if(e instanceof L)return{type:`Alternative`,definition:t(e.definition)};if(e instanceof R)return{type:`Option`,idx:e.idx,definition:t(e.definition)};if(e instanceof fc)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};if(e instanceof pc)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:_c(new B({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof mc)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:_c(new B({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof z)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};if(e instanceof hc)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};if(e instanceof B){let t={type:`Terminal`,name:e.terminalType.name,label:cc(e.terminalType),idx:e.idx};j(e.label)&&(t.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=Us(n)?n.source:n),t}if(e instanceof dc)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error(`non exhaustive match`)}var vc=class{visit(e){let t=e;switch(t.constructor){case I:return this.visitNonTerminal(t);case L:return this.visitAlternative(t);case R:return this.visitOption(t);case fc:return this.visitRepetitionMandatory(t);case pc:return this.visitRepetitionMandatoryWithSeparator(t);case mc:return this.visitRepetitionWithSeparator(t);case z:return this.visitRepetition(t);case hc:return this.visitAlternation(t);case B:return this.visitTerminal(t);case dc: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){}};function yc(e){return e instanceof L||e instanceof R||e instanceof z||e instanceof fc||e instanceof pc||e instanceof mc||e instanceof B||e instanceof dc}function bc(e,t=[]){return e instanceof R||e instanceof z||e instanceof mc?!0:e instanceof hc?$s(e.definition,e=>bc(e,t)):e instanceof I&&N(t,e)?!1:e instanceof uc&&(e instanceof I&&t.push(e),vs(e.definition,e=>bc(e,t)))}function xc(e){return e instanceof hc}function Sc(e){if(e instanceof I)return`SUBRULE`;if(e instanceof R)return`OPTION`;if(e instanceof hc)return`OR`;if(e instanceof fc)return`AT_LEAST_ONE`;if(e instanceof pc)return`AT_LEAST_ONE_SEP`;if(e instanceof mc)return`MANY_SEP`;if(e instanceof z)return`MANY`;if(e instanceof B)return`CONSUME`;throw Error(`non exhaustive match`)}var Cc=class{walk(e,t=[]){O(e.definition,(n,r)=>{let i=D(e.definition,r+1);if(n instanceof I)this.walkProdRef(n,i,t);else if(n instanceof B)this.walkTerminal(n,i,t);else if(n instanceof L)this.walkFlat(n,i,t);else if(n instanceof R)this.walkOption(n,i,t);else if(n instanceof fc)this.walkAtLeastOne(n,i,t);else if(n instanceof pc)this.walkAtLeastOneSep(n,i,t);else if(n instanceof mc)this.walkManySep(n,i,t);else if(n instanceof z)this.walkMany(n,i,t);else if(n instanceof hc)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 R({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=wc(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new R({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=wc(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);O(e.definition,e=>{let t=new L({definition:[e]});this.walk(t,r)})}};function wc(e,t,n){return[new R({definition:[new B({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function Tc(e){if(e instanceof I)return Tc(e.referencedRule);if(e instanceof B)return Oc(e);if(yc(e))return Ec(e);if(xc(e))return Dc(e);throw Error(`non exhaustive match`)}function Ec(e){let t=[],n=e.definition,r=0,i=n.length>r,a,o=!0;for(;i&&o;)a=n[r],o=bc(a),t=t.concat(Tc(a)),r+=1,i=n.length>r;return rc(t)}function Dc(e){return rc(Vr(k(e.definition,e=>Tc(e))))}function Oc(e){return[e.terminalType]}var kc=`_~IN~_`,Ac=class extends Cc{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=Mc(e.referencedRule,e.idx)+this.topProd.name,i=Tc(new L({definition:t.concat(n)}));this.follows[r]=i}};function jc(e){let t={};return O(e,e=>{let n=new Ac(e).startWalking();w(t,n)}),t}function Mc(e,t){return e.name+t+kc}function V(e){return e.charCodeAt(0)}function Nc(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Pc(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function Fc(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function Ic(){throw Error(`Internal Error - Should never get here!`)}function Lc(e){return e.type===`Character`}var Rc=[];for(let e=V(`0`);e<=V(`9`);e++)Rc.push(e);var zc=[V(`_`)].concat(Rc);for(let e=V(`a`);e<=V(`z`);e++)zc.push(e);for(let e=V(`A`);e<=V(`Z`);e++)zc.push(e);var Bc=[V(` `),V(`\f`),V(` `),V(`\r`),V(` `),V(`\v`),V(` `),V(`\xA0`),V(` `),V(` `),V(` `),V(` `),V(` `),V(` `),V(` `),V(` `),V(` `),V(` `),V(` `),V(` `),V(`\u2028`),V(`\u2029`),V(` `),V(` `),V(` `),V(``)],Vc=/[0-9a-fA-F]/,Hc=/[0-9]/,Uc=/[1-9]/,Wc=class{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`:Pc(n,`global`);break;case`i`:Pc(n,`ignoreCase`);break;case`m`:Pc(n,`multiLine`);break;case`u`:Pc(n,`unicode`);break;case`y`:Pc(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`}}Fc(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return Ic()}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;Fc(t)}if((e!==!0||t!==void 0)&&Fc(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()),Fc(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Ic()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[V(` `),V(`\r`),V(`\u2028`),V(`\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=Rc;break;case`D`:e=Rc,t=!0;break;case`s`:e=Bc;break;case`S`:e=Bc,t=!0;break;case`w`:e=zc;break;case`W`:e=zc,t=!0}return Fc(e)?{type:`Set`,value:e,complement:t}:Ic()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=V(`\f`);break;case`n`:e=V(` `);break;case`r`:e=V(`\r`);break;case`t`:e=V(` `);break;case`v`:e=V(`\v`)}return Fc(e)?{type:`Character`,value:e}:Ic()}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:V(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:V(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` @@ -73,7 +73,7 @@ For Further details.`,r},buildEmptyRepetitionError(e){let t=Sc(e.repetition);ret `);break;case`r`:e&&(t+=`\r`);break;case`t`:e&&(t+=` `);break;case`u`:{let n=this.text.slice(this.offset,this.offset+4);if(!/^[\dA-Fa-f]{4}$/u.test(n))throw new Q(this.offset);e&&(t+=String.fromCharCode(Number.parseInt(n,16))),this.offset+=4;break}default:throw new Q(i)}}throw new Q(this.offset)}consumeLiteral(e){let t=0;for(let n of e){if(this.text[this.offset+t]!==n)throw new Q(this.offset+t);t++}this.offset+=e.length}consumeNumber(){if(this.text[this.offset]===`-`&&this.offset++,this.text[this.offset]===`0`)this.offset++;else if(this.text[this.offset]>=`1`&&this.text[this.offset]<=`9`)for(;this.text[this.offset]>=`0`&&this.text[this.offset]<=`9`;)this.offset++;else throw new Q(this.offset);if(this.text[this.offset]===`.`){if(this.offset++,this.text[this.offset]<`0`||this.text[this.offset]>`9`)throw new Q(this.offset);for(;this.text[this.offset]>=`0`&&this.text[this.offset]<=`9`;)this.offset++}if(this.text[this.offset]===`e`||this.text[this.offset]===`E`){if(this.offset++,(this.text[this.offset]===`+`||this.text[this.offset]===`-`)&&this.offset++,this.text[this.offset]<`0`||this.text[this.offset]>`9`)throw new Q(this.offset);for(;this.text[this.offset]>=`0`&&this.text[this.offset]<=`9`;)this.offset++}}skipWhitespace(){for(;this.offset({shape:e.type===`normal`?`actor`:e.type===`hollow`?`actor-hollow`:e.type===`awesome`?`actor-awesome`:`actor-icon`,...e.label===e.id?{}:{label:e.label},...e.classes.length?{classes:[...e.classes]}:{},...e.styles.length?{styles:[...e.styles]}:{},attrs:{kind:`actor`,actorType:e.type,business:e.business,labelType:e.labelType,...e.icon?{icon:e.icon}:{},...e.stereotype?{stereotype:e.stereotype}:{},...e.parentId?{parentId:e.parentId}:{}}}),`actorNode`),Lm=e(e=>({shape:e.shape,...e.label===e.id?{}:{label:e.label},...e.classes.length?{classes:[...e.classes]}:{},...e.styles.length?{styles:[...e.styles]}:{},attrs:{kind:`usecase`,useCaseShape:e.shape,business:e.business,labelType:e.labelType,...e.stereotype?{stereotype:e.stereotype}:{},...e.parentId?{parentId:e.parentId}:{}}}),`useCaseNode`),Rm=e(e=>({label:e.label,shape:`note`,attrs:{kind:`note`,target:e.target,labelType:e.labelType}}),`noteNode`),zm=e(e=>({label:e.id,shape:`json-table`,...e.classes.length?{classes:[...e.classes]}:{},...e.styles.length?{styles:[...e.styles]}:{},attrs:{kind:`json`,value:e.value,propertyOrder:e.propertyOrder,labelType:`text`}}),`jsonNode`),Bm=e(e=>({id:e.id,source:e.source,target:e.target,...e.label?{label:e.label}:{},...e.classes.length?{classes:[...e.classes]}:{},...e.styles.length?{styles:[...e.styles]}:{},attrs:{relationshipType:e.type,arrowType:e.arrowType,minlen:e.minlen,explicitId:e.explicitId,animate:e.animate,...e.animation?{animation:e.animation}:{},...e.labelType?{labelType:e.labelType}:{}}}),`relationshipEdge`),Vm=e(e=>({id:`${e.id}-edge`,source:e.id,target:e.target,attrs:{relationshipType:`note`,arrowType:q.LINE_SOLID,pattern:`dotted`,minlen:1,explicitId:!1,animate:!1,internal:!0}}),`noteEdge`),Hm=e((e,t,n,r)=>{let i={};for(let t of e.getActors().values())i[t.id]=Im(t);for(let t of e.getUseCases().values())i[t.id]=Lm(t);for(let t of e.getNotes().values())i[t.id]=Rm(t);for(let t of e.getJsonNodes().values())i[t.id]=zm(t);let a={};for(let t of e.getSystemBoundaries().values())a[t.id]={...t.label===t.id?{}:{title:t.label},nodes:[...t.members],...t.classes.length?{classes:[...t.classes]}:{},...t.styles.length?{styles:[...t.styles]}:{},attrs:{kind:`systemBoundary`,boundaryType:t.type,labelType:t.labelType}};let o={};for(let t of e.getClassDefs().values())o[t.id]={styles:[...t.styles]};let s=e.getDirection();return{version:1,diagramType:`usecase`,source:t,header:{keyword:`usecase`,direction:s===`TD`?`TB`:s,span:n},...e.getAccTitle()?{accTitle:e.getAccTitle()}:{},...e.getAccDescription()?{accDescr:e.getAccDescription()}:{},nodes:i,edges:[...e.getRelationships().map(Bm),...[...e.getNotes().values()].map(Vm)],groups:a,classDefs:o,statements:r}},`buildUsecaseGraphAST`),$=e(e=>`line ${e.line}, column ${e.column} [${e.span[0]},${e.span[1]})`,`locationText`),Um=e(e=>e===void 0?``:` (label "${e}")`,`labelSuffix`),Wm=e(e=>e.generated?e.label:void 0,`generatedFrom`),Gm=e((e,t)=>{for(let n of t)e.includes(n)||e.push(n)},`pushUnique`),Km=class{constructor(e){this.db=e,this.source=``,this.statements=[],this.elements=[],this.boundaries=[],this.jsonDrafts=[],this.relationshipDrafts=[],this.noteDrafts=[],this.metadataAssignments=[],this.classAssignments=[],this.styleAssignments=[],this.classDefinitions=[],this.directions=[],this.model=e.createModel()}static{e(this,`UsecaseModelBuilder`)}reset(e){this.model=this.db.createModel(),this.source=e,this.statements=[],this.elements.length=0,this.boundaries.length=0,this.jsonDrafts.length=0,this.relationshipDrafts.length=0,this.noteDrafts.length=0,this.metadataAssignments.length=0,this.classAssignments.length=0,this.styleAssignments.length=0,this.classDefinitions.length=0,this.directions.length=0}addElement(e){this.elements.push(e)}addBoundary(e){this.boundaries.push(e)}addJson(e){this.jsonDrafts.push(e)}addRelationship(e){this.relationshipDrafts.push(e)}addNote(e){this.noteDrafts.push(e)}addMetadataAssignment(e,t,n,r){this.metadataAssignments.push({target:e,targetLocation:t,metadata:n,statement:r})}addClassDef(e,t){this.classDefinitions.push({ids:e,styles:t})}addClassAssignment(e,t){this.classAssignments.push({targets:e,classes:t})}addStyleAssignment(e,t,n){this.styleAssignments.push({target:e,location:t,styles:n})}setDirection(e){this.directions.push(e===`TD`?`TB`:e)}setAccTitle(e){this.model.accTitle=e}setAccDescription(e){this.model.accDescription=e}setStatements(e){this.statements=e}getActors(){return this.model.actors}getUseCases(){return this.model.useCases}getSystemBoundaries(){return this.model.systemBoundaries}getRelationships(){return this.model.relationships}getNotes(){return this.model.notes}getJsonNodes(){return this.model.jsonNodes}getClassDefs(){return this.model.classDefs}getDirection(){return this.model.direction}getAccTitle(){return this.model.accTitle}getAccDescription(){return this.model.accDescription}finalize(e){let t=new Map,n=new Map,r=new Map,i=new Map;for(let e of this.relationshipDrafts)this.recordFirst(i,e.source.id,e.source.location.span[0]),this.recordFirst(i,e.target.id,e.target.location.span[0]);for(let e of this.elements)this.recordFirst(i,e.id,e.location.span[0]);for(let e of this.boundaries)this.recordFirst(i,e.id,e.location.span[0]);for(let e of this.jsonDrafts)this.recordFirst(i,e.id,e.location.span[0]);let a=[...this.elements.map(e=>({offset:e.location.span[0],type:`element`,value:e})),...this.boundaries.map(e=>({offset:e.location.span[0],type:`boundary`,value:e})),...this.jsonDrafts.map(e=>({offset:e.location.span[0],type:`json`,value:e})),...this.relationshipDrafts.filter(e=>e.explicitId).map(e=>({offset:e.explicitIdLocation.span[0],type:`edge`,value:e}))].sort((e,t)=>e.offset-t.offset);for(let e of a)e.type===`element`?this.collectElement(e.value,t,n):e.type===`boundary`?this.collectBoundary(e.value,t,r):e.type===`json`?this.registerUnique(t,e.value.id,`json`,e.value.location,!1):this.registerUnique(t,e.value.explicitId,`edge`,e.value.explicitIdLocation,!1);this.materializeElements(n,i),this.materializeBoundaries(r,i),this.materializeJson(i);let o=this.materializeRelationships(t,n,i);this.reorderElements(n,i),this.applyMetadataAssignments(t,n,r,o),this.validateAndRefreshElements(n),this.refreshBoundaries(r,n),this.materializeNotes(t),this.applyClassDefinitions(),this.applyClassesAndStyles(t,o),this.model.direction=this.directions.at(-1)??this.model.direction,this.model.symbols=new Map([...t].map(([e,t])=>[e,t.kind]));let s=Hm(this,this.source,e,this.statements);return this.model.ast=s,this.db.commit(this.model),s}collectElement(e,t,n){let r=t.get(e.id),i=Wm({generated:e.generated,label:e.label.text});r&&r.kind!==e.kind&&this.conflict(`ID '${e.id}' is declared as both ${r.kind} and ${e.kind}`,e.location,r.location,i,Wm(r)),r&&(r.generated||e.generated)&&this.conflict(`Generated ID '${e.id}' collides with another declaration`,e.location,r.location,i,Wm(r));let a=n.get(e.id);if(!a){let r={kind:e.kind,id:e.id,label:e.label,location:e.location,generated:e.generated,classes:[...e.classes],...e.parentId?{parentId:e.parentId,parentLocation:e.parentLocation}:{},...e.shape?{shape:e.shape}:{},...e.stereotype?{stereotype:e.stereotype,stereotypeLocation:e.location}:{}};this.applyDeclarationMetadata(r,e.metadata),n.set(e.id,r),t.set(e.id,{kind:e.kind,location:e.location,generated:e.generated,label:e.label.text});return}(a.label.text!==e.label.text||a.label.type!==e.label.type)&&this.conflict(`ID '${e.id}' has conflicting labels`,e.location,a.location),e.shape&&a.shape&&e.shape!==a.shape&&this.conflict(`Use case '${e.id}' has conflicting shapes`,e.location,a.location),e.parentId&&a.parentId&&e.parentId!==a.parentId&&this.conflict(`Element '${e.id}' belongs to more than one system boundary`,e.parentLocation??e.location,a.parentLocation??a.location),e.stereotype&&a.stereotype&&e.stereotype!==a.stereotype&&this.conflict(`Element '${e.id}' has conflicting stereotypes`,e.location,a.stereotypeLocation??a.location),a.shape??=e.shape,a.parentId??=e.parentId,a.parentLocation??=e.parentLocation,a.stereotype??=e.stereotype,a.stereotypeLocation??=e.stereotype?e.location:void 0,Gm(a.classes,e.classes),this.applyDeclarationMetadata(a,e.metadata)}collectBoundary(e,t,n){let r=t.get(e.id),i=Wm({generated:e.generated,label:e.label.text});r&&r.kind!==`boundary`&&this.conflict(`ID '${e.id}' is declared as both ${r.kind} and boundary`,e.location,r.location,i,Wm(r)),r&&(r.generated||e.generated)&&this.conflict(`Generated ID '${e.id}' collides with another declaration`,e.location,r.location,i,Wm(r));let a=n.get(e.id);if(a){(a.label.text!==e.label.text||a.label.type!==e.label.type)&&this.conflict(`Boundary '${e.id}' has conflicting titles`,e.location,a.location),Gm(a.classes,e.classes);return}n.set(e.id,{id:e.id,label:e.label,location:e.location,generated:e.generated,classes:[...e.classes],styles:[],members:[]}),t.set(e.id,{kind:`boundary`,location:e.location,generated:e.generated,label:e.label.text})}materializeElements(e,t){for(let n of[...e.values()].sort((e,n)=>(t.get(e.id)??0)-(t.get(n.id)??0)))this.setElementModel(n)}materializeBoundaries(e,t){for(let n of[...e.values()].sort((e,n)=>(t.get(e.id)??0)-(t.get(n.id)??0)))this.model.systemBoundaries.set(n.id,{id:n.id,label:n.label.text,labelType:n.label.type,type:n.type??`rect`,members:[],classes:[...n.classes],styles:[...n.styles]})}materializeJson(e){for(let t of[...this.jsonDrafts].sort((t,n)=>(e.get(t.id)??0)-(e.get(n.id)??0)))this.model.jsonNodes.set(t.id,{id:t.id,value:t.value,propertyOrder:t.propertyOrder,classes:[...t.classes],styles:[]})}materializeRelationships(e,t,n){let r=new Map,i=0;for(let a of this.relationshipDrafts){let o=this.resolveEndpoint(a.source,e,t,n),s=this.resolveEndpoint(a.target,e,t,n);this.validateRelationship(a,o,s,e);let c=a.explicitId??`edge-${i++}`,l={id:c,explicitId:!!a.explicitId,source:a.source.id,target:a.target.id,type:a.type,arrowType:a.arrowType,...a.label?{label:a.label.text,labelType:a.label.type}:{},minlen:a.minlen,classes:[],styles:[],animate:!1};this.model.relationships.push(l),r.set(c,{draft:a,relationship:l})}return this.model.relationshipCounter=i,r}resolveEndpoint(e,t,n,r){if(e.classesOnReference&&!e.declaration)throw Error(`Relationship endpoint '${e.id}' uses ::: without declaring the node at ${$(e.location)}`);let i=t.get(e.id);return i?i.kind:(n.set(e.id,{kind:`usecase`,id:e.id,label:e.label,location:e.location,generated:e.generated,shape:`ellipse`,classes:[]}),t.set(e.id,{kind:`usecase`,location:e.location,generated:e.generated,label:e.label.text}),this.recordFirst(r,e.id,e.location.span[0]),`usecase`)}reorderElements(e,t){let n=new Map(this.model.actors),r=new Map(this.model.useCases);this.model.actors.clear(),this.model.useCases.clear();for(let i of[...e.values()].sort((e,n)=>(t.get(e.id)??0)-(t.get(n.id)??0))){!n.has(i.id)&&!r.has(i.id)&&this.setElementModel(i);let e=n.get(i.id)??this.model.actors.get(i.id),t=r.get(i.id)??this.model.useCases.get(i.id);e?this.model.actors.set(i.id,e):t&&this.model.useCases.set(i.id,t)}}applyMetadataAssignments(e,t,n,r){for(let i of this.metadataAssignments){let a=e.get(i.target);if(!a){let e=this.inferMetadataKind(i.metadata);throw Error(`Metadata target '${i.target}' is unresolved${e?` (metadata implies ${e})`:``} at ${$(i.targetLocation)}`)}if(a.kind===`actor`||a.kind===`usecase`)this.applyStandaloneElementMetadata(t.get(i.target),i.metadata);else if(a.kind===`boundary`){let e=n.get(i.target);for(let t of i.metadata.properties)(t.key!==`type`||t.value!==`rect`&&t.value!==`package`)&&this.invalidMetadata(i.target,a.kind,t),e.type=t.value}else if(a.kind===`edge`){let e=r.get(i.target);if(!e)throw Error(`Metadata target '${i.target}' is not an explicit edge at ${$(i.targetLocation)}`);i.statement.kind=`edgeMetadata`,i.statement.edges=[{id:i.target,span:i.statement.span,idSpan:i.targetLocation.span,...i.statement.metadata?{metadata:i.statement.metadata}:{}}],delete i.statement.nodes;for(let t of i.metadata.properties)t.key===`animate`&&typeof t.value==`boolean`?e.relationship.animate=t.value:t.key===`animation`&&(t.value===`fast`||t.value===`slow`)?(e.relationship.animation=t.value,e.relationship.animate=!0):this.invalidMetadata(i.target,a.kind,t)}else for(let e of i.metadata.properties)this.invalidMetadata(i.target,a.kind,e)}for(let{relationship:e}of r.values())e.animation&&(e.animate=!0)}applyStandaloneElementMetadata(e,t){for(let n of t.properties)e.kind===`actor`?this.applyActorProperty(e,n,!0):n.key===`business`&&typeof n.value==`boolean`?e.business=n.value:this.invalidMetadata(e.id,e.kind,n)}applyDeclarationMetadata(e,t){if(t)for(let n of t.properties)e.kind===`actor`?this.applyActorProperty(e,n,!1):n.key===`business`&&typeof n.value==`boolean`?(e.business!==void 0&&e.business!==n.value&&this.conflict(`Use case '${e.id}' has conflicting business metadata`,n.location,e.location),e.business=n.value):this.invalidMetadata(e.id,e.kind,n)}applyActorProperty(e,t,n){t.key===`type`&&(t.value===`normal`||t.value===`hollow`||t.value===`awesome`)?(!n&&e.actorType!==void 0&&e.actorType!==t.value&&this.conflict(`Actor '${e.id}' has conflicting type metadata`,t.location,e.location),e.actorType=t.value):t.key===`icon`&&typeof t.value==`string`?(!n&&e.icon!==void 0&&e.icon!==t.value&&this.conflict(`Actor '${e.id}' has conflicting icon metadata`,t.location,e.location),e.icon=t.value):t.key===`business`&&typeof t.value==`boolean`?(!n&&e.business!==void 0&&e.business!==t.value&&this.conflict(`Actor '${e.id}' has conflicting business metadata`,t.location,e.location),e.business=t.value):this.invalidMetadata(e.id,e.kind,t)}validateAndRefreshElements(e){for(let t of e.values()){let e=t.icon?`icon`:t.actorType??`normal`;if(t.kind===`actor`){if(t.icon&&t.actorType&&t.actorType!==`normal`)throw Error(`Actor '${t.id}' cannot combine icon with type '${t.actorType}' at ${$(t.location)}`);if(t.business&&(e===`icon`||e===`awesome`))throw Error(`Business actor '${t.id}' must use normal or hollow geometry at ${$(t.location)}`)}else if((t.shape??`ellipse`)===`rect`&&t.business)throw Error(`Rectangular use case '${t.id}' cannot be a business use case at ${$(t.location)}`);this.setElementModel(t)}}refreshBoundaries(e,t){for(let t of e.values())t.members.length=0;for(let t of[...this.elements].sort((e,t)=>e.location.span[0]-t.location.span[0])){if(!t.parentId)continue;let n=e.get(t.parentId);if(!n)throw Error(`Parent boundary '${t.parentId}' for '${t.id}' is unresolved at ${$(t.parentLocation??t.location)}`);n.members.includes(t.id)||n.members.push(t.id)}for(let n of t.values())if(n.parentId&&!e.has(n.parentId))throw Error(`Parent boundary '${n.parentId}' for '${n.id}' is unresolved at ${$(n.parentLocation??n.location)}`);for(let t of e.values()){let e=this.model.systemBoundaries.get(t.id);e.type=t.type??`rect`,e.members=[...t.members],e.classes=[...t.classes],e.styles=[...t.styles]}}materializeNotes(e){let t=0;for(let n of this.noteDrafts){let r=e.get(n.target);if(!r)throw Error(`Note target '${n.target}' is unresolved at ${$(n.targetLocation)}`);r.kind!==`actor`&&r.kind!==`usecase`&&this.conflict(`Note target '${n.target}' must be an actor or use case, not ${r.kind}`,n.targetLocation,r.location);let i=`note-${t++}`;this.model.notes.set(i,{id:i,target:n.target,label:n.label.text,labelType:n.label.type})}this.model.noteCounter=t}applyClassDefinitions(){for(let e of this.classDefinitions)for(let t of e.ids)this.model.classDefs.set(t,{id:t,styles:[...e.styles]})}applyClassesAndStyles(e,t){for(let n of this.classAssignments)for(let r of n.targets)Gm(this.getStylable(r.id,e,t,r.location).classes,n.classes);for(let n of this.styleAssignments)this.getStylable(n.target,e,t,n.location).styles.push(...n.styles)}getStylable(e,t,n,r){let i=t.get(e)?.kind,a=i===`actor`?this.model.actors.get(e):i===`usecase`?this.model.useCases.get(e):i===`boundary`?this.model.systemBoundaries.get(e):i===`json`?this.model.jsonNodes.get(e):i===`edge`?n.get(e)?.relationship:void 0;if(!a)throw Error(`Class/style target '${e}' is unresolved or anonymous at ${$(r)}`);return a}validateRelationship(t,n,r,i){let a=e(e=>e===`actor`||e===`usecase`||e===`json`,`allowed`);if(a(n)||this.conflict(`Relationship source '${t.source.id}' cannot be ${n}`,t.source.location,i.get(t.source.id).location),a(r)||this.conflict(`Relationship target '${t.target.id}' cannot be ${r}`,t.target.location,i.get(t.target.id).location),(t.type===`include`||t.type===`extend`)&&(n!==`usecase`||r!==`usecase`))throw Error(`${t.type} relationship requires use-case endpoints at ${$(t.location)}`);if(t.type===`generalization`&&(n!==`actor`&&n!==`usecase`||n!==r))throw Error(`Generalization requires actor-to-actor or use-case-to-use-case endpoints at ${$(t.location)}`);if(t.type===`association`&&(n===`json`||r===`json`)&&![0,1,2].includes(t.arrowType))throw Error(`JSON relationship '${t.source.id}' to '${t.target.id}' permits only point, reversed-point, or markerless solid association at ${$(t.location)}`)}setElementModel(e){if(e.kind===`actor`){let t=e.icon?`icon`:e.actorType??`normal`;this.model.useCases.delete(e.id),this.model.actors.set(e.id,{id:e.id,label:e.label.text,labelType:e.label.type,type:t,...e.icon?{icon:e.icon}:{},business:e.business??!1,...e.stereotype?{stereotype:e.stereotype}:{},...e.parentId?{parentId:e.parentId}:{},classes:[...e.classes],styles:this.model.actors.get(e.id)?.styles??[]})}else this.model.actors.delete(e.id),this.model.useCases.set(e.id,{id:e.id,label:e.label.text,labelType:e.label.type,shape:e.shape??`ellipse`,business:e.business??!1,...e.stereotype?{stereotype:e.stereotype}:{},...e.parentId?{parentId:e.parentId}:{},classes:[...e.classes],styles:this.model.useCases.get(e.id)?.styles??[]})}inferMetadataKind(e){let t=new Set([`actor`,`usecase`,`boundary`,`edge`]);for(let n of e.properties)if(n.key===`icon`)t.clear(),t.add(`actor`);else if(n.key===`animate`||n.key===`animation`)t.clear(),t.add(`edge`);else if(n.key===`type`)t.clear(),n.value===`rect`||n.value===`package`?t.add(`boundary`):(n.value===`normal`||n.value===`hollow`||n.value===`awesome`)&&t.add(`actor`);else if(n.key===`business`)t.delete(`boundary`),t.delete(`edge`);else return;return t.size===1?[...t][0]:void 0}invalidMetadata(e,t,n){throw Error(`Metadata property '${n.key}' is invalid for ${t} '${e}' at ${$(n.location)}`)}registerUnique(e,t,n,r,i){let a=e.get(t);a&&this.conflict(`ID '${t}' is declared more than once (${a.kind} and ${n})`,r,a.location,void 0,Wm(a)),e.set(t,{kind:n,location:r,generated:i})}recordFirst(e,t,n){let r=e.get(t);(r===void 0||nthis.visit(e)),r=this.nodes(e,`relationTail`)[0],i=n.map((e,n)=>this.actorOccurrence(t[n],e,!0));for(let e of n)this.builder.addElement(this.actorDraft(e));if(!r)return{kind:`node`,span:[0,0],nodes:i};let a=this.visit(r);a.target.explicitDeclaration&&this.builder.addElement(this.entityDraft(a.target));let o=this.relationshipDraft(n[0],a,this.nodeLocation(r));this.builder.addRelationship(o);let s=o.explicitId??`edge-${this.anonymousEdge++}`;return i.push(this.entityOccurrence(this.nodes(r.children,`entityName`)[0],a.target,a.target.explicitDeclaration)),{kind:`edge`,span:[0,0],nodes:i,edges:[{id:s,span:[0,0],...o.explicitIdLocation?{idSpan:o.explicitIdLocation.span}:{},...o.label?{labelSpan:o.label.span}:{}}]}}actorItem(e){let t=this.visit(this.nodes(e,`actorName`)[0]),n=this.nodes(e,`metadata`)[0],r=this.nodes(e,`stereotype`)[0],i=this.nodes(e,`classSuffix`)[0],a=i?this.visit(i):{classes:[],spans:[]};return{...t,...n?{metadata:this.visit(n)}:{},...r?{stereotype:this.visit(r)}:{},classes:a.classes,classSpans:a.spans}}actorName(e){let t=this.tokens(e,`IDENTIFIER`)[0],n=this.tokens(e,`PLAIN_STRING`)[0]??this.tokens(e,`MARKDOWN_STRING`)[0];if(t){let n=this.nodes(e,`nodeLabel`)[0],r=n?this.visit(n):this.tokenLabel(t);return{id:t.image,label:r,location:this.tokenLocation(t),generated:!1,classes:[],classSpans:[]}}let r=this.tokenLabel(n);return{id:this.generateId(r.text),label:r,location:this.tokenLocation(n),generated:!0,classes:[],classSpans:[]}}actorDeclarationOnly(e){let t=this.nodes(e,`actorItem`),n=t.map(e=>this.visit(e));for(let e of n)this.builder.addElement(this.actorDraft(e));return{kind:`node`,span:[0,0],nodes:n.map((e,n)=>this.actorOccurrence(t[n],e,!0))}}entityStatement(e){let t=this.nodes(e,`entityName`),n=this.visit(t[0]),r=this.nodes(e,`relationTail`)[0];if(!r)return n.explicitDeclaration=!0,n.shape??=`ellipse`,this.builder.addElement(this.entityDraft(n)),{kind:`node`,span:[0,0],nodes:[this.entityOccurrence(t[0],n,!0)]};n.explicitDeclaration&&this.builder.addElement(this.entityDraft(n));let i=this.visit(r);i.target.explicitDeclaration&&this.builder.addElement(this.entityDraft(i.target));let a={source:this.endpoint(n),target:this.endpoint(i.target),location:this.nodeLocation(r),...i.explicitId?{explicitId:i.explicitId,explicitIdLocation:i.explicitIdLocation}:{},...i.arrow};this.builder.addRelationship(a);let o=a.explicitId??`edge-${this.anonymousEdge++}`;return{kind:`edge`,span:[0,0],nodes:[this.entityOccurrence(t[0],n,n.explicitDeclaration),this.entityOccurrence(this.nodes(r.children,`entityName`)[0],i.target,i.target.explicitDeclaration)],edges:[{id:o,span:[0,0],...a.explicitIdLocation?{idSpan:a.explicitIdLocation.span}:{},...a.label?{labelSpan:a.label.span}:{}}]}}entityName(e){let t=this.tokens(e,`IDENTIFIER`)[0],n=this.tokens(e,`PLAIN_STRING`)[0]??this.tokens(e,`MARKDOWN_STRING`)[0],r=this.nodes(e,`nodeLabel`)[0],i=this.nodes(e,`useCaseMetadata`)[0],a=this.nodes(e,`stereotype`)[0],o=this.nodes(e,`classSuffix`)[0],s=o?this.visit(o):{classes:[],spans:[]};if(t){let n=r?this.visit(r):this.tokenLabel(t),o=r?this.tokens(e,`LBRACKET`).length?`rect`:`ellipse`:void 0;return{id:t.image,label:n,location:this.tokenLocation(t),generated:!1,...o?{shape:o}:{},...i?{metadata:this.visit(i)}:{},...a?{stereotype:this.visit(a)}:{},classes:s.classes,classSpans:s.spans,explicitDeclaration:!!(o||i||a)}}let c=this.tokenLabel(n);return{id:this.generateId(c.text),label:c,location:this.tokenLocation(n),generated:!0,...i?{metadata:this.visit(i)}:{},...a?{stereotype:this.visit(a)}:{},classes:s.classes,classSpans:s.spans,explicitDeclaration:!!(i||a)}}nodeLabel(e){let t=this.allTokens(e);if(t.length===1&&(t[0].tokenType.name===`PLAIN_STRING`||t[0].tokenType.name===`MARKDOWN_STRING`))return this.tokenLabel(t[0]);let n=[t[0].startOffset,(t.at(-1).endOffset??t.at(-1).startOffset)+1];return{text:this.source.slice(n[0],n[1]),type:`text`,span:n}}useCaseMetadata(e){return this.visit(this.nodes(e,`metadata`)[0])}relationTail(e){let t=this.tokens(e,`IDENTIFIER`)[0];return{...t?{explicitId:t.image,explicitIdLocation:this.tokenLocation(t)}:{},arrow:this.visit(this.nodes(e,`arrow`)[0]),target:this.visit(this.nodes(e,`entityName`)[0])}}arrow(e){return this.visit(this.firstNode(e,`semanticRelation`,`forwardSolidOperator`,`backwardSolidOperator`,`markerlessSolidOperator`,`forwardCircleOperator`,`backwardCircleOperator`,`forwardCrossOperator`,`backwardCrossOperator`))}edgeLabel(e){return this.nodeLabel(e)}semanticRelation(e){if(this.tokens(e,`GENERALIZATION`).length)return{type:`generalization`,arrowType:q.SOLID_ARROW,minlen:1};let t=this.tokens(e,`INCLUDE`).length?`include`:`extend`,n=this.tokens(e,t===`include`?`INCLUDE`:`EXTEND`)[0];return{type:t,arrowType:q.SOLID_ARROW,label:{text:t,type:`text`,span:this.tokenSpan(n)},minlen:1}}metadata(e){return{properties:this.nodes(e,`metadataProperty`).map(e=>this.visit(e)),location:this.ctxLocation(e)}}metadataProperty(e){let t=this.allTokens(e).filter(e=>e.tokenType.name!==`COLON`),n=t[0],r=t[1],i=r.tokenType.name===`TRUE`||r.tokenType.name!==`FALSE`&&this.decodePlain(r),a=[n.startOffset,(r.endOffset??r.startOffset)+1];return{key:this.decodePlain(n),value:i,span:a,keySpan:this.contentSpan(n),valueSpan:this.contentSpan(r),location:this.tokenLocation(n)}}metadataSeparator(e){}systemBoundaryStatement(e){let t=this.visit(this.nodes(e,`systemBoundaryName`)[0]),n=this.nodes(e,`classSuffix`)[0],r=n?this.visit(n):{classes:[],spans:[]};t.classes=r.classes,this.builder.addBoundary(t);let i=this.parentBoundary;this.parentBoundary={id:t.id,location:t.location};let a=this.nodes(e,`systemBoundaryContent`)[0],o=a?this.visit(a):[];this.parentBoundary=i;let s=this.tokens(e,`END`)[0],c=this.nodes(e,`metadata`)[0],l=c?this.visit(c):void 0,u={kind:`group`,span:[0,0],group:t.id,idSpan:t.location.span,titleSpan:t.label.span,endSpan:this.tokenSpan(s),classSpans:r.spans,...l?{metadata:l.properties.map(({key:e,span:t,keySpan:n,valueSpan:r})=>({key:e,span:t,keySpan:n,valueSpan:r}))}:{},...o.length?{children:o}:{}};return l&&this.builder.addMetadataAssignment(t.id,t.location,l,u),u}systemBoundaryName(e){let t=this.tokens(e,`IDENTIFIER`)[0];if(t){let n=this.nodes(e,`nodeLabel`)[0];return{id:t.image,label:n?this.visit(n):this.tokenLabel(t),location:this.tokenLocation(t),generated:!1,classes:[]}}let n=this.tokens(e,`PLAIN_STRING`)[0]??this.tokens(e,`MARKDOWN_STRING`)[0],r=this.tokenLabel(n);return{id:this.generateId(r.text),label:r,location:this.tokenLocation(n),generated:!0,classes:[]}}systemBoundaryContent(e){return[...this.nodes(e,`blankLine`),...this.nodes(e,`commentLine`),...this.nodes(e,`boundaryElement`)].sort((e,t)=>(e.location?.startOffset??0)-(t.location?.startOffset??0)).map(e=>this.wrap(e,this.visit(e)))}boundaryElement(e){let t=this.nodes(e,`actorDeclarationOnly`)[0];if(t)return this.visit(t);let n=this.nodes(e,`entityName`)[0],r=this.visit(n);return r.explicitDeclaration=!0,r.shape??=`ellipse`,this.builder.addElement(this.entityDraft(r)),{kind:`node`,span:[0,0],nodes:[this.entityOccurrence(n,r,!0)]}}metadataAssignmentStatement(e){let t=this.visit(this.nodes(e,`metadataAssignmentTarget`)[0]),n=this.visit(this.nodes(e,`metadata`)[0]),r={kind:`metadata`,span:[0,0],nodes:[{id:t.id,span:t.location.span,idSpan:t.location.span}],metadata:n.properties.map(({key:e,span:t,keySpan:n,valueSpan:r})=>({key:e,span:t,keySpan:n,valueSpan:r}))};return this.builder.addMetadataAssignment(t.id,t.location,n,r),r}metadataAssignmentTarget(e){let t=this.allTokens(e)[0],n=this.tokenLabel(t);return{id:t.tokenType.name===`IDENTIFIER`?t.image:this.generateId(n.text),location:this.tokenLocation(t)}}noteStatement(e){let t=this.tokens(e,`IDENTIFIER`)[0],n=this.visit(this.nodes(e,`nodeLabel`)[0]);return this.builder.addNote({target:t.image,targetLocation:this.tokenLocation(t),label:n,location:this.ctxLocation(e)}),{kind:`note`,span:[0,0],ref:`note-${this.anonymousNote++}`,refSpan:n.span,nodes:[{id:t.image,span:this.tokenSpan(t),idSpan:this.tokenSpan(t)}]}}stereotype(e){let t=this.tokens(e,`STEREOTYPE_TEXT`)[0];return{value:t.image.trim(),span:this.tokenSpan(t)}}classSuffix(e){let t=this.tokens(e,`IDENTIFIER`);return{classes:t.map(e=>e.image),spans:t.map(e=>this.tokenSpan(e))}}jsonStatement(e){let t=this.tokens(e,`JSON_DECLARATION_START`)[0],n=this.tokens(e,`JSON_OBJECT_LITERAL`)[0],r=/^json[\t ]+(\w+)/.exec(t.image),i=r[1],a=r[0].length-i.length,o={span:[t.startOffset+a,t.startOffset+a+i.length],line:t.startLine??1,column:(t.startColumn??1)+a},s=Fm(n.image,n.startLine??1,n.startColumn??1),c=this.nodes(e,`classSuffix`)[0],l=c?this.visit(c):{classes:[],spans:[]},u={id:i,value:s.value,propertyOrder:s.propertyOrder,location:o,classes:l.classes};return this.builder.addJson(u),{kind:`json`,span:[0,0],nodes:[{id:i,span:o.span,idSpan:o.span,defines:!0,classSpans:l.spans}],classSpans:l.spans}}directionStatement(e){let t=this.allTokens(e).find(e=>[`TD`,`TB`,`BT`,`RL`,`LR`].includes(e.tokenType.name));return this.builder.setDirection(t.image),{kind:`direction`,span:[0,0]}}classDefStatement(e){let t=this.tokens(e,`IDENTIFIER`),n=this.visit(this.nodes(e,`styles`)[0]);return this.builder.addClassDef(t.map(e=>e.image),n),{kind:`classDef`,span:[0,0],ref:t[0].image,refSpan:this.tokenSpan(t[0])}}classStatement(e){let t=this.tokens(e,`IDENTIFIER`),n=1;for(;n({id:e.image,location:this.tokenLocation(e)})),i=t.slice(n).map(e=>e.image);return this.builder.addClassAssignment(r,i),{kind:`classAssign`,span:[0,0],ref:i[0],refSpan:this.tokenSpan(t[n]),nodes:r.map(({id:e,location:t})=>({id:e,span:t.span,idSpan:t.span}))}}styleStatement(e){let t=this.tokens(e,`IDENTIFIER`)[0],n=this.visit(this.nodes(e,`styles`)[0]);return this.builder.addStyleAssignment(t.image,this.tokenLocation(t),n),{kind:`style`,span:[0,0],nodes:[{id:t.image,span:this.tokenSpan(t),idSpan:this.tokenSpan(t)}]}}styles(e){return this.nodes(e,`styleValue`).map(e=>this.visit(e))}styleValue(e){let t=this.allTokens(e),n=[t[0].startOffset,(t.at(-1).endOffset??t.at(-1).startOffset)+1];return this.source.slice(n[0],n[1]).replaceAll(`\\,`,`,`)}styleComponent(e){return this.allTokens(e).map(e=>e.image).join(``)}forwardSolidOperator(e){let t=this.tokens(e,`FORWARD_SOLID`)[0];return{type:`association`,arrowType:q.SOLID_ARROW,minlen:this.solidMinlen(t)}}backwardSolidOperator(e){let t=this.tokens(e,`BACKWARD_SOLID`)[0],n=this.nodes(e,`edgeLabel`)[0],r=n?this.tokens(e,`MARKERLESS_SOLID`).at(-1):t;return{type:`association`,arrowType:q.BACK_ARROW,minlen:this.solidMinlen(r),...n?{label:this.visit(n)}:{}}}markerlessSolidOperator(e){let t=this.nodes(e,`edgeLabel`)[0],n=this.allTokens(e);if(!t)return{type:`association`,arrowType:q.LINE_SOLID,minlen:this.solidMinlen(this.tokens(e,`MARKERLESS_SOLID`)[0])};let r=n.at(-1),i=r.tokenType.name===`FORWARD_SOLID`?q.SOLID_ARROW:r.tokenType.name===`FORWARD_CIRCLE`?q.CIRCLE_ARROW:r.tokenType.name===`FORWARD_CROSS`?q.CROSS_ARROW:q.LINE_SOLID;return{type:`association`,arrowType:i,label:this.visit(t),minlen:i===q.SOLID_ARROW||i===q.LINE_SOLID?this.solidMinlen(r):1}}forwardCircleOperator(e){return{type:`association`,arrowType:q.CIRCLE_ARROW,minlen:1}}backwardCircleOperator(e){let t=this.nodes(e,`edgeLabel`)[0];return{type:`association`,arrowType:q.CIRCLE_ARROW_REVERSED,minlen:1,...t?{label:this.visit(t)}:{}}}forwardCrossOperator(e){return{type:`association`,arrowType:q.CROSS_ARROW,minlen:1}}backwardCrossOperator(e){let t=this.nodes(e,`edgeLabel`)[0];return{type:`association`,arrowType:q.CROSS_ARROW_REVERSED,minlen:1,...t?{label:this.visit(t)}:{}}}actorDraft(e){return{id:e.id,kind:`actor`,label:e.label,location:e.location,generated:e.generated,...this.parentBoundary?{parentId:this.parentBoundary.id,parentLocation:this.parentBoundary.location}:{},...e.metadata?{metadata:e.metadata}:{},...e.stereotype?{stereotype:e.stereotype.value,stereotypeSpan:e.stereotype.span}:{},classes:e.classes}}entityDraft(e){return{id:e.id,kind:`usecase`,label:e.label,location:e.location,generated:e.generated,...this.parentBoundary?{parentId:this.parentBoundary.id,parentLocation:this.parentBoundary.location}:{},...e.shape?{shape:e.shape}:{},...e.metadata?{metadata:e.metadata}:{},...e.stereotype?{stereotype:e.stereotype.value,stereotypeSpan:e.stereotype.span}:{},classes:e.classes}}endpoint(e,t=e.explicitDeclaration??!0){return{id:e.id,label:e.label,location:e.location,generated:e.generated,declaration:t,classesOnReference:e.classes.length>0}}relationshipDraft(e,t,n){return{source:this.endpoint(e,!0),target:this.endpoint(t.target),location:n,...t.explicitId?{explicitId:t.explicitId,explicitIdLocation:t.explicitIdLocation}:{},...t.arrow}}actorOccurrence(e,t,n){return{id:t.id,span:this.nodeSpan(e),idSpan:t.location.span,labelSpan:t.label.span,...n?{defines:!0}:{},...t.stereotype?{stereotypeSpan:t.stereotype.span}:{},...t.metadata?{metadata:t.metadata.properties.map(({key:e,span:t,keySpan:n,valueSpan:r})=>({key:e,span:t,keySpan:n,valueSpan:r}))}:{},...t.classSpans.length?{classSpans:t.classSpans}:{}}}entityOccurrence(e,t,n){return this.actorOccurrence(e,t,n)}wrap(e,t){if(t.kind===`blank`||t.kind===`comment`)return t;t.span=this.nodeSpan(e);for(let e of t.edges??[])e.span=t.span;return t}tokenLabel(e){let t=e.tokenType.name===`MARKDOWN_STRING`?`markdown`:`text`,n=t===`markdown`?2:+(e.tokenType.name===`PLAIN_STRING`),r=this.tokenSpan(e,n);return{text:this.source.slice(r[0],r[1]),type:t,span:r}}decodePlain(e){return e.tokenType.name===`PLAIN_STRING`?e.image.slice(1,-1):e.image}contentSpan(e){return this.tokenSpan(e,e.tokenType.name===`PLAIN_STRING`?1:e.tokenType.name===`MARKDOWN_STRING`?2:0)}generateId(e){return e.replace(/\W/g,`_`)}solidMinlen(e){return Math.max(1,(e.image.match(/-/g)?.length??2)-1)}nodeLocation(e){let t=this.allTokens(e.children)[0];return{span:this.nodeSpan(e),line:t.startLine??1,column:t.startColumn??1}}ctxLocation(e){let t=this.allTokens(e).filter(e=>e.tokenType.name!==`NEWLINE`&&e.tokenType.name!==`EOF`),n=t[0],r=t.at(-1);return{span:[n.startOffset,Math.min(this.source.length,(r.endOffset??r.startOffset+r.image.length-1)+1)],line:n.startLine??1,column:n.startColumn??1}}tokenLocation(e){let t=e.tokenType.name===`PLAIN_STRING`?1:e.tokenType.name===`MARKDOWN_STRING`?2:0;return{span:this.tokenSpan(e,t),line:e.startLine??1,column:(e.startColumn??1)+t}}nodeSpan(e){let t=this.allTokens(e.children).filter(e=>e.tokenType.name!==`NEWLINE`&&e.tokenType.name!==`EOF`),n=t[0],r=t.at(-1);if(!n||!r)throw Error(`Usecase CST node has no source token`);return[n.startOffset,Math.min(this.source.length,(r.endOffset??r.startOffset+r.image.length-1)+1)]}tokenSpan(e,t=0){return[e.startOffset+t,Math.min(this.source.length,(e.endOffset??e.startOffset+e.image.length-1)+1-t)]}nodes(e,t){return(e[t]??[]).filter(e=>`children`in e)}tokens(e,t){return(e[t]??[]).filter(e=>`tokenTypeIdx`in e)}firstNode(e,...t){for(let n of t){let t=this.nodes(e,n)[0];if(t)return t}throw Error(`Usecase CST is missing one of: ${t.join(`, `)}`)}allTokens(e){let t=[];for(let n of Object.values(e))for(let e of n)`tokenTypeIdx`in e?t.push(e):t.push(...this.allTokens(e.children));return t.sort((e,t)=>e.startOffset-t.startOffset)}},Ym={parse:e(async t=>{np.clear(),Am.input=[];try{Cf({diagramType:`usecase`,lexer:Dm,parser:Am,entry:e(()=>Am.start(),`entry`),visit:e(e=>Jm.build(e,t),`visit`)},t)}catch(e){np.clear();let n=Am.errors[0];if(n){let{token:r}=n,i=Number.isFinite(r.startOffset)?r.startOffset:t.length,a=typeof r.endOffset==`number`&&Number.isFinite(r.endOffset)?r.endOffset+1:i,o=r.startLine??t.slice(0,i).split(/\r\n|\r|\n/).length,s=Math.max(t.lastIndexOf(` `,i-1),t.lastIndexOf(`\r`,i-1)),c=r.startColumn??i-s,l=e instanceof Error?e.message:String(e);throw Error(`${l} at line ${o}, column ${c} [${i},${a})`)}throw e}},`parse`)},Xm=[`point`,`circle`,`cross`,`extension`],Zm={usecaseActor:!0,usecaseActorHollow:!0,usecaseActorAwesome:!0,usecaseActorIcon:!0},Qm=e((e,t)=>{let[n,r]=[e,t].map(e=>e.replace(/[^\w-]+/g,`_`).replace(/^_+|_+$/g,``)||`element`);return`usecase-${n}-${r}`},`usecaseDomId`),$m=e(e=>`usecase-${e.replace(/[^\w-]+/g,`_`).replace(/^_+|_+$/g,``)||`element`}`,`usecaseNodeDomId`),eh=e((e,t)=>t===`markdown`?h(e).map(e=>e.map(e=>e.content).join(` `)).join(` -`):e,`getAccessibleLabel`),th=e(e=>{let t=eh(e.label??e.id,e.labelType);if(Zm[e.shape]){let n=e.actorType&&e.actorType!==`normal`?`${e.actorType} `:``;return`${e.business?`business `:``}${n}actor ${t}${e.stereotype?`, stereotype ${e.stereotype}`:``}`}if(e.shape===`note`)return`Note for ${e.noteTargetLabel??e.noteTarget??``}: ${t}`;if(e.shape===`usecaseJsonTable`){let n=(e.jsonRows??[]).map(e=>`${e.accessibleKey}: ${e.value}`).join(`; `);return n?`${t}: ${n}`:t}let n=e.stereotype?`, stereotype ${e.stereotype}`:``;return`${e.business?`business `:``}use case ${t}${n}`},`getUsecaseNodeAccessibleName`),nh=e(e=>`${e.boundaryType} system boundary ${eh(e.label??e.id,e.labelType)}`,`getUsecaseBoundaryAccessibleName`),rh=e(e=>e.relationshipType===`note`?``:`${e.relationshipType===`association`&&e.label?`association ${eh(e.label,e.labelType)}`:e.relationshipType} from ${e.sourceLabel} to ${e.targetLabel}`,`getUsecaseEdgeAccessibleName`),ih=e(e=>e.replace(/&/g,`&`).replace(//g,`>`),`escapePlainLabel`),ah=e(e=>e.replace(/([*[\\\]_`])/g,`\\$1`),`escapeMarkdownMarkers`),oh=e((e,t)=>{e.diagramId=t,e.markers=[...Xm];for(let t of e.nodes){let e=t;if(e.domId=$m(t.id),t.label!==void 0&&t.labelType===`text`&&(t.label=ih(t.label)),t.stereotype&&=ih(t.stereotype),!t.isGroup&&t.shape===`usecaseJsonTable`&&(t.jsonRows=t.jsonRows?.map(e=>({...e,key:ih(e.key),value:ih(e.value)}))),!t.isGroup&&(t.shape===`usecaseEllipse`||t.shape===`rect`)&&t.stereotype){let n=t.label??ih(t.id);t.label=`\xAB${ah(t.stereotype)}\xBB
${t.labelType===`text`?ah(n):n}`,t.labelType=`markdown`,e.hasFoldedStereotype=!0,delete t.stereotype}}for(let t of e.edges)t.label!==void 0&&t.labelType===`text`&&(t.label=ih(t.label));return e},`prepareUsecaseLayoutData`),sh=e((e,t,r)=>{for(let n of t.nodes){let i=typeof n.domId==`string`?n.domId:Qm(t.diagramId,n.id),a=e.select(`#${i}`),o=n.isGroup?`boundary`:Zm[n.shape]?`actor`:n.shape===`note`?`note`:n.shape===`usecaseJsonTable`?`json`:`usecase`,s=r.nodes.get(n.id)??n.id;if(a.attr(`data-usecase-id`,n.id).attr(`data-usecase-kind`,o).attr(`role`,`img`).attr(`aria-label`,s),!n.isGroup&&(n.shape===`usecaseEllipse`||n.shape===`rect`)&&`hasFoldedStereotype`in n&&n.hasFoldedStereotype===!0){let e=a.node(),t=e?.querySelector(`.nodeLabel`),n=t?.querySelector(`p`)??t,r=n?.firstChild;if(n&&r?.nodeType===3){let e=n.ownerDocument.createElement(`span`);e.className=`usecase-stereotype`,n.insertBefore(e,r),e.appendChild(r)}else e?.querySelector(`.label tspan tspan, .label tspan`)?.classList.add(`usecase-stereotype`)}}let i=new Map(t.edges.map(e=>[e.id,e]));e.selectAll(`path[data-et="edge"]`).each(function(){let e=i.get(this.getAttribute(`data-id`)??``);if(!e)return;let a=n(this);a.attr(`id`,Qm(t.diagramId,e.id)).attr(`data-usecase-id`,e.id).attr(`data-usecase-kind`,e.internal?`note-connector`:`relationship`),e.internal?a.attr(`aria-hidden`,`true`):a.attr(`role`,`img`).attr(`aria-label`,r.edges.get(e.id)??e.id)})},`annotateUsecaseElements`),ch=e((e,t)=>{e.style(`--mermaid-usecase-actor-font-size`,`${t.actorFontSize}px`).style(`--mermaid-usecase-actor-font-family`,t.actorFontFamily).style(`--mermaid-usecase-actor-font-weight`,t.actorFontWeight).style(`--mermaid-usecase-font-size`,`${t.usecaseFontSize}px`).style(`--mermaid-usecase-font-family`,t.usecaseFontFamily).style(`--mermaid-usecase-font-weight`,t.usecaseFontWeight)},`applyUsecaseFonts`),lh={draw:e(async(e,n,r,i)=>{t.info(`Drawing usecase diagram (unified)`,n);let{layout:a}=d(),o=i.db,s=o.getData(),c=new Map(s.nodes.map(e=>[e.id,eh(e.label??e.id,e.labelType)])),l={nodes:new Map(s.nodes.map(e=>[e.id,e.isGroup?nh(e):th(e.shape===`note`?{...e,noteTargetLabel:c.get(e.noteTarget??``)}:e)])),edges:new Map(s.edges.map(e=>[e.id,rh({...e,sourceLabel:c.get(e.source)??e.sourceLabel,targetLabel:c.get(e.target)??e.targetLabel})]))},u=ne(n,s.config.securityLevel);s.layoutAlgorithm=ae(a),oh(s,n),ch(u,s),await ie(s,u),sh(u,s,l);let f=s.diagramPadding;m.insertTitle(u,`usecaseDiagramTitleText`,0,o.getDiagramTitle?.()??``),re(u,f,`usecaseDiagram`,s.useMaxWidth),ch(u,s)},`draw`)},uh=e(e=>({actorBkg:e.usecaseActorBkg??e.actorBkg??e.mainBkg,actorBorder:e.usecaseActorBorder??e.actorBorder??e.primaryColor,bkg:e.usecaseBkg??e.mainBkg,border:e.usecaseBorder??e.nodeBorder??e.primaryColor,boundaryBkg:e.usecaseBoundaryBkg??e.clusterBkg,boundaryBorder:e.usecaseBoundaryBorder??e.clusterBorder,includeLine:e.usecaseIncludeLine??e.lineColor,extendLine:e.usecaseExtendLine??e.lineColor}),`roleColors`),dh=e(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!ee(t,r))return``;let i=o().usecase?.colorScheme===`rotate`,a=te(e.look),s=a===`handDrawn`,c=_(n),l=``;for(let e=0;e{let t=eh(e.label??e.id,e.labelType);if(Zm[e.shape]){let n=e.actorType&&e.actorType!==`normal`?`${e.actorType} `:``;return`${e.business?`business `:``}${n}actor ${t}${e.stereotype?`, stereotype ${e.stereotype}`:``}`}if(e.shape===`note`)return`Note for ${e.noteTargetLabel??e.noteTarget??``}: ${t}`;if(e.shape===`usecaseJsonTable`){let n=(e.jsonRows??[]).map(e=>`${e.accessibleKey}: ${e.value}`).join(`; `);return n?`${t}: ${n}`:t}let n=e.stereotype?`, stereotype ${e.stereotype}`:``;return`${e.business?`business `:``}use case ${t}${n}`},`getUsecaseNodeAccessibleName`),nh=e(e=>`${e.boundaryType} system boundary ${eh(e.label??e.id,e.labelType)}`,`getUsecaseBoundaryAccessibleName`),rh=e(e=>e.relationshipType===`note`?``:`${e.relationshipType===`association`&&e.label?`association ${eh(e.label,e.labelType)}`:e.relationshipType} from ${e.sourceLabel} to ${e.targetLabel}`,`getUsecaseEdgeAccessibleName`),ih=e(e=>e.replace(/&/g,`&`).replace(//g,`>`),`escapePlainLabel`),ah=e(e=>e.replace(/([*[\\\]_`])/g,`\\$1`),`escapeMarkdownMarkers`),oh=e((e,t)=>{e.diagramId=t,e.markers=[...Xm];for(let t of e.nodes){let e=t;if(e.domId=$m(t.id),t.label!==void 0&&t.labelType===`text`&&(t.label=ih(t.label)),t.stereotype&&=ih(t.stereotype),!t.isGroup&&t.shape===`usecaseJsonTable`&&(t.jsonRows=t.jsonRows?.map(e=>({...e,key:ih(e.key),value:ih(e.value)}))),!t.isGroup&&(t.shape===`usecaseEllipse`||t.shape===`rect`)&&t.stereotype){let n=t.label??ih(t.id);t.label=`\xAB${ah(t.stereotype)}\xBB
${t.labelType===`text`?ah(n):n}`,t.labelType=`markdown`,e.hasFoldedStereotype=!0,delete t.stereotype}}for(let t of e.edges)t.label!==void 0&&t.labelType===`text`&&(t.label=ih(t.label));return e},`prepareUsecaseLayoutData`),sh=e((e,t,r)=>{for(let n of t.nodes){let i=typeof n.domId==`string`?n.domId:Qm(t.diagramId,n.id),a=e.select(`#${i}`),o=n.isGroup?`boundary`:Zm[n.shape]?`actor`:n.shape===`note`?`note`:n.shape===`usecaseJsonTable`?`json`:`usecase`,s=r.nodes.get(n.id)??n.id;if(a.attr(`data-usecase-id`,n.id).attr(`data-usecase-kind`,o).attr(`role`,`img`).attr(`aria-label`,s),!n.isGroup&&(n.shape===`usecaseEllipse`||n.shape===`rect`)&&`hasFoldedStereotype`in n&&n.hasFoldedStereotype===!0){let e=a.node(),t=e?.querySelector(`.nodeLabel`),n=t?.querySelector(`p`)??t,r=n?.firstChild;if(n&&r?.nodeType===3){let e=n.ownerDocument.createElement(`span`);e.className=`usecase-stereotype`,n.insertBefore(e,r),e.appendChild(r)}else e?.querySelector(`.label tspan tspan, .label tspan`)?.classList.add(`usecase-stereotype`)}}let i=new Map(t.edges.map(e=>[e.id,e]));e.selectAll(`path[data-et="edge"]`).each(function(){let e=i.get(this.getAttribute(`data-id`)??``);if(!e)return;let a=n(this);a.attr(`id`,Qm(t.diagramId,e.id)).attr(`data-usecase-id`,e.id).attr(`data-usecase-kind`,e.internal?`note-connector`:`relationship`),e.internal?a.attr(`aria-hidden`,`true`):a.attr(`role`,`img`).attr(`aria-label`,r.edges.get(e.id)??e.id)})},`annotateUsecaseElements`),ch=e((e,t)=>{e.style(`--mermaid-usecase-actor-font-size`,`${t.actorFontSize}px`).style(`--mermaid-usecase-actor-font-family`,t.actorFontFamily).style(`--mermaid-usecase-actor-font-weight`,t.actorFontWeight).style(`--mermaid-usecase-font-size`,`${t.usecaseFontSize}px`).style(`--mermaid-usecase-font-family`,t.usecaseFontFamily).style(`--mermaid-usecase-font-weight`,t.usecaseFontWeight)},`applyUsecaseFonts`),lh={draw:e(async(e,n,r,i)=>{t.info(`Drawing usecase diagram (unified)`,n);let{layout:a}=d(),o=i.db,s=o.getData(),c=new Map(s.nodes.map(e=>[e.id,eh(e.label??e.id,e.labelType)])),l={nodes:new Map(s.nodes.map(e=>[e.id,e.isGroup?nh(e):th(e.shape===`note`?{...e,noteTargetLabel:c.get(e.noteTarget??``)}:e)])),edges:new Map(s.edges.map(e=>[e.id,rh({...e,sourceLabel:c.get(e.source)??e.sourceLabel,targetLabel:c.get(e.target)??e.targetLabel})]))},u=ie(n,s.config.securityLevel);s.layoutAlgorithm=re(a),oh(s,n),ch(u,s),await ne(s,u),sh(u,s,l);let f=s.diagramPadding;m.insertTitle(u,`usecaseDiagramTitleText`,0,o.getDiagramTitle?.()??``),ae(u,f,`usecaseDiagram`,s.useMaxWidth),ch(u,s)},`draw`)},uh=e(e=>({actorBkg:e.usecaseActorBkg??e.actorBkg??e.mainBkg,actorBorder:e.usecaseActorBorder??e.actorBorder??e.primaryColor,bkg:e.usecaseBkg??e.mainBkg,border:e.usecaseBorder??e.nodeBorder??e.primaryColor,boundaryBkg:e.usecaseBoundaryBkg??e.clusterBkg,boundaryBorder:e.usecaseBoundaryBorder??e.clusterBorder,includeLine:e.usecaseIncludeLine??e.lineColor,extendLine:e.usecaseExtendLine??e.lineColor}),`roleColors`),dh=e(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!ee(t,r))return``;let i=o().usecase?.colorScheme===`rotate`,a=te(e.look),s=a===`handDrawn`,c=_(n),l=``;for(let e=0;ei.map(i=>d[i]); -import{i as e,n as t,t as n}from"./app-rolldown-runtime.js";import{n as r,t as i}from"./app-jsx-runtime.js";import{A as a,C as o,D as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,N as h,O as g,P as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,a as O,b as k,c as A,d as j,f as M,g as N,h as P,i as F,j as I,k as ee,l as L,m as R,o as te,p as z,q as B,r as ne,s as re,t as V,u as ie,v as ae,w as oe,x as se,y as ce,z as le}from"./app-Tooltip.js";import{C as H,_ as ue,a as de,b as fe,d as pe,g as me,h as he,i as ge,m as _e,n as ve,o as ye,r as be,s as xe,t as Se,u as Ce,v as we,y as Te}from"./app-Dialog.js";import{t as Ee}from"./app-preload-helper.js";import{a as U,i as De,n as Oe,r as ke,t as W}from"./app-useTranslation.js";import{n as Ae,r as G,t as je}from"./app-x.js";import{t as Me}from"./app-purify.es.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ne=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Pe=n(((e,t)=>{t.exports=Ne()})),Fe=n((e=>{var t=Pe(),n=r(),i=E();function a(e){var t=`https://react.dev/errors/`+e;if(1R||(e.current=L[R],L[R]=null,R--)}function B(e,t){R++,L[R]=e.current,e.current=t}var ne=te(null),re=te(null),V=te(null),ie=te(null);function ae(e,t){switch(B(V,t),B(re,e),B(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qd(t),e=Jd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(ne),B(ne,e)}function oe(){z(ne),z(re),z(V)}function se(e){e.memoizedState!==null&&B(ie,e);var t=ne.current,n=Jd(t,e.type);t!==n&&(B(re,e),B(ne,n))}function ce(e){re.current===e&&(z(ne),z(re)),ie.current===e&&(z(ie),ip._currentValue=ee)}var le,H;function ue(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,H=-1i.map(i=>d[i]); +import{i as e,n as t,t as n}from"./app-rolldown-runtime.js";import{n as r,t as i}from"./app-jsx-runtime.js";import{A as a,C as o,D as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,N as h,O as g,P as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,a as O,b as k,c as A,d as j,f as M,g as N,h as P,i as F,j as I,k as ee,l as L,m as R,o as te,p as z,q as ne,r as re,s as ie,t as B,u as ae,v as oe,w as se,x as ce,y as V,z as le}from"./app-Tooltip.js";import{C as H,_ as ue,a as de,b as fe,d as pe,g as me,h as he,i as ge,m as _e,n as ve,o as ye,r as be,s as xe,t as Se,u as Ce,v as we,y as Te}from"./app-Dialog.js";import{t as Ee}from"./app-preload-helper.js";import{a as U,i as De,n as Oe,r as ke,t as W}from"./app-useTranslation.js";import{n as Ae,r as G,t as je}from"./app-x.js";import{t as Me}from"./app-purify.es.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ne=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Pe=n(((e,t)=>{t.exports=Ne()})),Fe=n((e=>{var t=Pe(),n=r(),i=E();function a(e){var t=`https://react.dev/errors/`+e;if(1R||(e.current=L[R],L[R]=null,R--)}function ne(e,t){R++,L[R]=e.current,e.current=t}var re=te(null),ie=te(null),B=te(null),ae=te(null);function oe(e,t){switch(ne(B,t),ne(ie,e),ne(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qd(t),e=Jd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),ne(re,e)}function se(){z(re),z(ie),z(B)}function ce(e){e.memoizedState!==null&&ne(ae,e);var t=re.current,n=Jd(t,e.type);t!==n&&(ne(ie,e),ne(re,n))}function V(e){ie.current===e&&(z(re),z(ie)),ae.current===e&&(z(ae),ip._currentValue=ee)}var le,H;function ue(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,H=-1)`:-1i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{de=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ue(n):``}function pe(e,t){switch(e.tag){case 26:case 27:case 5:return ue(e.type);case 16:return ue(`Lazy`);case 13:return e.child!==t&&t!==null?ue(`Suspense Fallback`):ue(`Suspense`);case 19:return ue(`SuspenseList`);case 0:case 15:return fe(e.type,!1);case 11:return fe(e.type.render,!1);case 1:return fe(e.type,!0);case 31:return ue(`Activity`);default:return``}}function me(e){try{var t=``,n=null;do t+=pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` -`+e.stack}}var he=Object.prototype.hasOwnProperty,ge=t.unstable_scheduleCallback,_e=t.unstable_cancelCallback,ve=t.unstable_shouldYield,ye=t.unstable_requestPaint,be=t.unstable_now,xe=t.unstable_getCurrentPriorityLevel,Se=t.unstable_ImmediatePriority,Ce=t.unstable_UserBlockingPriority,we=t.unstable_NormalPriority,Te=t.unstable_LowPriority,Ee=t.unstable_IdlePriority,U=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function W(e){if(typeof U==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var Ae=Math.clz32?Math.clz32:Me,G=Math.log,je=Math.LN2;function Me(e){return e>>>=0,e===0?32:31-(G(e)/je|0)|0}var Ne=256,Fe=262144,Ie=4194304;function Le(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function K(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Le(n))):i=Le(o):i=Le(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Le(n))):i=Le(o)):i=Le(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Re(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Be(){var e=Ie;return Ie<<=1,!(Ie&62914560)&&(Ie=4194304),e}function Ve(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function He(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),en=!1;if($t)try{var tn={};Object.defineProperty(tn,"passive",{get:function(){en=!0}}),window.addEventListener(`test`,tn,tn),window.removeEventListener(`test`,tn,tn)}catch{en=!1}var nn=null,rn=null,an=null;function on(){if(an)return an;var e,t=rn,n=t.length,r,i=`value`in nn?nn.value:nn.textContent,a=i.length;for(e=0;e=Rn),Vn=` `,Hn=!1;function Un(e,t){switch(e){case`keyup`:return In.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Wn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Gn=!1;function Kn(e,t){switch(e){case`compositionend`:return Wn(t);case`keypress`:return t.which===32?(Hn=!0,Vn):null;case`textInput`:return e=t.data,e===Vn&&Hn?null:e;default:return null}}function qn(e,t){if(Gn)return e===`compositionend`||!Ln&&Un(e,t)?(e=on(),an=rn=nn=null,Gn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=hr(n)}}function _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dt(e.document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var br=$t&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Tr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==Dt(r)||(r=xr,`selectionStart`in r&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cr&&mr(Cr,r)||(Cr=r,r=jd(Sr,`onSelect`),0>=o,i-=o,_i=1<<32-Ae(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ei&&yi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Ei&&yi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ei&&yi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Ei&&yi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&ba(l)===r.type){n(e,r.sibling),c=i(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===_?(c=ii(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ri(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=si(o,e.mode,c),c.return=e,e=c}return s(e);case D:return o=ba(o),b(e,r,o,c)}if(P(o))return v(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ea(o),c);if(o.$$typeof===x)return b(e,r,Ji(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=ai(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=b(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=$r(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Xr(e),Yr(e,null,n),t}return Kr(e,r,t,n),Xr(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Bl&f)===f:(r&f)===f){f!==0&&f===ia&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ma=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Jl|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=F.T,s={};F.T=s,As(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,ca(c,r),gu(e)):ks(e,t,r,gu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=xs(e).queue;vs(e,i,t,ee,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},gu())}function Cs(){return qi(ip)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(vu(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=qr(e,t,n,r),n!==null&&(vu(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,gu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,pr(s,o))return Kr(e,t,i,0),Rl===null&&Gr(),!1}catch{}if(n=qr(e,t,i,r),n!==null)return vu(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:hd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(a(479))}else t=qr(e,n,r,2),t!==null&&vu(t,e,2)}function js(e){var t=e.alternate;return e===ao||t!==null&&t===ao}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}var Ps={readContext:qi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:qi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){W(!0);try{e()}finally{W(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){W(!0);try{n(t)}finally{W(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ds.bind(null,ao,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,ao,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,ao,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ao,i=To();if(Ei){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Rl===null)throw Error(a(349));Bl&127||Io(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Rl.identifierPrefix;if(Ei){var n=vi,r=_i;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[Qe]=t,o[$e]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Bd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=V.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=wi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ld(e.nodeValue,n)),e||Ai(t,!0)}else e=Kd(e).createTextNode(r),e[Qe]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[Qe]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(a(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[Qe]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),i=!1}else i=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return oe(),e===null&&Dd(t.stateNode.containerInfo),Pc(t),null;case 10:return Vi(t.type),Pc(t),null;case 19:if(z(no),r=t.memoizedState,r===null)return Pc(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null)if(i)Nc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ni(n,e),n=n.sibling;return B(no,no.current&1|2),Ei&&yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&be()>iu&&(t.flags|=128,i=!0,Nc(r,!1),t.lanes=4194304)}else{if(!i)if(e=ro(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Pc(t),null}else 2*be()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,i=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=be(),e.sibling=null,n=no.current,B(no,i?n&1|2:n&1),Ei&&yi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Pc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Ic(e,t){switch(Si(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),oe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ce(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(a(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(no),null;case 4:return oe(),null;case 10:return Vi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&z(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Lc(e,t){switch(Si(t),t.tag){case 3:Vi($i),oe();break;case 26:case 27:case 5:ce(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:z(no);break;case 10:Vi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&z(ua);break;case 24:Vi($i)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ju(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ju(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ju(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Ju(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ju(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ju(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ju(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ju(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ju(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Vd(r,e.type,n,t),r[$e]=t}catch(t){Ju(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rf(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&rf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wt));else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Bd(t,r,n),t[Qe]=e,t[$e]=n}catch(t){Ju(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Wd=pp,e=vr(e),yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},pp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Bd(o,r,n),o[Qe]=e,dt(o),r=o;break a;case`link`:var s=qf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=gr(s,h),v=gr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,F.T=null,n=fu,fu=null;var o=cu,s=uu;if(su=0,lu=cu=null,uu=0,Ll&6)throw Error(a(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,cd(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{I.p=i,F.T=r,Wu(e,t)}}function qu(e,t,n){t=li(n,t),t=Js(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(He(e,2),sd(e))}function Ju(e,t,n){if(e.tag===3)qu(e,e,n);else for(;t!==null;){if(t.tag===3){qu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ou===null||!ou.has(r))){e=li(n,e),n=Ys(2),r=Ia(t,n,2),r!==null&&(Xs(n,r,t,e),He(r,2),sd(r));break}}t=t.return}}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Gl=!0,i.add(n),e=Xu.bind(null,e,t,n),t.then(e,e))}function Xu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Bl&n)===n&&(ql===4||ql===3&&(Bl&62914560)===Bl&&300>be()-nu?!(Ll&2)&&Tu(e,0):Xl|=n,Ql===Bl&&(Ql=0)),sd(e)}function Zu(e,t){t===0&&(t=Be()),e=Jr(e,t),e!==null&&(He(e,t),sd(e))}function Qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zu(e,n)}function $u(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Zu(e,n)}function ed(e,t){return ge(e,t)}var td=null,nd=null,rd=!1,id=!1,ad=!1,od=0;function sd(e){e!==nd&&e.next===null&&(nd===null?td=nd=e:nd=nd.next=e),id=!0,rd||(rd=!0,md())}function cd(e,t){if(!ad&&id){ad=!0;do for(var n=!1,r=td;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ae(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,pd(r,a))}else a=Bl,a=K(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Re(r,a)||(n=!0,pd(r,a));r=r.next}while(n);ad=!1}}function ld(){ud()}function ud(){id=rd=!1;var e=0;od!==0&&Zd()&&(e=od);for(var t=be(),n=null,r=td;r!==null;){var i=r.next,a=dd(r,t);a===0?(r.next=null,n===null?td=i:n.next=i,i===null&&(nd=n)):(n=r,(e!==0||a&3)&&(id=!0)),r=i}su!==0&&su!==5||cd(e,!1),od!==0&&(od=0)}function dd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Hd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Df(e,t,n){var r=Ef;if(r&&typeof t==`string`&&t){var i=kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xf.has(i)||(xf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Bd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Of(e){Cf.D(e),Df(`dns-prefetch`,e,null)}function kf(e,t){Cf.C(e,t),Df(`preconnect`,e,t)}function Af(e,t,n){Cf.L(e,t,n);var r=Ef;if(r&&e&&t){var i=`link[rel="preload"][as="`+kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+kt(n.imageSizes)+`"]`)):i+=`[href="`+kt(e)+`"]`;var a=i;switch(t){case`style`:a=If(e);break;case`script`:a=Bf(e)}bf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lf(a))||t===`script`&&r.querySelector(Vf(a))||(t=r.createElement(`link`),Bd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function jf(e,t){Cf.m(e,t);var n=Ef;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+kt(r)+`"][href="`+kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bf(e)}if(!bf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),bf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vf(a)))return}r=n.createElement(`link`),Bd(r,`link`,e),dt(r),n.head.appendChild(r)}}}function Mf(e,t,n){Cf.S(e,t,n);var r=Ef;if(r&&e){var i=ut(r).hoistableStyles,a=If(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bf.get(a))&&Wf(e,n);var c=o=r.createElement(`link`);dt(c),Bd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Uf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nf(e,t){Cf.X(e,t);var n=Ef;if(n&&e){var r=ut(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=p({src:e,async:!0},t),(t=bf.get(i))&&Gf(e,t),a=n.createElement(`script`),dt(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t){Cf.M(e,t);var n=Ef;if(n&&e){var r=ut(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=bf.get(i))&&Gf(e,t),a=n.createElement(`script`),dt(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t,n,r){var i=(i=V.current)?Sf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=If(n.href),n=ut(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=If(n.href);var o=ut(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Lf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),bf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bf.set(e,n),o||zf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Bf(n),n=ut(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function If(e){return`href="`+kt(e)+`"`}function Lf(e){return`link[rel="stylesheet"][`+e+`]`}function Rf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function zf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Bd(t,`link`,n),dt(t),e.head.appendChild(t))}function Bf(e){return`[src="`+kt(e)+`"]`}function Vf(e){return`script[async]`+e}function Hf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+kt(n.href)+`"]`);if(r)return t.instance=r,dt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),dt(r),Bd(r,`style`,i),Uf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=If(n.href);var o=e.querySelector(Lf(i));if(o)return t.state.loading|=4,t.instance=o,dt(o),o;r=Rf(n),(i=bf.get(i))&&Wf(r,i),o=(e.ownerDocument||e).createElement(`link`),dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Bd(o,`link`,r),t.state.loading|=4,Uf(o,n.precedence,e),t.instance=o;case`script`:return o=Bf(n.src),(i=e.querySelector(Vf(o)))?(t.instance=i,dt(i),i):(r=n,(i=bf.get(o))&&(r=p({},n),Gf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),dt(i),Bd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Uf(r,n.precedence,e));return t.instance}function Uf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Yf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=If(r.href),a=t.querySelector(Lf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ep.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,dt(a);return}a=t.ownerDocument||t,r=Rf(r),(i=bf.get(i))&&Wf(r,i),a=a.createElement(`link`),dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Bd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ep.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Qf=0;function $f(e,t){return e.stylesheets&&e.count===0&&np(e,e.stylesheets),0Qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ep(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)np(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tp=null;function np(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tp=new Map,t.forEach(rp,e),tp=null,ep.call(e))}function rp(e,t){if(!(t.state.loading&4)){var n=tp.get(e);if(n)var r=n.get(null);else{n=new Map,tp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Fe()})),Le=`button:not([disabled]), a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), [contenteditable]:not([contenteditable="false"]), audio[controls], video[controls], iframe, details > summary:first-child`,K=e(r(),1),Re=0;function ze(e){if(e.hasAttribute(`inert`)||e.closest(`[inert]`)||e.hidden||e.closest(`[hidden]`)||e.closest(`[aria-hidden="true"]`))return!1;if(typeof window<`u`&&window.getComputedStyle){let t=window.getComputedStyle(e);if(t.visibility===`hidden`||t.display===`none`)return!1}return!0}function Be(e){return Array.from(e.querySelectorAll(Le)).filter(ze)}function Ve(e){try{e.focus()}catch{}return document.activeElement===e}function He(e){let t=Be(e);for(let e of t)if(Ve(e))return!0;return!1}function Ue(e){let t=Be(e);for(let e=t.length-1;e>=0;e--)if(Ve(t[e]))return!0;return!1}function We(e){let{isActive:t,onEscape:n}=e,r=(0,K.useRef)(null),i=(0,K.useRef)(null),a=(0,K.useRef)(!1),o=t&&n!=null;j({isActive:o,onDismiss:()=>{n?.()},getContainer:()=>r.current}),(0,K.useEffect)(()=>{if(o)return Re+=1,()=>{--Re}},[o]);let s=(0,K.useCallback)(()=>{r.current&&He(r.current)},[]);return(0,K.useEffect)(()=>{if(!t)return;let e=document.activeElement,n=r.current;return()=>{let t=document.activeElement;(t==null||t===document.body||t===document.documentElement||n!=null&&n.contains(t))&&e!=null&&e.isConnected&&typeof e.focus==`function`&&e.focus()}},[t]),(0,K.useEffect)(()=>{if(!t)return;let e=e=>{let t=r.current;if(!t)return;let n=e.target;if(t.contains(n))i.current=n;else if(a.current){let e=He(t);e&&i.current===document.activeElement?Ue(t):!e&&i.current instanceof HTMLElement&&t.contains(i.current)&&Ve(i.current),i.current=document.activeElement}a.current=!1};return document.addEventListener(`focus`,e,!0),()=>{document.removeEventListener(`focus`,e,!0)}},[t]),(0,K.useEffect)(()=>{if(!t)return;let e=e=>{let t=r.current;if(t&&e.key===`Tab`){a.current=!0;let n=Be(t);if(n.length===0){let n=document.activeElement;if(!(n instanceof HTMLElement)||!t.contains(n))return;e.preventDefault(),i.current=n,a.current=!1;return}let r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),r.focus())}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,n]),{containerRef:r,focusFirst:s}}var Ge={primary:{kMwMTN:`x1tgivj0`,$$css:!0},secondary:{kMwMTN:`xv1l7n4`,$$css:!0},disabled:{kMwMTN:`xnbbluu`,$$css:!0},placeholder:{kMwMTN:`xv1l7n4`,$$css:!0},accent:{kMwMTN:`xjse4m1`,$$css:!0},inherit:{kMwMTN:`x1heor9g`,$$css:!0}},Ke={normal:{k63SB2:`x1sodnla`,$$css:!0},medium:{k63SB2:`x1e4wzip`,$$css:!0},semibold:{k63SB2:`x2mo6ok`,$$css:!0},bold:{k63SB2:`x1lvx875`,$$css:!0}},qe={body:{k63SB2:`xxovm9e`,$$css:!0},large:{k63SB2:`x149oux8`,$$css:!0},label:{k63SB2:`xmhvcl5`,$$css:!0},code:{k63SB2:`xx3eeay`,$$css:!0},supporting:{k63SB2:`xv8on6e`,$$css:!0},"display-1":{k63SB2:`x1txul5o`,$$css:!0},"display-2":{k63SB2:`x1y36c3f`,$$css:!0},"display-3":{k63SB2:`x1on40hk`,$$css:!0},inherit:{k63SB2:`x1pd3egz`,$$css:!0}},Je={body:{kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0},large:{kGuDYH:`x18juvz8`,kLWn49:`xf74fhv`,$$css:!0},label:{kGuDYH:`xcr08ib`,kLWn49:`x1kq96og`,$$css:!0},code:{kGuDYH:`xp03k98`,kLWn49:`x17iicif`,kMv6JI:`x9m5x89`,$$css:!0},supporting:{kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},"display-1":{kGuDYH:`xsub3ws`,kLWn49:`x112ttwr`,$$css:!0},"display-2":{kGuDYH:`x1yego12`,kLWn49:`xh0iwvy`,$$css:!0},"display-3":{kGuDYH:`xlgnzhf`,kLWn49:`x1ujwuaq`,$$css:!0},inherit:{kGuDYH:`x1qlqyl8`,kLWn49:`x15bjb6t`,$$css:!0}},Ye={"4xs":{kGuDYH:`xxc45ev`,$$css:!0},"3xs":{kGuDYH:`x10p7juq`,$$css:!0},"2xs":{kGuDYH:`x16a80zy`,$$css:!0},xsm:{kGuDYH:`x51wmvv`,$$css:!0},sm:{kGuDYH:`x1eqnyfr`,$$css:!0},base:{kGuDYH:`x1j29vfg`,$$css:!0},lg:{kGuDYH:`xc7cgfe`,$$css:!0},xl:{kGuDYH:`x1wqms48`,$$css:!0},"2xl":{kGuDYH:`xhs0kqb`,$$css:!0},"3xl":{kGuDYH:`x10srzze`,$$css:!0},"4xl":{kGuDYH:`xqcvi3d`,$$css:!0}},Xe={1:{kGuDYH:`xcg7oai`,kLWn49:`xfmsba7`,k63SB2:`x1v68xuy`,$$css:!0},2:{kGuDYH:`x1xvnhcw`,kLWn49:`x1cpk1wn`,k63SB2:`x12yy4cs`,$$css:!0},3:{kGuDYH:`xii13ha`,kLWn49:`xwjzt0u`,k63SB2:`x1jcxfy8`,$$css:!0},4:{kGuDYH:`x8tkxat`,kLWn49:`xqerer`,k63SB2:`x2hcmsi`,$$css:!0},5:{kGuDYH:`xsgqta0`,kLWn49:`xo3gurs`,k63SB2:`xno150v`,$$css:!0},6:{kGuDYH:`xw5ohdf`,kLWn49:`xeixjfn`,k63SB2:`x1pw4frv`,$$css:!0}},Ze={inline:{k1xSpc:`xt0psk2`,$$css:!0},block:{k1xSpc:`x1lliihq`,$$css:!0}},Qe={singleLine:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,k1xSpc:`x1lliihq`,$$css:!0},multiLine:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0}},$e={"break-word":{kTgw9:`x1lldw8n`,kHjlTd:`x1mzt3pk`,$$css:!0},"break-all":{kTgw9:`x1yn0g08`,$$css:!0}},et={wrap:{kN2L0X:`xk4td0m`,$$css:!0},nowrap:{kN2L0X:`xebhuq6`,$$css:!0},balance:{kN2L0X:`x1w2vvpw`,$$css:!0},pretty:{kN2L0X:`x1fzhlzt`,$$css:!0}},tt={enabled:{kxwWH2:`x1b2iylo`,kzeHkT:`xwgcxoh`,k1xSpc:`x1lliihq`,$$css:!0}},nt={strikethrough:{kybGjl:`xmqliwb`,$$css:!0}},rt={enabled:{kcqcaj:`xss6m8b`,$$css:!0}},it={start:{k9WMMc:`x1yc453h`,$$css:!0},center:{k9WMMc:`x2b8uid`,$$css:!0},end:{k9WMMc:`xp4054r`,$$css:!0}},at={content:{ks0D6T:`xw5ewwj`,kTgw9:`x13faqbe`,$$css:!0}},ot=null,st=new Map;function ct(){return typeof ResizeObserver>`u`?null:(ot||=new ResizeObserver(e=>{for(let t of e){let e=st.get(t.target);e&&e(t)}}),ot)}function lt(e,t){st.set(e,t),ct()?.observe(e),t({target:e})}function ut(e){st.delete(e),ot&&(ot.unobserve(e),st.size===0&&(ot.disconnect(),ot=null))}function dt(e){let{maxLines:t}=e,[n,r]=(0,K.useState)(!1),[i,a]=(0,K.useState)(``),o=(0,K.useRef)(null),s=(0,K.useCallback)(e=>{if(t===0){r(!1);return}if(a(e.textContent??``),t===1)r(e.scrollWidth>e.offsetWidth);else{let t=e.scrollHeight;try{let n=document.createRange();n.selectNodeContents(e),t=n.getBoundingClientRect().height,n.detach()}catch{}r(t>e.offsetHeight)}},[t]);return{ref:(0,K.useCallback)(e=>{o.current&&ut(o.current),o.current=e,e&&t>0?typeof ResizeObserver<`u`?lt(e,()=>{s(e)}):s(e):(r(!1),a(``))},[t,s]),isTruncated:n,fullText:i}}function ft(e){return e===`base`?``:e.split(`+`).map(e=>{let[t,n]=e.split(`:`);return n===void 0?`.${t}`:/^\d/.test(n)?`.${t}-${n}`:`.${n}`}).join(``)}function pt(...e){return t=>{for(let n of e)if(n?.(t),t.defaultPrevented)return}}function mt(e){return e!=null&&typeof e!=`boolean`&&e!==``}function ht(...e){let t=e.flatMap(e=>typeof e==`string`?e.trim().split(/\s+/):[]).filter(Boolean);if(t.length!==0)return Array.from(new Set(t)).join(` `)}function gt(e,t=[],n){return{ariaLabelledBy:n?ht(n.labelID,e):void 0,ariaDescribedBy:ht(n?.describedByIDs,...t)}}var _t={transparent:{r:0,g:0,b:0,a:0},black:{r:0,g:0,b:0,a:1},white:{r:255,g:255,b:255,a:1}},vt=(e,t,n)=>Math.max(t,Math.min(n,e));function yt(e){return e.split(``).map(e=>e+e).join(``)}function bt(e){if(typeof e!=`string`)return null;let t=e.trim().replace(/^#/,``),n=t.length===3||t.length===4?yt(t):t;return n.length!==6&&n.length!==8||!/^[0-9a-fA-F]+$/.test(n)?null:{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:n.length===8?parseInt(n.slice(6,8),16)/255:1}}function xt(e){let t=e.indexOf(`(`);if(t===-1||!e.trim().endsWith(`)`))return null;let n=e.slice(t+1,e.lastIndexOf(`)`)).replace(/\//g,` `).split(/[\s,]+/).map(e=>e.trim()).filter(Boolean);if(n.length<3)return null;let r=e=>vt(e.endsWith(`%`)?parseFloat(e)/100*255:parseFloat(e),0,255),i=r(n[0]),a=r(n[1]),o=r(n[2]);if([i,a,o].some(Number.isNaN))return null;let s=1;if(n.length>=4){let e=n[3];if(s=e.endsWith(`%`)?parseFloat(e)/100:parseFloat(e),Number.isNaN(s))return null;s=vt(s,0,1)}return{r:i,g:a,b:o,a:s}}function St(e){let t=e.trim(),n=_t[t.toLowerCase()];return n?{...n}:t.startsWith(`#`)?bt(t):/^rgba?\(/i.test(t)?xt(t):null}function Ct(e,t,n){let r=e=>vt(Math.round(e),0,255).toString(16).padStart(2,`0`).toUpperCase();return`#${r(e)}${r(t)}${r(n)}`}function wt({r:e,g:t,b:n,a:r}){if(r>=1)return Ct(e,t,n);let i=e=>vt(Math.round(e),0,255);return`rgba(${i(e)}, ${i(t)}, ${i(n)}, ${parseFloat(r.toFixed(4))})`}var Tt={kbCHJM:`x1nrll8i`,k3aq6I:`xsqj5wx`,$$css:!0},Et={mirror:{k3aq6I:`xgtlewx`,$$css:!0},centerInline:e=>[Tt,{"--x-transform":`translate(-50%, ${e})`==null?void 0:`translate(-50%, ${e})`}]},q=i(),Dt=(0,K.lazy)(async()=>Ee(()=>import(`./app-Tooltip.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2]))),Ot={body:`primary`,large:`primary`,label:`primary`,supporting:`secondary`,code:`primary`,"display-1":`primary`,"display-2":`primary`,"display-3":`primary`,inherit:`inherit`};function kt(e){return e in Je?e:`body`}function At(e){return e in Ge?e:`primary`}function jt({type:e=`body`,size:t,color:n,weight:r,display:i=`inline`,maxLines:a=0,hasTruncateTooltip:o=!0,wordBreak:s,textWrap:c,justify:l=`start`,hasCapsize:u=!1,hasStrikethrough:d=!1,hasTabularNumbers:f=!1,xstyle:p,className:m,style:h,as:g=`span`,children:_,ref:v,...y}){let b=n??Ot[e]??`primary`,x=kt(e),S=At(b),C=s??(a===1?`break-all`:`break-word`),T=a>0||u?`block`:i,E=dt({maxLines:a}),D=typeof o==`string`?o:`above`,k=a>0&&o!==!1&&E.isTruncated,A=(0,K.useRef)(null),j=we(v,E.ref,A),M=a>1?{WebkitLineClamp:a}:void 0;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g,{ref:j,...H(O(`text`,{type:e,size:t,color:b}),w(Ge[S],Je[x],t&&Ye[t],qe[x],r&&Ke[r],a===1?Qe.singleLine:a>1?Qe.multiLine:Ze[T],a>0&&$e[C],c&&et[c],l!==`start`&&it[l],u&&tt.enabled,d&&nt.strikethrough,f&&rt.enabled,p),m,{...h,...M}),...y,children:_}),k&&(0,q.jsx)(K.Suspense,{fallback:null,children:(0,q.jsx)(Dt,{anchorRef:A,content:(0,q.jsx)(`span`,{...w(at.content),children:E.fullText}),placement:D})})]})}jt.displayName=`Text`;var Mt=.375,Nt={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},Pt=[`--_spinner-ring-diameter`,`--_spinner-ring-stroke`],Ft=`--_spinner-box-size`;function It(){if(!(typeof CSS>`u`||typeof CSS.registerProperty!=`function`))for(let e of Pt)try{CSS.registerProperty({name:e,syntax:``,inherits:!0,initialValue:`0px`})}catch{}}It();var Lt=new Set,Rt=!1;function zt(){Rt=!1;let e=[];for(let t of Lt)e.push(...t.getAnimations());Lt.clear();for(let t of e)t.startTime=0}function Bt(e){if(e!=null&&typeof e.getAnimations==`function`)return Lt.add(e),Rt||(Rt=!0,requestAnimationFrame(zt)),()=>{Lt.delete(e)}}var Vt={wrapper:{k1xSpc:`x3nfvp2`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,$$css:!0},spinner:{k1xSpc:`xwz0xwf`,kgQiWS:`x1ku5rj1`,kVQacm:`xb3r6kr`,kXLuUW:`xxymvpz`,"--_spinner-ring-diameter":`x2lq4xu`,"--_spinner-ring-stroke":`x10qssua`,"--_spinner-box-size":`x69vvuq`,$$css:!0},circle:{kDwRjp:`xbh8q5q`,kU5bRw:`x1owpc8m`,kPFa82:`xio8zfp`,kfJifR:`xgw3ha0`,$$css:!0},track:{kjVXCG:`xalkhop`,$$css:!0}},Ht={sm:{"--spinner-diameter":`x11wm0hx`,"--spinner-stroke-width":`xls98ul`,$$css:!0},md:{"--spinner-diameter":`x15pu9g6`,"--spinner-stroke-width":`xr0wkrm`,$$css:!0},lg:{"--spinner-diameter":`x1w424tr`,"--spinner-stroke-width":`xr0wkrm`,$$css:!0},xl:{"--spinner-diameter":`x1orj1z9`,"--spinner-stroke-width":`x7y2bof`,$$css:!0}},Ut={default:{"--spinner-color":`xt1b8mc`,"--spinner-track-color":`xspt9s2`,$$css:!0},subtle:{"--spinner-color":`x1jevo6s`,"--spinner-track-color":`xspt9s2`,$$css:!0},onMedia:{"--spinner-color":`x13u6jys`,"--spinner-track-color":`x1ufpcf6`,$$css:!0},inherit:{"--spinner-color":`x1uzk0gl`,"--spinner-track-color":`xbfzqbu`,$$css:!0}},Wt={default:{kDd8S0:`x1g350g8`,$$css:!0},subtle:{kDd8S0:`x1g350g8`,$$css:!0},onMedia:{kDd8S0:`x1smxkh6`,$$css:!0},inherit:{kDd8S0:`x7bo2k`,$$css:!0}};function Gt({size:e=`md`,shade:t=`default`,label:n,xstyle:r,className:i,style:a,"aria-label":o,"data-testid":s,ref:c,...l}){let{border:u,diameter:d}=Nt[e],f=d+u*2,p=f/2,m=Math.PI*d,h=m*Mt,g=n!=null,_=(0,K.useId)(),v=g&&typeof n==`string`&&o==null,y=(0,q.jsx)(`span`,{ref:g?void 0:c,role:`status`,"aria-label":v?void 0:o??(typeof n==`string`?n:void 0)??`Loading`,"aria-labelledby":v?_:void 0,"data-testid":g?void 0:s,...g?{}:l,...H(g?``:O(`spinner`,{size:e,shade:t}),w(Vt.spinner,!g&&Ht[e],!g&&Ut[t],!g&&r),g?void 0:i,{...g?{}:a,width:`var(${Ft}, ${f}px)`,height:`var(${Ft}, ${f}px)`}),children:(0,q.jsxs)(`svg`,{ref:Bt,width:f,height:f,viewBox:`0 0 ${f} ${f}`,"aria-hidden":`true`,className:`xlp1x4z x1lliihq x1so62im x1rea2x4 x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782`,children:[(0,q.jsx)(`circle`,{cx:p,cy:p,r:d/2,strokeWidth:u,...w(Vt.circle,Vt.track,Wt[t])}),(0,q.jsx)(`circle`,{cx:p,cy:p,r:d/2,strokeWidth:u,strokeDasharray:`${h} ${m-h}`,transform:`rotate(-90 ${p} ${p})`,className:`xbh8q5q x1owpc8m xio8zfp xgw3ha0 xtve3lm x1vy8frr`})]})});return g?(0,q.jsxs)(`div`,{ref:c,"data-testid":s,...l,...H(O(`spinner`,{size:e,shade:t}),w(Vt.wrapper,Ht[e],Ut[t],r),i,a),children:[y,typeof n==`string`?(0,q.jsx)(jt,{id:_,type:`body`,weight:`bold`,children:n}):n]}):y}Gt.displayName=`Spinner`;function Kt({children:e,as:t=`span`,ref:n,...r}){return(0,K.createElement)(t,{ref:n,...r,className:`x10l6tqk x1i1rx1s xjm9jq1 xkdpibf x1717udv xb3r6kr xzpqnlu xuxw1ft xng3xce x13vifvy x1o0tod x47corl x87ps6o`},e)}Kt.displayName=`VisuallyHidden`;var qt=`data-astryx-edge-comp`,Jt={keTefX:`x1kftj4p`,k71WvV:`x92e2el`,$$css:!0},Yt={inset:e=>[Jt,{"--x-126w13d":(e=>typeof e==`number`?e+`px`:e??void 0)(`calc(-1 * ${e})`),"--x-4drmnv":(e=>typeof e==`number`?e+`px`:e??void 0)(`calc(-1 * ${e})`)}]},Xt=(0,K.createContext)(null);Xt.displayName=`SizeContext`;function Zt(e,t=`md`){let n=(0,K.use)(Xt);return e??n??t}Xt.Provider;var Qt=(0,K.createContext)(null);Qt.displayName=`ButtonGroupContext`;function $t(){return(0,K.use)(Qt)}var en=(0,K.createContext)(null);en.displayName=`LinkContext`;function tn(e){function t({href:t,ref:n,...r}){return(0,K.createElement)(e,{ref:n,href:t,to:t,...r})}return t.displayName=`LinkWithTo(${typeof e==`string`?e:e.displayName||e.name||`Component`})`,t}function nn(e){let t=(0,K.use)(en),n=e??t?.component??`a`;return(0,K.useMemo)(()=>n===`a`?`a`:tn(n),[n])}`${c[`--color-overlay-hover`]}${c[`--color-overlay-hover`]}`,`${c[`--color-overlay-pressed`]}${c[`--color-overlay-pressed`]}`,`${c[`--color-neutral`]}${c[`--color-neutral`]}`;var rn={backgroundColor:{kWkggS:`xjbqb8w x1anq1lc xoevpu5 xprvw0a`,$$css:!0},backgroundImage:{kKwaWg:`x7uyq82 xmvprkv xetgvay`,$$css:!0},backgroundImageOnNeutral:{kKwaWg:`x14bno8m xzmimnh x1otsd3y xo3fi6e`,$$css:!0}};function an(e,t){let n=t&&t.cache?t.cache:hn,r=t&&t.serializer?t.serializer:pn;return(t&&t.strategy?t.strategy:un)(e,{cache:n,serializer:r})}function on(e){return e==null||typeof e==`number`||typeof e==`boolean`}function sn(e,t,n,r){let i=on(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function cn(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function ln(e,t,n,r,i){return n.bind(t,e,r,i)}function un(e,t){let n=e.length===1?sn:cn;return ln(e,this,n,t.cache.create(),t.serializer)}function dn(e,t){return ln(e,this,cn,t.cache.create(),t.serializer)}function fn(e,t){return ln(e,this,sn,t.cache.create(),t.serializer)}var pn=function(){return JSON.stringify(arguments)},mn=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},hn={create:function(){return new mn}},gn={variadic:dn,monadic:fn},_n=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function vn(e){let t={};return e.replace(_n,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var yn=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function bn(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(yn).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function xn(e){return e.replace(/^(.*?)-/,``)}var Sn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Cn=/^(@+)?(\+|#+)?[rs]?$/g,wn=/(\*)(0+)|(#+)(0+)|(0+)/g,Tn=/^(0+)$/;function En(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(Cn,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function Dn(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function On(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!Tn.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function kn(e){return Dn(e)||{}}function An(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=xn(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...kn(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...kn(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(wn,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(Tn.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(Sn.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(Sn,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...En(e)});continue}if(Cn.test(n.stem)){t={...t,...En(n.stem)};continue}let e=Dn(n.stem);e&&(t={...t,...e});let r=On(n.stem);r&&(t={...t,...r})}return t}var jn=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function Mn(e){return e.type===0}function Nn(e){return e.type===1}function Pn(e){return e.type===2}function Fn(e){return e.type===3}function In(e){return e.type===4}function Ln(e){return e.type===5}function Rn(e){return e.type===6}function zn(e){return e.type===7}function Bn(e){return e.type===8}function Vn(e){return!!(e&&typeof e==`object`&&e.type===0)}function Hn(e){return!!(e&&typeof e==`object`&&e.type===1)}var Un=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Wn={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function Gn(e,t){let n=``;for(let r=0;r>1),c=Kn(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function Kn(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(Wn[r||``]||Wn[n||``]||Wn[`${n}-001`]||Wn[`001`])[0]}var qn=RegExp(`^${Un.source}*`),Jn=RegExp(`${Un.source}*$`);function Yn(e,t){return{start:e,end:t}}var Xn=!!Object.fromEntries,Zn=!!String.prototype.trimStart,Qn=!!String.prototype.trimEnd,$n=Xn?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},er=Zn?function(e){return e.trimStart()}:function(e){return e.replace(qn,``)},tr=Qn?function(e){return e.trimEnd()}:function(e){return e.replace(Jn,``)},nr=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function rr(e,t){return nr.lastIndex=t,nr.exec(e)[1]??``}function ir(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r=55296&&i<=56319&&r+1=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var ar=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=ir(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:Yn(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:Yn(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,Yn(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&or(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:Yn(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(``)?{val:{type:8,value:r,children:a,location:Yn(n,this.clonePosition())},err:null}:this.error(23,Yn(o,this.clonePosition()))):this.error(26,Yn(e,this.clonePosition()))}return this.error(27,Yn(n,this.clonePosition()))}return this.error(23,Yn(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&cr(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}let i=Yn(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!sr(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,Yn(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,Yn(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,Yn(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,Yn(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:Yn(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,Yn(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,Yn(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=rr(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Yn(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,Yn(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=tr(n.val);if(r.length===0)return this.error(6,Yn(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:Yn(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=Yn(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=er(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=Gn(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?vn(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,Yn(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,Yn(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=Yn(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:$n(c.val),location:u},err:null}:{val:{type:6,value:n,options:$n(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,Yn(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,Yn(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,Yn(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=bn(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?An(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=Yn(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,Yn(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:Yn(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,Yn(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,Yn(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=Yn(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&lr(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function or(e){return e>=97&&e<=122||e>=65&&e<=90}function sr(e){return or(e)||e===47}function cr(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function lr(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ur(e){e.forEach(e=>{if(delete e.location,Ln(e)||Rn(e))for(let t in e.options)delete e.options[t].location,ur(e.options[t].value);else Pn(e)&&Vn(e.style)||(Fn(e)||In(e))&&Hn(e.style)?delete e.style.location:Bn(e)&&ur(e.children)})}function dr(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new ar(e,t).parse();if(n.err){let e=SyntaxError(jn[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||ur(n.val),n.val}var fr=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},pr=class extends fr{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},mr=class extends fr{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},hr=class extends fr{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function gr(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function _r(e){return typeof e==`function`}function vr(e,t,n,r,i,a,o){if(e.length===1&&Mn(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(Mn(c)){s.push({type:0,value:c.value});continue}if(zn(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new hr(e,o);let l=i[e];if(Nn(c)){(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});continue}if(Fn(c)){let e=typeof c.style==`string`?r.date[c.style]:Hn(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(In(c)){let e=typeof c.style==`string`?r.time[c.style]:Hn(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(Pn(c)){let e=typeof c.style==`string`?r.number[c.style]:Vn(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)});continue}if(Bn(c)){let{children:e,value:l}=c,u=i[l];if(!_r(u))throw new mr(l,`function`,o);let d=u(vr(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(Ln(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new pr(c.value,l,Object.keys(c.options),o);s.push(...vr(a.value,t,n,r,i));continue}if(Rn(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new fr(`Intl.PluralRules is not available in this environment. +`+e.stack}}var he=Object.prototype.hasOwnProperty,ge=t.unstable_scheduleCallback,_e=t.unstable_cancelCallback,ve=t.unstable_shouldYield,ye=t.unstable_requestPaint,be=t.unstable_now,xe=t.unstable_getCurrentPriorityLevel,Se=t.unstable_ImmediatePriority,Ce=t.unstable_UserBlockingPriority,we=t.unstable_NormalPriority,Te=t.unstable_LowPriority,Ee=t.unstable_IdlePriority,U=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function W(e){if(typeof U==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var Ae=Math.clz32?Math.clz32:Me,G=Math.log,je=Math.LN2;function Me(e){return e>>>=0,e===0?32:31-(G(e)/je|0)|0}var Ne=256,Fe=262144,Ie=4194304;function Le(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function K(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Le(n))):i=Le(o):i=Le(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Le(n))):i=Le(o)):i=Le(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Re(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Be(){var e=Ie;return Ie<<=1,!(Ie&62914560)&&(Ie=4194304),e}function Ve(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function He(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),en=!1;if($t)try{var tn={};Object.defineProperty(tn,"passive",{get:function(){en=!0}}),window.addEventListener(`test`,tn,tn),window.removeEventListener(`test`,tn,tn)}catch{en=!1}var nn=null,rn=null,an=null;function on(){if(an)return an;var e,t=rn,n=t.length,r,i=`value`in nn?nn.value:nn.textContent,a=i.length;for(e=0;e=Rn),Vn=` `,Hn=!1;function Un(e,t){switch(e){case`keyup`:return In.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Wn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Gn=!1;function Kn(e,t){switch(e){case`compositionend`:return Wn(t);case`keypress`:return t.which===32?(Hn=!0,Vn):null;case`textInput`:return e=t.data,e===Vn&&Hn?null:e;default:return null}}function qn(e,t){if(Gn)return e===`compositionend`||!Ln&&Un(e,t)?(e=on(),an=rn=nn=null,Gn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=hr(n)}}function _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dt(e.document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var br=$t&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Tr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==Dt(r)||(r=xr,`selectionStart`in r&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cr&&mr(Cr,r)||(Cr=r,r=jd(Sr,`onSelect`),0>=o,i-=o,_i=1<<32-Ae(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ei&&yi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Ei&&yi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ei&&yi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Ei&&yi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&ba(l)===r.type){n(e,r.sibling),c=i(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===_?(c=ii(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ri(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=si(o,e.mode,c),c.return=e,e=c}return s(e);case D:return o=ba(o),b(e,r,o,c)}if(P(o))return v(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ea(o),c);if(o.$$typeof===x)return b(e,r,Ji(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=ai(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=b(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=$r(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Xr(e),Yr(e,null,n),t}return Kr(e,r,t,n),Xr(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Bl&f)===f:(r&f)===f){f!==0&&f===ia&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ma=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Jl|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=F.T,s={};F.T=s,As(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,ca(c,r),gu(e)):ks(e,t,r,gu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=xs(e).queue;vs(e,i,t,ee,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},gu())}function Cs(){return qi(ip)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(vu(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=qr(e,t,n,r),n!==null&&(vu(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,gu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,pr(s,o))return Kr(e,t,i,0),Rl===null&&Gr(),!1}catch{}if(n=qr(e,t,i,r),n!==null)return vu(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:hd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(a(479))}else t=qr(e,n,r,2),t!==null&&vu(t,e,2)}function js(e){var t=e.alternate;return e===ao||t!==null&&t===ao}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}var Ps={readContext:qi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:qi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){W(!0);try{e()}finally{W(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){W(!0);try{n(t)}finally{W(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ds.bind(null,ao,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,ao,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,ao,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ao,i=To();if(Ei){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Rl===null)throw Error(a(349));Bl&127||Io(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Rl.identifierPrefix;if(Ei){var n=vi,r=_i;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[Qe]=t,o[$e]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Bd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=B.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=wi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ld(e.nodeValue,n)),e||Ai(t,!0)}else e=Kd(e).createTextNode(r),e[Qe]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[Qe]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(a(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[Qe]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),i=!1}else i=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return se(),e===null&&Dd(t.stateNode.containerInfo),Pc(t),null;case 10:return Vi(t.type),Pc(t),null;case 19:if(z(no),r=t.memoizedState,r===null)return Pc(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null)if(i)Nc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ni(n,e),n=n.sibling;return ne(no,no.current&1|2),Ei&&yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&be()>iu&&(t.flags|=128,i=!0,Nc(r,!1),t.lanes=4194304)}else{if(!i)if(e=ro(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Pc(t),null}else 2*be()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,i=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=be(),e.sibling=null,n=no.current,ne(no,i?n&1|2:n&1),Ei&&yi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Pc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Ic(e,t){switch(Si(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return V(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(a(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(no),null;case 4:return se(),null;case 10:return Vi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&z(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Lc(e,t){switch(Si(t),t.tag){case 3:Vi($i),se();break;case 26:case 27:case 5:V(t);break;case 4:se();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:z(no);break;case 10:Vi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&z(ua);break;case 24:Vi($i)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ju(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ju(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ju(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Ju(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ju(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ju(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ju(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ju(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ju(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Vd(r,e.type,n,t),r[$e]=t}catch(t){Ju(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rf(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&rf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wt));else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Bd(t,r,n),t[Qe]=e,t[$e]=n}catch(t){Ju(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Wd=pp,e=vr(e),yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},pp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Bd(o,r,n),o[Qe]=e,dt(o),r=o;break a;case`link`:var s=qf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=gr(s,h),v=gr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,F.T=null,n=fu,fu=null;var o=cu,s=uu;if(su=0,lu=cu=null,uu=0,Ll&6)throw Error(a(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,cd(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{I.p=i,F.T=r,Wu(e,t)}}function qu(e,t,n){t=li(n,t),t=Js(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(He(e,2),sd(e))}function Ju(e,t,n){if(e.tag===3)qu(e,e,n);else for(;t!==null;){if(t.tag===3){qu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ou===null||!ou.has(r))){e=li(n,e),n=Ys(2),r=Ia(t,n,2),r!==null&&(Xs(n,r,t,e),He(r,2),sd(r));break}}t=t.return}}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Gl=!0,i.add(n),e=Xu.bind(null,e,t,n),t.then(e,e))}function Xu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Bl&n)===n&&(ql===4||ql===3&&(Bl&62914560)===Bl&&300>be()-nu?!(Ll&2)&&Tu(e,0):Xl|=n,Ql===Bl&&(Ql=0)),sd(e)}function Zu(e,t){t===0&&(t=Be()),e=Jr(e,t),e!==null&&(He(e,t),sd(e))}function Qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zu(e,n)}function $u(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Zu(e,n)}function ed(e,t){return ge(e,t)}var td=null,nd=null,rd=!1,id=!1,ad=!1,od=0;function sd(e){e!==nd&&e.next===null&&(nd===null?td=nd=e:nd=nd.next=e),id=!0,rd||(rd=!0,md())}function cd(e,t){if(!ad&&id){ad=!0;do for(var n=!1,r=td;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ae(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,pd(r,a))}else a=Bl,a=K(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Re(r,a)||(n=!0,pd(r,a));r=r.next}while(n);ad=!1}}function ld(){ud()}function ud(){id=rd=!1;var e=0;od!==0&&Zd()&&(e=od);for(var t=be(),n=null,r=td;r!==null;){var i=r.next,a=dd(r,t);a===0?(r.next=null,n===null?td=i:n.next=i,i===null&&(nd=n)):(n=r,(e!==0||a&3)&&(id=!0)),r=i}su!==0&&su!==5||cd(e,!1),od!==0&&(od=0)}function dd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Hd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Df(e,t,n){var r=Ef;if(r&&typeof t==`string`&&t){var i=kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xf.has(i)||(xf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Bd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Of(e){Cf.D(e),Df(`dns-prefetch`,e,null)}function kf(e,t){Cf.C(e,t),Df(`preconnect`,e,t)}function Af(e,t,n){Cf.L(e,t,n);var r=Ef;if(r&&e&&t){var i=`link[rel="preload"][as="`+kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+kt(n.imageSizes)+`"]`)):i+=`[href="`+kt(e)+`"]`;var a=i;switch(t){case`style`:a=If(e);break;case`script`:a=Bf(e)}bf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lf(a))||t===`script`&&r.querySelector(Vf(a))||(t=r.createElement(`link`),Bd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function jf(e,t){Cf.m(e,t);var n=Ef;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+kt(r)+`"][href="`+kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bf(e)}if(!bf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),bf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vf(a)))return}r=n.createElement(`link`),Bd(r,`link`,e),dt(r),n.head.appendChild(r)}}}function Mf(e,t,n){Cf.S(e,t,n);var r=Ef;if(r&&e){var i=ut(r).hoistableStyles,a=If(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bf.get(a))&&Wf(e,n);var c=o=r.createElement(`link`);dt(c),Bd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Uf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nf(e,t){Cf.X(e,t);var n=Ef;if(n&&e){var r=ut(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=p({src:e,async:!0},t),(t=bf.get(i))&&Gf(e,t),a=n.createElement(`script`),dt(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t){Cf.M(e,t);var n=Ef;if(n&&e){var r=ut(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=bf.get(i))&&Gf(e,t),a=n.createElement(`script`),dt(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t,n,r){var i=(i=B.current)?Sf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=If(n.href),n=ut(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=If(n.href);var o=ut(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Lf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),bf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bf.set(e,n),o||zf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Bf(n),n=ut(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function If(e){return`href="`+kt(e)+`"`}function Lf(e){return`link[rel="stylesheet"][`+e+`]`}function Rf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function zf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Bd(t,`link`,n),dt(t),e.head.appendChild(t))}function Bf(e){return`[src="`+kt(e)+`"]`}function Vf(e){return`script[async]`+e}function Hf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+kt(n.href)+`"]`);if(r)return t.instance=r,dt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),dt(r),Bd(r,`style`,i),Uf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=If(n.href);var o=e.querySelector(Lf(i));if(o)return t.state.loading|=4,t.instance=o,dt(o),o;r=Rf(n),(i=bf.get(i))&&Wf(r,i),o=(e.ownerDocument||e).createElement(`link`),dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Bd(o,`link`,r),t.state.loading|=4,Uf(o,n.precedence,e),t.instance=o;case`script`:return o=Bf(n.src),(i=e.querySelector(Vf(o)))?(t.instance=i,dt(i),i):(r=n,(i=bf.get(o))&&(r=p({},n),Gf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),dt(i),Bd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Uf(r,n.precedence,e));return t.instance}function Uf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Yf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=If(r.href),a=t.querySelector(Lf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ep.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,dt(a);return}a=t.ownerDocument||t,r=Rf(r),(i=bf.get(i))&&Wf(r,i),a=a.createElement(`link`),dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Bd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ep.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Qf=0;function $f(e,t){return e.stylesheets&&e.count===0&&np(e,e.stylesheets),0Qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ep(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)np(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tp=null;function np(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tp=new Map,t.forEach(rp,e),tp=null,ep.call(e))}function rp(e,t){if(!(t.state.loading&4)){var n=tp.get(e);if(n)var r=n.get(null);else{n=new Map,tp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Fe()})),Le=`button:not([disabled]), a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), [contenteditable]:not([contenteditable="false"]), audio[controls], video[controls], iframe, details > summary:first-child`,K=e(r(),1),Re=0;function ze(e){if(e.hasAttribute(`inert`)||e.closest(`[inert]`)||e.hidden||e.closest(`[hidden]`)||e.closest(`[aria-hidden="true"]`))return!1;if(typeof window<`u`&&window.getComputedStyle){let t=window.getComputedStyle(e);if(t.visibility===`hidden`||t.display===`none`)return!1}return!0}function Be(e){return Array.from(e.querySelectorAll(Le)).filter(ze)}function Ve(e){try{e.focus()}catch{}return document.activeElement===e}function He(e){let t=Be(e);for(let e of t)if(Ve(e))return!0;return!1}function Ue(e){let t=Be(e);for(let e=t.length-1;e>=0;e--)if(Ve(t[e]))return!0;return!1}function We(e){let{isActive:t,onEscape:n}=e,r=(0,K.useRef)(null),i=(0,K.useRef)(null),a=(0,K.useRef)(!1),o=t&&n!=null;j({isActive:o,onDismiss:()=>{n?.()},getContainer:()=>r.current}),(0,K.useEffect)(()=>{if(o)return Re+=1,()=>{--Re}},[o]);let s=(0,K.useCallback)(()=>{r.current&&He(r.current)},[]);return(0,K.useEffect)(()=>{if(!t)return;let e=document.activeElement,n=r.current;return()=>{let t=document.activeElement;(t==null||t===document.body||t===document.documentElement||n!=null&&n.contains(t))&&e!=null&&e.isConnected&&typeof e.focus==`function`&&e.focus()}},[t]),(0,K.useEffect)(()=>{if(!t)return;let e=e=>{let t=r.current;if(!t)return;let n=e.target;if(t.contains(n))i.current=n;else if(a.current){let e=He(t);e&&i.current===document.activeElement?Ue(t):!e&&i.current instanceof HTMLElement&&t.contains(i.current)&&Ve(i.current),i.current=document.activeElement}a.current=!1};return document.addEventListener(`focus`,e,!0),()=>{document.removeEventListener(`focus`,e,!0)}},[t]),(0,K.useEffect)(()=>{if(!t)return;let e=e=>{let t=r.current;if(t&&e.key===`Tab`){a.current=!0;let n=Be(t);if(n.length===0){let n=document.activeElement;if(!(n instanceof HTMLElement)||!t.contains(n))return;e.preventDefault(),i.current=n,a.current=!1;return}let r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),r.focus())}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,n]),{containerRef:r,focusFirst:s}}var Ge={primary:{kMwMTN:`x1tgivj0`,$$css:!0},secondary:{kMwMTN:`xv1l7n4`,$$css:!0},disabled:{kMwMTN:`xnbbluu`,$$css:!0},placeholder:{kMwMTN:`xv1l7n4`,$$css:!0},accent:{kMwMTN:`xjse4m1`,$$css:!0},inherit:{kMwMTN:`x1heor9g`,$$css:!0}},Ke={normal:{k63SB2:`x1sodnla`,$$css:!0},medium:{k63SB2:`x1e4wzip`,$$css:!0},semibold:{k63SB2:`x2mo6ok`,$$css:!0},bold:{k63SB2:`x1lvx875`,$$css:!0}},qe={body:{k63SB2:`xxovm9e`,$$css:!0},large:{k63SB2:`x149oux8`,$$css:!0},label:{k63SB2:`xmhvcl5`,$$css:!0},code:{k63SB2:`xx3eeay`,$$css:!0},supporting:{k63SB2:`xv8on6e`,$$css:!0},"display-1":{k63SB2:`x1txul5o`,$$css:!0},"display-2":{k63SB2:`x1y36c3f`,$$css:!0},"display-3":{k63SB2:`x1on40hk`,$$css:!0},inherit:{k63SB2:`x1pd3egz`,$$css:!0}},Je={body:{kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0},large:{kGuDYH:`x18juvz8`,kLWn49:`xf74fhv`,$$css:!0},label:{kGuDYH:`xcr08ib`,kLWn49:`x1kq96og`,$$css:!0},code:{kGuDYH:`xp03k98`,kLWn49:`x17iicif`,kMv6JI:`x9m5x89`,$$css:!0},supporting:{kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},"display-1":{kGuDYH:`xsub3ws`,kLWn49:`x112ttwr`,$$css:!0},"display-2":{kGuDYH:`x1yego12`,kLWn49:`xh0iwvy`,$$css:!0},"display-3":{kGuDYH:`xlgnzhf`,kLWn49:`x1ujwuaq`,$$css:!0},inherit:{kGuDYH:`x1qlqyl8`,kLWn49:`x15bjb6t`,$$css:!0}},Ye={"4xs":{kGuDYH:`xxc45ev`,$$css:!0},"3xs":{kGuDYH:`x10p7juq`,$$css:!0},"2xs":{kGuDYH:`x16a80zy`,$$css:!0},xsm:{kGuDYH:`x51wmvv`,$$css:!0},sm:{kGuDYH:`x1eqnyfr`,$$css:!0},base:{kGuDYH:`x1j29vfg`,$$css:!0},lg:{kGuDYH:`xc7cgfe`,$$css:!0},xl:{kGuDYH:`x1wqms48`,$$css:!0},"2xl":{kGuDYH:`xhs0kqb`,$$css:!0},"3xl":{kGuDYH:`x10srzze`,$$css:!0},"4xl":{kGuDYH:`xqcvi3d`,$$css:!0}},Xe={1:{kGuDYH:`xcg7oai`,kLWn49:`xfmsba7`,k63SB2:`x1v68xuy`,$$css:!0},2:{kGuDYH:`x1xvnhcw`,kLWn49:`x1cpk1wn`,k63SB2:`x12yy4cs`,$$css:!0},3:{kGuDYH:`xii13ha`,kLWn49:`xwjzt0u`,k63SB2:`x1jcxfy8`,$$css:!0},4:{kGuDYH:`x8tkxat`,kLWn49:`xqerer`,k63SB2:`x2hcmsi`,$$css:!0},5:{kGuDYH:`xsgqta0`,kLWn49:`xo3gurs`,k63SB2:`xno150v`,$$css:!0},6:{kGuDYH:`xw5ohdf`,kLWn49:`xeixjfn`,k63SB2:`x1pw4frv`,$$css:!0}},Ze={inline:{k1xSpc:`xt0psk2`,$$css:!0},block:{k1xSpc:`x1lliihq`,$$css:!0}},Qe={singleLine:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,k1xSpc:`x1lliihq`,$$css:!0},multiLine:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0}},$e={"break-word":{kTgw9:`x1lldw8n`,kHjlTd:`x1mzt3pk`,$$css:!0},"break-all":{kTgw9:`x1yn0g08`,$$css:!0}},et={wrap:{kN2L0X:`xk4td0m`,$$css:!0},nowrap:{kN2L0X:`xebhuq6`,$$css:!0},balance:{kN2L0X:`x1w2vvpw`,$$css:!0},pretty:{kN2L0X:`x1fzhlzt`,$$css:!0}},tt={enabled:{kxwWH2:`x1b2iylo`,kzeHkT:`xwgcxoh`,k1xSpc:`x1lliihq`,$$css:!0}},nt={strikethrough:{kybGjl:`xmqliwb`,$$css:!0}},rt={enabled:{kcqcaj:`xss6m8b`,$$css:!0}},it={start:{k9WMMc:`x1yc453h`,$$css:!0},center:{k9WMMc:`x2b8uid`,$$css:!0},end:{k9WMMc:`xp4054r`,$$css:!0}},at={content:{ks0D6T:`xw5ewwj`,kTgw9:`x13faqbe`,$$css:!0}},ot=null,st=new Map;function ct(){return typeof ResizeObserver>`u`?null:(ot||=new ResizeObserver(e=>{for(let t of e){let e=st.get(t.target);e&&e(t)}}),ot)}function lt(e,t){st.set(e,t),ct()?.observe(e),t({target:e})}function ut(e){st.delete(e),ot&&(ot.unobserve(e),st.size===0&&(ot.disconnect(),ot=null))}function dt(e){let{maxLines:t}=e,[n,r]=(0,K.useState)(!1),[i,a]=(0,K.useState)(``),o=(0,K.useRef)(null),s=(0,K.useCallback)(e=>{if(t===0){r(!1);return}if(a(e.textContent??``),t===1)r(e.scrollWidth>e.offsetWidth);else{let t=e.scrollHeight;try{let n=document.createRange();n.selectNodeContents(e),t=n.getBoundingClientRect().height,n.detach()}catch{}r(t>e.offsetHeight)}},[t]);return{ref:(0,K.useCallback)(e=>{o.current&&ut(o.current),o.current=e,e&&t>0?typeof ResizeObserver<`u`?lt(e,()=>{s(e)}):s(e):(r(!1),a(``))},[t,s]),isTruncated:n,fullText:i}}function ft(e){return e===`base`?``:e.split(`+`).map(e=>{let[t,n]=e.split(`:`);return n===void 0?`.${t}`:/^\d/.test(n)?`.${t}-${n}`:`.${n}`}).join(``)}function pt(...e){return t=>{for(let n of e)if(n?.(t),t.defaultPrevented)return}}function mt(e){return e!=null&&typeof e!=`boolean`&&e!==``}function ht(...e){let t=e.flatMap(e=>typeof e==`string`?e.trim().split(/\s+/):[]).filter(Boolean);if(t.length!==0)return Array.from(new Set(t)).join(` `)}function gt(e,t=[],n){return{ariaLabelledBy:n?ht(n.labelID,e):void 0,ariaDescribedBy:ht(n?.describedByIDs,...t)}}var _t={transparent:{r:0,g:0,b:0,a:0},black:{r:0,g:0,b:0,a:1},white:{r:255,g:255,b:255,a:1}},vt=(e,t,n)=>Math.max(t,Math.min(n,e));function yt(e){return e.split(``).map(e=>e+e).join(``)}function bt(e){if(typeof e!=`string`)return null;let t=e.trim().replace(/^#/,``),n=t.length===3||t.length===4?yt(t):t;return n.length!==6&&n.length!==8||!/^[0-9a-fA-F]+$/.test(n)?null:{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:n.length===8?parseInt(n.slice(6,8),16)/255:1}}function xt(e){let t=e.indexOf(`(`);if(t===-1||!e.trim().endsWith(`)`))return null;let n=e.slice(t+1,e.lastIndexOf(`)`)).replace(/\//g,` `).split(/[\s,]+/).map(e=>e.trim()).filter(Boolean);if(n.length<3)return null;let r=e=>vt(e.endsWith(`%`)?parseFloat(e)/100*255:parseFloat(e),0,255),i=r(n[0]),a=r(n[1]),o=r(n[2]);if([i,a,o].some(Number.isNaN))return null;let s=1;if(n.length>=4){let e=n[3];if(s=e.endsWith(`%`)?parseFloat(e)/100:parseFloat(e),Number.isNaN(s))return null;s=vt(s,0,1)}return{r:i,g:a,b:o,a:s}}function St(e){let t=e.trim(),n=_t[t.toLowerCase()];return n?{...n}:t.startsWith(`#`)?bt(t):/^rgba?\(/i.test(t)?xt(t):null}function Ct(e,t,n){let r=e=>vt(Math.round(e),0,255).toString(16).padStart(2,`0`).toUpperCase();return`#${r(e)}${r(t)}${r(n)}`}function wt({r:e,g:t,b:n,a:r}){if(r>=1)return Ct(e,t,n);let i=e=>vt(Math.round(e),0,255);return`rgba(${i(e)}, ${i(t)}, ${i(n)}, ${parseFloat(r.toFixed(4))})`}var Tt={kbCHJM:`x1nrll8i`,k3aq6I:`xsqj5wx`,$$css:!0},Et={mirror:{k3aq6I:`xgtlewx`,$$css:!0},centerInline:e=>[Tt,{"--x-transform":`translate(-50%, ${e})`==null?void 0:`translate(-50%, ${e})`}]},q=i(),Dt=(0,K.lazy)(async()=>Ee(()=>import(`./app-Tooltip.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2]))),Ot={body:`primary`,large:`primary`,label:`primary`,supporting:`secondary`,code:`primary`,"display-1":`primary`,"display-2":`primary`,"display-3":`primary`,inherit:`inherit`};function kt(e){return e in Je?e:`body`}function At(e){return e in Ge?e:`primary`}function jt({type:e=`body`,size:t,color:n,weight:r,display:i=`inline`,maxLines:a=0,hasTruncateTooltip:o=!0,wordBreak:s,textWrap:c,justify:l=`start`,hasCapsize:u=!1,hasStrikethrough:d=!1,hasTabularNumbers:f=!1,xstyle:p,className:m,style:h,as:g=`span`,children:_,ref:v,...y}){let b=n??Ot[e]??`primary`,x=kt(e),S=At(b),C=s??(a===1?`break-all`:`break-word`),T=a>0||u?`block`:i,E=dt({maxLines:a}),D=typeof o==`string`?o:`above`,k=a>0&&o!==!1&&E.isTruncated,A=(0,K.useRef)(null),j=we(v,E.ref,A),M=a>1?{WebkitLineClamp:a}:void 0;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g,{ref:j,...H(O(`text`,{type:e,size:t,color:b}),w(Ge[S],Je[x],t&&Ye[t],qe[x],r&&Ke[r],a===1?Qe.singleLine:a>1?Qe.multiLine:Ze[T],a>0&&$e[C],c&&et[c],l!==`start`&&it[l],u&&tt.enabled,d&&nt.strikethrough,f&&rt.enabled,p),m,{...h,...M}),...y,children:_}),k&&(0,q.jsx)(K.Suspense,{fallback:null,children:(0,q.jsx)(Dt,{anchorRef:A,content:(0,q.jsx)(`span`,{...w(at.content),children:E.fullText}),placement:D})})]})}jt.displayName=`Text`;var Mt=.375,Nt={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},Pt=[`--_spinner-ring-diameter`,`--_spinner-ring-stroke`],Ft=`--_spinner-box-size`;function It(){if(!(typeof CSS>`u`||typeof CSS.registerProperty!=`function`))for(let e of Pt)try{CSS.registerProperty({name:e,syntax:``,inherits:!0,initialValue:`0px`})}catch{}}It();var Lt=new Set,Rt=!1;function zt(){Rt=!1;let e=[];for(let t of Lt)e.push(...t.getAnimations());Lt.clear();for(let t of e)t.startTime=0}function Bt(e){if(e!=null&&typeof e.getAnimations==`function`)return Lt.add(e),Rt||(Rt=!0,requestAnimationFrame(zt)),()=>{Lt.delete(e)}}var Vt={wrapper:{k1xSpc:`x3nfvp2`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,$$css:!0},spinner:{k1xSpc:`xwz0xwf`,kgQiWS:`x1ku5rj1`,kVQacm:`xb3r6kr`,kXLuUW:`xxymvpz`,"--_spinner-ring-diameter":`x2lq4xu`,"--_spinner-ring-stroke":`x10qssua`,"--_spinner-box-size":`x69vvuq`,$$css:!0},circle:{kDwRjp:`xbh8q5q`,kU5bRw:`x1owpc8m`,kPFa82:`xio8zfp`,kfJifR:`xgw3ha0`,$$css:!0},track:{kjVXCG:`xalkhop`,$$css:!0}},Ht={sm:{"--spinner-diameter":`x11wm0hx`,"--spinner-stroke-width":`xls98ul`,$$css:!0},md:{"--spinner-diameter":`x15pu9g6`,"--spinner-stroke-width":`xr0wkrm`,$$css:!0},lg:{"--spinner-diameter":`x1w424tr`,"--spinner-stroke-width":`xr0wkrm`,$$css:!0},xl:{"--spinner-diameter":`x1orj1z9`,"--spinner-stroke-width":`x7y2bof`,$$css:!0}},Ut={default:{"--spinner-color":`xt1b8mc`,"--spinner-track-color":`xspt9s2`,$$css:!0},subtle:{"--spinner-color":`x1jevo6s`,"--spinner-track-color":`xspt9s2`,$$css:!0},onMedia:{"--spinner-color":`x13u6jys`,"--spinner-track-color":`x1ufpcf6`,$$css:!0},inherit:{"--spinner-color":`x1uzk0gl`,"--spinner-track-color":`xbfzqbu`,$$css:!0}},Wt={default:{kDd8S0:`x1g350g8`,$$css:!0},subtle:{kDd8S0:`x1g350g8`,$$css:!0},onMedia:{kDd8S0:`x1smxkh6`,$$css:!0},inherit:{kDd8S0:`x7bo2k`,$$css:!0}};function Gt({size:e=`md`,shade:t=`default`,label:n,xstyle:r,className:i,style:a,"aria-label":o,"data-testid":s,ref:c,...l}){let{border:u,diameter:d}=Nt[e],f=d+u*2,p=f/2,m=Math.PI*d,h=m*Mt,g=n!=null,_=(0,K.useId)(),v=g&&typeof n==`string`&&o==null,y=(0,q.jsx)(`span`,{ref:g?void 0:c,role:`status`,"aria-label":v?void 0:o??(typeof n==`string`?n:void 0)??`Loading`,"aria-labelledby":v?_:void 0,"data-testid":g?void 0:s,...g?{}:l,...H(g?``:O(`spinner`,{size:e,shade:t}),w(Vt.spinner,!g&&Ht[e],!g&&Ut[t],!g&&r),g?void 0:i,{...g?{}:a,width:`var(${Ft}, ${f}px)`,height:`var(${Ft}, ${f}px)`}),children:(0,q.jsxs)(`svg`,{ref:Bt,width:f,height:f,viewBox:`0 0 ${f} ${f}`,"aria-hidden":`true`,className:`xlp1x4z x1lliihq x1so62im x1rea2x4 x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782`,children:[(0,q.jsx)(`circle`,{cx:p,cy:p,r:d/2,strokeWidth:u,...w(Vt.circle,Vt.track,Wt[t])}),(0,q.jsx)(`circle`,{cx:p,cy:p,r:d/2,strokeWidth:u,strokeDasharray:`${h} ${m-h}`,transform:`rotate(-90 ${p} ${p})`,className:`xbh8q5q x1owpc8m xio8zfp xgw3ha0 xtve3lm x1vy8frr`})]})});return g?(0,q.jsxs)(`div`,{ref:c,"data-testid":s,...l,...H(O(`spinner`,{size:e,shade:t}),w(Vt.wrapper,Ht[e],Ut[t],r),i,a),children:[y,typeof n==`string`?(0,q.jsx)(jt,{id:_,type:`body`,weight:`bold`,children:n}):n]}):y}Gt.displayName=`Spinner`;function Kt({children:e,as:t=`span`,ref:n,...r}){return(0,K.createElement)(t,{ref:n,...r,className:`x10l6tqk x1i1rx1s xjm9jq1 xkdpibf x1717udv xb3r6kr xzpqnlu xuxw1ft xng3xce x13vifvy x1o0tod x47corl x87ps6o`},e)}Kt.displayName=`VisuallyHidden`;var qt=`data-astryx-edge-comp`,Jt={keTefX:`x1kftj4p`,k71WvV:`x92e2el`,$$css:!0},Yt={inset:e=>[Jt,{"--x-126w13d":(e=>typeof e==`number`?e+`px`:e??void 0)(`calc(-1 * ${e})`),"--x-4drmnv":(e=>typeof e==`number`?e+`px`:e??void 0)(`calc(-1 * ${e})`)}]},Xt=(0,K.createContext)(null);Xt.displayName=`SizeContext`;function Zt(e,t=`md`){let n=(0,K.use)(Xt);return e??n??t}Xt.Provider;var Qt=(0,K.createContext)(null);Qt.displayName=`ButtonGroupContext`;function $t(){return(0,K.use)(Qt)}var en=(0,K.createContext)(null);en.displayName=`LinkContext`;function tn(e){function t({href:t,ref:n,...r}){return(0,K.createElement)(e,{ref:n,href:t,to:t,...r})}return t.displayName=`LinkWithTo(${typeof e==`string`?e:e.displayName||e.name||`Component`})`,t}function nn(e){let t=(0,K.use)(en),n=e??t?.component??`a`;return(0,K.useMemo)(()=>n===`a`?`a`:tn(n),[n])}`${c[`--color-overlay-hover`]}${c[`--color-overlay-hover`]}`,`${c[`--color-overlay-pressed`]}${c[`--color-overlay-pressed`]}`,`${c[`--color-neutral`]}${c[`--color-neutral`]}`;var rn={backgroundColor:{kWkggS:`xjbqb8w x1anq1lc xoevpu5 xprvw0a`,$$css:!0},backgroundImage:{kKwaWg:`x7uyq82 xmvprkv xetgvay`,$$css:!0},backgroundImageOnNeutral:{kKwaWg:`x14bno8m xzmimnh x1otsd3y xo3fi6e`,$$css:!0}};function an(e,t){let n=t&&t.cache?t.cache:hn,r=t&&t.serializer?t.serializer:pn;return(t&&t.strategy?t.strategy:un)(e,{cache:n,serializer:r})}function on(e){return e==null||typeof e==`number`||typeof e==`boolean`}function sn(e,t,n,r){let i=on(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function cn(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function ln(e,t,n,r,i){return n.bind(t,e,r,i)}function un(e,t){let n=e.length===1?sn:cn;return ln(e,this,n,t.cache.create(),t.serializer)}function dn(e,t){return ln(e,this,cn,t.cache.create(),t.serializer)}function fn(e,t){return ln(e,this,sn,t.cache.create(),t.serializer)}var pn=function(){return JSON.stringify(arguments)},mn=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},hn={create:function(){return new mn}},gn={variadic:dn,monadic:fn},_n=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function vn(e){let t={};return e.replace(_n,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var yn=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function bn(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(yn).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function xn(e){return e.replace(/^(.*?)-/,``)}var Sn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Cn=/^(@+)?(\+|#+)?[rs]?$/g,wn=/(\*)(0+)|(#+)(0+)|(0+)/g,Tn=/^(0+)$/;function En(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(Cn,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function Dn(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function On(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!Tn.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function kn(e){return Dn(e)||{}}function An(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=xn(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...kn(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...kn(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(wn,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(Tn.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(Sn.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(Sn,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...En(e)});continue}if(Cn.test(n.stem)){t={...t,...En(n.stem)};continue}let e=Dn(n.stem);e&&(t={...t,...e});let r=On(n.stem);r&&(t={...t,...r})}return t}var jn=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function Mn(e){return e.type===0}function Nn(e){return e.type===1}function Pn(e){return e.type===2}function Fn(e){return e.type===3}function In(e){return e.type===4}function Ln(e){return e.type===5}function Rn(e){return e.type===6}function zn(e){return e.type===7}function Bn(e){return e.type===8}function Vn(e){return!!(e&&typeof e==`object`&&e.type===0)}function Hn(e){return!!(e&&typeof e==`object`&&e.type===1)}var Un=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Wn={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function Gn(e,t){let n=``;for(let r=0;r>1),c=Kn(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function Kn(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(Wn[r||``]||Wn[n||``]||Wn[`${n}-001`]||Wn[`001`])[0]}var qn=RegExp(`^${Un.source}*`),Jn=RegExp(`${Un.source}*$`);function Yn(e,t){return{start:e,end:t}}var Xn=!!Object.fromEntries,Zn=!!String.prototype.trimStart,Qn=!!String.prototype.trimEnd,$n=Xn?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},er=Zn?function(e){return e.trimStart()}:function(e){return e.replace(qn,``)},tr=Qn?function(e){return e.trimEnd()}:function(e){return e.replace(Jn,``)},nr=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function rr(e,t){return nr.lastIndex=t,nr.exec(e)[1]??``}function ir(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r=55296&&i<=56319&&r+1=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var ar=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=ir(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:Yn(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:Yn(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,Yn(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&or(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:Yn(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(``)?{val:{type:8,value:r,children:a,location:Yn(n,this.clonePosition())},err:null}:this.error(23,Yn(o,this.clonePosition()))):this.error(26,Yn(e,this.clonePosition()))}return this.error(27,Yn(n,this.clonePosition()))}return this.error(23,Yn(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&cr(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}let i=Yn(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!sr(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,Yn(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,Yn(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,Yn(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,Yn(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:Yn(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,Yn(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,Yn(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=rr(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Yn(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,Yn(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=tr(n.val);if(r.length===0)return this.error(6,Yn(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:Yn(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=Yn(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=er(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=Gn(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?vn(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,Yn(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,Yn(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=Yn(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:$n(c.val),location:u},err:null}:{val:{type:6,value:n,options:$n(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,Yn(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,Yn(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,Yn(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=bn(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?An(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=Yn(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,Yn(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:Yn(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,Yn(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,Yn(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=Yn(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&lr(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function or(e){return e>=97&&e<=122||e>=65&&e<=90}function sr(e){return or(e)||e===47}function cr(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function lr(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ur(e){e.forEach(e=>{if(delete e.location,Ln(e)||Rn(e))for(let t in e.options)delete e.options[t].location,ur(e.options[t].value);else Pn(e)&&Vn(e.style)||(Fn(e)||In(e))&&Hn(e.style)?delete e.style.location:Bn(e)&&ur(e.children)})}function dr(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new ar(e,t).parse();if(n.err){let e=SyntaxError(jn[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||ur(n.val),n.val}var fr=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},pr=class extends fr{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},mr=class extends fr{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},hr=class extends fr{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function gr(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function _r(e){return typeof e==`function`}function vr(e,t,n,r,i,a,o){if(e.length===1&&Mn(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(Mn(c)){s.push({type:0,value:c.value});continue}if(zn(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new hr(e,o);let l=i[e];if(Nn(c)){(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});continue}if(Fn(c)){let e=typeof c.style==`string`?r.date[c.style]:Hn(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(In(c)){let e=typeof c.style==`string`?r.time[c.style]:Hn(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(Pn(c)){let e=typeof c.style==`string`?r.number[c.style]:Vn(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)});continue}if(Bn(c)){let{children:e,value:l}=c,u=i[l];if(!_r(u))throw new mr(l,`function`,o);let d=u(vr(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(Ln(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new pr(c.value,l,Object.keys(c.options),o);s.push(...vr(a.value,t,n,r,i));continue}if(Rn(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new fr(`Intl.PluralRules is not available in this environment. Try polyfilling it using "@formatjs/intl-pluralrules" -`,`MISSING_INTL_API`,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new pr(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...vr(a.value,t,n,r,i,u-(c.offset||0)));continue}}return gr(s)}function yr(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function br(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=yr(e[r],t[r]),n),{...e}):e}function xr(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function Sr(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:an((...e)=>new Intl.NumberFormat(...e),{cache:xr(e.number),strategy:gn.variadic}),getDateTimeFormat:an((...e)=>new Intl.DateTimeFormat(...e),{cache:xr(e.dateTime),strategy:gn.variadic}),getPluralRules:an((...e)=>new Intl.PluralRules(...e),{cache:xr(e.pluralRules),strategy:gn.variadic})}}var Cr=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==0||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n},this.formatToParts=e=>vr(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=br(e.formats,r),this.formatters=i&&i.formatters||Sr(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return e.memoizedDefaultLocale||=new Intl.NumberFormat().resolvedOptions().locale,e.memoizedDefaultLocale}static{this.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])}}static{this.__parse=dr}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}}}},wr={"@astryx.pagination.label":{defaultMessage:`Pagination`,description:`Aria label for the pagination navigation region.`},"@astryx.pagination.previous":{defaultMessage:`Go to previous page`,description:`Aria label for the previous-page button.`},"@astryx.pagination.next":{defaultMessage:`Go to next page`,description:`Aria label for the next-page button.`},"@astryx.pagination.previousBy":{defaultMessage:`Go back {step, number} {step, plural, one {page} other {pages}}`,description:"Aria label for the previous button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.nextBy":{defaultMessage:`Go forward {step, number} {step, plural, one {page} other {pages}}`,description:"Aria label for the next button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.first":{defaultMessage:`Go to first page`,description:`Aria label for the first-page button (« double chevron) in the input pagination variant.`},"@astryx.pagination.last":{defaultMessage:`Go to last page`,description:`Aria label for the last-page button (» double chevron) in the input pagination variant.`},"@astryx.pagination.goToPage":{defaultMessage:`Go to page {page, number}`,description:"Aria label for an individual page-number button. `page` is 1-based."},"@astryx.pagination.goToPageInput":{defaultMessage:`Go to page`,description:`Aria label for the editable page/row number box in the input pagination variant. No number — the box holds the value itself.`},"@astryx.pagination.pageLabel":{defaultMessage:`Page`,description:`Visible label before the editable box in the input pagination variant. Example: "Page [ 1 ] / 10".`},"@astryx.pagination.ofTotalPages":{defaultMessage:`/ {total, number}`,description:`Visible total shown after the editable box in the input pagination variant. Example: the "/ 10" in "Page [ 1 ] / 10".`},"@astryx.pagination.pageIndicators":{defaultMessage:`Page indicators`,description:`Aria label for the dots-variant page-indicator group.`},"@astryx.pagination.itemsPerPage":{defaultMessage:`Items per page`,description:`Label for the page-size selector.`},"@astryx.pagination.count":{defaultMessage:`{from, number}–{to, number} of {total, number}`,description:`Visible range-of-total text on a pagination bar. Example: "1–20 of 347"; the en-dash is translator's choice.`},"@astryx.pagination.pageOfTotal":{defaultMessage:`Page {current, number} of {total, number}`,description:`Visible "Page X of Y" text on the compact pagination variant; also announced by screen readers. Keep short — sits in a compact toolbar.`},"@astryx.pagination.pageAnnounce":{defaultMessage:`Page {current, number}`,description:`Screen-reader announcement when a page changes and total is unknown.`},"@astryx.powersearch.editor.field":{defaultMessage:`Field`,description:`Noun form-label above the field-picker dropdown in the PowerSearch filter-builder popover (which data column to filter on). Not an action.`},"@astryx.powersearch.editor.operator":{defaultMessage:`Operator`,description:`Noun form-label above the operator dropdown in the PowerSearch filter-builder popover. Refers to a comparison verb ("is", "contains"), not a math or phone operator.`},"@astryx.powersearch.editor.addFilter":{defaultMessage:`+ Add filter`,description:`Button label inside a group in the PowerSearch filter-builder; adds another filter row (e.g. "Status = Active"). The leading "+ " is a plus-sign character.`},"@astryx.powersearch.editor.removeFilter":{defaultMessage:`Remove filter`,description:`Screen-reader-only label on the "×" icon button next to a filter row in the PowerSearch editor; removes that row. Imperative verb.`},"@astryx.powersearch.editor.groupOperator":{defaultMessage:`Group operator`,description:`Screen-reader-only label for the AND/OR toggle that combines sibling filters inside a filter group. Sighted users see just "AND" or "OR".`},"@astryx.powersearch.editor.group":{defaultMessage:`Group`,description:`Fallback noun label shown on a nested filter-group chip when no AND/OR combining operator has been chosen. Use the noun ("a cluster"), not the verb "to group".`},"@astryx.powersearch.editor.delete":{defaultMessage:`Delete`,description:`Button label inside the PowerSearch filter-editor popover; deletes the currently-edited filter row. Imperative verb form.`},"@astryx.powersearch.editor.cancel":{defaultMessage:`Cancel`,description:`Button label inside the PowerSearch filter-editor popover; closes the popover and discards pending edits. Imperative verb form.`},"@astryx.powersearch.editor.apply":{defaultMessage:`Apply`,description:`Primary button label inside the PowerSearch filter-editor popover; confirms the edited filter. Imperative verb; consumers may override to "Save".`},"@astryx.powersearch.valueEditor.value":{defaultMessage:`Value`,description:'Noun form-label above a single free-text/number input in the PowerSearch value editor (e.g. the "acme" in `Name contains acme`). Not a verb or "worth".'},"@astryx.powersearch.valueEditor.values":{defaultMessage:`Values`,description:"Plural noun form-label above a multi-value chip input in the PowerSearch value editor. Should match its singular counterpart `Value` in your language."},"@astryx.powersearch.valueEditor.time":{defaultMessage:`Time`,description:`Noun form-label above a time-of-day (HH:MM) picker in the PowerSearch value editor. Clock time, not duration or era.`},"@astryx.powersearch.valueEditor.date":{defaultMessage:`Date`,description:`Noun form-label above a calendar-date picker in the PowerSearch value editor. Calendar date, not romantic date or fruit.`},"@astryx.powersearch.valueEditor.relativeDate":{defaultMessage:`Relative date`,description:`Label for the relative-date selector (e.g. "Last 7 days") in the PowerSearch value editor.`},"@astryx.powersearch.valueEditor.startDate":{defaultMessage:`Start date`,description:"Noun form-label above the start-of-range date picker in the PowerSearch value editor. Pairs with `End date` — keep the two parallel in your language."},"@astryx.powersearch.valueEditor.endDate":{defaultMessage:`End date`,description:"Noun form-label above the end-of-range date picker in the PowerSearch value editor. Pairs with `Start date` — keep the two parallel."},"@astryx.powersearch.valueEditor.entities":{defaultMessage:`Entities`,description:`"Entities" is jargon — plural noun form-label above an entity picker (people, teams, projects). Prefer a natural collective like "items" if your language has no equivalent.`},"@astryx.powersearch.valueEditor.searchPlaceholder":{defaultMessage:`Search…`,description:"Placeholder inside the search input in the PowerSearch entity/typeahead picker. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterValuePlaceholder":{defaultMessage:`Enter value…`,description:"Placeholder inside a free-text single-value input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.addValuesPlaceholder":{defaultMessage:`Add values…`,description:"Placeholder inside a multi-value chip input where the user types items and presses Enter to add each as a chip. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterNumberPlaceholder":{defaultMessage:`Enter number…`,description:"Placeholder inside a numeric input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.selectValuesPlaceholder":{defaultMessage:`Select values…`,description:`Placeholder on a dropdown for choosing values from a fixed enum list in the PowerSearch value editor. Imperative verb (user selects, not types).`},"@astryx.powersearch.operator.contains":{defaultMessage:`contains`,description:"PowerSearch string operator, rendered inline as ` contains ` (e.g. `Name contains acme`). Lowercase verb form."},"@astryx.powersearch.operator.notContains":{defaultMessage:`does not contain`,description:"PowerSearch negated string operator. Example: `Name does not contain test`. Lowercase; pairs with `contains`."},"@astryx.powersearch.operator.startsWith":{defaultMessage:`starts with`,description:"PowerSearch string prefix operator. Example: `Email starts with admin@`. Lowercase."},"@astryx.powersearch.operator.notStartsWith":{defaultMessage:`does not start with`,description:"PowerSearch negated prefix operator. Example: `Email does not start with test`. Lowercase; pairs with `starts with`."},"@astryx.powersearch.operator.endsWith":{defaultMessage:`ends with`,description:"PowerSearch string suffix operator. Example: `Email ends with @meta.com`. Lowercase."},"@astryx.powersearch.operator.notEndsWith":{defaultMessage:`does not end with`,description:"PowerSearch negated suffix operator. Example: `Email does not end with @gmail.com`. Lowercase; pairs with `ends with`."},"@astryx.powersearch.operator.is":{defaultMessage:`is`,description:"PowerSearch equality operator for strings/enums. Example: `Status is Active`. Separate from `operator.equals` (numbers) — translations may diverge."},"@astryx.powersearch.operator.isNot":{defaultMessage:`is not`,description:"PowerSearch inequality operator for strings/enums. Example: `Status is not Draft`. Pairs with `is`; separate from `operator.notEquals`."},"@astryx.powersearch.operator.equals":{defaultMessage:`is`,description:'PowerSearch numeric equality operator. Example: `Age is 30`. Ships same English "is" as `operator.is` but is separate so numbers may diverge (e.g. "equals").'},"@astryx.powersearch.operator.notEquals":{defaultMessage:`is not`,description:"PowerSearch numeric inequality operator. Example: `Count is not 0`. Same divergence option as `operator.equals`."},"@astryx.powersearch.operator.greaterThan":{defaultMessage:`is greater than`,description:"PowerSearch numeric operator, strictly greater than. Example: `Age is greater than 18`. Lowercase."},"@astryx.powersearch.operator.lessThan":{defaultMessage:`is less than`,description:"PowerSearch numeric operator, strictly less than. Example: `Priority is less than 5`. Lowercase."},"@astryx.powersearch.operator.greaterThanOrEqual":{defaultMessage:`is greater than or equal to`,description:'PowerSearch numeric operator, ≥. Example: `Age is greater than or equal to 21`. A shorter form (e.g. "≥") is fine if idiomatic.'},"@astryx.powersearch.operator.lessThanOrEqual":{defaultMessage:`is less than or equal to`,description:"PowerSearch numeric operator, ≤. Example: `Priority is less than or equal to 3`. A shorter form is fine if idiomatic."},"@astryx.powersearch.operator.before":{defaultMessage:`is before`,description:"PowerSearch date operator, strictly earlier. Example: `Created is before 2024-01-01`. Temporal, not spatial."},"@astryx.powersearch.operator.after":{defaultMessage:`is after`,description:"PowerSearch date operator, strictly later. Example: `Updated is after 2024-06-01`. Temporal."},"@astryx.powersearch.operator.between":{defaultMessage:`is between`,description:"PowerSearch date operator, inclusive range. Example: `Created is between 2024-01-01 and 2024-06-30`. The `and ` portion is composed separately."},"@astryx.powersearch.operator.isTrue":{defaultMessage:`is true`,description:"PowerSearch boolean operator: matches truthy. Example: `Is admin is true`. Pairs with `is false`; field may be affirmative or a yes/no question."},"@astryx.powersearch.operator.isFalse":{defaultMessage:`is false`,description:"PowerSearch boolean operator: matches falsy. Example: `Is admin is false`. Pairs with `is true`."},"@astryx.powersearch.operator.isAnyOf":{defaultMessage:`is any of`,description:"PowerSearch list operator: value is in the set. Example: `Status is any of [Active, Paused, Draft]`. The value list is composed separately; pairs with `is none of`."},"@astryx.powersearch.operator.isNoneOf":{defaultMessage:`is none of`,description:"PowerSearch negated list operator: value not in the set. Example: `Status is none of [Archived, Deleted]`. Pairs with `is any of`."},"@astryx.powersearch.valueEditor.itemsCount":{defaultMessage:`{count, number} {count, plural, one {item} other {items}}`,description:"Overflow summary on a compact filter chip when the list of selected items is too long. Example: `3 items` or `1 item`."},"@astryx.powersearch.valueEditor.entitiesCount":{defaultMessage:`{count, number} {count, plural, one {entity} other {entities}}`,description:"Overflow summary on a compact filter chip when the list of selected entities is too long. Example: `5 entities` or `1 entity`. Pair with `itemsCount` translation."},"@astryx.powersearch.valueEditor.dateRange":{defaultMessage:`date range`,description:"Fallback lowercase noun rendered inline in a filter chip when a date-range value can't be formatted (e.g. `Created is between date range`). Keep lowercase."},"@astryx.powersearch.valueEditor.filtersCount":{defaultMessage:`{count, number} {count, plural, one {filter} other {filters}}`,description:"Summary inside a filter chip when the value is a nested set of filters. Example: `3 filters` or `1 filter`."},"@astryx.powersearch.resultCount":{defaultMessage:`{count, number} {count, plural, one {result} other {results}}`,description:"Live result-count text next to the PowerSearch input, announced to screen readers on change. Example: `12 results`, `1 result`; keep compact."},"@astryx.alertDialog.cancel":{defaultMessage:`Cancel`,description:`Button label on the secondary/dismiss button of an AlertDialog (modal confirmation). Imperative verb; consumers usually override with task-specific text.`},"@astryx.appShell.mobileNavigation":{defaultMessage:`Mobile navigation`,description:`Screen-reader-only accessible name for the mobile-only navigation region on small viewports. "Mobile" = phone/tablet (small screen), not "movable".`},"@astryx.appShell.skipToContent":{defaultMessage:`Skip to content`,description:`Text of the skip link — the first focusable element on the page, visible only while keyboard-focused. Activating it jumps focus past the navigation to the main content area. Imperative verb; keep short.`},"@astryx.avatar.nameWithStatus":{defaultMessage:`{name}, {status}`,description:`Screen-reader accessible name for an Avatar showing a status indicator; composes the person's name with the status label, e.g. "Jane Doe, Online". {name} = the avatar's name/alt text, {status} = the status dot's label. Adjust separator and order per locale.`},"@astryx.avatarGroup.label":{defaultMessage:`Avatars`,description:`Screen-reader-only fallback name for a horizontal cluster of user avatar images. Plural noun; consumers usually override with "Team members", "Attendees", etc.`},"@astryx.avatarGroup.keyboardHint":{defaultMessage:`Use arrow keys to move between avatars`,description:`Screen-reader-only instruction attached (via aria-describedby) to a group of interactive avatars that share a single Tab stop. Tells keyboard users the Left/Right arrow keys move focus between the avatars. Only announced when the group has interactive (link/button) avatars.`},"@astryx.avatarGroup.overflow":{defaultMessage:`{count, number} more`,description:'Accessible name for the "+N" overflow indicator at the end of an AvatarGroup — announces how many additional avatars are not shown. Example: `5 more`. The visible "+N" text is unaffected; this is the aria-label only.'},"@astryx.banner.dismiss":{defaultMessage:`Dismiss`,description:`"Dismiss" = close/hide this notification (not "reject a person"). Tooltip on the small X button on a Banner, and its aria label when the banner's title is not plain text.`},"@astryx.banner.dismissTitled":{defaultMessage:`{dismiss} {title}`,description:"Aria label on the small X button on a Banner, naming which banner it closes so stacked banners are distinguishable. `{dismiss}` is the already-translated tooltip text from `banner.dismiss`; keep it verbatim in the message so visible and accessible labels match. `{title}` is the banner's own title text — example: `Dismiss Upload failed`. Reorder the placeholders freely."},"@astryx.calendar.previousMonth":{defaultMessage:`Previous month`,description:"Screen-reader-only label on the left-arrow button in a Calendar's month header (navigates one month back). Pairs with `calendar.nextMonth`."},"@astryx.calendar.nextMonth":{defaultMessage:`Next month`,description:"Screen-reader-only label on the right-arrow button in a Calendar's month header (navigates one month forward). Pairs with `calendar.previousMonth`."},"@astryx.calendar.daySelected":{defaultMessage:`{date}, selected`,description:'Accessible name for the Calendar day button that is the current single-mode selection. `{date}` is the localized full date, e.g. "Thursday, January 15, 2026". The trailing state word tells screen-reader users the focused day is selected.'},"@astryx.calendar.dayRangeStart":{defaultMessage:`{date}, range start`,description:"Accessible name for the Calendar day button that begins the selected date range (or the first pick of an in-progress range). `{date}` is the localized full date."},"@astryx.calendar.dayRangeEnd":{defaultMessage:`{date}, range end`,description:"Accessible name for the Calendar day button that ends the selected date range. `{date}` is the localized full date. Pairs with `calendar.dayRangeStart`."},"@astryx.calendar.dayRangeStartAndEnd":{defaultMessage:`{date}, range start and range end`,description:"Accessible name for a Calendar day button that both begins and ends a completed one-day range. `{date}` is the localized full date."},"@astryx.calendar.dayInRange":{defaultMessage:`{date}, in range`,description:"Accessible name for a Calendar day button strictly inside the selected date range (not an endpoint). `{date}` is the localized full date."},"@astryx.calendar.rangeStartAnnounce":{defaultMessage:`Start date {date}. Select an end date.`,description:"Screen-reader announcement after the first pick of a Calendar range selection. `{date}` is the localized full date. Prompts the user that a second pick completes the range."},"@astryx.calendar.rangeCompleteAnnounce":{defaultMessage:`Selected range: {start} to {end}.`,description:"Screen-reader announcement after the second pick completes a Calendar range selection. `{start}` and `{end}` are localized full dates in chronological order."},"@astryx.calendar.rangeClearedAnnounce":{defaultMessage:`Cleared start date {date}. Select a start date.`,description:"Screen-reader announcement when the user clicks the in-progress range start again, which clears it instead of completing a zero-length range. `{date}` is the localized full date."},"@astryx.carousel.label":{defaultMessage:`Carousel`,description:`Screen-reader-only fallback name for a horizontally-scrolling row of items. If "carousel" is unfamiliar in your locale, prefer the standard term (e.g. "slider").`},"@astryx.carousel.scrollLeft":{defaultMessage:`Scroll left`,description:"Screen-reader-only label on the left arrow button in a Carousel. Pairs with `carousel.scrollRight`; in RTL locales, coordinate the two so left/right match layout."},"@astryx.carousel.scrollRight":{defaultMessage:`Scroll right`,description:"Screen-reader-only label on the right arrow button in a Carousel. Pairs with `carousel.scrollLeft`; same RTL note."},"@astryx.carousel.slideLabel":{defaultMessage:`Slide {current, number} of {total, number}`,description:"Screen-reader accessible name for one slide in a Carousel, giving its position. `current` is the 1-based slide number; `total` is the slide count."},"@astryx.chat.status.sending":{defaultMessage:`Sending`,description:`Chat send-status caption under an outgoing message while it is being transmitted. Part of the set sending → sent → delivered → read (or failed) — keep tense/aspect consistent.`},"@astryx.chat.status.sent":{defaultMessage:`Sent`,description:`Chat send-status caption shown once the message reaches the server. Part of the set sending → **sent** → delivered → read (or failed) — keep tense consistent.`},"@astryx.chat.status.delivered":{defaultMessage:`Delivered`,description:`Chat send-status caption shown once the recipient's device received the message. Part of the set sending → sent → **delivered** → read (or failed).`},"@astryx.chat.status.read":{defaultMessage:`Read`,description:`Chat send-status caption shown once the recipient opened the message. English past-participle ("has been read", /rɛd/), not the present verb — part of the set sending → sent → delivered → **read**.`},"@astryx.chat.status.failed":{defaultMessage:`Failed`,description:`Chat send-status caption shown when the send attempt errored. Part of the set — the terminal failure branch, orthogonal to the sent → delivered → read success track.`},"@astryx.chat.messageAriaLabel":{defaultMessage:`Message {status}`,description:"Screen-reader-only accessible name for a chat message row. `{status}` interpolates the localized status word (e.g. `Message sent`, `Message delivered`) — reorder if needed."},"@astryx.chat.pastedText.expand":{defaultMessage:`Expand`,description:`Button label on a chip in the chat composer representing a long pasted text block; clicking reveals full content. "Expand" here means reveal more, not grow physically.`},"@astryx.checkboxList.item.checkbox":{defaultMessage:`Checkbox`,description:`Screen-reader-only last-ditch fallback name for a checkbox inside a list item when no label is provided. Should almost never render — consumers should supply a real label.`},"@astryx.commandPalette.emptySearch":{defaultMessage:`No results`,description:`Fallback empty-state text inside a CommandPalette when the user's query has no matches. Very short (2 words); neutral tone.`},"@astryx.commandPalette.emptyBootstrap":{defaultMessage:`Type to search`,description:`Onboarding empty-state text shown inside a CommandPalette on first open, before the user has typed anything. Imperative sentence fragment.`},"@astryx.commandPalette.resultCount":{defaultMessage:`{count, number} {count, plural, one {result} other {results}}`,description:"Screen-reader-only announcement of how many commands match the CommandPalette query as the user types. Example: `12 results`, `1 result`; keep compact."},"@astryx.commandPalette.noResultsFor":{defaultMessage:`No results for {query}`,description:"Screen-reader-only announcement when a CommandPalette query matches nothing. `{query}` is the user's verbatim search text; keep it last if your language allows so truncation-by-AT still conveys the outcome."},"@astryx.commandPalette.loading":{defaultMessage:`Loading`,description:`Screen-reader-only announcement that a CommandPalette search has started and results are being fetched. Present-progressive form; matches the visible spinner.`},"@astryx.dateRangeInput.presetDateRanges":{defaultMessage:`Preset date ranges`,description:`Screen-reader-only accessible name for the sidebar of quick-pick preset ranges inside a DateRangeInput popover (e.g. "Last 7 days", "This month").`},"@astryx.dateTimeInput.timePlaceholder":{defaultMessage:`Select a time`,description:`Grey placeholder inside the empty time-of-day slot in a DateTimeInput. "Time" = clock time (HH:MM), not duration.`},"@astryx.dialog.close":{defaultMessage:`Close`,description:`"Close" = shut/dismiss the dialog, not "nearby" (English homograph). Aria label AND tooltip on the X at the top-right of a Dialog.`},"@astryx.dropdownMenu.label":{defaultMessage:`Menu`,description:`Screen-reader-only fallback name for a dropdown menu popover. Very generic; consumers usually override. Noun ("a menu"), not the imperative.`},"@astryx.lightbox.close":{defaultMessage:`Close`,description:`"Close" = shut/dismiss (not "nearby"). Screen-reader-only label on the X button that dismisses a Lightbox.`},"@astryx.lightbox.previous":{defaultMessage:`Previous`,description:"Screen-reader-only label on the left-arrow button in a Lightbox (navigates to previous media item). Pairs with `lightbox.next`."},"@astryx.lightbox.next":{defaultMessage:`Next`,description:"Screen-reader-only label on the right-arrow button in a Lightbox (navigates to next media item). Pairs with `lightbox.previous`."},"@astryx.listInput.emptyTitle":{defaultMessage:`No {itemName}s yet`,description:'EmptyState title shown inside a lab ListInput when its collection has no records. `{itemName}` is the consumer\'s singular noun for one record (e.g. "guest"); the source appends a literal "s" to pluralize it, which only works for regular English plurals. If your language cannot pluralize an interpolated noun this way, rephrase around `{itemName}` instead (e.g. "No {itemName} added yet").'},"@astryx.listInput.emptyDescription":{defaultMessage:`Add a {itemName} to get started.`,description:'EmptyState supporting text shown inside a lab ListInput when its collection has no records. `{itemName}` is the consumer\'s singular noun for one record (e.g. "guest").'},"@astryx.listInput.addItem":{defaultMessage:`Add {itemName}`,description:'Accessible label on the button that appends a new record to a lab ListInput. `{itemName}` is the consumer\'s singular noun for one record (e.g. "guest").'},"@astryx.listInput.removeItem":{defaultMessage:`Remove {itemName} {position, number}`,description:'Accessible label and tooltip on the button that deletes one record from a lab ListInput. `{itemName}` is the consumer\'s singular noun for one record; `{position}` is its 1-based row number (e.g. "Remove guest 2").'},"@astryx.listInput.removeUnavailable":{defaultMessage:`Remove is unavailable while the list is disabled`,description:`Tooltip shown on the Remove button when the ListInput is disabled or loading, explaining why the action cannot be performed.`},"@astryx.listInput.reorderItem":{defaultMessage:`Reorder {itemName} {position, number}`,description:'Accessible label on the drag-handle button that reorders one record in a lab ListInput. `{itemName}` is the consumer\'s singular noun for one record; `{position}` is its 1-based row number (e.g. "Reorder guest 2").'},"@astryx.listInput.fieldLabelWithPosition":{defaultMessage:`{header}, {itemName} {position, number} of {total, number}`,description:'Accessible name for a field inside a lab ListInput row after the first row, disambiguating repeated column labels. `{header}` is the column\'s own label (e.g. "Name"); `{itemName}` is the consumer\'s singular noun for one record; `{position}`/`{total}` are the row\'s 1-based index and the total row count (e.g. "Name, guest 2 of 3").'},"@astryx.listInput.reorderInstructions":{defaultMessage:`Use Arrow Up or Arrow Down to move this item one position. Press Space or Enter to pick it up for extended keyboard reordering.`,description:`Visually-hidden instructions describing how to use a lab ListInput row's keyboard reorder handle, referenced via aria-describedby from every reorder button.`},"@astryx.listInput.announceAdded":{defaultMessage:`Added {itemName} {position, number}.`,description:"Screen-reader-only live announcement after a new record is appended to a lab ListInput. `{itemName}` is the consumer's singular noun for one record; `{position}` is the new record's 1-based row number."},"@astryx.listInput.announceRemoved":{defaultMessage:`Removed {itemName} {position, number}.`,description:"Screen-reader-only live announcement after a record is deleted from a lab ListInput. `{itemName}` is the consumer's singular noun for one record; `{position}` is the removed record's former 1-based row number."},"@astryx.listInput.announceGrabbed":{defaultMessage:`{itemName} {position, number} grabbed. Use arrow keys to move, Space or Enter to drop, and Escape to cancel.`,description:"Screen-reader-only live announcement when a lab ListInput record's keyboard reorder handle enters extended \"lift\" mode. `{itemName}` is the consumer's singular noun for one record; `{position}` is its 1-based row number."},"@astryx.listInput.announceMovedToPosition":{defaultMessage:`{itemName} moved to position {position, number} of {total, number}.`,description:"Screen-reader-only live announcement each time a lab ListInput record's reorder position changes (arrow-key step, keyboard lift-mode preview, or pointer drag). `{itemName}` is the consumer's singular noun for one record; `{position}`/`{total}` are the record's new 1-based position and the total row count."},"@astryx.listInput.announceReorderCancelled":{defaultMessage:`Reordering cancelled.`,description:`Screen-reader-only live announcement when a lab ListInput reorder in progress is cancelled (Escape key, blur, or the collection becoming disabled/loading mid-drag).`},"@astryx.listInput.announceReturnedToPosition":{defaultMessage:`{itemName} returned to position {position, number}.`,description:"Screen-reader-only live announcement when a lab ListInput reorder is committed without the record's position actually changing. `{itemName}` is the consumer's singular noun for one record; `{position}` is its unchanged 1-based row number."},"@astryx.listInput.announceDropped":{defaultMessage:`{itemName} dropped at position {position, number} of {total, number}.`,description:"Screen-reader-only live announcement when a lab ListInput reorder is committed with the record's position actually changing. `{itemName}` is the consumer's singular noun for one record; `{position}`/`{total}` are its new 1-based position and the total row count."},"@astryx.listInput.announceAlreadyAtBoundary":{defaultMessage:`This {itemName} is already {boundary, select, first {first} last {last} other {}}.`,description:'Screen-reader-only live announcement when an arrow-key reorder attempt has no effect because the record is already at that end of the list. `{itemName}` is the consumer\'s singular noun for one record; `{boundary}` is always exactly "first" or "last".'},"@astryx.markdown.taskList":{defaultMessage:`Task list`,description:"Screen-reader-only accessible name for a GitHub-flavored Markdown task list (rendered from `- [ ] item` / `- [x] done` syntax)."},"@astryx.markdown.table":{defaultMessage:`Table`,description:'Screen-reader-only accessible name for a table rendered inside a Markdown block. Noun ("a table"), not the verb. Separate from `@astryx.table.label` — translations may diverge.'},"@astryx.mobileNav.closeNavigation":{defaultMessage:`Close navigation`,description:"Screen-reader-only label on the X/close button that dismisses the MobileNav overlay. Pairs with `mobileNav.toggle.open`."},"@astryx.multiSelector.selectAll":{defaultMessage:`Select all`,description:`Label on the checkbox/toggle at the top of a MultiSelector dropdown that selects every option. "All" is a determiner here (as in "all the options"), not the pronoun.`},"@astryx.multiSelector.searchPlaceholder":{defaultMessage:`Search…`,description:"Placeholder inside the search input at the top of a MultiSelector's dropdown panel. Imperative verb; trailing `…` is one character."},"@astryx.multiSelector.searchOptions":{defaultMessage:`Search options`,description:`Screen-reader-only accessible name for that same search input inside a MultiSelector.`},"@astryx.multiSelector.empty":{defaultMessage:`No options`,description:`Shown in a MultiSelector's dropdown panel when it was given no options at all, and announced in a polite live region on open. Very short (2 words); neutral tone, not error-y.`},"@astryx.multiSelector.selectAllPartiallySelected":{defaultMessage:`{label}, partially selected`,description:'Accessible name for the MultiSelector select-all option while only some options are selected. `{label}` is the visible select-all label (e.g. "Select all"). ARIA forbids aria-selected="mixed" on options, so the indeterminate state is conveyed through the name instead. "Partially" = some but not all.'},"@astryx.popover.close":{defaultMessage:`Close popover`,description:`"Close" = shut/dismiss, not "nearby". Screen-reader-only label on the close button inside a Popover.`},"@astryx.selector.searchPlaceholder":{defaultMessage:`Search…`,description:"Placeholder inside the search input at the top of a Selector's dropdown panel (for filtering options). Imperative verb; trailing `…` is one character."},"@astryx.selector.searchOptions":{defaultMessage:`Search options`,description:`"Options" = the list of choices in the dropdown. Screen-reader-only accessible name for the search input inside a Selector.`},"@astryx.selector.empty":{defaultMessage:`No options`,description:`Shown in a Selector's dropdown panel when it was given no options at all, and announced in a polite live region on open. Very short (2 words); neutral tone, not error-y.`},"@astryx.sideNav.label":{defaultMessage:`Side navigation`,description:`Screen-reader-only accessible name for the primary vertical sidebar nav (usually on the left).`},"@astryx.sideNav.resizeSidebar":{defaultMessage:`Resize sidebar`,description:`Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width.`},"@astryx.sideNav.heading.openMenu":{defaultMessage:`Open menu`,description:"Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label":{defaultMessage:`Tabs`,description:`Screen-reader-only fallback name for a horizontal tab bar. Plural noun; "Tabs" here = UI tab panels, not browser tabs or the Tab key.`},"@astryx.table.label":{defaultMessage:`Table`,description:`Fallback screen-reader-only accessible name for a data-table region when the consumer provides none. Noun ("a table"), not the verb "to table".`},"@astryx.table.noData":{defaultMessage:`No data`,description:`Fallback empty-state text in the table body when there are zero rows. Neutral tone (not error-y); consumers commonly override with something specific like "No results".`},"@astryx.table.filter.allPlaceholder":{defaultMessage:`All`,description:`Placeholder on a per-column filter dropdown when nothing is selected, meaning "no filter — all rows match". Determiner form (as in "all values"), not the pronoun.`},"@astryx.table.filter.reset":{defaultMessage:`Reset`,description:`Button label inside a table's filter panel/popover; clears pending filter values back to defaults. Imperative verb.`},"@astryx.table.filter.apply":{defaultMessage:`Apply`,description:"Primary button label inside a table's filter panel/popover; commits pending filter values. Imperative verb; pairs with `Reset`."},"@astryx.table.rowStatus.columnHeader":{defaultMessage:`Row status`,description:`Screen-reader-only column header for the narrow status-indicator gutter a Table gains from useTableRowStatus. Sighted users see a blank gutter; assistive tech announces this as the column name.`},"@astryx.table.selection.selectAllRows":{defaultMessage:`Select all rows`,description:`Aria label for the "select all rows" checkbox in a Table header.`},"@astryx.table.selection.selectRow":{defaultMessage:`Select row`,description:`Aria label for the "select row" checkbox on a Table row.`},"@astryx.table.selection.selectRowNamed":{defaultMessage:`Select {label}`,description:`Aria label for a Table row's selection checkbox when a per-row label is available (via getRowLabel). \`label\` is the row's human-readable identity, e.g. "Alice".`},"@astryx.table.sort.ascending":{defaultMessage:`Sort ascending`,description:"Screen-reader-only label on a column header button that will sort the column ascending. Part of a set with `sort.descending` and `sort.clear` — keep parallel."},"@astryx.table.sort.descending":{defaultMessage:`Sort descending`,description:"Screen-reader-only label on a column header button that will sort the column descending. Part of a set with `sort.ascending` and `sort.clear`."},"@astryx.table.sort.clear":{defaultMessage:`Clear sort`,description:`Screen-reader-only label on a column header button that will remove the current sort. "Clear" here means remove, not transparent. Part of the sort set.`},"@astryx.table.sort.direction.ascending":{defaultMessage:`ascending`,description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.direction.descending":{defaultMessage:`descending`,description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.sortBy":{defaultMessage:`Sort by {label}`,description:"Aria label for a sortable Table header button when the column is unsorted. `label` is the column header text."},"@astryx.table.sort.sortedBy":{defaultMessage:`Sort by {label}, sorted {direction}`,description:"Aria label for a sorted Table header button. `direction` is the localized direction word from @astryx.table.sort.direction.*."},"@astryx.table.sort.sortedByWithPriority":{defaultMessage:`Sort by {label}, sorted {direction}, priority {rank, number} of {total, number}`,description:"Aria label for a sorted Table header button in multi-sort. `rank` is the 1-based position of this column in the sort order; `total` is the number of sorted columns."},"@astryx.toast.dismiss":{defaultMessage:`Dismiss notification`,description:"Screen-reader-only label on the X button of a Toast (transient notification popup). Distinct from `banner.dismiss` (persistent banner)."},"@astryx.toast.viewport":{defaultMessage:`Notifications`,description:`Screen-reader-only accessible name for the invisible landmark region hosting the stack of Toast popups (usually pinned to a screen corner).`},"@astryx.tokenizer.clearAll":{defaultMessage:`Clear all`,description:`Label on the "×" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner "all"; short.`},"@astryx.topNav.heading.openMenu":{defaultMessage:`Open menu`,description:"Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel":{defaultMessage:`Top navigation`,description:`Default accessible name (aria-label) for the