@epic-web/workshop-app 0.0.0-semantically-released
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/bin/epicshop.js +321 -0
- package/build/client/app-default.css +39 -0
- package/build/client/assets/_-C_7mS1-0.js +2 -0
- package/build/client/assets/_-C_7mS1-0.js.map +1 -0
- package/build/client/assets/_-l0sNRNKZ.js +2 -0
- package/build/client/assets/_-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/_basePickBy-DxgDhkrj.js +2 -0
- package/build/client/assets/_basePickBy-DxgDhkrj.js.map +1 -0
- package/build/client/assets/_baseUniq-Bh4NktJz.js +2 -0
- package/build/client/assets/_baseUniq-Bh4NktJz.js.map +1 -0
- package/build/client/assets/_exerciseNumber-D3lfJewu.js +2 -0
- package/build/client/assets/_exerciseNumber-D3lfJewu.js.map +1 -0
- package/build/client/assets/_exerciseNumber_._stepNumber-BNj079sn.js +2 -0
- package/build/client/assets/_exerciseNumber_._stepNumber-BNj079sn.js.map +1 -0
- package/build/client/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js +2 -0
- package/build/client/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/_exerciseNumber_.finished-a6jXslNA.js +2 -0
- package/build/client/assets/_exerciseNumber_.finished-a6jXslNA.js.map +1 -0
- package/build/client/assets/_layout-B3FchrR9.js +2 -0
- package/build/client/assets/_layout-B3FchrR9.js.map +1 -0
- package/build/client/assets/_layout-B6ARVFTz.js +2 -0
- package/build/client/assets/_layout-B6ARVFTz.js.map +1 -0
- package/build/client/assets/_layout-CtqVeNw0.js +6 -0
- package/build/client/assets/_layout-CtqVeNw0.js.map +1 -0
- package/build/client/assets/_layout-dHfVo9gJ.js +2 -0
- package/build/client/assets/_layout-dHfVo9gJ.js.map +1 -0
- package/build/client/assets/accordion-PSsenYUI.js +2 -0
- package/build/client/assets/accordion-PSsenYUI.js.map +1 -0
- package/build/client/assets/account-Jl0f1Zst.js +2 -0
- package/build/client/assets/account-Jl0f1Zst.js.map +1 -0
- package/build/client/assets/api._-l0sNRNKZ.js +2 -0
- package/build/client/assets/api._-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/app-CpF0K1cW.css +1 -0
- package/build/client/assets/app-CzIg9kJh.js +2 -0
- package/build/client/assets/app-CzIg9kJh.js.map +1 -0
- package/build/client/assets/app.epic_ws_.js_-l0sNRNKZ.js +2 -0
- package/build/client/assets/app.epic_ws_.js_-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/apps-DP2rzg_V.js +2 -0
- package/build/client/assets/apps-DP2rzg_V.js.map +1 -0
- package/build/client/assets/apps-l0sNRNKZ.js +2 -0
- package/build/client/assets/apps-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/arc-B6tHINqs.js +2 -0
- package/build/client/assets/arc-B6tHINqs.js.map +1 -0
- package/build/client/assets/architectureDiagram-NQ2NVSRB-D_wGZ5nT.js +37 -0
- package/build/client/assets/architectureDiagram-NQ2NVSRB-D_wGZ5nT.js.map +1 -0
- package/build/client/assets/blockDiagram-PHRCVELO-h_TbDJvl.js +123 -0
- package/build/client/assets/blockDiagram-PHRCVELO-h_TbDJvl.js.map +1 -0
- package/build/client/assets/button-cFpvwtjC.js +2 -0
- package/build/client/assets/button-cFpvwtjC.js.map +1 -0
- package/build/client/assets/c4Diagram-6F6E4RAY-BfXjadL9.js +11 -0
- package/build/client/assets/c4Diagram-6F6E4RAY-BfXjadL9.js.map +1 -0
- package/build/client/assets/cache-l0sNRNKZ.js +2 -0
- package/build/client/assets/cache-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/channel-ClIoK57K.js +2 -0
- package/build/client/assets/channel-ClIoK57K.js.map +1 -0
- package/build/client/assets/chunk-353BL4L5-CExuR7H8.js +2 -0
- package/build/client/assets/chunk-353BL4L5-CExuR7H8.js.map +1 -0
- package/build/client/assets/chunk-67H74DCK-BF9_AOuB.js +2 -0
- package/build/client/assets/chunk-67H74DCK-BF9_AOuB.js.map +1 -0
- package/build/client/assets/chunk-6OLS64BW-B_GeRv1G.js +221 -0
- package/build/client/assets/chunk-6OLS64BW-B_GeRv1G.js.map +1 -0
- package/build/client/assets/chunk-AACKK3MU-BcoQc9Ht.js +2 -0
- package/build/client/assets/chunk-AACKK3MU-BcoQc9Ht.js.map +1 -0
- package/build/client/assets/chunk-BFAMUDN2-DBCLoV1m.js +2 -0
- package/build/client/assets/chunk-BFAMUDN2-DBCLoV1m.js.map +1 -0
- package/build/client/assets/chunk-E2GYISFI-DvCzOl_M.js +16 -0
- package/build/client/assets/chunk-E2GYISFI-DvCzOl_M.js.map +1 -0
- package/build/client/assets/chunk-QEP2MXWD-BA02qRA0.js +166 -0
- package/build/client/assets/chunk-QEP2MXWD-BA02qRA0.js.map +1 -0
- package/build/client/assets/chunk-QMGIS6GS-CG5cA6CX.js +44 -0
- package/build/client/assets/chunk-QMGIS6GS-CG5cA6CX.js.map +1 -0
- package/build/client/assets/chunk-SKB7J2MH-BG1nHV0M.js +2 -0
- package/build/client/assets/chunk-SKB7J2MH-BG1nHV0M.js.map +1 -0
- package/build/client/assets/classDiagram-BGRH5UQR-BZY1Xh5a.js +2 -0
- package/build/client/assets/classDiagram-BGRH5UQR-BZY1Xh5a.js.map +1 -0
- package/build/client/assets/classDiagram-v2-O24JOBDK-BZY1Xh5a.js +2 -0
- package/build/client/assets/classDiagram-v2-O24JOBDK-BZY1Xh5a.js.map +1 -0
- package/build/client/assets/clone-RGlausHy.js +2 -0
- package/build/client/assets/clone-RGlausHy.js.map +1 -0
- package/build/client/assets/cytoscape.esm-BBIONMvf.js +332 -0
- package/build/client/assets/cytoscape.esm-BBIONMvf.js.map +1 -0
- package/build/client/assets/dagre-FFZHY6LT-CGbe3nXJ.js +5 -0
- package/build/client/assets/dagre-FFZHY6LT-CGbe3nXJ.js.map +1 -0
- package/build/client/assets/defaultLocale-C4B-KCzX.js +2 -0
- package/build/client/assets/defaultLocale-C4B-KCzX.js.map +1 -0
- package/build/client/assets/diagram-3EMPZRKU-8UM2S96z.js +25 -0
- package/build/client/assets/diagram-3EMPZRKU-8UM2S96z.js.map +1 -0
- package/build/client/assets/diagram-5UYTHUR4-Bq8b35J7.js +25 -0
- package/build/client/assets/diagram-5UYTHUR4-Bq8b35J7.js.map +1 -0
- package/build/client/assets/diagram-ZTM2IBQH-DZ0Q3vKL.js +44 -0
- package/build/client/assets/diagram-ZTM2IBQH-DZ0Q3vKL.js.map +1 -0
- package/build/client/assets/diff-DTFs5rVO.js +2 -0
- package/build/client/assets/diff-DTFs5rVO.js.map +1 -0
- package/build/client/assets/diff-DpX_9FU6.js +2 -0
- package/build/client/assets/diff-DpX_9FU6.js.map +1 -0
- package/build/client/assets/discord-C86FbV-j.js +2 -0
- package/build/client/assets/discord-C86FbV-j.js.map +1 -0
- package/build/client/assets/discord-DOEtvB6W.js +2 -0
- package/build/client/assets/discord-DOEtvB6W.js.map +1 -0
- package/build/client/assets/entry.client-anc4-dZY.js +35 -0
- package/build/client/assets/entry.client-anc4-dZY.js.map +1 -0
- package/build/client/assets/epic-video-CCv7QINN.js +3210 -0
- package/build/client/assets/epic-video-CCv7QINN.js.map +1 -0
- package/build/client/assets/epic-video-D2Xftn6t.css +1 -0
- package/build/client/assets/epic_ws_.js_-l0sNRNKZ.js +2 -0
- package/build/client/assets/epic_ws_.js_-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/erDiagram-R3QVA2FD-Bu6B069U.js +61 -0
- package/build/client/assets/erDiagram-R3QVA2FD-Bu6B069U.js.map +1 -0
- package/build/client/assets/error-boundary-B8bEOgxp.js +2 -0
- package/build/client/assets/error-boundary-B8bEOgxp.js.map +1 -0
- package/build/client/assets/exercises-l0sNRNKZ.js +2 -0
- package/build/client/assets/exercises-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/finished-RnlPhc3t.js +2 -0
- package/build/client/assets/finished-RnlPhc3t.js.map +1 -0
- package/build/client/assets/flowDiagram-PKI6S5ZS-ie1Nf5_c.js +163 -0
- package/build/client/assets/flowDiagram-PKI6S5ZS-ie1Nf5_c.js.map +1 -0
- package/build/client/assets/ganttDiagram-EK5VF46D-BjgRWg6k.js +268 -0
- package/build/client/assets/ganttDiagram-EK5VF46D-BjgRWg6k.js.map +1 -0
- package/build/client/assets/gitGraphDiagram-GW3U2K7C-BmD31KK0.js +66 -0
- package/build/client/assets/gitGraphDiagram-GW3U2K7C-BmD31KK0.js.map +1 -0
- package/build/client/assets/graph-BBuyk5Ru.js +2 -0
- package/build/client/assets/graph-BBuyk5Ru.js.map +1 -0
- package/build/client/assets/icons-BM6r7NHK.svg +570 -0
- package/build/client/assets/index-7Ba6ptu2.js +42 -0
- package/build/client/assets/index-7Ba6ptu2.js.map +1 -0
- package/build/client/assets/index-Bp_2FjuO.js +10 -0
- package/build/client/assets/index-Bp_2FjuO.js.map +1 -0
- package/build/client/assets/index-CNmh2cao.js +2 -0
- package/build/client/assets/index-CNmh2cao.js.map +1 -0
- package/build/client/assets/index-CZ8q0Nf8.js +2 -0
- package/build/client/assets/index-CZ8q0Nf8.js.map +1 -0
- package/build/client/assets/index-DP2rzg_V.js +2 -0
- package/build/client/assets/index-DP2rzg_V.js.map +1 -0
- package/build/client/assets/index-DSMFPAn8.js +2 -0
- package/build/client/assets/index-DSMFPAn8.js.map +1 -0
- package/build/client/assets/index-DxbpRM0V.js +2 -0
- package/build/client/assets/index-DxbpRM0V.js.map +1 -0
- package/build/client/assets/index-K6Dvbx-E.js +2 -0
- package/build/client/assets/index-K6Dvbx-E.js.map +1 -0
- package/build/client/assets/index-LNXI3Vlr.js +2 -0
- package/build/client/assets/index-LNXI3Vlr.js.map +1 -0
- package/build/client/assets/index-_jNKXw67.js +2 -0
- package/build/client/assets/index-_jNKXw67.js.map +1 -0
- package/build/client/assets/index-l0sNRNKZ.js +2 -0
- package/build/client/assets/index-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/index-rknZKmMI.js +36 -0
- package/build/client/assets/index-rknZKmMI.js.map +1 -0
- package/build/client/assets/infoDiagram-RLU2ROGC-DVoDIRGH.js +3 -0
- package/build/client/assets/infoDiagram-RLU2ROGC-DVoDIRGH.js.map +1 -0
- package/build/client/assets/init-Gi6I4Gst.js +2 -0
- package/build/client/assets/init-Gi6I4Gst.js.map +1 -0
- package/build/client/assets/journeyDiagram-EWQZEKCU-C_Lb2L11.js +140 -0
- package/build/client/assets/journeyDiagram-EWQZEKCU-C_Lb2L11.js.map +1 -0
- package/build/client/assets/jsx-runtime-EKYJJIwR.js +10 -0
- package/build/client/assets/jsx-runtime-EKYJJIwR.js.map +1 -0
- package/build/client/assets/kanban-definition-ILFWEQ3N-KsekSC1N.js +90 -0
- package/build/client/assets/kanban-definition-ILFWEQ3N-KsekSC1N.js.map +1 -0
- package/build/client/assets/katex-DsmCZfJr.js +262 -0
- package/build/client/assets/katex-DsmCZfJr.js.map +1 -0
- package/build/client/assets/l-D9C1VDbZ.js +2 -0
- package/build/client/assets/l-D9C1VDbZ.js.map +1 -0
- package/build/client/assets/launch-editor-l0sNRNKZ.js +2 -0
- package/build/client/assets/launch-editor-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/layout-BkH8Qi9T.js +2 -0
- package/build/client/assets/layout-BkH8Qi9T.js.map +1 -0
- package/build/client/assets/linear-tKBS5mAJ.js +2 -0
- package/build/client/assets/linear-tKBS5mAJ.js.map +1 -0
- package/build/client/assets/loading-CZYaLyAk.js +2 -0
- package/build/client/assets/loading-CZYaLyAk.js.map +1 -0
- package/build/client/assets/login-BHKNDLwl.js +2 -0
- package/build/client/assets/login-BHKNDLwl.js.map +1 -0
- package/build/client/assets/login-sse-l0sNRNKZ.js +2 -0
- package/build/client/assets/login-sse-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/manifest-b97649b5.js +1 -0
- package/build/client/assets/mdx-BEhxx-X4.js +3 -0
- package/build/client/assets/mdx-BEhxx-X4.js.map +1 -0
- package/build/client/assets/mermaid.core-CqaUvNIK.js +214 -0
- package/build/client/assets/mermaid.core-CqaUvNIK.js.map +1 -0
- package/build/client/assets/mindmap-definition-CZNETY7S-BGn0gmpB.js +96 -0
- package/build/client/assets/mindmap-definition-CZNETY7S-BGn0gmpB.js.map +1 -0
- package/build/client/assets/misc-COGqV2fm.js +2 -0
- package/build/client/assets/misc-COGqV2fm.js.map +1 -0
- package/build/client/assets/nav-chevrons-Cxzx0j13.js +2 -0
- package/build/client/assets/nav-chevrons-Cxzx0j13.js.map +1 -0
- package/build/client/assets/notifications-l0sNRNKZ.js +2 -0
- package/build/client/assets/notifications-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/og-l0sNRNKZ.js +2 -0
- package/build/client/assets/og-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/onboarding-7Vho777l.js +2 -0
- package/build/client/assets/onboarding-7Vho777l.js.map +1 -0
- package/build/client/assets/online-CwZkKwTv.js +2 -0
- package/build/client/assets/online-CwZkKwTv.js.map +1 -0
- package/build/client/assets/ordinal-Cboi1Yqb.js +2 -0
- package/build/client/assets/ordinal-Cboi1Yqb.js.map +1 -0
- package/build/client/assets/pe-DoDyGTeN.js +2 -0
- package/build/client/assets/pe-DoDyGTeN.js.map +1 -0
- package/build/client/assets/pieDiagram-NIOCPIFQ-TwGmrzCW.js +31 -0
- package/build/client/assets/pieDiagram-NIOCPIFQ-TwGmrzCW.js.map +1 -0
- package/build/client/assets/preferences-Dx_EUPYj.js +2 -0
- package/build/client/assets/preferences-Dx_EUPYj.js.map +1 -0
- package/build/client/assets/presence-tDxUeb6L.js +28 -0
- package/build/client/assets/presence-tDxUeb6L.js.map +1 -0
- package/build/client/assets/preview-COuApZAb.js +2 -0
- package/build/client/assets/preview-COuApZAb.js.map +1 -0
- package/build/client/assets/processes-l0sNRNKZ.js +2 -0
- package/build/client/assets/processes-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/product-DNKDVhI_.js +2 -0
- package/build/client/assets/product-DNKDVhI_.js.map +1 -0
- package/build/client/assets/progress-DKsShYpv.js +2 -0
- package/build/client/assets/progress-DKsShYpv.js.map +1 -0
- package/build/client/assets/progress-bar-Cww9t8Vn.js +2 -0
- package/build/client/assets/progress-bar-Cww9t8Vn.js.map +1 -0
- package/build/client/assets/progress-l0sNRNKZ.js +2 -0
- package/build/client/assets/progress-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/quadrantDiagram-2OG54O6I-C2FaFW77.js +8 -0
- package/build/client/assets/quadrantDiagram-2OG54O6I-C2FaFW77.js.map +1 -0
- package/build/client/assets/requirementDiagram-SO3GGRV7-BENrmejn.js +65 -0
- package/build/client/assets/requirementDiagram-SO3GGRV7-BENrmejn.js.map +1 -0
- package/build/client/assets/revalidation-ws-DJwDeSaI.js +2 -0
- package/build/client/assets/revalidation-ws-DJwDeSaI.js.map +1 -0
- package/build/client/assets/robots_._txt-l0sNRNKZ.js +2 -0
- package/build/client/assets/robots_._txt-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/root-30K5JoaI.js +2 -0
- package/build/client/assets/root-30K5JoaI.js.map +1 -0
- package/build/client/assets/sankeyDiagram-4UZDY2LN-DHcxz6y6.js +11 -0
- package/build/client/assets/sankeyDiagram-4UZDY2LN-DHcxz6y6.js.map +1 -0
- package/build/client/assets/seo-t5J-DRxw.js +2 -0
- package/build/client/assets/seo-t5J-DRxw.js.map +1 -0
- package/build/client/assets/sequenceDiagram-ZIKVLSP4-wsbYfOcv.js +123 -0
- package/build/client/assets/sequenceDiagram-ZIKVLSP4-wsbYfOcv.js.map +1 -0
- package/build/client/assets/set-playground-Bx0yIjpY.js +2 -0
- package/build/client/assets/set-playground-Bx0yIjpY.js.map +1 -0
- package/build/client/assets/set-playground-l0sNRNKZ.js +2 -0
- package/build/client/assets/set-playground-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/sitemap_._xml-l0sNRNKZ.js +2 -0
- package/build/client/assets/sitemap_._xml-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/start-l0sNRNKZ.js +2 -0
- package/build/client/assets/start-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/stateDiagram-XX37X6EN-D8VCWzU7.js +2 -0
- package/build/client/assets/stateDiagram-XX37X6EN-D8VCWzU7.js.map +1 -0
- package/build/client/assets/stateDiagram-v2-GD6S3NHB-CWoWkzf7.js +2 -0
- package/build/client/assets/stateDiagram-v2-GD6S3NHB-CWoWkzf7.js.map +1 -0
- package/build/client/assets/support-BnsTkkCH.js +2 -0
- package/build/client/assets/support-BnsTkkCH.js.map +1 -0
- package/build/client/assets/tailwind-Dqccob1p.css +1 -0
- package/build/client/assets/test-B2dwsj84.js +2 -0
- package/build/client/assets/test-B2dwsj84.js.map +1 -0
- package/build/client/assets/test-l0sNRNKZ.js +2 -0
- package/build/client/assets/test-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/test._testName-l0sNRNKZ.js +2 -0
- package/build/client/assets/test._testName-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/test.epic_ws_.js_-l0sNRNKZ.js +2 -0
- package/build/client/assets/test.epic_ws_.js_-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/tests-DvbNIXBP.js +4 -0
- package/build/client/assets/tests-DvbNIXBP.js.map +1 -0
- package/build/client/assets/timeline-definition-RI47OAVP-D44Hv-fs.js +62 -0
- package/build/client/assets/timeline-definition-RI47OAVP-D44Hv-fs.js.map +1 -0
- package/build/client/assets/tooltip-Cm7A1uIP.js +2 -0
- package/build/client/assets/tooltip-Cm7A1uIP.js.map +1 -0
- package/build/client/assets/treemap-FKARHQ26-COx8AcUM.js +129 -0
- package/build/client/assets/treemap-FKARHQ26-COx8AcUM.js.map +1 -0
- package/build/client/assets/use-event-source-DDlZtAwc.js +2 -0
- package/build/client/assets/use-event-source-DDlZtAwc.js.map +1 -0
- package/build/client/assets/user-BQ8D2Fty.js +2 -0
- package/build/client/assets/user-BQ8D2Fty.js.map +1 -0
- package/build/client/assets/version-CG_ZHfTC.js +2 -0
- package/build/client/assets/version-CG_ZHfTC.js.map +1 -0
- package/build/client/assets/workshop-config-5VcXxeyp.js +2 -0
- package/build/client/assets/workshop-config-5VcXxeyp.js.map +1 -0
- package/build/client/assets/xychartDiagram-H2YORKM3-rhbSyPlb.js +8 -0
- package/build/client/assets/xychartDiagram-H2YORKM3-rhbSyPlb.js.map +1 -0
- package/build/client/favicon.ico +0 -0
- package/build/client/favicon.png +0 -0
- package/build/client/favicon.svg +13 -0
- package/build/client/fonts/neogrotesk/0b8b755c-fee2-4661-9c8b-c5d1fbea901b.woff2 +0 -0
- package/build/client/fonts/neogrotesk/146d9d20-3e53-4e5d-beb2-1209bba5ac61.woff2 +0 -0
- package/build/client/fonts/neogrotesk/1798ef2b-5ee0-4f39-8b2c-ae3e36f07cd1.woff2 +0 -0
- package/build/client/fonts/neogrotesk/1eb2cb40-6822-4654-856c-8cbe652366b6.woff +0 -0
- package/build/client/fonts/neogrotesk/3b64793c-0bdb-4e4f-bf0e-cdf2e974d5f2.woff +0 -0
- package/build/client/fonts/neogrotesk/3bb44ed4-cf17-469c-8d0d-5946d10fdad1.woff +0 -0
- package/build/client/fonts/neogrotesk/4bd29470-1701-41fe-94b6-4a147512160c.woff +0 -0
- package/build/client/fonts/neogrotesk/5cdbf070-a094-44c8-b8f1-17a00a19c959.woff2 +0 -0
- package/build/client/fonts/neogrotesk/6d439be9-37df-4912-ac09-388ce938fa46.woff2 +0 -0
- package/build/client/fonts/neogrotesk/7fc2971f-a9c2-4e09-bd24-bfd4ee6e97b3.woff +0 -0
- package/build/client/fonts/neogrotesk/861b65ee-56bd-4057-9af4-3b2903af231e.woff +0 -0
- package/build/client/fonts/neogrotesk/8cf836d9-a49e-4387-bcbd-4800766e5d24.woff +0 -0
- package/build/client/fonts/neogrotesk/8d61128d-534c-4793-9668-b98bcc2e5969.woff2 +0 -0
- package/build/client/fonts/neogrotesk/98423f75-c341-4161-8b92-7cd5c05081e5.woff +0 -0
- package/build/client/fonts/neogrotesk/a1456726-ad0d-4f5e-9d8f-ce92e8ce375d.woff2 +0 -0
- package/build/client/fonts/neogrotesk/af81e7d2-0bb1-4aa0-bc76-adb78338c568.woff +0 -0
- package/build/client/fonts/neogrotesk/d1302ad5-ceee-47cb-a0fa-2da6bd0d4d54.woff2 +0 -0
- package/build/client/fonts/neogrotesk/e7e15c31-aad1-4384-abd3-0671ccd03251.woff +0 -0
- package/build/client/fonts/neogrotesk/ec6cb127-161b-469c-9816-69489032a234.woff2 +0 -0
- package/build/client/fonts/neogrotesk/f480430c-6c50-4ae3-9abb-e92c484f84d6.woff2 +0 -0
- package/build/client/img/tiffany.png +0 -0
- package/build/client/logo.svg +48 -0
- package/build/client/neogrotesk-font.css +100 -0
- package/build/client/og/background.png +0 -0
- package/build/client/og/logo.svg +1 -0
- package/build/server/index.js +11899 -0
- package/build/server/index.js.map +1 -0
- package/dist/server/index.js +247 -0
- package/package.json +1 -0
- package/start.js +50 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-FFZHY6LT-CGbe3nXJ.js","assets/graph-BBuyk5Ru.js","assets/_baseUniq-Bh4NktJz.js","assets/layout-BkH8Qi9T.js","assets/_basePickBy-DxgDhkrj.js","assets/clone-RGlausHy.js","assets/mdx-BEhxx-X4.js","assets/jsx-runtime-EKYJJIwR.js","assets/misc-COGqV2fm.js","assets/chunk-QMGIS6GS-CG5cA6CX.js","assets/index-Bp_2FjuO.js","assets/epic-video-CCv7QINN.js","assets/index-rknZKmMI.js","assets/tooltip-Cm7A1uIP.js","assets/pe-DoDyGTeN.js","assets/online-CwZkKwTv.js","assets/loading-CZYaLyAk.js","assets/user-BQ8D2Fty.js","assets/workshop-config-5VcXxeyp.js","assets/epic-video-D2Xftn6t.css","assets/progress-bar-Cww9t8Vn.js","assets/c4Diagram-6F6E4RAY-BfXjadL9.js","assets/chunk-67H74DCK-BF9_AOuB.js","assets/flowDiagram-PKI6S5ZS-ie1Nf5_c.js","assets/chunk-E2GYISFI-DvCzOl_M.js","assets/chunk-BFAMUDN2-DBCLoV1m.js","assets/chunk-SKB7J2MH-BG1nHV0M.js","assets/channel-ClIoK57K.js","assets/erDiagram-R3QVA2FD-Bu6B069U.js","assets/gitGraphDiagram-GW3U2K7C-BmD31KK0.js","assets/chunk-353BL4L5-CExuR7H8.js","assets/chunk-AACKK3MU-BcoQc9Ht.js","assets/treemap-FKARHQ26-COx8AcUM.js","assets/ganttDiagram-EK5VF46D-BjgRWg6k.js","assets/linear-tKBS5mAJ.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-C4B-KCzX.js","assets/infoDiagram-RLU2ROGC-DVoDIRGH.js","assets/pieDiagram-NIOCPIFQ-TwGmrzCW.js","assets/arc-B6tHINqs.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-2OG54O6I-C2FaFW77.js","assets/xychartDiagram-H2YORKM3-rhbSyPlb.js","assets/requirementDiagram-SO3GGRV7-BENrmejn.js","assets/sequenceDiagram-ZIKVLSP4-wsbYfOcv.js","assets/classDiagram-BGRH5UQR-BZY1Xh5a.js","assets/chunk-QEP2MXWD-BA02qRA0.js","assets/classDiagram-v2-O24JOBDK-BZY1Xh5a.js","assets/stateDiagram-XX37X6EN-D8VCWzU7.js","assets/chunk-6OLS64BW-B_GeRv1G.js","assets/stateDiagram-v2-GD6S3NHB-CWoWkzf7.js","assets/journeyDiagram-EWQZEKCU-C_Lb2L11.js","assets/timeline-definition-RI47OAVP-D44Hv-fs.js","assets/mindmap-definition-CZNETY7S-BGn0gmpB.js","assets/cytoscape.esm-BBIONMvf.js","assets/kanban-definition-ILFWEQ3N-KsekSC1N.js","assets/sankeyDiagram-4UZDY2LN-DHcxz6y6.js","assets/diagram-5UYTHUR4-Bq8b35J7.js","assets/diagram-ZTM2IBQH-DZ0Q3vKL.js","assets/blockDiagram-PHRCVELO-h_TbDJvl.js","assets/architectureDiagram-NQ2NVSRB-D_wGZ5nT.js","assets/diagram-3EMPZRKU-8UM2S96z.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as pt}from"./mdx-BEhxx-X4.js";import{o as zm}from"./chunk-QMGIS6GS-CG5cA6CX.js";var _n={exports:{}},Wm=_n.exports,Rl;function qm(){return Rl||(Rl=1,function(e,t){(function(r,i){e.exports=i()})(Wm,function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var M=["th","st","nd","rd"],S=B%100;return"["+B+(M[(S-20)%10]||M[S]||M[0])+"]"}},_=function(B,M,S){var F=String(B);return!F||F.length>=M?B:""+Array(M+1-F.length).join(S)+B},k={s:_,z:function(B){var M=-B.utcOffset(),S=Math.abs(M),F=Math.floor(S/60),E=S%60;return(M<=0?"+":"-")+_(F,2,"0")+":"+_(E,2,"0")},m:function B(M,S){if(M.date()<S.date())return-B(S,M);var F=12*(S.year()-M.year())+(S.month()-M.month()),E=M.clone().add(F,u),H=S-E<0,X=M.clone().add(F+(H?-1:1),u);return+(-(F+(S-E)/(H?E-X:X-E))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:u,y:d,w:h,d:c,D:g,h:l,m:s,s:o,ms:a,Q:f}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},v="en",L={};L[v]=b;var T="$isDayjsObject",D=function(B){return B instanceof N||!(!B||!B[T])},O=function B(M,S,F){var E;if(!M)return v;if(typeof M=="string"){var H=M.toLowerCase();L[H]&&(E=H),S&&(L[H]=S,E=H);var X=M.split("-");if(!E&&X.length>1)return B(X[0])}else{var K=M.name;L[K]=M,E=K}return!F&&E&&(v=E),E||!F&&v},I=function(B,M){if(D(B))return B.clone();var S=typeof M=="object"?M:{};return S.date=B,S.args=arguments,new N(S)},A=k;A.l=O,A.i=D,A.w=function(B,M){return I(B,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var N=function(){function B(S){this.$L=O(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[T]=!0}var M=B.prototype;return M.parse=function(S){this.$d=function(F){var E=F.date,H=F.utc;if(E===null)return new Date(NaN);if(A.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var X=E.match(y);if(X){var K=X[2]-1||0,et=(X[7]||"0").substring(0,3);return H?new Date(Date.UTC(X[1],K,X[3]||1,X[4]||0,X[5]||0,X[6]||0,et)):new Date(X[1],K,X[3]||1,X[4]||0,X[5]||0,X[6]||0,et)}}return new Date(E)}(S),this.init()},M.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},M.$utils=function(){return A},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(S,F){var E=I(S);return this.startOf(F)<=E&&E<=this.endOf(F)},M.isAfter=function(S,F){return I(S)<this.startOf(F)},M.isBefore=function(S,F){return this.endOf(F)<I(S)},M.$g=function(S,F,E){return A.u(S)?this[F]:this.set(E,S)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(S,F){var E=this,H=!!A.u(F)||F,X=A.p(S),K=function(Kt,xt){var ne=A.w(E.$u?Date.UTC(E.$y,xt,Kt):new Date(E.$y,xt,Kt),E);return H?ne:ne.endOf(c)},et=function(Kt,xt){return A.w(E.toDate()[Kt].apply(E.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(xt)),E)},tt=this.$W,lt=this.$M,nt=this.$D,_t="set"+(this.$u?"UTC":"");switch(X){case d:return H?K(1,0):K(31,11);case u:return H?K(1,lt):K(0,lt+1);case h:var Ct=this.$locale().weekStart||0,ie=(tt<Ct?tt+7:tt)-Ct;return K(H?nt-ie:nt+(6-ie),lt);case c:case g:return et(_t+"Hours",0);case l:return et(_t+"Minutes",1);case s:return et(_t+"Seconds",2);case o:return et(_t+"Milliseconds",3);default:return this.clone()}},M.endOf=function(S){return this.startOf(S,!1)},M.$set=function(S,F){var E,H=A.p(S),X="set"+(this.$u?"UTC":""),K=(E={},E[c]=X+"Date",E[g]=X+"Date",E[u]=X+"Month",E[d]=X+"FullYear",E[l]=X+"Hours",E[s]=X+"Minutes",E[o]=X+"Seconds",E[a]=X+"Milliseconds",E)[H],et=H===c?this.$D+(F-this.$W):F;if(H===u||H===d){var tt=this.clone().set(g,1);tt.$d[K](et),tt.init(),this.$d=tt.set(g,Math.min(this.$D,tt.daysInMonth())).$d}else K&&this.$d[K](et);return this.init(),this},M.set=function(S,F){return this.clone().$set(S,F)},M.get=function(S){return this[A.p(S)]()},M.add=function(S,F){var E,H=this;S=Number(S);var X=A.p(F),K=function(lt){var nt=I(H);return A.w(nt.date(nt.date()+Math.round(lt*S)),H)};if(X===u)return this.set(u,this.$M+S);if(X===d)return this.set(d,this.$y+S);if(X===c)return K(1);if(X===h)return K(7);var et=(E={},E[s]=i,E[l]=n,E[o]=r,E)[X]||1,tt=this.$d.getTime()+S*et;return A.w(tt,this)},M.subtract=function(S,F){return this.add(-1*S,F)},M.format=function(S){var F=this,E=this.$locale();if(!this.isValid())return E.invalidDate||m;var H=S||"YYYY-MM-DDTHH:mm:ssZ",X=A.z(this),K=this.$H,et=this.$m,tt=this.$M,lt=E.weekdays,nt=E.months,_t=E.meridiem,Ct=function(xt,ne,Qt,Ce){return xt&&(xt[ne]||xt(F,H))||Qt[ne].slice(0,Ce)},ie=function(xt){return A.s(K%12||12,xt,"0")},Kt=_t||function(xt,ne,Qt){var Ce=xt<12?"AM":"PM";return Qt?Ce.toLowerCase():Ce};return H.replace(x,function(xt,ne){return ne||function(Qt){switch(Qt){case"YY":return String(F.$y).slice(-2);case"YYYY":return A.s(F.$y,4,"0");case"M":return tt+1;case"MM":return A.s(tt+1,2,"0");case"MMM":return Ct(E.monthsShort,tt,nt,3);case"MMMM":return Ct(nt,tt);case"D":return F.$D;case"DD":return A.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Ct(E.weekdaysMin,F.$W,lt,2);case"ddd":return Ct(E.weekdaysShort,F.$W,lt,3);case"dddd":return lt[F.$W];case"H":return String(K);case"HH":return A.s(K,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return Kt(K,et,!0);case"A":return Kt(K,et,!1);case"m":return String(et);case"mm":return A.s(et,2,"0");case"s":return String(F.$s);case"ss":return A.s(F.$s,2,"0");case"SSS":return A.s(F.$ms,3,"0");case"Z":return X}return null}(xt)||X.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(S,F,E){var H,X=this,K=A.p(F),et=I(S),tt=(et.utcOffset()-this.utcOffset())*i,lt=this-et,nt=function(){return A.m(X,et)};switch(K){case d:H=nt()/12;break;case u:H=nt();break;case f:H=nt()/3;break;case h:H=(lt-tt)/6048e5;break;case c:H=(lt-tt)/864e5;break;case l:H=lt/n;break;case s:H=lt/i;break;case o:H=lt/r;break;default:H=lt}return E?H:A.a(H)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return L[this.$L]},M.locale=function(S,F){if(!S)return this.$L;var E=this.clone(),H=O(S,F,!0);return H&&(E.$L=H),E},M.clone=function(){return A.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},B}(),R=N.prototype;return I.prototype=R,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach(function(B){R[B[1]]=function(M){return this.$g(M,B[0],B[1])}}),I.extend=function(B,M){return B.$i||(B(M,N,I),B.$i=!0),I},I.locale=O,I.isDayjs=D,I.unix=function(B){return I(1e3*B)},I.en=L[v],I.Ls=L,I.p={},I})}(_n)),_n.exports}var Hm=qm();const jm=zm(Hm),Cn={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return Cn.hue2rgb(a,n,e+1/3)*255;case"g":return Cn.hue2rgb(a,n,e)*255;case"b":return Cn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,l=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},Ym={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Um={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:Cn,lang:Ym,unit:Um},ze={};for(let e=0;e<=255;e++)ze[e]=at.unit.dec2hex(e);const $t={ALL:0,RGB:1,HSL:2};class Gm{constructor(){this.type=$t.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=$t.ALL}is(t){return this.type===t}}class Vm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Gm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=$t.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set($t.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set($t.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set($t.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set($t.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set($t.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set($t.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ya=new Vm({r:0,g:0,b:0,a:0},"transparent"),Mr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Mr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return ya.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${ze[Math.round(t)]}${ze[Math.round(r)]}${ze[Math.round(i)]}${ze[Math.round(n*255)]}`:`#${ze[Math.round(t)]}${ze[Math.round(r)]}${ze[Math.round(i)]}`}},er={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(er.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(er.re);if(!r)return;const[,i,n,a,o,s]=r;return ya.set({h:er._hue2deg(i),s:at.channel.clamp.s(parseFloat(n)),l:at.channel.clamp.l(parseFloat(a)),a:o?at.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${n})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Li.colors[e];if(t)return Mr.parse(t)},stringify:e=>{const t=Mr.stringify(e);for(const r in Li.colors)if(Li.colors[r]===t)return r}},_i={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(_i.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return ya.set({r:at.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:at.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(n)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},ye={format:{keyword:Li,hex:Mr,rgb:_i,rgba:_i,hsl:er,hsla:er},parse:e=>{if(typeof e!="string")return e;const t=Mr.parse(e)||_i.parse(e)||er.parse(e)||Li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is($t.HSL)||e.data.r===void 0?er.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?_i.stringify(e):Mr.stringify(e)},mh=(e,t)=>{const r=ye.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return ye.stringify(r)},Bi=(e,t,r=0,i=1)=>{if(typeof e!="number")return mh(e,{a:t});const n=ya.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return ye.stringify(n)},Xm=e=>{const{r:t,g:r,b:i}=ye.parse(e),n=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(n)},Zm=e=>Xm(e)>=.5,Yi=e=>!Zm(e),yh=(e,t,r)=>{const i=ye.parse(e),n=i[t],a=at.channel.clamp[t](n+r);return n!==a&&(i[t]=a),ye.stringify(i)},W=(e,t)=>yh(e,"l",t),J=(e,t)=>yh(e,"l",-t),w=(e,t)=>{const r=ye.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return mh(e,i)},Km=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=ye.parse(e),{r:s,g:l,b:c,a:h}=ye.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+s*y,b=n*m+l*y,_=a*m+c*y,k=o*u+h*(1-u);return Bi(x,b,_,k)},z=(e,t=100)=>{const r=ye.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Km(r,e,t)};/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:xh,setPrototypeOf:Il,isFrozen:Qm,getPrototypeOf:Jm,getOwnPropertyDescriptor:t0}=Object;let{freeze:Wt,seal:ee,create:bh}=Object,{apply:bs,construct:_s}=typeof Reflect<"u"&&Reflect;Wt||(Wt=function(t){return t});ee||(ee=function(t){return t});bs||(bs=function(t,r,i){return t.apply(r,i)});_s||(_s=function(t,r){return new t(...r)});const cn=qt(Array.prototype.forEach),e0=qt(Array.prototype.lastIndexOf),Pl=qt(Array.prototype.pop),oi=qt(Array.prototype.push),r0=qt(Array.prototype.splice),wn=qt(String.prototype.toLowerCase),Ja=qt(String.prototype.toString),Nl=qt(String.prototype.match),li=qt(String.prototype.replace),i0=qt(String.prototype.indexOf),n0=qt(String.prototype.trim),ae=qt(Object.prototype.hasOwnProperty),Rt=qt(RegExp.prototype.test),ci=a0(TypeError);function qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return bs(e,t,i)}}function a0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return _s(e,r)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wn;Il&&Il(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(Qm(t)||(t[i]=a),n=a)}e[n]=!0}return e}function s0(e){for(let t=0;t<e.length;t++)ae(e,t)||(e[t]=null);return e}function Le(e){const t=bh(null);for(const[r,i]of xh(e))ae(e,r)&&(Array.isArray(i)?t[r]=s0(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Le(i):t[r]=i);return t}function hi(e,t){for(;e!==null;){const i=t0(e,t);if(i){if(i.get)return qt(i.get);if(typeof i.value=="function")return qt(i.value)}e=Jm(e)}function r(){return null}return r}const zl=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ts=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),es=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),o0=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),rs=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),l0=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Wl=Wt(["#text"]),ql=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),is=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hl=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),hn=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),c0=ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm),h0=ee(/<%[\w\W]*|[\w\W]*%>/gm),u0=ee(/\$\{[\w\W]*/gm),f0=ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),d0=ee(/^aria-[\-\w]+$/),_h=ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),p0=ee(/^(?:\w+script|data):/i),g0=ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ch=ee(/^html$/i),m0=ee(/^[a-z][.\w]*(-[.\w]+)+$/i);var jl=Object.freeze({__proto__:null,ARIA_ATTR:d0,ATTR_WHITESPACE:g0,CUSTOM_ELEMENT:m0,DATA_ATTR:f0,DOCTYPE_NAME:Ch,ERB_EXPR:h0,IS_ALLOWED_URI:_h,IS_SCRIPT_OR_DATA:p0,MUSTACHE_EXPR:c0,TMPLIT_EXPR:u0});const ui={element:1,text:3,progressingInstruction:7,comment:8,document:9},y0=function(){return typeof window>"u"?null:window},x0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Yl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function wh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y0();const t=Q=>wh(Q);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==ui.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=l.prototype,m=hi(g,"cloneNode"),y=hi(g,"remove"),x=hi(g,"nextSibling"),b=hi(g,"childNodes"),_=hi(g,"parentNode");if(typeof o=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let k,v="";const{implementation:L,createNodeIterator:T,createDocumentFragment:D,getElementsByTagName:O}=r,{importNode:I}=i;let A=Yl();t.isSupported=typeof xh=="function"&&typeof _=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:R,TMPLIT_EXPR:B,DATA_ATTR:M,ARIA_ATTR:S,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:E,CUSTOM_ELEMENT:H}=jl;let{IS_ALLOWED_URI:X}=jl,K=null;const et=ot({},[...zl,...ts,...es,...rs,...Wl]);let tt=null;const lt=ot({},[...ql,...is,...Hl,...hn]);let nt=Object.seal(bh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_t=null,Ct=null,ie=!0,Kt=!0,xt=!1,ne=!0,Qt=!1,Ce=!0,Ze=!1,ja=!1,Ya=!1,br=!1,rn=!1,nn=!1,xl=!0,bl=!1;const Fm="user-content-";let Ua=!0,ni=!1,_r={},Cr=null;const _l=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Cl=null;const wl=ot({},["audio","video","img","source","image","track"]);let Ga=null;const vl=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),an="http://www.w3.org/1998/Math/MathML",sn="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml";let wr=we,Va=!1,Xa=null;const $m=ot({},[an,sn,we],Ja);let on=ot({},["mi","mo","mn","ms","mtext"]),ln=ot({},["annotation-xml"]);const Om=ot({},["title","style","font","a","script"]);let ai=null;const Dm=["application/xhtml+xml","text/html"],Rm="text/html";let Lt=null,vr=null;const Im=r.createElement("form"),kl=function(C){return C instanceof RegExp||C instanceof Function},Za=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(vr&&vr===C)){if((!C||typeof C!="object")&&(C={}),C=Le(C),ai=Dm.indexOf(C.PARSER_MEDIA_TYPE)===-1?Rm:C.PARSER_MEDIA_TYPE,Lt=ai==="application/xhtml+xml"?Ja:wn,K=ae(C,"ALLOWED_TAGS")?ot({},C.ALLOWED_TAGS,Lt):et,tt=ae(C,"ALLOWED_ATTR")?ot({},C.ALLOWED_ATTR,Lt):lt,Xa=ae(C,"ALLOWED_NAMESPACES")?ot({},C.ALLOWED_NAMESPACES,Ja):$m,Ga=ae(C,"ADD_URI_SAFE_ATTR")?ot(Le(vl),C.ADD_URI_SAFE_ATTR,Lt):vl,Cl=ae(C,"ADD_DATA_URI_TAGS")?ot(Le(wl),C.ADD_DATA_URI_TAGS,Lt):wl,Cr=ae(C,"FORBID_CONTENTS")?ot({},C.FORBID_CONTENTS,Lt):_l,_t=ae(C,"FORBID_TAGS")?ot({},C.FORBID_TAGS,Lt):Le({}),Ct=ae(C,"FORBID_ATTR")?ot({},C.FORBID_ATTR,Lt):Le({}),_r=ae(C,"USE_PROFILES")?C.USE_PROFILES:!1,ie=C.ALLOW_ARIA_ATTR!==!1,Kt=C.ALLOW_DATA_ATTR!==!1,xt=C.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qt=C.SAFE_FOR_TEMPLATES||!1,Ce=C.SAFE_FOR_XML!==!1,Ze=C.WHOLE_DOCUMENT||!1,br=C.RETURN_DOM||!1,rn=C.RETURN_DOM_FRAGMENT||!1,nn=C.RETURN_TRUSTED_TYPE||!1,Ya=C.FORCE_BODY||!1,xl=C.SANITIZE_DOM!==!1,bl=C.SANITIZE_NAMED_PROPS||!1,Ua=C.KEEP_CONTENT!==!1,ni=C.IN_PLACE||!1,X=C.ALLOWED_URI_REGEXP||_h,wr=C.NAMESPACE||we,on=C.MATHML_TEXT_INTEGRATION_POINTS||on,ln=C.HTML_INTEGRATION_POINTS||ln,nt=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&kl(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&kl(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qt&&(Kt=!1),rn&&(br=!0),_r&&(K=ot({},Wl),tt=[],_r.html===!0&&(ot(K,zl),ot(tt,ql)),_r.svg===!0&&(ot(K,ts),ot(tt,is),ot(tt,hn)),_r.svgFilters===!0&&(ot(K,es),ot(tt,is),ot(tt,hn)),_r.mathMl===!0&&(ot(K,rs),ot(tt,Hl),ot(tt,hn))),C.ADD_TAGS&&(K===et&&(K=Le(K)),ot(K,C.ADD_TAGS,Lt)),C.ADD_ATTR&&(tt===lt&&(tt=Le(tt)),ot(tt,C.ADD_ATTR,Lt)),C.ADD_URI_SAFE_ATTR&&ot(Ga,C.ADD_URI_SAFE_ATTR,Lt),C.FORBID_CONTENTS&&(Cr===_l&&(Cr=Le(Cr)),ot(Cr,C.FORBID_CONTENTS,Lt)),Ua&&(K["#text"]=!0),Ze&&ot(K,["html","head","body"]),K.table&&(ot(K,["tbody"]),delete _t.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw ci('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ci('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=C.TRUSTED_TYPES_POLICY,v=k.createHTML("")}else k===void 0&&(k=x0(d,n)),k!==null&&typeof v=="string"&&(v=k.createHTML(""));Wt&&Wt(C),vr=C}},Sl=ot({},[...ts,...es,...o0]),Tl=ot({},[...rs,...l0]),Pm=function(C){let P=_(C);(!P||!P.tagName)&&(P={namespaceURI:wr,tagName:"template"});const Y=wn(C.tagName),mt=wn(P.tagName);return Xa[C.namespaceURI]?C.namespaceURI===sn?P.namespaceURI===we?Y==="svg":P.namespaceURI===an?Y==="svg"&&(mt==="annotation-xml"||on[mt]):!!Sl[Y]:C.namespaceURI===an?P.namespaceURI===we?Y==="math":P.namespaceURI===sn?Y==="math"&&ln[mt]:!!Tl[Y]:C.namespaceURI===we?P.namespaceURI===sn&&!ln[mt]||P.namespaceURI===an&&!on[mt]?!1:!Tl[Y]&&(Om[Y]||!Sl[Y]):!!(ai==="application/xhtml+xml"&&Xa[C.namespaceURI]):!1},he=function(C){oi(t.removed,{element:C});try{_(C).removeChild(C)}catch{y(C)}},kr=function(C,P){try{oi(t.removed,{attribute:P.getAttributeNode(C),from:P})}catch{oi(t.removed,{attribute:null,from:P})}if(P.removeAttribute(C),C==="is")if(br||rn)try{he(P)}catch{}else try{P.setAttribute(C,"")}catch{}},Ll=function(C){let P=null,Y=null;if(Ya)C="<remove></remove>"+C;else{const vt=Nl(C,/^[\r\n\t ]+/);Y=vt&&vt[0]}ai==="application/xhtml+xml"&&wr===we&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const mt=k?k.createHTML(C):C;if(wr===we)try{P=new f().parseFromString(mt,ai)}catch{}if(!P||!P.documentElement){P=L.createDocument(wr,"template",null);try{P.documentElement.innerHTML=Va?v:mt}catch{}}const Et=P.body||P.documentElement;return C&&Y&&Et.insertBefore(r.createTextNode(Y),Et.childNodes[0]||null),wr===we?O.call(P,Ze?"html":"body")[0]:Ze?P.documentElement:Et},Bl=function(C){return T.call(C.ownerDocument||C,C,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ka=function(C){return C instanceof u&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof h)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},Al=function(C){return typeof s=="function"&&C instanceof s};function ve(Q,C,P){cn(Q,Y=>{Y.call(t,C,P,vr)})}const Ml=function(C){let P=null;if(ve(A.beforeSanitizeElements,C,null),Ka(C))return he(C),!0;const Y=Lt(C.nodeName);if(ve(A.uponSanitizeElement,C,{tagName:Y,allowedTags:K}),Ce&&C.hasChildNodes()&&!Al(C.firstElementChild)&&Rt(/<[/\w!]/g,C.innerHTML)&&Rt(/<[/\w!]/g,C.textContent)||C.nodeType===ui.progressingInstruction||Ce&&C.nodeType===ui.comment&&Rt(/<[/\w]/g,C.data))return he(C),!0;if(!K[Y]||_t[Y]){if(!_t[Y]&&Fl(Y)&&(nt.tagNameCheck instanceof RegExp&&Rt(nt.tagNameCheck,Y)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(Y)))return!1;if(Ua&&!Cr[Y]){const mt=_(C)||C.parentNode,Et=b(C)||C.childNodes;if(Et&&mt){const vt=Et.length;for(let Ht=vt-1;Ht>=0;--Ht){const ke=m(Et[Ht],!0);ke.__removalCount=(C.__removalCount||0)+1,mt.insertBefore(ke,x(C))}}}return he(C),!0}return C instanceof l&&!Pm(C)||(Y==="noscript"||Y==="noembed"||Y==="noframes")&&Rt(/<\/no(script|embed|frames)/i,C.innerHTML)?(he(C),!0):(Qt&&C.nodeType===ui.text&&(P=C.textContent,cn([N,R,B],mt=>{P=li(P,mt," ")}),C.textContent!==P&&(oi(t.removed,{element:C.cloneNode()}),C.textContent=P)),ve(A.afterSanitizeElements,C,null),!1)},El=function(C,P,Y){if(xl&&(P==="id"||P==="name")&&(Y in r||Y in Im))return!1;if(!(Kt&&!Ct[P]&&Rt(M,P))){if(!(ie&&Rt(S,P))){if(!tt[P]||Ct[P]){if(!(Fl(C)&&(nt.tagNameCheck instanceof RegExp&&Rt(nt.tagNameCheck,C)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(C))&&(nt.attributeNameCheck instanceof RegExp&&Rt(nt.attributeNameCheck,P)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck(P))||P==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Rt(nt.tagNameCheck,Y)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(Y))))return!1}else if(!Ga[P]){if(!Rt(X,li(Y,E,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&C!=="script"&&i0(Y,"data:")===0&&Cl[C])){if(!(xt&&!Rt(F,li(Y,E,"")))){if(Y)return!1}}}}}}return!0},Fl=function(C){return C!=="annotation-xml"&&Nl(C,H)},$l=function(C){ve(A.beforeSanitizeAttributes,C,null);const{attributes:P}=C;if(!P||Ka(C))return;const Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:tt,forceKeepAttr:void 0};let mt=P.length;for(;mt--;){const Et=P[mt],{name:vt,namespaceURI:Ht,value:ke}=Et,si=Lt(vt),Qa=ke;let Ft=vt==="value"?Qa:n0(Qa);if(Y.attrName=si,Y.attrValue=Ft,Y.keepAttr=!0,Y.forceKeepAttr=void 0,ve(A.uponSanitizeAttribute,C,Y),Ft=Y.attrValue,bl&&(si==="id"||si==="name")&&(kr(vt,C),Ft=Fm+Ft),Ce&&Rt(/((--!?|])>)|<\/(style|title)/i,Ft)){kr(vt,C);continue}if(Y.forceKeepAttr)continue;if(!Y.keepAttr){kr(vt,C);continue}if(!ne&&Rt(/\/>/i,Ft)){kr(vt,C);continue}Qt&&cn([N,R,B],Dl=>{Ft=li(Ft,Dl," ")});const Ol=Lt(C.nodeName);if(!El(Ol,si,Ft)){kr(vt,C);continue}if(k&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Ht)switch(d.getAttributeType(Ol,si)){case"TrustedHTML":{Ft=k.createHTML(Ft);break}case"TrustedScriptURL":{Ft=k.createScriptURL(Ft);break}}if(Ft!==Qa)try{Ht?C.setAttributeNS(Ht,vt,Ft):C.setAttribute(vt,Ft),Ka(C)?he(C):Pl(t.removed)}catch{kr(vt,C)}}ve(A.afterSanitizeAttributes,C,null)},Nm=function Q(C){let P=null;const Y=Bl(C);for(ve(A.beforeSanitizeShadowDOM,C,null);P=Y.nextNode();)ve(A.uponSanitizeShadowNode,P,null),Ml(P),$l(P),P.content instanceof a&&Q(P.content);ve(A.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(Q){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,Y=null,mt=null,Et=null;if(Va=!Q,Va&&(Q="<!-->"),typeof Q!="string"&&!Al(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw ci("dirty is not a string, aborting")}else throw ci("toString is not a function");if(!t.isSupported)return Q;if(ja||Za(C),t.removed=[],typeof Q=="string"&&(ni=!1),ni){if(Q.nodeName){const ke=Lt(Q.nodeName);if(!K[ke]||_t[ke])throw ci("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof s)P=Ll("<!---->"),Y=P.ownerDocument.importNode(Q,!0),Y.nodeType===ui.element&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?P=Y:P.appendChild(Y);else{if(!br&&!Qt&&!Ze&&Q.indexOf("<")===-1)return k&&nn?k.createHTML(Q):Q;if(P=Ll(Q),!P)return br?null:nn?v:""}P&&Ya&&he(P.firstChild);const vt=Bl(ni?Q:P);for(;mt=vt.nextNode();)Ml(mt),$l(mt),mt.content instanceof a&&Nm(mt.content);if(ni)return Q;if(br){if(rn)for(Et=D.call(P.ownerDocument);P.firstChild;)Et.appendChild(P.firstChild);else Et=P;return(tt.shadowroot||tt.shadowrootmode)&&(Et=I.call(i,Et,!0)),Et}let Ht=Ze?P.outerHTML:P.innerHTML;return Ze&&K["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&Rt(Ch,P.ownerDocument.doctype.name)&&(Ht="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
|
|
3
|
+
`+Ht),Qt&&cn([N,R,B],ke=>{Ht=li(Ht,ke," ")}),k&&nn?k.createHTML(Ht):Ht},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Za(Q),ja=!0},t.clearConfig=function(){vr=null,ja=!1},t.isValidAttribute=function(Q,C,P){vr||Za({});const Y=Lt(Q),mt=Lt(C);return El(Y,mt,P)},t.addHook=function(Q,C){typeof C=="function"&&oi(A[Q],C)},t.removeHook=function(Q,C){if(C!==void 0){const P=e0(A[Q],C);return P===-1?void 0:r0(A[Q],P,1)[0]}return Pl(A[Q])},t.removeHooks=function(Q){A[Q]=[]},t.removeAllHooks=function(){A=Yl()},t}var Wr=wh(),vh=Object.defineProperty,p=(e,t)=>vh(e,"name",{value:t,configurable:!0}),b0=(e,t)=>{for(var r in t)vh(e,r,{get:t[r],enumerable:!0})},Se={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},$={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},yo=p(function(e="fatal"){let t=Se.fatal;typeof e=="string"?e.toLowerCase()in Se&&(t=Se[e]):typeof e=="number"&&(t=e),$.trace=()=>{},$.debug=()=>{},$.info=()=>{},$.warn=()=>{},$.error=()=>{},$.fatal=()=>{},t<=Se.fatal&&($.fatal=console.error?console.error.bind(console,Jt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Jt("FATAL"))),t<=Se.error&&($.error=console.error?console.error.bind(console,Jt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Jt("ERROR"))),t<=Se.warn&&($.warn=console.warn?console.warn.bind(console,Jt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Jt("WARN"))),t<=Se.info&&($.info=console.info?console.info.bind(console,Jt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Jt("INFO"))),t<=Se.debug&&($.debug=console.debug?console.debug.bind(console,Jt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jt("DEBUG"))),t<=Se.trace&&($.trace=console.debug?console.debug.bind(console,Jt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jt("TRACE")))},"setLogLevel"),Jt=p(e=>`%c${jm().format("ss.SSS")} : ${e} : `,"format"),kh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ai=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_0=/\s*%%.*\n/gm,$r,Sh=($r=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p($r,"UnknownDiagramError"),$r),qr={},xo=p(function(e,t){e=e.replace(kh,"").replace(Ai,"").replace(_0,`
|
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(qr))if(i(e,t))return r;throw new Sh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Cs=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Th(t,r,i)},"registerLazyLoadedDiagrams"),Th=p((e,t,r)=>{qr[e]&&$.warn(`Detector with key ${e} already exists. Overwriting.`),qr[e]={detector:t,loader:r},$.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),C0=p(e=>qr[e].loader,"getDiagramLoader"),ws=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>ws(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=ws(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Mt=ws,xa="#ffffff",ba="#f2f2f2",It=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),Or,w0=(Or=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||z(this.tertiaryColor),this.lineColor=this.lineColor||z(this.background),this.arrowheadColor=this.arrowheadColor||z(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?J(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||J(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||z(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||J(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10)):(this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=J(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=J(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||z(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||W(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||J(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Yi(this.quadrant1Fill)?W(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ba}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Or,"Theme"),Or),v0=p(e=>{const t=new w0;return t.calculate(e),t},"getThemeVariables"),Dr,k0=(Dr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=z(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(z("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Bi(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=J("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=J(this.sectionBkgColor,10),this.taskBorderColor=Bi(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Bi(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=W(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=W(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=W(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||z(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Yi(this.quadrant1Fill)?W(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.secondaryColor,20),this.git1=W(this.pie2||this.secondaryColor,20),this.git2=W(this.pie3||this.tertiaryColor,20),this.git3=W(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=W(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=W(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=W(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=W(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||W(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||W(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Dr,"Theme"),Dr),S0=p(e=>{const t=new k0;return t.calculate(e),t},"getThemeVariables"),Rr,T0=(Rr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Bi(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=J(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||J(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||w(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||z(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||z(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||W(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Yi(this.quadrant1Fill)?W(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||J(z(this.git0),25),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ba}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Rr,"Theme"),Rr),L0=p(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),Ir,B0=(Ir=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=W("#cde498",10),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.primaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=J(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=J(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||J(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||w(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Yi(this.quadrant1Fill)?W(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ba}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ir,"Theme"),Ir),A0=p(e=>{const t=new B0;return t.calculate(e),t},"getThemeVariables"),Pr,M0=(Pr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=W(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=W(this.contrast,55),this.border2=this.contrast,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||z(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||J(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=W(this.contrast,30),this.sectionBkgColor2=W(this.contrast,30),this.taskBorderColor=J(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=W(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=J(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Yi(this.quadrant1Fill)?W(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=J(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ba}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Pr,"Theme"),Pr),E0=p(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),Fe={base:{getThemeVariables:v0},dark:{getThemeVariables:S0},default:{getThemeVariables:L0},forest:{getThemeVariables:A0},neutral:{getThemeVariables:E0}},ue={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Lh={...ue,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Fe.default.getThemeVariables(),sequence:{...ue.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ue.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ue.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ue.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ue.pie,useWidth:984},xyChart:{...ue.xyChart,useWidth:void 0},requirement:{...ue.requirement,useWidth:void 0},packet:{...ue.packet},radar:{...ue.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Bh=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Bh(e[i],"")]:[...r,t+i],[]),"keyify"),F0=new Set(Bh(Lh,"")),Ah=Lh,Rn=p(e=>{if($.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Rn(t));return}for(const t of Object.keys(e)){if($.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!F0.has(t)||e[t]==null){$.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){$.debug("sanitizing object",t),Rn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&($.debug("sanitizing css option",t),e[t]=$0(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}$.debug("After sanitization",e)}},"sanitizeDirective"),$0=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Hr=Object.freeze(Ah),Yt=Mt({},Hr),Mh,jr=[],Mi=Mt({},Hr),_a=p((e,t)=>{let r=Mt({},e),i={};for(const n of t)$h(n),i=Mt(i,n);if(r=Mt(r,i),i.theme&&i.theme in Fe){const n=Mt({},Mh),a=Mt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Fe&&(r.themeVariables=Fe[r.theme].getThemeVariables(a))}return Mi=r,Oh(Mi),Mi},"updateCurrentConfig"),O0=p(e=>(Yt=Mt({},Hr),Yt=Mt(Yt,e),e.theme&&Fe[e.theme]&&(Yt.themeVariables=Fe[e.theme].getThemeVariables(e.themeVariables)),_a(Yt,jr),Yt),"setSiteConfig"),D0=p(e=>{Mh=Mt({},e)},"saveConfigFromInitialize"),R0=p(e=>(Yt=Mt(Yt,e),_a(Yt,jr),Yt),"updateSiteConfig"),Eh=p(()=>Mt({},Yt),"getSiteConfig"),Fh=p(e=>(Oh(e),Mt(Mi,e),Vt()),"setConfig"),Vt=p(()=>Mt({},Mi),"getConfig"),$h=p(e=>{e&&(["secure",...Yt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&($.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&$h(e[t])}))},"sanitize"),I0=p(e=>{Rn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),jr.push(e),_a(Yt,jr)},"addDirective"),In=p((e=Yt)=>{jr=[],_a(e,jr)},"reset"),P0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ul={},N0=p(e=>{Ul[e]||($.warn(P0[e]),Ul[e]=!0)},"issueWarning"),Oh=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&N0("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ui=/<br\s*\/?>/gi,z0=p(e=>e?Ih(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),W0=(()=>{let e=!1;return()=>{e||(Dh(),e=!0)}})();function Dh(){const e="data-temp-href-target";Wr.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Wr.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Dh,"setupDompurifyHooks");var Rh=p(e=>(W0(),Wr.sanitize(e)),"removeScript"),Gl=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Rh(e):r!=="loose"&&(e=Ih(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Y0(e))}return e},"sanitizeMore"),lr=p((e,t)=>e&&(t.dompurifyConfig?e=Wr.sanitize(Gl(e,t),t.dompurifyConfig).toString():e=Wr.sanitize(Gl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),q0=p((e,t)=>typeof e=="string"?lr(e,t):e.flat().map(r=>lr(r,t)),"sanitizeTextOrArray"),H0=p(e=>Ui.test(e),"hasBreaks"),j0=p(e=>e.split(Ui),"splitBreaks"),Y0=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ih=p(e=>e.replace(Ui,"#br#"),"breakToPlaceholder"),Ph=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Tt=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),U0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),G0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Vl=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];V0(a,o)&&(n=a+","+o,i++,r.pop())}r.push(X0(n))}return r.join("")},"parseGenericTypes"),vs=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),V0=p((e,t)=>{const r=vs(e,"~"),i=vs(t,"~");return r===1&&i===1},"shouldCombineSets"),X0=p(e=>{const t=vs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Xl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ks=/\$\$(.*)\$\$/g,Yr=p(e=>(e.match(ks)?.length??0)>0,"hasKatex"),FB=p(async(e,t)=>{e=await bo(e,t);const r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),bo=p(async(e,t)=>{if(!Yr(e))return e;if(!(Xl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ks,"MathML is unsupported in this environment.");{const{default:r}=await pt(async()=>{const{default:n}=await import("./katex-DsmCZfJr.js");return{default:n}},[]),i=t.forceLegacyMathML||!Xl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ui).map(n=>Yr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(ks,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatex"),Qr={getRows:z0,sanitizeText:lr,sanitizeTextOrArray:q0,hasBreaks:H0,splitBreaks:j0,lineBreakRegex:Ui,removeScript:Rh,getUrl:Ph,evaluate:Tt,getMax:U0,getMin:G0},Z0=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),K0=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Nh=p(function(e,t,r,i){const n=K0(t,r,i);Z0(e,n)},"configureSvgSize"),Q0=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;$.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;$.info(`Graph bounds: ${s}x${l}`,e),s=a+r*2,l=o+r*2,$.info(`Calculated bounds: ${s}x${l}`),Nh(t,l,s,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),vn={},J0=p((e,t,r)=>{let i="";return e in vn&&vn[e]?i=vn[e](r):$.warn(`No theme found for ${e}`),` & {
|
|
5
|
+
font-family: ${r.fontFamily};
|
|
6
|
+
font-size: ${r.fontSize};
|
|
7
|
+
fill: ${r.textColor}
|
|
8
|
+
}
|
|
9
|
+
@keyframes edge-animation-frame {
|
|
10
|
+
from {
|
|
11
|
+
stroke-dashoffset: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@keyframes dash {
|
|
15
|
+
to {
|
|
16
|
+
stroke-dashoffset: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
& .edge-animation-slow {
|
|
20
|
+
stroke-dasharray: 9,5 !important;
|
|
21
|
+
stroke-dashoffset: 900;
|
|
22
|
+
animation: dash 50s linear infinite;
|
|
23
|
+
stroke-linecap: round;
|
|
24
|
+
}
|
|
25
|
+
& .edge-animation-fast {
|
|
26
|
+
stroke-dasharray: 9,5 !important;
|
|
27
|
+
stroke-dashoffset: 900;
|
|
28
|
+
animation: dash 20s linear infinite;
|
|
29
|
+
stroke-linecap: round;
|
|
30
|
+
}
|
|
31
|
+
/* Classes common for multiple diagrams */
|
|
32
|
+
|
|
33
|
+
& .error-icon {
|
|
34
|
+
fill: ${r.errorBkgColor};
|
|
35
|
+
}
|
|
36
|
+
& .error-text {
|
|
37
|
+
fill: ${r.errorTextColor};
|
|
38
|
+
stroke: ${r.errorTextColor};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& .edge-thickness-normal {
|
|
42
|
+
stroke-width: 1px;
|
|
43
|
+
}
|
|
44
|
+
& .edge-thickness-thick {
|
|
45
|
+
stroke-width: 3.5px
|
|
46
|
+
}
|
|
47
|
+
& .edge-pattern-solid {
|
|
48
|
+
stroke-dasharray: 0;
|
|
49
|
+
}
|
|
50
|
+
& .edge-thickness-invisible {
|
|
51
|
+
stroke-width: 0;
|
|
52
|
+
fill: none;
|
|
53
|
+
}
|
|
54
|
+
& .edge-pattern-dashed{
|
|
55
|
+
stroke-dasharray: 3;
|
|
56
|
+
}
|
|
57
|
+
.edge-pattern-dotted {
|
|
58
|
+
stroke-dasharray: 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& .marker {
|
|
62
|
+
fill: ${r.lineColor};
|
|
63
|
+
stroke: ${r.lineColor};
|
|
64
|
+
}
|
|
65
|
+
& .marker.cross {
|
|
66
|
+
stroke: ${r.lineColor};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
& svg {
|
|
70
|
+
font-family: ${r.fontFamily};
|
|
71
|
+
font-size: ${r.fontSize};
|
|
72
|
+
}
|
|
73
|
+
& p {
|
|
74
|
+
margin: 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${i}
|
|
78
|
+
|
|
79
|
+
${t}
|
|
80
|
+
`},"getStyles"),ty=p((e,t)=>{t!==void 0&&(vn[e]=t)},"addStylesForDiagram"),ey=J0,zh={};b0(zh,{clear:()=>ry,getAccDescription:()=>sy,getAccTitle:()=>ny,getDiagramTitle:()=>ly,setAccDescription:()=>ay,setAccTitle:()=>iy,setDiagramTitle:()=>oy});var _o="",Co="",wo="",vo=p(e=>lr(e,Vt()),"sanitizeText"),ry=p(()=>{_o="",wo="",Co=""},"clear"),iy=p(e=>{_o=vo(e).replace(/^\s+/g,"")},"setAccTitle"),ny=p(()=>_o,"getAccTitle"),ay=p(e=>{wo=vo(e).replace(/\n\s+/g,`
|
|
81
|
+
`)},"setAccDescription"),sy=p(()=>wo,"getAccDescription"),oy=p(e=>{Co=vo(e)},"setDiagramTitle"),ly=p(()=>Co,"getDiagramTitle"),Zl=$,cy=yo,ut=Vt,$B=Fh,OB=Hr,Ca=p(e=>lr(e,ut()),"sanitizeText"),hy=Q0,uy=p(()=>zh,"getCommonDb"),Pn={},Nn=p((e,t,r)=>{Pn[e]&&Zl.warn(`Diagram with id ${e} already registered. Overwriting.`),Pn[e]=t,r&&Th(e,r),ty(e,t.styles),t.injectUtils?.(Zl,cy,ut,Ca,hy,uy(),()=>{})},"registerDiagram"),Ss=p(e=>{if(e in Pn)return Pn[e];throw new fy(e)},"getDiagram"),Nr,fy=(Nr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Nr,"DiagramNotFoundError"),Nr);function ko(e){return typeof e>"u"||e===null}p(ko,"isNothing");function Wh(e){return typeof e=="object"&&e!==null}p(Wh,"isObject");function qh(e){return Array.isArray(e)?e:ko(e)?[]:[e]}p(qh,"toArray");function Hh(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(Hh,"extend");function jh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(jh,"repeat");function Yh(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Yh,"isNegativeZero");var dy=ko,py=Wh,gy=qh,my=jh,yy=Yh,xy=Hh,St={isNothing:dy,isObject:py,toArray:gy,repeat:my,isNegativeZero:yy,extend:xy};function So(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
82
|
+
|
|
83
|
+
`+e.mark.snippet),i+" "+r):i}p(So,"formatError");function Ur(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=So(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Ur,"YAMLException$1");Ur.prototype=Object.create(Error.prototype);Ur.prototype.constructor=Ur;Ur.prototype.toString=p(function(t){return this.name+": "+So(this,t)},"toString");var Ut=Ur;function kn(e,t,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-t>s&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(kn,"getLine");function Sn(e,t){return St.repeat(" ",t-e.length)+e}p(Sn,"padStart");function Uh(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=kn(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),s=St.repeat(" ",t.indent)+Sn((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
84
|
+
`+s;for(c=kn(e.buffer,i[o],n[o],e.position,u),s+=St.repeat(" ",t.indent)+Sn((e.line+1).toString(),h)+" | "+c.str+`
|
|
85
|
+
`,s+=St.repeat("-",t.indent+h+3+c.pos)+`^
|
|
86
|
+
`,l=1;l<=t.linesAfter&&!(o+l>=n.length);l++)c=kn(e.buffer,i[o+l],n[o+l],e.position-(i[o]-i[o+l]),u),s+=St.repeat(" ",t.indent)+Sn((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
87
|
+
`;return s.replace(/\n$/,"")}p(Uh,"makeSnippet");var by=Uh,_y=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Cy=["scalar","sequence","mapping"];function Gh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Gh,"compileStyleAliases");function Vh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(_y.indexOf(r)===-1)throw new Ut('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Gh(t.styleAliases||null),Cy.indexOf(this.kind)===-1)throw new Ut('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Vh,"Type$1");var Ot=Vh;function Ts(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}p(Ts,"compileList");function Xh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(Xh,"compileMap");function zn(e){return this.extend(e)}p(zn,"Schema$1");zn.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Ot)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Ut("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Ot))throw new Ut("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Ut("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Ut("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Ot))throw new Ut("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(zn.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Ts(n,"implicit"),n.compiledExplicit=Ts(n,"explicit"),n.compiledTypeMap=Xh(n.compiledImplicit,n.compiledExplicit),n},"extend");var wy=zn,vy=new Ot("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),ky=new Ot("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),Sy=new Ot("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Ty=new wy({explicit:[vy,ky,Sy]});function Zh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Zh,"resolveYamlNull");function Kh(){return null}p(Kh,"constructYamlNull");function Qh(e){return e===null}p(Qh,"isNull");var Ly=new Ot("tag:yaml.org,2002:null",{kind:"scalar",resolve:Zh,construct:Kh,predicate:Qh,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function Jh(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(Jh,"resolveYamlBoolean");function tu(e){return e==="true"||e==="True"||e==="TRUE"}p(tu,"constructYamlBoolean");function eu(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(eu,"isBoolean");var By=new Ot("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Jh,construct:tu,predicate:eu,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ru(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(ru,"isHexCode");function iu(e){return 48<=e&&e<=55}p(iu,"isOctCode");function nu(e){return 48<=e&&e<=57}p(nu,"isDecCode");function au(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!ru(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!iu(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!nu(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(au,"resolveYamlInteger");function su(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(su,"constructYamlInteger");function ou(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!St.isNegativeZero(e)}p(ou,"isInteger");var Ay=new Ot("tag:yaml.org,2002:int",{kind:"scalar",resolve:au,construct:su,predicate:ou,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),My=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function lu(e){return!(e===null||!My.test(e)||e[e.length-1]==="_")}p(lu,"resolveYamlFloat");function cu(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(cu,"constructYamlFloat");var Ey=/^[-+]?[0-9]+e/;function hu(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(St.isNegativeZero(e))return"-0.0";return r=e.toString(10),Ey.test(r)?r.replace("e",".e"):r}p(hu,"representYamlFloat");function uu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||St.isNegativeZero(e))}p(uu,"isFloat");var Fy=new Ot("tag:yaml.org,2002:float",{kind:"scalar",resolve:lu,construct:cu,predicate:uu,represent:hu,defaultStyle:"lowercase"}),fu=Ty.extend({implicit:[Ly,By,Ay,Fy]}),$y=fu,du=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),pu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function gu(e){return e===null?!1:du.exec(e)!==null||pu.exec(e)!==null}p(gu,"resolveYamlTimestamp");function mu(e){var t,r,i,n,a,o,s,l=0,c=null,h,u,f;if(t=du.exec(e),t===null&&(t=pu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,a,o,s,l)),c&&f.setTime(f.getTime()-c),f}p(mu,"constructYamlTimestamp");function yu(e){return e.toISOString()}p(yu,"representYamlTimestamp");var Oy=new Ot("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gu,construct:mu,instanceOf:Date,represent:yu});function xu(e){return e==="<<"||e===null}p(xu,"resolveYamlMerge");var Dy=new Ot("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xu}),To=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
88
|
+
\r`;function bu(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=To;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(bu,"resolveYamlBinary");function _u(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=To,o=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}p(_u,"constructYamlBinary");function Cu(e){var t="",r=0,i,n,a=e.length,o=To;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(Cu,"representYamlBinary");function wu(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(wu,"isBinary");var Ry=new Ot("tag:yaml.org,2002:binary",{kind:"scalar",resolve:bu,construct:_u,predicate:wu,represent:Cu}),Iy=Object.prototype.hasOwnProperty,Py=Object.prototype.toString;function vu(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],o=!1,Py.call(n)!=="[object Object]")return!1;for(a in n)if(Iy.call(n,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(vu,"resolveYamlOmap");function ku(e){return e!==null?e:[]}p(ku,"constructYamlOmap");var Ny=new Ot("tag:yaml.org,2002:omap",{kind:"sequence",resolve:vu,construct:ku}),zy=Object.prototype.toString;function Su(e){if(e===null)return!0;var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],zy.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(Su,"resolveYamlPairs");function Tu(e){if(e===null)return[];var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(Tu,"constructYamlPairs");var Wy=new Ot("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Su,construct:Tu}),qy=Object.prototype.hasOwnProperty;function Lu(e){if(e===null)return!0;var t,r=e;for(t in r)if(qy.call(r,t)&&r[t]!==null)return!1;return!0}p(Lu,"resolveYamlSet");function Bu(e){return e!==null?e:{}}p(Bu,"constructYamlSet");var Hy=new Ot("tag:yaml.org,2002:set",{kind:"mapping",resolve:Lu,construct:Bu}),Au=$y.extend({implicit:[Oy,Dy],explicit:[Ry,Ny,Wy,Hy]}),je=Object.prototype.hasOwnProperty,Wn=1,Mu=2,Eu=3,qn=4,ns=1,jy=2,Kl=3,Yy=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Uy=/[\x85\u2028\u2029]/,Gy=/[,\[\]\{\}]/,Fu=/^(?:!|!!|![a-z\-]+!)$/i,$u=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ls(e){return Object.prototype.toString.call(e)}p(Ls,"_class");function oe(e){return e===10||e===13}p(oe,"is_EOL");function He(e){return e===9||e===32}p(He,"is_WHITE_SPACE");function Pt(e){return e===9||e===32||e===10||e===13}p(Pt,"is_WS_OR_EOL");function rr(e){return e===44||e===91||e===93||e===123||e===125}p(rr,"is_FLOW_INDICATOR");function Ou(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Ou,"fromHexCode");function Du(e){return e===120?2:e===117?4:e===85?8:0}p(Du,"escapedHexLen");function Ru(e){return 48<=e&&e<=57?e-48:-1}p(Ru,"fromDecimalCode");function Bs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
89
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(Bs,"simpleEscapeSequence");function Iu(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Iu,"charFromCodepoint");var Pu=new Array(256),Nu=new Array(256);for(Ke=0;Ke<256;Ke++)Pu[Ke]=Bs(Ke)?1:0,Nu[Ke]=Bs(Ke);var Ke;function zu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Au,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(zu,"State$1");function Lo(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=by(r),new Ut(t,r)}p(Lo,"generateError");function Z(e,t){throw Lo(e,t)}p(Z,"throwError");function $i(e,t){e.onWarning&&e.onWarning.call(null,Lo(e,t))}p($i,"throwWarning");var Ql={YAML:p(function(t,r,i){var n,a,o;t.version!==null&&Z(t,"duplication of %YAML directive"),i.length!==1&&Z(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Z(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&Z(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&$i(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Fu.test(n)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),je.call(t.tagMap,n)&&Z(t,'there is a previously declared suffix for "'+n+'" tag handle'),$u.test(a)||Z(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Z(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function $e(e,t,r,i){var n,a,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(n=0,a=s.length;n<a;n+=1)o=s.charCodeAt(n),o===9||32<=o&&o<=1114111||Z(e,"expected valid JSON character");else Yy.test(s)&&Z(e,"the stream contains non-printable characters");e.result+=s}}p($e,"captureSegment");function As(e,t,r,i){var n,a,o,s;for(St.isObject(r)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,s=n.length;o<s;o+=1)a=n[o],je.call(t,a)||(t[a]=r[a],i[a]=!0)}p(As,"mergeMappings");function ir(e,t,r,i,n,a,o,s,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&Z(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Ls(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Ls(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)As(e,t,a[c],r);else As(e,t,a,r);else!e.json&&!je.call(r,n)&&je.call(t,n)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,Z(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(ir,"storeMappingPair");function wa(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(wa,"readLineBreak");function bt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;He(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(oe(n))for(wa(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&$i(e,"deficient indentation"),i}p(bt,"skipSeparationSpace");function Gi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Pt(r)))}p(Gi,"testDocumentSeparator");function va(e,t){t===1?e.result+=" ":t>1&&(e.result+=St.repeat(`
|
|
90
|
+
`,t-1))}p(va,"writeFoldedLines");function Wu(e,t,r){var i,n,a,o,s,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),Pt(d)||rr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),Pt(n)||r&&rr(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),Pt(n)||r&&rr(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Pt(i))break}else{if(e.position===e.lineStart&&Gi(e)||r&&rr(d))break;if(oe(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,bt(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&($e(e,a,o,!1),va(e,e.line-l),a=o=e.position,s=!1),He(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return $e(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(Wu,"readPlainScalar");function qu(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if($e(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else oe(r)?($e(e,i,n,!0),va(e,bt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Gi(e)?Z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Z(e,"unexpected end of the stream within a single quoted scalar")}p(qu,"readSingleQuotedScalar");function Hu(e,t){var r,i,n,a,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return $e(e,r,e.position,!0),e.position++,!0;if(s===92){if($e(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),oe(s))bt(e,!1,t);else if(s<256&&Pu[s])e.result+=Nu[s],e.position++;else if((o=Du(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=Ou(s))>=0?a=(a<<4)+o:Z(e,"expected hexadecimal character");e.result+=Iu(a),e.position++}else Z(e,"unknown escape sequence");r=i=e.position}else oe(s)?($e(e,r,i,!0),va(e,bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Gi(e)?Z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Z(e,"unexpected end of the stream within a double quoted scalar")}p(Hu,"readDoubleQuotedScalar");function ju(e,t){var r=!0,i,n,a,o=e.tag,s,l=e.anchor,c,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(bt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=s,!0;r?b===44&&Z(e,"expected the node content, but found ','"):Z(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Pt(c)&&(u=f=!0,e.position++,bt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,cr(e,t,Wn,!1,!0),y=e.tag,m=e.result,bt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),bt(e,!0,t),cr(e,t,Wn,!1,!0),x=e.result),d?ir(e,s,g,y,m,x,i,n,a):u?s.push(ir(e,null,g,y,m,x,i,n,a)):s.push(m),bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}Z(e,"unexpected end of the stream within a flow collection")}p(ju,"readFlowCollection");function Yu(e,t){var r,i,n=ns,a=!1,o=!1,s=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)ns===n?n=u===43?Kl:jy:Z(e,"repeat of a chomping mode identifier");else if((h=Ru(u))>=0)h===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Z(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(He(u)){do u=e.input.charCodeAt(++e.position);while(He(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!oe(u)&&u!==0)}for(;u!==0;){for(wa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),oe(u)){l++;continue}if(e.lineIndent<s){n===Kl?e.result+=St.repeat(`
|
|
91
|
+
`,a?1+l:l):n===ns&&a&&(e.result+=`
|
|
92
|
+
`);break}for(i?He(u)?(c=!0,e.result+=St.repeat(`
|
|
93
|
+
`,a?1+l:l)):c?(c=!1,e.result+=St.repeat(`
|
|
94
|
+
`,l+1)):l===0?a&&(e.result+=" "):e.result+=St.repeat(`
|
|
95
|
+
`,l):e.result+=St.repeat(`
|
|
96
|
+
`,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!oe(u)&&u!==0;)u=e.input.charCodeAt(++e.position);$e(e,r,e.position,!1)}return!0}p(Yu,"readBlockScalar");function Ms(e,t){var r,i=e.tag,n=e.anchor,a=[],o,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Pt(o))));){if(s=!0,e.position++,bt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,cr(e,t,Eu,!1,!0),a.push(e.result),bt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)Z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(Ms,"readBlockSequence");function Uu(e,t,r){var i,n,a,o,s,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Pt(i))b===63?(y&&(ir(e,u,f,d,g,null,o,s,l),d=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):Z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,s=e.lineStart,l=e.position,!cr(e,r,Mu,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);He(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Pt(b)||Z(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(ir(e,u,f,d,g,null,o,s,l),d=g=m=null),x=!0,y=!1,n=!1,d=e.tag,g=e.result;else if(x)Z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)Z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,l=e.position),cr(e,t,qn,!0,n)&&(y?g=e.result:m=e.result),y||(ir(e,u,f,d,g,m,o,s,l),d=g=m=null),bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)Z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&ir(e,u,f,d,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(Uu,"readBlockMapping");function Gu(e){var t,r=!1,i=!1,n,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&Z(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Z(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Pt(o);)o===33&&(i?Z(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Fu.test(n)||Z(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Gy.test(a)&&Z(e,"tag suffix cannot contain flow indicator characters")}a&&!$u.test(a)&&Z(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{Z(e,"tag name is malformed: "+a)}return r?e.tag=a:je.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:Z(e,'undeclared tag handle "'+n+'"'),!0}p(Gu,"readTagProperty");function Vu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Z(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Pt(r)&&!rr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(Vu,"readAnchorProperty");function Xu(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Pt(i)&&!rr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),je.call(e.anchorMap,r)||Z(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],bt(e,!0,-1),!0}p(Xu,"readAlias");function cr(e,t,r,i,n){var a,o,s,l=1,c=!1,h=!1,u,f,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=qn===r||Eu===r,i&&bt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Gu(e)||Vu(e);)bt(e,!0,-1)?(c=!0,s=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=c||n),(l===1||qn===r)&&(Wn===r||Mu===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?s&&(Ms(e,y)||Uu(e,y,m))||ju(e,m)?h=!0:(o&&Yu(e,m)||qu(e,m)||Hu(e,m)?h=!0:Xu(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):Wu(e,m,Wn===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&Ms(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(je.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||Z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(cr,"composeNode");function Zu(e){var t=e.position,r,i,n,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(bt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Pt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Z(e,"directive name must not be less than one character in length");o!==0;){for(;He(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!oe(o));break}if(oe(o))break;for(r=e.position;o!==0&&!Pt(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&wa(e),je.call(Ql,i)?Ql[i](e,i,n):$i(e,'unknown document directive "'+i+'"')}if(bt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,bt(e,!0,-1)):a&&Z(e,"directives end mark is expected"),cr(e,e.lineIndent-1,qn,!1,!0),bt(e,!0,-1),e.checkLineBreaks&&Uy.test(e.input.slice(t,e.position))&&$i(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Gi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,bt(e,!0,-1));return}if(e.position<e.length-1)Z(e,"end of the stream or a document separator is expected");else return}p(Zu,"readDocument");function Bo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
97
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new zu(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Z(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Zu(r);return r.documents}p(Bo,"loadDocuments");function Vy(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Bo(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Vy,"loadAll$1");function Ku(e,t){var r=Bo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Ut("expected a single document in the stream, but found more")}}p(Ku,"load$1");var Xy=Ku,Zy={load:Xy},Qu=Object.prototype.toString,Ju=Object.prototype.hasOwnProperty,Ao=65279,Ky=9,Oi=10,Qy=13,Jy=32,tx=33,ex=34,Es=35,rx=37,ix=38,nx=39,ax=42,tf=44,sx=45,Hn=58,ox=61,lx=62,cx=63,hx=64,ef=91,rf=93,ux=96,nf=123,fx=124,af=125,Dt={};Dt[0]="\\0";Dt[7]="\\a";Dt[8]="\\b";Dt[9]="\\t";Dt[10]="\\n";Dt[11]="\\v";Dt[12]="\\f";Dt[13]="\\r";Dt[27]="\\e";Dt[34]='\\"';Dt[92]="\\\\";Dt[133]="\\N";Dt[160]="\\_";Dt[8232]="\\L";Dt[8233]="\\P";var dx=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],px=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function sf(e,t){var r,i,n,a,o,s,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)o=i[n],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Ju.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}p(sf,"compileStyleMap");function of(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Ut("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+St.repeat("0",i-t.length)+t}p(of,"encodeHex");var gx=1,Di=2;function lf(e){this.schema=e.schema||Au,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=St.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=sf(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Di:gx,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(lf,"State");function Fs(e,t){for(var r=St.repeat(" ",t),i=0,n=-1,a="",o,s=e.length;i<s;)n=e.indexOf(`
|
|
98
|
+
`,i),n===-1?(o=e.slice(i),i=s):(o=e.slice(i,n+1),i=n+1),o.length&&o!==`
|
|
99
|
+
`&&(a+=r),a+=o;return a}p(Fs,"indentString");function jn(e,t){return`
|
|
100
|
+
`+St.repeat(" ",e.indent*t)}p(jn,"generateNextLine");function cf(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(cf,"testImplicitResolving");function Ri(e){return e===Jy||e===Ky}p(Ri,"isWhitespace");function Gr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ao||65536<=e&&e<=1114111}p(Gr,"isPrintable");function $s(e){return Gr(e)&&e!==Ao&&e!==Qy&&e!==Oi}p($s,"isNsCharOrWhitespace");function Os(e,t,r){var i=$s(e),n=i&&!Ri(e);return(r?i:i&&e!==tf&&e!==ef&&e!==rf&&e!==nf&&e!==af)&&e!==Es&&!(t===Hn&&!n)||$s(t)&&!Ri(t)&&e===Es||t===Hn&&n}p(Os,"isPlainSafe");function hf(e){return Gr(e)&&e!==Ao&&!Ri(e)&&e!==sx&&e!==cx&&e!==Hn&&e!==tf&&e!==ef&&e!==rf&&e!==nf&&e!==af&&e!==Es&&e!==ix&&e!==ax&&e!==tx&&e!==fx&&e!==ox&&e!==lx&&e!==nx&&e!==ex&&e!==rx&&e!==hx&&e!==ux}p(hf,"isPlainSafeFirst");function uf(e){return!Ri(e)&&e!==Hn}p(uf,"isPlainSafeLast");function Ar(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Ar,"codePointAt");function Mo(e){var t=/^\n* /;return t.test(e)}p(Mo,"needIndentIndicator");var ff=1,Ds=2,df=3,pf=4,Lr=5;function gf(e,t,r,i,n,a,o,s){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=hf(Ar(e,0))&&uf(Ar(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Ar(e,l),!Gr(c))return Lr;m=m&&Os(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Ar(e,l),c===Oi)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Gr(c))return Lr;m=m&&Os(c,h,s),h=c}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!n(e)?ff:a===Di?Lr:Ds:r>9&&Mo(e)?Lr:o?a===Di?Lr:Ds:f?pf:df}p(gf,"chooseScalarStyle");function mf(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===Di?'""':"''";if(!e.noCompatMode&&(dx.indexOf(t)!==-1||px.test(t)))return e.quotingType===Di?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return cf(e,c)}switch(p(l,"testAmbiguity"),gf(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case ff:return t;case Ds:return"'"+t.replace(/'/g,"''")+"'";case df:return"|"+Rs(t,e.indent)+Is(Fs(t,a));case pf:return">"+Rs(t,e.indent)+Is(Fs(yf(t,o),a));case Lr:return'"'+xf(t)+'"';default:throw new Ut("impossible error: invalid scalar style")}}()}p(mf,"writeScalar");function Rs(e,t){var r=Mo(e)?String(t):"",i=e[e.length-1]===`
|
|
101
|
+
`,n=i&&(e[e.length-2]===`
|
|
102
|
+
`||e===`
|
|
103
|
+
`),a=n?"+":i?"":"-";return r+a+`
|
|
104
|
+
`}p(Rs,"blockHeader");function Is(e){return e[e.length-1]===`
|
|
105
|
+
`?e.slice(0,-1):e}p(Is,"dropEndingNewline");function yf(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
|
|
106
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,Ps(e.slice(0,c),t)}(),n=e[0]===`
|
|
107
|
+
`||e[0]===" ",a,o;o=r.exec(e);){var s=o[1],l=o[2];a=l[0]===" ",i+=s+(!n&&!a&&l!==""?`
|
|
108
|
+
`:"")+Ps(l,t),n=a}return i}p(yf,"foldString");function Ps(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,l+=`
|
|
109
|
+
`+e.slice(n,a),n=a+1),o=s;return l+=`
|
|
110
|
+
`,e.length-n>t&&o>n?l+=e.slice(n,o)+`
|
|
111
|
+
`+e.slice(o+1):l+=e.slice(n),l.slice(1)}p(Ps,"foldLine");function xf(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Ar(e,n),i=Dt[r],!i&&Gr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||of(r);return t}p(xf,"escapeString");function bf(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(xe(e,t,s,!1,!1)||typeof s>"u"&&xe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(bf,"writeFlowSequence");function Ns(e,t,r,i){var n="",a=e.tag,o,s,l;for(o=0,s=r.length;o<s;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(xe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&xe(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=jn(e,t)),e.dump&&Oi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(Ns,"writeBlockSequence");function _f(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,l,c,h;for(o=0,s=a.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),xe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),xe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(_f,"writeFlowMapping");function Cf(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Ut("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)f="",(!i||n!=="")&&(f+=jn(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),xe(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Oi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=jn(e,t)),xe(e,t+1,h,!0,u)&&(e.dump&&Oi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}p(Cf,"writeBlockMapping");function zs(e,t,r){var i,n,a,o,s,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a<o;a+=1)if(s=n[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,Qu.call(s.represent)==="[object Function]")i=s.represent(t,l);else if(Ju.call(s.represent,l))i=s.represent[l](t,l);else throw new Ut("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(zs,"detectType");function xe(e,t,r,i,n,a,o){e.tag=null,e.dump=r,zs(e,r,!1)||zs(e,r,!0);var s=Qu.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(Cf(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(_f(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Ns(e,t-1,e.dump,n):Ns(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(bf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&mf(e,e.dump,t,a,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ut("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(xe,"writeNode");function wf(e,t){var r=[],i=[],n,a;for(Yn(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(wf,"getDuplicateReferences");function Yn(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)Yn(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)Yn(e[i[n]],t,r)}p(Yn,"inspectNode");function mx(e,t){t=t||{};var r=new lf(t);r.noRefs||wf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),xe(r,0,i,!0,!0)?r.dump+`
|
|
112
|
+
`:""}p(mx,"dump$1");function yx(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(yx,"renamed");var xx=fu,bx=Zy.load;/*! Bundled license information:
|
|
113
|
+
|
|
114
|
+
js-yaml/dist/js-yaml.mjs:
|
|
115
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
116
|
+
*/var te={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Ci(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=yt(e),t=yt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}p(Ci,"calculateDeltaAndAngle");var yt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),_x=p(e=>({x:p(function(t,r,i){let n=0;const a=yt(i[0]).x<yt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(te,e.arrowTypeStart)){const{angle:d,deltaX:g}=Ci(i[0],i[1]);n=te[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(te,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Ci(i[i.length-1],i[i.length-2]);n=te[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(yt(t).x-yt(i[i.length-1]).x),s=Math.abs(yt(t).y-yt(i[i.length-1]).y),l=Math.abs(yt(t).x-yt(i[0]).x),c=Math.abs(yt(t).y-yt(i[0]).y),h=te[e.arrowTypeStart],u=te[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=a==="right"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="right"?-1:1,n+=d}return yt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=yt(i[0]).y<yt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(te,e.arrowTypeStart)){const{angle:d,deltaY:g}=Ci(i[0],i[1]);n=te[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(te,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Ci(i[i.length-1],i[i.length-2]);n=te[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(yt(t).y-yt(i[i.length-1]).y),s=Math.abs(yt(t).x-yt(i[i.length-1]).x),l=Math.abs(yt(t).y-yt(i[0]).y),c=Math.abs(yt(t).x-yt(i[0]).x),h=te[e.arrowTypeStart],u=te[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=a==="up"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="up"?-1:1,n+=d}return yt(t).y+n},"y")}),"getLineFunctionsWithOffset"),Eo=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Cx=p(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Jr=p(e=>{const t=wx([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),wx=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),vf=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),V=p(e=>{const{stylesArray:t}=Jr(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];vf(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),U=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=Jr(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),fi={},kt={},Jl;function vx(){return Jl||(Jl=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.BLANK_URL=kt.relativeFirstCharacters=kt.whitespaceEscapeCharsRegex=kt.urlSchemeRegex=kt.ctrlCharactersRegex=kt.htmlCtrlEntityRegex=kt.htmlEntitiesRegex=kt.invalidProtocolRegex=void 0,kt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,kt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,kt.htmlCtrlEntityRegex=/&(newline|tab);/gi,kt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,kt.urlSchemeRegex=/^.+(:|:)/gim,kt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,kt.relativeFirstCharacters=[".","/"],kt.BLANK_URL="about:blank"),kt}var tc;function kx(){if(tc)return fi;tc=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.sanitizeUrl=void 0;var e=vx();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(e.ctrlCharactersRegex,"");return s.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var s,l=n(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),s=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(s&&s.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return fi.sanitizeUrl=a,fi}var Sx=kx(),Tx={value:()=>{}};function kf(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Tn(r)}function Tn(e){this._=e}function Lx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Tn.prototype=kf.prototype={constructor:Tn,on:function(e,t){var r=this._,i=Lx(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=Bx(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=ec(r[n],e.name,t);else if(t==null)for(n in r)r[n]=ec(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Tn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function Bx(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function ec(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=Tx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ws="http://www.w3.org/1999/xhtml";const rc={svg:"http://www.w3.org/2000/svg",xhtml:Ws,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ka(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),rc.hasOwnProperty(t)?{space:rc[t],local:e}:e}function Ax(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ws&&t.documentElement.namespaceURI===Ws?t.createElement(e):t.createElementNS(r,e)}}function Mx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Sf(e){var t=ka(e);return(t.local?Mx:Ax)(t)}function Ex(){}function Fo(e){return e==null?Ex:function(){return this.querySelector(e)}}function Fx(e){typeof e!="function"&&(e=Fo(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=new Array(o),l,c,h=0;h<o;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),s[h]=c);return new Zt(i,this._parents)}function $x(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ox(){return[]}function Tf(e){return e==null?Ox:function(){return this.querySelectorAll(e)}}function Dx(e){return function(){return $x(e.apply(this,arguments))}}function Rx(e){typeof e=="function"?e=Dx(e):e=Tf(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var o=t[a],s=o.length,l,c=0;c<s;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),n.push(l));return new Zt(i,n)}function Lf(e){return function(){return this.matches(e)}}function Bf(e){return function(t){return t.matches(e)}}var Ix=Array.prototype.find;function Px(e){return function(){return Ix.call(this.children,e)}}function Nx(){return this.firstElementChild}function zx(e){return this.select(e==null?Nx:Px(typeof e=="function"?e:Bf(e)))}var Wx=Array.prototype.filter;function qx(){return Array.from(this.children)}function Hx(e){return function(){return Wx.call(this.children,e)}}function jx(e){return this.selectAll(e==null?qx:Hx(typeof e=="function"?e:Bf(e)))}function Yx(e){typeof e!="function"&&(e=Lf(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Zt(i,this._parents)}function Af(e){return new Array(e.length)}function Ux(){return new Zt(this._enter||this._groups.map(Af),this._parents)}function Un(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Un.prototype={constructor:Un,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Gx(e){return function(){return e}}function Vx(e,t,r,i,n,a){for(var o=0,s,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new Un(e,a[o]);for(;o<l;++o)(s=t[o])&&(n[o]=s)}function Xx(e,t,r,i,n,a,o){var s,l,c=new Map,h=t.length,u=a.length,f=new Array(h),d;for(s=0;s<h;++s)(l=t[s])&&(f[s]=d=o.call(l,l.__data__,s,t)+"",c.has(d)?n[s]=l:c.set(d,l));for(s=0;s<u;++s)d=o.call(e,a[s],s,a)+"",(l=c.get(d))?(i[s]=l,l.__data__=a[s],c.delete(d)):r[s]=new Un(e,a[s]);for(s=0;s<h;++s)(l=t[s])&&c.get(f[s])===l&&(n[s]=l)}function Zx(e){return e.__data__}function Kx(e,t){if(!arguments.length)return Array.from(this,Zx);var r=t?Xx:Vx,i=this._parents,n=this._groups;typeof e!="function"&&(e=Gx(e));for(var a=n.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],f=u.length,d=Qx(e.call(h,h&&h.__data__,c,i)),g=d.length,m=s[c]=new Array(g),y=o[c]=new Array(g),x=l[c]=new Array(f);r(h,u,m,y,x,d,t);for(var b=0,_=0,k,v;b<g;++b)if(k=m[b]){for(b>=_&&(_=b+1);!(v=y[_])&&++_<g;);k._next=v||null}}return o=new Zt(o,i),o._enter=s,o._exit=l,o}function Qx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jx(){return new Zt(this._exit||this._groups.map(Af),this._parents)}function tb(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function eb(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,f=s[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(f[g]=d);for(;l<n;++l)s[l]=r[l];return new Zt(s,this._parents)}function rb(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],o;--n>=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function ib(e){e||(e=nb);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o=r[a],s=o.length,l=n[a]=new Array(s),c,h=0;h<s;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new Zt(n,this._parents).order()}function nb(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ab(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function sb(){return Array.from(this)}function ob(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null}function lb(){let e=0;for(const t of this)++e;return e}function cb(){return!this.node()}function hb(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,o=n.length,s;a<o;++a)(s=n[a])&&e.call(s,s.__data__,a,n);return this}function ub(e){return function(){this.removeAttribute(e)}}function fb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function db(e,t){return function(){this.setAttribute(e,t)}}function pb(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function mb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function yb(e,t){var r=ka(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?fb:ub:typeof t=="function"?r.local?mb:gb:r.local?pb:db)(r,t))}function Mf(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xb(e){return function(){this.style.removeProperty(e)}}function bb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function _b(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Cb(e,t,r){return arguments.length>1?this.each((t==null?xb:typeof t=="function"?_b:bb)(e,t,r??"")):Vr(this.node(),e)}function Vr(e,t){return e.style.getPropertyValue(t)||Mf(e).getComputedStyle(e,null).getPropertyValue(t)}function wb(e){return function(){delete this[e]}}function vb(e,t){return function(){this[e]=t}}function kb(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Sb(e,t){return arguments.length>1?this.each((t==null?wb:typeof t=="function"?kb:vb)(e,t)):this.node()[e]}function Ef(e){return e.trim().split(/^|\s+/)}function $o(e){return e.classList||new Ff(e)}function Ff(e){this._node=e,this._names=Ef(e.getAttribute("class")||"")}Ff.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function $f(e,t){for(var r=$o(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Of(e,t){for(var r=$o(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function Tb(e){return function(){$f(this,e)}}function Lb(e){return function(){Of(this,e)}}function Bb(e,t){return function(){(t.apply(this,arguments)?$f:Of)(this,e)}}function Ab(e,t){var r=Ef(e+"");if(arguments.length<2){for(var i=$o(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?Bb:t?Tb:Lb)(r,t))}function Mb(){this.textContent=""}function Eb(e){return function(){this.textContent=e}}function Fb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function $b(e){return arguments.length?this.each(e==null?Mb:(typeof e=="function"?Fb:Eb)(e)):this.node().textContent}function Ob(){this.innerHTML=""}function Db(e){return function(){this.innerHTML=e}}function Rb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ib(e){return arguments.length?this.each(e==null?Ob:(typeof e=="function"?Rb:Db)(e)):this.node().innerHTML}function Pb(){this.nextSibling&&this.parentNode.appendChild(this)}function Nb(){return this.each(Pb)}function zb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Wb(){return this.each(zb)}function qb(e){var t=typeof e=="function"?e:Sf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Hb(){return null}function jb(e,t){var r=typeof e=="function"?e:Sf(e),i=t==null?Hb:typeof t=="function"?t:Fo(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Yb(){var e=this.parentNode;e&&e.removeChild(this)}function Ub(){return this.each(Yb)}function Gb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Vb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xb(e){return this.select(e?Vb:Gb)}function Zb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Kb(e){return function(t){e.call(this,t,this.__data__)}}function Qb(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Jb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function t1(e,t,r){return function(){var i=this.__on,n,a=Kb(t);if(i){for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function e1(e,t,r){var i=Qb(e+""),n,a=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,h;l<c;++l)for(n=0,h=s[l];n<a;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?t1:Jb,n=0;n<a;++n)this.each(s(i[n],t,r));return this}function Df(e,t,r){var i=Mf(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function r1(e,t){return function(){return Df(this,e,t)}}function i1(e,t){return function(){return Df(this,e,t.apply(this,arguments))}}function n1(e,t){return this.each((typeof t=="function"?i1:r1)(e,t))}function*a1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,o;n<a;++n)(o=i[n])&&(yield o)}var Rf=[null];function Zt(e,t){this._groups=e,this._parents=t}function Vi(){return new Zt([[document.documentElement]],Rf)}function s1(){return this}Zt.prototype=Vi.prototype={constructor:Zt,select:Fx,selectAll:Rx,selectChild:zx,selectChildren:jx,filter:Yx,data:Kx,enter:Ux,exit:Jx,join:tb,merge:eb,selection:s1,order:rb,sort:ib,call:ab,nodes:sb,node:ob,size:lb,empty:cb,each:hb,attr:yb,style:Cb,property:Sb,classed:Ab,text:$b,html:Ib,raise:Nb,lower:Wb,append:qb,insert:jb,remove:Ub,clone:Xb,datum:Zb,on:e1,dispatch:n1,[Symbol.iterator]:a1};function ct(e){return typeof e=="string"?new Zt([[document.querySelector(e)]],[document.documentElement]):new Zt([[e]],Rf)}function Oo(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function If(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Xi(){}var Ii=.7,Gn=1/Ii,Er="\\s*([+-]?\\d+)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o1=/^#([0-9a-f]{3,8})$/,l1=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),c1=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),h1=new RegExp(`^rgba\\(${Er},${Er},${Er},${Pi}\\)$`),u1=new RegExp(`^rgba\\(${me},${me},${me},${Pi}\\)$`),f1=new RegExp(`^hsl\\(${Pi},${me},${me}\\)$`),d1=new RegExp(`^hsla\\(${Pi},${me},${me},${Pi}\\)$`),ic={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Oo(Xi,Ni,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nc,formatHex:nc,formatHex8:p1,formatHsl:g1,formatRgb:ac,toString:ac});function nc(){return this.rgb().formatHex()}function p1(){return this.rgb().formatHex8()}function g1(){return Pf(this).formatHsl()}function ac(){return this.rgb().formatRgb()}function Ni(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=o1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?sc(t):r===3?new Gt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?un(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?un(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=l1.exec(e))?new Gt(t[1],t[2],t[3],1):(t=c1.exec(e))?new Gt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=h1.exec(e))?un(t[1],t[2],t[3],t[4]):(t=u1.exec(e))?un(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=f1.exec(e))?cc(t[1],t[2]/100,t[3]/100,1):(t=d1.exec(e))?cc(t[1],t[2]/100,t[3]/100,t[4]):ic.hasOwnProperty(e)?sc(ic[e]):e==="transparent"?new Gt(NaN,NaN,NaN,0):null}function sc(e){return new Gt(e>>16&255,e>>8&255,e&255,1)}function un(e,t,r,i){return i<=0&&(e=t=r=NaN),new Gt(e,t,r,i)}function m1(e){return e instanceof Xi||(e=Ni(e)),e?(e=e.rgb(),new Gt(e.r,e.g,e.b,e.opacity)):new Gt}function qs(e,t,r,i){return arguments.length===1?m1(e):new Gt(e,t,r,i??1)}function Gt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Oo(Gt,qs,If(Xi,{brighter(e){return e=e==null?Gn:Math.pow(Gn,e),new Gt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new Gt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gt(sr(this.r),sr(this.g),sr(this.b),Vn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oc,formatHex:oc,formatHex8:y1,formatRgb:lc,toString:lc}));function oc(){return`#${nr(this.r)}${nr(this.g)}${nr(this.b)}`}function y1(){return`#${nr(this.r)}${nr(this.g)}${nr(this.b)}${nr((isNaN(this.opacity)?1:this.opacity)*255)}`}function lc(){const e=Vn(this.opacity);return`${e===1?"rgb(":"rgba("}${sr(this.r)}, ${sr(this.g)}, ${sr(this.b)}${e===1?")":`, ${e})`}`}function Vn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nr(e){return e=sr(e),(e<16?"0":"")+e.toString(16)}function cc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new se(e,t,r,i)}function Pf(e){if(e instanceof se)return new se(e.h,e.s,e.l,e.opacity);if(e instanceof Xi||(e=Ni(e)),!e)return new se;if(e instanceof se)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(t===a?o=(r-i)/s+(r<i)*6:r===a?o=(i-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+n:2-a-n,o*=60):s=l>0&&l<1?0:o,new se(o,s,l,e.opacity)}function x1(e,t,r,i){return arguments.length===1?Pf(e):new se(e,t,r,i??1)}function se(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Oo(se,x1,If(Xi,{brighter(e){return e=e==null?Gn:Math.pow(Gn,e),new se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Gt(as(e>=240?e-240:e+120,n,i),as(e,n,i),as(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new se(hc(this.h),fn(this.s),fn(this.l),Vn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Vn(this.opacity);return`${e===1?"hsl(":"hsla("}${hc(this.h)}, ${fn(this.s)*100}%, ${fn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function hc(e){return e=(e||0)%360,e<0?e+360:e}function fn(e){return Math.max(0,Math.min(1,e||0))}function as(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Do=e=>()=>e;function Nf(e,t){return function(r){return e+r*t}}function b1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function DB(e,t){var r=t-e;return r?Nf(e,r>180||r<-180?r-360*Math.round(r/360):r):Do(isNaN(e)?t:e)}function _1(e){return(e=+e)==1?zf:function(t,r){return r-t?b1(t,r,e):Do(isNaN(t)?r:t)}}function zf(e,t){var r=t-e;return r?Nf(e,r):Do(isNaN(e)?t:e)}const uc=function e(t){var r=_1(t);function i(n,a){var o=r((n=qs(n)).r,(a=qs(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=zf(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i}(1);function We(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Hs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ss=new RegExp(Hs.source,"g");function C1(e){return function(){return e}}function w1(e){return function(t){return e(t)+""}}function v1(e,t){var r=Hs.lastIndex=ss.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=Hs.exec(e))&&(n=ss.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:We(i,n)})),r=ss.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?w1(l[0].x):C1(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)s[(u=l[h]).i]=u.x(c);return s.join("")})}var fc=180/Math.PI,js={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Wf(e,t,r,i,n,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*fc,skewX:Math.atan(l)*fc,scaleX:o,scaleY:s}}var dn;function k1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?js:Wf(t.a,t.b,t.c,t.d,t.e,t.f)}function S1(e){return e==null||(dn||(dn=document.createElementNS("http://www.w3.org/2000/svg","g")),dn.setAttribute("transform",e),!(e=dn.transform.baseVal.consolidate()))?js:(e=e.matrix,Wf(e.a,e.b,e.c,e.d,e.e,e.f))}function qf(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:We(c,u)},{i:m-2,x:We(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:We(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:We(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push(n(d)+"scale(",null,",",null,")");g.push({i:m-4,x:We(c,u)},{i:m-2,x:We(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),s(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,m=f.length,y;++g<m;)u[(y=f[g]).i]=y.x(d);return u.join("")}}}var T1=qf(k1,"px, ","px)","deg)"),L1=qf(S1,", ",")",")"),Xr=0,wi=0,di=0,Hf=1e3,Xn,vi,Zn=0,hr=0,Sa=0,zi=typeof performance=="object"&&performance.now?performance:Date,jf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ro(){return hr||(jf(B1),hr=zi.now()+Sa)}function B1(){hr=0}function Kn(){this._call=this._time=this._next=null}Kn.prototype=Yf.prototype={constructor:Kn,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ro():+r)+(t==null?0:+t),!this._next&&vi!==this&&(vi?vi._next=this:Xn=this,vi=this),this._call=e,this._time=r,Ys()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ys())}};function Yf(e,t,r){var i=new Kn;return i.restart(e,t,r),i}function A1(){Ro(),++Xr;for(var e=Xn,t;e;)(t=hr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Xr}function dc(){hr=(Zn=zi.now())+Sa,Xr=wi=0;try{A1()}finally{Xr=0,E1(),hr=0}}function M1(){var e=zi.now(),t=e-Zn;t>Hf&&(Sa-=t,Zn=e)}function E1(){for(var e,t=Xn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Xn=r);vi=e,Ys(i)}function Ys(e){if(!Xr){wi&&(wi=clearTimeout(wi));var t=e-hr;t>24?(e<1/0&&(wi=setTimeout(dc,e-zi.now()-Sa)),di&&(di=clearInterval(di))):(di||(Zn=zi.now(),di=setInterval(M1,Hf)),Xr=1,jf(dc))}}function pc(e,t,r){var i=new Kn;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var F1=kf("start","end","cancel","interrupt"),$1=[],Uf=0,gc=1,Us=2,Ln=3,mc=4,Gs=5,Bn=6;function Ta(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;O1(e,r,{name:t,index:i,group:n,on:F1,tween:$1,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Uf})}function Io(e,t){var r=ce(e,t);if(r.state>Uf)throw new Error("too late; already scheduled");return r}function be(e,t){var r=ce(e,t);if(r.state>Ln)throw new Error("too late; already running");return r}function ce(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function O1(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Yf(a,0,r.time);function a(c){r.state=gc,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,d;if(r.state!==gc)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Ln)return pc(o);d.state===mc?(d.state=Bn,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Bn,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(pc(function(){r.state===Ln&&(r.state=mc,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=Us,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Us){for(r.state=Ln,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function s(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Gs,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===Gs&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Bn,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function D1(e,t){var r=e.__transition,i,n,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}n=i.state>Us&&i.state<Gs,i.state=Bn,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function R1(e){return this.each(function(){D1(this,e)})}function I1(e,t){var r,i;return function(){var n=be(this,e),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function P1(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=be(this,e),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=s;break}l===c&&n.push(s)}a.tween=n}}function N1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ce(this.node(),r).tween,n=0,a=i.length,o;n<a;++n)if((o=i[n]).name===e)return o.value;return null}return this.each((t==null?I1:P1)(r,e,t))}function Po(e,t,r){var i=e._id;return e.each(function(){var n=be(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return ce(n,i).value[t]}}function Gf(e,t){var r;return(typeof t=="number"?We:t instanceof Ni?uc:(r=Ni(t))?(t=r,uc):v1)(e,t)}function z1(e){return function(){this.removeAttribute(e)}}function W1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function q1(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttribute(e);return o===n?null:o===i?a:a=t(i=o,r)}}function H1(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?a:a=t(i=o,r)}}function j1(e,t,r){var i,n,a;return function(){var o,s=r(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+"",o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s)))}}function Y1(e,t,r){var i,n,a;return function(){var o,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+"",o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s)))}}function U1(e,t){var r=ka(e),i=r==="transform"?L1:Gf;return this.attrTween(e,typeof t=="function"?(r.local?Y1:j1)(r,i,Po(this,"attr."+e,t)):t==null?(r.local?W1:z1)(r):(r.local?H1:q1)(r,i,t))}function G1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function V1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function X1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&V1(e,a)),r}return n._value=t,n}function Z1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&G1(e,a)),r}return n._value=t,n}function K1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=ka(e);return this.tween(r,(i.local?X1:Z1)(i,t))}function Q1(e,t){return function(){Io(this,e).delay=+t.apply(this,arguments)}}function J1(e,t){return t=+t,function(){Io(this,e).delay=t}}function t2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Q1:J1)(t,e)):ce(this.node(),t).delay}function e2(e,t){return function(){be(this,e).duration=+t.apply(this,arguments)}}function r2(e,t){return t=+t,function(){be(this,e).duration=t}}function i2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?e2:r2)(t,e)):ce(this.node(),t).duration}function n2(e,t){if(typeof t!="function")throw new Error;return function(){be(this,e).ease=t}}function a2(e){var t=this._id;return arguments.length?this.each(n2(t,e)):ce(this.node(),t).ease}function s2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;be(this,e).ease=r}}function o2(e){if(typeof e!="function")throw new Error;return this.each(s2(this._id,e))}function l2(e){typeof e!="function"&&(e=Lf(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Oe(i,this._parents,this._name,this._id)}function c2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var l=t[s],c=r[s],h=l.length,u=o[s]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;s<i;++s)o[s]=t[s];return new Oe(o,this._parents,this._name,this._id)}function h2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function u2(e,t,r){var i,n,a=h2(t)?Io:be;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function f2(e,t){var r=this._id;return arguments.length<2?ce(this.node(),r).on.on(e):this.each(u2(r,e,t))}function d2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function p2(){return this.on("end.remove",d2(this._id))}function g2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Fo(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s=i[o],l=s.length,c=a[o]=new Array(l),h,u,f=0;f<l;++f)(h=s[f])&&(u=e.call(h,h.__data__,f,s))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Ta(c[f],t,r,f,c,ce(h,r)));return new Oe(a,this._parents,t,r)}function m2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Tf(e));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var l=i[s],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,g=ce(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&Ta(d,t,r,m,f,g);a.push(f),o.push(h)}return new Oe(a,o,t,r)}var y2=Vi.prototype.constructor;function x2(){return new y2(this._groups,this._parents)}function b2(e,t){var r,i,n;return function(){var a=Vr(this,e),o=(this.style.removeProperty(e),Vr(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function Vf(e){return function(){this.style.removeProperty(e)}}function _2(e,t,r){var i,n=r+"",a;return function(){var o=Vr(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function C2(e,t,r){var i,n,a;return function(){var o=Vr(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Vr(this,e))),o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s))}}function w2(e,t){var r,i,n,a="style."+t,o="end."+a,s;return function(){var l=be(this,e),c=l.on,h=l.value[a]==null?s||(s=Vf(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(o,n=h),l.on=i}}function v2(e,t,r){var i=(e+="")=="transform"?T1:Gf;return t==null?this.styleTween(e,b2(e,i)).on("end.style."+e,Vf(e)):typeof t=="function"?this.styleTween(e,C2(e,i,Po(this,"style."+e,t))).each(w2(this._id,e)):this.styleTween(e,_2(e,i,t),r).on("end.style."+e,null)}function k2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function S2(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&k2(e,o,r)),i}return a._value=t,a}function T2(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,S2(e,t,r??""))}function L2(e){return function(){this.textContent=e}}function B2(e){return function(){var t=e(this);this.textContent=t??""}}function A2(e){return this.tween("text",typeof e=="function"?B2(Po(this,"text",e)):L2(e==null?"":e+""))}function M2(e){return function(t){this.textContent=e.call(this,t)}}function E2(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&M2(n)),t}return i._value=e,i}function F2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,E2(e))}function $2(){for(var e=this._name,t=this._id,r=Xf(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,l,c=0;c<s;++c)if(l=o[c]){var h=ce(l,t);Ta(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Oe(i,this._parents,e,r)}function O2(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},l={value:function(){--n===0&&a()}};r.each(function(){var c=be(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),n===0&&a()})}var D2=0;function Oe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Xf(){return++D2}var Te=Vi.prototype;Oe.prototype={constructor:Oe,select:g2,selectAll:m2,selectChild:Te.selectChild,selectChildren:Te.selectChildren,filter:l2,merge:c2,selection:x2,transition:$2,call:Te.call,nodes:Te.nodes,node:Te.node,size:Te.size,empty:Te.empty,each:Te.each,on:f2,attr:U1,attrTween:K1,style:v2,styleTween:T2,text:A2,textTween:F2,remove:p2,tween:N1,delay:t2,duration:i2,ease:a2,easeVarying:o2,end:O2,[Symbol.iterator]:Te[Symbol.iterator]};function R2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var I2={time:null,delay:0,duration:250,ease:R2};function P2(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function N2(e){var t,r;e instanceof Oe?(t=e._id,e=e._name):(t=Xf(),(r=I2).time=Ro(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,l,c=0;c<s;++c)(l=o[c])&&Ta(l,e,t,c,o,r||P2(l,t));return new Oe(i,this._parents,e,t)}Vi.prototype.interrupt=R1;Vi.prototype.transition=N2;const Vs=Math.PI,Xs=2*Vs,Qe=1e-6,z2=Xs-Qe;function Zf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function W2(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zf;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class q2{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Zf:W2(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=i-t,c=n-r,h=o-t,u=s-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Qe)if(!(Math.abs(u*l-c*h)>Qe)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=n-s,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),_=a*Math.tan((Vs-Math.acos((m+f-y)/(2*x*b)))/2),k=_/b,v=_/x;Math.abs(k-1)>Qe&&this._append`L${t+k*h},${r+k*u}`,this._append`A${a},${a},0,0,${+(u*d>h*g)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,n,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=t+s,h=r+l,u=1^o,f=o?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Qe||Math.abs(this._y1-h)>Qe)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Xs+Xs),f>z2?this._append`A${i},${i},0,1,${u},${t-s},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>Qe&&this._append`A${i},${i},0,${+(f>=Vs)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Sr(e){return function(){return e}}const RB=Math.abs,IB=Math.atan2,PB=Math.cos,NB=Math.max,zB=Math.min,WB=Math.sin,qB=Math.sqrt,yc=1e-12,No=Math.PI,xc=No/2,HB=2*No;function jB(e){return e>1?0:e<-1?No:Math.acos(e)}function YB(e){return e>=1?xc:e<=-1?-xc:Math.asin(e)}function H2(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new q2(t)}function j2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Kf(e){this._context=e}Kf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Qn(e){return new Kf(e)}function Y2(e){return e[0]}function U2(e){return e[1]}function G2(e,t){var r=Sr(!0),i=null,n=Qn,a=null,o=H2(s);e=typeof e=="function"?e:e===void 0?Y2:Sr(e),t=typeof t=="function"?t:t===void 0?U2:Sr(t);function s(l){var c,h=(l=j2(l)).length,u,f=!1,d;for(i==null&&(a=n(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,c,l),+t(u,c,l));if(d)return a=null,d+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Sr(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Sr(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Sr(!!l),s):r},s.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),s):i},s}class Qf{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Jf(e){return new Qf(e,!0)}function td(e){return new Qf(e,!1)}function Ye(){}function Jn(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function La(e){this._context=e}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Jn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function An(e){return new La(e)}function ed(e){this._context=e}ed.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function V2(e){return new ed(e)}function rd(e){this._context=e}rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function X2(e){return new rd(e)}function id(e,t){this._basis=new La(e),this._beta=t}id.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*a),this._beta*t[s]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Z2=function e(t){function r(i){return t===1?new La(i):new id(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function ta(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function zo(e,t){this._context=e,this._k=(1-t)/6}zo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ta(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ta(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const nd=function e(t){function r(i){return new zo(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Wo(e,t){this._context=e,this._k=(1-t)/6}Wo.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ta(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const K2=function e(t){function r(i){return new Wo(i,t)}return r.tension=function(i){return e(+i)},r}(0);function qo(e,t){this._context=e,this._k=(1-t)/6}qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ta(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Q2=function e(t){function r(i){return new qo(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Ho(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>yc){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>yc){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function ad(e,t){this._context=e,this._alpha=t}ad.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ho(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sd=function e(t){function r(i){return t?new ad(i,t):new zo(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function od(e,t){this._context=e,this._alpha=t}od.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ho(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const J2=function e(t){function r(i){return t?new od(i,t):new Wo(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function ld(e,t){this._context=e,this._alpha=t}ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ho(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const t_=function e(t){function r(i){return t?new ld(i,t):new qo(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function cd(e){this._context=e}cd.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function e_(e){return new cd(e)}function bc(e){return e<0?-1:1}function _c(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(bc(a)+bc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Cc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function os(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function ea(e){this._context=e}ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:os(this,this._t0,Cc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,os(this,Cc(this,r=_c(this,e,t)),r);break;default:os(this,this._t0,r=_c(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function hd(e){this._context=new ud(e)}(hd.prototype=Object.create(ea.prototype)).point=function(e,t){ea.prototype.point.call(this,t,e)};function ud(e){this._context=e}ud.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function fd(e){return new ea(e)}function dd(e){return new hd(e)}function pd(e){this._context=e}pd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=wc(e),n=wc(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function wc(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),o=new Array(r);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(n[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function gd(e){return new pd(e)}function Ba(e,t){this._context=e,this._t=t}Ba.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function md(e){return new Ba(e,.5)}function yd(e){return new Ba(e,0)}function xd(e){return new Ba(e,1)}function ki(e,t,r){this.k=e,this.x=t,this.y=r}ki.prototype={constructor:ki,scale:function(e){return e===1?this:new ki(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ki(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ki.prototype;var bd=typeof global=="object"&&global&&global.Object===Object&&global,r_=typeof self=="object"&&self&&self.Object===Object&&self,_e=bd||r_||Function("return this")(),ra=_e.Symbol,_d=Object.prototype,i_=_d.hasOwnProperty,n_=_d.toString,pi=ra?ra.toStringTag:void 0;function a_(e){var t=i_.call(e,pi),r=e[pi];try{e[pi]=void 0;var i=!0}catch{}var n=n_.call(e);return i&&(t?e[pi]=r:delete e[pi]),n}var s_=Object.prototype,o_=s_.toString;function l_(e){return o_.call(e)}var c_="[object Null]",h_="[object Undefined]",vc=ra?ra.toStringTag:void 0;function ti(e){return e==null?e===void 0?h_:c_:vc&&vc in Object(e)?a_(e):l_(e)}function pr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var u_="[object AsyncFunction]",f_="[object Function]",d_="[object GeneratorFunction]",p_="[object Proxy]";function jo(e){if(!pr(e))return!1;var t=ti(e);return t==f_||t==d_||t==u_||t==p_}var ls=_e["__core-js_shared__"],kc=function(){var e=/[^.]+$/.exec(ls&&ls.keys&&ls.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function g_(e){return!!kc&&kc in e}var m_=Function.prototype,y_=m_.toString;function gr(e){if(e!=null){try{return y_.call(e)}catch{}try{return e+""}catch{}}return""}var x_=/[\\^$.*+?()[\]{}|]/g,b_=/^\[object .+?Constructor\]$/,__=Function.prototype,C_=Object.prototype,w_=__.toString,v_=C_.hasOwnProperty,k_=RegExp("^"+w_.call(v_).replace(x_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function S_(e){if(!pr(e)||g_(e))return!1;var t=jo(e)?k_:b_;return t.test(gr(e))}function T_(e,t){return e?.[t]}function mr(e,t){var r=T_(e,t);return S_(r)?r:void 0}var Wi=mr(Object,"create");function L_(){this.__data__=Wi?Wi(null):{},this.size=0}function B_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var A_="__lodash_hash_undefined__",M_=Object.prototype,E_=M_.hasOwnProperty;function F_(e){var t=this.__data__;if(Wi){var r=t[e];return r===A_?void 0:r}return E_.call(t,e)?t[e]:void 0}var $_=Object.prototype,O_=$_.hasOwnProperty;function D_(e){var t=this.__data__;return Wi?t[e]!==void 0:O_.call(t,e)}var R_="__lodash_hash_undefined__";function I_(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wi&&t===void 0?R_:t,this}function ur(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ur.prototype.clear=L_;ur.prototype.delete=B_;ur.prototype.get=F_;ur.prototype.has=D_;ur.prototype.set=I_;function P_(){this.__data__=[],this.size=0}function Aa(e,t){return e===t||e!==e&&t!==t}function Ma(e,t){for(var r=e.length;r--;)if(Aa(e[r][0],t))return r;return-1}var N_=Array.prototype,z_=N_.splice;function W_(e){var t=this.__data__,r=Ma(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():z_.call(t,r,1),--this.size,!0}function q_(e){var t=this.__data__,r=Ma(t,e);return r<0?void 0:t[r][1]}function H_(e){return Ma(this.__data__,e)>-1}function j_(e,t){var r=this.__data__,i=Ma(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ie(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ie.prototype.clear=P_;Ie.prototype.delete=W_;Ie.prototype.get=q_;Ie.prototype.has=H_;Ie.prototype.set=j_;var qi=mr(_e,"Map");function Y_(){this.size=0,this.__data__={hash:new ur,map:new(qi||Ie),string:new ur}}function U_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ea(e,t){var r=e.__data__;return U_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function G_(e){var t=Ea(this,e).delete(e);return this.size-=t?1:0,t}function V_(e){return Ea(this,e).get(e)}function X_(e){return Ea(this,e).has(e)}function Z_(e,t){var r=Ea(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Ve(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ve.prototype.clear=Y_;Ve.prototype.delete=G_;Ve.prototype.get=V_;Ve.prototype.has=X_;Ve.prototype.set=Z_;var K_="Expected a function";function Zi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(K_);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=e.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(Zi.Cache||Ve),r}Zi.Cache=Ve;function Q_(){this.__data__=new Ie,this.size=0}function J_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function tC(e){return this.__data__.get(e)}function eC(e){return this.__data__.has(e)}var rC=200;function iC(e,t){var r=this.__data__;if(r instanceof Ie){var i=r.__data__;if(!qi||i.length<rC-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ve(i)}return r.set(e,t),this.size=r.size,this}function ei(e){var t=this.__data__=new Ie(e);this.size=t.size}ei.prototype.clear=Q_;ei.prototype.delete=J_;ei.prototype.get=tC;ei.prototype.has=eC;ei.prototype.set=iC;var ia=function(){try{var e=mr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Yo(e,t,r){t=="__proto__"&&ia?ia(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Zs(e,t,r){(r!==void 0&&!Aa(e[t],r)||r===void 0&&!(t in e))&&Yo(e,t,r)}function nC(e){return function(t,r,i){for(var n=-1,a=Object(t),o=i(t),s=o.length;s--;){var l=o[++n];if(r(a[l],l,a)===!1)break}return t}}var aC=nC(),Cd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sc=Cd&&typeof module=="object"&&module&&!module.nodeType&&module,sC=Sc&&Sc.exports===Cd,Tc=sC?_e.Buffer:void 0,Lc=Tc?Tc.allocUnsafe:void 0;function oC(e,t){if(t)return e.slice();var r=e.length,i=Lc?Lc(r):new e.constructor(r);return e.copy(i),i}var Bc=_e.Uint8Array;function lC(e){var t=new e.constructor(e.byteLength);return new Bc(t).set(new Bc(e)),t}function cC(e,t){var r=t?lC(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function hC(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Ac=Object.create,uC=function(){function e(){}return function(t){if(!pr(t))return{};if(Ac)return Ac(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function wd(e,t){return function(r){return e(t(r))}}var vd=wd(Object.getPrototypeOf,Object),fC=Object.prototype;function Fa(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fC;return e===r}function dC(e){return typeof e.constructor=="function"&&!Fa(e)?uC(vd(e)):{}}function Ki(e){return e!=null&&typeof e=="object"}var pC="[object Arguments]";function Mc(e){return Ki(e)&&ti(e)==pC}var kd=Object.prototype,gC=kd.hasOwnProperty,mC=kd.propertyIsEnumerable,na=Mc(function(){return arguments}())?Mc:function(e){return Ki(e)&&gC.call(e,"callee")&&!mC.call(e,"callee")},aa=Array.isArray,yC=9007199254740991;function Sd(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=yC}function $a(e){return e!=null&&Sd(e.length)&&!jo(e)}function xC(e){return Ki(e)&&$a(e)}function bC(){return!1}var Td=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ec=Td&&typeof module=="object"&&module&&!module.nodeType&&module,_C=Ec&&Ec.exports===Td,Fc=_C?_e.Buffer:void 0,CC=Fc?Fc.isBuffer:void 0,Uo=CC||bC,wC="[object Object]",vC=Function.prototype,kC=Object.prototype,Ld=vC.toString,SC=kC.hasOwnProperty,TC=Ld.call(Object);function LC(e){if(!Ki(e)||ti(e)!=wC)return!1;var t=vd(e);if(t===null)return!0;var r=SC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ld.call(r)==TC}var BC="[object Arguments]",AC="[object Array]",MC="[object Boolean]",EC="[object Date]",FC="[object Error]",$C="[object Function]",OC="[object Map]",DC="[object Number]",RC="[object Object]",IC="[object RegExp]",PC="[object Set]",NC="[object String]",zC="[object WeakMap]",WC="[object ArrayBuffer]",qC="[object DataView]",HC="[object Float32Array]",jC="[object Float64Array]",YC="[object Int8Array]",UC="[object Int16Array]",GC="[object Int32Array]",VC="[object Uint8Array]",XC="[object Uint8ClampedArray]",ZC="[object Uint16Array]",KC="[object Uint32Array]",gt={};gt[HC]=gt[jC]=gt[YC]=gt[UC]=gt[GC]=gt[VC]=gt[XC]=gt[ZC]=gt[KC]=!0;gt[BC]=gt[AC]=gt[WC]=gt[MC]=gt[qC]=gt[EC]=gt[FC]=gt[$C]=gt[OC]=gt[DC]=gt[RC]=gt[IC]=gt[PC]=gt[NC]=gt[zC]=!1;function QC(e){return Ki(e)&&Sd(e.length)&&!!gt[ti(e)]}function JC(e){return function(t){return e(t)}}var Bd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ei=Bd&&typeof module=="object"&&module&&!module.nodeType&&module,tw=Ei&&Ei.exports===Bd,cs=tw&&bd.process,$c=function(){try{var e=Ei&&Ei.require&&Ei.require("util").types;return e||cs&&cs.binding&&cs.binding("util")}catch{}}(),Oc=$c&&$c.isTypedArray,Go=Oc?JC(Oc):QC;function Ks(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ew=Object.prototype,rw=ew.hasOwnProperty;function iw(e,t,r){var i=e[t];(!(rw.call(e,t)&&Aa(i,r))||r===void 0&&!(t in e))&&Yo(e,t,r)}function nw(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=void 0;l===void 0&&(l=e[s]),n?Yo(r,s,l):iw(r,s,l)}return r}function aw(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var sw=9007199254740991,ow=/^(?:0|[1-9]\d*)$/;function Ad(e,t){var r=typeof e;return t=t??sw,!!t&&(r=="number"||r!="symbol"&&ow.test(e))&&e>-1&&e%1==0&&e<t}var lw=Object.prototype,cw=lw.hasOwnProperty;function hw(e,t){var r=aa(e),i=!r&&na(e),n=!r&&!i&&Uo(e),a=!r&&!i&&!n&&Go(e),o=r||i||n||a,s=o?aw(e.length,String):[],l=s.length;for(var c in e)(t||cw.call(e,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ad(c,l)))&&s.push(c);return s}function uw(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var fw=Object.prototype,dw=fw.hasOwnProperty;function pw(e){if(!pr(e))return uw(e);var t=Fa(e),r=[];for(var i in e)i=="constructor"&&(t||!dw.call(e,i))||r.push(i);return r}function Md(e){return $a(e)?hw(e,!0):pw(e)}function gw(e){return nw(e,Md(e))}function mw(e,t,r,i,n,a,o){var s=Ks(e,r),l=Ks(t,r),c=o.get(l);if(c){Zs(e,r,c);return}var h=a?a(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=aa(l),d=!f&&Uo(l),g=!f&&!d&&Go(l);h=l,f||d||g?aa(s)?h=s:xC(s)?h=hC(s):d?(u=!1,h=oC(l,!0)):g?(u=!1,h=cC(l,!0)):h=[]:LC(l)||na(l)?(h=s,na(s)?h=gw(s):(!pr(s)||jo(s))&&(h=dC(l))):u=!1}u&&(o.set(l,h),n(h,l,i,a,o),o.delete(l)),Zs(e,r,h)}function Ed(e,t,r,i,n){e!==t&&aC(t,function(a,o){if(n||(n=new ei),pr(a))mw(e,t,o,r,Ed,i,n);else{var s=i?i(Ks(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),Zs(e,o,s)}},Md)}function Fd(e){return e}function yw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Dc=Math.max;function xw(e,t,r){return t=Dc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=Dc(i.length-t,0),o=Array(a);++n<a;)o[n]=i[t+n];n=-1;for(var s=Array(t+1);++n<t;)s[n]=i[n];return s[t]=r(o),yw(e,this,s)}}function bw(e){return function(){return e}}var _w=ia?function(e,t){return ia(e,"toString",{configurable:!0,enumerable:!1,value:bw(t),writable:!0})}:Fd,Cw=800,ww=16,vw=Date.now;function kw(e){var t=0,r=0;return function(){var i=vw(),n=ww-(i-r);if(r=i,n>0){if(++t>=Cw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Sw=kw(_w);function Tw(e,t){return Sw(xw(e,t,Fd),e+"")}function Lw(e,t,r){if(!pr(r))return!1;var i=typeof t;return(i=="number"?$a(r)&&Ad(t,r.length):i=="string"&&t in r)?Aa(r[t],e):!1}function Bw(e){return Tw(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&Lw(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var s=r[i];s&&e(t,s,i,a)}return t})}var Aw=Bw(function(e,t,r){Ed(e,t,r)}),Mw="",Ew={curveBasis:An,curveBasisClosed:V2,curveBasisOpen:X2,curveBumpX:Jf,curveBumpY:td,curveBundle:Z2,curveCardinalClosed:K2,curveCardinalOpen:Q2,curveCardinal:nd,curveCatmullRomClosed:J2,curveCatmullRomOpen:t_,curveCatmullRom:sd,curveLinear:Qn,curveLinearClosed:e_,curveMonotoneX:fd,curveMonotoneY:dd,curveNatural:gd,curveStep:md,curveStepAfter:xd,curveStepBefore:yd},Fw=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,$w=p(function(e,t){const r=$d(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);Rn(o),i=Mt(i,[...o])}else i=r.args;if(!i)return;let n=xo(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),$d=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${Fw.source})(?=[}][%]{2}).*
|
|
117
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),$.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=Ai.exec(e))!==null;)if(i.index===Ai.lastIndex&&Ai.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:o})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return $.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Ow=p(function(e){return e.replace(Ai,"")},"removeDirectives"),Dw=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Vo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Ew[r]??t}p(Vo,"interpolateToCurve");function Od(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Sx.sanitizeUrl(r):r}p(Od,"formatUrl");var Rw=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){$.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Xo(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Xo,"distance");function Dd(e){let t,r=0;e.forEach(n=>{r+=Xo(n,t),t=n});const i=r/2;return Zo(e,i)}p(Dd,"traverseEdge");function Rd(e){return e.length===1?e[0]:Dd(e)}p(Rd,"calcLabelPosition");var Rc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Zo=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Xo(n,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:Rc((1-o)*r.x+o*n.x,5),y:Rc((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Iw=p((e,t,r)=>{$.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Zo(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function Id(e,t,r){const i=structuredClone(r);$.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Zo(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}p(Id,"calcTerminalLabelPosition");function Pd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Pd,"getStylesFromArray");var Ic=0,Pw=p(()=>(Ic++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ic),"generateId");function Nd(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Nd,"makeRandomHex");var Nw=p(e=>Nd(e.length),"random"),zw=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Ww=p(function(e,t){const r=t.text.replace(Qr.lineBreakRegex," "),[,i]=Oa(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),qw=Zi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Qr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const l=De(`${o} `,r),c=De(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=Hw(o,t,"-",r);n.push(a,...f),a=d}else c+l>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Hw=Zi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,l)=>{const c=`${o}${s}`;if(De(c,i)>=t){const u=l+1,f=n.length===u,d=`${c}${r}`;a.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function zd(e,t){return Ko(e,t).height}p(zd,"calculateTextHeight");function De(e,t){return Ko(e,t).width}p(De,"calculateTextWidth");var Ko=Zi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Oa(r),o=["sans-serif",i],s=e.split(Qr.lineBreakRegex),l=[],c=ct("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=zw();y.text=m||Mw;const x=Ww(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),zr,jw=(zr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(zr,"InitIDGenerator"),zr),pn,Yw=p(function(e){return pn=pn||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),pn.innerHTML=e,unescape(pn.textContent)},"entityDecode");function Qo(e){return"str"in e}p(Qo,"isDetailedError");var Uw=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Oa=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Jo(e,t){return Aw({},e,t)}p(Jo,"cleanAndMerge");var ge={assignWithDepth:Mt,wrapLabel:qw,calculateTextHeight:zd,calculateTextWidth:De,calculateTextDimensions:Ko,cleanAndMerge:Jo,detectInit:$w,detectDirective:$d,isSubstringInArray:Dw,interpolateToCurve:Vo,calcLabelPosition:Rd,calcCardinalityPosition:Iw,calcTerminalLabelPosition:Id,formatUrl:Od,getStylesFromArray:Pd,generateId:Pw,random:Nw,runFunc:Rw,entityDecode:Yw,insertTitle:Uw,parseFontSize:Oa,InitIDGenerator:jw},Gw=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),yr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),UB=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function zt(e){return e??null}p(zt,"handleUndefinedAttr");const Vw=Object.freeze({left:0,top:0,width:16,height:16}),sa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Wd=Object.freeze({...Vw,...sa}),Xw=Object.freeze({...Wd,body:"",hidden:!1}),Zw=Object.freeze({width:null,height:null}),Kw=Object.freeze({...Zw,...sa}),Qw=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:s};return hs(c)?c:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return hs(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return hs(s,r)?s:null}return null},hs=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Jw(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Pc(e,t){const r=Jw(e,t);for(const i in Xw)i in sa?i in e&&!(i in r)&&(r[i]=sa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function tv(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,l=s&&a(s);l&&(n[o]=[s].concat(l))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Nc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Pc(i[s]||n[s],a)}return o(t),r.forEach(o),Pc(e,a)}function ev(e,t){if(e.icons[t])return Nc(e,t,[]);const r=tv(e,[t])[t];return r?Nc(e,t,r):null}const rv=/(-?[0-9.]*[0-9]+[0-9.]*)/g,iv=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function zc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(rv);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=iv.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function nv(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function av(e,t){return e?"<defs>"+e+"</defs>"+t:t}function sv(e,t,r){const i=nv(e);return av(i.defs,t+i.content+r)}const ov=e=>e==="unset"||e==="undefined"||e==="none";function lv(e,t){const r={...Wd,...e},i={...Kw,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let k;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:k=n.height/2+n.top,y.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,y.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}_%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),y.length&&(a=sv(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,l=n.width,c=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=zc(u,l/c)):(h=o==="auto"?l:o,u=s===null?zc(h,c/l):s==="auto"?c:s);const f={},d=(m,y)=>{ov(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[n.left,n.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const cv=/\sid="(\S+)"/g,hv="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let uv=0;function fv(e,t=hv){const r=[];let i;for(;i=cv.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(uv++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function dv(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function tl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var xr=tl();function qd(e){xr=e}var Fi={exec:()=>null};function dt(e,t=""){let r=typeof e=="string"?e:e.source;const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Nt.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var Nt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},pv=/^(?:[ \t]*(?:\n|$))+/,gv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,el=/(?:[*+-]|\d{1,9}[.)])/,Hd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jd=dt(Hd).replace(/bull/g,el).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),xv=dt(Hd).replace(/bull/g,el).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),rl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bv=/^[^\n]+/,il=/(?!\s*\])(?:\\.|[^\[\]\\])+/,_v=dt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",il).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Cv=dt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,el).getRegex(),Da="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",nl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wv=dt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",nl).replace("tag",Da).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Yd=dt(rl).replace("hr",Qi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Da).getRegex(),vv=dt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Yd).getRegex(),al={blockquote:vv,code:gv,def:_v,fences:mv,heading:yv,hr:Qi,html:wv,lheading:jd,list:Cv,newline:pv,paragraph:Yd,table:Fi,text:bv},Wc=dt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Da).getRegex(),kv={...al,lheading:xv,table:Wc,paragraph:dt(rl).replace("hr",Qi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Wc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Da).getRegex()},Sv={...al,html:dt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",nl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Fi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:dt(rl).replace("hr",Qi).replace("heading",` *#{1,6} *[^
|
|
118
|
+
]`).replace("lheading",jd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Tv=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Lv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ud=/^( {2,}|\\)\n(?!\s*$)/,Bv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ra=/[\p{P}\p{S}]/u,sl=/[\s\p{P}\p{S}]/u,Gd=/[^\s\p{P}\p{S}]/u,Av=dt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,sl).getRegex(),Vd=/(?!~)[\p{P}\p{S}]/u,Mv=/(?!~)[\s\p{P}\p{S}]/u,Ev=/(?:[^\s\p{P}\p{S}]|~)/u,Fv=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Xd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$v=dt(Xd,"u").replace(/punct/g,Ra).getRegex(),Ov=dt(Xd,"u").replace(/punct/g,Vd).getRegex(),Zd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Dv=dt(Zd,"gu").replace(/notPunctSpace/g,Gd).replace(/punctSpace/g,sl).replace(/punct/g,Ra).getRegex(),Rv=dt(Zd,"gu").replace(/notPunctSpace/g,Ev).replace(/punctSpace/g,Mv).replace(/punct/g,Vd).getRegex(),Iv=dt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Gd).replace(/punctSpace/g,sl).replace(/punct/g,Ra).getRegex(),Pv=dt(/\\(punct)/,"gu").replace(/punct/g,Ra).getRegex(),Nv=dt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),zv=dt(nl).replace("(?:-->|$)","-->").getRegex(),Wv=dt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",zv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),oa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,qv=dt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",oa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Kd=dt(/^!?\[(label)\]\[(ref)\]/).replace("label",oa).replace("ref",il).getRegex(),Qd=dt(/^!?\[(ref)\](?:\[\])?/).replace("ref",il).getRegex(),Hv=dt("reflink|nolink(?!\\()","g").replace("reflink",Kd).replace("nolink",Qd).getRegex(),ol={_backpedal:Fi,anyPunctuation:Pv,autolink:Nv,blockSkip:Fv,br:Ud,code:Lv,del:Fi,emStrongLDelim:$v,emStrongRDelimAst:Dv,emStrongRDelimUnd:Iv,escape:Tv,link:qv,nolink:Qd,punctuation:Av,reflink:Kd,reflinkSearch:Hv,tag:Wv,text:Bv,url:Fi},jv={...ol,link:dt(/^!?\[(label)\]\((.*?)\)/).replace("label",oa).getRegex(),reflink:dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oa).getRegex()},Qs={...ol,emStrongRDelimAst:Rv,emStrongLDelim:Ov,url:dt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Yv={...Qs,br:dt(Ud).replace("{2,}","*").getRegex(),text:dt(Qs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gn={normal:al,gfm:kv,pedantic:Sv},gi={normal:ol,gfm:Qs,breaks:Yv,pedantic:jv},Uv={"&":"&","<":"<",">":">",'"':""","'":"'"},qc=e=>Uv[e];function fe(e,t){if(t){if(Nt.escapeTest.test(e))return e.replace(Nt.escapeReplace,qc)}else if(Nt.escapeTestNoEncode.test(e))return e.replace(Nt.escapeReplaceNoEncode,qc);return e}function Hc(e){try{e=encodeURI(e).replace(Nt.percentDecode,"%")}catch{return null}return e}function jc(e,t){const r=e.replace(Nt.findPipe,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Nt.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Nt.slashPipe,"|");return i}function mi(e,t,r){const i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function Gv(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Yc(e,t,r,i,n){const a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function Vv(e,t,r){const i=e.match(r.other.indentCodeCompensation);if(i===null)return t;const n=i[1];return t.split(`
|
|
119
|
+
`).map(a=>{const o=a.match(r.other.beginningSpace);if(o===null)return a;const[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(`
|
|
120
|
+
`)}var la=class{options;rules;lexer;constructor(e){this.options=e||xr}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:mi(r,`
|
|
121
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],i=Vv(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const i=mi(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:mi(t[0],`
|
|
122
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=mi(t[0],`
|
|
123
|
+
`).split(`
|
|
124
|
+
`),i="",n="";const a=[];for(;r.length>0;){let o=!1;const s=[];let l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))s.push(r[l]),o=!0;else if(!o)s.push(r[l]);else break;r=r.slice(l);const c=s.join(`
|
|
125
|
+
`),h=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
126
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
127
|
+
${c}`:c,n=n?`${n}
|
|
128
|
+
${h}`:h;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=u,r.length===0)break;const f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){const d=f,g=d.raw+`
|
|
129
|
+
`+r.join(`
|
|
130
|
+
`),m=this.blockquote(g);a[a.length-1]=m,i=i.substring(0,i.length-d.raw.length)+m.raw,n=n.substring(0,n.length-d.text.length)+m.text;break}else if(f?.type==="list"){const d=f,g=d.raw+`
|
|
131
|
+
`+r.join(`
|
|
132
|
+
`),m=this.list(g);a[a.length-1]=m,i=i.substring(0,i.length-f.raw.length)+m.raw,n=n.substring(0,n.length-d.raw.length)+m.raw,r=g.substring(a.at(-1).raw.length).split(`
|
|
133
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:a,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let o=!1;for(;e;){let l=!1,c="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let u=t[2].split(`
|
|
134
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),f=e.split(`
|
|
135
|
+
`,1)[0],d=!u.trim(),g=0;if(this.options.pedantic?(g=2,h=u.trimStart()):d?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,h=u.slice(g),g+=t[1].length),d&&this.rules.other.blankLine.test(f)&&(c+=f+`
|
|
136
|
+
`,e=e.substring(f.length+1),l=!0),!l){const x=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),_=this.rules.other.fencesBeginRegex(g),k=this.rules.other.headingBeginRegex(g),v=this.rules.other.htmlBeginRegex(g);for(;e;){const L=e.split(`
|
|
137
|
+
`,1)[0];let T;if(f=L,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),T=f):T=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||k.test(f)||v.test(f)||x.test(f)||b.test(f))break;if(T.search(this.rules.other.nonSpaceChar)>=g||!f.trim())h+=`
|
|
138
|
+
`+T.slice(g);else{if(d||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(u)||k.test(u)||b.test(u))break;h+=`
|
|
139
|
+
`+f}!d&&!f.trim()&&(d=!0),c+=L+`
|
|
140
|
+
`,e=e.substring(L.length+1),u=T.slice(g)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let m=null,y;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:c,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),n.raw+=c}const s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l=0;l<n.items.length;l++)if(this.lexer.state.top=!1,n.items[l].tokens=this.lexer.blockTokens(n.items[l].text,[]),!n.loose){const c=n.items[l].tokens.filter(u=>u.type==="space"),h=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=h}if(n.loose)for(let l=0;l<n.items.length;l++)n.items[l].loose=!0;return n}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=jc(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
141
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const o of i)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<r.length;o++)a.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:a.align[o]});for(const o of n)a.rows.push(jc(o,a.header.length).map((s,l)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:a.align[l]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
142
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=mi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=Gv(t[2],"()");if(a===-2)return;if(a>-1){const s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),Yc(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Yc(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...i[0]].length-1;let o,s,l=a,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);(i=h.exec(t))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(s=[...o].length,i[3]||i[4]){l+=s;continue}else if((i[5]||i[6])&&a%3&&!((a+s)%3)){c+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);const u=[...i[0]][0].length,f=e.slice(0,a+i.index+u+s);if(Math.min(a,s)%2){const g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}const d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Me=class Js{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||xr,this.options.tokenizer=this.options.tokenizer||new la,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:Nt,block:gn.normal,inline:gi.normal};this.options.pedantic?(r.block=gn.pedantic,r.inline=gi.pedantic):this.options.gfm&&(r.block=gn.gfm,this.options.breaks?r.inline=gi.breaks:r.inline=gi.gfm),this.tokenizer.rules=r}static get rules(){return{block:gn,inline:gi}}static lex(t,r){return new Js(r).lex(t)}static lexInline(t,r){return new Js(r).inlineTokens(t)}lex(t){t=t.replace(Nt.carriageReturn,`
|
|
143
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(Nt.tabCharGlobal," ").replace(Nt.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);const o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
|
|
144
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
|
|
145
|
+
`+n.raw,o.text+=`
|
|
146
|
+
`+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
|
|
147
|
+
`+n.raw,o.text+=`
|
|
148
|
+
`+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let o=1/0;const s=t.slice(1);let l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},s),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(a=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){const o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=`
|
|
149
|
+
`+n.raw,o.text+=`
|
|
150
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="text"?(o.raw+=`
|
|
151
|
+
`+n.raw,o.text+=`
|
|
152
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){const s=Object.keys(this.tokens.links);if(s.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)s.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,o="";for(;t;){a||(o=""),a=!1;let s;if(this.options.extensions?.inline?.some(c=>(s=c.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.escape(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.tag(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.link(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(s.raw.length);const c=r.at(-1);s.type==="text"&&c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):r.push(s);continue}if(s=this.tokenizer.emStrong(t,i,o)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.codespan(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.br(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.del(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.autolink(t)){t=t.substring(s.raw.length),r.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(t))){t=t.substring(s.raw.length),r.push(s);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0;const h=t.slice(1);let u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(s=this.tokenizer.inlineText(l)){t=t.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(o=s.raw.slice(-1)),a=!0;const c=r.at(-1);c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):r.push(s);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},ca=class{options;parser;constructor(e){this.options=e||xr}space(e){return""}code({text:e,lang:t,escaped:r}){const i=(t||"").match(Nt.notSpaceStart)?.[0],n=e.replace(Nt.endingNewline,"")+`
|
|
153
|
+
`;return i?'<pre><code class="language-'+fe(i)+'">'+(r?n:fe(n,!0))+`</code></pre>
|
|
154
|
+
`:"<pre><code>"+(r?n:fe(n,!0))+`</code></pre>
|
|
155
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
156
|
+
${this.parser.parse(e)}</blockquote>
|
|
157
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
158
|
+
`}hr(e){return`<hr>
|
|
159
|
+
`}list(e){const t=e.ordered,r=e.start;let i="";for(let o=0;o<e.items.length;o++){const s=e.items[o];i+=this.listitem(s)}const n=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+n+a+`>
|
|
160
|
+
`+i+"</"+n+`>
|
|
161
|
+
`}listitem(e){let t="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+fe(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
162
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
163
|
+
`}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let i="";for(let n=0;n<e.rows.length;n++){const a=e.rows[n];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
164
|
+
<thead>
|
|
165
|
+
`+t+`</thead>
|
|
166
|
+
`+i+`</table>
|
|
167
|
+
`}tablerow({text:e}){return`<tr>
|
|
168
|
+
${e}</tr>
|
|
169
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
170
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${fe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const i=this.parser.parseInline(r),n=Hc(e);if(n===null)return i;e=n;let a='<a href="'+e+'"';return t&&(a+=' title="'+fe(t)+'"'),a+=">"+i+"</a>",a}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));const n=Hc(e);if(n===null)return fe(r);e=n;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${fe(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:fe(e.text)}},ll=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Ee=class to{options;renderer;textRenderer;constructor(t){this.options=t||xr,this.options.renderer=this.options.renderer||new ca,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ll}static parse(t,r){return new to(r).parse(t)}static parseInline(t,r){return new to(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){const a=t[n];if(this.options.extensions?.renderers?.[a.type]){const s=a,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){i+=l||"";continue}}const o=a;switch(o.type){case"space":{i+=this.renderer.space(o);continue}case"hr":{i+=this.renderer.hr(o);continue}case"heading":{i+=this.renderer.heading(o);continue}case"code":{i+=this.renderer.code(o);continue}case"table":{i+=this.renderer.table(o);continue}case"blockquote":{i+=this.renderer.blockquote(o);continue}case"list":{i+=this.renderer.list(o);continue}case"html":{i+=this.renderer.html(o);continue}case"paragraph":{i+=this.renderer.paragraph(o);continue}case"text":{let s=o,l=this.renderer.text(s);for(;n+1<t.length&&t[n+1].type==="text";)s=t[++n],l+=`
|
|
171
|
+
`+this.renderer.text(s);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){const a=t[n];if(this.options.extensions?.renderers?.[a.type]){const s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=s||"";continue}}const o=a;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},Mn=class{options;block;constructor(e){this.options=e||xr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Me.lex:Me.lexInline}provideParser(){return this.block?Ee.parse:Ee.parseInline}},Xv=class{defaults=tl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ee;Renderer=ca;TextRenderer=ll;Lexer=Me;Tokenizer=la;Hooks=Mn;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(const i of e)switch(r=r.concat(t.call(this,i)),i.type){case"table":{const n=i;for(const a of n.header)r=r.concat(this.walkTokens(a.tokens,t));for(const a of n.rows)for(const o of a)r=r.concat(this.walkTokens(o.tokens,t));break}case"list":{const n=i;r=r.concat(this.walkTokens(n.items,t));break}default:{const n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{const o=n[a].flat(1/0);r=r.concat(this.walkTokens(o,t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const a=t.renderers[n.name];a?t.renderers[n.name]=function(...o){let s=n.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[n.level];a?a.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){const n=this.defaults.renderer||new ca(this.defaults);for(const a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const o=a,s=r.renderer[o],l=n[o];n[o]=(...c)=>{let h=s.apply(n,c);return h===!1&&(h=l.apply(n,c)),h||""}}i.renderer=n}if(r.tokenizer){const n=this.defaults.tokenizer||new la(this.defaults);for(const a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const o=a,s=r.tokenizer[o],l=n[o];n[o]=(...c)=>{let h=s.apply(n,c);return h===!1&&(h=l.apply(n,c)),h}}i.tokenizer=n}if(r.hooks){const n=this.defaults.hooks||new Mn;for(const a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const o=a,s=r.hooks[o],l=n[o];Mn.passThroughHooks.has(a)?n[o]=c=>{if(this.defaults.async)return Promise.resolve(s.call(n,c)).then(u=>l.call(n,u));const h=s.call(n,c);return l.call(n,h)}:n[o]=(...c)=>{let h=s.apply(n,c);return h===!1&&(h=l.apply(n,c)),h}}i.hooks=n}if(r.walkTokens){const n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),n&&(s=s.concat(n.call(this,o))),s}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Me.lex(e,t??this.defaults)}parser(e,t){return Ee.parse(e,t??this.defaults)}parseMarkdown(e){return(r,i)=>{const n={...i},a={...this.defaults,...n},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const s=a.hooks?a.hooks.provideLexer():e?Me.lex:Me.lexInline,l=a.hooks?a.hooks.provideParser():e?Ee.parse:Ee.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(c=>s(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>l(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let c=s(r,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let h=l(c,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(c){return o(c)}}}onError(e,t){return r=>{if(r.message+=`
|
|
172
|
+
Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+fe(r.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},fr=new Xv;function ft(e,t){return fr.parse(e,t)}ft.options=ft.setOptions=function(e){return fr.setOptions(e),ft.defaults=fr.defaults,qd(ft.defaults),ft};ft.getDefaults=tl;ft.defaults=xr;ft.use=function(...e){return fr.use(...e),ft.defaults=fr.defaults,qd(ft.defaults),ft};ft.walkTokens=function(e,t){return fr.walkTokens(e,t)};ft.parseInline=fr.parseInline;ft.Parser=Ee;ft.parser=Ee.parse;ft.Renderer=ca;ft.TextRenderer=ll;ft.Lexer=Me;ft.lexer=Me.lex;ft.Tokenizer=la;ft.Hooks=Mn;ft.parse=ft;ft.options;ft.setOptions;ft.use;ft.walkTokens;ft.parseInline;Ee.parse;Me.lex;function Jd(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):s},[]);if(n.length){var a=new RegExp(`
|
|
173
|
+
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(s){return s.replace(a,`
|
|
174
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(s,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=s;typeof s=="string"&&s.includes(`
|
|
175
|
+
`)&&(u=String(s).split(`
|
|
176
|
+
`).map(function(f,d){return d===0?f:""+h+f}).join(`
|
|
177
|
+
`)),o+=u+i[l+1]}),o}var Zv={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},eo=new Map,tp=new Map,Kv=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if($.debug("Registering icon pack:",t.name),"loader"in t)tp.set(t.name,t.loader);else if("icons"in t)eo.set(t.name,t.icons);else throw $.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),ep=p(async(e,t)=>{const r=Qw(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=eo.get(i);if(!n){const o=tp.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},eo.set(i,n)}catch(s){throw $.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=ev(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),Qv=p(async e=>{try{return await ep(e),!0}catch{return!1}},"isIconAvailable"),Ji=p(async(e,t,r)=>{let i;try{i=await ep(e,t?.fallbackPrefix)}catch(o){$.error(o),i=Zv}const n=lv(i,t);return dv(fv(n.body),{...n.attributes,...r})},"getIconSVG");function rp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
178
|
+
`).replace(/\n{2,}/g,`
|
|
179
|
+
`),n=Jd(i);return t===!1?n.replace(/ /g," "):n}p(rp,"preprocessMarkdown");function ip(e,t={}){const r=rp(e,t),i=ft.lexer(r),n=[[]];let a=0;function o(s,l="normal"){s.type==="text"?s.text.split(`
|
|
180
|
+
`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&n[a].push({content:f,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{s.type==="paragraph"?s.tokens?.forEach(l=>{o(l)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}),n}p(ip,"markdownToLines");function np(e,{markdownAutoWrap:t}={}){const r=ft.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g," "):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:`Unsupported markdown: ${n.type}`}return p(i,"output"),r.map(i).join("")}p(np,"markdownToHTML");function ap(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(ap,"splitTextToChars");function sp(e,t){const r=ap(t.content);return cl(e,[],r,t.type)}p(sp,"splitWordToFitWidth");function cl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?cl(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(cl,"splitWordToFitWidthRecursion");function op(e,t){if(e.some(({content:r})=>r.includes(`
|
|
181
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ha(e,t)}p(op,"splitLineToFitWidth");function ha(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return ha(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,l]=sp(t,a);r.push([s]),l.content&&e.unshift(l)}return ha(e,t,r)}p(ha,"splitLineToFitWidthRecursion");function ro(e,t){t&&e.attr("style",t)}p(ro,"applyStyle");async function lp(e,t,r,i,n=!1){const a=e.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const o=a.append("xhtml:div");let s=t.label;t.label&&Yr(t.label)&&(s=await bo(t.label.replace(Qr.lineBreakRegex,`
|
|
182
|
+
`),ut()));const l=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(s),ro(c,t.labelStyle),c.attr("class",`${l} ${i}`),ro(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),a.node()}p(lp,"addHtmlSpan");function Ia(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(Ia,"createTspan");function cp(e,t,r){const i=e.append("text"),n=Ia(i,1,t);Pa(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(cp,"computeWidthOfText");function Jv(e,t,r){const i=e.append("text"),n=Ia(i,1,t);Pa(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(Jv,"computeDimensionOfText");function hp(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(f=>cp(a,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:op(c,h);for(const f of u){const d=Ia(s,l,1.1);Pa(d,f),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return s.node()}p(hp,"createFormattedText");function Pa(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}p(Pa,"updateTextContentAndStyles");async function up(e){const t=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,n,a)=>(t.push((async()=>{const o=`${n}:${a}`;return await Qv(o)?await Ji(o,void 0,{class:"label-icon"}):`<i class='${Ca(i).replace(":"," ")}'></i>`})()),i));const r=await Promise.all(t);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")}p(up,"replaceIconSubstring");var Xe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if($.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",l),a){const h=np(t,c),u=await up(yr(h)),f=t.replace(/\\\\/g,"\\"),d={isNode:o,label:Yr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await lp(e,d,s,n,l)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=ip(h.replace("<br>","<br/>"),c),f=hp(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(f).select("text").attr("style",g)}return f}},"createText");function us(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-n)*s+i,l[1]=(c-i)*s+(h-n)*o+n}}}function tk(e,t){return e[0]===t[0]&&e[1]===t[1]}function ek(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(n)for(const c of o)us(c,s,n);const l=function(c,h,u){const f=[];for(const b of c){const _=[...b];tk(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_<b.length-1;_++){const k=b[_],v=b[_+1];if(k[1]!==v[1]){const L=Math.min(k[1],v[1]);g.push({ymin:L,ymax:Math.max(k[1],v[1]),x:L===k[1]?k[0]:v[0],islope:(v[0]-k[0])/(v[1]-k[1])})}}if(g.sort((b,_)=>b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax)),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let _=0;_<g.length&&!(g[_].ymin>y);_++)b=_;g.splice(0,b+1).forEach(_=>{m.push({s:y,edge:_})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const _=b+1;if(_>=m.length)break;const k=m[b].edge,v=m[_].edge;d.push([[Math.round(k.x),y],[Math.round(v.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return d}(o,a,i);if(n){for(const c of o)us(c,s,-n);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),us(f,h,u)})(l,s,-n)}return l}function tn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),ek(e,n,i,a||1)}class hl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=tn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function Na(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class rk extends hl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=tn(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)Na([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class ik extends hl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class nk{constructor(t){this.helper=t}fillPolygons(t,r){const i=tn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of t){const l=Na(s),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(s[0][0]+s[1][0])/2-n/4,d=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=d+u+g*n,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class ak{constructor(t){this.helper=t}fillPolygons(t,r){const i=tn(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const s=Na(o),l=Math.floor(s/(i+n)),c=(s+n-l*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+n),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),a}}class sk{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=tn(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach(a=>{const o=Na(a),s=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<s;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),n}}const jt={};class ok{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const lk=0,fs=1,Uc=2,mn={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function ds(e,t){return e.type===t}function ul(e){const t=[],r=function(o){const s=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:lk,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:fs,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Uc,text:""},s}(e);let i="BOD",n=0,a=r[n];for(;!ds(a,Uc);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return ul("M0,0"+e);n++,o=mn[a.text],i=a.text}else ds(a,fs)?o=mn[i]:(n++,o=mn[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let l=n;l<n+o;l++){const c=r[l];if(!ds(c,fs))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof mn[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:s};t.push(l),n+=o,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function fp(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of e)switch(o){case"M":a.push({key:"M",data:[...s]}),[t,r]=s,[i,n]=s;break;case"m":t+=s[0],r+=s[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const l=s.map((c,h)=>h%2?c+r:c+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map((c,h)=>h%2?c+r:c+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map((c,h)=>h%2?c+r:c+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function dp(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-s),g=n+(n-l)):(d=i,g=n);const m=i+2*(d-i)/3,y=n+2*(g-n)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=d,l=g,i=u,n=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),s=u,l=f,i=d,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(pp(i,n,y,x,u,f,d,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=c}return t}function yi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function pp(e,t,r,i,n,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=yi(e,t,-h),[r,i]=yi(r,i,-h);const R=(e-r)/2,B=(t-i)/2;let M=R*R/(n*n)+B*B/(a*a);M>1&&(M=Math.sqrt(M),n*=M,a*=M);const S=n*n,F=a*a,E=S*F-S*B*B-F*R*R,H=S*B*B+F*R*R,X=(s===l?-1:1)*Math.sqrt(Math.abs(E/H));m=X*n*B/a+(e+r)/2,y=X*-a*R/n+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const R=g,B=r,M=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=pp(r=m+n*Math.cos(g),i=y+a*Math.sin(g),B,M,n,a,o,0,l,[g,R,m,y])}x=g-d;const b=Math.cos(d),_=Math.sin(d),k=Math.cos(g),v=Math.sin(g),L=Math.tan(x/4),T=4/3*n*L,D=4/3*a*L,O=[e,t],I=[e+T*_,t-D*b],A=[r+T*v,i-D*k],N=[r,i];if(I[0]=2*O[0]-I[0],I[1]=2*O[1]-I[1],c)return[I,A,N].concat(f);{f=[I,A,N].concat(f);const R=[];for(let B=0;B<f.length;B+=3){const M=yi(f[B][0],f[B][1],h),S=yi(f[B+1][0],f[B+1][1],h),F=yi(f[B+2][0],f[B+2][1],h);R.push([M[0],M[1],S[0],S[1],F[0],F[1]])}return R}}const ck={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return ua(e,t,r)},ellipse:function(e,t,r,i,n){const a=mp(r,i,n);return io(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Ue(e,t,r,i,n,!0)}};function gp(e,t,r,i,n){return{type:"path",ops:Ue(e,t,r,i,n)}}function En(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Ue(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Ue(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?gp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function hk(e,t,r,i,n){return function(a,o){return En(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Gc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=yn(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:yn(r[0],1.5*(1+.22*t.roughness),Zc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=yn(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:yn(o,1.5*(1+.22*t.roughness),Zc(t));for(const c of s)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function mp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return o+=rt(o*l,r),s+=rt(s*l,r),{increment:a,rx:o,ry:s}}function io(e,t,r,i){const[n,a]=Kc(i.increment,e,t,i.rx,i.ry,1,i.increment*ua(.1,ua(.4,1,r),r),r);let o=fa(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Kc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=fa(s,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Vc(e,t,r,i,n,a,o,s,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=rt(.01*u,l),f+=rt(.01*f,l);let d=n,g=a;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Qc(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=Qc(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return o&&(s?x.push(...Ue(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...Ue(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Xc(e,t){const r=dp(fp(ul(e))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...Ue(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]];break;case"C":{const[l,c,h,u,f,d]=s;i.push(...uk(l,c,h,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...Ue(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function ps(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+rt(n,t),i[0][1]+rt(n,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+rt(n,t),i[o][1]+rt(n,t)]})}}return{type:"fillPath",ops:r}}function Tr(e,t){return function(r,i){let n=r.fillStyle||"hachure";if(!jt[n])switch(n){case"zigzag":jt[n]||(jt[n]=new rk(i));break;case"cross-hatch":jt[n]||(jt[n]=new ik(i));break;case"dots":jt[n]||(jt[n]=new nk(i));break;case"dashed":jt[n]||(jt[n]=new ak(i));break;case"zigzag-line":jt[n]||(jt[n]=new sk(i));break;default:n="hachure",jt[n]||(jt[n]=new hl(i))}return jt[n]}(t,ck).fillPolygons(e,t)}function Zc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function yp(e){return e.randomizer||(e.randomizer=new ok(e.seed||0)),e.randomizer.next()}function ua(e,t,r,i=1){return r.roughness*i*(yp(r)*(t-e)+e)}function rt(e,t,r=1){return ua(-e,e,t,r)}function Ue(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=no(e,t,r,i,n,!0,!1);if(o)return s;const l=no(e,t,r,i,n,!0,!0);return s.concat(l)}function no(e,t,r,i,n,a,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*yp(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=rt(d,n,c),g=rt(g,n,c);const m=[],y=()=>rt(u,n,c),x=()=>rt(h,n,c),b=n.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:rt(h,n,c)),t+(b?0:rt(h,n,c))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function yn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+rt(t,r),e[n][1]+rt(t,r)]),n===e.length-1&&i.push([e[n][0]+rt(t,r),e[n][1]+rt(t,r)]);return fa(i,null,r)}function fa(e,t,r){const i=e.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const l=e[s];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[s+1][0]-o*e[s-1][0])/6,l[1]+(o*e[s+1][1]-o*e[s-1][1])/6],a[2]=[e[s+1][0]+(o*e[s][0]-o*e[s+2][0])/6,e[s+1][1]+(o*e[s][1]-o*e[s+2][1])/6],a[3]=[e[s+1][0],e[s+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...no(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Kc(e,t,r,i,n,a,o,s){const l=[],c=[];if(s.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=rt(.5,s)-Math.PI/2;c.push([rt(a,s)+t+.9*i*Math.cos(h-e),rt(a,s)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[rt(a,s)+t+i*Math.cos(f),rt(a,s)+r+n*Math.sin(f)];l.push(d),c.push(d)}c.push([rt(a,s)+t+i*Math.cos(h+2*Math.PI+.5*o),rt(a,s)+r+n*Math.sin(h+2*Math.PI+.5*o)]),c.push([rt(a,s)+t+.98*i*Math.cos(h+o),rt(a,s)+r+.98*n*Math.sin(h+o)]),c.push([rt(a,s)+t+.9*i*Math.cos(h+.5*o),rt(a,s)+r+.9*n*Math.sin(h+.5*o)])}return[c,l]}function Qc(e,t,r,i,n,a,o,s,l){const c=a+rt(.1,l),h=[];h.push([rt(s,l)+t+.9*i*Math.cos(c-e),rt(s,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([rt(s,l)+t+i*Math.cos(u),rt(s,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),fa(h,null,l)}function uk(e,t,r,i,n,a,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:rt(c[0],s)),o[1]+(f?0:rt(c[0],s))]}),h=f?[n,a]:[n+rt(c[d],s),a+rt(c[d],s)],l.push({op:"bcurveTo",data:[e+rt(c[d],s),t+rt(c[d],s),r+rt(c[d],s),i+rt(c[d],s),h[0],h[1]]});return l}function xi(e){return[...e]}function Jc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(xi(e[0]),xi(e[1]),xi(e[2]),xi(e[2]));else{const n=[];n.push(e[0],e[0]);for(let s=1;s<e.length;s++)n.push(e[s]),s===e.length-1&&n.push(e[s]);const a=[],o=1-t;i.push(xi(n[0]));for(let s=1;s+2<n.length;s++){const l=n[s];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*n[s+1][0]-o*n[s-1][0])/6,l[1]+(o*n[s+1][1]-o*n[s-1][1])/6],a[2]=[n[s+1][0]+(o*n[s][0]-o*n[s+2][0])/6,n[s+1][1]+(o*n[s][1]-o*n[s+2][1])/6],a[3]=[n[s+1][0],n[s+1][1]],i.push(a[1],a[2],a[3])}}return i}function Fn(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function fk(e,t,r){const i=Fn(t,r);if(i===0)return Fn(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Fn(e,Je(t,r,n))}function Je(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function ao(e,t,r,i){const n=i||[];if(function(s,l){const c=s[l+0],h=s[l+1],u=s[l+2],f=s[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-c[0];m*=m;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g}(e,t)<r){const s=e[t+0];n.length?(a=n[n.length-1],o=s,Math.sqrt(Fn(a,o))>1&&n.push(s)):n.push(s),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=Je(l,c,.5),d=Je(c,h,.5),g=Je(h,u,.5),m=Je(f,d,.5),y=Je(d,g,.5),x=Je(m,y,.5);ao([l,f,m,x],0,r,n),ao([x,y,g,u],0,r,n)}var a,o;return n}function dk(e,t){return da(e,0,e.length,t)}function da(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=fk(e[h],o,s);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(da(e,t,c+1,i,a),da(e,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function gs(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)ao(e,3*a,t,i);return r&&r>0?da(i,0,i.length,r):i}const Xt="none";class pa{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const o=this._o(a);return this._d("line",[gp(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],l=hk(t,r,i,n,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push(ps([c],o)):s.push(Tr([c],o))}return o.stroke!==Xt&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],l=mp(i,n,o),c=io(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=io(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(Tr([c.estimatedPoints],o));return o.stroke!==Xt&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[En(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=Vc(t,r,i,n,a,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=Vc(t,r,i,n,a,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,g,m,y,x,b){const _=f,k=d;let v=Math.abs(g/2),L=Math.abs(m/2);v+=rt(.01*v,b),L+=rt(.01*L,b);let T=y,D=x;for(;T<0;)T+=2*Math.PI,D+=2*Math.PI;D-T>2*Math.PI&&(T=0,D=2*Math.PI);const O=(D-T)/b.curveStepCount,I=[];for(let A=T;A<=D;A+=O)I.push([_+v*Math.cos(A),k+L*Math.sin(A)]);return I.push([_+v*Math.cos(D),k+L*Math.sin(D)]),I.push([_,k]),Tr([I],b)}(t,r,i,n,a,o,c));return c.stroke!==Xt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=Gc(t,i);if(i.fill&&i.fill!==Xt)if(i.fillStyle==="solid"){const o=Gc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...gs(Jc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...gs(Jc(c),10,(1+i.roughness)/2))}o.length&&n.push(Tr([o],i))}return i.stroke!==Xt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=En(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(ps([t],i)):n.push(Tr([t],i))),i.stroke!==Xt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Xt,o=i.stroke!==Xt,s=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=dp(fp(ul(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...gs(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:v,data:L}of d)switch(v){case"M":_(),y=[L[0],L[1]],m.push(y);break;case"L":b(),m.push([L[0],L[1]]);break;case"C":if(!x.length){const T=m.length?m[m.length-1]:y;x.push([T[0],T[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!f)return g;const k=[];for(const v of g){const L=dk(v,f);L.length&&k.push(L)}return k}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=Xc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Xc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(ps(l,i));else n.push(Tr(l,i));return o&&(s?l.forEach(h=>{n.push(En(h,!1,i))}):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map(o=>+o.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Xt};break;case"fillPath":o={d:this.opsToPath(a),stroke:Xt,strokeWidth:0,fill:i.fill||Xt};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Xt,strokeWidth:i,fill:Xt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class pk{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new pa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(s=>+s.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const xn="http://www.w3.org/2000/svg";class gk{constructor(t,r){this.svg=t,this.gen=new pa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(xn,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS(xn,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(xn,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,s,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(xn,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var j={canvas:(e,t)=>new pk(e,t),svg:(e,t)=>new gk(e,t),generator:e=>new pa(e),newSeed:()=>pa.newSeed()},st=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||Tt(ut()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",zt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await Xe(o,lr(yr(s),ut()),{useHtmlLabels:n,width:t.width||ut().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],f=ct(l),d=u.getElementsByTagName("img");if(d){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[k=Ah.fontSize]=Oa(b),v=k*_+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:o}},"labelHelper"),ms=p(async(e,t,r)=>{const i=r.useHtmlLabels||Tt(ut()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Xe(n,lr(yr(t),ut()),{useHtmlLabels:i,width:r.width||ut()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(Tt(ut()?.flowchart?.htmlLabels)){const l=a.children[0],c=ct(a);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:n}},"insertLabel"),G=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ht,"createPathFromPoints");function Ge(e,t,r,i,n,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=f+n*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(Ge,"generateFullSineWavePoints");function fl(e,t,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(fl,"generateCirclePoints");var mk=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),l=a===0?0:s*n/a,c=s):(n<0&&(o=-o),l=o,c=n===0?0:o*a/n),{x:r+l,y:i+c}},"intersectRect"),ri=mk;function xp(e,t){t&&e.attr("style",t)}p(xp,"applyStyle");async function bp(e){const t=ct(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&Yr(e.label)&&(i=await bo(e.label.replace(Qr.lineBreakRegex,`
|
|
183
|
+
`),ut()));const n=e.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),xp(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(bp,"addHtmlLabel");var yk=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),Tt(ut().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),$.info("vertexText"+n);const a={isNode:i,label:yr(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await bp(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),a.appendChild(l)}return a}},"createLabel"),ar=yk,Pe=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),_p=p(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Tt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Xe(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(Tt(r.flowchart.htmlLabels)){const T=g.children[0],D=ct(g);m=T.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;$.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const T=j.svg(u),D=U(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),O=T.path(Pe(b,_,y,x,0),D);k=u.insert(()=>($.debug("Rough node insert CXC",O),O),":first-child"),k.select("path:nth-child(2)").attr("style",c.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=Eo(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),s){const T=d.select("span");T&&T.attr("style",s)}const L=k.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return ri(t,T)},{cluster:u,labelBBox:m}},"rect"),xk=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return ri(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),bk=p(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=u.node().appendChild(await ar(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(Tt(r.flowchart.htmlLabels)){const O=d.children[0],I=ct(d);g=O.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,_=t.height+m-g.height-6,k=t.x-x/2,v=t.y-b/2;t.width=x;const L=t.y-t.height/2-y+g.height+2;let T;if(t.look==="handDrawn"){const O=t.cssClasses.includes("statediagram-cluster-alt"),I=j.svg(c),A=t.rx||t.ry?I.path(Pe(k,v,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):I.rectangle(k,v,x,b,{seed:n});T=c.insert(()=>A,":first-child");const N=I.rectangle(k,L,x,_,{fill:O?a:o,fillStyle:O?"hachure":"solid",stroke:l,seed:n});T=c.insert(()=>A,":first-child"),f=c.insert(()=>N)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",k).attr("y",v).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",k).attr("y",L).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${v+1-(Tt(r.flowchart.htmlLabels)?0:3)})`);const D=T.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(O){return ri(t,O)},{cluster:c,labelBBox:g}},"roundedWithTitle"),_k=p(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Tt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Xe(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Tt(r.flowchart.htmlLabels)){const T=g.children[0],D=ct(g);m=T.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;$.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const T=j.svg(u),D=U(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),O=T.path(Pe(b,_,y,x,t.rx),D);k=u.insert(()=>($.debug("Rough node insert CXC",O),O),":first-child"),k.select("path:nth-child(2)").attr("style",c.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=Eo(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),s){const T=d.select("span");T&&T.attr("style",s)}const L=k.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return ri(t,T)},{cluster:u,labelBBox:m}},"kanbanSection"),Ck=p((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=j.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});d=o.insert(()=>y,":first-child")}else d=s.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return ri(t,m)},{cluster:o,labelBBox:{}}},"divider"),wk=_p,vk={rect:_p,squareRect:wk,roundedWithTitle:bk,noteGroup:xk,divider:Ck,kanbanSection:_k},Cp=new Map,kk=p(async(e,t)=>{const r=t.shape||"rect",i=await vk[r](e,t);return Cp.set(t.id,i),i},"insertCluster"),GB=p(()=>{Cp=new Map},"clear");function wp(e,t){return e.intersect(t)}p(wp,"intersectNode");var Sk=wp;function vp(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,s=a-i.y,l=Math.sqrt(t*t*s*s+r*r*o*o),c=Math.abs(t*r*o/l);i.x<n&&(c=-c);var h=Math.abs(t*r*s/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(vp,"intersectEllipse");var kp=vp;function Sp(e,t,r){return kp(e,t,t,r)}p(Sp,"intersectCircle");var Tk=Sp;function Tp(e,t,r,i){var n,a,o,s,l,c,h,u,f,d,g,m,y,x,b;if(n=t.y-e.y,o=e.x-t.x,l=t.x*e.y-e.x*t.y,f=n*r.x+o*r.y+l,d=n*i.x+o*i.y+l,!(f!==0&&d!==0&&so(f,d))&&(a=i.y-r.y,s=r.x-i.x,c=i.x*r.y-r.x*i.y,h=a*e.x+s*e.y+c,u=a*t.x+s*t.y+c,!(h!==0&&u!==0&&so(h,u))&&(g=n*s-a*o,g!==0)))return m=Math.abs(g/2),y=o*c-s*l,x=y<0?(y-m)/g:(y+m)/g,y=a*l-n*c,b=y<0?(y-m)/g:(y+m)/g,{x,y:b}}p(Tp,"intersectLine");function so(e,t){return e*t>0}p(so,"sameSign");var Lk=Tp;function Lp(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let l=i-e.width/2-o,c=n-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=Lk(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}p(Lp,"intersectPolygon");var Bk=Lp,q={node:Sk,circle:Tk,ellipse:kp,polygon:Bk,rect:ri};function Bp(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=it(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,l=j.svg(a),c=U(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",zt(s)),G(t,u),t.intersect=function(f){return $.info("Circle intersect",t,o,f),q.circle(t,o,f)},a}p(Bp,"anchor");function oo(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,g=f/a,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(o?-1:1),b=c-y*n*Math.cos(h)*(o?-1:1),_=Math.atan2((t-b)/a,(e-x)/n);let v=Math.atan2((i-b)/a,(r-x)/n)-_;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const L=[];for(let T=0;T<20;T++){const D=T/19,O=_+D*v,I=x+n*Math.cos(O),A=b+a*Math.sin(O);L.push({x:I,y:A})}return L}p(oo,"generateArcPoints");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.width+t.padding+20,s=a.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...oo(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...oo(o/2,s/2,o/2,-s/2,c,l,!0)],f=j.svg(n),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=ht(u),m=f.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),G(t,y),t.intersect=function(x){return q.polygon(t,u,x)},n}p(Ap,"bowTieRect");function Ne(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Ne,"insertPolygonShape");async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.height+t.padding,s=12,l=a.width+t.padding+s,c=0,h=l,u=-o,f=0,d=[{x:c+s,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=j.svg(n),x=U(t,{}),b=ht(d),_=y.path(b,x);g=n.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Ne(n,l,o,d);return i&&g.attr("style",i),G(t,g),t.intersect=function(y){return q.polygon(t,d,y)},n}p(Mp,"card");function Ep(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:n}=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=j.svg(i),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ht(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return q.polygon(t,o,f)},i}p(Ep,"choice");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await st(e,t,it(t)),s=a.width/2+o;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const h=j.svg(n),u=U(t,{}),f=h.circle(0,0,s*2,u);l=n.insert(()=>f,":first-child"),l.attr("class","basic label-container").attr("style",zt(c))}else l=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return G(t,l),t.intersect=function(h){return $.info("Circle intersect",t,s,h),q.circle(t,s,h)},n}p(Fp,"circle");function $p(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
184
|
+
M ${n.x},${n.y} L ${o.x},${o.y}`}p($p,"createLine");function Op(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=j.svg(n),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=$p(a),u=s.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),G(t,f),t.intersect=function(d){return $.info("crossedCircle intersect",t,{radius:a,point:d}),q.circle(t,a,d)},n}p(Op,"crossedCircle");function Be(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Be,"generateCirclePoints");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Be(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Be(s/2+c*2,-c,c,20,-180,-270),...Be(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Be(s/2,l/2,c,20,0,90)],f=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Be(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Be(s/2+s*.1,-c,c,20,-180,-270),...Be(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Be(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],d=j.svg(n),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ht(u).replace("Z",""),x=d.path(y,g),b=ht(f),_=d.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>_,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),G(t,k),t.intersect=function(v){return q.polygon(t,f,v)},n}p(Dp,"curlyBraceLeft");function Ae(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}p(Ae,"generateCirclePoints");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ae(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...Ae(s/2+c*2,-c,c,20,-180,-270),...Ae(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...Ae(s/2,l/2,c,20,0,90)],f=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...Ae(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...Ae(s/2+c*2,-c,c,20,-180,-270),...Ae(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...Ae(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],d=j.svg(n),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ht(u).replace("Z",""),x=d.path(y,g),b=ht(f),_=d.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>_,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),G(t,k),t.intersect=function(v){return q.polygon(t,f,v)},n}p(Rp,"curlyBraceRight");function Bt(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Bt,"generateCirclePoints");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Bt(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Bt(s/2+c*2,-c,c,20,-180,-270),...Bt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Bt(s/2,l/2,c,20,0,90)],f=[...Bt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Bt(-s/2-c/2,-c,c,20,0,90),...Bt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Bt(-s/2+c+c/2,l/2,c,30,-180,-270)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Bt(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Bt(s/2+c*2,-c,c,20,-180,-270),...Bt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Bt(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...Bt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Bt(-s/2-c/2,-c,c,20,0,90),...Bt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Bt(-s/2+c+c/2,l/2,c,30,-180,-270)],g=j.svg(n),m=U(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ht(u).replace("Z",""),b=g.path(x,m),k=ht(f).replace("Z",""),v=g.path(k,m),L=ht(d),T=g.path(L,{...m}),D=n.insert("g",":first-child");return D.insert(()=>T,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>v,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),G(t,D),t.intersect=function(O){return q.polygon(t,d,O)},n}p(Ip,"curlyBraces");async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=80,s=20,l=Math.max(o,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=j.svg(n),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...fl(-y,-m/2,h,50,270,90)],_=ht(b),k=f.path(_,d),v=n.insert(()=>k,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-l/2}, ${-c/2})`),G(t,v),t.intersect=function(L){return q.polygon(t,b,L)},n}p(Pp,"curvedTrapezoid");var Ak=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Mk=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Ek=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=j.svg(n),g=Mk(0,0,s,h,l,c),m=Ek(0,c,s,h,l,c),y=d.path(g,U(t,{})),x=d.path(m,U(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=Ak(0,0,s,h,l,c);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",zt(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),G(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(d){const g=q.rect(t,d),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(Np,"cylinder");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:f}=t,d=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),G(t,x),t.intersect=function(b){return q.rect(t,b)},n}p(zp,"dividedRectangle");async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await st(e,t,it(t)),l=a.width/2+o+5,c=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=j.svg(n),d=U(t,{roughness:.2,strokeWidth:2.5}),g=U(t,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,l*2,d),y=f.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",zt(t.cssClasses)).attr("style",zt(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return G(t,h),t.intersect=function(f){return $.info("DoubleCircle intersect",t,l,f),q.circle(t,l,f)},n}p(Wp,"doublecircle");function qp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=j.svg(a),{nodeBorder:c}=r,h=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),G(t,f),t.intersect=function(d){return $.info("filledCircle intersect",t,{radius:o,point:d}),q.circle(t,o,d)},a}p(qp,"filledCircle");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=a.width+(t.padding??0),l=s+a.height,c=s+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=j.svg(n),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=ht(h),m=f.path(g,d),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=l,G(t,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return $.info("Triangle intersect",t,h,x),q.polygon(t,h,x)},n}p(Hp,"flippedTriangle");function jp(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=V(t);t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,f=j.svg(o),d=U(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),G(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return q.rect(t,x)},o}p(jp,"forkJoin");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await st(e,t,it(t)),l=Math.max(n,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=j.svg(o),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...fl(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ht(g),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),G(t,x),t.intersect=function(b){return $.info("Pill intersect",t,{radius:h,point:b}),q.polygon(t,g,b)},o}p(Yp,"halfRoundedRectangle");var Fk=p((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=4,s=a.height+t.padding,l=s/o,c=a.width+2*l+t.padding,h=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-s/2},{x:c-l,y:-s},{x:l,y:-s},{x:0,y:-s/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=j.svg(n),g=U(t,{}),m=Fk(0,0,c,s,l),y=d.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${s/2})`),f&&u.attr("style",f)}else u=Ne(n,c,s,h);return i&&u.attr("style",i),t.width=c,t.height=s,G(t,u),t.intersect=function(d){return q.polygon(t,h,d)},n}p(Up,"hexagon");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await st(e,t,it(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,l=j.svg(n),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ht(h),f=l.path(u,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),G(t,d),t.intersect=function(g){return $.info("Pill intersect",t,{points:h}),q.polygon(t,h,g)},n}p(Gp,"hourglass");async function Vp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await st(e,t,"icon-shape default"),f=t.pos==="t",d=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=Jr(t),x=-g/2,b=-d/2,_=t.label?8:0,k=j.svg(c),v=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=k.rectangle(x,b,g,d,v),T=Math.max(g,h.width),D=d+h.height+_,O=k.rectangle(-T/2,-D/2,T,D,{...v,fill:"transparent",stroke:"none"}),I=c.insert(()=>L,":first-child"),A=c.insert(()=>O);if(t.icon){const N=c.append("g");N.html(`<g>${await Ji(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const R=N.node().getBBox(),B=R.width,M=R.height,S=R.x,F=R.y;N.attr("transform",`translate(${-B/2-S},${f?h.height/2+_/2-M/2-F:-h.height/2-_/2-M/2-F})`),N.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),I.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),G(t,A),t.intersect=function(N){if($.info("iconSquare intersect",t,N),!t.label)return q.rect(t,N);const R=t.x??0,B=t.y??0,M=t.height??0;let S=[];return f?S=[{x:R-h.width/2,y:B-M/2},{x:R+h.width/2,y:B-M/2},{x:R+h.width/2,y:B-M/2+h.height+_},{x:R+g/2,y:B-M/2+h.height+_},{x:R+g/2,y:B+M/2},{x:R-g/2,y:B+M/2},{x:R-g/2,y:B-M/2+h.height+_},{x:R-h.width/2,y:B-M/2+h.height+_}]:S=[{x:R-g/2,y:B-M/2},{x:R+g/2,y:B-M/2},{x:R+g/2,y:B-M/2+d},{x:R+h.width/2,y:B-M/2+d},{x:R+h.width/2/2,y:B+M/2},{x:R-h.width/2,y:B+M/2},{x:R-h.width/2,y:B-M/2+d},{x:R-g/2,y:B-M/2+d}],q.polygon(t,S,N)},c}p(Vp,"icon");async function Xp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await st(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Jr(t),b=j.svg(c),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=x.get("fill");_.stroke=k??y;const v=c.append("g");t.icon&&v.html(`<g>${await Ji(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const L=v.node().getBBox(),T=L.width,D=L.height,O=L.x,I=L.y,A=Math.max(T,D)*Math.SQRT2+f*2,N=b.circle(0,0,A,_),R=Math.max(A,h.width),B=A+h.height+d,M=b.rectangle(-R/2,-B/2,R,B,{..._,fill:"transparent",stroke:"none"}),S=c.insert(()=>N,":first-child"),F=c.insert(()=>M);return v.attr("transform",`translate(${-T/2-O},${g?h.height/2+d/2-D/2-I:-h.height/2-d/2-D/2-I})`),v.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-B/2:B/2-h.height})`),S.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),G(t,F),t.intersect=function(E){return $.info("iconSquare intersect",t,E),q.rect(t,E)},c}p(Xp,"iconCircle");async function Zp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await st(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Jr(t),_=-m/2,k=-g/2,v=t.label?8:0,L=j.svg(c),T=U(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const D=b.get("fill");T.stroke=D??x;const O=L.path(Pe(_,k,m,g,5),T),I=Math.max(m,h.width),A=g+h.height+v,N=L.rectangle(-I/2,-A/2,I,A,{...T,fill:"transparent",stroke:"none"}),R=c.insert(()=>O,":first-child").attr("class","icon-shape2"),B=c.insert(()=>N);if(t.icon){const M=c.append("g");M.html(`<g>${await Ji(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const S=M.node().getBBox(),F=S.width,E=S.height,H=S.x,X=S.y;M.attr("transform",`translate(${-F/2-H},${d?h.height/2+v/2-E/2-X:-h.height/2-v/2-E/2-X})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-A/2:A/2-h.height})`),R.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),G(t,B),t.intersect=function(M){if($.info("iconSquare intersect",t,M),!t.label)return q.rect(t,M);const S=t.x??0,F=t.y??0,E=t.height??0;let H=[];return d?H=[{x:S-h.width/2,y:F-E/2},{x:S+h.width/2,y:F-E/2},{x:S+h.width/2,y:F-E/2+h.height+v},{x:S+m/2,y:F-E/2+h.height+v},{x:S+m/2,y:F+E/2},{x:S-m/2,y:F+E/2},{x:S-m/2,y:F-E/2+h.height+v},{x:S-h.width/2,y:F-E/2+h.height+v}]:H=[{x:S-m/2,y:F-E/2},{x:S+m/2,y:F-E/2},{x:S+m/2,y:F-E/2+g},{x:S+h.width/2,y:F-E/2+g},{x:S+h.width/2/2,y:F+E/2},{x:S-h.width/2,y:F+E/2},{x:S-h.width/2,y:F-E/2+g},{x:S-m/2,y:F-E/2+g}],q.polygon(t,H,M)},c}p(Zp,"iconRounded");async function Kp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await st(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Jr(t),_=-m/2,k=-g/2,v=t.label?8:0,L=j.svg(c),T=U(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const D=b.get("fill");T.stroke=D??x;const O=L.path(Pe(_,k,m,g,.1),T),I=Math.max(m,h.width),A=g+h.height+v,N=L.rectangle(-I/2,-A/2,I,A,{...T,fill:"transparent",stroke:"none"}),R=c.insert(()=>O,":first-child"),B=c.insert(()=>N);if(t.icon){const M=c.append("g");M.html(`<g>${await Ji(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const S=M.node().getBBox(),F=S.width,E=S.height,H=S.x,X=S.y;M.attr("transform",`translate(${-F/2-H},${d?h.height/2+v/2-E/2-X:-h.height/2-v/2-E/2-X})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-A/2:A/2-h.height})`),R.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),G(t,B),t.intersect=function(M){if($.info("iconSquare intersect",t,M),!t.label)return q.rect(t,M);const S=t.x??0,F=t.y??0,E=t.height??0;let H=[];return d?H=[{x:S-h.width/2,y:F-E/2},{x:S+h.width/2,y:F-E/2},{x:S+h.width/2,y:F-E/2+h.height+v},{x:S+m/2,y:F-E/2+h.height+v},{x:S+m/2,y:F+E/2},{x:S-m/2,y:F+E/2},{x:S-m/2,y:F-E/2+h.height+v},{x:S-h.width/2,y:F-E/2+h.height+v}]:H=[{x:S-m/2,y:F-E/2},{x:S+m/2,y:F-E/2},{x:S+m/2,y:F-E/2+g},{x:S+h.width/2,y:F-E/2+g},{x:S+h.width/2/2,y:F+E/2},{x:S-h.width/2,y:F+E/2},{x:S-h.width/2,y:F-E/2+g},{x:S-m/2,y:F-E/2+g}],q.polygon(t,H,M)},c}p(Kp,"iconSquare");async function Qp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=V(t);t.labelStyle=o;const s=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?s??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:f,label:d}=await st(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=j.svg(u),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=b.rectangle(m,y,c,h,_),v=Math.max(c,f.width),L=h+f.height+x,T=b.rectangle(-v/2,-L/2,v,L,{..._,fill:"none",stroke:"none"}),D=u.insert(()=>k,":first-child"),O=u.insert(()=>T);if(t.img){const I=u.append("image");I.attr("href",t.img),I.attr("width",c),I.attr("height",h),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-c/2},${g?L/2-h:-L/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),D.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),G(t,O),t.intersect=function(I){if($.info("iconSquare intersect",t,I),!t.label)return q.rect(t,I);const A=t.x??0,N=t.y??0,R=t.height??0;let B=[];return g?B=[{x:A-f.width/2,y:N-R/2},{x:A+f.width/2,y:N-R/2},{x:A+f.width/2,y:N-R/2+f.height+x},{x:A+c/2,y:N-R/2+f.height+x},{x:A+c/2,y:N+R/2},{x:A-c/2,y:N+R/2},{x:A-c/2,y:N-R/2+f.height+x},{x:A-f.width/2,y:N-R/2+f.height+x}]:B=[{x:A-c/2,y:N-R/2},{x:A+c/2,y:N-R/2},{x:A+c/2,y:N-R/2+h},{x:A+f.width/2,y:N-R/2+h},{x:A+f.width/2/2,y:N+R/2},{x:A-f.width/2,y:N+R/2},{x:A-f.width/2,y:N-R/2+h},{x:A-c/2,y:N-R/2+h}],q.polygon(t,B,I)},u}p(Qp,"imageSquare");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=U(t,{}),d=ht(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ne(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,G(t,c),t.intersect=function(u){return q.polygon(t,l,u)},n}p(Jp,"inv_trapezoid");async function en(e,t,r){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await st(e,t,it(t)),s=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-s/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=j.svg(a),y=U(t,{}),x=f||d?m.path(Pe(c,h,s,l,f||0),y):m.rectangle(c,h,s,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",zt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",zt(f)).attr("ry",zt(d)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return G(t,u),t.intersect=function(m){return q.rect(t,m)},a}p(en,"drawRect");async function tg(e,t){const{shapeSvg:r,bbox:i,label:n}=await st(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),G(t,a),t.intersect=function(l){return q.rect(t,l)},r}p(tg,"labelRect");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=U(t,{}),d=ht(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ne(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,G(t,c),t.intersect=function(u){return q.polygon(t,l,u)},n}p(eg,"lean_left");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=U(t,{}),d=ht(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ne(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,G(t,c),t.intersect=function(u){return q.polygon(t,l,u)},n}p(rg,"lean_right");function ig(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=j.svg(n),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ht(c),d=h.path(f,u),g=n.insert(()=>d,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),G(t,g),t.intersect=function(m){return $.info("lightningBolt intersect",t,m),q.polygon(t,c,m)},n}p(ig,"lightningBolt");var $k=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Ok=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Dk=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=j.svg(n),m=Ok(0,0,s,h,l,c,u),y=Dk(0,c,s,h,l,c),x=U(t,{}),b=g.path(m,x),_=g.path(y,x);n.insert(()=>_,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=$k(0,0,s,h,l,c,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",zt(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),G(t,f),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=q.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(ng,"linedCylinder");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=j.svg(n),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...Ge(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),G(t,y),t.intersect=function(x){return q.polygon(t,g,x)},n}p(ag,"linedWaveEdgedRect");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,d=j.svg(n),g=U(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ht(m),b=d.path(x,g),_=ht(y),k=d.path(_,{...g,fill:"none"}),v=n.insert(()=>k,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),G(t,v),t.intersect=function(L){return q.polygon(t,m,L)},n}p(sg,"multiRect");async function og(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-s/2,f=-h/2,d=5,{cssStyles:g}=t,m=Ge(u-d,f+h+d,u+s-d,f+h+d,c,.8),y=m?.[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:y.y-2*d},{x:u+s+d,y:y.y-2*d},{x:u+s+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+s-d,y:f+d},{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:f},{x:u,y:f}],_=j.svg(n),k=U(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=ht(x),L=_.path(v,k),T=ht(b),D=_.path(T,k),O=n.insert(()=>L,":first-child");return O.insert(()=>D),O.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)+d-c/2-(a.y-(a.top??0))})`),G(t,O),t.intersect=function(I){return q.polygon(t,x,I)},n}p(og,"multiWaveEdgedRectangle");async function lg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i,t.useHtmlLabels||Vt().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s}=await st(e,t,it(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=-l/2,u=-c/2,{cssStyles:f}=t,d=j.svg(o),g=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=d.rectangle(h,u,l,c,g),y=o.insert(()=>m,":first-child");return y.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),G(t,y),t.intersect=function(x){return q.rect(t,x)},o}p(lg,"note");var Rk=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.width+t.padding,s=a.height+t.padding,l=o+s,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=j.svg(n),d=U(t,{}),g=Rk(0,0,l),m=f.path(g,d);h=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=Ne(n,l,l,c);return i&&h.attr("style",i),G(t,h),t.intersect=function(f){return $.debug(`APA12 Intersect called SPLIT
|
|
185
|
+
point:`,f,`
|
|
186
|
+
node:
|
|
187
|
+
`,t,`
|
|
188
|
+
res:`,q.polygon(t,c,f)),q.polygon(t,c,f)},n}p(cg,"question");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-s/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,g=j.svg(n),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ht(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),G(t,b),t.intersect=function(_){return q.polygon(t,f,_)},n}p(hg,"rect_left_inv_arrow");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=s.node().appendChild(await ar(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(Tt(ut()?.flowchart?.htmlLabels)){const D=h.children[0],O=ct(h);u=D.getBoundingClientRect(),O.attr("width",u.width),O.attr("height",u.height)}$.info("Text 2",l);const f=l||[],d=h.getBBox(),g=s.node().appendChild(await ar(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=ct(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ct(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),ct(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),_=u.height+(t.padding||0),k=-u.width/2-x,v=-u.height/2-x;let L,T;if(t.look==="handDrawn"){const D=j.svg(a),O=U(t,{}),I=D.path(Pe(k,v,b,_,t.rx||0),O),A=D.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,O);T=a.insert(()=>($.debug("Rough node insert CXC",I),A),":first-child"),L=a.insert(()=>($.debug("Rough node insert CXC",I),I),":first-child")}else L=o.insert("rect",":first-child"),T=o.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return G(t,L),t.intersect=function(D){return q.rect(t,D)},a}p(ug,"rectWithTitle");async function fg(e,t){const r={rx:5,ry:5,labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1};return en(e,t,r)}p(fg,"roundedRect");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:f}=t,d=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",zt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),G(t,x),t.intersect=function(b){return q.rect(t,b)},n}p(dg,"shadedProcess");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-s/2,h=-l/2,{cssStyles:u}=t,f=j.svg(n),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=ht(g),y=f.path(m,d),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),G(t,x),t.intersect=function(b){return q.polygon(t,g,b)},n}p(pg,"slopedRect");async function gg(e,t){const r={rx:0,ry:0,labelPaddingX:(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return en(e,t,r)}p(gg,"squareRect");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.height+t.padding,s=a.width+o/4+t.padding;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const h=j.svg(n),u=U(t,{}),f=Pe(-s/2,-o/2,s,o,o/2),d=h.path(f,u);l=n.insert(()=>d,":first-child"),l.attr("class","basic label-container").attr("style",zt(c))}else l=n.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return G(t,l),t.intersect=function(h){return q.rect(t,h)},n}p(mg,"stadium");async function yg(e,t){return en(e,t,{rx:5,ry:5})}p(yg,"state");function xg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j.svg(c),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=s??l,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),G(t,m),t.intersect=function(y){return q.circle(t,7,y)},c}p(xg,"stateEnd");function bg(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=j.svg(n).circle(0,0,14,Cx(i));a=n.insert(()=>s),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return G(t,a),t.intersect=function(o){return q.circle(t,7,o)},n}p(bg,"stateStart");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=(t?.padding||0)/2,s=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=j.svg(n),d=U(t,{}),g=f.rectangle(c-8,h,s+16,l,d),m=f.line(c,h,c,h+l,d),y=f.line(c+s,h,c+s,h+l,d);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",zt(b)),G(t,x)}else{const f=Ne(n,s,l,u);i&&f.attr("style",i),G(t,f)}return t.intersect=function(f){return q.polygon(t,u,f)},n}p(_g,"subroutine");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,d=j.svg(n),g=U(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],y=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ht(m),b=d.path(x,g),_=ht(y),k=d.path(_,{...g,fillStyle:"solid"}),v=n.insert(()=>k,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),G(t,v),t.intersect=function(L){return q.polygon(t,m,L)},n}p(Cg,"taggedRect");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*s,u=.2*l,f=l+c,{cssStyles:d}=t,g=j.svg(n),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...Ge(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,c,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,_=[{x:x+s-h,y:(b+l)*1.4},{x:x+s,y:b+l-u},{x:x+s,y:(b+l)*.9},...Ge(x+s,(b+l)*1.3,x+s-h,(b+l)*1.5,-l*.03,.5)],k=ht(y),v=g.path(k,m),L=ht(_),T=g.path(L,{...m,fillStyle:"solid"}),D=n.insert(()=>T,":first-child");return D.insert(()=>v,":first-child"),D.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),G(t,D),t.intersect=function(O){return q.polygon(t,y,O)},n}p(wg,"taggedWaveEdgedRectangle");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+t.padding,t?.width||0),s=Math.max(a.height+t.padding,t?.height||0),l=-o/2,c=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),G(t,h),t.intersect=function(u){return q.rect(t,u)},n}p(vg,"text");var Ik=p((e,t,r,i,n,a)=>`M${e},${t}
|
|
189
|
+
a${n},${a} 0,0,1 0,${-i}
|
|
190
|
+
l${r},0
|
|
191
|
+
a${n},${a} 0,0,1 0,${i}
|
|
192
|
+
M${r},${-i}
|
|
193
|
+
a${n},${a} 0,0,0 0,${i}
|
|
194
|
+
l${-r},0`,"createCylinderPathD"),Pk=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Nk=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await st(e,t,it(t)),l=t.look==="neo"?s*2:s,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=j.svg(n),y=Pk(0,0,f,c,u,h),x=Nk(0,0,f,c,u,h),b=m.path(y,U(t,{})),_=m.path(x,U(t,{fill:"none"}));g=n.insert(()=>_,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=Ik(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",zt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),G(t,g),t.intersect=function(m){const y=q.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(kg,"tiltedCylinder");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=a.width+t.padding,s=a.height+t.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=U(t,{}),d=ht(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ne(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,G(t,c),t.intersect=function(u){return q.polygon(t,l,u)},n}p(Sg,"trapezoid");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=60,s=20,l=Math.max(o,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=j.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ht(d),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),G(t,y),t.intersect=function(x){return q.polygon(t,d,x)},n}p(Tg,"trapezoidalPentagon");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Tt(ut().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ht(u),y=d.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,G(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return $.info("Triangle intersect",t,u,b),q.polygon(t,u,b)},n}p(Lg,"triangle");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-s,g=d>0?d/2:0,m=j.svg(n),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Ge(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=ht(x),_=m.path(b,y),k=n.insert(()=>_,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),G(t,k),t.intersect=function(v){return q.polygon(t,x,v)},n}p(Bg,"waveEdgedRectangle");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await st(e,t,it(t)),o=100,s=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=j.svg(n),x=U(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ge(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...Ge(u/2,-g/2,-u/2,-g/2,d,-1)],_=ht(b),k=y.path(_,x),v=n.insert(()=>k,":first-child");return v.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),G(t,v),t.intersect=function(L){return q.polygon(t,b,L)},n}p(Ag,"waveRectangle");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await st(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,d=j.svg(n),g=U(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],y=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c}
|
|
195
|
+
M${h-c},${u} L${h+s},${u}
|
|
196
|
+
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),G(t,b),t.intersect=function(_){return q.polygon(t,m,_)},n}p(Mg,"windowPane");async function dl(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:et}=Vt(),{background:tt}=et,lt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${tt}`]};await dl(e,lt)}const i=Vt();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:l}=V(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};De(t.label,i)+et.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const tt=await en(e,t,et);if(!Tt(i.htmlLabels)){const lt=tt.select("text"),nt=lt.node()?.getBBox();lt.attr("transform",`translate(${-nt.width/2}, 0)`)}return tt}i.htmlLabels||(n*=1.25,a*=1.25);let c=it(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await Br(h,t.label??"",i,0,0,["name"],s);u.height+=a;let f=0;const d=[],g=[];let m=0,y=0,x=0,b=0,_=!0,k=!0;for(const et of r.attributes){const tt=await Br(h,et.type,i,0,f,["attribute-type"],s);m=Math.max(m,tt.width+n);const lt=await Br(h,et.name,i,0,f,["attribute-name"],s);y=Math.max(y,lt.width+n);const nt=await Br(h,et.keys.join(),i,0,f,["attribute-keys"],s);x=Math.max(x,nt.width+n);const _t=await Br(h,et.comment,i,0,f,["attribute-comment"],s);b=Math.max(b,_t.width+n);const Ct=Math.max(tt.height,lt.height,nt.height,_t.height)+a;g.push({yOffset:f,rowHeight:Ct}),f+=Ct}let v=4;x<=n&&(_=!1,x=0,v--),b<=n&&(k=!1,b=0,v--);const L=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const et=u.width+n*2-(m+y+x+b);m+=et/v,y+=et/v,x>0&&(x+=et/v),b>0&&(b+=et/v)}const T=m+y+x+b,D=j.svg(h),O=U(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");let I=0;g.length>0&&(I=g.reduce((et,tt)=>et+(tt?.rowHeight??0),0));const A=Math.max(L.width+n*2,t?.width||0,T),N=Math.max((I??0)+u.height,t?.height||0),R=-A/2,B=-N/2;h.selectAll("g:not(:first-child)").each((et,tt,lt)=>{const nt=ct(lt[tt]),_t=nt.attr("transform");let Ct=0,ie=0;if(_t){const xt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(_t);xt&&(Ct=parseFloat(xt[1]),ie=parseFloat(xt[2]),nt.attr("class").includes("attribute-name")?Ct+=m:nt.attr("class").includes("attribute-keys")?Ct+=m+y:nt.attr("class").includes("attribute-comment")&&(Ct+=m+y+x))}nt.attr("transform",`translate(${R+n/2+Ct}, ${ie+B+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(B+a/2)+")");const M=D.rectangle(R,B,A,N,O),S=h.insert(()=>M,":first-child").attr("style",o.join("")),{themeVariables:F}=Vt(),{rowEven:E,rowOdd:H,nodeBorder:X}=F;d.push(0);for(const[et,tt]of g.entries()){const nt=(et+1)%2===0&&tt.yOffset!==0,_t=D.rectangle(R,u.height+B+tt?.yOffset,A,tt?.rowHeight,{...O,fill:nt?E:H,stroke:X});h.insert(()=>_t,"g.label").attr("style",o.join("")).attr("class",`row-rect-${nt?"even":"odd"}`)}let K=D.line(R,u.height+B,A+R,u.height+B,O);h.insert(()=>K).attr("class","divider"),K=D.line(m+R,u.height+B,m+R,N+B,O),h.insert(()=>K).attr("class","divider"),_&&(K=D.line(m+y+R,u.height+B,m+y+R,N+B,O),h.insert(()=>K).attr("class","divider")),k&&(K=D.line(m+y+x+R,u.height+B,m+y+x+R,N+B,O),h.insert(()=>K).attr("class","divider"));for(const et of d)K=D.line(R,u.height+B+et,A+R,u.height+B+et,O),h.insert(()=>K).attr("class","divider");if(G(t,S),l&&t.look!=="handDrawn"){const tt=l.split(";")?.filter(lt=>lt.includes("stroke"))?.map(lt=>`${lt}`).join("; ");h.selectAll("path").attr("style",tt??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(et){return q.rect(t,et)},h}p(dl,"erBox");async function Br(e,t,r,i=0,n=0,a=[],o=""){const s=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==Vl(t)&&(t=Vl(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await Xe(s,t,{width:De(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(Tt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=ct(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Br,"addText");async function Eg(e,t,r,i,n=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",it(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Si(s,{text:`«${b}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Si(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const _=await Si(c,b,m,[b.parseClassifier()]);m+=_+a}d=c.node().getBBox().height,d<=0&&(d=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const _=await Si(h,b,y,[b.parseClassifier()]);y+=_+a}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(Eg,"textHelper");async function Si(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Vt();let o="useHtmlLabels"in t?t.useHtmlLabels:Tt(a.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),Yr(s)&&(o=!0);const l=await Xe(n,Ca(yr(s)),{width:De(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],f=ct(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,k=parseInt(b,10)*5+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&ct(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Si,"addText");async function Fg(e,t){const r=ut(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??Tt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await Eg(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=V(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,d=j.svg(s),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=n:o.members.length>0&&o.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,_=d.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),k=s.insert(()=>_,":first-child");k.attr("class","basic label-container");const v=k.node().getBBox();s.selectAll(".text").each((O,I,A)=>{const N=ct(A[I]),R=N.attr("transform");let B=0;if(R){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);E&&(B=parseFloat(E[2]))}let M=B+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(M-=4);let S=x;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(S=-N.node()?.getBBox().width/2||0,s.selectAll("text").each(function(F,E,H){window.getComputedStyle(H[E]).textAnchor==="middle"&&(S=0)})),N.attr("transform",`translate(${S}, ${M})`)});const L=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,T=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,D=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const O=d.line(v.x,L+T+b+i,v.x+v.width,L+T+b+i,g);s.insert(()=>O).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const O=d.line(v.x,L+T+D+b+n*2+i,v.x+v.width,L+T+D+b+i+n*2,g);s.insert(()=>O).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),k.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.labelStyle):s.selectAll("span").attr("style",u),!a){const O=RegExp(/color\s*:\s*([^;]*)/),I=O.exec(u);if(I){const A=I[0].replace("color","fill");s.selectAll("tspan").attr("style",A)}else if(c){const A=O.exec(c);if(A){const N=A[0].replace("color","fill");s.selectAll("tspan").attr("style",N)}}}return G(t,k),t.intersect=function(O){return q.rect(t,O)},s}p(Fg,"classBox");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const n=t,a=t,o=20,s=20,l="verifyMethod"in t,c=it(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await de(h,`<<${n.type}>>`,0,t.labelStyle):u=await de(h,"<<Element>>",0,t.labelStyle);let f=u;const d=await de(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+s,l){const L=await de(h,`${n.requirementId?`id: ${n.requirementId}`:""}`,f,t.labelStyle);f+=L;const T=await de(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=T;const D=await de(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=D,await de(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const L=await de(h,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=L,await de(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+o,m=(h.node()?.getBBox().height??200)+o,y=-g/2,x=-m/2,b=j.svg(h),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=b.rectangle(y,x,g,m,_),v=h.insert(()=>k,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((L,T,D)=>{const O=ct(D[T]),I=O.attr("transform");let A=0,N=0;if(I){const S=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);S&&(A=parseFloat(S[1]),N=parseFloat(S[2]))}const R=N-m/2;let B=y+o/2;(T===0||T===1)&&(B=A),O.attr("transform",`translate(${B}, ${R+o})`)}),f>u+d+s){const L=b.line(y,x+u+d+s,y+g,x+u+d+s,_);h.insert(()=>L).attr("style",i)}return G(t,v),t.intersect=function(L){return q.rect(t,L)},h}p($g,"requirementBox");async function de(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ut(),o=a.htmlLabels??!0,s=await Xe(n,Ca(yr(t)),{width:De(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=s.children[0],h=ct(s);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=s.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=s.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(de,"addText");var zk=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Og(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await st(e,t,it(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await ms(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await ms(s,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await ms(s,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,_=t?.width||0,k=Math.max(m.height,x.height)/2,v=Math.max(l.height+b*2,t?.height||0)+k,L=-_/2,T=-v/2;c.attr("transform","translate("+(h-_/2)+", "+(-k-l.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-k+l.height/2)+")"),y.attr("transform","translate("+(h+_/2-x.width-2*a)+", "+(-k+l.height/2)+")");let D;const{rx:O,ry:I}=t,{cssStyles:A}=t;if(t.look==="handDrawn"){const N=j.svg(s),R=U(t,{}),B=O||I?N.path(Pe(L,T,_,v,O||0),R):N.rectangle(L,T,_,v,R);D=s.insert(()=>B,":first-child"),D.attr("class","basic label-container").attr("style",A||null)}else{D=s.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",O??5).attr("ry",I??5).attr("x",L).attr("y",T).attr("width",_).attr("height",v);const N="priority"in t&&t.priority;if(N){const R=s.append("line"),B=L+2,M=T+Math.floor((O??0)/2),S=T+v-Math.floor((O??0)/2);R.attr("x1",B).attr("y1",M).attr("x2",B).attr("y2",S).attr("stroke-width","4").attr("stroke",zk(N))}}return G(t,D),t.height=v,t.intersect=function(N){return q.rect(t,N)},s}p(Og,"kanbanItem");var Wk=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:gg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:fg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:mg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:_g},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Np},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Fp},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:cg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Up},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:rg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:eg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Sg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Jp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Wp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:vg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Mp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:dg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:bg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:xg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:jp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Gp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Dp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Rp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ip},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ig},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Bg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Yp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:kg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ng},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Pp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:zp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Lg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Mg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:qp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Tg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Hp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:pg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:og},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:sg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ap},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Op},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:wg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Cg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ag},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:hg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:ag}],qk=p(()=>{const t=[...Object.entries({state:yg,choice:Ep,note:lg,rectWithTitle:ug,labelRect:tg,iconSquare:Kp,iconCircle:Xp,icon:Vp,iconRounded:Zp,imageSquare:Qp,anchor:Bp,kanbanItem:Og,classBox:Fg,erBox:dl,requirementBox:$g}),...Wk.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Dg=qk();function Hk(e){return e in Dg}p(Hk,"isValidShape");var za=new Map;async function Rg(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Dg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),za.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Rg,"insertNode");var VB=p((e,t)=>{za.set(t.id,e)},"setNodeElem"),XB=p(()=>{za.clear()},"clear"),ZB=p(e=>{const t=za.get(e.id);$.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),jk=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&th(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&th(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),Yk={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},th=p((e,t,r,i,n,a,o)=>{const s=Yk[r];if(!s){$.warn(`Unknown arrow type: ${r}`);return}const l=s.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const g=d.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),s.fill&&y.setAttribute("fill",o)}),d.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),ga=new Map,At=new Map,KB=p(()=>{ga.clear(),At.clear()},"clear"),bi=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Uk=p(async(e,t)=>{let r=Tt(ut().flowchart.htmlLabels);const i=await Xe(e,t.label,{style:bi(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});$.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label");a.node().appendChild(i);let o=i.getBBox();if(r){const l=i.children[0],c=ct(i);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),ga.set(t.id,n),t.width=o.width,t.height=o.height;let s;if(t.startLabelLeft){const l=await ar(t.startLabelLeft,bi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),At.get(t.id)||At.set(t.id,{}),At.get(t.id).startLeft=c,Ti(s,t.startLabelLeft)}if(t.startLabelRight){const l=await ar(t.startLabelRight,bi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=c.node().appendChild(l),h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),At.get(t.id)||At.set(t.id,{}),At.get(t.id).startRight=c,Ti(s,t.startLabelRight)}if(t.endLabelLeft){const l=await ar(t.endLabelLeft,bi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),At.get(t.id)||At.set(t.id,{}),At.get(t.id).endLeft=c,Ti(s,t.endLabelLeft)}if(t.endLabelRight){const l=await ar(t.endLabelRight,bi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),At.get(t.id)||At.set(t.id,{}),At.get(t.id).endRight=c,Ti(s,t.endLabelRight)}return i},"insertEdgeLabel");function Ti(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Ti,"setTerminalWidth");var Gk=p((e,t)=>{$.debug("Moving label abc88 ",e.id,e.label,ga.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:n}=Eo(i);if(e.label){const a=ga.get(e.id);let o=e.x,s=e.y;if(r){const l=ge.calcLabelPosition(r);$.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=At.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=At.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=At.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=At.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),Vk=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),Xk=p((e,t,r)=>{$.debug(`intersection calc abc89:
|
|
197
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
198
|
+
insidePoint : ${JSON.stringify(r)}
|
|
199
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;s=h*u/c;const f={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+c-u:r.y-c+u};return s===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),$.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=c*s/h,f=r.x<t.x?r.x+h-s:r.x-h+s,d=r.y<t.y?r.y+u:r.y-u;return $.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${s}`,{_x:f,_y:d}),s===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),eh=p((e,t)=>{$.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if($.info("abc88 checking point",a,t),!Vk(t,a)&&!n){const o=Xk(t,i,a);$.debug("abc88 inside",a,i,o),$.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?$.warn("abc88 no intersect",o,r):r.push(o),n=!0}else $.warn("abc88 outside",a,i),i=a,n||r.push(a)}),$.debug("returning points",r),r},"cutPathAtIntersect");function Ig(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],o=e[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Ig,"extractCornerPoints");var rh=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),Zk=p(function(e){const{cornerPointPositions:t}=Ig(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],o=e[i],s=rh(n,o,5),l=rh(a,o,5),c=l.x-s.x,h=l.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){$.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const d=5;o.x===s.x?f={x:c<0?s.x-d+u:s.x+d-u,y:h<0?s.y-u:s.y+u}:f={x:c<0?s.x-u:s.x+u,y:h<0?s.y-d+u:s.y+d-u}}else $.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),Kk=p(function(e,t,r,i,n,a,o){const{handDrawnSeed:s}=ut();let l=t.points,c=!1;const h=n;var u=a;const f=[];for(const O in t.cssCompiledStyles)vf(O)||f.push(t.cssCompiledStyles[O]);u.intersect&&h.intersect&&(l=l.slice(1,t.points.length-1),l.unshift(h.intersect(l[0])),$.debug("Last point APA12",t.start,"-->",t.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),t.toCluster&&($.info("to cluster abc88",r.get(t.toCluster)),l=eh(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&($.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=eh(l.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let d=l.filter(O=>!Number.isNaN(O.y));d=Zk(d);let g=An;switch(g=Qn,t.curve){case"linear":g=Qn;break;case"basis":g=An;break;case"cardinal":g=nd;break;case"bumpX":g=Jf;break;case"bumpY":g=td;break;case"catmullRom":g=sd;break;case"monotoneX":g=fd;break;case"monotoneY":g=dd;break;case"natural":g=gd;break;case"step":g=md;break;case"stepAfter":g=xd;break;case"stepBefore":g=yd;break;default:g=An}const{x:m,y}=_x(t),x=G2().x(m).y(y).curve(g);let b;switch(t.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(t.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 _,k=x(d);const v=Array.isArray(t.style)?t.style:t.style?[t.style]:[];let L=v.find(O=>O?.startsWith("stroke:"));if(t.look==="handDrawn"){const O=j.svg(e);Object.assign([],d);const I=O.path(k,{roughness:.3,seed:s});b+=" transition",_=ct(I).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((N,R)=>N+";"+R,""):"");let A=_.attr("d");_.attr("d",A),e.node().appendChild(_.node())}else{const O=f.join(";"),I=v?v.reduce((R,B)=>R+B+";",""):"";let A="";t.animate&&(A=" edge-animation-fast"),t.animation&&(A=" edge-animation-"+t.animation);const N=O?O+";"+I+";":I;_=e.append("path").attr("d",k).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(A??"")).attr("style",N),L=N.match(/stroke:([^;]+)/)?.[1]}let T="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(T=Ph(!0)),$.info("arrowTypeStart",t.arrowTypeStart),$.info("arrowTypeEnd",t.arrowTypeEnd),jk(_,t,T,o,i,L);let D={};return c&&(D.updatedPath=l),D.originalPath=t.points,D},"insertEdge"),Qk=p((e,t,r,i)=>{t.forEach(n=>{pS[n](e,r,i)})},"insertMarkers"),Jk=p((e,t,r)=>{$.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),tS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),eS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),rS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),iS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),nS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),aS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),sS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),oS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),lS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),cS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),hS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),uS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),fS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
200
|
+
L20,10
|
|
201
|
+
M20,10
|
|
202
|
+
L0,20`)},"requirement_arrow"),dS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),pS={extension:Jk,composition:tS,aggregation:eS,dependency:rS,lollipop:iS,point:nS,circle:aS,cross:sS,barb:oS,only_one:lS,zero_or_one:cS,one_or_more:hS,zero_or_more:uS,requirement_arrow:fS,requirement_contains:dS},gS=Qk,mS={common:Qr,getConfig:Vt,insertCluster:kk,insertEdge:Kk,insertEdgeLabel:Uk,insertMarkers:gS,insertNode:Rg,interpolateToCurve:Vo,labelHelper:st,log:$,positionEdgeLabel:Gk},Hi={},Pg=p(e=>{for(const t of e)Hi[t.name]=t},"registerLayoutLoaders"),yS=p(()=>{Pg([{name:"dagre",loader:p(async()=>await pt(()=>import("./dagre-FFZHY6LT-CGbe3nXJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),"loader")}])},"registerDefaultLayoutLoaders");yS();var QB=p(async(e,t)=>{if(!(e.layoutAlgorithm in Hi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Hi[e.layoutAlgorithm];return(await r.loader()).render(e,t,mS,{algorithm:r.algorithm})},"render"),JB=p((e="",{fallback:t="dagre"}={})=>{if(e in Hi)return e;if(t in Hi)return $.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ih={name:"mermaid",version:"11.8.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},xS=p(e=>{const{securityLevel:t}=ut();let r=ct("body");if(t==="sandbox"){const a=ct(`#i${e}`).node()?.contentDocument??document;r=ct(a.body)}return r.select(`#${e}`)},"selectSvgElement"),Ng="comm",zg="rule",Wg="decl",bS="@import",_S="@namespace",CS="@keyframes",wS="@layer",qg=Math.abs,pl=String.fromCharCode;function Hg(e){return e.trim()}function $n(e,t,r){return e.replace(t,r)}function vS(e,t,r){return e.indexOf(t,r)}function Fr(e,t){return e.charCodeAt(t)|0}function Zr(e,t,r){return e.slice(t,r)}function pe(e){return e.length}function kS(e){return e.length}function bn(e,t){return t.push(e),e}var Wa=1,Kr=1,jg=0,re=0,wt=0,ii="";function gl(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Wa,column:Kr,length:o,return:"",siblings:s}}function SS(){return wt}function TS(){return wt=re>0?Fr(ii,--re):0,Kr--,wt===10&&(Kr=1,Wa--),wt}function le(){return wt=re<jg?Fr(ii,re++):0,Kr++,wt===10&&(Kr=1,Wa++),wt}function qe(){return Fr(ii,re)}function On(){return re}function qa(e,t){return Zr(ii,e,t)}function ji(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function LS(e){return Wa=Kr=1,jg=pe(ii=e),re=0,[]}function BS(e){return ii="",e}function ys(e){return Hg(qa(re-1,lo(e===91?e+2:e===40?e+1:e)))}function AS(e){for(;(wt=qe())&&wt<33;)le();return ji(e)>2||ji(wt)>3?"":" "}function MS(e,t){for(;--t&&le()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return qa(e,On()+(t<6&&qe()==32&&le()==32))}function lo(e){for(;le();)switch(wt){case e:return re;case 34:case 39:e!==34&&e!==39&&lo(wt);break;case 40:e===41&&lo(e);break;case 92:le();break}return re}function ES(e,t){for(;le()&&e+wt!==57;)if(e+wt===84&&qe()===47)break;return"/*"+qa(t,re-1)+"*"+pl(e===47?e:le())}function FS(e){for(;!ji(qe());)le();return qa(e,re)}function $S(e){return BS(Dn("",null,null,null,[""],e=LS(e),0,[0],e))}function Dn(e,t,r,i,n,a,o,s,l){for(var c=0,h=0,u=o,f=0,d=0,g=0,m=1,y=1,x=1,b=0,_="",k=n,v=a,L=i,T=_;y;)switch(g=b,b=le()){case 40:if(g!=108&&Fr(T,u-1)==58){vS(T+=$n(ys(b),"&","&\f"),"&\f",qg(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=ys(b);break;case 9:case 10:case 13:case 32:T+=AS(g);break;case 92:T+=MS(On()-1,7);continue;case 47:switch(qe()){case 42:case 47:bn(OS(ES(le(),On()),t,r,l),l),(ji(g||1)==5||ji(qe()||1)==5)&&pe(T)&&Zr(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:s[c++]=pe(T)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=$n(T,/\f/g,"")),d>0&&(pe(T)-u||m===0&&g===47)&&bn(d>32?ah(T+";",i,r,u-1,l):ah($n(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(bn(L=nh(T,t,r,c,h,n,s,_,k=[],v=[],u,a),a),b===123)if(h===0)Dn(T,t,L,L,k,a,u,s,v);else{switch(f){case 99:if(Fr(T,3)===110)break;case 108:if(Fr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Dn(e,L,L,i&&bn(nh(e,L,L,0,0,n,s,_,n,k=[],u,v),v),n,v,u,s,i?k:v):Dn(T,L,L,L,[""],v,0,s,v)}}c=h=d=0,m=x=1,_=T="",u=o;break;case 58:u=1+pe(T),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&TS()==125)continue}switch(T+=pl(b),b*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:s[c++]=(pe(T)-1)*x,x=1;break;case 64:qe()===45&&(T+=ys(le())),f=qe(),h=u=pe(_=T+=FS(On())),b++;break;case 45:g===45&&pe(T)==2&&(m=0)}}return a}function nh(e,t,r,i,n,a,o,s,l,c,h,u){for(var f=n-1,d=n===0?a:[""],g=kS(d),m=0,y=0,x=0;m<i;++m)for(var b=0,_=Zr(e,f+1,f=qg(y=o[m])),k=e;b<g;++b)(k=Hg(y>0?d[b]+" "+_:$n(_,/&\f/g,d[b])))&&(l[x++]=k);return gl(e,t,r,n===0?zg:s,l,c,h,u)}function OS(e,t,r,i){return gl(e,t,r,Ng,pl(SS()),Zr(e,2,-2),0,i)}function ah(e,t,r,i,n){return gl(e,t,r,Wg,Zr(e,0,i),Zr(e,i+1,-1),i,n)}function co(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function DS(e,t,r,i){switch(e.type){case wS:if(e.children.length)break;case bS:case _S:case Wg:return e.return=e.return||e.value;case Ng:return"";case CS:return e.return=e.value+"{"+co(e.children,i)+"}";case zg:if(!pe(e.value=e.props.join(",")))return""}return pe(r=co(e.children,i))?e.return=e.value+"{"+r+"}":""}var RS=wd(Object.keys,Object),IS=Object.prototype,PS=IS.hasOwnProperty;function NS(e){if(!Fa(e))return RS(e);var t=[];for(var r in Object(e))PS.call(e,r)&&r!="constructor"&&t.push(r);return t}var ho=mr(_e,"DataView"),uo=mr(_e,"Promise"),fo=mr(_e,"Set"),po=mr(_e,"WeakMap"),sh="[object Map]",zS="[object Object]",oh="[object Promise]",lh="[object Set]",ch="[object WeakMap]",hh="[object DataView]",WS=gr(ho),qS=gr(qi),HS=gr(uo),jS=gr(fo),YS=gr(po),tr=ti;(ho&&tr(new ho(new ArrayBuffer(1)))!=hh||qi&&tr(new qi)!=sh||uo&&tr(uo.resolve())!=oh||fo&&tr(new fo)!=lh||po&&tr(new po)!=ch)&&(tr=function(e){var t=ti(e),r=t==zS?e.constructor:void 0,i=r?gr(r):"";if(i)switch(i){case WS:return hh;case qS:return sh;case HS:return oh;case jS:return lh;case YS:return ch}return t});var US="[object Map]",GS="[object Set]",VS=Object.prototype,XS=VS.hasOwnProperty;function uh(e){if(e==null)return!0;if($a(e)&&(aa(e)||typeof e=="string"||typeof e.splice=="function"||Uo(e)||Go(e)||na(e)))return!e.length;var t=tr(e);if(t==US||t==GS)return!e.size;if(Fa(e))return!NS(e).length;for(var r in e)if(XS.call(e,r))return!1;return!0}var Yg="c4",ZS=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),KS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./c4Diagram-6F6E4RAY-BfXjadL9.js");return{diagram:t}},__vite__mapDeps([21,22,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:Yg,diagram:e}},"loader"),QS={id:Yg,detector:ZS,loader:KS},JS=QS,Ug="flowchart",tT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),eT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-PKI6S5ZS-ie1Nf5_c.js");return{diagram:t}},__vite__mapDeps([23,24,25,26,27,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:Ug,diagram:e}},"loader"),rT={id:Ug,detector:tT,loader:eT},iT=rT,Gg="flowchart-v2",nT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),aT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-PKI6S5ZS-ie1Nf5_c.js");return{diagram:t}},__vite__mapDeps([23,24,25,26,27,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:Gg,diagram:e}},"loader"),sT={id:Gg,detector:nT,loader:aT},oT=sT,Vg="er",lT=p(e=>/^\s*erDiagram/.test(e),"detector"),cT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./erDiagram-R3QVA2FD-Bu6B069U.js");return{diagram:t}},__vite__mapDeps([28,25,26,27,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:Vg,diagram:e}},"loader"),hT={id:Vg,detector:lT,loader:cT},uT=hT,Xg="gitGraph",fT=p(e=>/^\s*gitGraph/.test(e),"detector"),dT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-GW3U2K7C-BmD31KK0.js");return{diagram:t}},__vite__mapDeps([29,30,31,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,2,4,5]));return{id:Xg,diagram:e}},"loader"),pT={id:Xg,detector:fT,loader:dT},gT=pT,Zg="gantt",mT=p(e=>/^\s*gantt/.test(e),"detector"),yT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ganttDiagram-EK5VF46D-BjgRWg6k.js");return{diagram:t}},__vite__mapDeps([33,9,34,35,36,6,7,8,10,11,12,13,14,15,16,17,18,19,20]));return{id:Zg,diagram:e}},"loader"),xT={id:Zg,detector:mT,loader:yT},bT=xT,Kg="info",_T=p(e=>/^\s*info/.test(e),"detector"),CT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./infoDiagram-RLU2ROGC-DVoDIRGH.js");return{diagram:t}},__vite__mapDeps([37,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,2,4,5]));return{id:Kg,diagram:e}},"loader"),wT={id:Kg,detector:_T,loader:CT},Qg="pie",vT=p(e=>/^\s*pie/.test(e),"detector"),kT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./pieDiagram-NIOCPIFQ-TwGmrzCW.js");return{diagram:t}},__vite__mapDeps([38,30,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,2,4,5,39,40,35]));return{id:Qg,diagram:e}},"loader"),ST={id:Qg,detector:vT,loader:kT},Jg="quadrantChart",TT=p(e=>/^\s*quadrantChart/.test(e),"detector"),LT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-2OG54O6I-C2FaFW77.js");return{diagram:t}},__vite__mapDeps([41,34,35,36,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:Jg,diagram:e}},"loader"),BT={id:Jg,detector:TT,loader:LT},AT=BT,tm="xychart",MT=p(e=>/^\s*xychart-beta/.test(e),"detector"),ET=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./xychartDiagram-H2YORKM3-rhbSyPlb.js");return{diagram:t}},__vite__mapDeps([42,35,40,34,36,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:tm,diagram:e}},"loader"),FT={id:tm,detector:MT,loader:ET},$T=FT,em="requirement",OT=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),DT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./requirementDiagram-SO3GGRV7-BENrmejn.js");return{diagram:t}},__vite__mapDeps([43,25,26,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:em,diagram:e}},"loader"),RT={id:em,detector:OT,loader:DT},IT=RT,rm="sequence",PT=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),NT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-ZIKVLSP4-wsbYfOcv.js");return{diagram:t}},__vite__mapDeps([44,22,31,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:rm,diagram:e}},"loader"),zT={id:rm,detector:PT,loader:NT},WT=zT,im="class",qT=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),HT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-BGRH5UQR-BZY1Xh5a.js");return{diagram:t}},__vite__mapDeps([45,46,24,25,26,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:im,diagram:e}},"loader"),jT={id:im,detector:qT,loader:HT},YT=jT,nm="classDiagram",UT=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),GT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-O24JOBDK-BZY1Xh5a.js");return{diagram:t}},__vite__mapDeps([47,46,24,25,26,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:nm,diagram:e}},"loader"),VT={id:nm,detector:UT,loader:GT},XT=VT,am="state",ZT=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),KT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-XX37X6EN-D8VCWzU7.js");return{diagram:t}},__vite__mapDeps([48,49,25,26,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:am,diagram:e}},"loader"),QT={id:am,detector:ZT,loader:KT},JT=QT,sm="stateDiagram",tL=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),eL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-GD6S3NHB-CWoWkzf7.js");return{diagram:t}},__vite__mapDeps([50,49,25,26,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:sm,diagram:e}},"loader"),rL={id:sm,detector:tL,loader:eL},iL=rL,om="journey",nL=p(e=>/^\s*journey/.test(e),"detector"),aL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./journeyDiagram-EWQZEKCU-C_Lb2L11.js");return{diagram:t}},__vite__mapDeps([51,22,24,39,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:om,diagram:e}},"loader"),sL={id:om,detector:nL,loader:aL},oL=sL,lL=p((e,t,r)=>{$.debug(`rendering svg for syntax error
|
|
203
|
+
`);const i=xS(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Nh(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),lm={draw:lL},cL=lm,hL={db:{},renderer:lm,parser:{parse:p(()=>{},"parse")}},uL=hL,cm="flowchart-elk",fL=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),dL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-PKI6S5ZS-ie1Nf5_c.js");return{diagram:t}},__vite__mapDeps([23,24,25,26,27,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:cm,diagram:e}},"loader"),pL={id:cm,detector:fL,loader:dL},gL=pL,hm="timeline",mL=p(e=>/^\s*timeline/.test(e),"detector"),yL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./timeline-definition-RI47OAVP-D44Hv-fs.js");return{diagram:t}},__vite__mapDeps([52,39,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:hm,diagram:e}},"loader"),xL={id:hm,detector:mL,loader:yL},bL=xL,um="mindmap",_L=p(e=>/^\s*mindmap/.test(e),"detector"),CL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./mindmap-definition-CZNETY7S-BGn0gmpB.js");return{diagram:t}},__vite__mapDeps([53,54,9,6,7,8,10,11,12,13,14,15,16,17,18,19,20]));return{id:um,diagram:e}},"loader"),wL={id:um,detector:_L,loader:CL},vL=wL,fm="kanban",kL=p(e=>/^\s*kanban/.test(e),"detector"),SL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./kanban-definition-ILFWEQ3N-KsekSC1N.js");return{diagram:t}},__vite__mapDeps([55,24,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:fm,diagram:e}},"loader"),TL={id:fm,detector:kL,loader:SL},LL=TL,dm="sankey",BL=p(e=>/^\s*sankey-beta/.test(e),"detector"),AL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-4UZDY2LN-DHcxz6y6.js");return{diagram:t}},__vite__mapDeps([56,40,35,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:dm,diagram:e}},"loader"),ML={id:dm,detector:BL,loader:AL},EL=ML,pm="packet",FL=p(e=>/^\s*packet-beta/.test(e),"detector"),$L=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-5UYTHUR4-Bq8b35J7.js");return{diagram:t}},__vite__mapDeps([57,30,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,2,4,5]));return{id:pm,diagram:e}},"loader"),OL={id:pm,detector:FL,loader:$L},gm="radar",DL=p(e=>/^\s*radar-beta/.test(e),"detector"),RL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-ZTM2IBQH-DZ0Q3vKL.js");return{diagram:t}},__vite__mapDeps([58,30,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,2,4,5]));return{id:gm,diagram:e}},"loader"),IL={id:gm,detector:DL,loader:RL},mm="block",PL=p(e=>/^\s*block-beta/.test(e),"detector"),NL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./blockDiagram-PHRCVELO-h_TbDJvl.js");return{diagram:t}},__vite__mapDeps([59,24,5,2,1,27,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));return{id:mm,diagram:e}},"loader"),zL={id:mm,detector:PL,loader:NL},WL=zL,ym="architecture",qL=p(e=>/^\s*architecture/.test(e),"detector"),HL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./architectureDiagram-NQ2NVSRB-D_wGZ5nT.js");return{diagram:t}},__vite__mapDeps([60,30,31,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,2,4,5,54]));return{id:ym,diagram:e}},"loader"),jL={id:ym,detector:qL,loader:HL},YL=jL,xm="treemap",UL=p(e=>/^\s*treemap/.test(e),"detector"),GL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-3EMPZRKU-8UM2S96z.js");return{diagram:t}},__vite__mapDeps([61,26,30,31,32,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,2,4,5,36,40,35]));return{id:xm,diagram:e}},"loader"),VL={id:xm,detector:UL,loader:GL},fh=!1,Ha=p(()=>{fh||(fh=!0,Nn("error",uL,e=>e.toLowerCase().trim()==="error"),Nn("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Cs(gL,vL,YL),Cs(JS,LL,XT,YT,uT,bT,wT,ST,IT,WT,oT,iT,bL,gT,iL,JT,oL,AT,EL,OL,$T,WL,IL,VL))},"addDiagrams"),XL=p(async()=>{$.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(qr).map(async([r,{detector:i,loader:n}])=>{if(n)try{Ss(r)}catch{try{const{diagram:a,id:o}=await n();Nn(o,a,i)}catch(a){throw $.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete qr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){$.error(`Failed to load ${t.length} external diagrams`);for(const r of t)$.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),ZL="graphics-document document";function bm(e,t){e.attr("role",ZL),t!==""&&e.attr("aria-roledescription",t)}p(bm,"setA11yDiagramInfo");function _m(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(_m,"addSVGa11yTitleDescription");var or,go=(or=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=Vt(),n=xo(t,i);t=Gw(t)+`
|
|
204
|
+
`;try{Ss(n)}catch{const c=C0(n);if(!c)throw new Sh(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Nn(h,u)}const{db:a,parser:o,renderer:s,init:l}=Ss(n);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new or(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(or,"Diagram"),or),dh=[],KL=p(()=>{dh.forEach(e=>{e()}),dh=[]},"attachFunctions"),QL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Cm(e){const t=e.match(kh);if(!t)return{text:e,metadata:{}};let r=bx(t[1],{schema:xx})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Cm,"extractFrontMatter");var JL=p(e=>e.replace(/\r\n?/g,`
|
|
205
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),tB=p(e=>{const{text:t,metadata:r}=Cm(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),eB=p(e=>{const t=ge.detectInit(e)??{},r=ge.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:Ow(e),directive:t}},"processDirectives");function ml(e){const t=JL(e),r=tB(t),i=eB(r.text),n=Jo(r.config,i.directive);return e=QL(i.text),{code:e,title:r.title,config:n}}p(ml,"preprocessDiagram");function wm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(wm,"toBase64");var rB=5e4,iB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",nB="sandbox",aB="loose",sB="http://www.w3.org/2000/svg",oB="http://www.w3.org/1999/xlink",lB="http://www.w3.org/1999/xhtml",cB="100%",hB="100%",uB="border:0;margin:0;",fB="margin:0",dB="allow-top-navigation-by-user-activation allow-popups",pB='The "iframe" tag is not supported by your browser.',gB=["foreignobject"],mB=["dominant-baseline"];function yl(e){const t=ml(e);return In(),I0(t.config??{}),t}p(yl,"processAndSetConfigs");async function vm(e,t){Ha();try{const{code:r,config:i}=yl(e);return{diagramType:(await Sm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(vm,"parse");var ph=p((e,t,r=[])=>`
|
|
206
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),yB=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
207
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
208
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
209
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(s=>{uh(s.styles)||o.forEach(l=>{r+=ph(s.id,l,s.styles)}),uh(s.textStyles)||(r+=ph(s.id,"tspan",(s?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),xB=p((e,t,r,i)=>{const n=yB(e,r),a=ey(t,n,e.themeVariables);return co($S(`${i}{${a}}`),DS)},"createUserStyles"),bB=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=yr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),_B=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":hB,i=wm(`<body style="${fB}">${e}</body>`);return`<iframe style="width:${cB};height:${r};${uB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${dB}">
|
|
210
|
+
${pB}
|
|
211
|
+
</iframe>`},"putIntoIFrame"),gh=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",sB);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function mo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(mo,"sandboxedIframe");var CB=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),wB=p(async function(e,t,r){Ha();const i=yl(t);t=i.code;const n=Vt();$.debug(n),t.length>(n?.maxTextSize??rB)&&(t=iB);const a="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=p(()=>{const R=ct(f?s:c).node();R&&"remove"in R&&R.remove()},"removeTempElements");let u=ct("body");const f=n.securityLevel===nB,d=n.securityLevel===aB,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const N=mo(ct(r),o);u=ct(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ct(r);gh(u,e,l,`font-family: ${g}`,oB)}else{if(CB(document,e,l,o),f){const N=mo(ct("body"),o);u=ct(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ct("body");gh(u,e,l)}let m,y;try{m=await go.fromText(t,{title:i.title})}catch(N){if(n.suppressErrorRendering)throw h(),N;m=await go.fromText("error"),y=N}const x=u.select(c).node(),b=m.type,_=x.firstChild,k=_.firstChild,v=m.renderer.getClasses?.(t,m),L=xB(n,b,v,a),T=document.createElement("style");T.innerHTML=L,_.insertBefore(T,k);try{await m.renderer.draw(t,e,ih.version,m)}catch(N){throw n.suppressErrorRendering?h():cL.draw(t,e,ih.version),N}const D=u.select(`${c} svg`),O=m.db.getAccTitle?.(),I=m.db.getAccDescription?.();Tm(b,D,O,I),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",lB);let A=u.select(c).node().innerHTML;if($.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),A=bB(A,f,Tt(n.arrowMarkerAbsolute)),f){const N=u.select(c+" svg").node();A=_B(A,N)}else d||(A=Wr.sanitize(A,{ADD_TAGS:gB,ADD_ATTR:mB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(KL(),y)throw y;return h(),{diagramType:b,svg:A,bindFunctions:m.db.bindFunctions}},"render");function km(e={}){const t=Mt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),D0(t),t?.theme&&t.theme in Fe?t.themeVariables=Fe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Fe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?O0(t):Eh();yo(r.logLevel),Ha()}p(km,"initialize");var Sm=p((e,t={})=>{const{code:r}=ml(e);return go.fromText(r,t)},"getDiagramFromText");function Tm(e,t,r,i){bm(t,e),_m(t,r,i,t.attr("id"))}p(Tm,"addA11yInfo");var dr=Object.freeze({render:wB,parse:vm,getDiagramFromText:Sm,initialize:km,getConfig:Vt,setConfig:Fh,getSiteConfig:Eh,updateSiteConfig:R0,reset:p(()=>{In()},"reset"),globalReset:p(()=>{In(Hr)},"globalReset"),defaultConfig:Hr});yo(Vt().logLevel);In(Vt());var vB=p((e,t,r)=>{$.warn(e),Qo(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Lm=p(async function(e={querySelector:".mermaid"}){try{await kB(e)}catch(t){if(Qo(t)&&$.error(t.str),Re.parseError&&Re.parseError(t),!e.suppressErrors)throw $.error("Use the suppressErrors option to suppress these errors"),t}},"run"),kB=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=dr.getConfig();$.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");$.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&($.debug("Start On Load: "+i?.startOnLoad),dr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new ge.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(n)){if($.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=Jd(ge.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ge.detectInit(o);h&&$.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Em(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){vB(u,s,Re.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Bm=p(function(e){dr.initialize(e)},"initialize"),SB=p(async function(e,t,r){$.warn("mermaid.init is deprecated. Please use run instead."),e&&Bm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Lm(i)},"init"),TB=p(async(e,{lazyLoad:t=!0}={})=>{Ha(),Cs(...e),t===!1&&await XL()},"registerExternalDiagrams"),Am=p(function(){if(Re.startOnLoad){const{startOnLoad:e}=dr.getConfig();e&&Re.run().catch(t=>$.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Am,!1);var LB=p(function(e){Re.parseError=e},"setParseErrorHandler"),ma=[],xs=!1,Mm=p(async()=>{if(!xs){for(xs=!0;ma.length>0;){const e=ma.shift();if(e)try{await e()}catch(t){$.error("Error executing queue",t)}}xs=!1}},"executeQueue"),BB=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,o)=>{dr.parse(e,t).then(s=>{a(s),r(s)},s=>{$.error("Error parsing",s),Re.parseError?.(s),o(s),i(s)})}),"performCall");ma.push(n),Mm().catch(i)}),"parse"),Em=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((o,s)=>{dr.render(e,t,r).then(l=>{o(l),i(l)},l=>{$.error("Error parsing",l),Re.parseError?.(l),s(l),n(l)})}),"performCall");ma.push(a),Mm().catch(n)}),"render"),Re={startOnLoad:!0,mermaidAPI:dr,parse:BB,render:Em,init:SB,run:Lm,registerExternalDiagrams:TB,registerLayoutLoaders:Pg,initialize:Bm,parseError:void 0,contentLoaded:Am,setParseErrorHandler:LB,detectType:xo,registerIconPacks:Kv},AB=Re;/*! Check if previously processed *//*!
|
|
212
|
+
* Wait for document loaded before starting the execution
|
|
213
|
+
*/const tA=Object.freeze(Object.defineProperty({__proto__:null,default:AB},Symbol.toStringTag,{value:"Module"}));export{NB as $,OB as A,Bi as B,ye as C,b0 as D,hy as E,Jo as F,Vt as G,Ah as H,Nw as I,xx as J,xS as K,ih as L,H2 as M,No as N,PB as O,WB as P,Sr as Q,xc as R,yc as S,HB as T,at as U,qB as V,zB as W,RB as X,IB as Y,YB as Z,p as _,ny as a,m1 as a$,jB as a0,L0 as a1,Yr as a2,FB as a3,Oa as a4,Mw as a5,Ph as a6,bo as a7,Vl as a8,G2 as a9,G as aA,VB as aB,Kk as aC,Gk as aD,Uk as aE,Jv as aF,j2 as aG,Ji as aH,Kv as aI,Zv as aJ,pr as aK,Lw as aL,Md as aM,Aa as aN,$a as aO,aa as aP,Fd as aQ,Ad as aR,iw as aS,Do as aT,We as aU,uc as aV,v1 as aW,Ni as aX,V as aY,vf as aZ,Gt as a_,An as aa,Pw as ab,Q0 as ac,Yi as ad,W as ae,J as af,zh as ag,kk as ah,Rg as ai,ZB as aj,_x as ak,Tt as al,Xe as am,Eo as an,up as ao,yr as ap,Pd as aq,Tw as ar,xC as as,bw as at,jo as au,uh as av,gS as aw,XB as ax,KB as ay,GB as az,iy as b,Oo as b0,If as b1,Xi as b2,zf as b3,DB as b4,jm as b5,Sw as b6,xw as b7,aC as b8,Yo as b9,Fa as bA,tA as bB,JC as ba,Aw as bb,Ki as bc,ti as bd,ra as be,hw as bf,NS as bg,Zi as bh,na as bi,nw as bj,vd as bk,lC as bl,cC as bm,tr as bn,$c as bo,hC as bp,Uo as bq,oC as br,dC as bs,ei as bt,Ve as bu,Bc as bv,Go as bw,Sd as bx,fo as by,Bw as bz,ut as c,ct as d,Nh as e,Mt as f,sy as g,De as h,lr as i,Sx as j,Qr as k,$ as l,zd as m,Ui as n,$B as o,JB as p,oy as q,QB as r,ay as s,ly as t,ge as u,bx as v,qw as w,Hk as x,UB as y,ry as z};
|
|
214
|
+
//# sourceMappingURL=mermaid.core-CqaUvNIK.js.map
|