@wildo-ai/application-creation-workbench 1.1.10 → 1.1.11
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/dist/.vite/manifest.json +956 -404
- package/dist/assets/ChartEmptyState-C3M4S9b4.js +1 -0
- package/dist/assets/{ChartView-DKDZOjZJ.js → ChartView-1QK3FBtx.js} +19 -19
- package/dist/assets/{_basePickBy-BuyVDPfJ.js → _basePickBy-B6h3s-sF.js} +1 -1
- package/dist/assets/{_baseUniq-CVvDgwC4.js → _baseUniq-D-4MA4hd.js} +1 -1
- package/dist/assets/af-B21OzSmE.js +1 -0
- package/dist/assets/ar-ZLisgQnh.js +1 -0
- package/dist/assets/{arc-DE9sx_Jn.js → arc-CtbTPoNE.js} +1 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-Vk4L8Lzc.js +36 -0
- package/dist/assets/bg-CBCYKVQ7.js +1 -0
- package/dist/assets/{blockDiagram-VD42YOAC-TQm1EY8a.js → blockDiagram-VD42YOAC-CJmwT1sH.js} +1 -1
- package/dist/assets/bn-BBAs6eqY.js +1 -0
- package/dist/assets/{c4Diagram-YG6GDRKO-DPVnrqS2.js → c4Diagram-YG6GDRKO-Cd2JXSKY.js} +1 -1
- package/dist/assets/ca-CHtdRZF8.js +1 -0
- package/dist/assets/channel-BczTlnHr.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-V_Lu-A8z.js → chunk-4BX2VUAB-B45XKmeh.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CrshiQUZ.js → chunk-55IACEB6-Dus25Vau.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-B4fN1huZ.js → chunk-B4BG7PRW-7heZqqKJ.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-gtIXZHBU.js → chunk-DI55MBZ5-tDIJ1980.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-j8bev95J.js → chunk-FMBD7UC4-p2MT9Qgj.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-B-kGe_H0.js → chunk-QN33PNHL-C8irSNHD.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BLVfc9yR.js → chunk-QZHKN3VN-BnzUirvg.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-CHEgF8Sz.js → chunk-TZMSLE5B-vN6WFHgE.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-COA7cz19.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-COA7cz19.js +1 -0
- package/dist/assets/clone-CgA-DYeg.js +1 -0
- package/dist/assets/{cm6-editor-ComXvSgE.js → cm6-editor-DjOHnDo5.js} +3 -3
- package/dist/assets/{code-block-IT6T5CEO-CL2mSW30.js → code-block-IT6T5CEO-DrggLL3z.js} +1 -1
- package/dist/assets/context-BsxPj3fo.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-DAVrPej8.js +1 -0
- package/dist/assets/cs-CeiaQwdU.js +1 -0
- package/dist/assets/cy-BSB-wEmv.js +1 -0
- package/dist/assets/da-ubM2m_tA.js +1 -0
- package/dist/assets/{dagre-6UL2VRFP-D-6HwSlh.js → dagre-6UL2VRFP-BC4b_XYs.js} +1 -1
- package/dist/assets/dagre.esm-DdGNJMRW.js +1 -0
- package/dist/assets/de-AT-BSzCeQWr.js +1 -0
- package/dist/assets/de-C1Jd6Jap.js +1 -0
- package/dist/assets/{diagram-PSM6KHXK-DVMAwfhR.js → diagram-PSM6KHXK-DNFChJ0f.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-ztEXARNd.js → diagram-QEK2KX5R-BVhCBnwr.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-aOEIHitS.js → diagram-S2PKOQOG-9lXj7QHC.js} +1 -1
- package/dist/assets/{dropbox-picker-Cgd6aaxu.js → dropbox-picker-Db0ZMzrx.js} +1 -1
- package/dist/assets/el-C45oMinb.js +1 -0
- package/dist/assets/en-AU-D8LSUJ_1.js +1 -0
- package/dist/assets/en-CA-SBS0AmfB.js +1 -0
- package/dist/assets/en-GB-Cov3Ml3U.js +1 -0
- package/dist/assets/{erDiagram-Q2GNP2WA-BeX2p48P.js → erDiagram-Q2GNP2WA-CbAO0LL2.js} +1 -1
- package/dist/assets/es-D-8DLZpn.js +1 -0
- package/dist/assets/et-X1jtpHsB.js +1 -0
- package/dist/assets/eu-CuGQ69e6.js +1 -0
- package/dist/assets/fa-IR-Ix96Bcel.js +1 -0
- package/dist/assets/fi-BV2qx6It.js +1 -0
- package/dist/assets/{flowDiagram-NV44I4VS-B5OF-K2x.js → flowDiagram-NV44I4VS-DhKFlSYT.js} +1 -1
- package/dist/assets/flows-actors-graph-runtime-DXWrUBOs.js +1 -0
- package/dist/assets/fr-BobMQp2m.js +1 -0
- package/dist/assets/fr-CA-D7f0MGFd.js +1 -0
- package/dist/assets/ganttDiagram-JELNMOA3-BSLWLuNm.js +267 -0
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-DBYlH4FL.js → gitGraphDiagram-V2S2FVAM-BuY8ZQCy.js} +1 -1
- package/dist/assets/gl-DIxa7Uua.js +1 -0
- package/dist/assets/{google-drive-picker-BKyN80GQ.js → google-drive-picker-DAtYjlyJ.js} +1 -1
- package/dist/assets/{graph-AvBeoHop.js → graph-CZl0oLiw.js} +1 -1
- package/dist/assets/graph-runtime-s1VQXDD1.js +1 -0
- package/dist/assets/he-8B_S-IGJ.js +1 -0
- package/dist/assets/hi-DAveE-s0.js +1 -0
- package/dist/assets/hr-BiqatTpE.js +1 -0
- package/dist/assets/hu-CkmDYALv.js +1 -0
- package/dist/assets/id-CEIQaYFZ.js +1 -0
- package/dist/assets/{index-BHi5TkWc.js → index-5WbcaDHE.js} +1 -1
- package/dist/assets/{index-Cj0s-NJv.js → index-6mdg1_5r.js} +1 -1
- package/dist/assets/{index-Dv1hCn5N.js → index-Ab3QlNIl.js} +1 -1
- package/dist/assets/{index-BLyj7STg.js → index-BYLFSxol.js} +1 -1
- package/dist/assets/{index-CwdHV_FX.js → index-B_c7MY4O.js} +1 -1
- package/dist/assets/{index-9hIdGCE2.js → index-Ba5B32Fl.js} +1 -1
- package/dist/assets/index-BbsjKkIz.js +15 -0
- package/dist/assets/{index-BJGqq48m.js → index-BgCqk92w.js} +1 -1
- package/dist/assets/{index-BG-y5UcD.js → index-BlQ-dtmP.js} +1 -1
- package/dist/assets/{index-D3CAZMVF.js → index-C--TU0cT.js} +1 -1
- package/dist/assets/{index-6zr8R4dA.js → index-C7yjEhDq.js} +1 -1
- package/dist/assets/{index-Br7zFzuz.js → index-C9FemyBL.js} +1 -1
- package/dist/assets/{index-CK3Bi__8.js → index-CD0o7ijU.js} +1 -1
- package/dist/assets/{index-Db4UIXz-.js → index-CI0O31Cp.js} +1 -1
- package/dist/assets/{index-DikSr-5K.js → index-CIBxHZnA.js} +1 -1
- package/dist/assets/{index-C-hOTyb_.js → index-CMxaoNlJ.js} +1 -1
- package/dist/assets/{index-C8H6aj0j.js → index-CWE3FEZN.js} +1 -1
- package/dist/assets/{index-Bpku8s6k.js → index-C_NGDq2w.js} +1 -1
- package/dist/assets/index-Ccf8muta.js +1261 -0
- package/dist/assets/index-CzvHWEPS.js +1 -0
- package/dist/assets/{index-BZeyH3ke.js → index-DDd8ozYp.js} +1 -1
- package/dist/assets/{index-CMQis7aS.js → index-DLv9veAb.js} +1 -1
- package/dist/assets/index-DQ5p5-oO.css +1 -0
- package/dist/assets/{index-B5EaGcLw.js → index-KTNhvzNT.js} +1 -1
- package/dist/assets/{index-DYY9gnp9.js → index-_bSqFwX-.js} +1 -1
- package/dist/assets/{index-DyQa6Mm5.js → index-aDaNN3ga.js} +1 -1
- package/dist/assets/{index-DIo0Wrbb.js → index-bK1lB11U.js} +1 -1
- package/dist/assets/index-fTTODqFZ.js +372 -0
- package/dist/assets/{index-BFcDqzUt.js → index-l36QeemA.js} +1 -1
- package/dist/assets/{index.es-B9u8rJ1d.js → index.es-Dov84Q7L.js} +1 -1
- package/dist/assets/{infoDiagram-HS3SLOUP-Bt2AfSr_.js → infoDiagram-HS3SLOUP-BMxiOms9.js} +1 -1
- package/dist/assets/is-CFRfpcIV.js +1 -0
- package/dist/assets/isSameWeek-CVp5lUeg.js +1 -0
- package/dist/assets/it-wj2FxBeN.js +1 -0
- package/dist/assets/ja-C76INfXB.js +1 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-B9RxAwyj.js → journeyDiagram-XKPGCS4Q-DCWsE8zZ.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-KUyHlyqc.js → kanban-definition-3W4ZIXB7-CB2mRoXc.js} +1 -1
- package/dist/assets/ko-B8wQPQK9.js +1 -0
- package/dist/assets/{layout-Dq4vO6R-.js → layout-_08RBJmw.js} +1 -1
- package/dist/assets/linear-DgScXpWB.js +1 -0
- package/dist/assets/lt-BTz08iQZ.js +1 -0
- package/dist/assets/lv-CS3iPrpf.js +1 -0
- package/dist/assets/match-CMf6gi5c.js +1 -0
- package/dist/assets/match-rP2MYsHL.js +1 -0
- package/dist/assets/{maximize-2-Bl11RTvy.js → maximize-2-B0LqzzJD.js} +1 -1
- package/dist/assets/{mermaid-VLURNSYL-DPc-hyxN.js → mermaid-VLURNSYL-CFdBlgNU.js} +4 -4
- package/dist/assets/mermaid.core-Bm9ZP7gJ.js +198 -0
- package/dist/assets/{mindmap-definition-VGOIOE7T-ih3nvg2M.js → mindmap-definition-VGOIOE7T-CuBc5wmR.js} +1 -1
- package/dist/assets/ms-Cl9dOMs9.js +1 -0
- package/dist/assets/mt-SxIP5cQY.js +1 -0
- package/dist/assets/nb-Bx9pdwqt.js +1 -0
- package/dist/assets/nl-LA6duOkc.js +1 -0
- package/dist/assets/{onedrive-picker-9JhZVdja.js → onedrive-picker-C9HIxKdV.js} +1 -1
- package/dist/assets/{pdf-viewer-BU_zv2sb.js → pdf-viewer-Cm0cmjrF.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-2y6i9a-Q.js → pieDiagram-ADFJNKIX-BAEg106K.js} +1 -1
- package/dist/assets/pl-C9o65KdE.js +1 -0
- package/dist/assets/pt-BR-DzQ5E1HI.js +1 -0
- package/dist/assets/pt-DTUo2gXr.js +1 -0
- package/dist/assets/{quadrantDiagram-AYHSOK5B-Bpbt_ZL6.js → quadrantDiagram-AYHSOK5B-DnH9aNk6.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-DKhx22Et.js → requirementDiagram-UZGBJVZJ-BC08j3iJ.js} +1 -1
- package/dist/assets/ro-D0C5XwLr.js +1 -0
- package/dist/assets/ru-CdLptA_8.js +1 -0
- package/dist/assets/{sankeyDiagram-TZEHDZUN-DOz9tNgj.js → sankeyDiagram-TZEHDZUN-D2w97jyv.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-aQQbVp6L.js → sequenceDiagram-WL72ISMW-Y_hpHzaj.js} +1 -1
- package/dist/assets/{shiki-highlighter-runtime-B9niRUB2.js → shiki-highlighter-runtime-Bl0H0KPz.js} +1 -1
- package/dist/assets/sk-CeQBmfzD.js +1 -0
- package/dist/assets/sl-BKgErU1D.js +1 -0
- package/dist/assets/{stateDiagram-FKZM4ZOC-vDZ9FAaz.js → stateDiagram-FKZM4ZOC-Cn_uBJn5.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-4ptWp8bn.js +1 -0
- package/dist/assets/sv-OWWvKBOh.js +1 -0
- package/dist/assets/ta-BO8Vz6nD.js +1 -0
- package/dist/assets/th-Cv66UIk0.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-C1jpqiM9.js → timeline-definition-IT6M3QCI-Pm7JOk6q.js} +1 -1
- package/dist/assets/tr-DJBdUg4Y.js +1 -0
- package/dist/assets/{treemap-GDKQZRPO-Bskqcsjn.js → treemap-GDKQZRPO-CB8vQsyY.js} +1 -1
- package/dist/assets/useQuickActionButtonBehavior-EHioc1n0.js +1 -0
- package/dist/assets/vi-5cFVA26_.js +1 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-BD8d9TGv.js → xychartDiagram-PRI3JC2R-CQSQ6r3l.js} +1 -1
- package/dist/assets/zh-CN-CfAV3Hxo.js +1 -0
- package/dist/assets/zh-HK-DoEn5xH2.js +1 -0
- package/dist/assets/zh-TW-CUUKOLkj.js +1 -0
- package/dist/index.html +2 -2
- package/package.json +9 -8
- package/dist/assets/ChartEmptyState-BIIyFwDZ.js +0 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-DY4uZXMe.js +0 -36
- package/dist/assets/channel-C4B85_Ht.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-CejTSo9E.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-CejTSo9E.js +0 -1
- package/dist/assets/clone-eq-IW2p2.js +0 -1
- package/dist/assets/context-BB5qtAPe.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-DMODvaS_.js +0 -1
- package/dist/assets/flows-actors-graph-runtime-BN2k8R04.js +0 -1
- package/dist/assets/ganttDiagram-JELNMOA3-CMYOZD-b.js +0 -267
- package/dist/assets/graph-runtime-4LdwGgRA.js +0 -1
- package/dist/assets/index-BVKCM4BG.js +0 -1
- package/dist/assets/index-BjG3MUUI.js +0 -347
- package/dist/assets/index-CHO8NA6v.js +0 -1094
- package/dist/assets/index-D-THewyc.css +0 -1
- package/dist/assets/index-DPuqBa_G.js +0 -499
- package/dist/assets/linear-BIzHWTWZ.js +0 -1
- package/dist/assets/mermaid.core-DL97wpul.js +0 -197
- package/dist/assets/module-DUSXqJtA.js +0 -3
- package/dist/assets/stateDiagram-v2-4FDKWEC3-Cfb6lTuy.js +0 -1
- package/dist/assets/useQuickActionButtonBehavior-DK86ZrMU.js +0 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid-VLURNSYL-CFdBlgNU.js","assets/index-Ccf8muta.js","assets/index-DQ5p5-oO.css","assets/index-e-4cSkrt.js","assets/maximize-2-B0LqzzJD.js","assets/dagre-6UL2VRFP-BC4b_XYs.js","assets/graph-CZl0oLiw.js","assets/_baseUniq-D-4MA4hd.js","assets/layout-_08RBJmw.js","assets/_basePickBy-B6h3s-sF.js","assets/clone-CgA-DYeg.js","assets/cose-bilkent-S5V4N54A-DAVrPej8.js","assets/cytoscape.esm-YEldwGKK.js","assets/c4Diagram-YG6GDRKO-Cd2JXSKY.js","assets/chunk-TZMSLE5B-vN6WFHgE.js","assets/flowDiagram-NV44I4VS-DhKFlSYT.js","assets/chunk-FMBD7UC4-p2MT9Qgj.js","assets/chunk-55IACEB6-Dus25Vau.js","assets/chunk-QN33PNHL-C8irSNHD.js","assets/channel-BczTlnHr.js","assets/erDiagram-Q2GNP2WA-CbAO0LL2.js","assets/gitGraphDiagram-V2S2FVAM-BuY8ZQCy.js","assets/chunk-4BX2VUAB-B45XKmeh.js","assets/chunk-QZHKN3VN-BnzUirvg.js","assets/treemap-GDKQZRPO-CB8vQsyY.js","assets/ganttDiagram-JELNMOA3-BSLWLuNm.js","assets/linear-DgScXpWB.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-HS3SLOUP-BMxiOms9.js","assets/pieDiagram-ADFJNKIX-BAEg106K.js","assets/arc-CtbTPoNE.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AYHSOK5B-DnH9aNk6.js","assets/xychartDiagram-PRI3JC2R-CQSQ6r3l.js","assets/requirementDiagram-UZGBJVZJ-BC08j3iJ.js","assets/sequenceDiagram-WL72ISMW-Y_hpHzaj.js","assets/classDiagram-2ON5EDUG-COA7cz19.js","assets/chunk-B4BG7PRW-7heZqqKJ.js","assets/classDiagram-v2-WZHVMYZB-COA7cz19.js","assets/stateDiagram-FKZM4ZOC-Cn_uBJn5.js","assets/chunk-DI55MBZ5-tDIJ1980.js","assets/stateDiagram-v2-4FDKWEC3-4ptWp8bn.js","assets/journeyDiagram-XKPGCS4Q-DCWsE8zZ.js","assets/timeline-definition-IT6M3QCI-Pm7JOk6q.js","assets/mindmap-definition-VGOIOE7T-CuBc5wmR.js","assets/kanban-definition-3W4ZIXB7-CB2mRoXc.js","assets/sankeyDiagram-TZEHDZUN-D2w97jyv.js","assets/diagram-S2PKOQOG-9lXj7QHC.js","assets/diagram-QEK2KX5R-BVhCBnwr.js","assets/blockDiagram-VD42YOAC-CJmwT1sH.js","assets/architectureDiagram-VXUJARFQ-Vk4L8Lzc.js","assets/diagram-PSM6KHXK-DNFChJ0f.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a2 as eg,a3 as rg,$ as gt,a as ut}from"./index-Ccf8muta.js";import{k as Jl}from"./mermaid-VLURNSYL-CFdBlgNU.js";var Oo={name:"mermaid",version:"11.12.3",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.1.1","@iconify/utils":"^3.0.1","@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.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@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",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},tc={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(rg,(function(){var r=1e3,i=6e4,a=36e5,n="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",f="quarter",p="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"],T=B%100;return"["+B+(M[(T-20)%10]||M[T]||M[0])+"]"}},_=function(B,M,T){var $=String(B);return!$||$.length>=M?B:""+Array(M+1-$.length).join(T)+B},k={s:_,z:function(B){var M=-B.utcOffset(),T=Math.abs(M),$=Math.floor(T/60),E=T%60;return(M<=0?"+":"-")+_($,2,"0")+":"+_(E,2,"0")},m:function B(M,T){if(M.date()<T.date())return-B(T,M);var $=12*(T.year()-M.year())+(T.month()-M.month()),E=M.clone().add($,u),Y=T-E<0,K=M.clone().add($+(Y?-1:1),u);return+(-($+(T-E)/(Y?E-K:K-E))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:u,y:p,w:h,d:c,D:g,h:l,m:s,s:o,ms:n,Q:f}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},S="en",A={};A[S]=b;var L="$isDayjsObject",P=function(B){return B instanceof z||!(!B||!B[L])},R=function B(M,T,$){var E;if(!M)return S;if(typeof M=="string"){var Y=M.toLowerCase();A[Y]&&(E=Y),T&&(A[Y]=T,E=Y);var K=M.split("-");if(!E&&K.length>1)return B(K[0])}else{var ct=M.name;A[ct]=M,E=ct}return!$&&E&&(S=E),E||!$&&S},D=function(B,M){if(P(B))return B.clone();var T=typeof M=="object"?M:{};return T.date=B,T.args=arguments,new z(T)},F=k;F.l=R,F.i=P,F.w=function(B,M){return D(B,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var z=(function(){function B(T){this.$L=R(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[L]=!0}var M=B.prototype;return M.parse=function(T){this.$d=(function($){var E=$.date,Y=$.utc;if(E===null)return new Date(NaN);if(F.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var K=E.match(y);if(K){var ct=K[2]-1||0,et=(K[7]||"0").substring(0,3);return Y?new Date(Date.UTC(K[1],ct,K[3]||1,K[4]||0,K[5]||0,K[6]||0,et)):new Date(K[1],ct,K[3]||1,K[4]||0,K[5]||0,K[6]||0,et)}}return new Date(E)})(T),this.init()},M.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},M.$utils=function(){return F},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(T,$){var E=D(T);return this.startOf($)<=E&&E<=this.endOf($)},M.isAfter=function(T,$){return D(T)<this.startOf($)},M.isBefore=function(T,$){return this.endOf($)<D(T)},M.$g=function(T,$,E){return F.u(T)?this[$]:this.set(E,T)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(T,$){var E=this,Y=!!F.u($)||$,K=F.p(T),ct=function(ue,vt){var de=F.w(E.$u?Date.UTC(E.$y,vt,ue):new Date(E.$y,vt,ue),E);return Y?de:de.endOf(c)},et=function(ue,vt){return F.w(E.toDate()[ue].apply(E.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(vt)),E)},lt=this.$W,dt=this.$M,it=this.$D,It="set"+(this.$u?"UTC":"");switch(K){case p:return Y?ct(1,0):ct(31,11);case u:return Y?ct(1,dt):ct(0,dt+1);case h:var Et=this.$locale().weekStart||0,he=(lt<Et?lt+7:lt)-Et;return ct(Y?it-he:it+(6-he),dt);case c:case g:return et(It+"Hours",0);case l:return et(It+"Minutes",1);case s:return et(It+"Seconds",2);case o:return et(It+"Milliseconds",3);default:return this.clone()}},M.endOf=function(T){return this.startOf(T,!1)},M.$set=function(T,$){var E,Y=F.p(T),K="set"+(this.$u?"UTC":""),ct=(E={},E[c]=K+"Date",E[g]=K+"Date",E[u]=K+"Month",E[p]=K+"FullYear",E[l]=K+"Hours",E[s]=K+"Minutes",E[o]=K+"Seconds",E[n]=K+"Milliseconds",E)[Y],et=Y===c?this.$D+($-this.$W):$;if(Y===u||Y===p){var lt=this.clone().set(g,1);lt.$d[ct](et),lt.init(),this.$d=lt.set(g,Math.min(this.$D,lt.daysInMonth())).$d}else ct&&this.$d[ct](et);return this.init(),this},M.set=function(T,$){return this.clone().$set(T,$)},M.get=function(T){return this[F.p(T)]()},M.add=function(T,$){var E,Y=this;T=Number(T);var K=F.p($),ct=function(dt){var it=D(Y);return F.w(it.date(it.date()+Math.round(dt*T)),Y)};if(K===u)return this.set(u,this.$M+T);if(K===p)return this.set(p,this.$y+T);if(K===c)return ct(1);if(K===h)return ct(7);var et=(E={},E[s]=i,E[l]=a,E[o]=r,E)[K]||1,lt=this.$d.getTime()+T*et;return F.w(lt,this)},M.subtract=function(T,$){return this.add(-1*T,$)},M.format=function(T){var $=this,E=this.$locale();if(!this.isValid())return E.invalidDate||m;var Y=T||"YYYY-MM-DDTHH:mm:ssZ",K=F.z(this),ct=this.$H,et=this.$m,lt=this.$M,dt=E.weekdays,it=E.months,It=E.meridiem,Et=function(vt,de,Me,pr){return vt&&(vt[de]||vt($,Y))||Me[de].slice(0,pr)},he=function(vt){return F.s(ct%12||12,vt,"0")},ue=It||function(vt,de,Me){var pr=vt<12?"AM":"PM";return Me?pr.toLowerCase():pr};return Y.replace(x,(function(vt,de){return de||(function(Me){switch(Me){case"YY":return String($.$y).slice(-2);case"YYYY":return F.s($.$y,4,"0");case"M":return lt+1;case"MM":return F.s(lt+1,2,"0");case"MMM":return Et(E.monthsShort,lt,it,3);case"MMMM":return Et(it,lt);case"D":return $.$D;case"DD":return F.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Et(E.weekdaysMin,$.$W,dt,2);case"ddd":return Et(E.weekdaysShort,$.$W,dt,3);case"dddd":return dt[$.$W];case"H":return String(ct);case"HH":return F.s(ct,2,"0");case"h":return he(1);case"hh":return he(2);case"a":return ue(ct,et,!0);case"A":return ue(ct,et,!1);case"m":return String(et);case"mm":return F.s(et,2,"0");case"s":return String($.$s);case"ss":return F.s($.$s,2,"0");case"SSS":return F.s($.$ms,3,"0");case"Z":return K}return null})(vt)||K.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(T,$,E){var Y,K=this,ct=F.p($),et=D(T),lt=(et.utcOffset()-this.utcOffset())*i,dt=this-et,it=function(){return F.m(K,et)};switch(ct){case p:Y=it()/12;break;case u:Y=it();break;case f:Y=it()/3;break;case h:Y=(dt-lt)/6048e5;break;case c:Y=(dt-lt)/864e5;break;case l:Y=dt/a;break;case s:Y=dt/i;break;case o:Y=dt/r;break;default:Y=dt}return E?Y:F.a(Y)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return A[this.$L]},M.locale=function(T,$){if(!T)return this.$L;var E=this.clone(),Y=R(T,$,!0);return Y&&(E.$L=Y),E},M.clone=function(){return F.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})(),N=z.prototype;return D.prototype=N,[["$ms",n],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",p],["$D",g]].forEach((function(B){N[B[1]]=function(M){return this.$g(M,B[0],B[1])}})),D.extend=function(B,M){return B.$i||(B(M,z,D),B.$i=!0),D},D.locale=R,D.isDayjs=P,D.unix=function(B){return D(1e3*B)},D.en=A[S],D.Ls=A,D.p={},D}))})(tc);var ig=tc.exports;const ag=eg(ig);var ec=Object.defineProperty,d=(e,t)=>ec(e,"name",{value:t,configurable:!0}),ng=(e,t)=>{for(var r in t)ec(e,r,{get:t[r],enumerable:!0})},Se={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},O={trace:d((...e)=>{},"trace"),debug:d((...e)=>{},"debug"),info:d((...e)=>{},"info"),warn:d((...e)=>{},"warn"),error:d((...e)=>{},"error"),fatal:d((...e)=>{},"fatal")},xs=d(function(e="fatal"){let t=Se.fatal;typeof e=="string"?e.toLowerCase()in Se&&(t=Se[e]):typeof e=="number"&&(t=e),O.trace=()=>{},O.debug=()=>{},O.info=()=>{},O.warn=()=>{},O.error=()=>{},O.fatal=()=>{},t<=Se.fatal&&(O.fatal=console.error?console.error.bind(console,ie("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ie("FATAL"))),t<=Se.error&&(O.error=console.error?console.error.bind(console,ie("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ie("ERROR"))),t<=Se.warn&&(O.warn=console.warn?console.warn.bind(console,ie("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ie("WARN"))),t<=Se.info&&(O.info=console.info?console.info.bind(console,ie("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ie("INFO"))),t<=Se.debug&&(O.debug=console.debug?console.debug.bind(console,ie("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ie("DEBUG"))),t<=Se.trace&&(O.trace=console.debug?console.debug.bind(console,ie("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ie("TRACE")))},"setLogLevel"),ie=d(e=>`%c${ag().format("ss.SSS")} : ${e} : `,"format");const ji={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 a=r<.5?r*(1+t):r+t-r*t,n=2*r-a;switch(i){case"r":return ji.hue2rgb(n,a,e+1/3)*255;case"g":return ji.hue2rgb(n,a,e)*255;case"b":return ji.hue2rgb(n,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),n=Math.min(e,t,r),o=(a+n)/2;if(i==="l")return o*100;if(a===n)return 0;const s=a-n,l=o>.5?s/(2-a-n):s/(a+n);if(i==="s")return l*100;switch(a){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}}},sg={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},og={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ot={channel:ji,lang:sg,unit:og},De={};for(let e=0;e<=255;e++)De[e]=ot.unit.dec2hex(e);const Rt={ALL:0,RGB:1,HSL:2};class lg{constructor(){this.type=Rt.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=Rt.ALL}is(t){return this.type===t}}class cg{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new lg}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Rt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=ot.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ot.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=ot.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=ot.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ot.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=ot.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Rt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Rt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Rt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Rt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Rt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Rt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Rt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Rt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Rt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Rt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Rt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Rt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const La=new cg({r:0,g:0,b:0,a:0},"transparent"),Lr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Lr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,n=a%4===0,o=a>4,s=o?1:17,l=o?8:4,c=n?0:-1,h=o?255:15;return La.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:n?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${De[Math.round(t)]}${De[Math.round(r)]}${De[Math.round(i)]}${De[Math.round(a*255)]}`:`#${De[Math.round(t)]}${De[Math.round(r)]}${De[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 ot.channel.clamp.h(parseFloat(r)*.9);case"rad":return ot.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ot.channel.clamp.h(parseFloat(r)*360)}}return ot.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,a,n,o,s]=r;return La.set({h:er._hue2deg(i),s:ot.channel.clamp.s(parseFloat(a)),l:ot.channel.clamp.l(parseFloat(n)),a:o?ot.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%, ${a})`:`hsl(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%)`}},ai={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=ai.colors[e];if(t)return Lr.parse(t)},stringify:e=>{const t=Lr.stringify(e);for(const r in ai.colors)if(ai.colors[r]===t)return r}},Qr={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(Qr.re);if(!r)return;const[,i,a,n,o,s,l,c,h]=r;return La.set({r:ot.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:ot.channel.clamp.g(o?parseFloat(n)*2.55:parseFloat(n)),b:ot.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?ot.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)}, ${ot.lang.round(a)})`:`rgb(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)})`}},be={format:{keyword:ai,hex:Lr,rgb:Qr,rgba:Qr,hsl:er,hsla:er},parse:e=>{if(typeof e!="string")return e;const t=Lr.parse(e)||Qr.parse(e)||er.parse(e)||ai.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Rt.HSL)||e.data.r===void 0?er.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Qr.stringify(e):Lr.stringify(e)},rc=(e,t)=>{const r=be.parse(e);for(const i in t)r[i]=ot.channel.clamp[i](t[i]);return be.stringify(r)},ni=(e,t,r=0,i=1)=>{if(typeof e!="number")return rc(e,{a:t});const a=La.set({r:ot.channel.clamp.r(e),g:ot.channel.clamp.g(t),b:ot.channel.clamp.b(r),a:ot.channel.clamp.a(i)});return be.stringify(a)},hg=e=>{const{r:t,g:r,b:i}=be.parse(e),a=.2126*ot.channel.toLinear(t)+.7152*ot.channel.toLinear(r)+.0722*ot.channel.toLinear(i);return ot.lang.round(a)},ug=e=>hg(e)>=.5,xi=e=>!ug(e),ic=(e,t,r)=>{const i=be.parse(e),a=i[t],n=ot.channel.clamp[t](a+r);return a!==n&&(i[t]=n),be.stringify(i)},U=(e,t)=>ic(e,"l",t),tt=(e,t)=>ic(e,"l",-t),v=(e,t)=>{const r=be.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return rc(e,i)},dg=(e,t,r=50)=>{const{r:i,g:a,b:n,a:o}=be.parse(e),{r:s,g:l,b:c,a:h}=be.parse(t),u=r/100,f=u*2-1,p=o-h,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,y=1-m,x=i*m+s*y,b=a*m+l*y,_=n*m+c*y,k=o*u+h*(1-u);return ni(x,b,_,k)},q=(e,t=100)=>{const r=be.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,dg(r,e,t)};/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */function Do(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function fg(e){if(Array.isArray(e))return e}function pg(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,a,n,o,s=[],l=!0,c=!1;try{if(n=(r=r.call(e)).next,t!==0)for(;!(l=(i=n.call(r)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(h){c=!0,a=h}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function gg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mg(e,t){return fg(e)||pg(e,t)||yg(e,t)||gg()}function yg(e,t){if(e){if(typeof e=="string")return Do(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Do(e,t):void 0}}const ac=Object.entries,Io=Object.setPrototypeOf,xg=Object.isFrozen,bg=Object.getPrototypeOf,Cg=Object.getOwnPropertyDescriptor;let At=Object.freeze,$t=Object.seal,wr=Object.create,nc=typeof Reflect<"u"&&Reflect,Mn=nc.apply,En=nc.construct;At||(At=function(t){return t});$t||($t=function(t){return t});Mn||(Mn=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),n=2;n<i;n++)a[n-2]=arguments[n];return t.apply(r,a)});En||(En=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const Ze=Tt(Array.prototype.forEach),_g=Tt(Array.prototype.lastIndexOf),Po=Tt(Array.prototype.pop),Ur=Tt(Array.prototype.push),Sg=Tt(Array.prototype.splice),Br=Array.isArray,Jr=Tt(String.prototype.toLowerCase),un=Tt(String.prototype.toString),Ro=Tt(String.prototype.match),Gr=Tt(String.prototype.replace),No=Tt(String.prototype.indexOf),wg=Tt(String.prototype.trim),vg=Tt(Number.prototype.toString),kg=Tt(Boolean.prototype.toString),Wo=typeof BigInt>"u"?null:Tt(BigInt.prototype.toString),zo=typeof Symbol>"u"?null:Tt(Symbol.prototype.toString),Zt=Tt(Object.prototype.hasOwnProperty),Vr=Tt(Object.prototype.toString),Pt=Tt(RegExp.prototype.test),Xe=Tg(TypeError);function Tt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Mn(e,t,i)}}function Tg(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return En(e,r)}}function ft(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jr;if(Io&&Io(e,null),!Br(t))return e;let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const n=r(a);n!==a&&(xg(t)||(t[i]=n),a=n)}e[a]=!0}return e}function Lg(e){for(let t=0;t<e.length;t++)Zt(e,t)||(e[t]=null);return e}function re(e){const t=wr(null);for(const i of ac(e)){var r=mg(i,2);const a=r[0],n=r[1];Zt(e,a)&&(Br(n)?t[a]=Lg(n):n&&typeof n=="object"&&n.constructor===Object?t[a]=re(n):t[a]=n)}return t}function Bg(e){switch(typeof e){case"string":return e;case"number":return vg(e);case"boolean":return kg(e);case"bigint":return Wo?Wo(e):"0";case"symbol":return zo?zo(e):"Symbol()";case"undefined":return Vr(e);case"function":case"object":{if(e===null)return Vr(e);const t=e,r=ae(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Vr(i)}return Vr(e)}default:return Vr(e)}}function ae(e,t){for(;e!==null;){const i=Cg(e,t);if(i){if(i.get)return Tt(i.get);if(typeof i.value=="function")return Tt(i.value)}e=bg(e)}function r(){return null}return r}function Ag(e){try{return Pt(e,""),!0}catch{return!1}}const qo=At(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dn=At(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fn=At(["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"]),Mg=At(["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"]),pn=At(["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"]),Eg=At(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ho=At(["#text"]),jo=At(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),gn=At(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Yo=At(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pi=At(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fg=$t(/{{[\w\W]*|^[\w\W]*}}/g),$g=$t(/<%[\w\W]*|^[\w\W]*%>/g),Og=$t(/\${[\w\W]*/g),Dg=$t(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ig=$t(/^aria-[\-\w]+$/),Uo=$t(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pg=$t(/^(?:\w+script|data):/i),Rg=$t(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ng=$t(/^html$/i),Wg=$t(/^[a-z][.\w]*(-[.\w]+)+$/i),Go=$t(/<[/\w!]/g),Vo=$t(/<[/\w]/g),zg=$t(/<\/no(script|embed|frames)/i),qg=$t(/\/>/i),te={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},sc=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Hg=At(ft({},sc)),jg=(function(){const e={};return Ze(sc,t=>{e[t]=$t(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),At(e)})(),Yg=function(){return typeof window>"u"?null:window},Ug=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const n="dompurify"+(i?"#"+i:"");try{return t.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Xo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Oe=function(t,r,i,a){return Zt(t,r)&&Br(t[r])?ft(a.base?re(a.base):{},t[r],a.transform):i},mn=function(t,r,i){const a=Zt(t,r)?t[r]:void 0;return a&&typeof a=="object"?re(a):i()};function oc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yg();const t=W=>oc(W);if(t.version="3.4.15",t.removed=[],!e||!e.document||e.document.nodeType!==te.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,a=i.currentScript;e.DocumentFragment;const n=e.HTMLTemplateElement,o=e.Node,s=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,u=e.trustedTypes,f=s.prototype,p=ae(f,"cloneNode"),g=ae(f,"remove"),m=ae(f,"removeAttributeNode"),y=ae(f,"nextSibling"),x=ae(f,"childNodes"),b=ae(f,"parentNode"),_=ae(f,"shadowRoot"),k=ae(f,"attributes"),S=o&&o.prototype?ae(o.prototype,"nodeType"):null,A=o&&o.prototype?ae(o.prototype,"nodeName"):null,L=o&&o.prototype?ae(o.prototype,"ownerDocument"):null,P=function(C){return S?S(C):C.nodeType},R=function(C){return A?A(C):C.nodeName};if(typeof n=="function"){const W=r.createElement("template");W.content&&W.content.ownerDocument&&(r=W.content.ownerDocument)}let D,F="",z,N=!1,B=0;const M=function(){if(B>0)throw Xe('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(C){M(),B++;try{return D.createHTML(C)}finally{B--}},$=function(C){M(),B++;try{return D.createScriptURL(C)}finally{B--}},E=function(){return N||(z=Ug(u,a),N=!0),z},Y=r,K=Y.implementation,ct=Y.createNodeIterator,et=Y.createDocumentFragment,lt=Y.getElementsByTagName,dt=i.importNode;let it=Xo();t.isSupported=typeof ac=="function"&&typeof b=="function"&&K&&K.createHTMLDocument!==void 0;const It=Fg,Et=$g,he=Og,ue=Dg,vt=Ig,de=Pg,Me=Rg,pr=Wg;let ao=Uo,xt=null;const Xa=ft({},[...qo,...dn,...fn,...pn,...Ho]);let bt=null;const Ka=ft({},[...jo,...gn,...Yo,...Pi]);let fe=Object.seal(wr(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}})),Hr=null,no=null;const Ee=Object.seal(wr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let so=!0,Za=!0,oo=!1,lo=!0,Fe=!1,Ue=!0,Ge=!1,Qa=!1,ki=null,Ti=null,Ja=!1,gr=!1,Li=!1,Bi=!1,co=!0,ho=!1;const uo="user-content-";let tn=!0,en=!1,mr={},yr=null;const fo=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let po=null;const go=ft({},["audio","video","img","source","image","track"]);let mo=null;const yo=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ai="http://www.w3.org/1998/Math/MathML",Mi="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml";let xr=pe,rn=!1,an=null;const Np=ft({},[Ai,Mi,pe],un),xo=At(["mi","mo","mn","ms","mtext"]);let nn=ft({},xo);const bo=At(["annotation-xml"]);let sn=ft({},bo);const Wp=ft({},["title","style","font","a","script"]);let jr=null;const zp=["application/xhtml+xml","text/html"],qp="text/html";let St=null,br=null;const Hp=r.createElement("form"),Co=function(C){return C instanceof RegExp||C instanceof Function},on=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(br&&br===C)return;(!C||typeof C!="object")&&(C={}),C=re(C),jr=zp.indexOf(C.PARSER_MEDIA_TYPE)===-1?qp:C.PARSER_MEDIA_TYPE,St=jr==="application/xhtml+xml"?un:Jr,xt=Oe(C,"ALLOWED_TAGS",Xa,{transform:St}),bt=Oe(C,"ALLOWED_ATTR",Ka,{transform:St}),an=Oe(C,"ALLOWED_NAMESPACES",Np,{transform:un}),mo=Oe(C,"ADD_URI_SAFE_ATTR",yo,{transform:St,base:yo}),po=Oe(C,"ADD_DATA_URI_TAGS",go,{transform:St,base:go}),yr=Oe(C,"FORBID_CONTENTS",fo,{transform:St}),Hr=Oe(C,"FORBID_TAGS",re({}),{transform:St}),no=Oe(C,"FORBID_ATTR",re({}),{transform:St}),mr=Zt(C,"USE_PROFILES")?C.USE_PROFILES&&typeof C.USE_PROFILES=="object"?re(C.USE_PROFILES):C.USE_PROFILES:!1,so=C.ALLOW_ARIA_ATTR!==!1,Za=C.ALLOW_DATA_ATTR!==!1,oo=C.ALLOW_UNKNOWN_PROTOCOLS||!1,lo=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Fe=C.SAFE_FOR_TEMPLATES||!1,Ue=C.SAFE_FOR_XML!==!1,Ge=C.WHOLE_DOCUMENT||!1,gr=C.RETURN_DOM||!1,Li=C.RETURN_DOM_FRAGMENT||!1,Bi=C.RETURN_TRUSTED_TYPE||!1,Ja=C.FORCE_BODY||!1,co=C.SANITIZE_DOM!==!1,ho=C.SANITIZE_NAMED_PROPS||!1,tn=C.KEEP_CONTENT!==!1,en=C.IN_PLACE||!1,ao=Ag(C.ALLOWED_URI_REGEXP)?C.ALLOWED_URI_REGEXP:Uo,xr=typeof C.NAMESPACE=="string"?C.NAMESPACE:pe,nn=mn(C,"MATHML_TEXT_INTEGRATION_POINTS",()=>ft({},xo)),sn=mn(C,"HTML_INTEGRATION_POINTS",()=>ft({},bo));const w=mn(C,"CUSTOM_ELEMENT_HANDLING",()=>wr(null));if(fe=wr(null),Zt(w,"tagNameCheck")&&Co(w.tagNameCheck)&&(fe.tagNameCheck=w.tagNameCheck),Zt(w,"attributeNameCheck")&&Co(w.attributeNameCheck)&&(fe.attributeNameCheck=w.attributeNameCheck),Zt(w,"allowCustomizedBuiltInElements")&&typeof w.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=w.allowCustomizedBuiltInElements),$t(fe),Fe&&(Za=!1),Li&&(gr=!0),mr&&(xt=ft({},Ho),bt=wr(null),mr.html===!0&&(ft(xt,qo),ft(bt,jo)),mr.svg===!0&&(ft(xt,dn),ft(bt,gn),ft(bt,Pi)),mr.svgFilters===!0&&(ft(xt,fn),ft(bt,gn),ft(bt,Pi)),mr.mathMl===!0&&(ft(xt,pn),ft(bt,Yo),ft(bt,Pi))),Ee.tagCheck=null,Ee.attributeCheck=null,Zt(C,"ADD_TAGS")&&(typeof C.ADD_TAGS=="function"?Ee.tagCheck=C.ADD_TAGS:Br(C.ADD_TAGS)&&(xt===Xa&&(xt=re(xt)),ft(xt,C.ADD_TAGS,St))),Zt(C,"ADD_ATTR")&&(typeof C.ADD_ATTR=="function"?Ee.attributeCheck=C.ADD_ATTR:Br(C.ADD_ATTR)&&(bt===Ka&&(bt=re(bt)),ft(bt,C.ADD_ATTR,St))),Zt(C,"ADD_FORBID_CONTENTS")&&Br(C.ADD_FORBID_CONTENTS)&&(yr===fo&&(yr=re(yr)),ft(yr,C.ADD_FORBID_CONTENTS,St)),tn&&(xt["#text"]=!0),Ge&&ft(xt,["html","head","body"]),xt.table&&(ft(xt,["tbody"]),delete Hr.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const I=D;D=C.TRUSTED_TYPES_POLICY;try{F=T("")}catch(H){throw D=I,H}}else C.TRUSTED_TYPES_POLICY===null?(D=void 0,F=""):(D===void 0&&(D=E()),D&&typeof F=="string"&&(F=T("")));At&&At(C),br=C},_o=ft({},[...dn,...fn,...Mg]),So=ft({},[...pn,...Eg]),jp=function(C,w,I){return w.namespaceURI===pe?C==="svg":w.namespaceURI===Ai?C==="svg"&&(I==="annotation-xml"||nn[I]):!!_o[C]},Yp=function(C,w,I){return w.namespaceURI===pe?C==="math":w.namespaceURI===Mi?C==="math"&&sn[I]:!!So[C]},Up=function(C,w,I){return w.namespaceURI===Mi&&!sn[I]||w.namespaceURI===Ai&&!nn[I]?!1:!So[C]&&(Wp[C]||!_o[C])},Gp=function(C){let w=b(C);(!w||!w.tagName)&&(w={namespaceURI:xr,tagName:"template"});const I=Jr(C.tagName),H=Jr(w.tagName);return an[C.namespaceURI]?C.namespaceURI===Mi?jp(I,w,H):C.namespaceURI===Ai?Yp(I,w,H):C.namespaceURI===pe?Up(I,w,H):!!(jr==="application/xhtml+xml"&&an[C.namespaceURI]):!1},$e=function(C){Ur(t.removed,{element:C});try{b(C).removeChild(C)}catch{if(g(C),!b(C))throw Xe("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},wo=function(C,w,I){try{m(C,w)}catch{try{C.removeAttribute(I)}catch{}}},Ei=function(C){Fi(C);const w=x(C);if(w){const H=[];Ze(w,Q=>{Ur(H,Q)}),Ze(H,Q=>{try{g(Q)}catch{}})}const I=k(C);if(I)for(let H=I.length-1;H>=0;--H){const Q=I[H],st=Q&&Q.name;typeof st=="string"&&wo(C,Q,st)}},Ve=function(C,w,I){if(!I)try{I=w.getAttributeNode(C)}catch{I=null}Ur(t.removed,{attribute:I||null,from:w});try{I?m(w,I):w.removeAttribute(C)}catch{try{w.removeAttribute(C)}catch{}}if(C==="is")if(gr||Li)try{$e(w)}catch{}else try{w.setAttribute(C,"")}catch{}},Vp=function(C){const w=k(C);if(w)for(let I=w.length-1;I>=0;--I){const H=w[I],Q=H&&H.name;typeof Q!="string"||bt[St(Q)]||wo(C,H,Q)}},Fi=function(C){const w=[C];for(;w.length>0;){const I=w.pop();P(I)===te.element&&Vp(I);const Q=x(I);if(Q)for(let st=Q.length-1;st>=0;--st)w.push(Q[st])}},vo=function(C,w){return Ue?C==="patchsrc"?!0:C==="for"&&w!=="label"&&w!=="output":!1},Xp=function(C){if(!Ue)return;const w=[C];for(;w.length>0;){const I=w.pop(),H=P(I);if(H===te.processingInstruction||H===te.comment&&Pt(Vo,I.data)){try{g(I)}catch{}continue}if(H===te.element){const st=I,mt=St(R(I));try{st.hasAttribute&&st.hasAttribute("patchsrc")&&st.removeAttribute("patchsrc"),st.hasAttribute&&st.hasAttribute("for")&&vo("for",mt)&&st.removeAttribute("for")}catch{}}const Q=x(I);if(Q)for(let st=Q.length-1;st>=0;--st)w.push(Q[st])}},ko=function(C){let w=null,I=null;if(Ja)C="<remove></remove>"+C;else{const st=Ro(C,/^[\r\n\t ]+/);I=st&&st[0]}jr==="application/xhtml+xml"&&xr===pe&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const H=D?T(C):C;if(xr===pe)try{w=new h().parseFromString(H,jr)}catch{}if(!w||!w.documentElement){w=K.createDocument(xr,"template",null);try{w.documentElement.innerHTML=rn?F:H}catch{}}const Q=w.body||w.documentElement;return C&&I&&Q.insertBefore(r.createTextNode(I),Q.childNodes[0]||null),xr===pe?lt.call(w,Ge?"html":"body")[0]:Ge?w.documentElement:Q},To=function(C){const w=L?L(C):C.ownerDocument;return ct.call(w||C,C,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},$i=function(C){return C=Gr(C,It," "),C=Gr(C,Et," "),C=Gr(C,he," "),C},ln=function(C){var w;C.normalize();const I=L?L(C):C.ownerDocument,H=ct.call(I||C,C,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let Q=H.nextNode();for(;Q;)Q.data=$i(Q.data),Q=H.nextNode();const st=(w=C.querySelectorAll)===null||w===void 0?void 0:w.call(C,"template");st&&Ze(st,mt=>{Cr(mt.content)&&ln(mt.content)})},Oi=function(C){const w=A?A(C):null;return typeof w!="string"||St(w)!=="form"?!1:typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||C.attributes!==k(C)||typeof C.removeAttribute!="function"||typeof C.removeAttributeNode!="function"||typeof C.getAttributeNode!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function"||C.nodeType!==S(C)||C.childNodes!==x(C)},Cr=function(C){if(!S||typeof C!="object"||C===null)return!1;try{return S(C)===te.documentFragment}catch{return!1}},Yr=function(C){if(!S||typeof C!="object"||C===null)return!1;try{return typeof S(C)=="number"}catch{return!1}};function ge(W,C,w){W.length!==0&&Ze(W,I=>{I.call(t,C,w,br)})}const Kp=function(C,w){return!!(Ue&&C.hasChildNodes()&&!Yr(C.firstElementChild)&&Pt(Go,C.textContent)&&Pt(Go,C.innerHTML)||Ue&&C.namespaceURI===pe&&Hg[w]&&(Yr(C.firstElementChild)||typeof C.textContent=="string"&&Pt(jg[w],C.textContent))||C.nodeType===te.processingInstruction||Ue&&C.nodeType===te.comment&&Pt(Vo,C.data))},Di=function(C,w){if(C instanceof RegExp)return Pt(C,w);if(C instanceof Function){for(var I=arguments.length,H=new Array(I>2?I-2:0),Q=2;Q<I;Q++)H[Q-2]=arguments[Q];return!!C(w,...H)}return!1},Zp=function(C,w,I){if(!Hr[w]&&Eo(w)&&Di(fe.tagNameCheck,w))return!1;if(tn&&!yr[w]){const H=b(C),Q=x(C);if(Q&&H){const st=Q.length;for(let mt=st-1;mt>=0;--mt){const _t=C===I?p(Q[mt],!0):Q[mt];H.insertBefore(_t,y(C))}}}return $e(C),!0},Lo=function(C,w,I,H){return C.length===0?w:w===I||w===H?re(w):w},Bo=function(C,w){return C===w||b(C)!==null?!1:(en&&Fi(C),!0)},Ao=function(C,w){if(ge(it.beforeSanitizeElements,C,null),Bo(C,w))return!0;if(Oi(C))return $e(C),!0;const I=St(R(C));if(xt=Lo(it.uponSanitizeElement,xt,Xa,ki),ge(it.uponSanitizeElement,C,{tagName:I,allowedTags:xt}),Bo(C,w))return!0;if(Kp(C,I))return $e(C),!0;if(Hr[I]||!(Ee.tagCheck instanceof Function&&Ee.tagCheck(I))&&!xt[I]){const Q=Zp(C,I,w);return Q===!1&&ge(it.afterSanitizeElements,C,null),Q}if(P(C)===te.element&&!Gp(C)||(I==="noscript"||I==="noembed"||I==="noframes")&&Pt(zg,C.innerHTML))return $e(C),!0;if(Fe&&C.nodeType===te.text){const Q=$i(C.textContent);C.textContent!==Q&&(Ur(t.removed,{element:C.cloneNode()}),C.textContent=Q)}return ge(it.afterSanitizeElements,C,null),!1},Mo=function(C,w,I){if(no[w]||vo(w,C)||co&&(w==="id"||w==="name")&&(I in r||I in Hp))return!1;const H=bt[w]||Ee.attributeCheck instanceof Function&&Ee.attributeCheck(w,C);return Za&&Pt(ue,w)||so&&Pt(vt,w)?!0:H?mo[w]||Pt(ao,Gr(I,Me,""))||(w==="src"||w==="xlink:href"||w==="href")&&C!=="script"&&No(I,"data:")===0&&po[C]||oo&&!Pt(de,Gr(I,Me,""))?!0:!I:Eo(C)&&Di(fe.tagNameCheck,C)&&Di(fe.attributeNameCheck,w,C)||w==="is"&&fe.allowCustomizedBuiltInElements&&Di(fe.tagNameCheck,I)},Qp=ft({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Eo=function(C){return!Qp[Jr(C)]&&Pt(pr,C)},Jp=function(C,w,I,H){if(D&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!I)switch(u.getAttributeType(C,w)){case"TrustedHTML":return T(H);case"TrustedScriptURL":return $(H)}return H},tg=function(C,w,I,H){try{return I?C.setAttributeNS(I,w,H):C.setAttribute(w,H),Oi(C)?($e(C),!1):!0}catch{return Ve(w,C),!1}},Fo=function(C){ge(it.beforeSanitizeAttributes,C,null);const w=C.attributes;if(!w||Oi(C))return;bt=Lo(it.uponSanitizeAttribute,bt,Ka,Ti);const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:bt,forceKeepAttr:void 0};let H=w.length;const Q=St(C.nodeName);for(;H--;){const st=w[H],mt=st.name,_t=st.namespaceURI,Vt=st.value,Xt=St(mt),hn=Vt;let Yt=mt==="value"?hn:wg(hn),$o=!1;if(I.attrName=Xt,I.attrValue=Yt,I.keepAttr=!0,I.forceKeepAttr=void 0,ge(it.uponSanitizeAttribute,C,I),Yt=I.attrValue,ho&&(Xt==="id"||Xt==="name")&&No(Yt,uo)!==0&&(Ve(mt,C,st),Yt=uo+Yt,$o=!0),Ue&&Pt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Yt)){Ve(mt,C,st);continue}if(Xt==="attributename"&&Ro(Yt,"href")){Ve(mt,C,st);continue}if(!I.forceKeepAttr){if(!I.keepAttr){Ve(mt,C,st);continue}if(!lo&&Pt(qg,Yt)){Ve(mt,C,st);continue}if(Fe&&(Yt=$i(Yt)),!Mo(Q,Xt,Yt)){Ve(mt,C,st);continue}Yt=Jp(Q,Xt,_t,Yt),Yt!==hn&&tg(C,mt,_t,Yt)&&$o&&Po(t.removed)}}ge(it.afterSanitizeAttributes,C,null)},Ii=function(C){let w=null;const I=To(C);for(ge(it.beforeSanitizeShadowDOM,C,null);w=I.nextNode();)if(ge(it.uponSanitizeShadowNode,w,null),Ao(w,C),Fo(w),Cr(w.content)&&Ii(w.content),P(w)===te.element){const H=_(w);Cr(H)&&(cn(H),Ii(H))}ge(it.afterSanitizeShadowDOM,C,null)},cn=function(C){const w=[{node:C,shadow:null}];for(;w.length>0;){const I=w.pop();if(I.shadow){Ii(I.shadow);continue}const H=I.node,st=P(H)===te.element,mt=x(H);if(mt)for(let _t=mt.length-1;_t>=0;--_t)w.push({node:mt[_t],shadow:null});if(st){const _t=A?A(H):null;if(typeof _t=="string"&&St(_t)==="template"){const Vt=H.content;Cr(Vt)&&w.push({node:Vt,shadow:null})}}if(st){const _t=_(H);Cr(_t)&&w.push({node:null,shadow:_t},{node:_t,shadow:null})}}};return t.sanitize=function(W){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,I=null,H=null,Q=null;if(rn=!W,rn&&(W="<!-->"),typeof W!="string"&&!Yr(W)&&(W=Bg(W),typeof W!="string"))throw Xe("dirty is not a string, aborting");if(!t.isSupported)return W;Qa?(xt=ki,bt=Ti):on(C),(it.uponSanitizeElement.length>0||it.uponSanitizeAttribute.length>0)&&(xt=re(xt)),it.uponSanitizeAttribute.length>0&&(bt=re(bt)),t.removed=[];const st=en&&typeof W!="string"&&Yr(W);if(st){Xp(W);const Vt=R(W);if(typeof Vt=="string"){const Xt=St(Vt);if(!xt[Xt]||Hr[Xt])throw Ei(W),Xe("root node is forbidden and cannot be sanitized in-place")}if(Oi(W))throw Ei(W),Xe("root node is clobbered and cannot be sanitized in-place");try{cn(W)}catch(Xt){throw Ei(W),Xt}}else if(Yr(W))w=ko("<!---->"),I=w.ownerDocument.importNode(W,!0),I.nodeType===te.element&&I.nodeName==="BODY"||I.nodeName==="HTML"?w=I:w.appendChild(I),cn(w);else{if(!gr&&!Fe&&!Ge&&W.indexOf("<")===-1)return D&&Bi?T(W):W;if(w=ko(W),!w)return gr?null:Bi?F:""}w&&Ja&&$e(w.firstChild);const mt=st?W:w;try{const Vt=To(mt);for(;H=Vt.nextNode();)Ao(H,mt),Fo(H),Cr(H.content)&&Ii(H.content)}catch(Vt){throw st&&(Ei(W),Ze(t.removed,Xt=>{Xt.element&&Fi(Xt.element)})),Vt}if(st)return Ze(t.removed,Vt=>{Vt.element&&Fi(Vt.element)}),Fe&&ln(W),W;if(gr){if(Fe&&ln(w),Li)for(Q=et.call(w.ownerDocument);w.firstChild;)Q.appendChild(w.firstChild);else Q=w;return(bt.shadowroot||bt.shadowrootmode)&&(Q=dt.call(i,Q,!0)),Q}let _t=Ge?w.outerHTML:w.innerHTML;return Ge&&xt["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&Pt(Ng,w.ownerDocument.doctype.name)&&(_t="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
|
|
4
|
+
`+_t),Fe&&(_t=$i(_t)),D&&Bi?T(_t):_t},t.setConfig=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};on(W),Qa=!0,ki=xt,Ti=bt},t.clearConfig=function(){br=null,Qa=!1,ki=null,Ti=null,D=z,F=""},t.isValidAttribute=function(W,C,w){br||on({});const I=St(W),H=St(C);return Mo(I,H,w)},t.addHook=function(W,C){typeof C=="function"&&Zt(it,W)&&Ur(it[W],C)},t.removeHook=function(W,C){if(Zt(it,W)){if(C!==void 0){const w=_g(it[W],C);return w===-1?void 0:Sg(it[W],w,1)[0]}return Po(it[W])}},t.removeHooks=function(W){Zt(it,W)&&(it[W]=[])},t.removeAllHooks=function(){it=Xo()},t}var Mr=oc(),lc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,si=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Gg=/\s*%%.*\n/gm,cc=class extends Error{static{d(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},nr={},bs=d(function(e,t){e=e.replace(lc,"").replace(si,"").replace(Gg,`
|
|
5
|
+
`);for(const[r,{detector:i}]of Object.entries(nr))if(i(e,t))return r;throw new cc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Fn=d((...e)=>{for(const{id:t,detector:r,loader:i}of e)hc(t,r,i)},"registerLazyLoadedDiagrams"),hc=d((e,t,r)=>{nr[e]&&O.warn(`Detector with key ${e} already exists. Overwriting.`),nr[e]={detector:t,loader:r},O.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Vg=d(e=>nr[e].loader,"getDiagramLoader"),$n=d((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(n=>$n(e,n,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(n=>{e.includes(n)||e.push(n)}),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(n=>{typeof t[n]=="object"&&(e[n]===void 0||typeof e[n]=="object")?(e[n]===void 0&&(e[n]=Array.isArray(t[n])?[]:{}),e[n]=$n(e[n],t[n],{depth:r-1,clobber:i})):(i||typeof e[n]!="object"&&typeof t[n]!="object")&&(e[n]=t[n])}),e)},"assignWithDepth"),Lt=$n,Ba="#ffffff",Aa="#f2f2f2",Ut=d((e,t)=>t?v(e,{s:-40,l:10}):v(e,{s:-40,l:-10}),"mkBorder"),Xg=class{static{d(this,"Theme")}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||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||q(this.tertiaryColor),this.lineColor=this.lineColor||q(this.background),this.arrowheadColor=this.arrowheadColor||q(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?tt(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||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||q(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||U(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||tt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||tt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||U(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||U(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=tt(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=tt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||q(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||U(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||tt(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||v(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||v(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||v(this.primaryColor,{h:64}),this.fillType3=this.fillType3||v(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||v(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||v(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||v(this.primaryColor,{h:128}),this.fillType7=this.fillType7||v(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||v(this.primaryColor,{l:-10}),this.pie5=this.pie5||v(this.secondaryColor,{l:-10}),this.pie6=this.pie6||v(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||v(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||v(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||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||xi(this.quadrant1Fill)?U(this.quadrant1Fill):tt(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?tt(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||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=tt(this.git0,25),this.git1=tt(this.git1,25),this.git2=tt(this.git2,25),this.git3=tt(this.git3,25),this.git4=tt(this.git4,25),this.git5=tt(this.git5,25),this.git6=tt(this.git6,25),this.git7=tt(this.git7,25)),this.gitInv0=this.gitInv0||q(this.git0),this.gitInv1=this.gitInv1||q(this.git1),this.gitInv2=this.gitInv2||q(this.git2),this.gitInv3=this.gitInv3||q(this.git3),this.gitInv4=this.gitInv4||q(this.git4),this.gitInv5=this.gitInv5||q(this.git5),this.gitInv6=this.gitInv6||q(this.git6),this.gitInv7=this.gitInv7||q(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||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Kg=d(e=>{const t=new Xg;return t.calculate(e),t},"getThemeVariables"),Zg=class{static{d(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=U(this.primaryColor,16),this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=q(this.background),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=q(this.primaryColor),this.secondaryTextColor=q(this.secondaryColor),this.tertiaryTextColor=q(this.tertiaryColor),this.lineColor=q(this.background),this.textColor=q(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=U(q("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ni(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=tt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=tt(this.sectionBkgColor,10),this.taskBorderColor=ni(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ni(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||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||tt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=U(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=U(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=U(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=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||q(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.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||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||xi(this.quadrant1Fill)?U(this.quadrant1Fill):tt(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?tt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=U(this.secondaryColor,20),this.git1=U(this.pie2||this.secondaryColor,20),this.git2=U(this.pie3||this.tertiaryColor,20),this.git3=U(this.pie4||v(this.primaryColor,{h:-30}),20),this.git4=U(this.pie5||v(this.primaryColor,{h:-60}),20),this.git5=U(this.pie6||v(this.primaryColor,{h:-90}),10),this.git6=U(this.pie7||v(this.primaryColor,{h:60}),10),this.git7=U(this.pie8||v(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||q(this.git0),this.gitInv1=this.gitInv1||q(this.git1),this.gitInv2=this.gitInv2||q(this.git2),this.gitInv3=this.gitInv3||q(this.git3),this.gitInv4=this.gitInv4||q(this.git4),this.gitInv5=this.gitInv5||q(this.git5),this.gitInv6=this.gitInv6||q(this.git6),this.gitInv7=this.gitInv7||q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||q(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||U(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||U(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Qg=d(e=>{const t=new Zg;return t.calculate(e),t},"getThemeVariables"),Jg=class{static{d(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=v(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=q(this.primaryColor),this.secondaryTextColor=q(this.secondaryColor),this.tertiaryTextColor=q(this.tertiaryColor),this.lineColor=q(this.background),this.textColor=q(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=ni(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||tt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||tt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=tt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||tt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||v(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||q(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||q(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=U(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||U(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||U(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=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||v(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||v(this.primaryColor,{l:-10}),this.pie5=this.pie5||v(this.secondaryColor,{l:-30}),this.pie6=this.pie6||v(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||v(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||v(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||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||xi(this.quadrant1Fill)?U(this.quadrant1Fill):tt(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||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=tt(this.git0,25),this.git1=tt(this.git1,25),this.git2=tt(this.git2,25),this.git3=tt(this.git3,25),this.git4=tt(this.git4,25),this.git5=tt(this.git5,25),this.git6=tt(this.git6,25),this.git7=tt(this.git7,25)),this.gitInv0=this.gitInv0||tt(q(this.git0),25),this.gitInv1=this.gitInv1||q(this.git1),this.gitInv2=this.gitInv2||q(this.git2),this.gitInv3=this.gitInv3||q(this.git3),this.gitInv4=this.gitInv4||q(this.git4),this.gitInv5=this.gitInv5||q(this.git5),this.gitInv6=this.gitInv6||q(this.git6),this.gitInv7=this.gitInv7||q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||q(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||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},tm=d(e=>{const t=new Jg;return t.calculate(e),t},"getThemeVariables"),em=class{static{d(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=U("#cde498",10),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=q(this.primaryColor),this.secondaryTextColor=q(this.secondaryColor),this.tertiaryTextColor=q(this.primaryColor),this.lineColor=q(this.background),this.textColor=q(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=tt(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||tt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||tt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=tt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||tt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||v(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||U(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||U(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=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(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||v(this.primaryColor,{l:-30}),this.pie5=this.pie5||v(this.secondaryColor,{l:-30}),this.pie6=this.pie6||v(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||v(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||v(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||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||xi(this.quadrant1Fill)?U(this.quadrant1Fill):tt(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||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=tt(this.git0,25),this.git1=tt(this.git1,25),this.git2=tt(this.git2,25),this.git3=tt(this.git3,25),this.git4=tt(this.git4,25),this.git5=tt(this.git5,25),this.git6=tt(this.git6,25),this.git7=tt(this.git7,25)),this.gitInv0=this.gitInv0||q(this.git0),this.gitInv1=this.gitInv1||q(this.git1),this.gitInv2=this.gitInv2||q(this.git2),this.gitInv3=this.gitInv3||q(this.git3),this.gitInv4=this.gitInv4||q(this.git4),this.gitInv5=this.gitInv5||q(this.git5),this.gitInv6=this.gitInv6||q(this.git6),this.gitInv7=this.gitInv7||q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||q(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||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},rm=d(e=>{const t=new em;return t.calculate(e),t},"getThemeVariables"),im=class{static{d(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=U(this.contrast,55),this.background="#ffffff",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=q(this.primaryColor),this.secondaryTextColor=q(this.secondaryColor),this.tertiaryTextColor=q(this.tertiaryColor),this.lineColor=q(this.background),this.textColor=q(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||U(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=U(this.contrast,55),this.border2=this.contrast,this.actorBorder=U(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||q(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||tt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=U(this.contrast,30),this.sectionBkgColor2=U(this.contrast,30),this.taskBorderColor=tt(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=U(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=tt(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=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||xi(this.quadrant1Fill)?U(this.quadrant1Fill):tt(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=tt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||v(this.primaryColor,{h:-30}),this.git4=this.pie5||v(this.primaryColor,{h:-60}),this.git5=this.pie6||v(this.primaryColor,{h:-90}),this.git6=this.pie7||v(this.primaryColor,{h:60}),this.git7=this.pie8||v(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||q(this.git0),this.gitInv1=this.gitInv1||q(this.git1),this.gitInv2=this.gitInv2||q(this.git2),this.gitInv3=this.gitInv3||q(this.git3),this.gitInv4=this.gitInv4||q(this.git4),this.gitInv5=this.gitInv5||q(this.git5),this.gitInv6=this.gitInv6||q(this.git6),this.gitInv7=this.gitInv7||q(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||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},am=d(e=>{const t=new im;return t.calculate(e),t},"getThemeVariables"),ke={base:{getThemeVariables:Kg},dark:{getThemeVariables:Qg},default:{getThemeVariables:tm},forest:{getThemeVariables:rm},neutral:{getThemeVariables:am}},me={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,layoutAlgorithm:"cose-bilkent"},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},uc={...me,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ke.default.getThemeVariables(),sequence:{...me.sequence,messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:d(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:d(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...me.gantt,tickInterval:void 0,useWidth:void 0},c4:{...me.c4,useWidth:void 0,personFont:d(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...me.flowchart,inheritDir:!1},external_personFont:d(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:d(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:d(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:d(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:d(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:d(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:d(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:d(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:d(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:d(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:d(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:d(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:d(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:d(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:d(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:d(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:d(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:d(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:d(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:d(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...me.pie,useWidth:984},xyChart:{...me.xyChart,useWidth:void 0},requirement:{...me.requirement,useWidth:void 0},packet:{...me.packet},radar:{...me.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},dc=d((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...dc(e[i],"")]:[...r,t+i],[]),"keyify"),nm=new Set(dc(uc,"")),fc=uc,ta=d(e=>{if(O.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ta(t));return}for(const t of Object.keys(e)){if(O.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!nm.has(t)||e[t]==null){O.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){O.debug("sanitizing object",t),ta(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(O.debug("sanitizing css option",t),e[t]=sm(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]="")}O.debug("After sanitization",e)}},"sanitizeDirective"),sm=d(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"),Er=Object.freeze(fc),Qt=Lt({},Er),ea,sr=[],oi=Lt({},Er),Ma=d((e,t)=>{let r=Lt({},e),i={};for(const a of t)mc(a),i=Lt(i,a);if(r=Lt(r,i),i.theme&&i.theme in ke){const a=Lt({},ea),n=Lt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in ke&&(r.themeVariables=ke[r.theme].getThemeVariables(n))}return oi=r,yc(oi),oi},"updateCurrentConfig"),om=d(e=>(Qt=Lt({},Er),Qt=Lt(Qt,e),e.theme&&ke[e.theme]&&(Qt.themeVariables=ke[e.theme].getThemeVariables(e.themeVariables)),Ma(Qt,sr),Qt),"setSiteConfig"),lm=d(e=>{ea=Lt({},e)},"saveConfigFromInitialize"),cm=d(e=>(Qt=Lt(Qt,e),Ma(Qt,sr),Qt),"updateSiteConfig"),pc=d(()=>Lt({},Qt),"getSiteConfig"),gc=d(e=>(yc(e),Lt(oi,e),zt()),"setConfig"),zt=d(()=>Lt({},oi),"getConfig"),mc=d(e=>{e&&(["secure",...Qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(O.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"&&mc(e[t])}))},"sanitize"),hm=d(e=>{ta(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),sr.push(e),Ma(Qt,sr)},"addDirective"),ra=d((e=Qt)=>{sr=[],Ma(e,sr)},"reset"),um={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ko={},dm=d(e=>{Ko[e]||(O.warn(um[e]),Ko[e]=!0)},"issueWarning"),yc=d(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&dm("LAZY_LOAD_DEPRECATED")},"checkConfig"),gw=d(()=>{let e={};ea&&(e=Lt(e,ea));for(const t of sr)e=Lt(e,t);return e},"getUserDefinedConfig"),bi=/<br\s*\/?>/gi,fm=d(e=>e?Cc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),pm=(()=>{let e=!1;return()=>{e||(xc(),e=!0)}})();function xc(){const e="data-temp-href-target";Mr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Mr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}d(xc,"setupDompurifyHooks");var bc=d(e=>(pm(),Mr.sanitize(e)),"removeScript"),Zo=d((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=bc(e):r!=="loose"&&(e=Cc(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=xm(e))}return e},"sanitizeMore"),ne=d((e,t)=>e&&(t.dompurifyConfig?e=Mr.sanitize(Zo(e,t),t.dompurifyConfig).toString():e=Mr.sanitize(Zo(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),gm=d((e,t)=>typeof e=="string"?ne(e,t):e.flat().map(r=>ne(r,t)),"sanitizeTextOrArray"),mm=d(e=>bi.test(e),"hasBreaks"),ym=d(e=>e.split(bi),"splitBreaks"),xm=d(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Cc=d(e=>e.replace(bi,"#br#"),"breakToPlaceholder"),bm=d(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Mt=d(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Cm=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),_m=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Qo=d(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const n=t[i-1],o=t[i+1];Sm(n,o)&&(a=n+","+o,i++,r.pop())}r.push(wm(a))}return r.join("")},"parseGenericTypes"),On=d((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Sm=d((e,t)=>{const r=On(e,"~"),i=On(t,"~");return r===1&&i===1},"shouldCombineSets"),wm=d(e=>{const t=On(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;a!==-1&&n!==-1&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Jo=d(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Dn=/\$\$(.*)\$\$/g,Fr=d(e=>(e.match(Dn)?.length??0)>0,"hasKatex"),mw=d(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Cs(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),vm=d(async(e,t)=>{if(!Fr(e))return e;if(!(Jo()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Dn,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:a}=await import("./mermaid-VLURNSYL-CFdBlgNU.js").then(n=>n.a);return{default:a}},__vite__mapDeps([0,1,2,3,4])),i=t.forceLegacyMathML||!Jo()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(bi).map(a=>Fr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Dn,(a,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Cs=d(async(e,t)=>ne(await vm(e,t),t),"renderKatexSanitized"),Pr={getRows:fm,sanitizeText:ne,sanitizeTextOrArray:gm,hasBreaks:mm,splitBreaks:ym,lineBreakRegex:bi,removeScript:bc,getUrl:bm,evaluate:Mt,getMax:Cm,getMin:_m},km=d(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Tm=d(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"),_c=d(function(e,t,r,i){const a=Tm(t,r,i);km(e,a)},"configureSvgSize"),Lm=d(function(e,t,r,i){const a=t.node().getBBox(),n=a.width,o=a.height;O.info(`SVG bounds: ${n}x${o}`,a);let s=0,l=0;O.info(`Graph bounds: ${s}x${l}`,e),s=n+r*2,l=o+r*2,O.info(`Calculated bounds: ${s}x${l}`),_c(t,l,s,i);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Yi={},Bm=d((e,t,r)=>{let i="";return e in Yi&&Yi[e]?i=Yi[e](r):O.warn(`No theme found for ${e}`),` & {
|
|
6
|
+
font-family: ${r.fontFamily};
|
|
7
|
+
font-size: ${r.fontSize};
|
|
8
|
+
fill: ${r.textColor}
|
|
9
|
+
}
|
|
10
|
+
@keyframes edge-animation-frame {
|
|
11
|
+
from {
|
|
12
|
+
stroke-dashoffset: 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@keyframes dash {
|
|
16
|
+
to {
|
|
17
|
+
stroke-dashoffset: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
& .edge-animation-slow {
|
|
21
|
+
stroke-dasharray: 9,5 !important;
|
|
22
|
+
stroke-dashoffset: 900;
|
|
23
|
+
animation: dash 50s linear infinite;
|
|
24
|
+
stroke-linecap: round;
|
|
25
|
+
}
|
|
26
|
+
& .edge-animation-fast {
|
|
27
|
+
stroke-dasharray: 9,5 !important;
|
|
28
|
+
stroke-dashoffset: 900;
|
|
29
|
+
animation: dash 20s linear infinite;
|
|
30
|
+
stroke-linecap: round;
|
|
31
|
+
}
|
|
32
|
+
/* Classes common for multiple diagrams */
|
|
33
|
+
|
|
34
|
+
& .error-icon {
|
|
35
|
+
fill: ${r.errorBkgColor};
|
|
36
|
+
}
|
|
37
|
+
& .error-text {
|
|
38
|
+
fill: ${r.errorTextColor};
|
|
39
|
+
stroke: ${r.errorTextColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& .edge-thickness-normal {
|
|
43
|
+
stroke-width: 1px;
|
|
44
|
+
}
|
|
45
|
+
& .edge-thickness-thick {
|
|
46
|
+
stroke-width: 3.5px
|
|
47
|
+
}
|
|
48
|
+
& .edge-pattern-solid {
|
|
49
|
+
stroke-dasharray: 0;
|
|
50
|
+
}
|
|
51
|
+
& .edge-thickness-invisible {
|
|
52
|
+
stroke-width: 0;
|
|
53
|
+
fill: none;
|
|
54
|
+
}
|
|
55
|
+
& .edge-pattern-dashed{
|
|
56
|
+
stroke-dasharray: 3;
|
|
57
|
+
}
|
|
58
|
+
.edge-pattern-dotted {
|
|
59
|
+
stroke-dasharray: 2;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
& .marker {
|
|
63
|
+
fill: ${r.lineColor};
|
|
64
|
+
stroke: ${r.lineColor};
|
|
65
|
+
}
|
|
66
|
+
& .marker.cross {
|
|
67
|
+
stroke: ${r.lineColor};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
& svg {
|
|
71
|
+
font-family: ${r.fontFamily};
|
|
72
|
+
font-size: ${r.fontSize};
|
|
73
|
+
}
|
|
74
|
+
& p {
|
|
75
|
+
margin: 0
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
${i}
|
|
79
|
+
|
|
80
|
+
${t}
|
|
81
|
+
`},"getStyles"),Am=d((e,t)=>{t!==void 0&&(Yi[e]=t)},"addStylesForDiagram"),Mm=Bm,Sc={};ng(Sc,{clear:()=>Em,getAccDescription:()=>Dm,getAccTitle:()=>$m,getDiagramTitle:()=>Pm,setAccDescription:()=>Om,setAccTitle:()=>Fm,setDiagramTitle:()=>Im});var _s="",Ss="",ws="",vs=d(e=>ne(e,zt()),"sanitizeText"),Em=d(()=>{_s="",ws="",Ss=""},"clear"),Fm=d(e=>{_s=vs(e).replace(/^\s+/g,"")},"setAccTitle"),$m=d(()=>_s,"getAccTitle"),Om=d(e=>{ws=vs(e).replace(/\n\s+/g,`
|
|
82
|
+
`)},"setAccDescription"),Dm=d(()=>ws,"getAccDescription"),Im=d(e=>{Ss=vs(e)},"setDiagramTitle"),Pm=d(()=>Ss,"getDiagramTitle"),tl=O,Rm=xs,pt=zt,yw=gc,xw=Er,ks=d(e=>ne(e,pt()),"sanitizeText"),Nm=Lm,Wm=d(()=>Sc,"getCommonDb"),ia={},aa=d((e,t,r)=>{ia[e]&&tl.warn(`Diagram with id ${e} already registered. Overwriting.`),ia[e]=t,r&&hc(e,r),Am(e,t.styles),t.injectUtils?.(tl,Rm,pt,ks,Nm,Wm(),()=>{})},"registerDiagram"),In=d(e=>{if(e in ia)return ia[e];throw new zm(e)},"getDiagram"),zm=class extends Error{static{d(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}};const Pn=Math.PI,Rn=2*Pn,Qe=1e-6,qm=Rn-Qe;function wc(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Hm(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return wc;const r=10**t;return function(i){this._+=i[0];for(let a=1,n=i.length;a<n;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class jm{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?wc:Hm(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,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,n,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+n},${this._y1=+o}`}arcTo(t,r,i,a,n){if(t=+t,r=+r,i=+i,a=+a,n=+n,n<0)throw new Error(`negative radius: ${n}`);let o=this._x1,s=this._y1,l=i-t,c=a-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)||!n)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-o,g=a-s,m=l*l+c*c,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(f),_=n*Math.tan((Pn-Math.acos((m+f-y)/(2*x*b)))/2),k=_/b,S=_/x;Math.abs(k-1)>Qe&&this._append`L${t+k*h},${r+k*u}`,this._append`A${n},${n},0,0,${+(u*p>h*g)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,a,n,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(a),l=i*Math.sin(a),c=t+s,h=r+l,u=1^o,f=o?a-n:n-a;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%Rn+Rn),f>qm?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>=Pn)},${u},${this._x1=t+i*Math.cos(n)},${this._y1=r+i*Math.sin(n)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function _r(e){return function(){return e}}const bw=Math.abs,Cw=Math.atan2,_w=Math.cos,Sw=Math.max,ww=Math.min,vw=Math.sin,kw=Math.sqrt,el=1e-12,Ts=Math.PI,rl=Ts/2,Tw=2*Ts;function Lw(e){return e>1?0:e<-1?Ts:Math.acos(e)}function Bw(e){return e>=1?rl:e<=-1?-rl:Math.asin(e)}function Ym(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 jm(t)}function Um(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vc(e){this._context=e}vc.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 na(e){return new vc(e)}function Gm(e){return e[0]}function Vm(e){return e[1]}function Xm(e,t){var r=_r(!0),i=null,a=na,n=null,o=Ym(s);e=typeof e=="function"?e:e===void 0?Gm:_r(e),t=typeof t=="function"?t:t===void 0?Vm:_r(t);function s(l){var c,h=(l=Um(l)).length,u,f=!1,p;for(i==null&&(n=a(p=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?n.lineStart():n.lineEnd()),f&&n.point(+e(u,c,l),+t(u,c,l));if(p)return n=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:_r(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:_r(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:_r(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,i!=null&&(n=a(i)),s):a},s.context=function(l){return arguments.length?(l==null?i=n=null:n=a(i=l),s):i},s}class kc{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 Tc(e){return new kc(e,!0)}function Lc(e){return new kc(e,!1)}function Re(){}function sa(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 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=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:sa(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:sa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ui(e){return new Ea(e)}function Bc(e){this._context=e}Bc.prototype={areaStart:Re,areaEnd:Re,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:sa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Km(e){return new Bc(e)}function Ac(e){this._context=e}Ac.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:sa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Zm(e){return new Ac(e)}function Mc(e,t){this._basis=new Ea(e),this._beta=t}Mc.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],a=t[0],n=e[r]-i,o=t[r]-a,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*n),this._beta*t[s]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Qm=(function e(t){function r(i){return t===1?new Ea(i):new Mc(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function oa(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 Ls(e,t){this._context=e,this._k=(1-t)/6}Ls.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:oa(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:oa(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 Ec=(function e(t){function r(i){return new Ls(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Bs(e,t){this._context=e,this._k=(1-t)/6}Bs.prototype={areaStart:Re,areaEnd:Re,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:oa(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 Jm=(function e(t){function r(i){return new Bs(i,t)}return r.tension=function(i){return e(+i)},r})(0);function As(e,t){this._context=e,this._k=(1-t)/6}As.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:oa(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 ty=(function e(t){function r(i){return new As(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ms(e,t,r){var i=e._x1,a=e._y1,n=e._x2,o=e._y2;if(e._l01_a>el){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,a=(a*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>el){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);n=(n*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,a,n,o,e._x2,e._y2)}function Fc(e,t){this._context=e,this._alpha=t}Fc.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:Ms(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 $c=(function e(t){function r(i){return t?new Fc(i,t):new Ls(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Oc(e,t){this._context=e,this._alpha=t}Oc.prototype={areaStart:Re,areaEnd:Re,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:Ms(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 ey=(function e(t){function r(i){return t?new Oc(i,t):new Bs(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Dc(e,t){this._context=e,this._alpha=t}Dc.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:Ms(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 ry=(function e(t){function r(i){return t?new Dc(i,t):new As(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ic(e){this._context=e}Ic.prototype={areaStart:Re,areaEnd:Re,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 iy(e){return new Ic(e)}function il(e){return e<0?-1:1}function al(e,t,r){var i=e._x1-e._x0,a=t-e._x1,n=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),s=(n*a+o*i)/(i+a);return(il(n)+il(o))*Math.min(Math.abs(n),Math.abs(o),.5*Math.abs(s))||0}function nl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function yn(e,t,r){var i=e._x0,a=e._y0,n=e._x1,o=e._y1,s=(n-i)/3;e._context.bezierCurveTo(i+s,a+s*t,n-s,o-s*r,n,o)}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=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:yn(this,this._t0,nl(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,yn(this,nl(this,r=al(this,e,t)),r);break;default:yn(this,this._t0,r=al(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Pc(e){this._context=new Rc(e)}(Pc.prototype=Object.create(la.prototype)).point=function(e,t){la.prototype.point.call(this,t,e)};function Rc(e){this._context=e}Rc.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,a,n){this._context.bezierCurveTo(t,e,i,r,n,a)}};function Nc(e){return new la(e)}function Wc(e){return new Pc(e)}function zc(e){this._context=e}zc.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=sl(e),a=sl(t),n=0,o=1;o<r;++n,++o)this._context.bezierCurveTo(i[0][n],a[0][n],i[1][n],a[1][n],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 sl(e){var t,r=e.length-1,i,a=new Array(r),n=new Array(r),o=new Array(r);for(a[0]=0,n[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,n[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,n[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/n[t-1],n[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/n[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/n[t];for(n[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)n[t]=2*e[t+1]-a[t+1];return[a,n]}function qc(e){return new zc(e)}function Fa(e,t){this._context=e,this._t=t}Fa.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 Hc(e){return new Fa(e,.5)}function jc(e){return new Fa(e,0)}function Yc(e){return new Fa(e,1)}var ay=d(e=>{const{securityLevel:t}=pt();let r=ut("body");if(t==="sandbox"){const n=ut(`#i${e}`).node()?.contentDocument??document;r=ut(n.body)}return r.select(`#${e}`)},"selectSvgElement");function Es(e){return typeof e>"u"||e===null}d(Es,"isNothing");function Uc(e){return typeof e=="object"&&e!==null}d(Uc,"isObject");function Gc(e){return Array.isArray(e)?e:Es(e)?[]:[e]}d(Gc,"toArray");function Vc(e,t){var r,i,a,n;if(t)for(n=Object.keys(t),r=0,i=n.length;r<i;r+=1)a=n[r],e[a]=t[a];return e}d(Vc,"extend");function Xc(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}d(Xc,"repeat");function Kc(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}d(Kc,"isNegativeZero");var ny=Es,sy=Uc,oy=Gc,ly=Xc,cy=Kc,hy=Vc,Bt={isNothing:ny,isObject:sy,toArray:oy,repeat:ly,isNegativeZero:cy,extend:hy};function Fs(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+=`
|
|
83
|
+
|
|
84
|
+
`+e.mark.snippet),i+" "+r):i}d(Fs,"formatError");function $r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Fs(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}d($r,"YAMLException$1");$r.prototype=Object.create(Error.prototype);$r.prototype.constructor=$r;$r.prototype.toString=d(function(t){return this.name+": "+Fs(this,t)},"toString");var Jt=$r;function Gi(e,t,r,i,a){var n="",o="",s=Math.floor(a/2)-1;return i-t>s&&(n=" ... ",t=i-s+n.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:n+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+n.length}}d(Gi,"getLine");function Vi(e,t){return Bt.repeat(" ",t-e.length)+e}d(Vi,"padStart");function Zc(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],a=[],n,o=-1;n=r.exec(e.buffer);)a.push(n.index),i.push(n.index+n[0].length),e.position<=n.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Gi(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),u),s=Bt.repeat(" ",t.indent)+Vi((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
85
|
+
`+s;for(c=Gi(e.buffer,i[o],a[o],e.position,u),s+=Bt.repeat(" ",t.indent)+Vi((e.line+1).toString(),h)+" | "+c.str+`
|
|
86
|
+
`,s+=Bt.repeat("-",t.indent+h+3+c.pos)+`^
|
|
87
|
+
`,l=1;l<=t.linesAfter&&!(o+l>=a.length);l++)c=Gi(e.buffer,i[o+l],a[o+l],e.position-(i[o]-i[o+l]),u),s+=Bt.repeat(" ",t.indent)+Vi((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
88
|
+
`;return s.replace(/\n$/,"")}d(Zc,"makeSnippet");var uy=Zc,dy=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],fy=["scalar","sequence","mapping"];function Qc(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}d(Qc,"compileStyleAliases");function Jc(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(dy.indexOf(r)===-1)throw new Jt('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=Qc(t.styleAliases||null),fy.indexOf(this.kind)===-1)throw new Jt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}d(Jc,"Type$1");var qt=Jc;function Nn(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(n,o){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(a=o)}),r[a]=i}),r}d(Nn,"compileList");function th(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(d(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}d(th,"compileMap");function ca(e){return this.extend(e)}d(ca,"Schema$1");ca.prototype.extend=d(function(t){var r=[],i=[];if(t instanceof qt)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 Jt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(n){if(!(n instanceof qt))throw new Jt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new Jt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new Jt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(n){if(!(n instanceof qt))throw new Jt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ca.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=Nn(a,"implicit"),a.compiledExplicit=Nn(a,"explicit"),a.compiledTypeMap=th(a.compiledImplicit,a.compiledExplicit),a},"extend");var py=ca,gy=new qt("tag:yaml.org,2002:str",{kind:"scalar",construct:d(function(e){return e!==null?e:""},"construct")}),my=new qt("tag:yaml.org,2002:seq",{kind:"sequence",construct:d(function(e){return e!==null?e:[]},"construct")}),yy=new qt("tag:yaml.org,2002:map",{kind:"mapping",construct:d(function(e){return e!==null?e:{}},"construct")}),xy=new py({explicit:[gy,my,yy]});function eh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}d(eh,"resolveYamlNull");function rh(){return null}d(rh,"constructYamlNull");function ih(e){return e===null}d(ih,"isNull");var by=new qt("tag:yaml.org,2002:null",{kind:"scalar",resolve:eh,construct:rh,predicate:ih,represent:{canonical:d(function(){return"~"},"canonical"),lowercase:d(function(){return"null"},"lowercase"),uppercase:d(function(){return"NULL"},"uppercase"),camelcase:d(function(){return"Null"},"camelcase"),empty:d(function(){return""},"empty")},defaultStyle:"lowercase"});function ah(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")}d(ah,"resolveYamlBoolean");function nh(e){return e==="true"||e==="True"||e==="TRUE"}d(nh,"constructYamlBoolean");function sh(e){return Object.prototype.toString.call(e)==="[object Boolean]"}d(sh,"isBoolean");var Cy=new qt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ah,construct:nh,predicate:sh,represent:{lowercase:d(function(e){return e?"true":"false"},"lowercase"),uppercase:d(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:d(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function oh(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}d(oh,"isHexCode");function lh(e){return 48<=e&&e<=55}d(lh,"isOctCode");function ch(e){return 48<=e&&e<=57}d(ch,"isDecCode");function hh(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!oh(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!lh(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!ch(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}d(hh,"resolveYamlInteger");function uh(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)}d(uh,"constructYamlInteger");function dh(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Bt.isNegativeZero(e)}d(dh,"isInteger");var _y=new qt("tag:yaml.org,2002:int",{kind:"scalar",resolve:hh,construct:uh,predicate:dh,represent:{binary:d(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:d(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:d(function(e){return e.toString(10)},"decimal"),hexadecimal:d(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"]}}),Sy=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function fh(e){return!(e===null||!Sy.test(e)||e[e.length-1]==="_")}d(fh,"resolveYamlFloat");function ph(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)}d(ph,"constructYamlFloat");var wy=/^[-+]?[0-9]+e/;function gh(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(Bt.isNegativeZero(e))return"-0.0";return r=e.toString(10),wy.test(r)?r.replace("e",".e"):r}d(gh,"representYamlFloat");function mh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Bt.isNegativeZero(e))}d(mh,"isFloat");var vy=new qt("tag:yaml.org,2002:float",{kind:"scalar",resolve:fh,construct:ph,predicate:mh,represent:gh,defaultStyle:"lowercase"}),yh=xy.extend({implicit:[by,Cy,_y,vy]}),ky=yh,xh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),bh=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 Ch(e){return e===null?!1:xh.exec(e)!==null||bh.exec(e)!==null}d(Ch,"resolveYamlTimestamp");function _h(e){var t,r,i,a,n,o,s,l=0,c=null,h,u,f;if(t=xh.exec(e),t===null&&(t=bh.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(n=+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,a,n,o,s,l)),c&&f.setTime(f.getTime()-c),f}d(_h,"constructYamlTimestamp");function Sh(e){return e.toISOString()}d(Sh,"representYamlTimestamp");var Ty=new qt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ch,construct:_h,instanceOf:Date,represent:Sh});function wh(e){return e==="<<"||e===null}d(wh,"resolveYamlMerge");var Ly=new qt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:wh}),$s=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
89
|
+
\r`;function vh(e){if(e===null)return!1;var t,r,i=0,a=e.length,n=$s;for(r=0;r<a;r++)if(t=n.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}d(vh,"resolveYamlBinary");function kh(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,n=$s,o=0,s=[];for(t=0;t<a;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|n.indexOf(i.charAt(t));return r=a%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)}d(kh,"constructYamlBinary");function Th(e){var t="",r=0,i,a,n=e.length,o=$s;for(i=0;i<n;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 a=n%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}d(Th,"representYamlBinary");function Lh(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}d(Lh,"isBinary");var By=new qt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vh,construct:kh,predicate:Lh,represent:Th}),Ay=Object.prototype.hasOwnProperty,My=Object.prototype.toString;function Bh(e){if(e===null)return!0;var t=[],r,i,a,n,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(a=s[r],o=!1,My.call(a)!=="[object Object]")return!1;for(n in a)if(Ay.call(a,n))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(n)===-1)t.push(n);else return!1}return!0}d(Bh,"resolveYamlOmap");function Ah(e){return e!==null?e:[]}d(Ah,"constructYamlOmap");var Ey=new qt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Bh,construct:Ah}),Fy=Object.prototype.toString;function Mh(e){if(e===null)return!0;var t,r,i,a,n,o=e;for(n=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Fy.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;n[t]=[a[0],i[a[0]]]}return!0}d(Mh,"resolveYamlPairs");function Eh(e){if(e===null)return[];var t,r,i,a,n,o=e;for(n=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),n[t]=[a[0],i[a[0]]];return n}d(Eh,"constructYamlPairs");var $y=new qt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Mh,construct:Eh}),Oy=Object.prototype.hasOwnProperty;function Fh(e){if(e===null)return!0;var t,r=e;for(t in r)if(Oy.call(r,t)&&r[t]!==null)return!1;return!0}d(Fh,"resolveYamlSet");function $h(e){return e!==null?e:{}}d($h,"constructYamlSet");var Dy=new qt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Fh,construct:$h}),Oh=ky.extend({implicit:[Ty,Ly],explicit:[By,Ey,$y,Dy]}),Ne=Object.prototype.hasOwnProperty,ha=1,Dh=2,Ih=3,ua=4,xn=1,Iy=2,ol=3,Py=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ry=/[\x85\u2028\u2029]/,Ny=/[,\[\]\{\}]/,Ph=/^(?:!|!!|![a-z\-]+!)$/i,Rh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Wn(e){return Object.prototype.toString.call(e)}d(Wn,"_class");function le(e){return e===10||e===13}d(le,"is_EOL");function Pe(e){return e===9||e===32}d(Pe,"is_WHITE_SPACE");function Gt(e){return e===9||e===32||e===10||e===13}d(Gt,"is_WS_OR_EOL");function rr(e){return e===44||e===91||e===93||e===123||e===125}d(rr,"is_FLOW_INDICATOR");function Nh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}d(Nh,"fromHexCode");function Wh(e){return e===120?2:e===117?4:e===85?8:0}d(Wh,"escapedHexLen");function zh(e){return 48<=e&&e<=57?e-48:-1}d(zh,"fromDecimalCode");function zn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
90
|
+
`: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":""}d(zn,"simpleEscapeSequence");function qh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}d(qh,"charFromCodepoint");var Hh=new Array(256),jh=new Array(256);for(Ke=0;Ke<256;Ke++)Hh[Ke]=zn(Ke)?1:0,jh[Ke]=zn(Ke);var Ke;function Yh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Oh,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=[]}d(Yh,"State$1");function Os(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=uy(r),new Jt(t,r)}d(Os,"generateError");function J(e,t){throw Os(e,t)}d(J,"throwError");function ci(e,t){e.onWarning&&e.onWarning.call(null,Os(e,t))}d(ci,"throwWarning");var ll={YAML:d(function(t,r,i){var a,n,o;t.version!==null&&J(t,"duplication of %YAML directive"),i.length!==1&&J(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&J(t,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),o=parseInt(a[2],10),n!==1&&J(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&ci(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:d(function(t,r,i){var a,n;i.length!==2&&J(t,"TAG directive accepts exactly two arguments"),a=i[0],n=i[1],Ph.test(a)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),Ne.call(t.tagMap,a)&&J(t,'there is a previously declared suffix for "'+a+'" tag handle'),Rh.test(n)||J(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{J(t,"tag prefix is malformed: "+n)}t.tagMap[a]=n},"handleTagDirective")};function Te(e,t,r,i){var a,n,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(a=0,n=s.length;a<n;a+=1)o=s.charCodeAt(a),o===9||32<=o&&o<=1114111||J(e,"expected valid JSON character");else Py.test(s)&&J(e,"the stream contains non-printable characters");e.result+=s}}d(Te,"captureSegment");function qn(e,t,r,i){var a,n,o,s;for(Bt.isObject(r)||J(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,s=a.length;o<s;o+=1)n=a[o],Ne.call(t,n)||(t[n]=r[n],i[n]=!0)}d(qn,"mergeMappings");function ir(e,t,r,i,a,n,o,s,l){var c,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),c=0,h=a.length;c<h;c+=1)Array.isArray(a[c])&&J(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Wn(a[c])==="[object Object]"&&(a[c]="[object Object]");if(typeof a=="object"&&Wn(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(c=0,h=n.length;c<h;c+=1)qn(e,t,n[c],r);else qn(e,t,n,r);else!e.json&&!Ne.call(r,a)&&Ne.call(t,a)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,J(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):t[a]=n,delete r[a];return t}d(ir,"storeMappingPair");function $a(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++):J(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}d($a,"readLineBreak");function wt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Pe(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(le(a))for($a(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&ci(e,"deficient indentation"),i}d(wt,"skipSeparationSpace");function Ci(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||Gt(r)))}d(Ci,"testDocumentSeparator");function Oa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Bt.repeat(`
|
|
91
|
+
`,t-1))}d(Oa,"writeFoldedLines");function Uh(e,t,r){var i,a,n,o,s,l,c,h,u=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),Gt(p)||rr(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(a=e.input.charCodeAt(e.position+1),Gt(a)||r&&rr(a)))return!1;for(e.kind="scalar",e.result="",n=o=e.position,s=!1;p!==0;){if(p===58){if(a=e.input.charCodeAt(e.position+1),Gt(a)||r&&rr(a))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),Gt(i))break}else{if(e.position===e.lineStart&&Ci(e)||r&&rr(p))break;if(le(p))if(l=e.line,c=e.lineStart,h=e.lineIndent,wt(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&(Te(e,n,o,!1),Oa(e,e.line-l),n=o=e.position,s=!1),Pe(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Te(e,n,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}d(Uh,"readPlainScalar");function Gh(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Te(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else le(r)?(Te(e,i,a,!0),Oa(e,wt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Ci(e)?J(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);J(e,"unexpected end of the stream within a single quoted scalar")}d(Gh,"readSingleQuotedScalar");function Vh(e,t){var r,i,a,n,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 Te(e,r,e.position,!0),e.position++,!0;if(s===92){if(Te(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),le(s))wt(e,!1,t);else if(s<256&&Hh[s])e.result+=jh[s],e.position++;else if((o=Wh(s))>0){for(a=o,n=0;a>0;a--)s=e.input.charCodeAt(++e.position),(o=Nh(s))>=0?n=(n<<4)+o:J(e,"expected hexadecimal character");e.result+=qh(n),e.position++}else J(e,"unknown escape sequence");r=i=e.position}else le(s)?(Te(e,r,i,!0),Oa(e,wt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ci(e)?J(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}J(e,"unexpected end of the stream within a double quoted scalar")}d(Vh,"readDoubleQuotedScalar");function Xh(e,t){var r=!0,i,a,n,o=e.tag,s,l=e.anchor,c,h,u,f,p,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,p=!1,s=[];else if(b===123)h=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(wt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=s,!0;r?b===44&&J(e,"expected the node content, but found ','"):J(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Gt(c)&&(u=f=!0,e.position++,wt(e,!0,t))),i=e.line,a=e.lineStart,n=e.position,or(e,t,ha,!1,!0),y=e.tag,m=e.result,wt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),wt(e,!0,t),or(e,t,ha,!1,!0),x=e.result),p?ir(e,s,g,y,m,x,i,a,n):u?s.push(ir(e,null,g,y,m,x,i,a,n)):s.push(m),wt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}J(e,"unexpected end of the stream within a flow collection")}d(Xh,"readFlowCollection");function Kh(e,t){var r,i,a=xn,n=!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)xn===a?a=u===43?ol:Iy:J(e,"repeat of a chomping mode identifier");else if((h=zh(u))>=0)h===0?J(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?J(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(Pe(u)){do u=e.input.charCodeAt(++e.position);while(Pe(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!le(u)&&u!==0)}for(;u!==0;){for($a(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),le(u)){l++;continue}if(e.lineIndent<s){a===ol?e.result+=Bt.repeat(`
|
|
92
|
+
`,n?1+l:l):a===xn&&n&&(e.result+=`
|
|
93
|
+
`);break}for(i?Pe(u)?(c=!0,e.result+=Bt.repeat(`
|
|
94
|
+
`,n?1+l:l)):c?(c=!1,e.result+=Bt.repeat(`
|
|
95
|
+
`,l+1)):l===0?n&&(e.result+=" "):e.result+=Bt.repeat(`
|
|
96
|
+
`,l):e.result+=Bt.repeat(`
|
|
97
|
+
`,n?1+l:l),n=!0,o=!0,l=0,r=e.position;!le(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Te(e,r,e.position,!1)}return!0}d(Kh,"readBlockScalar");function Hn(e,t){var r,i=e.tag,a=e.anchor,n=[],o,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Gt(o))));){if(s=!0,e.position++,wt(e,!0,-1)&&e.lineIndent<=t){n.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,or(e,t,Ih,!1,!0),n.push(e.result),wt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)J(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=n,!0):!1}d(Hn,"readBlockSequence");function Zh(e,t,r){var i,a,n,o,s,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),p=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,J(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),n=e.line,(b===63||b===58)&&Gt(i))b===63?(y&&(ir(e,u,f,p,g,null,o,s,l),p=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):J(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,!or(e,r,Dh,!1,!0))break;if(e.line===n){for(b=e.input.charCodeAt(e.position);Pe(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Gt(b)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(ir(e,u,f,p,g,null,o,s,l),p=g=m=null),x=!0,y=!1,a=!1,p=e.tag,g=e.result;else if(x)J(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)J(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===n||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,l=e.position),or(e,t,ua,!0,a)&&(y?g=e.result:m=e.result),y||(ir(e,u,f,p,g,m,o,s,l),p=g=m=null),wt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===n||e.lineIndent>t)&&b!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&ir(e,u,f,p,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}d(Zh,"readBlockMapping");function Qh(e){var t,r=!1,i=!1,a,n,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&J(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,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(n=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):J(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Gt(o);)o===33&&(i?J(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Ph.test(a)||J(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),Ny.test(n)&&J(e,"tag suffix cannot contain flow indicator characters")}n&&!Rh.test(n)&&J(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{J(e,"tag name is malformed: "+n)}return r?e.tag=n:Ne.call(e.tagMap,a)?e.tag=e.tagMap[a]+n:a==="!"?e.tag="!"+n:a==="!!"?e.tag="tag:yaml.org,2002:"+n:J(e,'undeclared tag handle "'+a+'"'),!0}d(Qh,"readTagProperty");function Jh(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&J(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Gt(r)&&!rr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}d(Jh,"readAnchorProperty");function tu(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&&!Gt(i)&&!rr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ne.call(e.anchorMap,r)||J(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],wt(e,!0,-1),!0}d(tu,"readAlias");function or(e,t,r,i,a){var n,o,s,l=1,c=!1,h=!1,u,f,p,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n=o=s=ua===r||Ih===r,i&&wt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Qh(e)||Jh(e);)wt(e,!0,-1)?(c=!0,s=n,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=c||a),(l===1||ua===r)&&(ha===r||Dh===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?s&&(Hn(e,y)||Zh(e,y,m))||Xh(e,m)?h=!0:(o&&Kh(e,m)||Gh(e,m)||Vh(e,m)?h=!0:tu(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):Uh(e,m,ha===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&Hn(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"&&J(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(Ne.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,p=e.typeMap.multi[e.kind||"fallback"],u=0,f=p.length;u<f;u+=1)if(e.tag.slice(0,p[u].tag.length)===p[u].tag){g=p[u];break}g||J(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&J(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)):J(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}d(or,"composeNode");function eu(e){var t=e.position,r,i,a,n=!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&&(wt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(n=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&J(e,"directive name must not be less than one character in length");o!==0;){for(;Pe(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!le(o));break}if(le(o))break;for(r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&$a(e),Ne.call(ll,i)?ll[i](e,i,a):ci(e,'unknown document directive "'+i+'"')}if(wt(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,wt(e,!0,-1)):n&&J(e,"directives end mark is expected"),or(e,e.lineIndent-1,ua,!1,!0),wt(e,!0,-1),e.checkLineBreaks&&Ry.test(e.input.slice(t,e.position))&&ci(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ci(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,wt(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}d(eu,"readDocument");function Ds(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
98
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Yh(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,J(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;)eu(r);return r.documents}d(Ds,"loadDocuments");function Wy(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Ds(e,r);if(typeof t!="function")return i;for(var a=0,n=i.length;a<n;a+=1)t(i[a])}d(Wy,"loadAll$1");function ru(e,t){var r=Ds(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Jt("expected a single document in the stream, but found more")}}d(ru,"load$1");var zy=ru,qy={load:zy},iu=Object.prototype.toString,au=Object.prototype.hasOwnProperty,Is=65279,Hy=9,hi=10,jy=13,Yy=32,Uy=33,Gy=34,jn=35,Vy=37,Xy=38,Ky=39,Zy=42,nu=44,Qy=45,da=58,Jy=61,t0=62,e0=63,r0=64,su=91,ou=93,i0=96,lu=123,a0=124,cu=125,jt={};jt[0]="\\0";jt[7]="\\a";jt[8]="\\b";jt[9]="\\t";jt[10]="\\n";jt[11]="\\v";jt[12]="\\f";jt[13]="\\r";jt[27]="\\e";jt[34]='\\"';jt[92]="\\\\";jt[133]="\\N";jt[160]="\\_";jt[8232]="\\L";jt[8233]="\\P";var n0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],s0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function hu(e,t){var r,i,a,n,o,s,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,n=i.length;a<n;a+=1)o=i[a],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&au.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}d(hu,"compileStyleMap");function uu(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 Jt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Bt.repeat("0",i-t.length)+t}d(uu,"encodeHex");var o0=1,ui=2;function du(e){this.schema=e.schema||Oh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Bt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=hu(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==='"'?ui:o0,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}d(du,"State");function Yn(e,t){for(var r=Bt.repeat(" ",t),i=0,a=-1,n="",o,s=e.length;i<s;)a=e.indexOf(`
|
|
99
|
+
`,i),a===-1?(o=e.slice(i),i=s):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
|
|
100
|
+
`&&(n+=r),n+=o;return n}d(Yn,"indentString");function fa(e,t){return`
|
|
101
|
+
`+Bt.repeat(" ",e.indent*t)}d(fa,"generateNextLine");function fu(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}d(fu,"testImplicitResolving");function di(e){return e===Yy||e===Hy}d(di,"isWhitespace");function Or(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Is||65536<=e&&e<=1114111}d(Or,"isPrintable");function Un(e){return Or(e)&&e!==Is&&e!==jy&&e!==hi}d(Un,"isNsCharOrWhitespace");function Gn(e,t,r){var i=Un(e),a=i&&!di(e);return(r?i:i&&e!==nu&&e!==su&&e!==ou&&e!==lu&&e!==cu)&&e!==jn&&!(t===da&&!a)||Un(t)&&!di(t)&&e===jn||t===da&&a}d(Gn,"isPlainSafe");function pu(e){return Or(e)&&e!==Is&&!di(e)&&e!==Qy&&e!==e0&&e!==da&&e!==nu&&e!==su&&e!==ou&&e!==lu&&e!==cu&&e!==jn&&e!==Xy&&e!==Zy&&e!==Uy&&e!==a0&&e!==Jy&&e!==t0&&e!==Ky&&e!==Gy&&e!==Vy&&e!==r0&&e!==i0}d(pu,"isPlainSafeFirst");function gu(e){return!di(e)&&e!==da}d(gu,"isPlainSafeLast");function Tr(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}d(Tr,"codePointAt");function Ps(e){var t=/^\n* /;return t.test(e)}d(Ps,"needIndentIndicator");var mu=1,Vn=2,yu=3,xu=4,vr=5;function bu(e,t,r,i,a,n,o,s){var l,c=0,h=null,u=!1,f=!1,p=i!==-1,g=-1,m=pu(Tr(e,0))&&gu(Tr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Tr(e,l),!Or(c))return vr;m=m&&Gn(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Tr(e,l),c===hi)u=!0,p&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Or(c))return vr;m=m&&Gn(c,h,s),h=c}f=f||p&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!a(e)?mu:n===ui?vr:Vn:r>9&&Ps(e)?vr:o?n===ui?vr:Vn:f?xu:yu}d(bu,"chooseScalarStyle");function Cu(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===ui?'""':"''";if(!e.noCompatMode&&(n0.indexOf(t)!==-1||s0.test(t)))return e.quotingType===ui?'"'+t+'"':"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return fu(e,c)}switch(d(l,"testAmbiguity"),bu(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,a)){case mu:return t;case Vn:return"'"+t.replace(/'/g,"''")+"'";case yu:return"|"+Xn(t,e.indent)+Kn(Yn(t,n));case xu:return">"+Xn(t,e.indent)+Kn(Yn(_u(t,o),n));case vr:return'"'+Su(t)+'"';default:throw new Jt("impossible error: invalid scalar style")}})()}d(Cu,"writeScalar");function Xn(e,t){var r=Ps(e)?String(t):"",i=e[e.length-1]===`
|
|
102
|
+
`,a=i&&(e[e.length-2]===`
|
|
103
|
+
`||e===`
|
|
104
|
+
`),n=a?"+":i?"":"-";return r+n+`
|
|
105
|
+
`}d(Xn,"blockHeader");function Kn(e){return e[e.length-1]===`
|
|
106
|
+
`?e.slice(0,-1):e}d(Kn,"dropEndingNewline");function _u(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|
107
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,Zn(e.slice(0,c),t)})(),a=e[0]===`
|
|
108
|
+
`||e[0]===" ",n,o;o=r.exec(e);){var s=o[1],l=o[2];n=l[0]===" ",i+=s+(!a&&!n&&l!==""?`
|
|
109
|
+
`:"")+Zn(l,t),a=n}return i}d(_u,"foldString");function Zn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,n,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-a>t&&(n=o>a?o:s,l+=`
|
|
110
|
+
`+e.slice(a,n),a=n+1),o=s;return l+=`
|
|
111
|
+
`,e.length-a>t&&o>a?l+=e.slice(a,o)+`
|
|
112
|
+
`+e.slice(o+1):l+=e.slice(a),l.slice(1)}d(Zn,"foldLine");function Su(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Tr(e,a),i=jt[r],!i&&Or(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||uu(r);return t}d(Su,"escapeString");function wu(e,t,r){var i="",a=e.tag,n,o,s;for(n=0,o=r.length;n<o;n+=1)s=r[n],e.replacer&&(s=e.replacer.call(r,String(n),s)),(Ce(e,t,s,!1,!1)||typeof s>"u"&&Ce(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}d(wu,"writeFlowSequence");function Qn(e,t,r,i){var a="",n=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)),(Ce(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ce(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=fa(e,t)),e.dump&&hi===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=n,e.dump=a||"[]"}d(Qn,"writeBlockSequence");function vu(e,t,r){var i="",a=e.tag,n=Object.keys(r),o,s,l,c,h;for(o=0,s=n.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=n[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Ce(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ce(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}d(vu,"writeFlowMapping");function ku(e,t,r,i){var a="",n=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 Jt("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)f="",(!i||a!=="")&&(f+=fa(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Ce(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&hi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=fa(e,t)),Ce(e,t+1,h,!0,u)&&(e.dump&&hi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,a+=f));e.tag=n,e.dump=a||"{}"}d(ku,"writeBlockMapping");function Jn(e,t,r){var i,a,n,o,s,l;for(a=r?e.explicitTypes:e.implicitTypes,n=0,o=a.length;n<o;n+=1)if(s=a[n],(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,iu.call(s.represent)==="[object Function]")i=s.represent(t,l);else if(au.call(s.represent,l))i=s.represent[l](t,l);else throw new Jt("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}d(Jn,"detectType");function Ce(e,t,r,i,a,n,o){e.tag=null,e.dump=r,Jn(e,r,!1)||Jn(e,r,!0);var s=iu.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)&&(a=!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?(ku(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(vu(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?Qn(e,t-1,e.dump,a):Qn(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(wu(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Cu(e,e.dump,t,n,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Jt("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}d(Ce,"writeNode");function Tu(e,t){var r=[],i=[],a,n;for(pa(e,r,i),a=0,n=i.length;a<n;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(n)}d(Tu,"getDuplicateReferences");function pa(e,t,r){var i,a,n;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,n=e.length;a<n;a+=1)pa(e[a],t,r);else for(i=Object.keys(e),a=0,n=i.length;a<n;a+=1)pa(e[i[a]],t,r)}d(pa,"inspectNode");function l0(e,t){t=t||{};var r=new du(t);r.noRefs||Tu(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ce(r,0,i,!0,!0)?r.dump+`
|
|
113
|
+
`:""}d(l0,"dump$1");function c0(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.")}}d(c0,"renamed");var h0=yh,u0=qy.load;/*! Bundled license information:
|
|
114
|
+
|
|
115
|
+
js-yaml/dist/js-yaml.mjs:
|
|
116
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
117
|
+
*/var Wt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},cl={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function ti(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Ct(e),t=Ct(t);const[r,i]=[e.x,e.y],[a,n]=[t.x,t.y],o=a-r,s=n-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}d(ti,"calculateDeltaAndAngle");var Ct=d(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),d0=d(e=>({x:d(function(t,r,i){let a=0;const n=Ct(i[0]).x<Ct(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Wt,e.arrowTypeStart)){const{angle:p,deltaX:g}=ti(i[0],i[1]);a=Wt[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Wt,e.arrowTypeEnd)){const{angle:p,deltaX:g}=ti(i[i.length-1],i[i.length-2]);a=Wt[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const o=Math.abs(Ct(t).x-Ct(i[i.length-1]).x),s=Math.abs(Ct(t).y-Ct(i[i.length-1]).y),l=Math.abs(Ct(t).x-Ct(i[0]).x),c=Math.abs(Ct(t).y-Ct(i[0]).y),h=Wt[e.arrowTypeStart],u=Wt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let p=u+f-o;p*=n==="right"?-1:1,a-=p}if(l<h&&l>0&&c<h){let p=h+f-l;p*=n==="right"?-1:1,a+=p}return Ct(t).x+a},"x"),y:d(function(t,r,i){let a=0;const n=Ct(i[0]).y<Ct(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Wt,e.arrowTypeStart)){const{angle:p,deltaY:g}=ti(i[0],i[1]);a=Wt[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Wt,e.arrowTypeEnd)){const{angle:p,deltaY:g}=ti(i[i.length-1],i[i.length-2]);a=Wt[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const o=Math.abs(Ct(t).y-Ct(i[i.length-1]).y),s=Math.abs(Ct(t).x-Ct(i[i.length-1]).x),l=Math.abs(Ct(t).y-Ct(i[0]).y),c=Math.abs(Ct(t).x-Ct(i[0]).x),h=Wt[e.arrowTypeStart],u=Wt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let p=u+f-o;p*=n==="up"?-1:1,a-=p}if(l<h&&l>0&&c<h){let p=h+f-l;p*=n==="up"?-1:1,a+=p}return Ct(t).y+a},"y")}),"getLineFunctionsWithOffset"),Rs=d(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),f0=d(e=>{const{handDrawnSeed:t}=pt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Rr=d(e=>{const t=p0([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),p0=d(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a?.trim())}),t},"styles2Map"),Lu=d(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"),X=d(e=>{const{stylesArray:t}=Rr(e),r=[],i=[],a=[],n=[];return t.forEach(o=>{const s=o[0];Lu(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&a.push(o.join(":")+" !important"),s==="fill"&&n.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:n}},"styles2String"),V=d((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=pt(),{nodeBorder:a,mainBkg:n}=r,{stylesMap:o}=Rr(e);return Object.assign({roughness:.7,fill:o.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:g0(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),g0=d(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Bu={},Ft={};Object.defineProperty(Ft,"__esModule",{value:!0});Ft.BLANK_URL=Ft.relativeFirstCharacters=Ft.whitespaceEscapeCharsRegex=Ft.urlSchemeRegex=Ft.ctrlCharactersRegex=Ft.htmlCtrlEntityRegex=Ft.htmlEntitiesRegex=Ft.invalidProtocolRegex=void 0;Ft.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Ft.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Ft.htmlCtrlEntityRegex=/&(newline|tab);/gi;Ft.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Ft.urlSchemeRegex=/^.+(:|:)/gim;Ft.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Ft.relativeFirstCharacters=[".","/"];Ft.BLANK_URL="about:blank";Object.defineProperty(Bu,"__esModule",{value:!0});var m0=Bu.sanitizeUrl=C0,Nt=Ft;function y0(e){return Nt.relativeFirstCharacters.indexOf(e[0])>-1}function x0(e){var t=e.replace(Nt.ctrlCharactersRegex,"");return t.replace(Nt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function b0(e){return URL.canParse(e)}function hl(e){try{return decodeURIComponent(e)}catch{return e}}function C0(e){if(!e)return Nt.BLANK_URL;var t,r=hl(e.trim());do r=x0(r).replace(Nt.htmlCtrlEntityRegex,"").replace(Nt.ctrlCharactersRegex,"").replace(Nt.whitespaceEscapeCharsRegex,"").trim(),r=hl(r),t=r.match(Nt.ctrlCharactersRegex)||r.match(Nt.htmlEntitiesRegex)||r.match(Nt.htmlCtrlEntityRegex)||r.match(Nt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Nt.BLANK_URL;if(y0(i))return i;var a=i.trimStart(),n=a.match(Nt.urlSchemeRegex);if(!n)return i;var o=n[0].toLowerCase().trim();if(Nt.invalidProtocolRegex.test(o))return Nt.BLANK_URL;var s=a.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return s;if(o==="http:"||o==="https:"){if(!b0(s))return Nt.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s}var Au=typeof global=="object"&&global&&global.Object===Object&&global,_0=typeof self=="object"&&self&&self.Object===Object&&self,_e=Au||_0||Function("return this")(),ga=_e.Symbol,Mu=Object.prototype,S0=Mu.hasOwnProperty,w0=Mu.toString,Xr=ga?ga.toStringTag:void 0;function v0(e){var t=S0.call(e,Xr),r=e[Xr];try{e[Xr]=void 0;var i=!0}catch{}var a=w0.call(e);return i&&(t?e[Xr]=r:delete e[Xr]),a}var k0=Object.prototype,T0=k0.toString;function L0(e){return T0.call(e)}var B0="[object Null]",A0="[object Undefined]",ul=ga?ga.toStringTag:void 0;function Nr(e){return e==null?e===void 0?A0:B0:ul&&ul in Object(e)?v0(e):L0(e)}function hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var M0="[object AsyncFunction]",E0="[object Function]",F0="[object GeneratorFunction]",$0="[object Proxy]";function Ns(e){if(!hr(e))return!1;var t=Nr(e);return t==E0||t==F0||t==M0||t==$0}var bn=_e["__core-js_shared__"],dl=(function(){var e=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function O0(e){return!!dl&&dl in e}var D0=Function.prototype,I0=D0.toString;function ur(e){if(e!=null){try{return I0.call(e)}catch{}try{return e+""}catch{}}return""}var P0=/[\\^$.*+?()[\]{}|]/g,R0=/^\[object .+?Constructor\]$/,N0=Function.prototype,W0=Object.prototype,z0=N0.toString,q0=W0.hasOwnProperty,H0=RegExp("^"+z0.call(q0).replace(P0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function j0(e){if(!hr(e)||O0(e))return!1;var t=Ns(e)?H0:R0;return t.test(ur(e))}function Y0(e,t){return e?.[t]}function dr(e,t){var r=Y0(e,t);return j0(r)?r:void 0}var fi=dr(Object,"create");function U0(){this.__data__=fi?fi(null):{},this.size=0}function G0(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var V0="__lodash_hash_undefined__",X0=Object.prototype,K0=X0.hasOwnProperty;function Z0(e){var t=this.__data__;if(fi){var r=t[e];return r===V0?void 0:r}return K0.call(t,e)?t[e]:void 0}var Q0=Object.prototype,J0=Q0.hasOwnProperty;function tx(e){var t=this.__data__;return fi?t[e]!==void 0:J0.call(t,e)}var ex="__lodash_hash_undefined__";function rx(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fi&&t===void 0?ex:t,this}function lr(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])}}lr.prototype.clear=U0;lr.prototype.delete=G0;lr.prototype.get=Z0;lr.prototype.has=tx;lr.prototype.set=rx;function ix(){this.__data__=[],this.size=0}function Da(e,t){return e===t||e!==e&&t!==t}function Ia(e,t){for(var r=e.length;r--;)if(Da(e[r][0],t))return r;return-1}var ax=Array.prototype,nx=ax.splice;function sx(e){var t=this.__data__,r=Ia(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():nx.call(t,r,1),--this.size,!0}function ox(e){var t=this.__data__,r=Ia(t,e);return r<0?void 0:t[r][1]}function lx(e){return Ia(this.__data__,e)>-1}function cx(e,t){var r=this.__data__,i=Ia(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ae(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])}}Ae.prototype.clear=ix;Ae.prototype.delete=sx;Ae.prototype.get=ox;Ae.prototype.has=lx;Ae.prototype.set=cx;var pi=dr(_e,"Map");function hx(){this.size=0,this.__data__={hash:new lr,map:new(pi||Ae),string:new lr}}function ux(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pa(e,t){var r=e.__data__;return ux(t)?r[typeof t=="string"?"string":"hash"]:r.map}function dx(e){var t=Pa(this,e).delete(e);return this.size-=t?1:0,t}function fx(e){return Pa(this,e).get(e)}function px(e){return Pa(this,e).has(e)}function gx(e,t){var r=Pa(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function qe(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])}}qe.prototype.clear=hx;qe.prototype.delete=dx;qe.prototype.get=fx;qe.prototype.has=px;qe.prototype.set=gx;var mx="Expected a function";function _i(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(mx);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],n=r.cache;if(n.has(a))return n.get(a);var o=e.apply(this,i);return r.cache=n.set(a,o)||n,o};return r.cache=new(_i.Cache||qe),r}_i.Cache=qe;function yx(){this.__data__=new Ae,this.size=0}function xx(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function bx(e){return this.__data__.get(e)}function Cx(e){return this.__data__.has(e)}var _x=200;function Sx(e,t){var r=this.__data__;if(r instanceof Ae){var i=r.__data__;if(!pi||i.length<_x-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new qe(i)}return r.set(e,t),this.size=r.size,this}function Wr(e){var t=this.__data__=new Ae(e);this.size=t.size}Wr.prototype.clear=yx;Wr.prototype.delete=xx;Wr.prototype.get=bx;Wr.prototype.has=Cx;Wr.prototype.set=Sx;var ma=(function(){try{var e=dr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Ws(e,t,r){t=="__proto__"&&ma?ma(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ts(e,t,r){(r!==void 0&&!Da(e[t],r)||r===void 0&&!(t in e))&&Ws(e,t,r)}function wx(e){return function(t,r,i){for(var a=-1,n=Object(t),o=i(t),s=o.length;s--;){var l=o[++a];if(r(n[l],l,n)===!1)break}return t}}var vx=wx(),Eu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fl=Eu&&typeof module=="object"&&module&&!module.nodeType&&module,kx=fl&&fl.exports===Eu,pl=kx?_e.Buffer:void 0,gl=pl?pl.allocUnsafe:void 0;function Tx(e,t){if(t)return e.slice();var r=e.length,i=gl?gl(r):new e.constructor(r);return e.copy(i),i}var ml=_e.Uint8Array;function Lx(e){var t=new e.constructor(e.byteLength);return new ml(t).set(new ml(e)),t}function Bx(e,t){var r=t?Lx(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ax(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var yl=Object.create,Mx=(function(){function e(){}return function(t){if(!hr(t))return{};if(yl)return yl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Fu(e,t){return function(r){return e(t(r))}}var $u=Fu(Object.getPrototypeOf,Object),Ex=Object.prototype;function Ra(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ex;return e===r}function Fx(e){return typeof e.constructor=="function"&&!Ra(e)?Mx($u(e)):{}}function Si(e){return e!=null&&typeof e=="object"}var $x="[object Arguments]";function xl(e){return Si(e)&&Nr(e)==$x}var Ou=Object.prototype,Ox=Ou.hasOwnProperty,Dx=Ou.propertyIsEnumerable,ya=xl((function(){return arguments})())?xl:function(e){return Si(e)&&Ox.call(e,"callee")&&!Dx.call(e,"callee")},xa=Array.isArray,Ix=9007199254740991;function Du(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ix}function Na(e){return e!=null&&Du(e.length)&&!Ns(e)}function Px(e){return Si(e)&&Na(e)}function Rx(){return!1}var Iu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bl=Iu&&typeof module=="object"&&module&&!module.nodeType&&module,Nx=bl&&bl.exports===Iu,Cl=Nx?_e.Buffer:void 0,Wx=Cl?Cl.isBuffer:void 0,zs=Wx||Rx,zx="[object Object]",qx=Function.prototype,Hx=Object.prototype,Pu=qx.toString,jx=Hx.hasOwnProperty,Yx=Pu.call(Object);function Ux(e){if(!Si(e)||Nr(e)!=zx)return!1;var t=$u(e);if(t===null)return!0;var r=jx.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Pu.call(r)==Yx}var Gx="[object Arguments]",Vx="[object Array]",Xx="[object Boolean]",Kx="[object Date]",Zx="[object Error]",Qx="[object Function]",Jx="[object Map]",tb="[object Number]",eb="[object Object]",rb="[object RegExp]",ib="[object Set]",ab="[object String]",nb="[object WeakMap]",sb="[object ArrayBuffer]",ob="[object DataView]",lb="[object Float32Array]",cb="[object Float64Array]",hb="[object Int8Array]",ub="[object Int16Array]",db="[object Int32Array]",fb="[object Uint8Array]",pb="[object Uint8ClampedArray]",gb="[object Uint16Array]",mb="[object Uint32Array]",yt={};yt[lb]=yt[cb]=yt[hb]=yt[ub]=yt[db]=yt[fb]=yt[pb]=yt[gb]=yt[mb]=!0;yt[Gx]=yt[Vx]=yt[sb]=yt[Xx]=yt[ob]=yt[Kx]=yt[Zx]=yt[Qx]=yt[Jx]=yt[tb]=yt[eb]=yt[rb]=yt[ib]=yt[ab]=yt[nb]=!1;function yb(e){return Si(e)&&Du(e.length)&&!!yt[Nr(e)]}function xb(e){return function(t){return e(t)}}var Ru=typeof exports=="object"&&exports&&!exports.nodeType&&exports,li=Ru&&typeof module=="object"&&module&&!module.nodeType&&module,bb=li&&li.exports===Ru,Cn=bb&&Au.process,_l=(function(){try{var e=li&&li.require&&li.require("util").types;return e||Cn&&Cn.binding&&Cn.binding("util")}catch{}})(),Sl=_l&&_l.isTypedArray,qs=Sl?xb(Sl):yb;function es(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Cb=Object.prototype,_b=Cb.hasOwnProperty;function Sb(e,t,r){var i=e[t];(!(_b.call(e,t)&&Da(i,r))||r===void 0&&!(t in e))&&Ws(e,t,r)}function wb(e,t,r,i){var a=!r;r||(r={});for(var n=-1,o=t.length;++n<o;){var s=t[n],l=void 0;l===void 0&&(l=e[s]),a?Ws(r,s,l):Sb(r,s,l)}return r}function vb(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var kb=9007199254740991,Tb=/^(?:0|[1-9]\d*)$/;function Nu(e,t){var r=typeof e;return t=t??kb,!!t&&(r=="number"||r!="symbol"&&Tb.test(e))&&e>-1&&e%1==0&&e<t}var Lb=Object.prototype,Bb=Lb.hasOwnProperty;function Ab(e,t){var r=xa(e),i=!r&&ya(e),a=!r&&!i&&zs(e),n=!r&&!i&&!a&&qs(e),o=r||i||a||n,s=o?vb(e.length,String):[],l=s.length;for(var c in e)(t||Bb.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||n&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Nu(c,l)))&&s.push(c);return s}function Mb(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Eb=Object.prototype,Fb=Eb.hasOwnProperty;function $b(e){if(!hr(e))return Mb(e);var t=Ra(e),r=[];for(var i in e)i=="constructor"&&(t||!Fb.call(e,i))||r.push(i);return r}function Wu(e){return Na(e)?Ab(e,!0):$b(e)}function Ob(e){return wb(e,Wu(e))}function Db(e,t,r,i,a,n,o){var s=es(e,r),l=es(t,r),c=o.get(l);if(c){ts(e,r,c);return}var h=n?n(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=xa(l),p=!f&&zs(l),g=!f&&!p&&qs(l);h=l,f||p||g?xa(s)?h=s:Px(s)?h=Ax(s):p?(u=!1,h=Tx(l,!0)):g?(u=!1,h=Bx(l,!0)):h=[]:Ux(l)||ya(l)?(h=s,ya(s)?h=Ob(s):(!hr(s)||Ns(s))&&(h=Fx(l))):u=!1}u&&(o.set(l,h),a(h,l,i,n,o),o.delete(l)),ts(e,r,h)}function zu(e,t,r,i,a){e!==t&&vx(t,function(n,o){if(a||(a=new Wr),hr(n))Db(e,t,o,r,zu,i,a);else{var s=i?i(es(e,o),n,o+"",e,t,a):void 0;s===void 0&&(s=n),ts(e,o,s)}},Wu)}function qu(e){return e}function Ib(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 wl=Math.max;function Pb(e,t,r){return t=wl(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,n=wl(i.length-t,0),o=Array(n);++a<n;)o[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=r(o),Ib(e,this,s)}}function Rb(e){return function(){return e}}var Nb=ma?function(e,t){return ma(e,"toString",{configurable:!0,enumerable:!1,value:Rb(t),writable:!0})}:qu,Wb=800,zb=16,qb=Date.now;function Hb(e){var t=0,r=0;return function(){var i=qb(),a=zb-(i-r);if(r=i,a>0){if(++t>=Wb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var jb=Hb(Nb);function Yb(e,t){return jb(Pb(e,t,qu),e+"")}function Ub(e,t,r){if(!hr(r))return!1;var i=typeof t;return(i=="number"?Na(r)&&Nu(t,r.length):i=="string"&&t in r)?Da(r[t],e):!1}function Gb(e){return Yb(function(t,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(n=e.length>3&&typeof n=="function"?(a--,n):void 0,o&&Ub(r[0],r[1],o)&&(n=a<3?void 0:n,a=1),t=Object(t);++i<a;){var s=r[i];s&&e(t,s,i,n)}return t})}var Vb=Gb(function(e,t,r){zu(e,t,r)}),Xb="",Kb={curveBasis:Ui,curveBasisClosed:Km,curveBasisOpen:Zm,curveBumpX:Tc,curveBumpY:Lc,curveBundle:Qm,curveCardinalClosed:Jm,curveCardinalOpen:ty,curveCardinal:Ec,curveCatmullRomClosed:ey,curveCatmullRomOpen:ry,curveCatmullRom:$c,curveLinear:na,curveLinearClosed:iy,curveMonotoneX:Nc,curveMonotoneY:Wc,curveNatural:qc,curveStep:Hc,curveStepAfter:Yc,curveStepBefore:jc},Zb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Qb=d(function(e,t){const r=Hu(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);ta(o),i=Lt(i,[...o])}else i=r.args;if(!i)return;let a=bs(e,t);const n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),Hu=d(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${Zb.source})(?=[}][%]{2}).*
|
|
118
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),O.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const a=[];for(;(i=si.exec(e))!==null;)if(i.index===si.lastIndex&&si.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const n=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:n,args:o})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(r){return O.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Jb=d(function(e){return e.replace(si,"")},"removeDirectives"),t2=d(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Hs(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Kb[r]??t}d(Hs,"interpolateToCurve");function ju(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?m0(r):r}d(ju,"formatUrl");var e2=d((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n){O.error(`Function name: ${e} not found in window`);return}n[a](...t)},"runFunc");function js(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}d(js,"distance");function Yu(e){let t,r=0;e.forEach(a=>{r+=js(a,t),t=a});const i=r/2;return Ys(e,i)}d(Yu,"traverseEdge");function Uu(e){return e.length===1?e[0]:Yu(e)}d(Uu,"calcLabelPosition");var vl=d((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ys=d((e,t)=>{let r,i=t;for(const a of e){if(r){const n=js(a,r);if(n===0)return r;if(n<i)i-=n;else{const o=i/n;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:vl((1-o)*r.x+o*a.x,5),y:vl((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),r2=d((e,t,r)=>{O.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Ys(t,25),n=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),s={x:0,y:0};return s.x=Math.sin(o)*n+(t[0].x+a.x)/2,s.y=-Math.cos(o)*n+(t[0].y+a.y)/2,s},"calcCardinalityPosition");function Gu(e,t,r){const i=structuredClone(r);O.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,n=Ys(i,a),o=10+e*.5,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+n.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+n.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+n.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+n.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+n.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+n.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+n.x)/2,l.y=-Math.cos(s)*o+(i[0].y+n.y)/2),l}d(Gu,"calcTerminalLabelPosition");function Vu(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}}d(Vu,"getStylesFromArray");var kl=0,i2=d(()=>(kl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+kl),"generateId");function Xu(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}d(Xu,"makeRandomHex");var a2=d(e=>Xu(e.length),"random"),n2=d(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"),s2=d(function(e,t){const r=t.text.replace(Pr.lineBreakRegex," "),[,i]=Wa(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const n=a.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.attr("fill",t.fill),n.text(r),a},"drawSimpleText"),o2=_i((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Pr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let n="";return i.forEach((o,s)=>{const l=Le(`${o} `,r),c=Le(n,r);if(l>t){const{hyphenatedStrings:f,remainingWord:p}=l2(o,t,"-",r);a.push(n,...f),n=p}else c+l>=t?(a.push(n),n=o):n=[n,o].filter(Boolean).join(" ");s+1===i.length&&a.push(n)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),l2=_i((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],n=[];let o="";return a.forEach((s,l)=>{const c=`${o}${s}`;if(Le(c,i)>=t){const u=l+1,f=a.length===u,p=`${c}${r}`;n.push(f?c:p),o=""}else o=c}),{hyphenatedStrings:n,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Ku(e,t){return Us(e,t).height}d(Ku,"calculateTextHeight");function Le(e,t){return Us(e,t).width}d(Le,"calculateTextWidth");var Us=_i((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,n]=Wa(r),o=["sans-serif",i],s=e.split(Pr.lineBreakRegex),l=[],c=ut("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let p=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=n2();y.text=m||Xb;const x=s2(h,y).style("font-size",n).style("font-weight",a).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)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}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}`),c2=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{d(this,"InitIDGenerator")}},Ri,h2=d(function(e){return Ri=Ri||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ri.innerHTML=e,unescape(Ri.textContent)},"entityDecode");function Gs(e){return"str"in e}d(Gs,"isDetailedError");var u2=d((e,t,r,i)=>{if(!i)return;const a=e.node()?.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Wa=d(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 Vs(e,t){return Vb({},e,t)}d(Vs,"cleanAndMerge");var oe={assignWithDepth:Lt,wrapLabel:o2,calculateTextHeight:Ku,calculateTextWidth:Le,calculateTextDimensions:Us,cleanAndMerge:Vs,detectInit:Qb,detectDirective:Hu,isSubstringInArray:t2,interpolateToCurve:Hs,calcLabelPosition:Uu,calcCardinalityPosition:r2,calcTerminalLabelPosition:Gu,formatUrl:ju,getStylesFromArray:Vu,generateId:i2,random:a2,runFunc:e2,entityDecode:h2,insertTitle:u2,isLabelCoordinateInPath:Zu,parseFontSize:Wa,InitIDGenerator:c2},d2=d(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"),fr=d(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Aw=d((e,t,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Ht(e){return e??null}d(Ht,"handleUndefinedAttr");function Zu(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,n=>Math.round(parseFloat(n)).toString());return a.includes(r.toString())||a.includes(i.toString())}d(Zu,"isLabelCoordinateInPath");const f2=Object.freeze({left:0,top:0,width:16,height:16}),ba=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qu=Object.freeze({...f2,...ba}),p2=Object.freeze({...Qu,body:"",hidden:!1}),g2=Object.freeze({width:null,height:null}),m2=Object.freeze({...g2,...ba}),y2=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const s=a.pop(),l=a.pop(),c={provider:a.length>0?a[0]:i,prefix:l,name:s};return _n(c)?c:null}const n=a[0],o=n.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return _n(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:n};return _n(s,r)?s:null}return null},_n=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function x2(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 Tl(e,t){const r=x2(e,t);for(const i in p2)i in ba?i in e&&!(i in r)&&(r[i]=ba[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function b2(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function n(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const s=i[o]&&i[o].parent,l=s&&n(s);l&&(a[o]=[s].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(n),a}function Ll(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let n={};function o(s){n=Tl(i[s]||a[s],n)}return o(t),r.forEach(o),Tl(e,n)}function C2(e,t){if(e.icons[t])return Ll(e,t,[]);const r=b2(e,[t])[t];return r?Ll(e,t,r):null}const _2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,S2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Bl(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(_2);if(i===null||!i.length)return e;const a=[];let n=i.shift(),o=S2.test(n);for(;;){if(o){const s=parseFloat(n);isNaN(s)?a.push(n):a.push(Math.ceil(s*t*r)/r)}else a.push(n);if(n=i.shift(),n===void 0)return a.join("");o=!o}}function w2(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),n=e.indexOf("</"+t);if(a===-1||n===-1)break;const o=e.indexOf(">",n);if(o===-1)break;r+=e.slice(a+1,n).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function v2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function k2(e,t,r){const i=w2(e);return v2(i.defs,t+i.content+r)}const T2=e=>e==="unset"||e==="undefined"||e==="none";function L2(e,t){const r={...Qu,...e},i={...m2,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let k;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:k=a.height/2+a.top,y.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:k=a.width/2+a.left,y.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}_%2===1&&(a.left!==a.top&&(k=a.left,a.left=a.top,a.top=k),a.width!==a.height&&(k=a.width,a.width=a.height,a.height=k)),y.length&&(n=k2(n,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,l=a.width,c=a.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=Bl(u,l/c)):(h=o==="auto"?l:o,u=s===null?Bl(h,c/l):s==="auto"?c:s);const f={},p=(m,y)=>{T2(y)||(f[m]=y.toString())};p("width",h),p("height",u);const g=[a.left,a.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:n}}const B2=/\sid="(\S+)"/g,Al=new Map;function A2(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Al.get(e)||0;return Al.set(e,t+1),t?`${e}${t}`:e}function M2(e){const t=[];let r;for(;r=B2.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const n=A2(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+n+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function E2(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 Ju(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 a=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(a.length){var n=new RegExp(`
|
|
119
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(s){return s.replace(n,`
|
|
120
|
+
`)})}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(`
|
|
121
|
+
`)&&(u=String(s).split(`
|
|
122
|
+
`).map(function(f,p){return p===0?f:""+h+f}).join(`
|
|
123
|
+
`)),o+=u+i[l+1]}),o}var F2={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},rs=new Map,td=new Map,$2=d(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(O.debug("Registering icon pack:",t.name),"loader"in t)td.set(t.name,t.loader);else if("icons"in t)rs.set(t.name,t.icons);else throw O.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),ed=d(async(e,t)=>{const r=y2(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 a=rs.get(i);if(!a){const o=td.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},rs.set(i,a)}catch(s){throw O.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=C2(a,r.name);if(!n)throw new Error(`Icon not found: ${e}`);return n},"getRegisteredIconData"),O2=d(async e=>{try{return await ed(e),!0}catch{return!1}},"isIconAvailable"),wi=d(async(e,t,r)=>{let i;try{i=await ed(e,t?.fallbackPrefix)}catch(o){O.error(o),i=F2}const a=L2(i,t),n=E2(M2(a.body),{...a.attributes,...r});return ne(n,zt())},"getIconSVG");function rd(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
124
|
+
`).replace(/\n{2,}/g,`
|
|
125
|
+
`),a=Ju(i);return t===!1?a.replace(/ /g," "):a}d(rd,"preprocessMarkdown");function id(e,t={}){const r=rd(e,t),i=Jl.lexer(r),a=[[]];let n=0;function o(s,l="normal"){s.type==="text"?s.text.split(`
|
|
126
|
+
`).forEach((h,u)=>{u!==0&&(n++,a.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&a[n].push({content:f,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&a[n].push({content:s.text,type:"normal"})}return d(o,"processNode"),i.forEach(s=>{s.type==="paragraph"?s.tokens?.forEach(l=>{o(l)}):s.type==="html"?a[n].push({content:s.text,type:"normal"}):a[n].push({content:s.raw,type:"normal"})}),a}d(id,"markdownToLines");function ad(e,{markdownAutoWrap:t}={}){const r=Jl.lexer(e);function i(a){return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${a.tokens?.map(i).join("")}</strong>`:a.type==="em"?`<em>${a.tokens?.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${a.tokens?.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(O.warn(`Unsupported markdown: ${a.type}`),a.raw)}return d(i,"output"),r.map(i).join("")}d(ad,"markdownToHTML");function nd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}d(nd,"splitTextToChars");function sd(e,t){const r=nd(t.content);return Xs(e,[],r,t.type)}d(sd,"splitWordToFitWidth");function Xs(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...n]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?Xs(e,o,n,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}d(Xs,"splitWordToFitWidthRecursion");function od(e,t){if(e.some(({content:r})=>r.includes(`
|
|
127
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ca(e,t)}d(od,"splitLineToFitWidth");function Ca(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const n=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(n),t(o))return Ca(e,t,r,o);if(i.length>0)r.push(i),e.unshift(n);else if(n.content){const[s,l]=sd(t,n);r.push([s]),l.content&&e.unshift(l)}return Ca(e,t,r)}d(Ca,"splitLineToFitWidthRecursion");function is(e,t){t&&e.attr("style",t)}d(is,"applyStyle");async function ld(e,t,r,i,a=!1,n=zt()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),l=Fr(t.label)?await Cs(t.label.replace(Pr.lineBreakRegex,`
|
|
128
|
+
`),n):ne(t.label,n),c=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),is(h,t.labelStyle),h.attr("class",`${c} ${i}`),is(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),o.node()}d(ld,"addHtmlSpan");function za(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")}d(za,"createTspan");function cd(e,t,r){const i=e.append("text"),a=za(i,1,t);qa(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}d(cd,"computeWidthOfText");function D2(e,t,r){const i=e.append("text"),a=za(i,1,t);qa(a,[{content:r,type:"normal"}]);const n=a.node()?.getBoundingClientRect();return n&&i.remove(),n}d(D2,"computeDimensionOfText");function hd(e,t,r,i=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=d(f=>cd(n,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:od(c,h);for(const f of u){const p=za(s,l,1.1);qa(p,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),n.node()}else return s.node()}d(hd,"createFormattedText");function qa(e,t){e.text(""),t.forEach((r,i)=>{const a=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?a.text(r.content):a.text(" "+r.content)})}d(qa,"updateTextContentAndStyles");async function ud(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,n,o)=>(r.push((async()=>{const s=`${n}:${o}`;return await O2(s)?await wi(s,void 0,{class:"label-icon"}):`<i class='${ne(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}d(ud,"replaceIconSubstring");var He=d(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(O.debug("XYZ createText",t,r,i,a,n,o,"addSvgBackground: ",l),n){const h=ad(t,c),u=await ud(fr(h),c),f=t.replace(/\\\\/g,"\\"),p={isNode:o,label:Fr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await ld(e,p,s,a,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=id(h.replace("<br>","<br/>"),c),f=hd(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(f).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ut(f).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(f).select("text").attr("style",g)}return f}},"createText");function Sn(e,t,r){if(e&&e.length){const[i,a]=t,n=Math.PI/180*r,o=Math.cos(n),s=Math.sin(n);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-a)*s+i,l[1]=(c-i)*s+(h-a)*o+a}}}function I2(e,t){return e[0]===t[0]&&e[1]===t[1]}function P2(e,t,r,i=1){const a=r,n=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(a)for(const c of o)Sn(c,s,a);const l=(function(c,h,u){const f=[];for(const b of c){const _=[...b];I2(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const p=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_<b.length-1;_++){const k=b[_],S=b[_+1];if(k[1]!==S[1]){const A=Math.min(k[1],S[1]);g.push({ymin:A,ymax:Math.max(k[1],S[1]),x:A===k[1]?k[0]:S[0],islope:(S[0]-k[0])/(S[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 p;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,S=m[_].edge;p.push([[Math.round(k.x),y],[Math.round(S.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return p})(o,n,i);if(a){for(const c of o)Sn(c,s,-a);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),Sn(f,h,u)})(l,s,-a)}return l}function vi(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(n=a),P2(e,a,i,n||1)}class Ks{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=vi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function Ha(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 R2 extends Ks{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=vi(t,Object.assign({},r,{hachureGap:i})),n=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(n),l=.5*i*Math.sin(n);for(const[c,h]of a)Ha([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 N2 extends Ks{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),n=this._fillPolygons(t,a);return i.ops=i.ops.concat(n.ops),i}}class W2{constructor(t){this.helper=t}fillPolygons(t,r){const i=vi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const o=a/4;for(const s of t){const l=Ha(s),c=l/a,h=Math.ceil(c)-1,u=l-h*a,f=(s[0][0]+s[1][0])/2-a/4,p=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=p+u+g*a,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,n,n,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class z2{constructor(t){this.helper=t}fillPolygons(t,r){const i=vi(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,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,n=[];return t.forEach((o=>{const s=Ha(o),l=Math.floor(s/(i+a)),c=(s+a-l*(i+a))/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 p=0;p<l;p++){const g=p*(i+a),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)];n.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),n}}class q2{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,n=vi(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(n,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((n=>{const o=Ha(n),s=Math.round(o/(2*r));let l=n[0],c=n[1];l[0]>c[0]&&(l=n[1],c=n[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,p=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]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.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))}})),a}}const Kt={};class H2{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const j2=0,wn=1,Ml=2,Ni={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 vn(e,t){return e.type===t}function Zs(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:j2,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:wn,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Ml,text:""},s})(e);let i="BOD",a=0,n=r[a];for(;!vn(n,Ml);){let o=0;const s=[];if(i==="BOD"){if(n.text!=="M"&&n.text!=="m")return Zs("M0,0"+e);a++,o=Ni[n.text],i=n.text}else vn(n,wn)?o=Ni[i]:(a++,o=Ni[n.text],i=n.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const c=r[l];if(!vn(c,wn))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof Ni[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:s};t.push(l),a+=o,n=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function dd(e){let t=0,r=0,i=0,a=0;const n=[];for(const{key:o,data:s}of e)switch(o){case"M":n.push({key:"M",data:[...s]}),[t,r]=s,[i,a]=s;break;case"m":t+=s[0],r+=s[1],n.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":n.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],n.push({key:"L",data:[t,r]});break;case"C":n.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));n.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":n.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));n.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":n.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":n.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],n.push({key:"H",data:[t]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.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));n.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":n.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],n.push({key:"T",data:[t,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),t=i,r=a}return n}function fd(e){const t=[];let r="",i=0,a=0,n=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,a]=h,[n,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=a+(a-l)):(u=i,f=a),t.push({key:"C",data:[u,f,...h]}),s=h[0],l=h[1],i=h[2],a=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;r==="Q"||r==="T"?(p=i+(i-s),g=a+(a-l)):(p=i,g=a);const m=i+2*(p-i)/3,y=a+2*(g-a)/3,x=u+2*(p-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=p,l=g,i=u,a=f;break}case"Q":{const[u,f,p,g]=h,m=i+2*(u-i)/3,y=a+2*(f-a)/3,x=p+2*(u-p)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),s=u,l=f,i=p,a=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(pd(i,a,y,x,u,f,p,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=n,a=o}r=c}return t}function Kr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function pd(e,t,r,i,a,n,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],p=0,g=0,m=0,y=0;if(c)[p,g,m,y]=c;else{[e,t]=Kr(e,t,-h),[r,i]=Kr(r,i,-h);const N=(e-r)/2,B=(t-i)/2;let M=N*N/(a*a)+B*B/(n*n);M>1&&(M=Math.sqrt(M),a*=M,n*=M);const T=a*a,$=n*n,E=T*$-T*B*B-$*N*N,Y=T*B*B+$*N*N,K=(s===l?-1:1)*Math.sqrt(Math.abs(E/Y));m=K*a*B/n+(e+r)/2,y=K*-n*N/a+(t+i)/2,p=Math.asin(parseFloat(((t-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),e<m&&(p=Math.PI-p),r<m&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const N=g,B=r,M=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=pd(r=m+a*Math.cos(g),i=y+n*Math.sin(g),B,M,a,n,o,0,l,[g,N,m,y])}x=g-p;const b=Math.cos(p),_=Math.sin(p),k=Math.cos(g),S=Math.sin(g),A=Math.tan(x/4),L=4/3*a*A,P=4/3*n*A,R=[e,t],D=[e+L*_,t-P*b],F=[r+L*S,i-P*k],z=[r,i];if(D[0]=2*R[0]-D[0],D[1]=2*R[1]-D[1],c)return[D,F,z].concat(f);{f=[D,F,z].concat(f);const N=[];for(let B=0;B<f.length;B+=3){const M=Kr(f[B][0],f[B][1],h),T=Kr(f[B+1][0],f[B+1][1],h),$=Kr(f[B+2][0],f[B+2][1],h);N.push([M[0],M[1],T[0],T[1],$[0],$[1]])}return N}}const Y2={randOffset:function(e,t){return nt(e,t)},randOffsetWithRange:function(e,t,r){return _a(e,t,r)},ellipse:function(e,t,r,i,a){const n=md(r,i,a);return as(e,t,a,n).opset},doubleLineOps:function(e,t,r,i,a){return We(e,t,r,i,a,!0)}};function gd(e,t,r,i,a){return{type:"path",ops:We(e,t,r,i,a)}}function Xi(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let n=0;n<i-1;n++)a.push(...We(e[n][0],e[n][1],e[n+1][0],e[n+1][1],r));return t&&a.push(...We(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?gd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function U2(e,t,r,i,a){return(function(n,o){return Xi(n,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function El(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Wi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Wi(r[0],1.5*(1+.22*t.roughness),Ol(t));for(let n=1;n<r.length;n++){const o=r[n];if(o.length){const s=Wi(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Wi(o,1.5*(1+.22*t.roughness),Ol(t));for(const c of s)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&a.push(c)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function md(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let o=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return o+=nt(o*l,r),s+=nt(s*l,r),{increment:n,rx:o,ry:s}}function as(e,t,r,i){const[a,n]=Dl(i.increment,e,t,i.rx,i.ry,1,i.increment*_a(.1,_a(.4,1,r),r),r);let o=Sa(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Dl(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Sa(s,null,r);o=o.concat(l)}return{estimatedPoints:n,opset:{type:"path",ops:o}}}function Fl(e,t,r,i,a,n,o,s,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=nt(.01*u,l),f+=nt(.01*f,l);let p=a,g=n;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-p)/2),x=Il(y,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const b=Il(y,c,h,u,f,p,g,1.5,l);x.push(...b)}return o&&(s?x.push(...We(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...We(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(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function $l(e,t){const r=fd(dd(Zs(e))),i=[];let a=[0,0],n=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":n=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...We(n[0],n[1],s[0],s[1],t)),n=[s[0],s[1]];break;case"C":{const[l,c,h,u,f,p]=s;i.push(...G2(l,c,h,u,f,p,n,t)),n=[f,p];break}case"Z":i.push(...We(n[0],n[1],a[0],a[1],t)),n=[a[0],a[1]]}return{type:"path",ops:i}}function kn(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+nt(a,t),i[0][1]+nt(a,t)]});for(let o=1;o<n;o++)r.push({op:"lineTo",data:[i[o][0]+nt(a,t),i[o][1]+nt(a,t)]})}}return{type:"fillPath",ops:r}}function Sr(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Kt[a])switch(a){case"zigzag":Kt[a]||(Kt[a]=new R2(i));break;case"cross-hatch":Kt[a]||(Kt[a]=new N2(i));break;case"dots":Kt[a]||(Kt[a]=new W2(i));break;case"dashed":Kt[a]||(Kt[a]=new z2(i));break;case"zigzag-line":Kt[a]||(Kt[a]=new q2(i));break;default:a="hachure",Kt[a]||(Kt[a]=new Ks(i))}return Kt[a]})(t,Y2).fillPolygons(e,t)}function Ol(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function yd(e){return e.randomizer||(e.randomizer=new H2(e.seed||0)),e.randomizer.next()}function _a(e,t,r,i=1){return r.roughness*i*(yd(r)*(t-e)+e)}function nt(e,t,r=1){return _a(-e,e,t,r)}function We(e,t,r,i,a,n=!1){const o=n?a.disableMultiStrokeFill:a.disableMultiStroke,s=ns(e,t,r,i,a,!0,!1);if(o)return s;const l=ns(e,t,r,i,a,!0,!0);return s.concat(l)}function ns(e,t,r,i,a,n,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=a.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*yd(a);let p=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;p=nt(p,a,c),g=nt(g,a,c);const m=[],y=()=>nt(u,a,c),x=()=>nt(h,a,c),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,a,c)),t+(b?0:nt(h,a,c))]}),o?m.push({op:"bcurveTo",data:[p+e+(r-e)*f+y(),g+t+(i-t)*f+y(),p+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:[p+e+(r-e)*f+x(),g+t+(i-t)*f+x(),p+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Wi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]),i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+nt(t,r),e[a][1]+nt(t,r)]),a===e.length-1&&i.push([e[a][0]+nt(t,r),e[a][1]+nt(t,r)]);return Sa(i,null,r)}function Sa(e,t,r){const i=e.length,a=[];if(i>3){const n=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const l=e[s];n[0]=[l[0],l[1]],n[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],n[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],n[3]=[e[s+1][0],e[s+1][1]],a.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...ns(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Dl(e,t,r,i,a,n,o,s){const l=[],c=[];if(s.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+a*Math.sin(0)]),c.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=nt(.5,s)-Math.PI/2;c.push([nt(n,s)+t+.9*i*Math.cos(h-e),nt(n,s)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const p=[nt(n,s)+t+i*Math.cos(f),nt(n,s)+r+a*Math.sin(f)];l.push(p),c.push(p)}c.push([nt(n,s)+t+i*Math.cos(h+2*Math.PI+.5*o),nt(n,s)+r+a*Math.sin(h+2*Math.PI+.5*o)]),c.push([nt(n,s)+t+.98*i*Math.cos(h+o),nt(n,s)+r+.98*a*Math.sin(h+o)]),c.push([nt(n,s)+t+.9*i*Math.cos(h+.5*o),nt(n,s)+r+.9*a*Math.sin(h+.5*o)])}return[c,l]}function Il(e,t,r,i,a,n,o,s,l){const c=n+nt(.1,l),h=[];h.push([nt(s,l)+t+.9*i*Math.cos(c-e),nt(s,l)+r+.9*a*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([nt(s,l)+t+i*Math.cos(u),nt(s,l)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Sa(h,null,l)}function G2(e,t,r,i,a,n,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 p=0;p<u;p++)p===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:nt(c[0],s)),o[1]+(f?0:nt(c[0],s))]}),h=f?[a,n]:[a+nt(c[p],s),n+nt(c[p],s)],l.push({op:"bcurveTo",data:[e+nt(c[p],s),t+nt(c[p],s),r+nt(c[p],s),i+nt(c[p],s),h[0],h[1]]});return l}function Zr(e){return[...e]}function Pl(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(Zr(e[0]),Zr(e[1]),Zr(e[2]),Zr(e[2]));else{const a=[];a.push(e[0],e[0]);for(let s=1;s<e.length;s++)a.push(e[s]),s===e.length-1&&a.push(e[s]);const n=[],o=1-t;i.push(Zr(a[0]));for(let s=1;s+2<a.length;s++){const l=a[s];n[0]=[l[0],l[1]],n[1]=[l[0]+(o*a[s+1][0]-o*a[s-1][0])/6,l[1]+(o*a[s+1][1]-o*a[s-1][1])/6],n[2]=[a[s+1][0]+(o*a[s][0]-o*a[s+2][0])/6,a[s+1][1]+(o*a[s][1]-o*a[s+2][1])/6],n[3]=[a[s+1][0],a[s+1][1]],i.push(n[1],n[2],n[3])}}return i}function Ki(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function V2(e,t,r){const i=Ki(t,r);if(i===0)return Ki(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Ki(e,Je(t,r,a))}function Je(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function ss(e,t,r,i){const a=i||[];if((function(s,l){const c=s[l+0],h=s[l+1],u=s[l+2],f=s[l+3];let p=3*h[0]-2*c[0]-f[0];p*=p;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,p<m&&(p=m),g<y&&(g=y),p+g})(e,t)<r){const s=e[t+0];a.length?(n=a[a.length-1],o=s,Math.sqrt(Ki(n,o))>1&&a.push(s)):a.push(s),a.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),p=Je(c,h,.5),g=Je(h,u,.5),m=Je(f,p,.5),y=Je(p,g,.5),x=Je(m,y,.5);ss([l,f,m,x],0,r,a),ss([x,y,g,u],0,r,a)}var n,o;return a}function X2(e,t){return wa(e,0,e.length,t)}function wa(e,t,r,i,a){const n=a||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=V2(e[h],o,s);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(wa(e,t,c+1,i,n),wa(e,c,r,i,n)):(n.length||n.push(o),n.push(s)),n}function Tn(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let n=0;n<a;n++)ss(e,3*n,t,i);return r&&r>0?wa(i,0,i.length,r):i}const ee="none";class va{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,a,n){const o=this._o(n);return this._d("line",[gd(t,r,i,a,o)],o)}rectangle(t,r,i,a,n){const o=this._o(n),s=[],l=U2(t,r,i,a,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?s.push(kn([c],o)):s.push(Sr([c],o))}return o.stroke!==ee&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,a,n){const o=this._o(n),s=[],l=md(i,a,o),c=as(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=as(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(Sr([c.estimatedPoints],o));return o.stroke!==ee&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,a){const n=this.ellipse(t,r,i,i,a);return n.shape="circle",n}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Xi(t,!1,i)],i)}arc(t,r,i,a,n,o,s=!1,l){const c=this._o(l),h=[],u=Fl(t,r,i,a,n,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=Fl(t,r,i,a,n,o,!0,!1,f);p.type="fillPath",h.push(p)}else h.push((function(f,p,g,m,y,x,b){const _=f,k=p;let S=Math.abs(g/2),A=Math.abs(m/2);S+=nt(.01*S,b),A+=nt(.01*A,b);let L=y,P=x;for(;L<0;)L+=2*Math.PI,P+=2*Math.PI;P-L>2*Math.PI&&(L=0,P=2*Math.PI);const R=(P-L)/b.curveStepCount,D=[];for(let F=L;F<=P;F+=R)D.push([_+S*Math.cos(F),k+A*Math.sin(F)]);return D.push([_+S*Math.cos(P),k+A*Math.sin(P)]),D.push([_,k]),Sr([D],b)})(t,r,i,a,n,o,c));return c.stroke!==ee&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),a=[],n=El(t,i);if(i.fill&&i.fill!==ee)if(i.fillStyle==="solid"){const o=El(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.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(...Tn(Pl([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Tn(Pl(c),10,(1+i.roughness)/2))}o.length&&a.push(Sr([o],i))}return i.stroke!==ee&&a.push(n),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],n=Xi(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(kn([t],i)):a.push(Sr([t],i))),i.stroke!==ee&&a.push(n),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=i.fill&&i.fill!=="transparent"&&i.fill!==ee,o=i.stroke!==ee,s=!!(i.simplification&&i.simplification<1),l=(function(h,u,f){const p=fd(dd(Zs(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Tn(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:S,data:A}of p)switch(S){case"M":_(),y=[A[0],A[1]],m.push(y);break;case"L":b(),m.push([A[0],A[1]]);break;case"C":if(!x.length){const L=m.length?m[m.length-1]:y;x.push([L[0],L[1]])}x.push([A[0],A[1]]),x.push([A[2],A[3]]),x.push([A[4],A[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!f)return g;const k=[];for(const S of g){const A=X2(S,f);A.length&&k.push(A)}return k})(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=$l(t,i);if(n)if(i.fillStyle==="solid")if(l.length===1){const h=$l(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(kn(l,i));else a.push(Sr(l,i));return o&&(s?l.forEach((h=>{a.push(Xi(h,!1,i))})):a.push(c)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const n=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":i+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":i+=`L${n[0]} ${n[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const n of r){let o=null;switch(n.type){case"path":o={d:this.opsToPath(n),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ee};break;case"fillPath":o={d:this.opsToPath(n),stroke:ee,strokeWidth:0,fill:i.fill||ee};break;case"fillSketch":o=this.fillSketch(n,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ee,strokeWidth:i,fill:ee}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class K2{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new va(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,n=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,n),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,n,s),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const n of r.ops){const o=typeof i=="number"&&i>=0?n.data.map((s=>+s.toFixed(i))):n.data;switch(n.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(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,n){const o=this.gen.line(t,r,i,a,n);return this.draw(o),o}rectangle(t,r,i,a,n){const o=this.gen.rectangle(t,r,i,a,n);return this.draw(o),o}ellipse(t,r,i,a,n){const o=this.gen.ellipse(t,r,i,a,n);return this.draw(o),o}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n),n}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,a,n,o,s=!1,l){const c=this.gen.arc(t,r,i,a,n,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 zi="http://www.w3.org/2000/svg";class Z2{constructor(t,r){this.svg=t,this.gen=new va(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,n=a.createElementNS(zi,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=a.createElementNS(zi,"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=a.createElementNS(zi,"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(a,s,i)}l&&n.appendChild(l)}return n}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const n=t.createElementNS(zi,"path");return n.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),n.setAttribute("stroke",i.fill||""),n.setAttribute("stroke-width",a+""),n.setAttribute("fill","none"),i.fillLineDash&&n.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,n){const o=this.gen.line(t,r,i,a,n);return this.draw(o)}rectangle(t,r,i,a,n){const o=this.gen.rectangle(t,r,i,a,n);return this.draw(o)}ellipse(t,r,i,a,n){const o=this.gen.ellipse(t,r,i,a,n);return this.draw(o)}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n)}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,a,n,o,s=!1,l){const c=this.gen.arc(t,r,i,a,n,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 G={canvas:(e,t)=>new K2(e,t),svg:(e,t)=>new Z2(e,t),generator:e=>new va(e),newSeed:()=>va.newSeed()},at=d(async(e,t,r)=>{let i;const a=t.useHtmlLabels||Mt(pt()?.htmlLabels);r?i=r:i="node default";const n=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=n.insert("g").attr("class","label").attr("style",Ht(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await He(o,ne(fr(s),pt()),{useHtmlLabels:a,width:t.width||pt().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(a){const u=l.children[0],f=ut(l),p=u.getElementsByTagName("img");if(p){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=pt().fontSize?pt().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[k=fc.fontSize]=Wa(b),S=k*_+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";y(m)}d(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 a?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:n,bbox:c,halfPadding:h,label:o}},"labelHelper"),Ln=d(async(e,t,r)=>{const i=r.useHtmlLabels||Mt(pt()?.flowchart?.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),n=await He(a,ne(fr(t),pt()),{useHtmlLabels:i,width:r.width||pt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=n.getBBox();const s=r.padding/2;if(Mt(pt()?.flowchart?.htmlLabels)){const l=n.children[0],c=ut(n);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:a}},"insertLabel"),Z=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=d((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(" ")}d(ht,"createPathFromPoints");function ze(e,t,r,i,a,n){const o=[],l=r-e,c=i-t,h=l/n,u=2*Math.PI/h,f=t+c/2;for(let p=0;p<=50;p++){const g=p/50,m=e+g*l,y=f+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}d(ze,"generateFullSineWavePoints");function gi(e,t,r,i,a,n){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(gi,"generateCirclePoints");var Q2=d((e,t)=>{var r=e.x,i=e.y,a=t.x-r,n=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(n)*o>Math.abs(a)*s?(n<0&&(s=-s),l=n===0?0:s*a/n,c=s):(a<0&&(o=-o),l=o,c=a===0?0:o*n/a),{x:r+l,y:i+c}},"intersectRect"),zr=Q2;function xd(e,t){t&&e.attr("style",t)}d(xd,"applyStyle");async function bd(e){const t=ut(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=pt();let a=e.label;e.label&&Fr(e.label)&&(a=await Cs(e.label.replace(Pr.lineBreakRegex,`
|
|
129
|
+
`),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(ne(o,i)),xd(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()}d(bd,"addHtmlLabel");var J2=d(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),Mt(pt().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),O.info("vertexText"+a);const n={isNode:i,label:fr(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await bd(n)}else{const n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof a=="string"?o=a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?o=a: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(),n.appendChild(l)}return n}},"createLabel"),ar=J2,je=d((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Cd=d(async(e,t)=>{O.info("Creating subgraph rect for ",t.id,t);const r=pt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Mt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await He(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(Mt(r.flowchart.htmlLabels)){const L=g.children[0],P=ut(g);m=L.getBoundingClientRect(),P.attr("width",m.width),P.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;O.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const L=G.svg(u),P=V(t,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),R=L.path(je(b,_,y,x,0),P);k=u.insert(()=>(O.debug("Rough node insert CXC",R),R),":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:S}=Rs(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),s){const L=p.select("span");L&&L.attr("style",s)}const A=k.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=m.height-t.padding/2,t.intersect=function(L){return zr(t,L)},{cluster:u,labelBBox:m}},"rect"),t1=d((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,n=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-n).attr("y",t.y-t.height/2-n).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return zr(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),e1=d(async(e,t)=>{const r=pt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,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 p=u.node().appendChild(await ar(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(Mt(r.flowchart.htmlLabels)){const R=p.children[0],D=ut(p);g=R.getBoundingClientRect(),D.attr("width",g.width),D.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,S=t.y-b/2;t.width=x;const A=t.y-t.height/2-y+g.height+2;let L;if(t.look==="handDrawn"){const R=t.cssClasses.includes("statediagram-cluster-alt"),D=G.svg(c),F=t.rx||t.ry?D.path(je(k,S,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:a}):D.rectangle(k,S,x,b,{seed:a});L=c.insert(()=>F,":first-child");const z=D.rectangle(k,A,x,_,{fill:R?n:o,fillStyle:R?"hachure":"solid",stroke:l,seed:a});L=c.insert(()=>F,":first-child"),f=c.insert(()=>z)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",k).attr("y",S).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",k).attr("y",A).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(Mt(r.flowchart.htmlLabels)?0:3)})`);const P=L.node().getBBox();return t.height=P.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(R){return zr(t,R)},{cluster:c,labelBBox:g}},"roundedWithTitle"),r1=d(async(e,t)=>{O.info("Creating subgraph rect for ",t.id,t);const r=pt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Mt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await He(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Mt(r.flowchart.htmlLabels)){const L=g.children[0],P=ut(g);m=L.getBoundingClientRect(),P.attr("width",m.width),P.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;O.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const L=G.svg(u),P=V(t,{roughness:.7,fill:n,stroke:o,fillWeight:4,seed:a}),R=L.path(je(b,_,y,x,t.rx),P);k=u.insert(()=>(O.debug("Rough node insert CXC",R),R),":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:S}=Rs(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),s){const L=p.select("span");L&&L.attr("style",s)}const A=k.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=m.height-t.padding/2,t.intersect=function(L){return zr(t,L)},{cluster:u,labelBBox:m}},"kanbanSection"),i1=d((e,t)=>{const r=pt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=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 p;if(t.look==="handDrawn"){const y=G.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});p=o.insert(()=>y,":first-child")}else p=s.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return zr(t,m)},{cluster:o,labelBBox:{}}},"divider"),a1=Cd,n1={rect:Cd,squareRect:a1,roundedWithTitle:e1,noteGroup:t1,divider:i1,kanbanSection:r1},_d=new Map,s1=d(async(e,t)=>{const r=t.shape||"rect",i=await n1[r](e,t);return _d.set(t.id,i),i},"insertCluster"),Mw=d(()=>{_d=new Map},"clear");function Sd(e,t){return e.intersect(t)}d(Sd,"intersectNode");var o1=Sd;function wd(e,t,r,i){var a=e.x,n=e.y,o=a-i.x,s=n-i.y,l=Math.sqrt(t*t*s*s+r*r*o*o),c=Math.abs(t*r*o/l);i.x<a&&(c=-c);var h=Math.abs(t*r*s/l);return i.y<n&&(h=-h),{x:a+c,y:n+h}}d(wd,"intersectEllipse");var vd=wd;function kd(e,t,r){return vd(e,t,t,r)}d(kd,"intersectCircle");var l1=kd;function Td(e,t,r,i){{const a=t.y-e.y,n=e.x-t.x,o=t.x*e.y-e.x*t.y,s=a*r.x+n*r.y+o,l=a*i.x+n*i.y+o,c=1e-6;if(s!==0&&l!==0&&os(s,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,p=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(p)<c&&Math.abs(g)<c&&os(p,g))return;const m=a*u-h*n;if(m===0)return;const y=Math.abs(m/2);let x=n*f-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*f;const _=x<0?(x-y)/m:(x+y)/m;return{x:b,y:_}}}d(Td,"intersectLine");function os(e,t){return e*t>0}d(os,"sameSign");var c1=Td;function Ld(e,t,r){let i=e.x,a=e.y,n=[],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=a-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],p=c1(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});p&&n.push(p)}return n.length?(n.length>1&&n.sort(function(h,u){let f=h.x-r.x,p=h.y-r.y,g=Math.sqrt(f*f+p*p),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}),n[0]):e}d(Ld,"intersectPolygon");var h1=Ld,j={node:o1,circle:l1,ellipse:vd,polygon:h1,rect:zr};function Bd(e,t){const{labelStyles:r}=X(t);t.labelStyle=r;const i=rt(t);let a=i;i||(a="anchor");const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,l=G.svg(n),c=V(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=n.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Ht(s)),Z(t,u),t.intersect=function(f){return O.info("Circle intersect",t,o,f),j.circle(t,o,f)},n}d(Bd,"anchor");function ls(e,t,r,i,a,n,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,p=u/a,g=f/n,m=Math.sqrt(p**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*n*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),_=Math.atan2((t-b)/n,(e-x)/a);let S=Math.atan2((i-b)/n,(r-x)/a)-_;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const A=[];for(let L=0;L<20;L++){const P=L/19,R=_+P*S,D=x+a*Math.cos(R),F=b+n*Math.sin(R);A.push({x:D,y:F})}return A}d(ls,"generateArcPoints");async function Ad(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=n.width+t.padding+20,s=n.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},...ls(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...ls(o/2,s/2,o/2,-s/2,c,l,!0)],f=G.svg(a),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=ht(u),m=f.path(g,p),y=a.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)`),Z(t,y),t.intersect=function(x){return j.polygon(t,u,x)},a}d(Ad,"bowTieRect");function Ye(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(Ye,"insertPolygonShape");async function Md(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=n.height+t.padding,s=12,l=n.width+t.padding+s,c=0,h=l,u=-o,f=0,p=[{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=G.svg(a),x=V(t,{}),b=ht(p),_=y.path(b,x);g=a.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Ye(a,l,o,p);return i&&g.attr("style",i),Z(t,g),t.intersect=function(y){return j.polygon(t,p,y)},a}d(Md,"card");function Ed(e,t){const{nodeStyles:r}=X(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(28,t.width??0),o=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],s=G.svg(i),l=V(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 a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return j.polygon(t,o,f)},i}d(Ed,"choice");async function Qs(e,t,r){const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i;const{shapeSvg:n,bbox:o,halfPadding:s}=await at(e,t,rt(t)),l=r?.padding??s,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=G.svg(n),p=V(t,{}),g=f.circle(0,0,c*2,p);h=n.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Ht(u))}else h=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return Z(t,h),t.calcIntersect=function(f,p){const g=f.width/2;return j.circle(f,g,p)},t.intersect=function(f){return O.info("Circle intersect",t,c,f),j.circle(t,c,f)},n}d(Qs,"circle");function Fd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},n={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 ${n.x},${n.y} L ${s.x},${s.y}
|
|
130
|
+
M ${a.x},${a.y} L ${o.x},${o.y}`}d(Fd,"createLine");function $d(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),n=Math.max(30,t?.width??0),{cssStyles:o}=t,s=G.svg(a),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,n*2,l),h=Fd(n),u=s.path(h,l),f=a.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),Z(t,f),t.intersect=function(p){return O.info("crossedCircle intersect",t,{radius:n,point:p}),j.circle(t,n,p)},a}d($d,"crossedCircle");function we(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(we,"generateCirclePoints");async function Od(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...we(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...we(s/2+c*2,-c,c,20,-180,-270),...we(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...we(s/2,l/2,c,20,0,90)],f=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...we(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...we(s/2+s*.1,-c,c,20,-180,-270),...we(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...we(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],p=G.svg(a),g=V(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ht(u).replace("Z",""),x=p.path(y,g),b=ht(f),_=p.path(b,{...g}),k=a.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-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Z(t,k),t.intersect=function(S){return j.polygon(t,f,S)},a}d(Od,"curlyBraceLeft");function ve(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:p,y:g})}return o}d(ve,"generateCirclePoints");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ve(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...ve(s/2+c*2,-c,c,20,-180,-270),...ve(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...ve(s/2,l/2,c,20,0,90)],f=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...ve(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...ve(s/2+c*2,-c,c,20,-180,-270),...ve(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...ve(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],p=G.svg(a),g=V(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ht(u).replace("Z",""),x=p.path(y,g),b=ht(f),_=p.path(b,{...g}),k=a.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-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Z(t,k),t.intersect=function(S){return j.polygon(t,f,S)},a}d(Dd,"curlyBraceRight");function Ot(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(Ot,"generateCirclePoints");async function Id(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ot(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Ot(s/2+c*2,-c,c,20,-180,-270),...Ot(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Ot(s/2,l/2,c,20,0,90)],f=[...Ot(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Ot(-s/2-c/2,-c,c,20,0,90),...Ot(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Ot(-s/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Ot(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Ot(s/2+c*2,-c,c,20,-180,-270),...Ot(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Ot(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},...Ot(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Ot(-s/2-c/2,-c,c,20,0,90),...Ot(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Ot(-s/2+c+c/2,l/2,c,30,-180,-270)],g=G.svg(a),m=V(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",""),S=g.path(k,m),A=ht(p),L=g.path(A,{...m}),P=a.insert("g",":first-child");return P.insert(()=>L,":first-child").attr("stroke-opacity",0),P.insert(()=>b,":first-child"),P.insert(()=>S,":first-child"),P.attr("class","text"),h&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Z(t,P),t.intersect=function(R){return j.polygon(t,p,R)},a}d(Id,"curlyBraces");async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=80,s=20,l=Math.max(o,(n.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(s,n.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=G.svg(a),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.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},...gi(-y,-m/2,h,50,270,90)],_=ht(b),k=f.path(_,p),S=a.insert(()=>k,":first-child");return S.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),S.attr("transform",`translate(${-l/2}, ${-c/2})`),Z(t,S),t.intersect=function(A){return j.polygon(t,b,A)},a}d(Pd,"curvedTrapezoid");var u1=d((e,t,r,i,a,n)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),d1=d((e,t,r,i,a,n)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),f1=d((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(n.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=G.svg(a),g=d1(0,0,s,h,l,c),m=f1(0,c,s,h,l,c),y=p.path(g,V(t,{})),x=p.path(m,V(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const p=u1(0,0,s,h,l,c);u=a.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Ht(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Z(t,u),o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(p){const g=j.rect(t,p),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,p.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}d(Rd,"cylinder");async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=n.width+t.padding,l=n.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:f}=t,p=G.svg(a),g=V(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=p.polygon(m.map(b=>[b.x,b.y]),g),x=a.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-(n.x-(n.left??0))}, ${u+c+(t.padding??0)/2-(n.y-(n.top??0))})`),Z(t,x),t.intersect=function(b){return j.rect(t,b)},a}d(Nd,"dividedRectangle");async function Wd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o}=await at(e,t,rt(t)),l=n.width/2+o+5,c=n.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=G.svg(a),p=V(t,{roughness:.2,strokeWidth:2.5}),g=V(t,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,l*2,p),y=f.circle(0,0,c*2,g);h=a.insert("g",":first-child"),h.attr("class",Ht(t.cssClasses)).attr("style",Ht(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=a.insert("g",":first-child");const f=h.insert("circle",":first-child"),p=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),p.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Z(t,h),t.intersect=function(f){return O.info("DoubleCircle intersect",t,l,f),j.circle(t,l,f)},a}d(Wd,"doublecircle");function zd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=X(t);t.label="",t.labelStyle=i;const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=G.svg(n),{nodeBorder:c}=r,h=V(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=n.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),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),Z(t,f),t.intersect=function(p){return O.info("filledCircle intersect",t,{radius:o,point:p}),j.circle(t,o,p)},n}d(zd,"filledCircle");async function qd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=n.width+(t.padding??0),l=s+n.height,c=s+n.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=G.svg(a),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=ht(h),m=f.path(g,p),y=a.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,Z(t,y),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(x){return O.info("Triangle intersect",t,h,x),j.polygon(t,h,x)},a}d(qd,"flippedTriangle");function Hd(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:n}=X(t);t.label="";const o=e.insert("g").attr("class",rt(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=G.svg(o),p=V(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=f.rectangle(h,u,l,c,p),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),Z(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 j.rect(t,x)},o}d(Hd,"forkJoin");async function jd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=80,n=50,{shapeSvg:o,bbox:s}=await at(e,t,rt(t)),l=Math.max(a,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(n,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=G.svg(o),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...gi(-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,p),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),Z(t,x),t.intersect=function(b){return O.info("Pill intersect",t,{radius:h,point:b}),j.polygon(t,g,b)},o}d(jd,"halfRoundedRectangle");async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=n.height+(t.padding??0),s=n.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=G.svg(a),h=V(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=s/2;const f=u/6;u=u+f;const p=o/2,g=p/2,m=u-g,y=[{x:-m,y:-p},{x:0,y:-p},{x:m,y:-p},{x:u,y:0},{x:m,y:p},{x:0,y:p},{x:-m,y:p},{x:-u,y:0}],x=ht(y),b=c.path(x,h),_=a.insert(()=>b,":first-child");return _.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),t.width=s,t.height=o,Z(t,_),t.intersect=function(k){return j.polygon(t,y,k)},a}d(Yd,"hexagon");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await at(e,t,rt(t)),n=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,l=G.svg(a),c=V(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:n,y:0},{x:0,y:o},{x:n,y:o}],u=ht(h),f=l.path(u,c),p=a.insert(()=>f,":first-child");return p.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-n/2}, ${-o/2})`),Z(t,p),t.intersect=function(g){return O.info("Pill intersect",t,{points:h}),j.polygon(t,h,g)},a}d(Ud,"hourglass");async function Gd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=X(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await at(e,t,"icon-shape default"),f=t.pos==="t",p=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=Rr(t),x=-g/2,b=-p/2,_=t.label?8:0,k=G.svg(c),S=V(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const A=k.rectangle(x,b,g,p,S),L=Math.max(g,h.width),P=p+h.height+_,R=k.rectangle(-L/2,-P/2,L,P,{...S,fill:"transparent",stroke:"none"}),D=c.insert(()=>A,":first-child"),F=c.insert(()=>R);if(t.icon){const z=c.append("g");z.html(`<g>${await wi(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const N=z.node().getBBox(),B=N.width,M=N.height,T=N.x,$=N.y;z.attr("transform",`translate(${-B/2-T},${f?h.height/2+_/2-M/2-$:-h.height/2-_/2-M/2-$})`),z.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-P/2:P/2-h.height})`),D.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),Z(t,F),t.intersect=function(z){if(O.info("iconSquare intersect",t,z),!t.label)return j.rect(t,z);const N=t.x??0,B=t.y??0,M=t.height??0;let T=[];return f?T=[{x:N-h.width/2,y:B-M/2},{x:N+h.width/2,y:B-M/2},{x:N+h.width/2,y:B-M/2+h.height+_},{x:N+g/2,y:B-M/2+h.height+_},{x:N+g/2,y:B+M/2},{x:N-g/2,y:B+M/2},{x:N-g/2,y:B-M/2+h.height+_},{x:N-h.width/2,y:B-M/2+h.height+_}]:T=[{x:N-g/2,y:B-M/2},{x:N+g/2,y:B-M/2},{x:N+g/2,y:B-M/2+p},{x:N+h.width/2,y:B-M/2+p},{x:N+h.width/2/2,y:B+M/2},{x:N-h.width/2,y:B+M/2},{x:N-h.width/2,y:B-M/2+p},{x:N-g/2,y:B-M/2+p}],j.polygon(t,T,z)},c}d(Gd,"icon");async function Vd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=X(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await at(e,t,"icon-shape default"),f=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Rr(t),b=G.svg(c),_=V(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=x.get("fill");_.stroke=k??y;const S=c.append("g");t.icon&&S.html(`<g>${await wi(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=S.node().getBBox(),L=A.width,P=A.height,R=A.x,D=A.y,F=Math.max(L,P)*Math.SQRT2+f*2,z=b.circle(0,0,F,_),N=Math.max(F,h.width),B=F+h.height+p,M=b.rectangle(-N/2,-B/2,N,B,{..._,fill:"transparent",stroke:"none"}),T=c.insert(()=>z,":first-child"),$=c.insert(()=>M);return S.attr("transform",`translate(${-L/2-R},${g?h.height/2+p/2-P/2-D:-h.height/2-p/2-P/2-D})`),S.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})`),T.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),Z(t,$),t.intersect=function(E){return O.info("iconSquare intersect",t,E),j.rect(t,E)},c}d(Vd,"iconCircle");async function Xd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=X(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await at(e,t,"icon-shape default"),p=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Rr(t),_=-m/2,k=-g/2,S=t.label?8:0,A=G.svg(c),L=V(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const P=b.get("fill");L.stroke=P??x;const R=A.path(je(_,k,m,g,5),L),D=Math.max(m,h.width),F=g+h.height+S,z=A.rectangle(-D/2,-F/2,D,F,{...L,fill:"transparent",stroke:"none"}),N=c.insert(()=>R,":first-child").attr("class","icon-shape2"),B=c.insert(()=>z);if(t.icon){const M=c.append("g");M.html(`<g>${await wi(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const T=M.node().getBBox(),$=T.width,E=T.height,Y=T.x,K=T.y;M.attr("transform",`translate(${-$/2-Y},${p?h.height/2+S/2-E/2-K:-h.height/2-S/2-E/2-K})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-F/2:F/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),Z(t,B),t.intersect=function(M){if(O.info("iconSquare intersect",t,M),!t.label)return j.rect(t,M);const T=t.x??0,$=t.y??0,E=t.height??0;let Y=[];return p?Y=[{x:T-h.width/2,y:$-E/2},{x:T+h.width/2,y:$-E/2},{x:T+h.width/2,y:$-E/2+h.height+S},{x:T+m/2,y:$-E/2+h.height+S},{x:T+m/2,y:$+E/2},{x:T-m/2,y:$+E/2},{x:T-m/2,y:$-E/2+h.height+S},{x:T-h.width/2,y:$-E/2+h.height+S}]:Y=[{x:T-m/2,y:$-E/2},{x:T+m/2,y:$-E/2},{x:T+m/2,y:$-E/2+g},{x:T+h.width/2,y:$-E/2+g},{x:T+h.width/2/2,y:$+E/2},{x:T-h.width/2,y:$+E/2},{x:T-h.width/2,y:$-E/2+g},{x:T-m/2,y:$-E/2+g}],j.polygon(t,Y,M)},c}d(Xd,"iconRounded");async function Kd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=X(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await at(e,t,"icon-shape default"),p=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Rr(t),_=-m/2,k=-g/2,S=t.label?8:0,A=G.svg(c),L=V(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const P=b.get("fill");L.stroke=P??x;const R=A.path(je(_,k,m,g,.1),L),D=Math.max(m,h.width),F=g+h.height+S,z=A.rectangle(-D/2,-F/2,D,F,{...L,fill:"transparent",stroke:"none"}),N=c.insert(()=>R,":first-child"),B=c.insert(()=>z);if(t.icon){const M=c.append("g");M.html(`<g>${await wi(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const T=M.node().getBBox(),$=T.width,E=T.height,Y=T.x,K=T.y;M.attr("transform",`translate(${-$/2-Y},${p?h.height/2+S/2-E/2-K:-h.height/2-S/2-E/2-K})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-F/2:F/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),Z(t,B),t.intersect=function(M){if(O.info("iconSquare intersect",t,M),!t.label)return j.rect(t,M);const T=t.x??0,$=t.y??0,E=t.height??0;let Y=[];return p?Y=[{x:T-h.width/2,y:$-E/2},{x:T+h.width/2,y:$-E/2},{x:T+h.width/2,y:$-E/2+h.height+S},{x:T+m/2,y:$-E/2+h.height+S},{x:T+m/2,y:$+E/2},{x:T-m/2,y:$+E/2},{x:T-m/2,y:$-E/2+h.height+S},{x:T-h.width/2,y:$-E/2+h.height+S}]:Y=[{x:T-m/2,y:$-E/2},{x:T+m/2,y:$-E/2},{x:T+m/2,y:$-E/2+g},{x:T+h.width/2,y:$-E/2+g},{x:T+h.width/2/2,y:$+E/2},{x:T-h.width/2,y:$+E/2},{x:T-h.width/2,y:$-E/2+g},{x:T-m/2,y:$-E/2+g}],j.polygon(t,Y,M)},c}d(Kd,"iconSquare");async function Zd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/n;const{labelStyles:o}=X(t);t.labelStyle=o;const s=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?s??0:0,t?.assetWidth??a),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??n;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:f,label:p}=await at(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=G.svg(u),_=V(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=b.rectangle(m,y,c,h,_),S=Math.max(c,f.width),A=h+f.height+x,L=b.rectangle(-S/2,-A/2,S,A,{..._,fill:"none",stroke:"none"}),P=u.insert(()=>k,":first-child"),R=u.insert(()=>L);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",c),D.attr("height",h),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-c/2},${g?A/2-h:-A/2})`)}return p.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})`),P.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),Z(t,R),t.intersect=function(D){if(O.info("iconSquare intersect",t,D),!t.label)return j.rect(t,D);const F=t.x??0,z=t.y??0,N=t.height??0;let B=[];return g?B=[{x:F-f.width/2,y:z-N/2},{x:F+f.width/2,y:z-N/2},{x:F+f.width/2,y:z-N/2+f.height+x},{x:F+c/2,y:z-N/2+f.height+x},{x:F+c/2,y:z+N/2},{x:F-c/2,y:z+N/2},{x:F-c/2,y:z-N/2+f.height+x},{x:F-f.width/2,y:z-N/2+f.height+x}]:B=[{x:F-c/2,y:z-N/2},{x:F+c/2,y:z-N/2},{x:F+c/2,y:z-N/2+h},{x:F+f.width/2,y:z-N/2+h},{x:F+f.width/2/2,y:z+N/2},{x:F-f.width/2,y:z+N/2},{x:F-f.width/2,y:z-N/2+h},{x:F-c/2,y:z-N/2+h}],j.polygon(t,B,D)},u}d(Zd,"imageSquare");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=Math.max(n.width+(t.padding??0)*2,t?.width??0),s=Math.max(n.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=G.svg(a),f=V(t,{}),p=ht(l),g=u.path(p,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ye(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Z(t,c),t.intersect=function(u){return j.polygon(t,l,u)},a}d(Qd,"inv_trapezoid");async function ja(e,t,r){const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i;const{shapeSvg:n,bbox:o}=await at(e,t,rt(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:p}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,p=r.ry),t.look==="handDrawn"){const m=G.svg(n),y=V(t,{}),x=f||p?m.path(je(c,h,s,l,f||0),y):m.rectangle(c,h,s,l,y);u=n.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Ht(g))}else u=n.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Ht(f)).attr("ry",Ht(p)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return Z(t,u),t.calcIntersect=function(m,y){return j.rect(m,y)},t.intersect=function(m){return j.rect(t,m)},n}d(ja,"drawRect");async function Jd(e,t){const{shapeSvg:r,bbox:i,label:a}=await at(e,t,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Z(t,n),t.intersect=function(l){return j.rect(t,l)},r}d(Jd,"labelRect");async function tf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=Math.max(n.width+(t.padding??0),t?.width??0),s=Math.max(n.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=G.svg(a),f=V(t,{}),p=ht(l),g=u.path(p,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ye(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Z(t,c),t.intersect=function(u){return j.polygon(t,l,u)},a}d(tf,"lean_left");async function ef(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=Math.max(n.width+(t.padding??0),t?.width??0),s=Math.max(n.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=G.svg(a),f=V(t,{}),p=ht(l),g=u.path(p,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ye(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Z(t,c),t.intersect=function(u){return j.polygon(t,l,u)},a}d(ef,"lean_right");function rf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:n}=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=G.svg(a),u=V(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ht(c),p=h.path(f,u),g=a.insert(()=>p,":first-child");return n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),Z(t,g),t.intersect=function(m){return O.info("lightningBolt intersect",t,m),j.polygon(t,c,m)},a}d(rf,"lightningBolt");var p1=d((e,t,r,i,a,n,o)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),g1=d((e,t,r,i,a,n,o)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),m1=d((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function af(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(n.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=G.svg(a),m=g1(0,0,s,h,l,c,u),y=m1(0,c,s,h,l,c),x=V(t,{}),b=g.path(m,x),_=g.path(y,x);a.insert(()=>_,":first-child").attr("class","line"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const g=p1(0,0,s,h,l,c,u);f=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Ht(p)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Z(t,f),o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+c-(n.y-(n.top??0))})`),t.intersect=function(g){const m=j.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},a}d(af,"linedCylinder");async function nf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=G.svg(a),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...ze(-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]),p),y=a.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-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c/2-(n.y-(n.top??0))})`),Z(t,y),t.intersect=function(x){return j.polygon(t,g,x)},a}d(nf,"linedWaveEdgedRect");async function sf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,p=G.svg(a),g=V(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=p.path(x,g),_=ht(y),k=p.path(_,{...g,fill:"none"}),S=a.insert(()=>k,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(n.width/2)-c-(n.x-(n.left??0))}, ${-(n.height/2)+c-(n.y-(n.top??0))})`),Z(t,S),t.intersect=function(A){return j.polygon(t,m,A)},a}d(sf,"multiRect");async function of(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-s/2,f=-h/2,p=5,{cssStyles:g}=t,m=ze(u-p,f+h+p,u+s-p,f+h+p,c,.8),y=m?.[m.length-1],x=[{x:u-p,y:f+p},{x:u-p,y:f+h+p},...m,{x:u+s-p,y:y.y-p},{x:u+s,y:y.y-p},{x:u+s,y:y.y-2*p},{x:u+s+p,y:y.y-2*p},{x:u+s+p,y:f-p},{x:u+p,y:f-p},{x:u+p,y:f},{x:u,y:f},{x:u,y:f+p}],b=[{x:u,y:f+p},{x:u+s-p,y:f+p},{x:u+s-p,y:y.y-p},{x:u+s,y:y.y-p},{x:u+s,y:f},{x:u,y:f}],_=G.svg(a),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=ht(x),A=_.path(S,k),L=ht(b),P=_.path(L,k),R=a.insert(()=>A,":first-child");return R.insert(()=>P),R.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(n.width/2)-p-(n.x-(n.left??0))}, ${-(n.height/2)+p-c/2-(n.y-(n.top??0))})`),Z(t,R),t.intersect=function(D){return j.polygon(t,x,D)},a}d(of,"multiWaveEdgedRectangle");async function lf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i,t.useHtmlLabels||zt().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:l}=await at(e,t,rt(t)),c=Math.max(s.width+(t.padding??0)*2,t?.width??0),h=Math.max(s.height+(t.padding??0)*2,t?.height??0),u=-c/2,f=-h/2,{cssStyles:p}=t,g=G.svg(o),m=V(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,c,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",p),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Z(t,x),t.intersect=function(b){return j.rect(t,b)},o}d(lf,"note");var y1=d((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 cf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=n.width+t.padding,s=n.height+t.padding,l=o+s,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=G.svg(a),g=V(t,{}),m=y1(0,0,l),y=p.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Ye(a,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Z(t,u),t.calcIntersect=function(p,g){const m=p.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=j.polygon(p,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(p){return this.calcIntersect(t,p)},a}d(cf,"question");async function hf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0),t?.width??0),l=Math.max(n.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:p}=t,g=G.svg(a),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ht(f),x=g.path(y,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,b),t.intersect=function(_){return j.polygon(t,f,_)},a}d(hf,"rect_left_inv_arrow");async function uf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=n.insert("g"),s=n.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(Mt(pt()?.flowchart?.htmlLabels)){const P=h.children[0],R=ut(h);u=P.getBoundingClientRect(),R.attr("width",u.width),R.attr("height",u.height)}O.info("Text 2",l);const f=l||[],p=h.getBBox(),g=s.node().appendChild(await ar(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=ut(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ut(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+x+5)+")"),ut(h).attr("transform","translate( "+(u.width<p.width?0:-(p.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,S=-u.height/2-x;let A,L;if(t.look==="handDrawn"){const P=G.svg(n),R=V(t,{}),D=P.path(je(k,S,b,_,t.rx||0),R),F=P.line(-u.width/2-x,-u.height/2-x+p.height+x,u.width/2+x,-u.height/2-x+p.height+x,R);L=n.insert(()=>(O.debug("Rough node insert CXC",D),F),":first-child"),A=n.insert(()=>(O.debug("Rough node insert CXC",D),D),":first-child")}else A=o.insert("rect",":first-child"),L=o.insert("line"),A.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)),L.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+p.height+x).attr("y2",-u.height/2-x+p.height+x);return Z(t,A),t.intersect=function(P){return j.rect(t,P)},n}d(uf,"rectWithTitle");function ei(e,t,r,i,a,n,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,p=u/a,g=f/n,m=Math.sqrt(p**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*n*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),_=Math.atan2((t-b)/n,(e-x)/a);let S=Math.atan2((i-b)/n,(r-x)/a)-_;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const A=[];for(let L=0;L<20;L++){const P=L/19,R=_+P*S,D=x+a*Math.cos(R),F=b+n*Math.sin(R);A.push({x:D,y:F})}return A}d(ei,"generateArcPoints");async function df(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=t?.padding??0,s=t?.padding??0,l=(t?.width?t?.width:n.width)+o*2,c=(t?.height?t?.height:n.height)+s*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,p=G.svg(a),g=V(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...ei(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...ei(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...ei(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...ei(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=ht(m),x=p.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Z(t,b),t.intersect=function(_){return j.polygon(t,m,_)},a}d(df,"roundedRect");async function ff(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=t?.padding??0,l=Math.max(n.width+(t.padding??0)*2,t?.width??0),c=Math.max(n.height+(t.padding??0)*2,t?.height??0),h=-n.width/2-s,u=-n.height/2-s,{cssStyles:f}=t,p=G.svg(a),g=V(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=p.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Ht(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)-(n.x-(n.left??0))},${-c/2+(t.padding??0)-(n.y-(n.top??0))})`),Z(t,x),t.intersect=function(b){return j.rect(t,b)},a}d(ff,"shadedProcess");async function pf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),c=-s/2,h=-l/2,{cssStyles:u}=t,f=G.svg(a),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.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,p),x=a.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)-(n.x-(n.left??0))}, ${-l/4+(t.padding??0)-(n.y-(n.top??0))})`),Z(t,x),t.intersect=function(b){return j.polygon(t,g,b)},a}d(pf,"slopedRect");async function gf(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return ja(e,t,r)}d(gf,"squareRect");async function mf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=n.height+t.padding,s=n.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=G.svg(a),u=V(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-s/2+l,y:-o/2},{x:s/2-l,y:-o/2},...gi(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},...gi(s/2-l,0,l,50,270,450)],p=ht(f),g=h.path(p,u),m=a.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Z(t,m),t.intersect=function(y){return j.polygon(t,f,y)},a}d(mf,"stadium");async function yf(e,t){return ja(e,t,{rx:5,ry:5})}d(yf,"state");function xf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i;const{cssStyles:n}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=G.svg(c),u=V(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),p=s??l,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),n&&m.selectAll("path").attr("style",n),a&&m.selectAll("path").attr("style",a),Z(t,m),t.intersect=function(y){return j.circle(t,7,y)},c}d(xf,"stateEnd");function bf(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const s=G.svg(a).circle(0,0,14,f0(i));n=a.insert(()=>s),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Z(t,n),t.intersect=function(o){return j.circle(t,7,o)},a}d(bf,"stateStart");async function Cf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=(t?.padding||0)/2,s=n.width+t.padding,l=n.height+t.padding,c=-n.width/2-o,h=-n.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=G.svg(a),p=V(t,{}),g=f.rectangle(c-8,h,s+16,l,p),m=f.line(c,h,c,h+l,p),y=f.line(c+s,h,c+s,h+l,p);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Ht(b)),Z(t,x)}else{const f=Ye(a,s,l,u);i&&f.attr("style",i),Z(t,f)}return t.intersect=function(f){return j.polygon(t,u,f)},a}d(Cf,"subroutine");async function _f(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=Math.max(n.width+(t.padding??0)*2,t?.width??0),s=Math.max(n.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,p=G.svg(a),g=V(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=p.path(x,g),_=ht(y),k=p.path(_,{...g,fillStyle:"solid"}),S=a.insert(()=>k,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),Z(t,S),t.intersect=function(A){return j.polygon(t,m,A)},a}d(_f,"taggedRect");async function Sf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*s,u=.2*l,f=l+c,{cssStyles:p}=t,g=G.svg(a),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...ze(-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},...ze(x+s,(b+l)*1.3,x+s-h,(b+l)*1.5,-l*.03,.5)],k=ht(y),S=g.path(k,m),A=ht(_),L=g.path(A,{...m,fillStyle:"solid"}),P=a.insert(()=>L,":first-child");return P.insert(()=>S,":first-child"),P.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c/2-(n.y-(n.top??0))})`),Z(t,P),t.intersect=function(R){return j.polygon(t,y,R)},a}d(Sf,"taggedWaveEdgedRectangle");async function wf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=Math.max(n.width+t.padding,t?.width||0),s=Math.max(n.height+t.padding,t?.height||0),l=-o/2,c=-s/2,h=a.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),Z(t,h),t.intersect=function(u){return j.rect(t,u)},a}d(wf,"text");var x1=d((e,t,r,i,a,n)=>`M${e},${t}
|
|
131
|
+
a${a},${n} 0,0,1 0,${-i}
|
|
132
|
+
l${r},0
|
|
133
|
+
a${a},${n} 0,0,1 0,${i}
|
|
134
|
+
M${r},${-i}
|
|
135
|
+
a${a},${n} 0,0,0 0,${i}
|
|
136
|
+
l${-r},0`,"createCylinderPathD"),b1=d((e,t,r,i,a,n)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),C1=d((e,t,r,i,a,n)=>[`M${e+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function vf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o,halfPadding:s}=await at(e,t,rt(t)),l=t.look==="neo"?s*2:s,c=n.height+l,h=c/2,u=h/(2.5+c/50),f=n.width+u+l,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const m=G.svg(a),y=b1(0,0,f,c,u,h),x=C1(0,0,f,c,u,h),b=m.path(y,V(t,{})),_=m.path(x,V(t,{fill:"none"}));g=a.insert(()=>_,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=x1(0,0,f,c,u,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Ht(p)).attr("style",i),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),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(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,g),t.intersect=function(m){const y=j.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},a}d(vf,"tiltedCylinder");async function kf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=n.width+t.padding,s=n.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=G.svg(a),f=V(t,{}),p=ht(l),g=u.path(p,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Ye(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Z(t,c),t.intersect=function(u){return j.polygon(t,l,u)},a}d(kf,"trapezoid");async function Tf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=60,s=20,l=Math.max(o,n.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,n.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=G.svg(a),f=V(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{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(p),m=u.path(g,f),y=a.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),Z(t,y),t.intersect=function(x){return j.polygon(t,p,x)},a}d(Tf,"trapezoidalPentagon");async function Lf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Mt(pt().flowchart?.htmlLabels),l=n.width+(t.padding??0),c=l+n.height,h=l+n.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,p=G.svg(a),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ht(u),y=p.path(m,g),x=a.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,Z(t,x),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${c/2-(n.height+(t.padding??0)/(s?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(b){return O.info("Triangle intersect",t,u,b),j.polygon(t,u,b)},a}d(Lf,"triangle");async function Bf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,p=70-s,g=p>0?p/2:0,m=G.svg(a),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...ze(-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=a.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)-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c-(n.y-(n.top??0))})`),Z(t,k),t.intersect=function(S){return j.polygon(t,x,S)},a}d(Bf,"waveEdgedRectangle");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await at(e,t,rt(t)),o=100,s=50,l=Math.max(n.width+(t.padding??0)*2,t?.width??0),c=Math.max(n.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 p=Math.min(f*.2,f/4),g=f+p*2,{cssStyles:m}=t,y=G.svg(a),x=V(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...ze(-u/2,g/2,u/2,g/2,p,1),{x:u/2,y:-g/2},...ze(u/2,-g/2,-u/2,-g/2,p,-1)],_=ht(b),k=y.path(_,x),S=a.insert(()=>k,":first-child");return S.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),Z(t,S),t.intersect=function(A){return j.polygon(t,b,A)},a}d(Af,"waveRectangle");async function Mf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await at(e,t,rt(t)),s=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,p=G.svg(a),g=V(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}
|
|
137
|
+
M${h-c},${u} L${h+s},${u}
|
|
138
|
+
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(y,g),b=a.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(${-(n.width/2)+c/2-(n.x-(n.left??0))}, ${-(n.height/2)+c/2-(n.y-(n.top??0))})`),Z(t,b),t.intersect=function(_){return j.polygon(t,m,_)},a}d(Mf,"windowPane");async function Js(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:et}=zt(),{background:lt}=et,dt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${lt}`]};await Js(e,dt)}const i=zt();t.useHtmlLabels=i.htmlLabels;let a=i.er?.diagramPadding??10,n=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:l}=X(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};Le(t.label,i)+et.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const lt=await ja(e,t,et);if(!Mt(i.htmlLabels)){const dt=lt.select("text"),it=dt.node()?.getBBox();dt.attr("transform",`translate(${-it.width/2}, 0)`)}return lt}i.htmlLabels||(a*=1.25,n*=1.25);let c=rt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await kr(h,t.label??"",i,0,0,["name"],s);u.height+=n;let f=0;const p=[],g=[];let m=0,y=0,x=0,b=0,_=!0,k=!0;for(const et of r.attributes){const lt=await kr(h,et.type,i,0,f,["attribute-type"],s);m=Math.max(m,lt.width+a);const dt=await kr(h,et.name,i,0,f,["attribute-name"],s);y=Math.max(y,dt.width+a);const it=await kr(h,et.keys.join(),i,0,f,["attribute-keys"],s);x=Math.max(x,it.width+a);const It=await kr(h,et.comment,i,0,f,["attribute-comment"],s);b=Math.max(b,It.width+a);const Et=Math.max(lt.height,dt.height,it.height,It.height)+n;g.push({yOffset:f,rowHeight:Et}),f+=Et}let S=4;x<=a&&(_=!1,x=0,S--),b<=a&&(k=!1,b=0,S--);const A=h.node().getBBox();if(u.width+a*2-(m+y+x+b)>0){const et=u.width+a*2-(m+y+x+b);m+=et/S,y+=et/S,x>0&&(x+=et/S),b>0&&(b+=et/S)}const L=m+y+x+b,P=G.svg(h),R=V(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let D=0;g.length>0&&(D=g.reduce((et,lt)=>et+(lt?.rowHeight??0),0));const F=Math.max(A.width+a*2,t?.width||0,L),z=Math.max((D??0)+u.height,t?.height||0),N=-F/2,B=-z/2;h.selectAll("g:not(:first-child)").each((et,lt,dt)=>{const it=ut(dt[lt]),It=it.attr("transform");let Et=0,he=0;if(It){const vt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(It);vt&&(Et=parseFloat(vt[1]),he=parseFloat(vt[2]),it.attr("class").includes("attribute-name")?Et+=m:it.attr("class").includes("attribute-keys")?Et+=m+y:it.attr("class").includes("attribute-comment")&&(Et+=m+y+x))}it.attr("transform",`translate(${N+a/2+Et}, ${he+B+u.height+n/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(B+n/2)+")");const M=P.rectangle(N,B,F,z,R),T=h.insert(()=>M,":first-child").attr("style",o.join("")),{themeVariables:$}=zt(),{rowEven:E,rowOdd:Y,nodeBorder:K}=$;p.push(0);for(const[et,lt]of g.entries()){const it=(et+1)%2===0&<.yOffset!==0,It=P.rectangle(N,u.height+B+lt?.yOffset,F,lt?.rowHeight,{...R,fill:it?E:Y,stroke:K});h.insert(()=>It,"g.label").attr("style",o.join("")).attr("class",`row-rect-${it?"even":"odd"}`)}let ct=P.line(N,u.height+B,F+N,u.height+B,R);h.insert(()=>ct).attr("class","divider"),ct=P.line(m+N,u.height+B,m+N,z+B,R),h.insert(()=>ct).attr("class","divider"),_&&(ct=P.line(m+y+N,u.height+B,m+y+N,z+B,R),h.insert(()=>ct).attr("class","divider")),k&&(ct=P.line(m+y+x+N,u.height+B,m+y+x+N,z+B,R),h.insert(()=>ct).attr("class","divider"));for(const et of p)ct=P.line(N,u.height+B+et,F+N,u.height+B+et,R),h.insert(()=>ct).attr("class","divider");if(Z(t,T),l&&t.look!=="handDrawn"){const lt=l.split(";")?.filter(dt=>dt.includes("stroke"))?.map(dt=>`${dt}`).join("; ");h.selectAll("path").attr("style",lt??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(et){return j.rect(t,et)},h}d(Js,"erBox");async function kr(e,t,r,i=0,a=0,n=[],o=""){const s=e.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==Qo(t)&&(t=Qo(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await He(s,t,{width:Le(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(Mt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=ut(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}d(kr,"addText");async function Ef(e,t,r,i,a=r.class.padding??12){const n=i?0:3,o=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,h=null,u=0,f=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ri(s,{text:`«${b}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ri(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 ri(c,b,m,[b.parseClassifier()]);m+=_+n}p=c.node().getBBox().height,p<=0&&(p=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const _=await ri(h,b,y,[b.parseClassifier()]);y+=_+n}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+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(p?p+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}d(Ef,"textHelper");async function ri(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),n=zt();let o="useHtmlLabels"in t?t.useHtmlLabels:Mt(n.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),Fr(s)&&(o=!0);const l=await He(a,ks(fr(s)),{width:Le(s,n)+50,classes:"markdown-node-label",useHtmlLabels:o},n);let c,h=1;if(o){const u=l.children[0],f=ut(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const p=u.getElementsByTagName("img");if(p){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=n.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)}d(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")&&ut(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 a.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}d(ri,"addText");async function Ff(e,t){const r=pt(),i=r.class.padding??12,a=i,n=t.useHtmlLabels??Mt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await Ef(e,t,r,n,a),{labelStyles:c,nodeStyles:h}=X(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,p=G.svg(s),g=V(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+=a:o.members.length>0&&o.methods.length===0&&(y+=a*2);const x=-m/2,b=-y/2,_=p.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 S=k.node().getBBox();s.selectAll(".text").each((R,D,F)=>{const z=ut(F[D]),N=z.attr("transform");let B=0;if(N){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);E&&(B=parseFloat(E[2]))}let M=B+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);n||(M-=4);let T=x;(z.attr("class").includes("label-group")||z.attr("class").includes("annotation-group"))&&(T=-z.node()?.getBBox().width/2||0,s.selectAll("text").each(function($,E,Y){window.getComputedStyle(Y[E]).textAnchor==="middle"&&(T=0)})),z.attr("transform",`translate(${T}, ${M})`)});const A=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,L=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,P=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const R=p.line(S.x,A+L+b+i,S.x+S.width,A+L+b+i,g);s.insert(()=>R).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const R=p.line(S.x,A+L+P+b+a*2+i,S.x+S.width,A+L+P+b+i+a*2,g);s.insert(()=>R).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),!n){const R=RegExp(/color\s*:\s*([^;]*)/),D=R.exec(u);if(D){const F=D[0].replace("color","fill");s.selectAll("tspan").attr("style",F)}else if(c){const F=R.exec(c);if(F){const z=F[0].replace("color","fill");s.selectAll("tspan").attr("style",z)}}}return Z(t,k),t.intersect=function(R){return j.rect(t,R)},s}d(Ff,"classBox");async function $f(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t,n=t,o=20,s=20,l="verifyMethod"in t,c=rt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await ye(h,`<<${a.type}>>`,0,t.labelStyle):u=await ye(h,"<<Element>>",0,t.labelStyle);let f=u;const p=await ye(h,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=p+s,l){const A=await ye(h,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=A;const L=await ye(h,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=L;const P=await ye(h,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=P,await ye(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const A=await ye(h,`${n.type?`Type: ${n.type}`:""}`,f,t.labelStyle);f+=A,await ye(h,`${n.docRef?`Doc Ref: ${n.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=G.svg(h),_=V(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=b.rectangle(y,x,g,m,_),S=h.insert(()=>k,":first-child");if(S.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((A,L,P)=>{const R=ut(P[L]),D=R.attr("transform");let F=0,z=0;if(D){const T=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);T&&(F=parseFloat(T[1]),z=parseFloat(T[2]))}const N=z-m/2;let B=y+o/2;(L===0||L===1)&&(B=F),R.attr("transform",`translate(${B}, ${N+o})`)}),f>u+p+s){const A=b.line(y,x+u+p+s,y+g,x+u+p+s,_);h.insert(()=>A).attr("style",i)}return Z(t,S),t.intersect=function(A){return j.rect(t,A)},h}d($f,"requirementBox");async function ye(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=pt(),o=n.htmlLabels??!0,s=await He(a,ks(fr(t)),{width:Le(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let l;if(o){const c=s.children[0],h=ut(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 a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}d(ye,"addText");var _1=d(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 Of(e,t,{config:r}){const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i||"";const n=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await at(e,t,rt(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 p={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 Ln(f,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await Ln(s,"ticket"in t&&t.ticket||"",p);const{label:y,bbox:x}=await Ln(s,"assigned"in t&&t.assigned||"",p);t.width=o;const b=10,_=t?.width||0,k=Math.max(m.height,x.height)/2,S=Math.max(l.height+b*2,t?.height||0)+k,A=-_/2,L=-S/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*n)+", "+(-k+l.height/2)+")");let P;const{rx:R,ry:D}=t,{cssStyles:F}=t;if(t.look==="handDrawn"){const z=G.svg(s),N=V(t,{}),B=R||D?z.path(je(A,L,_,S,R||0),N):z.rectangle(A,L,_,S,N);P=s.insert(()=>B,":first-child"),P.attr("class","basic label-container").attr("style",F||null)}else{P=s.insert("rect",":first-child"),P.attr("class","basic label-container __APA__").attr("style",a).attr("rx",R??5).attr("ry",D??5).attr("x",A).attr("y",L).attr("width",_).attr("height",S);const z="priority"in t&&t.priority;if(z){const N=s.append("line"),B=A+2,M=L+Math.floor((R??0)/2),T=L+S-Math.floor((R??0)/2);N.attr("x1",B).attr("y1",M).attr("x2",B).attr("y2",T).attr("stroke-width","4").attr("stroke",_1(z))}}return Z(t,P),t.height=S,t.intersect=function(z){return j.rect(t,z)},s}d(Of,"kanbanItem");async function Df(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await at(e,t,rt(t)),l=n.width+10*o,c=n.height+8*o,h=.15*l,{cssStyles:u}=t,f=n.width+20,p=n.height+20,g=Math.max(l,f),m=Math.max(c,p);s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let y;const x=`M0 0
|
|
139
|
+
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|
140
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
141
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
142
|
+
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|
143
|
+
|
|
144
|
+
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|
145
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
146
|
+
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|
147
|
+
|
|
148
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|
149
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
150
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
151
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|
152
|
+
|
|
153
|
+
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|
154
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
155
|
+
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|
156
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=G.svg(a),_=V(t,{}),k=b.path(x,_);y=a.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",Ht(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Z(t,y),t.calcIntersect=function(b,_){return j.rect(b,_)},t.intersect=function(b){return O.info("Bang intersect",t,b),j.rect(t,b)},a}d(Df,"bang");async function If(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await at(e,t,rt(t)),l=n.width+2*o,c=n.height+2*o,h=.15*l,u=.25*l,f=.35*l,p=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|
157
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
158
|
+
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
159
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
160
|
+
|
|
161
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
162
|
+
a${p},${p} 1 0,1 ${-1*l*.15},${c*.65}
|
|
163
|
+
|
|
164
|
+
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
165
|
+
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
166
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
167
|
+
|
|
168
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
169
|
+
a${p},${p} 1 0,1 ${l*.1},${-1*c*.65}
|
|
170
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=G.svg(a),b=V(t,{}),_=x.path(y,b);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",Ht(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Z(t,m),t.calcIntersect=function(x,b){return j.rect(x,b)},t.intersect=function(x){return O.info("Cloud intersect",t,x),j.rect(t,x)},a}d(If,"cloud");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await at(e,t,rt(t)),l=n.width+8*o,c=n.height+2*o,h=5,u=`
|
|
171
|
+
M${-l/2} ${c/2-h}
|
|
172
|
+
v${-c+2*h}
|
|
173
|
+
q0,-${h} ${h},-${h}
|
|
174
|
+
h${l-2*h}
|
|
175
|
+
q${h},0 ${h},${h}
|
|
176
|
+
v${c-2*h}
|
|
177
|
+
q0,${h} -${h},${h}
|
|
178
|
+
h${-l+2*h}
|
|
179
|
+
q-${h},0 -${h},-${h}
|
|
180
|
+
Z
|
|
181
|
+
`,f=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),a.append(()=>s.node()),Z(t,f),t.calcIntersect=function(p,g){return j.rect(p,g)},t.intersect=function(p){return j.rect(t,p)},a}d(Pf,"defaultMindmapNode");async function Rf(e,t){const r={padding:t.padding??0};return Qs(e,t,r)}d(Rf,"mindmapCircle");var S1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:gf},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:df},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:mf},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Cf},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Rd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Qs},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Df},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:If},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:cf},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Yd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:ef},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tf},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:kf},{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:Qd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Wd},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:wf},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Md},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:ff},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:bf},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:xf},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Hd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ud},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Od},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Dd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Id},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:rf},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Bf},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:jd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:vf},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:af},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Pd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Nd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Lf},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Mf},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:zd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Tf},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:qd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:pf},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:of},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:sf},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ad},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:$d},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Sf},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:_f},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Af},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:hf},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:nf}],w1=d(()=>{const t=[...Object.entries({state:yf,choice:Ed,note:lf,rectWithTitle:uf,labelRect:Jd,iconSquare:Kd,iconCircle:Vd,icon:Gd,iconRounded:Xd,imageSquare:Zd,anchor:Bd,kanbanItem:Of,mindmapCircle:Rf,defaultMindmapNode:Pf,classBox:Ff,erBox:Js,requirementBox:$f}),...S1.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Nf=w1();function v1(e){return e in Nf}d(v1,"isValidShape");var Ya=new Map;async function Wf(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const n=t.shape?Nf[t.shape]:void 0;if(!n)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),a=await n(i,t,r)}else a=await n(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),Ya.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}d(Wf,"insertNode");var Ew=d((e,t)=>{Ya.set(t.id,e)},"setNodeElem"),Fw=d(()=>{Ya.clear()},"clear"),$w=d(e=>{const t=Ya.get(e.id);O.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"),k1=d((e,t,r,i,a,n)=>{t.arrowTypeStart&&Rl(e,"start",t.arrowTypeStart,r,i,a,n),t.arrowTypeEnd&&Rl(e,"end",t.arrowTypeEnd,r,i,a,n)},"addEdgeMarkers"),T1={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}},Rl=d((e,t,r,i,a,n,o)=>{const s=T1[r];if(!s){O.warn(`Unknown arrow type: ${r}`);return}const l=s.type,h=`${a}_${n}-${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 p=document.getElementById(h);if(p){const g=p.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),s.fill&&y.setAttribute("fill",o)}),p.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),ka=new Map,Dt=new Map,Ow=d(()=>{ka.clear(),Dt.clear()},"clear"),qi=d(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),L1=d(async(e,t)=>{let r=Mt(pt().flowchart.htmlLabels);const{labelStyles:i}=X(t);t.labelStyle=i;const a=await He(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});O.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),o=n.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(a);let s=a.getBBox();if(r){const c=a.children[0],h=ut(a);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),ka.set(t.id,n),t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=await ar(t.startLabelLeft,qi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Dt.get(t.id)||Dt.set(t.id,{}),Dt.get(t.id).startLeft=h,ii(l,t.startLabelLeft)}if(t.startLabelRight){const c=await ar(t.startLabelRight,qi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Dt.get(t.id)||Dt.set(t.id,{}),Dt.get(t.id).startRight=h,ii(l,t.startLabelRight)}if(t.endLabelLeft){const c=await ar(t.endLabelLeft,qi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Dt.get(t.id)||Dt.set(t.id,{}),Dt.get(t.id).endLeft=h,ii(l,t.endLabelLeft)}if(t.endLabelRight){const c=await ar(t.endLabelRight,qi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Dt.get(t.id)||Dt.set(t.id,{}),Dt.get(t.id).endRight=h,ii(l,t.endLabelRight)}return a},"insertEdgeLabel");function ii(e,t){pt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(ii,"setTerminalWidth");var B1=d((e,t)=>{O.debug("Moving label abc88 ",e.id,e.label,ka.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=pt(),{subGraphTitleTotalMargin:a}=Rs(i);if(e.label){const n=ka.get(e.id);let o=e.x,s=e.y;if(r){const l=oe.calcLabelPosition(r);O.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}n.attr("transform",`translate(${o}, ${s+a/2})`)}if(e.startLabelLeft){const n=Dt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const n=Dt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const n=Dt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const n=Dt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),A1=d((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),n=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return a>=o||n>=s},"outsideNode"),M1=d((e,t,r)=>{O.debug(`intersection calc abc89:
|
|
182
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
183
|
+
insidePoint : ${JSON.stringify(r)}
|
|
184
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,n=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-n:o+n;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-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),O.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,p=r.y<t.y?r.y+u:r.y-u;return O.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${s}`,{_x:f,_y:p}),s===0&&(f=t.x,p=t.y),h===0&&(f=t.x),c===0&&(p=t.y),{x:f,y:p}}},"intersection"),Nl=d((e,t)=>{O.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(n=>{if(O.info("abc88 checking point",n,t),!A1(t,n)&&!a){const o=M1(t,i,n);O.debug("abc88 inside",n,i,o),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)?O.warn("abc88 no intersect",o,r):r.push(o),a=!0}else O.warn("abc88 outside",n,i),i=n,a||r.push(n)}),O.debug("returning points",r),r},"cutPathAtIntersect");function zf(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],n=e[i],o=e[i+1];(a.x===n.x&&n.y===o.y&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===o.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5)&&(t.push(n),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}d(zf,"extractCornerPoints");var Wl=d(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,n=Math.sqrt(i*i+a*a),o=r/n;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),E1=d(function(e){const{cornerPointPositions:t}=zf(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],n=e[i+1],o=e[i],s=Wl(a,o,5),l=Wl(n,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(n.x-a.x)>10&&Math.abs(n.y-a.y)>=10){O.debug("Corner point fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));const p=5;o.x===s.x?f={x:c<0?s.x-p+u:s.x+p-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-p+u:s.y+p-u}}else O.debug("Corner point skipping fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),F1=d((e,t,r)=>{const i=e-t-r,a=2,n=2,o=a+n,s=Math.floor(i/o),l=Array(s).fill(`${a} ${n}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),$1=d(function(e,t,r,i,a,n,o,s=!1){const{handDrawnSeed:l}=pt();let c=t.points,h=!1;const u=a;var f=n;const p=[];for(const B in t.cssCompiledStyles)Lu(B)||p.push(t.cssCompiledStyles[B]);O.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!s&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),O.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(O.info("to cluster abc88",r.get(t.toCluster)),c=Nl(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(O.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Nl(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(B=>!Number.isNaN(B.y));m=E1(m);let y=Ui;switch(y=na,t.curve){case"linear":y=na;break;case"basis":y=Ui;break;case"cardinal":y=Ec;break;case"bumpX":y=Tc;break;case"bumpY":y=Lc;break;case"catmullRom":y=$c;break;case"monotoneX":y=Nc;break;case"monotoneY":y=Wc;break;case"natural":y=qc;break;case"step":y=Hc;break;case"stepAfter":y=Yc;break;case"stepBefore":y=jc;break;default:y=Ui}const{x,y:b}=d0(t),_=Xm().x(x).y(b).curve(y);let k;switch(t.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-invisible";break;default:k="edge-thickness-normal"}switch(t.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break;default:k+=" edge-pattern-solid"}let S,A=t.curve==="rounded"?qf(Hf(m,t),5):_(m);const L=Array.isArray(t.style)?t.style:[t.style];let P=L.find(B=>B?.startsWith("stroke:")),R=!1;if(t.look==="handDrawn"){const B=G.svg(e);Object.assign([],m);const M=B.path(A,{roughness:.3,seed:l});k+=" transition",S=ut(M).select("path").attr("id",t.id).attr("class"," "+k+(t.classes?" "+t.classes:"")).attr("style",L?L.reduce(($,E)=>$+";"+E,""):"");let T=S.attr("d");S.attr("d",T),e.node().appendChild(S.node())}else{const B=p.join(";"),M=L?L.reduce((et,lt)=>et+lt+";",""):"";let T="";t.animate&&(T=" edge-animation-fast"),t.animation&&(T=" edge-animation-"+t.animation);const $=(B?B+";"+M+";":M)+";"+(L?L.reduce((et,lt)=>et+";"+lt,""):"");S=e.append("path").attr("d",A).attr("id",t.id).attr("class"," "+k+(t.classes?" "+t.classes:"")+(T??"")).attr("style",$),P=$.match(/stroke:([^;]+)/)?.[1],R=t.animate===!0||!!t.animation||B.includes("animation");const E=S.node(),Y=typeof E.getTotalLength=="function"?E.getTotalLength():0,K=cl[t.arrowTypeStart]||0,ct=cl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!R){const lt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?F1(Y,K,ct):`0 ${K} ${Y-K-ct} ${ct}`}; stroke-dashoffset: 0;`;S.attr("style",lt+S.attr("style"))}}S.attr("data-edge",!0),S.attr("data-et","edge"),S.attr("data-id",t.id),S.attr("data-points",g),t.showPoints&&m.forEach(B=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",B.x).attr("cy",B.y)});let D="";(pt().flowchart.arrowMarkerAbsolute||pt().state.arrowMarkerAbsolute)&&(D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),O.info("arrowTypeStart",t.arrowTypeStart),O.info("arrowTypeEnd",t.arrowTypeEnd),k1(S,t,D,o,i,P);const F=Math.floor(c.length/2),z=c[F];oe.isLabelCoordinateInPath(z,S.attr("d"))||(h=!0);let N={};return h&&(N.updatedPath=c),N.originalPath=t.points,N},"insertEdge");function qf(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let n=0;n<i;n++){const o=e[n],s=e[n-1],l=e[n+1];if(n===0)r+=`M${o.x},${o.y}`;else if(n===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-s.x,h=o.y-s.y,u=l.x-o.x,f=l.y-o.y,p=Math.hypot(c,h),g=Math.hypot(u,f);if(p<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=c/p,y=h/p,x=u/g,b=f/g,_=m*x+y*b,k=Math.max(-1,Math.min(1,_)),S=Math.acos(k);if(S<a||Math.abs(Math.PI-S)<a){r+=`L${o.x},${o.y}`;continue}const A=Math.min(t/Math.sin(S/2),p/2,g/2),L=o.x-m*A,P=o.y-y*A,R=o.x+x*A,D=o.y+b*A;r+=`L${L},${P}`,r+=`Q${o.x},${o.y} ${R},${D}`}}return r}d(qf,"generateRoundedPath");function cs(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}d(cs,"calculateDeltaAndAngle");function Hf(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Wt[t.arrowTypeStart]){const a=Wt[t.arrowTypeStart],n=e[0],o=e[1],{angle:s}=cs(n,o),l=a*Math.cos(s),c=a*Math.sin(s);r[0].x=n.x+l,r[0].y=n.y+c}const i=e.length;if(i>=2&&Wt[t.arrowTypeEnd]){const a=Wt[t.arrowTypeEnd],n=e[i-1],o=e[i-2],{angle:s}=cs(o,n),l=a*Math.cos(s),c=a*Math.sin(s);r[i-1].x=n.x-l,r[i-1].y=n.y-c}return r}d(Hf,"applyMarkerOffsetsToPoints");var O1=d((e,t,r,i)=>{t.forEach(a=>{K1[a](e,r,i)})},"insertMarkers"),D1=d((e,t,r)=>{O.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"),I1=d((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"),P1=d((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"),R1=d((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"),N1=d((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"),W1=d((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"),z1=d((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"),q1=d((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"),H1=d((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"),j1=d((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"),Y1=d((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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),U1=d((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"),G1=d((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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),V1=d((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
|
|
185
|
+
L20,10
|
|
186
|
+
M20,10
|
|
187
|
+
L0,20`)},"requirement_arrow"),X1=d((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"),K1={extension:D1,composition:I1,aggregation:P1,dependency:R1,lollipop:N1,point:W1,circle:z1,cross:q1,barb:H1,only_one:j1,zero_or_one:Y1,one_or_more:U1,zero_or_more:G1,requirement_arrow:V1,requirement_contains:X1},Z1=O1,Q1={common:Pr,getConfig:zt,insertCluster:s1,insertEdge:$1,insertEdgeLabel:L1,insertMarkers:Z1,insertNode:Wf,interpolateToCurve:Hs,labelHelper:at,log:O,positionEdgeLabel:B1},mi={},jf=d(e=>{for(const t of e)mi[t.name]=t},"registerLayoutLoaders"),J1=d(()=>{jf([{name:"dagre",loader:d(async()=>await gt(()=>import("./dagre-6UL2VRFP-BC4b_XYs.js"),__vite__mapDeps([5,6,7,8,9,10,1,2,0,3,4])),"loader")},{name:"cose-bilkent",loader:d(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A-DAVrPej8.js"),__vite__mapDeps([11,12,1,2,0,3,4])),"loader")}])},"registerDefaultLayoutLoaders");J1();var Dw=d(async(e,t)=>{if(!(e.layoutAlgorithm in mi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=mi[e.layoutAlgorithm];return(await r.loader()).render(e,t,Q1,{algorithm:r.algorithm})},"render"),Iw=d((e="",{fallback:t="dagre"}={})=>{if(e in mi)return e;if(t in mi)return O.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"),Yf="comm",Uf="rule",Gf="decl",tC="@import",eC="@namespace",rC="@keyframes",iC="@layer",Vf=Math.abs,to=String.fromCharCode;function Xf(e){return e.trim()}function Zi(e,t,r){return e.replace(t,r)}function aC(e,t,r){return e.indexOf(t,r)}function Ar(e,t){return e.charCodeAt(t)|0}function Dr(e,t,r){return e.slice(t,r)}function xe(e){return e.length}function nC(e){return e.length}function Hi(e,t){return t.push(e),e}var Ua=1,Ir=1,Kf=0,se=0,kt=0,qr="";function eo(e,t,r,i,a,n,o,s){return{value:e,root:t,parent:r,type:i,props:a,children:n,line:Ua,column:Ir,length:o,return:"",siblings:s}}function sC(){return kt}function oC(){return kt=se>0?Ar(qr,--se):0,Ir--,kt===10&&(Ir=1,Ua--),kt}function ce(){return kt=se<Kf?Ar(qr,se++):0,Ir++,kt===10&&(Ir=1,Ua++),kt}function Ie(){return Ar(qr,se)}function Qi(){return se}function Ga(e,t){return Dr(qr,e,t)}function yi(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 lC(e){return Ua=Ir=1,Kf=xe(qr=e),se=0,[]}function cC(e){return qr="",e}function Bn(e){return Xf(Ga(se-1,hs(e===91?e+2:e===40?e+1:e)))}function hC(e){for(;(kt=Ie())&&kt<33;)ce();return yi(e)>2||yi(kt)>3?"":" "}function uC(e,t){for(;--t&&ce()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Ga(e,Qi()+(t<6&&Ie()==32&&ce()==32))}function hs(e){for(;ce();)switch(kt){case e:return se;case 34:case 39:e!==34&&e!==39&&hs(kt);break;case 40:e===41&&hs(e);break;case 92:ce();break}return se}function dC(e,t){for(;ce()&&e+kt!==57;)if(e+kt===84&&Ie()===47)break;return"/*"+Ga(t,se-1)+"*"+to(e===47?e:ce())}function fC(e){for(;!yi(Ie());)ce();return Ga(e,se)}function pC(e){return cC(Ji("",null,null,null,[""],e=lC(e),0,[0],e))}function Ji(e,t,r,i,a,n,o,s,l){for(var c=0,h=0,u=o,f=0,p=0,g=0,m=1,y=1,x=1,b=0,_="",k=a,S=n,A=i,L=_;y;)switch(g=b,b=ce()){case 40:if(g!=108&&Ar(L,u-1)==58){aC(L+=Zi(Bn(b),"&","&\f"),"&\f",Vf(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:L+=Bn(b);break;case 9:case 10:case 13:case 32:L+=hC(g);break;case 92:L+=uC(Qi()-1,7);continue;case 47:switch(Ie()){case 42:case 47:Hi(gC(dC(ce(),Qi()),t,r,l),l),(yi(g||1)==5||yi(Ie()||1)==5)&&xe(L)&&Dr(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*m:s[c++]=xe(L)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(L=Zi(L,/\f/g,"")),p>0&&(xe(L)-u||m===0&&g===47)&&Hi(p>32?ql(L+";",i,r,u-1,l):ql(Zi(L," ","")+";",i,r,u-2,l),l);break;case 59:L+=";";default:if(Hi(A=zl(L,t,r,c,h,a,s,_,k=[],S=[],u,n),n),b===123)if(h===0)Ji(L,t,A,A,k,n,u,s,S);else{switch(f){case 99:if(Ar(L,3)===110)break;case 108:if(Ar(L,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Ji(e,A,A,i&&Hi(zl(e,A,A,0,0,a,s,_,a,k=[],u,S),S),a,S,u,s,i?k:S):Ji(L,A,A,A,[""],S,0,s,S)}}c=h=p=0,m=x=1,_=L="",u=o;break;case 58:u=1+xe(L),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&oC()==125)continue}switch(L+=to(b),b*m){case 38:x=h>0?1:(L+="\f",-1);break;case 44:s[c++]=(xe(L)-1)*x,x=1;break;case 64:Ie()===45&&(L+=Bn(ce())),f=Ie(),h=u=xe(_=L+=fC(Qi())),b++;break;case 45:g===45&&xe(L)==2&&(m=0)}}return n}function zl(e,t,r,i,a,n,o,s,l,c,h,u){for(var f=a-1,p=a===0?n:[""],g=nC(p),m=0,y=0,x=0;m<i;++m)for(var b=0,_=Dr(e,f+1,f=Vf(y=o[m])),k=e;b<g;++b)(k=Xf(y>0?p[b]+" "+_:Zi(_,/&\f/g,p[b])))&&(l[x++]=k);return eo(e,t,r,a===0?Uf:s,l,c,h,u)}function gC(e,t,r,i){return eo(e,t,r,Yf,to(sC()),Dr(e,2,-2),0,i)}function ql(e,t,r,i,a){return eo(e,t,r,Gf,Dr(e,0,i),Dr(e,i+1,-1),i,a)}function us(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function mC(e,t,r,i){switch(e.type){case iC:if(e.children.length)break;case tC:case eC:case Gf:return e.return=e.return||e.value;case Yf:return"";case rC:return e.return=e.value+"{"+us(e.children,i)+"}";case Uf:if(!xe(e.value=e.props.join(",")))return""}return xe(r=us(e.children,i))?e.return=e.value+"{"+r+"}":""}var yC=Fu(Object.keys,Object),xC=Object.prototype,bC=xC.hasOwnProperty;function CC(e){if(!Ra(e))return yC(e);var t=[];for(var r in Object(e))bC.call(e,r)&&r!="constructor"&&t.push(r);return t}var ds=dr(_e,"DataView"),fs=dr(_e,"Promise"),ps=dr(_e,"Set"),gs=dr(_e,"WeakMap"),Hl="[object Map]",_C="[object Object]",jl="[object Promise]",Yl="[object Set]",Ul="[object WeakMap]",Gl="[object DataView]",SC=ur(ds),wC=ur(pi),vC=ur(fs),kC=ur(ps),TC=ur(gs),tr=Nr;(ds&&tr(new ds(new ArrayBuffer(1)))!=Gl||pi&&tr(new pi)!=Hl||fs&&tr(fs.resolve())!=jl||ps&&tr(new ps)!=Yl||gs&&tr(new gs)!=Ul)&&(tr=function(e){var t=Nr(e),r=t==_C?e.constructor:void 0,i=r?ur(r):"";if(i)switch(i){case SC:return Gl;case wC:return Hl;case vC:return jl;case kC:return Yl;case TC:return Ul}return t});var LC="[object Map]",BC="[object Set]",AC=Object.prototype,MC=AC.hasOwnProperty;function Vl(e){if(e==null)return!0;if(Na(e)&&(xa(e)||typeof e=="string"||typeof e.splice=="function"||zs(e)||qs(e)||ya(e)))return!e.length;var t=tr(e);if(t==LC||t==BC)return!e.size;if(Ra(e))return!CC(e).length;for(var r in e)if(MC.call(e,r))return!1;return!0}var Zf="c4",EC=d(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),FC=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-Cd2JXSKY.js");return{diagram:t}},__vite__mapDeps([13,14,1,2,0,3,4]));return{id:Zf,diagram:e}},"loader"),$C={id:Zf,detector:EC,loader:FC},OC=$C,Qf="flowchart",DC=d((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),IC=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-DhKFlSYT.js");return{diagram:t}},__vite__mapDeps([15,16,17,1,2,18,19,0,3,4]));return{id:Qf,diagram:e}},"loader"),PC={id:Qf,detector:DC,loader:IC},RC=PC,Jf="flowchart-v2",NC=d((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"),WC=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-DhKFlSYT.js");return{diagram:t}},__vite__mapDeps([15,16,17,1,2,18,19,0,3,4]));return{id:Jf,diagram:e}},"loader"),zC={id:Jf,detector:NC,loader:WC},qC=zC,tp="er",HC=d(e=>/^\s*erDiagram/.test(e),"detector"),jC=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-CbAO0LL2.js");return{diagram:t}},__vite__mapDeps([20,17,1,2,18,19,0,3,4]));return{id:tp,diagram:e}},"loader"),YC={id:tp,detector:HC,loader:jC},UC=YC,ep="gitGraph",GC=d(e=>/^\s*gitGraph/.test(e),"detector"),VC=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-V2S2FVAM-BuY8ZQCy.js");return{diagram:t}},__vite__mapDeps([21,22,23,24,1,2,7,9,10,0,3,4]));return{id:ep,diagram:e}},"loader"),XC={id:ep,detector:GC,loader:VC},KC=XC,rp="gantt",ZC=d(e=>/^\s*gantt/.test(e),"detector"),QC=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3-BSLWLuNm.js");return{diagram:t}},__vite__mapDeps([25,1,2,26,27,28,0,3,4]));return{id:rp,diagram:e}},"loader"),JC={id:rp,detector:ZC,loader:QC},t_=JC,ip="info",e_=d(e=>/^\s*info/.test(e),"detector"),r_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-HS3SLOUP-BMxiOms9.js");return{diagram:t}},__vite__mapDeps([29,24,1,2,7,9,10,0,3,4]));return{id:ip,diagram:e}},"loader"),i_={id:ip,detector:e_,loader:r_},ap="pie",a_=d(e=>/^\s*pie/.test(e),"detector"),n_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-BAEg106K.js");return{diagram:t}},__vite__mapDeps([30,22,24,1,2,7,9,10,31,32,27,0,3,4]));return{id:ap,diagram:e}},"loader"),s_={id:ap,detector:a_,loader:n_},np="quadrantChart",o_=d(e=>/^\s*quadrantChart/.test(e),"detector"),l_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-DnH9aNk6.js");return{diagram:t}},__vite__mapDeps([33,1,2,26,27,28,0,3,4]));return{id:np,diagram:e}},"loader"),c_={id:np,detector:o_,loader:l_},h_=c_,sp="xychart",u_=d(e=>/^\s*xychart(-beta)?/.test(e),"detector"),d_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-CQSQ6r3l.js");return{diagram:t}},__vite__mapDeps([34,1,2,27,32,26,28,0,3,4]));return{id:sp,diagram:e}},"loader"),f_={id:sp,detector:u_,loader:d_},p_=f_,op="requirement",g_=d(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),m_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-BC08j3iJ.js");return{diagram:t}},__vite__mapDeps([35,17,1,2,18,0,3,4]));return{id:op,diagram:e}},"loader"),y_={id:op,detector:g_,loader:m_},x_=y_,lp="sequence",b_=d(e=>/^\s*sequenceDiagram/.test(e),"detector"),C_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-Y_hpHzaj.js");return{diagram:t}},__vite__mapDeps([36,14,23,1,2,0,3,4]));return{id:lp,diagram:e}},"loader"),__={id:lp,detector:b_,loader:C_},S_=__,cp="class",w_=d((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),v_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-COA7cz19.js");return{diagram:t}},__vite__mapDeps([37,38,16,17,1,2,18,0,3,4]));return{id:cp,diagram:e}},"loader"),k_={id:cp,detector:w_,loader:v_},T_=k_,hp="classDiagram",L_=d((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),B_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-COA7cz19.js");return{diagram:t}},__vite__mapDeps([39,38,16,17,1,2,18,0,3,4]));return{id:hp,diagram:e}},"loader"),A_={id:hp,detector:L_,loader:B_},M_=A_,up="state",E_=d((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),F_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-Cn_uBJn5.js");return{diagram:t}},__vite__mapDeps([40,41,17,1,2,18,6,7,8,9,0,3,4]));return{id:up,diagram:e}},"loader"),$_={id:up,detector:E_,loader:F_},O_=$_,dp="stateDiagram",D_=d((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),I_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-4ptWp8bn.js");return{diagram:t}},__vite__mapDeps([42,41,17,1,2,18,0,3,4]));return{id:dp,diagram:e}},"loader"),P_={id:dp,detector:D_,loader:I_},R_=P_,fp="journey",N_=d(e=>/^\s*journey/.test(e),"detector"),W_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-DCWsE8zZ.js");return{diagram:t}},__vite__mapDeps([43,14,16,1,2,31,0,3,4]));return{id:fp,diagram:e}},"loader"),z_={id:fp,detector:N_,loader:W_},q_=z_,H_=d((e,t,r)=>{O.debug(`rendering svg for syntax error
|
|
188
|
+
`);const i=ay(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),_c(i,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),pp={draw:H_},j_=pp,Y_={db:{},renderer:pp,parser:{parse:d(()=>{},"parse")}},U_=Y_,gp="flowchart-elk",G_=d((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),V_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-DhKFlSYT.js");return{diagram:t}},__vite__mapDeps([15,16,17,1,2,18,19,0,3,4]));return{id:gp,diagram:e}},"loader"),X_={id:gp,detector:G_,loader:V_},K_=X_,mp="timeline",Z_=d(e=>/^\s*timeline/.test(e),"detector"),Q_=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-Pm7JOk6q.js");return{diagram:t}},__vite__mapDeps([44,1,2,31,0,3,4]));return{id:mp,diagram:e}},"loader"),J_={id:mp,detector:Z_,loader:Q_},tS=J_,yp="mindmap",eS=d(e=>/^\s*mindmap/.test(e),"detector"),rS=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-CuBc5wmR.js");return{diagram:t}},__vite__mapDeps([45,17,1,2,18,0,3,4]));return{id:yp,diagram:e}},"loader"),iS={id:yp,detector:eS,loader:rS},aS=iS,xp="kanban",nS=d(e=>/^\s*kanban/.test(e),"detector"),sS=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-CB2mRoXc.js");return{diagram:t}},__vite__mapDeps([46,16,1,2,0,3,4]));return{id:xp,diagram:e}},"loader"),oS={id:xp,detector:nS,loader:sS},lS=oS,bp="sankey",cS=d(e=>/^\s*sankey(-beta)?/.test(e),"detector"),hS=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-D2w97jyv.js");return{diagram:t}},__vite__mapDeps([47,1,2,32,27,0,3,4]));return{id:bp,diagram:e}},"loader"),uS={id:bp,detector:cS,loader:hS},dS=uS,Cp="packet",fS=d(e=>/^\s*packet(-beta)?/.test(e),"detector"),pS=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-9lXj7QHC.js");return{diagram:t}},__vite__mapDeps([48,22,24,1,2,7,9,10,0,3,4]));return{id:Cp,diagram:e}},"loader"),gS={id:Cp,detector:fS,loader:pS},_p="radar",mS=d(e=>/^\s*radar-beta/.test(e),"detector"),yS=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-BVhCBnwr.js");return{diagram:t}},__vite__mapDeps([49,22,24,1,2,7,9,10,0,3,4]));return{id:_p,diagram:e}},"loader"),xS={id:_p,detector:mS,loader:yS},Sp="block",bS=d(e=>/^\s*block(-beta)?/.test(e),"detector"),CS=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-CJmwT1sH.js");return{diagram:t}},__vite__mapDeps([50,16,10,7,1,2,6,19,0,3,4]));return{id:Sp,diagram:e}},"loader"),_S={id:Sp,detector:bS,loader:CS},SS=_S,wp="architecture",wS=d(e=>/^\s*architecture/.test(e),"detector"),vS=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-Vk4L8Lzc.js");return{diagram:t}},__vite__mapDeps([51,22,24,1,2,7,9,10,12,0,3,4]));return{id:wp,diagram:e}},"loader"),kS={id:wp,detector:wS,loader:vS},TS=kS,vp="treemap",LS=d(e=>/^\s*treemap/.test(e),"detector"),BS=d(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-DNFChJ0f.js");return{diagram:t}},__vite__mapDeps([52,18,22,24,1,2,7,9,10,28,32,27,0,3,4]));return{id:vp,diagram:e}},"loader"),AS={id:vp,detector:LS,loader:BS},Xl=!1,Va=d(()=>{Xl||(Xl=!0,aa("error",U_,e=>e.toLowerCase().trim()==="error"),aa("---",{db:{clear:d(()=>{},"clear")},styles:{},renderer:{draw:d(()=>{},"draw")},parser:{parse:d(()=>{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:d(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Fn(K_,aS,TS),Fn(OC,lS,M_,T_,UC,t_,i_,s_,x_,S_,qC,RC,tS,KC,R_,O_,q_,h_,dS,gS,p_,SS,xS,AS))},"addDiagrams"),MS=d(async()=>{O.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(nr).map(async([r,{detector:i,loader:a}])=>{if(a)try{In(r)}catch{try{const{diagram:n,id:o}=await a();aa(o,n,i)}catch(n){throw O.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete nr[r],n}}}))).filter(r=>r.status==="rejected");if(t.length>0){O.error(`Failed to load ${t.length} external diagrams`);for(const r of t)O.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),ES="graphics-document document";function kp(e,t){e.attr("role",ES),t!==""&&e.attr("aria-roledescription",t)}d(kp,"setA11yDiagramInfo");function Tp(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}d(Tp,"addSVGa11yTitleDescription");var ms=class Lp{constructor(t,r,i,a,n){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=n}static{d(this,"Diagram")}static async fromText(t,r={}){const i=zt(),a=bs(t,i);t=d2(t)+`
|
|
189
|
+
`;try{In(a)}catch{const c=Vg(a);if(!c)throw new cc(`Diagram ${a} not found.`);const{id:h,diagram:u}=await c();aa(h,u)}const{db:n,parser:o,renderer:s,init:l}=In(a);return o.parser&&(o.parser.yy=n),n.clear?.(),l?.(i),r.title&&n.setDiagramTitle?.(r.title),await o.parse(t),new Lp(a,t,n,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},Kl=[],FS=d(()=>{Kl.forEach(e=>{e()}),Kl=[]},"attachFunctions"),$S=d(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Bp(e){const t=e.match(lc);if(!t)return{text:e,metadata:{}};let r=u0(t[1],{schema:h0})??{};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}}d(Bp,"extractFrontMatter");var OS=d(e=>e.replace(/\r\n?/g,`
|
|
190
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),DS=d(e=>{const{text:t,metadata:r}=Bp(e),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:t}},"processFrontmatter"),IS=d(e=>{const t=oe.detectInit(e)??{},r=oe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:Jb(e),directive:t}},"processDirectives");function ro(e){const t=OS(e),r=DS(t),i=IS(r.text),a=Vs(r.config,i.directive);return e=$S(i.text),{code:e,title:r.title,config:a}}d(ro,"preprocessDiagram");function Ap(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}d(Ap,"toBase64");var PS=5e4,RS="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",NS="sandbox",WS="loose",zS="http://www.w3.org/2000/svg",qS="http://www.w3.org/1999/xlink",HS="http://www.w3.org/1999/xhtml",jS="100%",YS="100%",US="border:0;margin:0;",GS="margin:0",VS="allow-top-navigation-by-user-activation allow-popups",XS='The "iframe" tag is not supported by your browser.',KS=["foreignobject"],ZS=["dominant-baseline"];function io(e){const t=ro(e);return ra(),hm(t.config??{}),t}d(io,"processAndSetConfigs");async function Mp(e,t){Va();try{const{code:r,config:i}=io(e);return{diagramType:(await Fp(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}d(Mp,"parse");var Zl=d((e,t,r=[])=>`
|
|
191
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),QS=d((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
192
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
193
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
194
|
+
: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=>{Vl(s.styles)||o.forEach(l=>{r+=Zl(s.id,l,s.styles)}),Vl(s.textStyles)||(r+=Zl(s.id,"tspan",(s?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),JS=d((e,t,r,i)=>{const a=QS(e,r),n=Mm(t,a,e.themeVariables);return us(pC(`${i}{${n}}`),mC)},"createUserStyles"),tw=d((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=fr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),ew=d((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":YS,i=Ap(`<body style="${GS}">${e}</body>`);return`<iframe style="width:${jS};height:${r};${US}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${VS}">
|
|
195
|
+
${XS}
|
|
196
|
+
</iframe>`},"putIntoIFrame"),Ql=d((e,t,r,i,a)=>{const n=e.append("div");n.attr("id",r),i&&n.attr("style",i);const o=n.append("svg").attr("id",t).attr("width","100%").attr("xmlns",zS);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function ys(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}d(ys,"sandboxedIframe");var rw=d((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),iw=d(async function(e,t,r){Va();const i=io(t);t=i.code;const a=zt();O.debug(a),t.length>(a?.maxTextSize??PS)&&(t=RS);const n="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=d(()=>{const N=ut(f?s:c).node();N&&"remove"in N&&N.remove()},"removeTempElements");let u=ut("body");const f=a.securityLevel===NS,p=a.securityLevel===WS,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const z=ys(ut(r),o);u=ut(z.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ut(r);Ql(u,e,l,`font-family: ${g}`,qS)}else{if(rw(document,e,l,o),f){const z=ys(ut("body"),o);u=ut(z.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ut("body");Ql(u,e,l)}let m,y;try{m=await ms.fromText(t,{title:i.title})}catch(z){if(a.suppressErrorRendering)throw h(),z;m=await ms.fromText("error"),y=z}const x=u.select(c).node(),b=m.type,_=x.firstChild,k=_.firstChild,S=m.renderer.getClasses?.(t,m),A=JS(a,b,S,n),L=document.createElement("style");L.innerHTML=A,_.insertBefore(L,k);try{await m.renderer.draw(t,e,Oo.version,m)}catch(z){throw a.suppressErrorRendering?h():j_.draw(t,e,Oo.version),z}const P=u.select(`${c} svg`),R=m.db.getAccTitle?.(),D=m.db.getAccDescription?.();$p(b,P,R,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",HS);let F=u.select(c).node().innerHTML;if(O.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),F=tw(F,f,Mt(a.arrowMarkerAbsolute)),f){const z=u.select(c+" svg").node();F=ew(F,z)}else p||(F=Mr.sanitize(F,{ADD_TAGS:KS,ADD_ATTR:ZS,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(FS(),y)throw y;return h(),{diagramType:b,svg:F,bindFunctions:m.db.bindFunctions}},"render");function Ep(e={}){const t=Lt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),lm(t),t?.theme&&t.theme in ke?t.themeVariables=ke[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ke.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?om(t):pc();xs(r.logLevel),Va()}d(Ep,"initialize");var Fp=d((e,t={})=>{const{code:r}=ro(e);return ms.fromText(r,t)},"getDiagramFromText");function $p(e,t,r,i){kp(t,e),Tp(t,r,i,t.attr("id"))}d($p,"addA11yInfo");var cr=Object.freeze({render:iw,parse:Mp,getDiagramFromText:Fp,initialize:Ep,getConfig:zt,setConfig:gc,getSiteConfig:pc,updateSiteConfig:cm,reset:d(()=>{ra()},"reset"),globalReset:d(()=>{ra(Er)},"globalReset"),defaultConfig:Er});xs(zt().logLevel);ra(zt());var aw=d((e,t,r)=>{O.warn(e),Gs(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"),Op=d(async function(e={querySelector:".mermaid"}){try{await nw(e)}catch(t){if(Gs(t)&&O.error(t.str),Be.parseError&&Be.parseError(t),!e.suppressErrors)throw O.error("Use the suppressErrors option to suppress these errors"),t}},"run"),nw=d(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=cr.getConfig();O.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");O.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(O.debug("Start On Load: "+i?.startOnLoad),cr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const n=new oe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(a)){if(O.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${n.next()}`;o=l.innerHTML,o=Ju(oe.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=oe.detectInit(o);h&&O.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Rp(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){aw(u,s,Be.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Dp=d(function(e){cr.initialize(e)},"initialize"),sw=d(async function(e,t,r){O.warn("mermaid.init is deprecated. Please use run instead."),e&&Dp(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Op(i)},"init"),ow=d(async(e,{lazyLoad:t=!0}={})=>{Va(),Fn(...e),t===!1&&await MS()},"registerExternalDiagrams"),Ip=d(function(){if(Be.startOnLoad){const{startOnLoad:e}=cr.getConfig();e&&Be.run().catch(t=>O.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Ip,!1);var lw=d(function(e){Be.parseError=e},"setParseErrorHandler"),Ta=[],An=!1,Pp=d(async()=>{if(!An){for(An=!0;Ta.length>0;){const e=Ta.shift();if(e)try{await e()}catch(t){O.error("Error executing queue",t)}}An=!1}},"executeQueue"),cw=d(async(e,t)=>new Promise((r,i)=>{const a=d(()=>new Promise((n,o)=>{cr.parse(e,t).then(s=>{n(s),r(s)},s=>{O.error("Error parsing",s),Be.parseError?.(s),o(s),i(s)})}),"performCall");Ta.push(a),Pp().catch(i)}),"parse"),Rp=d((e,t,r)=>new Promise((i,a)=>{const n=d(()=>new Promise((o,s)=>{cr.render(e,t,r).then(l=>{o(l),i(l)},l=>{O.error("Error parsing",l),Be.parseError?.(l),s(l),a(l)})}),"performCall");Ta.push(n),Pp().catch(a)}),"render"),hw=d(()=>Object.keys(nr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Be={startOnLoad:!0,mermaidAPI:cr,parse:cw,render:Rp,init:sw,run:Op,registerExternalDiagrams:ow,registerLayoutLoaders:jf,initialize:Dp,parseError:void 0,contentLoaded:Ip,setParseErrorHandler:lw,detectType:bs,registerIconPacks:$2,getRegisteredDiagramsMetadata:hw},uw=Be;/*! Check if previously processed *//*!
|
|
197
|
+
* Wait for document loaded before starting the execution
|
|
198
|
+
*/const Pw=Object.freeze(Object.defineProperty({__proto__:null,default:uw},Symbol.toStringTag,{value:"Module"}));export{Lw as $,ni as A,ng as B,be as C,Nm as D,Vs as E,fc as F,zt as G,a2 as H,ay as I,h0 as J,Oo as K,Ym as L,Ts as M,_w as N,vw as O,_r as P,rl as Q,el as R,Tw as S,kw as T,ot as U,ww as V,bw as W,Cw as X,Sw as Y,Bw as Z,d as _,$m as a,Vb as a$,tm as a0,Fr as a1,mw as a2,Wa as a3,Xb as a4,bm as a5,Cs as a6,Qo as a7,Xm as a8,Ui as a9,Ew as aA,$1 as aB,B1 as aC,L1 as aD,D2 as aE,Um as aF,gw as aG,wi as aH,$2 as aI,F2 as aJ,hr as aK,Ub as aL,Wu as aM,Da as aN,Na as aO,xa as aP,qu as aQ,Nu as aR,Sb as aS,X as aT,Lu as aU,ag as aV,jb as aW,Pb as aX,vx as aY,Ws as aZ,xb as a_,i2 as aa,Lm as ab,xi as ac,U as ad,tt as ae,Sc as af,s1 as ag,Wf as ah,$w as ai,d0 as aj,Mt as ak,He as al,Rs as am,ud as an,fr as ao,Vu as ap,Yb as aq,Px as ar,Rb as as,Ns as at,Vl as au,Z1 as av,Fw as aw,Ow as ax,Mw as ay,Z as az,Fm as b,Si as b0,Nr as b1,ga as b2,Ab as b3,CC as b4,_i as b5,ya as b6,wb as b7,$u as b8,Lx as b9,Bx as ba,tr as bb,_l as bc,Ax as bd,zs as be,Tx as bf,Fx as bg,Wr as bh,qe as bi,ml as bj,qs as bk,Du as bl,ps as bm,Gb as bn,Ra as bo,Pw as bp,pt as c,_c as d,Lt as e,Le as f,Dm as g,ne as h,m0 as i,Pr as j,Ku as k,O as l,bi as m,yw as n,Iw as o,Im as p,Pm as q,Dw as r,Om as s,u0 as t,oe as u,v1 as v,o2 as w,Aw as x,Em as y,xw as z};
|