gitnexus 1.6.8-rc.8 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/_shared/graph/types.d.ts +31 -1
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/language-detection.d.ts.map +1 -1
- package/dist/_shared/language-detection.js +11 -1
- package/dist/_shared/language-detection.js.map +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
- package/dist/_shared/lbug/schema-constants.js +6 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -1
- package/dist/_shared/scope-resolution/parsed-file.d.ts +21 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/symbol-definition.d.ts +6 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +31 -1
- package/dist/cli/ai-context.js +18 -16
- package/dist/cli/analyze-config.js +11 -0
- package/dist/cli/analyze.d.ts +14 -0
- package/dist/cli/analyze.js +98 -0
- package/dist/cli/embedding-dims.d.ts +33 -0
- package/dist/cli/embedding-dims.js +39 -0
- package/dist/cli/eval-server.d.ts +8 -0
- package/dist/cli/eval-server.js +242 -2
- package/dist/cli/help-i18n.js +19 -0
- package/dist/cli/i18n/en.d.ts +15 -1
- package/dist/cli/i18n/en.js +15 -1
- package/dist/cli/i18n/resources.d.ts +29 -1
- package/dist/cli/i18n/zh-CN.d.ts +14 -0
- package/dist/cli/i18n/zh-CN.js +15 -1
- package/dist/cli/index.js +89 -1
- package/dist/cli/mcp.d.ts +6 -1
- package/dist/cli/mcp.js +26 -1
- package/dist/cli/optional-grammars.d.ts +6 -8
- package/dist/cli/optional-grammars.js +8 -11
- package/dist/cli/setup.d.ts +3 -1
- package/dist/cli/setup.js +67 -17
- package/dist/cli/skill-gen.js +2 -1
- package/dist/cli/tool.d.ts +19 -1
- package/dist/cli/tool.js +96 -3
- package/dist/core/embeddings/hf-env.d.ts +0 -66
- package/dist/core/embeddings/http-client.d.ts +7 -0
- package/dist/core/embeddings/http-client.js +5 -3
- package/dist/core/embeddings/server-mapping.d.ts +1 -1
- package/dist/core/embeddings/server-mapping.js +7 -3
- package/dist/core/graph/import-cycles.d.ts +10 -0
- package/dist/core/graph/import-cycles.js +103 -0
- package/dist/core/group/cross-impact.d.ts +2 -1
- package/dist/core/group/cross-impact.js +5 -1
- package/dist/core/group/extractors/grpc-patterns/proto.js +10 -6
- package/dist/core/group/extractors/http-patterns/kotlin.js +7 -7
- package/dist/core/group/extractors/http-route-extractor.d.ts +24 -0
- package/dist/core/group/extractors/http-route-extractor.js +22 -4
- package/dist/core/group/extractors/include-extractor.js +22 -13
- package/dist/core/group/sync.d.ts +27 -1
- package/dist/core/group/sync.js +0 -0
- package/dist/core/incremental/subgraph-extract.js +18 -1
- package/dist/core/ingestion/cfg/cfg-builder.d.ts +114 -0
- package/dist/core/ingestion/cfg/cfg-builder.js +196 -0
- package/dist/core/ingestion/cfg/collect.d.ts +51 -0
- package/dist/core/ingestion/cfg/collect.js +77 -0
- package/dist/core/ingestion/cfg/control-dependence.d.ts +58 -0
- package/dist/core/ingestion/cfg/control-dependence.js +182 -0
- package/dist/core/ingestion/cfg/control-flow-context.d.ts +106 -0
- package/dist/core/ingestion/cfg/control-flow-context.js +124 -0
- package/dist/core/ingestion/cfg/emit.d.ts +293 -0
- package/dist/core/ingestion/cfg/emit.js +646 -0
- package/dist/core/ingestion/cfg/post-dominators.d.ts +79 -0
- package/dist/core/ingestion/cfg/post-dominators.js +176 -0
- package/dist/core/ingestion/cfg/reaching-def-reason-codec.d.ts +106 -0
- package/dist/core/ingestion/cfg/reaching-def-reason-codec.js +133 -0
- package/dist/core/ingestion/cfg/reaching-defs-graph.d.ts +18 -0
- package/dist/core/ingestion/cfg/reaching-defs-graph.js +312 -0
- package/dist/core/ingestion/cfg/reaching-defs.d.ts +162 -0
- package/dist/core/ingestion/cfg/reaching-defs.js +785 -0
- package/dist/core/ingestion/cfg/synthetic-escape.d.ts +124 -0
- package/dist/core/ingestion/cfg/synthetic-escape.js +300 -0
- package/dist/core/ingestion/cfg/traversal-result.d.ts +20 -0
- package/dist/core/ingestion/cfg/traversal-result.js +2 -0
- package/dist/core/ingestion/cfg/types.d.ts +274 -0
- package/dist/core/ingestion/cfg/types.js +13 -0
- package/dist/core/ingestion/cfg/visitors/c-cpp-harvest.d.ts +111 -0
- package/dist/core/ingestion/cfg/visitors/c-cpp-harvest.js +541 -0
- package/dist/core/ingestion/cfg/visitors/c-cpp.d.ts +74 -0
- package/dist/core/ingestion/cfg/visitors/c-cpp.js +584 -0
- package/dist/core/ingestion/cfg/visitors/call-site-harvest.d.ts +195 -0
- package/dist/core/ingestion/cfg/visitors/call-site-harvest.js +350 -0
- package/dist/core/ingestion/cfg/visitors/csharp-harvest.d.ts +124 -0
- package/dist/core/ingestion/cfg/visitors/csharp-harvest.js +589 -0
- package/dist/core/ingestion/cfg/visitors/csharp.d.ts +87 -0
- package/dist/core/ingestion/cfg/visitors/csharp.js +867 -0
- package/dist/core/ingestion/cfg/visitors/dart-harvest.d.ts +278 -0
- package/dist/core/ingestion/cfg/visitors/dart-harvest.js +870 -0
- package/dist/core/ingestion/cfg/visitors/dart.d.ts +119 -0
- package/dist/core/ingestion/cfg/visitors/dart.js +836 -0
- package/dist/core/ingestion/cfg/visitors/go-harvest.d.ts +160 -0
- package/dist/core/ingestion/cfg/visitors/go-harvest.js +621 -0
- package/dist/core/ingestion/cfg/visitors/go.d.ts +108 -0
- package/dist/core/ingestion/cfg/visitors/go.js +638 -0
- package/dist/core/ingestion/cfg/visitors/java-harvest.d.ts +108 -0
- package/dist/core/ingestion/cfg/visitors/java-harvest.js +513 -0
- package/dist/core/ingestion/cfg/visitors/java.d.ts +101 -0
- package/dist/core/ingestion/cfg/visitors/java.js +812 -0
- package/dist/core/ingestion/cfg/visitors/kotlin-harvest.d.ts +253 -0
- package/dist/core/ingestion/cfg/visitors/kotlin-harvest.js +719 -0
- package/dist/core/ingestion/cfg/visitors/kotlin.d.ts +121 -0
- package/dist/core/ingestion/cfg/visitors/kotlin.js +809 -0
- package/dist/core/ingestion/cfg/visitors/php-harvest.d.ts +172 -0
- package/dist/core/ingestion/cfg/visitors/php-harvest.js +626 -0
- package/dist/core/ingestion/cfg/visitors/php.d.ts +96 -0
- package/dist/core/ingestion/cfg/visitors/php.js +721 -0
- package/dist/core/ingestion/cfg/visitors/python-harvest.d.ts +212 -0
- package/dist/core/ingestion/cfg/visitors/python-harvest.js +739 -0
- package/dist/core/ingestion/cfg/visitors/python.d.ts +103 -0
- package/dist/core/ingestion/cfg/visitors/python.js +558 -0
- package/dist/core/ingestion/cfg/visitors/ruby-harvest.d.ts +223 -0
- package/dist/core/ingestion/cfg/visitors/ruby-harvest.js +587 -0
- package/dist/core/ingestion/cfg/visitors/ruby.d.ts +112 -0
- package/dist/core/ingestion/cfg/visitors/ruby.js +756 -0
- package/dist/core/ingestion/cfg/visitors/rust-harvest.d.ts +324 -0
- package/dist/core/ingestion/cfg/visitors/rust-harvest.js +873 -0
- package/dist/core/ingestion/cfg/visitors/rust.d.ts +95 -0
- package/dist/core/ingestion/cfg/visitors/rust.js +558 -0
- package/dist/core/ingestion/cfg/visitors/scope-tree-harvest.d.ts +87 -0
- package/dist/core/ingestion/cfg/visitors/scope-tree-harvest.js +116 -0
- package/dist/core/ingestion/cfg/visitors/swift-harvest.d.ts +255 -0
- package/dist/core/ingestion/cfg/visitors/swift-harvest.js +679 -0
- package/dist/core/ingestion/cfg/visitors/swift.d.ts +116 -0
- package/dist/core/ingestion/cfg/visitors/swift.js +787 -0
- package/dist/core/ingestion/cfg/visitors/typescript-harvest.d.ts +149 -0
- package/dist/core/ingestion/cfg/visitors/typescript-harvest.js +1056 -0
- package/dist/core/ingestion/cfg/visitors/typescript.d.ts +66 -0
- package/dist/core/ingestion/cfg/visitors/typescript.js +583 -0
- package/dist/core/ingestion/import-resolvers/utils.js +2 -0
- package/dist/core/ingestion/language-provider.d.ts +23 -2
- package/dist/core/ingestion/languages/c-cpp.js +17 -5
- package/dist/core/ingestion/languages/cobol.js +4 -0
- package/dist/core/ingestion/languages/cpp/arity-metadata.js +41 -2
- package/dist/core/ingestion/languages/cpp/captures.js +50 -1
- package/dist/core/ingestion/languages/cpp/conversion-rank.d.ts +2 -0
- package/dist/core/ingestion/languages/cpp/conversion-rank.js +89 -0
- package/dist/core/ingestion/languages/cpp/header-scan.d.ts +1 -1
- package/dist/core/ingestion/languages/cpp/header-scan.js +2 -2
- package/dist/core/ingestion/languages/cpp/inline-namespaces.js +7 -2
- package/dist/core/ingestion/languages/cpp/member-lookup.js +2 -1
- package/dist/core/ingestion/languages/cpp/query.js +23 -0
- package/dist/core/ingestion/languages/cpp/scope-resolver.js +2 -1
- package/dist/core/ingestion/languages/csharp.js +2 -0
- package/dist/core/ingestion/languages/dart.js +2 -0
- package/dist/core/ingestion/languages/go.js +2 -0
- package/dist/core/ingestion/languages/java.js +3 -0
- package/dist/core/ingestion/languages/kotlin/query.js +3 -2
- package/dist/core/ingestion/languages/kotlin.js +8 -1
- package/dist/core/ingestion/languages/php.js +2 -0
- package/dist/core/ingestion/languages/python.js +2 -0
- package/dist/core/ingestion/languages/ruby.js +2 -0
- package/dist/core/ingestion/languages/rust.js +2 -0
- package/dist/core/ingestion/languages/swift.js +2 -0
- package/dist/core/ingestion/languages/typescript.js +5 -0
- package/dist/core/ingestion/languages/vue.js +6 -0
- package/dist/core/ingestion/method-extractors/configs/c-cpp.js +6 -13
- package/dist/core/ingestion/method-extractors/generic.js +1 -0
- package/dist/core/ingestion/method-types.d.ts +2 -0
- package/dist/core/ingestion/model/symbol-table.d.ts +1 -0
- package/dist/core/ingestion/model/symbol-table.js +1 -0
- package/dist/core/ingestion/mro-processor.js +109 -0
- package/dist/core/ingestion/parsing-processor.js +44 -0
- package/dist/core/ingestion/pipeline-phases/call-summaries.d.ts +26 -0
- package/dist/core/ingestion/pipeline-phases/call-summaries.js +46 -0
- package/dist/core/ingestion/pipeline-phases/index.d.ts +2 -0
- package/dist/core/ingestion/pipeline-phases/index.js +2 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +0 -21
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +18 -1
- package/dist/core/ingestion/pipeline-phases/routes.d.ts +10 -0
- package/dist/core/ingestion/pipeline-phases/routes.js +30 -1
- package/dist/core/ingestion/pipeline-phases/taint-summaries.d.ts +30 -0
- package/dist/core/ingestion/pipeline-phases/taint-summaries.js +81 -0
- package/dist/core/ingestion/pipeline.d.ts +92 -10
- package/dist/core/ingestion/pipeline.js +11 -2
- package/dist/core/ingestion/scope-extractor.js +12 -2
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +9 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.d.ts +75 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.js +67 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +12 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +14 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +6 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +13 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +9 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +28 -2
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.d.ts +4 -0
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.js +9 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +6 -1
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +174 -40
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +24 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +276 -190
- package/dist/core/ingestion/scope-resolution/pipeline/reconcile-ownership.js +43 -3
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +75 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +349 -1
- package/dist/core/ingestion/scope-resolution/resolution-outcome.d.ts +1 -1
- package/dist/core/ingestion/taint/call-summary-codec.d.ts +75 -0
- package/dist/core/ingestion/taint/call-summary-codec.js +128 -0
- package/dist/core/ingestion/taint/call-summary-emit.d.ts +43 -0
- package/dist/core/ingestion/taint/call-summary-emit.js +70 -0
- package/dist/core/ingestion/taint/call-summary-harvest.d.ts +77 -0
- package/dist/core/ingestion/taint/call-summary-harvest.js +179 -0
- package/dist/core/ingestion/taint/call-summary-model.d.ts +47 -0
- package/dist/core/ingestion/taint/call-summary-model.js +25 -0
- package/dist/core/ingestion/taint/emit.d.ts +125 -0
- package/dist/core/ingestion/taint/emit.js +208 -0
- package/dist/core/ingestion/taint/interproc-emit.d.ts +50 -0
- package/dist/core/ingestion/taint/interproc-emit.js +88 -0
- package/dist/core/ingestion/taint/interproc-solver.d.ts +110 -0
- package/dist/core/ingestion/taint/interproc-solver.js +312 -0
- package/dist/core/ingestion/taint/match.d.ts +153 -0
- package/dist/core/ingestion/taint/match.js +278 -0
- package/dist/core/ingestion/taint/path-codec.d.ts +134 -0
- package/dist/core/ingestion/taint/path-codec.js +190 -0
- package/dist/core/ingestion/taint/propagate.d.ts +216 -0
- package/dist/core/ingestion/taint/propagate.js +659 -0
- package/dist/core/ingestion/taint/site-safety.d.ts +29 -0
- package/dist/core/ingestion/taint/site-safety.js +98 -0
- package/dist/core/ingestion/taint/source-sink-config.d.ts +107 -23
- package/dist/core/ingestion/taint/source-sink-config.js +35 -12
- package/dist/core/ingestion/taint/source-sink-registry.d.ts +6 -4
- package/dist/core/ingestion/taint/source-sink-registry.js +6 -4
- package/dist/core/ingestion/taint/summary-harvest-driver.d.ts +80 -0
- package/dist/core/ingestion/taint/summary-harvest-driver.js +179 -0
- package/dist/core/ingestion/taint/summary-harvest.d.ts +89 -0
- package/dist/core/ingestion/taint/summary-harvest.js +537 -0
- package/dist/core/ingestion/taint/summary-model.d.ts +200 -0
- package/dist/core/ingestion/taint/summary-model.js +86 -0
- package/dist/core/ingestion/taint/typescript-model.d.ts +38 -0
- package/dist/core/ingestion/taint/typescript-model.js +102 -0
- package/dist/core/ingestion/type-extractors/c-cpp.js +21 -0
- package/dist/core/ingestion/utils/env.d.ts +7 -0
- package/dist/core/ingestion/utils/env.js +12 -0
- package/dist/core/ingestion/utils/method-props.js +1 -0
- package/dist/core/ingestion/workers/clone-safety.d.ts +109 -0
- package/dist/core/ingestion/workers/clone-safety.js +465 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +23 -0
- package/dist/core/ingestion/workers/parse-worker.js +81 -53
- package/dist/core/ingestion/workers/post-result.d.ts +22 -0
- package/dist/core/ingestion/workers/post-result.js +87 -0
- package/dist/core/ingestion/workers/result-merge.d.ts +20 -0
- package/dist/core/ingestion/workers/result-merge.js +43 -0
- package/dist/core/ingestion/workers/worker-pool.d.ts +15 -40
- package/dist/core/ingestion/workers/worker-pool.js +43 -16
- package/dist/core/lbug/csv-generator.d.ts +51 -3
- package/dist/core/lbug/csv-generator.js +369 -255
- package/dist/core/lbug/lbug-adapter.d.ts +58 -18
- package/dist/core/lbug/lbug-adapter.js +346 -84
- package/dist/core/lbug/lbug-config.d.ts +19 -0
- package/dist/core/lbug/lbug-config.js +29 -0
- package/dist/core/lbug/pdg-emit-sink.d.ts +127 -0
- package/dist/core/lbug/pdg-emit-sink.js +358 -0
- package/dist/core/lbug/pool-adapter.d.ts +35 -0
- package/dist/core/lbug/pool-adapter.js +90 -1
- package/dist/core/lbug/rel-pair-routing.d.ts +54 -0
- package/dist/core/lbug/rel-pair-routing.js +140 -0
- package/dist/core/lbug/schema.d.ts +2 -2
- package/dist/core/lbug/schema.js +3 -0
- package/dist/core/logger.d.ts +0 -5
- package/dist/core/run-analyze.d.ts +96 -0
- package/dist/core/run-analyze.js +207 -3
- package/dist/core/tree-sitter/parser-loader.js +5 -4
- package/dist/core/tree-sitter/safe-parse.d.ts +0 -5
- package/dist/core/tree-sitter/vendored-grammars.d.ts +39 -0
- package/dist/core/tree-sitter/vendored-grammars.js +57 -0
- package/dist/core/wiki/generator.js +3 -1
- package/dist/core/wiki/graph-queries.d.ts +6 -0
- package/dist/core/wiki/graph-queries.js +9 -1
- package/dist/mcp/http-transport.d.ts +134 -0
- package/dist/mcp/http-transport.js +503 -0
- package/dist/mcp/local/local-backend.d.ts +110 -24
- package/dist/mcp/local/local-backend.js +1225 -19
- package/dist/mcp/local/pdg-impact.d.ts +384 -0
- package/dist/mcp/local/pdg-impact.js +1972 -0
- package/dist/mcp/resources.js +13 -1
- package/dist/mcp/tools.d.ts +12 -0
- package/dist/mcp/tools.js +214 -7
- package/dist/server/analyze-launch.d.ts +29 -0
- package/dist/server/analyze-launch.js +137 -0
- package/dist/server/analyze-upload.d.ts +33 -0
- package/dist/server/analyze-upload.js +123 -0
- package/dist/server/analyze-worker-ipc.d.ts +58 -0
- package/dist/server/analyze-worker-ipc.js +16 -0
- package/dist/server/analyze-worker.d.ts +17 -1
- package/dist/server/analyze-worker.js +7 -1
- package/dist/server/api.d.ts +17 -0
- package/dist/server/api.js +132 -168
- package/dist/server/git-clone.d.ts +43 -2
- package/dist/server/git-clone.js +211 -16
- package/dist/server/mcp-http.d.ts +5 -6
- package/dist/server/mcp-http.js +9 -82
- package/dist/server/middleware.d.ts +40 -0
- package/dist/server/middleware.js +92 -0
- package/dist/server/private-ip.d.ts +1 -0
- package/dist/server/private-ip.js +15 -0
- package/dist/server/upload-ingest.d.ts +56 -0
- package/dist/server/upload-ingest.js +276 -0
- package/dist/server/upload-paths.d.ts +37 -0
- package/dist/server/upload-paths.js +57 -0
- package/dist/server/upload-sweep.d.ts +20 -0
- package/dist/server/upload-sweep.js +57 -0
- package/dist/storage/git.js +5 -8
- package/dist/storage/parse-cache.d.ts +22 -1
- package/dist/storage/parse-cache.js +44 -10
- package/dist/storage/repo-manager.d.ts +121 -10
- package/dist/storage/repo-manager.js +43 -5
- package/dist/types/pipeline.d.ts +9 -0
- package/hooks/antigravity/gitnexus-antigravity-hook.cjs +110 -10
- package/hooks/claude/gitnexus-hook.cjs +110 -13
- package/hooks/claude/hook-db-lock-probe.cjs +513 -26
- package/package.json +8 -2
- package/scripts/assert-publish-grammar-coverage.cjs +31 -0
- package/scripts/build-tree-sitter-grammars.cjs +16 -10
- package/scripts/cross-platform-tests.ts +1 -0
- package/skills/gitnexus-debugging.md +16 -4
- package/skills/gitnexus-exploring.md +3 -3
- package/skills/gitnexus-guide.md +33 -0
- package/skills/gitnexus-pdg-query.md +89 -0
- package/skills/gitnexus-refactoring.md +1 -1
- package/skills/gitnexus-taint-analysis.md +178 -0
- package/vendor/tree-sitter-c/package.json +1 -1
- package/vendor/tree-sitter-dart/package.json +1 -1
- package/vendor/tree-sitter-kotlin/package.json +1 -1
- package/vendor/tree-sitter-proto/package.json +1 -1
- package/vendor/tree-sitter-swift/package.json +1 -1
- package/web/assets/{agent-CKPMqImC.js → agent-D3Xd7zZE.js} +123 -123
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-DxJw65fT.js +1 -0
- package/web/assets/architectureDiagram-UL44E2DR-ChH9xW-N.js +36 -0
- package/web/assets/{blockDiagram-7IZFK4PR-B4niSLvR.js → blockDiagram-7IZFK4PR-BkWhpzWB.js} +1 -1
- package/web/assets/{c4Diagram-Y2BXMSZH-DIzEXalR.js → c4Diagram-Y2BXMSZH-DtBvpzWD.js} +1 -1
- package/web/assets/{chunk-3SSMPTDK-BzGeeheI.js → chunk-3SSMPTDK-B4_etUhr.js} +2 -2
- package/web/assets/{chunk-5IMINLNL-CnTLsXIV.js → chunk-5IMINLNL-DOdTeQri.js} +1 -1
- package/web/assets/{chunk-5VCL7Z4A-w1BCx98Z.js → chunk-5VCL7Z4A-CQ-2dYWj.js} +1 -1
- package/web/assets/chunk-6764PJDD-DpIS7hxD.js +1 -0
- package/web/assets/{chunk-67TQ5CYL-CChC2cAv.js → chunk-67TQ5CYL-4sNPJU1q.js} +3 -3
- package/web/assets/{chunk-7W6UQGC5-CgFyfZ6k.js → chunk-7W6UQGC5-KyEG0HQg.js} +1 -1
- package/web/assets/{chunk-AZZRMDJM-5E9ARdDQ.js → chunk-AZZRMDJM-y-xJBuMz.js} +1 -1
- package/web/assets/{chunk-INKRHTLW-ELpfuk9h.js → chunk-INKRHTLW-Nu4ri9P-.js} +1 -1
- package/web/assets/{chunk-JQRUD6KW-Dcq_Qnyy.js → chunk-JQRUD6KW-Dbva2Z17.js} +1 -1
- package/web/assets/{chunk-KGFNY3KK-W-VR57xb.js → chunk-KGFNY3KK-JGMJvKCK.js} +1 -1
- package/web/assets/chunk-KGYTTC2M-CWC_c3H9.js +161 -0
- package/web/assets/{chunk-KNLZD3CH-BuZBOcso.js → chunk-KNLZD3CH-BGlP6X9R.js} +1 -1
- package/web/assets/{chunk-KRXBNO2N-DH2NPM7I.js → chunk-KRXBNO2N-BW5o0KUN.js} +1 -1
- package/web/assets/{chunk-LCXTWHL2-Dfmux4m1.js → chunk-LCXTWHL2-zoomRtWX.js} +1 -1
- package/web/assets/{chunk-LII3EMHJ-3X33tCpU.js → chunk-LII3EMHJ-D-jm-dLa.js} +1 -1
- package/web/assets/{chunk-QA3QBVWF-D5Ha3GgB.js → chunk-QA3QBVWF-BgRW3SXd.js} +1 -1
- package/web/assets/{chunk-RG4AUYOV-CAkzcoRj.js → chunk-RG4AUYOV-DD0B2N2B.js} +1 -1
- package/web/assets/{chunk-T2UQINTJ-kGYG7ppP.js → chunk-T2UQINTJ-DSBqkzH7.js} +1 -1
- package/web/assets/chunk-T5OCTHI4-DdZvN-9i.js +1 -0
- package/web/assets/{chunk-UY5QBCOK-Du-c56gs.js → chunk-UY5QBCOK-DyF0vyGd.js} +1 -1
- package/web/assets/{chunk-W44A43WB-lrCpuupA.js → chunk-W44A43WB-JqMLIpR0.js} +1 -1
- package/web/assets/{chunk-ZXARS5L4-CSZRiyOf.js → chunk-ZXARS5L4-CxN8oiwI.js} +1 -1
- package/web/assets/classDiagram-KGZ6W3CR-DJm9BgF-.js +1 -0
- package/web/assets/classDiagram-v2-72OJOZXJ-DJm9BgF-.js +1 -0
- package/web/assets/{context-builder-_HS0v2ma.js → context-builder-BHiFUA8O.js} +10 -2
- package/web/assets/{cose-bilkent-UX7MHV2Q-BHv2bbtl.js → cose-bilkent-UX7MHV2Q-D71wNYRJ.js} +1 -1
- package/web/assets/dagre-ND4H6XIP-BIkxmhcu.js +4 -0
- package/web/assets/diagram-3NCE3AQN-BTa6iH0T.js +43 -0
- package/web/assets/diagram-GF46GFSD-DZDV0vBj.js +24 -0
- package/web/assets/{diagram-HNR7UZ2L-fUWreZzx.js → diagram-HNR7UZ2L-DFCfd5LI.js} +2 -2
- package/web/assets/diagram-QXG6HAR7-BzM--Jj0.js +24 -0
- package/web/assets/diagram-WEQXMOUZ-DFFwz0k4.js +10 -0
- package/web/assets/{erDiagram-L5TCEMPS-QN2eEP1e.js → erDiagram-L5TCEMPS-CfHMJJqo.js} +1 -1
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-BQm9QzEa.js +1 -0
- package/web/assets/{flowDiagram-H6V6AXG4-CXbXImlN.js → flowDiagram-H6V6AXG4-Be805QiJ.js} +3 -3
- package/web/assets/{ganttDiagram-JCBTUEKG-BHQssTz6.js → ganttDiagram-JCBTUEKG-D3iL2Aet.js} +1 -1
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-Cr_Bm2Nb.js +1 -0
- package/web/assets/gitGraphDiagram-S2ZK5IYY-CPIDgxGm.js +106 -0
- package/web/assets/index-BvYev1UJ.js +635 -0
- package/web/assets/index-_lgn7hs5.css +2 -0
- package/web/assets/info-J43DQDTF-KCYPFFUO-Cs4p2oyk.js +1 -0
- package/web/assets/infoDiagram-3YFTVSEB-Y7BKSoke.js +2 -0
- package/web/assets/{ishikawaDiagram-BNXS4ZKH-6LKOvBfp.js → ishikawaDiagram-BNXS4ZKH-CT4SHFuI.js} +1 -1
- package/web/assets/{journeyDiagram-M6C3CM3L-DNPYCpvq.js → journeyDiagram-M6C3CM3L-CvArszLo.js} +1 -1
- package/web/assets/{kanban-definition-75IXJCU3-DgDi9oJT.js → kanban-definition-75IXJCU3-C6yDxr7N.js} +3 -3
- package/web/assets/{katex-K3KEBU37-CrVLz8l7.js → katex-K3KEBU37-CTc5BslQ.js} +1 -1
- package/web/assets/{mindmap-definition-2TDM6QVE-CwR5sBB-.js → mindmap-definition-2TDM6QVE-BOc2WEne.js} +1 -1
- package/web/assets/packet-YPE3B663-LP52Z2RK-CKCrztD2.js +1 -0
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-BB7pHqoD.js +1 -0
- package/web/assets/{pieDiagram-CU6KROY3-By8g6f6B.js → pieDiagram-CU6KROY3-Cvc0f_Pd.js} +1 -1
- package/web/assets/{quadrantDiagram-VICAPDV7-bAm6Hi_5.js → quadrantDiagram-VICAPDV7-yXSZ2lLz.js} +1 -1
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-DhoTOcuK.js +1 -0
- package/web/assets/{requirementDiagram-JXO7QTGE-7oDcJ1_J.js → requirementDiagram-JXO7QTGE-BRcZvHs4.js} +1 -1
- package/web/assets/{sankeyDiagram-URQDO5SZ-LFJz53u5.js → sankeyDiagram-URQDO5SZ-1qEjlFIB.js} +1 -1
- package/web/assets/{sequenceDiagram-VS2MUI6T-FySeKCUy.js → sequenceDiagram-VS2MUI6T-PcSCuvrB.js} +3 -3
- package/web/assets/stateDiagram-7D4R322I-D6qYSV1E.js +1 -0
- package/web/assets/stateDiagram-v2-36443NZ5-Bg-ImOSX.js +1 -0
- package/web/assets/{timeline-definition-O6YCAMPW-Ds2CnVZK.js → timeline-definition-O6YCAMPW-QWkh01xw.js} +1 -1
- package/web/assets/treeView-BLDUP644-QA4HXRO3-ODehyGKL.js +1 -0
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-BfpgC-7o.js +1 -0
- package/web/assets/{vennDiagram-MWXL3ELB-DUIEwXWp.js → vennDiagram-MWXL3ELB-ak4DfwuM.js} +3 -3
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-CNeL6VHE.js +1 -0
- package/web/assets/{wardleyDiagram-CUQ6CDDI-DEiFPQih.js → wardleyDiagram-CUQ6CDDI-CTzR4Loq.js} +1 -1
- package/web/assets/{xychartDiagram-N2JHSOCM-BUbayhST.js → xychartDiagram-N2JHSOCM-DA1BEaQz.js} +1 -1
- package/web/index.html +13 -15
- package/scripts/materialize-vendor-grammars.cjs +0 -97
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-BETj2x4g.js +0 -1
- package/web/assets/architectureDiagram-UL44E2DR-D1EXI0zA.js +0 -36
- package/web/assets/chunk-2T2R6R2M-n6s9JZqv.js +0 -4
- package/web/assets/chunk-2UTLFMKG-CMBB1TMN.js +0 -1
- package/web/assets/chunk-4R4BOZG6-mKhL59ul.js +0 -159
- package/web/assets/chunk-6764PJDD-ChwMM2z4.js +0 -1
- package/web/assets/chunk-7J6CGLKN-DT-b53FT.js +0 -10
- package/web/assets/chunk-C62D2QBJ-CDAWj26E.js +0 -1
- package/web/assets/chunk-CEXFNPSA-D68Tk6ls.js +0 -1
- package/web/assets/chunk-CilyBKbf.js +0 -1
- package/web/assets/chunk-J5EP6P6S-DxWW0yvu.js +0 -1
- package/web/assets/chunk-KGYTTC2M-C6PHeuay.js +0 -1
- package/web/assets/chunk-RERM46MO-DQNbXtfw.js +0 -1
- package/web/assets/chunk-RKZBBQEN-BmTPLSyv.js +0 -1
- package/web/assets/chunk-RLI5ZMPA-DExu2DOK.js +0 -1
- package/web/assets/chunk-T5OCTHI4--9wWpVws.js +0 -1
- package/web/assets/chunk-UP6H54XL-DsKdC6jC.js +0 -1
- package/web/assets/chunk-UXSXWOXI-DR81EqLr.js +0 -1
- package/web/assets/classDiagram-KGZ6W3CR-Bv93af_b.js +0 -1
- package/web/assets/classDiagram-v2-72OJOZXJ-CLfEqHUa.js +0 -1
- package/web/assets/dagre-ND4H6XIP-DsIr9MOv.js +0 -4
- package/web/assets/diagram-3NCE3AQN-BqAtKUpW.js +0 -43
- package/web/assets/diagram-GF46GFSD-CaBG6n6o.js +0 -24
- package/web/assets/diagram-QXG6HAR7-CZ-O3rcV.js +0 -24
- package/web/assets/diagram-WEQXMOUZ-P4lSL4GH.js +0 -10
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-B3myHUst.js +0 -1
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-DF3rtf4A.js +0 -1
- package/web/assets/gitGraphDiagram-S2ZK5IYY-CCwVLT__.js +0 -106
- package/web/assets/index-BKWA-m7o.css +0 -2
- package/web/assets/index-CG6q8eTs.js +0 -626
- package/web/assets/info-J43DQDTF-KCYPFFUO-R4XV_akJ.js +0 -1
- package/web/assets/infoDiagram-3YFTVSEB-DmLICZx1.js +0 -2
- package/web/assets/packet-YPE3B663-LP52Z2RK-CgQPdNZa.js +0 -1
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-BzWOwc_c.js +0 -1
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-B7KG0FN7.js +0 -1
- package/web/assets/stateDiagram-7D4R322I-CB2nABwH.js +0 -1
- package/web/assets/stateDiagram-v2-36443NZ5-COBGd2RL.js +0 -1
- package/web/assets/treeView-BLDUP644-QA4HXRO3-CRSxEwLO.js +0 -1
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-a0PfKoVn.js +0 -1
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-BKQ6e5mC.js +0 -1
- /package/web/assets/{chunk-AQ6EADP3-CCFje6lL.js → chunk-AQ6EADP3-CZhslHi-.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,f as t,l as n,r,u as i}from"./chunk-67TQ5CYL-
|
|
1
|
+
import{C as e,f as t,l as n,r,u as i}from"./chunk-67TQ5CYL-4sNPJU1q.js";import{t as a}from"./chunk-AQ6EADP3-CZhslHi-.js";import{V as o,q as s}from"./chunk-7W6UQGC5-KyEG0HQg.js";import{r as c}from"./chunk-QA3QBVWF-BgRW3SXd.js";var l=Object.freeze({left:0,top:0,width:16,height:16}),u=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),d=Object.freeze({...l,...u}),f=Object.freeze({...d,body:``,hidden:!1}),p=Object.freeze({width:null,height:null}),m=Object.freeze({...p,...u}),h=a((e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!g(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!g(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!g(e,n)?null:e}return null},`stringToIcon`),g=a((e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1,`validateIconName`);function _(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}a(_,`mergeIconTransformations`);function ee(e,t){let n=_(e,t);for(let r in f)r in u?r in e&&!(r in n)&&(n[r]=u[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}a(ee,`mergeIconData`);function te(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&o(t);n&&(i[e]=[t].concat(n))}return i[e]}return a(o,`resolve`),(t||Object.keys(n).concat(Object.keys(r))).forEach(o),i}a(te,`getIconsTree`);function v(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),o={};function s(e){o=ee(r[e]||i[e],o)}return a(s,`parse`),s(t),n.forEach(s),ee(e,o)}a(v,`internalGetIconData`);function ne(e,t){if(e.icons[t])return v(e,t,[]);let n=te(e,[t])[t];return n?v(e,t,n):null}a(ne,`getIconData`);var re=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ie=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(re);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=ie.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}a(y,`calculateSize`);function ae(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}a(ae,`splitSVGDefs`);function oe(e,t){return e?`<defs>`+e+`</defs>`+t:t}a(oe,`mergeDefsAndContent`);function se(e,t,n){let r=ae(e);return oe(r.defs,t+r.content+n)}a(se,`wrapSVGContent`);var ce=a(e=>e===`unset`||e===`undefined`||e===`none`,`isUnsetKeyword`);function le(e,t){let n={...d,...e},r={...m,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},o=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,a=e.rotate;n?r?a+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(a<0&&(a-=Math.floor(a/4)*4),a%=4,a){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}a%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(o=se(o,`<g transform="`+t.join(` `)+`">`,`</g>`))});let s=r.width,c=r.height,l=i.width,u=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?u:c,f=y(p,l/u)):(f=s===`auto`?l:s,p=c===null?y(f,u/l):c===`auto`?u:c);let h={},g=a((e,t)=>{ce(t)||(h[e]=t.toString())},`setAttr`);g(`width`,f),g(`height`,p);let _=[i.left,i.top,l,u];return h.viewBox=_.join(` `),{attributes:h,viewBox:_,body:o}}a(le,`iconToSVG`);var ue=/\sid="(\S+)"/g,de=`IconifyId`+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),fe=0;function pe(e,t=de){let n=[],r;for(;r=ue.exec(e);)n.push(r[1]);if(!n.length)return e;let i=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(n=>{let r=typeof t==`function`?t(n):t+(fe++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+a+`)([")]|\\.[a-z])`,`g`),`$1`+r+i+`$3`)}),e=e.replace(new RegExp(i,`g`),``),e}a(pe,`replaceIDs`);function me(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}a(me,`iconToHTML`);var he={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},ge=new Map,_e=new Map,ve=a(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(s.debug(`Registering icon pack:`,t.name),`loader`in t)_e.set(t.name,t.loader);else if(`icons`in t)ge.set(t.name,t.icons);else throw s.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),ye=a(async(e,t)=>{let n=h(e,!0,t!==void 0);if(!n)throw Error(`Invalid icon name: ${e}`);let r=n.prefix||t;if(!r)throw Error(`Icon name must contain a prefix: ${e}`);let i=ge.get(r);if(!i){let e=_e.get(r);if(!e)throw Error(`Icon set not found: ${n.prefix}`);try{i={...await e(),prefix:r},ge.set(r,i)}catch(e){throw s.error(e),Error(`Failed to load icon set: ${n.prefix}`)}}let a=ne(i,n.name);if(!a)throw Error(`Icon not found: ${e}`);return a},`getRegisteredIconData`),be=a(async e=>{try{return await ye(e),!0}catch{return!1}},`isIconAvailable`),xe=a(async(t,r,i)=>{let a;try{a=await ye(t,r?.fallbackPrefix)}catch(e){s.error(e),a=he}let o=le(a,r);return e(me(pe(o.body),{...o.attributes,...i}),n())},`getIconSVG`);function b(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
|
|
2
2
|
[ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
|
|
3
3
|
`)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
|
|
4
4
|
`)&&(o=String(e).split(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./chunk-AQ6EADP3-
|
|
1
|
+
import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";function t(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}e(t,`populateCommonDb`);export{t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as e,C as t,D as n,E as r,Z as i,f as a,l as o,o as s}from"./chunk-67TQ5CYL-CChC2cAv.js";import{t as c}from"./chunk-AQ6EADP3-CCFje6lL.js";import{V as l,q as u}from"./chunk-7W6UQGC5-CgFyfZ6k.js";import{t as d}from"./chunk-5IMINLNL-CnTLsXIV.js";import{a as f,i as p,r as m,t as h}from"./chunk-T2UQINTJ-kGYG7ppP.js";import{i as g,m as _,r as v}from"./chunk-QA3QBVWF-D5Ha3GgB.js";import{n as y,t as b}from"./chunk-UY5QBCOK-Du-c56gs.js";import{n as x,o as S}from"./chunk-INKRHTLW-ELpfuk9h.js";var C=c(async(e,n,r)=>{let a,o=n.useHtmlLabels||s(i()?.htmlLabels);a=r||`node default`;let c=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),u=c.insert(`g`).attr(`class`,`label`).attr(`style`,g(n.labelStyle)),d;d=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let f=!!n.icon||!!n.img,p=n.labelType===`markdown`,m=await x(u,t(v(d),i()),{useHtmlLabels:o,width:n.width||i().flowchart?.wrappingWidth,classes:p?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:f,markdown:p},i()),h=m.getBBox(),_=(n?.padding??0)/2;if(o){let e=m.children[0],t=l(m);await b(e,d),h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}return o?u.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):u.attr(`transform`,`translate(0, `+-h.height/2+`)`),n.centerLabel&&u.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),u.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:h,halfPadding:_,label:u}},`labelHelper`),w=c(async(e,r,a)=>{let o=a.useHtmlLabels??n(i()),s=e.insert(`g`).attr(`class`,`label`).attr(`style`,a.labelStyle||``),c=await x(s,t(v(r),i()),{useHtmlLabels:o,width:a.width||i()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),u=c.getBBox(),d=a.padding/2;if(n(i())){let e=c.children[0],t=l(c);u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}return o?s.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`):s.attr(`transform`,`translate(0, `+-u.height/2+`)`),a.centerLabel&&s.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:u,halfPadding:d,label:s}},`insertLabel`),T=c((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=c((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}c(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}c(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}c(k,`generateCirclePoints`);function A(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),o=c((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:o(i,`fill`),"fill-opacity":o(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:o(a,`stroke`),"stroke-width":o(a,`stroke-width`)??`1`,"stroke-opacity":o(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return s.appendChild(n),s}c(A,`mergePaths`);var j=c((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=c(async(e,t,r,a=!1,o=!1)=>{let s=t||``;typeof s==`object`&&(s=s[0]);let c=i(),l=n(c);return await x(e,s,{style:r,isTitle:a,useHtmlLabels:l,markdown:!1,isNode:o,width:1/0},c)},`createLabel`),N=c((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=c(async(e,t)=>{u.info(`Creating subgraph rect for `,t.id,t);let r=i(),{themeVariables:a,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:c}=a,{labelStyles:f,nodeStyles:p,borderStyles:g,backgroundStyles:_}=m(t),v=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),b=n(r),S=v.insert(`g`).attr(`class`,`cluster-label `),C;C=t.labelType===`markdown`?await x(S,t.label,{style:t.labelStyle,useHtmlLabels:b,isNode:!0,width:t.width}):await M(S,t.label,t.labelStyle||``,!1,!0);let w=C.getBBox();if(n(r)){let e=C.children[0],t=l(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=t.width<=w.width+t.padding?w.width+t.padding:t.width;t.width<=w.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;u.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=d.svg(v),n=h(t,{roughness:.7,fill:s,stroke:c,fillWeight:3,seed:o}),r=e.path(N(D,O,T,E,0),n);k=v.insert(()=>(u.debug(`Rough node insert CXC`,r),r),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),k.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else k=v.insert(`rect`,`:first-child`),k.attr(`style`,p).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=y(r);if(S.attr(`transform`,`translate(${t.x-w.width/2}, ${t.y-t.height/2+A})`),f){let e=S.select(`span`);e&&e.attr(`style`,f)}let P=k.node().getBBox();return t.offsetX=0,t.width=P.width,t.height=P.height,t.offsetY=w.height-t.padding/2,t.intersect=function(e){return j(t,e)},{cluster:v,labelBBox:w}},`rect`),F=c((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),I=c(async(e,t)=>{let r=i(),{themeVariables:a,handDrawnSeed:o}=r,{altBackground:s,compositeBackground:c,compositeTitleBackground:u,nodeBorder:f}=a,p=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),m=p.insert(`g`,`:first-child`),h=p.insert(`g`).attr(`class`,`cluster-label`),g=p.append(`rect`),_=await M(h,t.label,t.labelStyle,void 0,!0),v=_.getBBox();if(n(r)){let e=_.children[0],t=l(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=0*t.padding,b=y/2,x=(t.width<=v.width+t.padding?v.width+t.padding:t.width)+y;t.width<=v.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let S=t.height+y,C=t.height+y-v.height-6,w=t.x-x/2,T=t.y-S/2;t.width=x;let E=t.y-t.height/2-b+v.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=d.svg(p),r=t.rx||t.ry?n.path(N(w,T,x,S,10),{roughness:.7,fill:u,fillStyle:`solid`,stroke:f,seed:o}):n.rectangle(w,T,x,S,{seed:o});D=p.insert(()=>r,`:first-child`);let i=n.rectangle(w,E,x,C,{fill:e?s:c,fillStyle:e?`hachure`:`solid`,stroke:f,seed:o});D=p.insert(()=>r,`:first-child`),g=p.insert(()=>i)}else D=m.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,x).attr(`height`,S).attr(`data-look`,t.look),g.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,x).attr(`height`,C);return h.attr(`transform`,`translate(${t.x-v.width/2}, ${T+1-(n(r)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=v.height-t.padding/2,t.labelBBox=v,t.intersect=function(e){return j(t,e)},{cluster:p,labelBBox:v}},`roundedWithTitle`),ee=c(async(e,t)=>{u.info(`Creating subgraph rect for `,t.id,t);let r=i(),{themeVariables:a,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:c}=a,{labelStyles:f,nodeStyles:p,borderStyles:g,backgroundStyles:_}=m(t),v=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),b=n(r),S=v.insert(`g`).attr(`class`,`cluster-label `),C=await x(S,t.label,{style:t.labelStyle,useHtmlLabels:b,isNode:!0,width:t.width}),w=C.getBBox();if(n(r)){let e=C.children[0],t=l(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=t.width<=w.width+t.padding?w.width+t.padding:t.width;t.width<=w.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;u.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=d.svg(v),n=h(t,{roughness:.7,fill:s,stroke:c,fillWeight:4,seed:o}),r=e.path(N(D,O,T,E,t.rx),n);k=v.insert(()=>(u.debug(`Rough node insert CXC`,r),r),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),k.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else k=v.insert(`rect`,`:first-child`),k.attr(`style`,p).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=y(r);if(S.attr(`transform`,`translate(${t.x-w.width/2}, ${t.y-t.height/2+A})`),f){let e=S.select(`span`);e&&e.attr(`style`,f)}let M=k.node().getBBox();return t.offsetX=0,t.width=M.width,t.height=M.height,t.offsetY=w.height-t.padding/2,t.intersect=function(e){return j(t,e)},{cluster:v,labelBBox:w}},`kanbanSection`),te={rect:P,squareRect:P,roundedWithTitle:I,noteGroup:F,divider:c((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=i(),{nodeBorder:a}=n,o=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=o.insert(`g`,`:first-child`),c=0*t.padding,l=t.width+c;t.diff=-t.padding;let u=t.height+c,f=t.x-l/2,p=t.y-u/2;t.width=l;let m;if(t.look===`handDrawn`){let e=d.svg(o).rectangle(f,p,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:a,seed:r});m=o.insert(()=>e,`:first-child`)}else{m=s.insert(`rect`,`:first-child`);let e=`outer`;t.look,e=`divider`,m.attr(`class`,e).attr(`x`,f).attr(`y`,p).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=m.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:ee},L=new Map,R=c(async(e,t)=>{let n=await te[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),ne=c(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}c(z,`intersectNode`);var re=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}c(B,`intersectEllipse`);var V=B;function ie(e,t,n){return V(e,t,t,n)}c(ie,`intersectCircle`);var ae=ie;function H(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&U(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&U(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}c(H,`intersectLine`);function U(e,t){return e*t>0}c(U,`sameSign`);var W=H;function oe(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=W(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}c(oe,`intersectPolygon`);var G={node:re,circle:ae,ellipse:V,polygon:oe,rect:j};function se(e,t){let{labelStyles:n}=m(t);t.labelStyle=n;let r=E(t),i=r;r||(i=`anchor`);let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),{cssStyles:o}=t,s=d.svg(a),c=h(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(c.roughness=0);let l=s.circle(0,0,2,c),f=a.insert(()=>l,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,g(o)),T(t,f),t.intersect=function(e){return u.info(`Circle intersect`,t,1,e),G.circle(t,1,e)},a}c(se,`anchor`);function ce(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}c(ce,`generateArcPoints`);function le(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}c(le,`calculateArcSagitta`);async function ue(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=c(e=>e+o,`calcTotalHeight`),l=c(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:f}=await C(e,t,E(t)),p=s(t?.height?t?.height:f.height),[g,_]=l(p),v=le(p,g,_),y=(t?.width?t?.width:f.width)+a*2+v-v,b=p,{cssStyles:x}=t,S=[{x:y/2,y:-b/2},{x:-y/2,y:-b/2},...ce(-y/2,-b/2,-y/2,b/2,g,_,!1),{x:y/2,y:b/2},...ce(y/2,b/2,y/2,-b/2,g,_,!0)],w=d.svg(u),O=h(t,{});t.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(S),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),x&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,x),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${g/2}, 0)`),T(t,j),t.intersect=function(e){return G.polygon(t,S,e)},u}c(ue,`bowTieRect`);function K(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}c(K,`insertPolygonShape`);var de=12;async function fe(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+de),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=l,p=-u,g=[{x:0+de,y:p},{x:f,y:p},{x:f,y:0},{x:0,y:0},{x:0,y:p+de},{x:0+de,y:p}],_,{cssStyles:v}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=h(t,{}),r=D(g),i=e.path(r,n);_=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),v&&_.attr(`style`,v)}else _=K(s,l,u,g);return r&&_.attr(`style`,r),T(t,_),t.intersect=function(e){return G.polygon(t,g,e)},s}c(fe,`card`);function pe(e,t){let{nodeStyles:n}=m(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=d.svg(r),c=h(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),f=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}c(pe,`choice`);async function me(e,t,n){let{labelStyles:r,nodeStyles:i}=m(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s}=await C(e,t,E(t)),c=n?.padding??s,l=t.look===`neo`?o.width/2+32:o.width/2+c,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=d.svg(a),n=h(t,{}),r=e.circle(0,0,l*2,n);f=a.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,g(p))}else f=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,l).attr(`cx`,0).attr(`cy`,0);return T(t,f),t.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},t.intersect=function(e){return u.info(`Circle intersect`,t,l,e),G.circle(t,l,e)},a}c(me,`circle`);function he(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
1
|
+
import{A as e,C as t,D as n,E as r,Z as i,f as a,l as o,o as s}from"./chunk-67TQ5CYL-4sNPJU1q.js";import{t as c}from"./chunk-AQ6EADP3-CZhslHi-.js";import{V as l,q as u}from"./chunk-7W6UQGC5-KyEG0HQg.js";import{t as d}from"./chunk-5IMINLNL-DOdTeQri.js";import{a as f,i as p,r as m,t as h}from"./chunk-T2UQINTJ-DSBqkzH7.js";import{i as g,m as _,r as v}from"./chunk-QA3QBVWF-BgRW3SXd.js";import{n as y,t as b}from"./chunk-UY5QBCOK-DyF0vyGd.js";import{n as x,o as S}from"./chunk-INKRHTLW-Nu4ri9P-.js";var C=c(async(e,n,r)=>{let a,o=n.useHtmlLabels||s(i()?.htmlLabels);a=r||`node default`;let c=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),u=c.insert(`g`).attr(`class`,`label`).attr(`style`,g(n.labelStyle)),d;d=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let f=!!n.icon||!!n.img,p=n.labelType===`markdown`,m=await x(u,t(v(d),i()),{useHtmlLabels:o,width:n.width||i().flowchart?.wrappingWidth,classes:p?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:f,markdown:p},i()),h=m.getBBox(),_=(n?.padding??0)/2;if(o){let e=m.children[0],t=l(m);await b(e,d),h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}return o?u.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):u.attr(`transform`,`translate(0, `+-h.height/2+`)`),n.centerLabel&&u.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),u.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:h,halfPadding:_,label:u}},`labelHelper`),w=c(async(e,r,a)=>{let o=a.useHtmlLabels??n(i()),s=e.insert(`g`).attr(`class`,`label`).attr(`style`,a.labelStyle||``),c=await x(s,t(v(r),i()),{useHtmlLabels:o,width:a.width||i()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),u=c.getBBox(),d=a.padding/2;if(n(i())){let e=c.children[0],t=l(c);u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}return o?s.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`):s.attr(`transform`,`translate(0, `+-u.height/2+`)`),a.centerLabel&&s.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:u,halfPadding:d,label:s}},`insertLabel`),T=c((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=c((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}c(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}c(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}c(k,`generateCirclePoints`);function A(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),o=c((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:o(i,`fill`),"fill-opacity":o(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:o(a,`stroke`),"stroke-width":o(a,`stroke-width`)??`1`,"stroke-opacity":o(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return s.appendChild(n),s}c(A,`mergePaths`);var j=c((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=c(async(e,t,r,a=!1,o=!1)=>{let s=t||``;typeof s==`object`&&(s=s[0]);let c=i(),l=n(c);return await x(e,s,{style:r,isTitle:a,useHtmlLabels:l,markdown:!1,isNode:o,width:1/0},c)},`createLabel`),N=c((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=c(async(e,t)=>{u.info(`Creating subgraph rect for `,t.id,t);let r=i(),{themeVariables:a,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:c}=a,{labelStyles:f,nodeStyles:p,borderStyles:g,backgroundStyles:_}=m(t),v=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),b=n(r),S=v.insert(`g`).attr(`class`,`cluster-label `),C;C=t.labelType===`markdown`?await x(S,t.label,{style:t.labelStyle,useHtmlLabels:b,isNode:!0,width:t.width}):await M(S,t.label,t.labelStyle||``,!1,!0);let w=C.getBBox();if(n(r)){let e=C.children[0],t=l(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=t.width<=w.width+t.padding?w.width+t.padding:t.width;t.width<=w.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;u.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=d.svg(v),n=h(t,{roughness:.7,fill:s,stroke:c,fillWeight:3,seed:o}),r=e.path(N(D,O,T,E,0),n);k=v.insert(()=>(u.debug(`Rough node insert CXC`,r),r),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),k.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else k=v.insert(`rect`,`:first-child`),k.attr(`style`,p).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=y(r);if(S.attr(`transform`,`translate(${t.x-w.width/2}, ${t.y-t.height/2+A})`),f){let e=S.select(`span`);e&&e.attr(`style`,f)}let P=k.node().getBBox();return t.offsetX=0,t.width=P.width,t.height=P.height,t.offsetY=w.height-t.padding/2,t.intersect=function(e){return j(t,e)},{cluster:v,labelBBox:w}},`rect`),F=c((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),I=c(async(e,t)=>{let r=i(),{themeVariables:a,handDrawnSeed:o}=r,{altBackground:s,compositeBackground:c,compositeTitleBackground:u,nodeBorder:f}=a,p=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),m=p.insert(`g`,`:first-child`),h=p.insert(`g`).attr(`class`,`cluster-label`),g=p.append(`rect`),_=await M(h,t.label,t.labelStyle,void 0,!0),v=_.getBBox();if(n(r)){let e=_.children[0],t=l(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=0*t.padding,b=y/2,x=(t.width<=v.width+t.padding?v.width+t.padding:t.width)+y;t.width<=v.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let S=t.height+y,C=t.height+y-v.height-6,w=t.x-x/2,T=t.y-S/2;t.width=x;let E=t.y-t.height/2-b+v.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=d.svg(p),r=t.rx||t.ry?n.path(N(w,T,x,S,10),{roughness:.7,fill:u,fillStyle:`solid`,stroke:f,seed:o}):n.rectangle(w,T,x,S,{seed:o});D=p.insert(()=>r,`:first-child`);let i=n.rectangle(w,E,x,C,{fill:e?s:c,fillStyle:e?`hachure`:`solid`,stroke:f,seed:o});D=p.insert(()=>r,`:first-child`),g=p.insert(()=>i)}else D=m.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,x).attr(`height`,S).attr(`data-look`,t.look),g.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,x).attr(`height`,C);return h.attr(`transform`,`translate(${t.x-v.width/2}, ${T+1-(n(r)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=v.height-t.padding/2,t.labelBBox=v,t.intersect=function(e){return j(t,e)},{cluster:p,labelBBox:v}},`roundedWithTitle`),ee=c(async(e,t)=>{u.info(`Creating subgraph rect for `,t.id,t);let r=i(),{themeVariables:a,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:c}=a,{labelStyles:f,nodeStyles:p,borderStyles:g,backgroundStyles:_}=m(t),v=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),b=n(r),S=v.insert(`g`).attr(`class`,`cluster-label `),C=await x(S,t.label,{style:t.labelStyle,useHtmlLabels:b,isNode:!0,width:t.width}),w=C.getBBox();if(n(r)){let e=C.children[0],t=l(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=t.width<=w.width+t.padding?w.width+t.padding:t.width;t.width<=w.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;u.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=d.svg(v),n=h(t,{roughness:.7,fill:s,stroke:c,fillWeight:4,seed:o}),r=e.path(N(D,O,T,E,t.rx),n);k=v.insert(()=>(u.debug(`Rough node insert CXC`,r),r),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),k.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else k=v.insert(`rect`,`:first-child`),k.attr(`style`,p).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=y(r);if(S.attr(`transform`,`translate(${t.x-w.width/2}, ${t.y-t.height/2+A})`),f){let e=S.select(`span`);e&&e.attr(`style`,f)}let M=k.node().getBBox();return t.offsetX=0,t.width=M.width,t.height=M.height,t.offsetY=w.height-t.padding/2,t.intersect=function(e){return j(t,e)},{cluster:v,labelBBox:w}},`kanbanSection`),te={rect:P,squareRect:P,roundedWithTitle:I,noteGroup:F,divider:c((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=i(),{nodeBorder:a}=n,o=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=o.insert(`g`,`:first-child`),c=0*t.padding,l=t.width+c;t.diff=-t.padding;let u=t.height+c,f=t.x-l/2,p=t.y-u/2;t.width=l;let m;if(t.look===`handDrawn`){let e=d.svg(o).rectangle(f,p,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:a,seed:r});m=o.insert(()=>e,`:first-child`)}else{m=s.insert(`rect`,`:first-child`);let e=`outer`;t.look,e=`divider`,m.attr(`class`,e).attr(`x`,f).attr(`y`,p).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=m.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:ee},L=new Map,R=c(async(e,t)=>{let n=await te[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),ne=c(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}c(z,`intersectNode`);var re=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}c(B,`intersectEllipse`);var V=B;function ie(e,t,n){return V(e,t,t,n)}c(ie,`intersectCircle`);var ae=ie;function H(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&U(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&U(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}c(H,`intersectLine`);function U(e,t){return e*t>0}c(U,`sameSign`);var W=H;function oe(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=W(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}c(oe,`intersectPolygon`);var G={node:re,circle:ae,ellipse:V,polygon:oe,rect:j};function se(e,t){let{labelStyles:n}=m(t);t.labelStyle=n;let r=E(t),i=r;r||(i=`anchor`);let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),{cssStyles:o}=t,s=d.svg(a),c=h(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(c.roughness=0);let l=s.circle(0,0,2,c),f=a.insert(()=>l,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,g(o)),T(t,f),t.intersect=function(e){return u.info(`Circle intersect`,t,1,e),G.circle(t,1,e)},a}c(se,`anchor`);function ce(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}c(ce,`generateArcPoints`);function le(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}c(le,`calculateArcSagitta`);async function ue(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=c(e=>e+o,`calcTotalHeight`),l=c(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:f}=await C(e,t,E(t)),p=s(t?.height?t?.height:f.height),[g,_]=l(p),v=le(p,g,_),y=(t?.width?t?.width:f.width)+a*2+v-v,b=p,{cssStyles:x}=t,S=[{x:y/2,y:-b/2},{x:-y/2,y:-b/2},...ce(-y/2,-b/2,-y/2,b/2,g,_,!1),{x:y/2,y:b/2},...ce(y/2,b/2,y/2,-b/2,g,_,!0)],w=d.svg(u),O=h(t,{});t.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(S),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),x&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,x),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${g/2}, 0)`),T(t,j),t.intersect=function(e){return G.polygon(t,S,e)},u}c(ue,`bowTieRect`);function K(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}c(K,`insertPolygonShape`);var de=12;async function fe(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+de),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=l,p=-u,g=[{x:0+de,y:p},{x:f,y:p},{x:f,y:0},{x:0,y:0},{x:0,y:p+de},{x:0+de,y:p}],_,{cssStyles:v}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=h(t,{}),r=D(g),i=e.path(r,n);_=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),v&&_.attr(`style`,v)}else _=K(s,l,u,g);return r&&_.attr(`style`,r),T(t,_),t.intersect=function(e){return G.polygon(t,g,e)},s}c(fe,`card`);function pe(e,t){let{nodeStyles:n}=m(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=d.svg(r),c=h(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),f=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}c(pe,`choice`);async function me(e,t,n){let{labelStyles:r,nodeStyles:i}=m(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s}=await C(e,t,E(t)),c=n?.padding??s,l=t.look===`neo`?o.width/2+32:o.width/2+c,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=d.svg(a),n=h(t,{}),r=e.circle(0,0,l*2,n);f=a.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,g(p))}else f=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,l).attr(`cx`,0).attr(`cy`,0);return T(t,f),t.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},t.intersect=function(e){return u.info(`Circle intersect`,t,l,e),G.circle(t,l,e)},a}c(me,`circle`);function he(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
2
2
|
M ${i.x},${i.y} L ${o.x},${o.y}`}c(he,`createLine`);function ge(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=d.svg(i),c=h(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=s.circle(0,0,a*2,c),f=he(a),p=s.path(f,c),g=i.insert(()=>l,`:first-child`);return g.insert(()=>p),g.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,r),T(t,g),t.intersect=function(e){return u.info(`crossedCircle intersect`,t,{radius:a,point:e}),G.circle(t,a,e)},i}c(ge,`crossedCircle`);function q(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}c(q,`generateCirclePoints`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,f=Math.max(5,u*.1),{cssStyles:p}=t,g=[...q(l/2,-u/2,f,30,-90,0),{x:-l/2-f,y:f},...q(l/2+f*2,-f,f,20,-180,-270),...q(l/2+f*2,f,f,20,-90,-180),{x:-l/2-f,y:-u/2},...q(l/2,u/2,f,20,0,90)],_=[{x:l/2,y:-u/2-f},{x:-l/2,y:-u/2-f},...q(l/2,-u/2,f,20,-90,0),{x:-l/2-f,y:-f},...q(l/2+l*.1,-f,f,20,-180,-270),...q(l/2+l*.1,f,f,20,-90,-180),{x:-l/2-f,y:u/2},...q(l/2,u/2,f,20,0,90),{x:-l/2,y:u/2+f},{x:l/2,y:u/2+f}],v=d.svg(i),y=h(t,{fill:`none`});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=D(g).replace(`Z`,``),x=v.path(b,y),S=D(_),w=v.path(S,{...y}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>x,`:first-child`),O.attr(`class`,`text`),p&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${f}, 0)`),o.attr(`transform`,`translate(${-l/2+f-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,_,e)},i}c(_e,`curlyBraceLeft`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}c(J,`generateCirclePoints`);async function ve(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),f=Math.max(5,u*.1),{cssStyles:p}=t,g=[...J(l/2,-u/2,f,20,-90,0),{x:l/2+f,y:-f},...J(l/2+f*2,-f,f,20,-180,-270),...J(l/2+f*2,f,f,20,-90,-180),{x:l/2+f,y:u/2},...J(l/2,u/2,f,20,0,90)],_=[{x:-l/2,y:-u/2-f},{x:l/2,y:-u/2-f},...J(l/2,-u/2,f,20,-90,0),{x:l/2+f,y:-f},...J(l/2+f*2,-f,f,20,-180,-270),...J(l/2+f*2,f,f,20,-90,-180),{x:l/2+f,y:u/2},...J(l/2,u/2,f,20,0,90),{x:l/2,y:u/2+f},{x:-l/2,y:u/2+f}],v=d.svg(i),y=h(t,{fill:`none`});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=D(g).replace(`Z`,``),x=v.path(b,y),S=D(_),w=v.path(S,{...y}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>x,`:first-child`),O.attr(`class`,`text`),p&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-f}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,_,e)},i}c(ve,`curlyBraceRight`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}c(Y,`generateCirclePoints`);async function ye(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),f=Math.max(5,u*.1),{cssStyles:p}=t,g=[...Y(l/2,-u/2,f,30,-90,0),{x:-l/2-f,y:f},...Y(l/2+f*2,-f,f,20,-180,-270),...Y(l/2+f*2,f,f,20,-90,-180),{x:-l/2-f,y:-u/2},...Y(l/2,u/2,f,20,0,90)],_=[...Y(-l/2+f+f/2,-u/2,f,20,-90,-180),{x:l/2-f/2,y:f},...Y(-l/2-f/2,-f,f,20,0,90),...Y(-l/2-f/2,f,f,20,-90,0),{x:l/2-f/2,y:-f},...Y(-l/2+f+f/2,u/2,f,30,-180,-270)],v=[{x:l/2,y:-u/2-f},{x:-l/2,y:-u/2-f},...Y(l/2,-u/2,f,20,-90,0),{x:-l/2-f,y:-f},...Y(l/2+f*2,-f,f,20,-180,-270),...Y(l/2+f*2,f,f,20,-90,-180),{x:-l/2-f,y:u/2},...Y(l/2,u/2,f,20,0,90),{x:-l/2,y:u/2+f},{x:l/2-f-f/2,y:u/2+f},...Y(-l/2+f+f/2,-u/2,f,20,-90,-180),{x:l/2-f/2,y:f},...Y(-l/2-f/2,-f,f,20,0,90),...Y(-l/2-f/2,f,f,20,-90,0),{x:l/2-f/2,y:-f},...Y(-l/2+f+f/2,u/2,f,30,-180,-270)],y=d.svg(i),b=h(t,{fill:`none`});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=D(g).replace(`Z`,``),S=y.path(x,b),w=D(_).replace(`Z`,``),O=y.path(w,b),k=D(v),A=y.path(k,{...b}),j=i.insert(`g`,`:first-child`);return j.insert(()=>A,`:first-child`).attr(`stroke-opacity`,0),j.insert(()=>S,`:first-child`),j.insert(()=>O,`:first-child`),j.attr(`class`,`text`),p&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${f-f/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,v,e)},i}c(ye,`curlyBraces`);async function be(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),f=u/2,{cssStyles:p}=t,g=d.svg(s),_=h(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=l,y=u,b=v-f,x=y/4,S=[{x:b,y:0},{x,y:0},{x:0,y:y/2},{x,y},{x:b,y},...k(-b,-y/2,f,50,270,90)],w=D(S),O=g.path(w,_),A=s.insert(()=>O,`:first-child`);return A.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,r),A.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(t,A),t.intersect=function(e){return G.polygon(t,S,e)},s}c(be,`curvedTrapezoid`);var xe=c((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Se=c((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),Ce=c((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),we=8,Te=8;async function Ee(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<Te&&(t.width=Te);let n=e/2/(2.5+e/50);t.height=(t.height??0)-a-n*3,t.height<we&&(t.height=we)}let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t.width?t.width:c.width)+o,f=u/2,p=f/(2.5+u/50),_=(t.height?t.height:c.height)+a+p,v,{cssStyles:y}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=Se(0,0,u,_,f,p),r=Ce(0,p,u,_,f,p),i=h(t,{}),a=e.path(n,i),o=e.path(r,h(t,{fill:`none`}));v=s.insert(()=>o,`:first-child`),v=s.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=xe(0,0,u,_,f,p);v=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,g(y)).attr(`style`,r)}return v.attr(`label-offset-y`,p),v.attr(`transform`,`translate(${-u/2}, ${-(_/2+p)})`),T(t,v),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}c(Ee,`cylinder`);async function X(e,t,n){let{labelStyles:r,nodeStyles:i}=m(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await C(e,t,E(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,f,{rx:p,ry:_}=t,{cssStyles:v}=t;if(n?.rx&&n.ry&&(p=n.rx,_=n.ry),t.look===`handDrawn`){let e=d.svg(a),n=h(t,{}),r=p||_?e.path(N(l,u,s,c,p||0),n):e.rectangle(l,u,s,c,n);f=a.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,g(v))}else f=a.insert(`rect`,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,g(p)).attr(`ry`,g(_)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return T(t,f),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},a}c(X,`drawRect`);async function De(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await X(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=d.svg(c),n=h(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,f=(Number(l.attr(`height`))||s)??0;return u>0&&f>0&&l.attr(`stroke-dasharray`,`${u} ${f}`),c}c(De,`datastore`);async function Oe(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=s.width+i,u=s.height+a,f=u*.2,p=-l/2,g=-u/2-f/2,{cssStyles:_}=t,v=d.svg(o),y=h(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:p,y:g+f},{x:-p,y:g+f},{x:-p,y:-g},{x:p,y:-g},{x:p,y:g},{x:-p,y:g},{x:-p,y:g+f}],x=v.polygon(b.map(e=>[e.x,e.y]),y),S=o.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${p+(t.padding??0)/2-(s.x-(s.left??0))}, ${g+f+(t.padding??0)/2-(s.y-(s.top??0))})`),T(t,S),t.intersect=function(e){return G.rect(t,e)},o}c(Oe,`dividedRectangle`);async function ke(e,t){let{labelStyles:n,nodeStyles:r}=m(t),i=t.look===`neo`?12:5;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width/2:c.width/2)+(o??0),f=l-i,p,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=h(t,{roughness:.2,strokeWidth:2.5}),r=h(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,l*2,n),a=e.circle(0,0,f*2,r);p=s.insert(`g`,`:first-child`),p.attr(`class`,g(t.cssClasses)).attr(`style`,g(_)),p.node()?.appendChild(i),p.node()?.appendChild(a)}else{p=s.insert(`g`,`:first-child`);let e=p.insert(`circle`,`:first-child`),t=p.insert(`circle`);p.attr(`class`,`basic label-container`).attr(`style`,r),e.attr(`class`,`outer-circle`).attr(`style`,r).attr(`r`,l).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,r).attr(`r`,f).attr(`cx`,0).attr(`cy`,0)}return T(t,p),t.intersect=function(e){return u.info(`DoubleCircle intersect`,t,l,e),G.circle(t,l,e)},s}c(ke,`doublecircle`);function Ae(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=m(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=d.svg(a),{nodeBorder:c}=n,l=h(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let f=s.circle(0,0,14,l),p=a.insert(()=>f,`:first-child`);return p.selectAll(`path`).attr(`style`,`fill: ${c} !important;`),o&&o.length>0&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),T(t,p),t.intersect=function(e){return u.info(`filledCircle intersect`,t,{radius:7,point:e}),G.circle(t,7,e)},a}c(Ae,`filledCircle`);var je=10,Me=10;async function Ne(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.height<je&&(t.height=je),t.width=(t?.width??0)-a-a/2,t.width<Me&&(t.width=Me));let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width?t?.width:s.width)+(a??0),f=t?.height?t?.height:l+s.height,p=f,g=[{x:0,y:-f},{x:p,y:-f},{x:p/2,y:0}],{cssStyles:_}=t,v=d.svg(o),y=h(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=D(g),x=v.path(b,y),S=o.insert(()=>x,`:first-child`).attr(`transform`,`translate(${-f/2}, ${f/2})`).attr(`class`,`outer-path`);return _&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),t.width=l,t.height=f,T(t,S),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-f/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(e){return u.info(`Triangle intersect`,t,g,e),G.polygon(t,g,e)},o}c(Ne,`flippedTriangle`);function Pe(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=m(t);t.label=``;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,f=-1*l/2,p=d.svg(o),g=h(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=p.rectangle(u,f,c,l,g),v=o.insert(()=>_,`:first-child`);s&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,a),T(t,v);let y=r?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(e){return G.rect(t,e)},o}c(Pe,`forkJoin`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:o,bbox:s}=await C(e,t,E(t)),c=(t?.width?t?.width:Math.max(15,s.width))+i*2,l=(t?.height?t?.height:Math.max(10,s.height))+a*2,f=l/2,{cssStyles:p}=t,g=d.svg(o),_=h(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:-c/2,y:-l/2},{x:c/2-f,y:-l/2},...k(-c/2+f,0,f,50,90,270),{x:c/2-f,y:l/2},{x:-c/2,y:l/2}],y=D(v),b=g.path(y,_),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,r),T(t,x),t.intersect=function(e){return u.info(`Pill intersect`,t,{radius:f,point:e}),G.polygon(t,v,e)},o}c(Fe,`halfRoundedRectangle`);var Ie=c((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Le(e,t){let{labelStyles:n,nodeStyles:r}=m(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await C(e,t,E(t)),u=(t?.height?t?.height:l.height)+o,f=u/i,p=(t?.width?t?.width:l.width)+2*f+s,g=[{x:f,y:0},{x:p-f,y:0},{x:p,y:-u/2},{x:p-f,y:-u},{x:f,y:-u},{x:0,y:-u/2}],_,{cssStyles:v}=t;if(t.look===`handDrawn`){let e=d.svg(c),n=h(t,{}),r=Ie(0,0,p,u,f),i=e.path(r,n);_=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-p/2}, ${u/2})`),v&&_.attr(`style`,v)}else _=K(c,p,u,g);return r&&_.attr(`style`,r),t.width=p,t.height=u,T(t,_),t.intersect=function(e){return G.polygon(t,g,e)},c}c(Le,`hexagon`);async function Re(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await C(e,t,E(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,c=d.svg(i),l=h(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let f=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],p=D(f),g=c.path(p,l),_=i.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),s&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),_.attr(`transform`,`translate(${-a/2}, ${-o/2})`),T(t,_),t.intersect=function(e){return u.info(`Pill intersect`,t,{points:f}),G.polygon(t,f,e)},i}c(Re,`hourglass`);async function ze(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=m(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:f,label:g}=await C(e,t,`icon-shape default`),_=t.pos===`t`,v=s,y=s,{nodeBorder:b}=n,{stylesMap:x}=p(t),w=-y/2,E=-v/2,D=t.label?8:0,O=d.svg(l),k=h(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(w,E,y,v,k),j=Math.max(y,f.width),M=v+f.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=l.insert(()=>A,`:first-child`),F=l.insert(()=>N);if(t.icon){let e=l.append(`g`);e.html(`<g>${await S(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${_?f.height/2+D/2-i/2-o:-f.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${x.get(`stroke`)??b};`)}return g.attr(`transform`,`translate(${-f.width/2-(f.x-(f.left??0))},${_?-M/2:M/2-f.height})`),P.attr(`transform`,`translate(0,${_?f.height/2+D/2:-f.height/2-D/2})`),T(t,F),t.intersect=function(e){if(u.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=_?[{x:n-f.width/2,y:r-i/2},{x:n+f.width/2,y:r-i/2},{x:n+f.width/2,y:r-i/2+f.height+D},{x:n+y/2,y:r-i/2+f.height+D},{x:n+y/2,y:r+i/2},{x:n-y/2,y:r+i/2},{x:n-y/2,y:r-i/2+f.height+D},{x:n-f.width/2,y:r-i/2+f.height+D}]:[{x:n-y/2,y:r-i/2},{x:n+y/2,y:r-i/2},{x:n+y/2,y:r-i/2+v},{x:n+f.width/2,y:r-i/2+v},{x:n+f.width/2/2,y:r+i/2},{x:n-f.width/2,y:r+i/2},{x:n-f.width/2,y:r-i/2+v},{x:n-y/2,y:r-i/2+v}],G.polygon(t,a,e)},l}c(ze,`icon`);async function Be(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=m(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:f,label:g}=await C(e,t,`icon-shape default`),_=t.label?8:0,v=t.pos===`t`,{nodeBorder:y,mainBkg:b}=n,{stylesMap:x}=p(t),w=d.svg(l),E=h(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=x.get(`fill`)??b;let D=l.append(`g`);t.icon&&D.html(`<g>${await S(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let O=D.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=w.circle(0,0,N,E),F=Math.max(N,f.width),I=N+f.height+_,ee=w.rectangle(-F/2,-I/2,F,I,{...E,fill:`transparent`,stroke:`none`}),te=l.insert(()=>P,`:first-child`),L=l.insert(()=>ee);return D.attr(`transform`,`translate(${-k/2-j},${v?f.height/2+_/2-A/2-M:-f.height/2-_/2-A/2-M})`),D.attr(`style`,`color: ${x.get(`stroke`)??y};`),g.attr(`transform`,`translate(${-f.width/2-(f.x-(f.left??0))},${v?-I/2:I/2-f.height})`),te.attr(`transform`,`translate(0,${v?f.height/2+_/2:-f.height/2-_/2})`),T(t,L),t.intersect=function(e){return u.info(`iconSquare intersect`,t,e),G.rect(t,e)},l}c(Be,`iconCircle`);async function Ve(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=m(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:f,halfPadding:g,label:_}=await C(e,t,`icon-shape default`),v=t.pos===`t`,y=s+g*2,b=s+g*2,{nodeBorder:x,mainBkg:w}=n,{stylesMap:E}=p(t),D=-b/2,O=-y/2,k=t.label?8:0,A=d.svg(l),j=h(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,b,y,5),j),P=Math.max(b,f.width),F=y+f.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),ee=l.insert(()=>M,`:first-child`).attr(`class`,`icon-shape2`),te=l.insert(()=>I);if(t.icon){let e=l.append(`g`);e.html(`<g>${await S(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${v?f.height/2+k/2-i/2-o:-f.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??x};`)}return _.attr(`transform`,`translate(${-f.width/2-(f.x-(f.left??0))},${v?-F/2:F/2-f.height})`),ee.attr(`transform`,`translate(0,${v?f.height/2+k/2:-f.height/2-k/2})`),T(t,te),t.intersect=function(e){if(u.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=v?[{x:n-f.width/2,y:r-i/2},{x:n+f.width/2,y:r-i/2},{x:n+f.width/2,y:r-i/2+f.height+k},{x:n+b/2,y:r-i/2+f.height+k},{x:n+b/2,y:r+i/2},{x:n-b/2,y:r+i/2},{x:n-b/2,y:r-i/2+f.height+k},{x:n-f.width/2,y:r-i/2+f.height+k}]:[{x:n-b/2,y:r-i/2},{x:n+b/2,y:r-i/2},{x:n+b/2,y:r-i/2+y},{x:n+f.width/2,y:r-i/2+y},{x:n+f.width/2/2,y:r+i/2},{x:n-f.width/2,y:r+i/2},{x:n-f.width/2,y:r-i/2+y},{x:n-b/2,y:r-i/2+y}],G.polygon(t,a,e)},l}c(Ve,`iconRounded`);async function He(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=m(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:f,halfPadding:g,label:_}=await C(e,t,`icon-shape default`),v=t.pos===`t`,y=s+g*2,b=s+g*2,{nodeBorder:x,mainBkg:w}=n,{stylesMap:E}=p(t),D=-b/2,O=-y/2,k=t.label?8:0,A=d.svg(l),j=h(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,b,y,.1),j),P=Math.max(b,f.width),F=y+f.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),ee=l.insert(()=>M,`:first-child`),te=l.insert(()=>I);if(t.icon){let e=l.append(`g`);e.html(`<g>${await S(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${v?f.height/2+k/2-i/2-o:-f.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??x};`)}return _.attr(`transform`,`translate(${-f.width/2-(f.x-(f.left??0))},${v?-F/2:F/2-f.height})`),ee.attr(`transform`,`translate(0,${v?f.height/2+k/2:-f.height/2-k/2})`),T(t,te),t.intersect=function(e){if(u.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=v?[{x:n-f.width/2,y:r-i/2},{x:n+f.width/2,y:r-i/2},{x:n+f.width/2,y:r-i/2+f.height+k},{x:n+b/2,y:r-i/2+f.height+k},{x:n+b/2,y:r+i/2},{x:n-b/2,y:r+i/2},{x:n-b/2,y:r-i/2+f.height+k},{x:n-f.width/2,y:r-i/2+f.height+k}]:[{x:n-b/2,y:r-i/2},{x:n+b/2,y:r-i/2},{x:n+b/2,y:r-i/2+y},{x:n+f.width/2,y:r-i/2+y},{x:n+f.width/2/2,y:r+i/2},{x:n-f.width/2,y:r+i/2},{x:n-f.width/2,y:r-i/2+y},{x:n-b/2,y:r-i/2+y}],G.polygon(t,a,e)},l}c(He,`iconSquare`);async function Ue(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),a=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/a;let{labelStyles:o}=m(t);t.labelStyle=o;let s=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let c=Math.max(t.label?s??0:0,t?.assetWidth??i),l=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:c,f=t.constraint===`on`?l/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(l,s??0);let{shapeSvg:p,bbox:g,label:_}=await C(e,t,`image-shape default`),v=t.pos===`t`,y=-l/2,b=-f/2,x=t.label?8:0,S=d.svg(p),w=h(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let E=S.rectangle(y,b,l,f,w),D=Math.max(l,g.width),O=f+g.height+x,k=S.rectangle(-D/2,-O/2,D,O,{...w,fill:`none`,stroke:`none`}),A=p.insert(()=>E,`:first-child`),j=p.insert(()=>k);if(t.img){let e=p.append(`image`);e.attr(`href`,t.img),e.attr(`width`,l),e.attr(`height`,f),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-l/2},${v?O/2-f:-O/2})`)}return _.attr(`transform`,`translate(${-g.width/2-(g.x-(g.left??0))},${v?-f/2-g.height/2-x/2:f/2-g.height/2+x/2})`),A.attr(`transform`,`translate(0,${v?g.height/2+x/2:-g.height/2-x/2})`),T(t,j),t.intersect=function(e){if(u.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=v?[{x:n-g.width/2,y:r-i/2},{x:n+g.width/2,y:r-i/2},{x:n+g.width/2,y:r-i/2+g.height+x},{x:n+l/2,y:r-i/2+g.height+x},{x:n+l/2,y:r+i/2},{x:n-l/2,y:r+i/2},{x:n-l/2,y:r-i/2+g.height+x},{x:n-g.width/2,y:r-i/2+g.height+x}]:[{x:n-l/2,y:r-i/2},{x:n+l/2,y:r-i/2},{x:n+l/2,y:r-i/2+f},{x:n+g.width/2,y:r-i/2+f},{x:n+g.width/2/2,y:r+i/2},{x:n-g.width/2,y:r+i/2},{x:n-g.width/2,y:r-i/2+f},{x:n-l/2,y:r-i/2+f}],G.polygon(t,a,e)},p}c(Ue,`imageSquare`);async function We(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),f=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],p,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=h(t,{}),r=D(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),g&&p.attr(`style`,g)}else p=K(s,l,u,f);return r&&p.attr(`style`,r),t.width=l,t.height=u,T(t,p),t.intersect=function(e){return G.polygon(t,f,e)},s}c(We,`inv_trapezoid`);async function Ge(e,t){let{shapeSvg:n,bbox:r,label:i}=await C(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),T(t,a),t.intersect=function(e){return G.rect(t,e)},n}c(Ge,`labelRect`);async function Ke(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,f=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],p,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=h(t,{}),r=D(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),g&&p.attr(`style`,g)}else p=K(s,u,l,f);return r&&p.attr(`style`,r),t.width=u,t.height=l,T(t,p),t.intersect=function(e){return G.polygon(t,f,e)},s}c(Ke,`lean_left`);async function qe(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,f=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],p,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=h(t,{}),r=D(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),g&&p.attr(`style`,g)}else p=K(s,u,l,f);return r&&p.attr(`style`,r),t.width=u,t.height=l,T(t,p),t.intersect=function(e){return G.polygon(t,f,e)},s}c(qe,`lean_right`);function Je(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),c=[{x:o,y:0},{x:0,y:s+7/2},{x:o-14,y:s+7/2},{x:0,y:2*s},{x:o,y:s-7/2},{x:14,y:s-7/2}],l=d.svg(i),f=h(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=D(c),g=l.path(p,f),_=i.insert(()=>g,`:first-child`);return _.attr(`class`,`outer-path`),a&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,a),r&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,r),_.attr(`transform`,`translate(-${o/2},${-s})`),T(t,_),t.intersect=function(e){return u.info(`lightningBolt intersect`,t,e),G.polygon(t,c,e)},i}c(Je,`lightningBolt`);var Ye=c((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Xe=c((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ze=c((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Qe=10,$e=10;async function et(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<$e&&(t.width=$e);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<Qe&&(t.height=Qe)}let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,f=u/2,p=f/(2.5+u/50),_=(t?.height?t?.height:c.height)+p+o*2,v=_*.1,y,{cssStyles:b}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=Xe(0,0,u,_,f,p,v),r=Ze(0,p,u,_,f,p),i=h(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),y=s.insert(()=>a,`:first-child`),y.attr(`class`,`basic label-container`),b&&y.attr(`style`,b)}else{let e=Ye(0,0,u,_,f,p,v);y=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,g(b)).attr(`style`,r)}return y.attr(`label-offset-y`,p),y.attr(`transform`,`translate(${-u/2}, ${-(_/2+p)})`),T(t,y),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+p-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}c(et,`linedCylinder`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,f=(t?.height?t?.height:c.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,g=f+p,{cssStyles:_}=t,v=d.svg(s),y=h(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:-u/2-u/2*.1,y:-g/2},{x:-u/2-u/2*.1,y:g/2},...O(-u/2-u/2*.1,g/2,u/2+u/2*.1,g/2,p,.8),{x:u/2+u/2*.1,y:-g/2},{x:-u/2-u/2*.1,y:-g/2},{x:-u/2,y:-g/2},{x:-u/2,y:g/2*1.1},{x:-u/2,y:-g/2}],x=v.polygon(b.map(e=>[e.x,e.y]),y),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(0,${-p/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-f/2+(t.padding??0)-p/2-(c.y-(c.top??0))})`),T(t,S),t.intersect=function(e){return G.polygon(t,b,e)},s}c(tt,`linedWaveEdgedRect`);async function nt(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),f=(t?.width?t?.width:l.width)+a*2+2*s,p=(t?.height?t?.height:l.height)+o*2+2*s,g=f-2*s,_=p-2*s,v=-g/2,y=-_/2,{cssStyles:b}=t,x=d.svg(c),S=h(t,{}),w=[{x:v-s,y:y+s},{x:v-s,y:y+_+s},{x:v+g-s,y:y+_+s},{x:v+g-s,y:y+_},{x:v+g,y:y+_},{x:v+g,y:y+_-s},{x:v+g+s,y:y+_-s},{x:v+g+s,y:y-s},{x:v+s,y:y-s},{x:v+s,y},{x:v,y},{x:v,y:y+s}],O=[{x:v,y:y+s},{x:v+g-s,y:y+s},{x:v+g-s,y:y+_},{x:v+g,y:y+_},{x:v+g,y},{x:v,y}];t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let k=D(w),j=x.path(k,S),M=D(O),N=x.path(M,S);t.look!==`handDrawn`&&(j=A(j),N=A(N));let P=c.insert(`g`,`:first-child`);return P.insert(()=>j),P.insert(()=>N),P.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,b),r&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),T(t,P),t.intersect=function(e){return G.polygon(t,w,e)},c}c(nt,`multiRect`);async function rt(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let f=Math.max(a.width,t?.width??0)+c*2,p=Math.max(a.height,t?.height??0)+l*3,g=t.look===`neo`?p/4:p/8,_=p+(u?g/2:-g/2),v=-f/2,y=-_/2,{cssStyles:b}=t,x=O(v-10,y+_+10,v+f-10,y+_+10,g,.8),S=x?.[x.length-1],w=[{x:v-10,y:y+10},{x:v-10,y:y+_+10},...x,{x:v+f-10,y:S.y-10},{x:v+f,y:S.y-10},{x:v+f,y:S.y-20},{x:v+f+10,y:S.y-20},{x:v+f+10,y:y-10},{x:v+10,y:y-10},{x:v+10,y},{x:v,y},{x:v,y:y+10}],k=[{x:v,y:y+10},{x:v+f-10,y:y+10},{x:v+f-10,y:S.y-10},{x:v+f,y:S.y-10},{x:v+f,y},{x:v,y}],A=d.svg(i),j=h(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let M=D(w),N=A.path(M,j),P=D(k),F=A.path(P,j),I=i.insert(()=>N,`:first-child`);return I.insert(()=>F),I.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,b),r&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,r),I.attr(`transform`,`translate(0,${-g/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-g/2-(a.y-(a.top??0))})`),T(t,I),t.intersect=function(e){return G.polygon(t,w,e)},i}c(rt,`multiWaveEdgedRectangle`);async function it(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=m(t);t.labelStyle=i,t.useHtmlLabels||n(o())||(t.centerLabel=!0);let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),f=Math.max(c.height+(t.padding??0)*2,t?.height??0),p=-u/2,g=-f/2,{cssStyles:_}=t,v=d.svg(s),y=h(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=v.rectangle(p,g,u,f,y),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),_&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,_),a&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,a),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,x),t.intersect=function(e){return G.rect(t,e)},s}c(it,`note`);var at=c((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function ot(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=d.svg(i),n=h(t,{}),r=at(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=K(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),T(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=G.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}c(ot,`question`);async function st(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),f=(t?.height??c.height)+(t.look===`neo`?o*2:o),p=-u/2,g=-f/2,_=g/2,v=[{x:p+_,y:g},{x:p,y:0},{x:p+_,y:-g},{x:-p,y:-g},{x:-p,y:g}],{cssStyles:y}=t,b=d.svg(s),x=h(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=D(v),w=b.path(S,x),O=s.insert(()=>w,`:first-child`);return O.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-_/2},0)`),l.attr(`transform`,`translate(${-_/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,v,e)},s}c(st,`rect_left_inv_arrow`);async function ct(e,t){let{labelStyles:r,nodeStyles:a}=m(t);t.labelStyle=r;let o;o=t.cssClasses?`node `+t.cssClasses:`node default`;let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),c=s.insert(`g`),f=s.insert(`g`).attr(`class`,`label`).attr(`style`,a),p=t.description,g=t.label,_=await M(f,g,t.labelStyle,!0,!0),v={width:0,height:0};if(n(i())){let e=_.children[0],t=l(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}u.info(`Text 2`,p);let y=p||[],b=_.getBBox(),x=await M(f,Array.isArray(y)?y.join(`<br/>`):y,t.labelStyle,!0,!0),S=x.children[0],C=l(x);v=S.getBoundingClientRect(),C.attr(`width`,v.width),C.attr(`height`,v.height);let w=(t.padding||0)/2;l(x).attr(`transform`,`translate( `+(v.width>b.width?0:(b.width-v.width)/2)+`, `+(b.height+w+5)+`)`),l(_).attr(`transform`,`translate( `+(v.width<b.width?0:-(b.width-v.width)/2)+`, 0)`),v=f.node().getBBox(),f.attr(`transform`,`translate(`+-v.width/2+`, `+(-v.height/2-w+3)+`)`);let E=v.width+(t.padding||0),D=v.height+(t.padding||0),O=-v.width/2-w,k=-v.height/2-w,A,j;if(t.look===`handDrawn`){let e=d.svg(s),n=h(t,{}),r=e.path(N(O,k,E,D,t.rx||0),n),i=e.line(-v.width/2-w,-v.height/2-w+b.height+w,v.width/2+w,-v.height/2-w+b.height+w,n);j=s.insert(()=>(u.debug(`Rough node insert CXC`,r),i),`:first-child`),A=s.insert(()=>(u.debug(`Rough node insert CXC`,r),r),`:first-child`)}else A=c.insert(`rect`,`:first-child`),j=c.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-v.width/2-w).attr(`y`,-v.height/2-w).attr(`width`,v.width+(t.padding||0)).attr(`height`,v.height+(t.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-v.width/2-w).attr(`x2`,v.width/2+w).attr(`y1`,-v.height/2-w+b.height+w).attr(`y2`,-v.height/2-w+b.height+w);return T(t,A),t.intersect=function(e){return G.rect(t,e)},s}c(ct,`rectWithTitle`);async function lt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return X(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}c(lt,`roundedRect`);var Z=8;async function ut(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,f=l-Z,p=u,_=Z-l/2,v=-u/2,{cssStyles:y}=t,b=d.svg(o),x=h(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=[{x:_,y:v},{x:_+f,y:v},{x:_+f,y:v+p},{x:_-Z,y:v+p},{x:_-Z,y:v},{x:_,y:v},{x:_,y:v+p}],w=b.polygon(S.map(e=>[e.x,e.y]),x),D=o.insert(()=>w,`:first-child`);return D.attr(`class`,`basic label-container outer-path`).attr(`style`,g(y)),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),y&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.rect(t,e)},o}c(ut,`shadedProcess`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,f=((t?.height?t?.height:c.height)+o*2)*1.5,p=u,g=f/1.5,_=-p/2,v=-g/2,{cssStyles:y}=t,b=d.svg(s),x=h(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=[{x:_,y:v},{x:_,y:v+g},{x:_+p,y:v+g},{x:_+p,y:v-g/2}],w=D(S),O=b.path(w,x),k=s.insert(()=>O,`:first-child`);return k.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,r),k.attr(`transform`,`translate(0, ${g/4})`),l.attr(`transform`,`translate(${-p/2+(t.padding??0)-(c.x-(c.left??0))}, ${-g/4+(t.padding??0)-(c.y-(c.top??0))})`),T(t,k),t.intersect=function(e){return G.polygon(t,S,e)},s}c(dt,`slopedRect`);async function ft(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return X(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}c(ft,`squareRect`);async function pt(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),f=l/2,{cssStyles:p}=t,g=d.svg(s),_=h(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:-u/2+f,y:-l/2},{x:u/2-f,y:-l/2},...k(-u/2+f,0,f,50,90,270),{x:u/2-f,y:l/2},...k(u/2-f,0,f,50,270,450)],y=D(v),b=g.path(y,_),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,r),T(t,x),t.intersect=function(e){return G.polygon(t,v,e)},s}c(pt,`stadium`);async function mt(e,t){return X(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}c(mt,`state`);function ht(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=m(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),f=d.svg(u),p=h(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let g=f.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),_=s??c,v=(t.width??0)*5/14,y=f.circle(0,0,v,{...p,fill:_,stroke:_,strokeWidth:2,fillStyle:`solid`}),b=u.insert(()=>g,`:first-child`);if(b.insert(()=>y),t.look!==`handDrawn`&&b.attr(`class`,`outer-path`),a&&b.selectAll(`path`).attr(`style`,a),i&&b.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;b.attr(`style`,`filter:url(#${n})`)}return T(t,b),t.intersect=function(e){return G.circle(t,(t.width??0)/2,e)},u}c(ht,`stateEnd`);function gt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=d.svg(a).circle(0,0,t.width,f(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return T(t,o),t.intersect=function(e){return G.circle(t,(t.width??7)/2,e)},a}c(gt,`stateStart`);var _t=8;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+2*_t+a,u=(t?.height??c.height)+o,f=l-2*_t,p=u,_=-l/2,v=-u/2,y=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look===`handDrawn`){let e=d.svg(s),n=h(t,{}),r=e.rectangle(_,v,f+16,p,n),i=e.line(_+_t,v,_+_t,v+p,n),a=e.line(_+_t+f,v,_+_t+f,v+p,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,g(c)),T(t,o)}else{let e=K(s,f,p,y);r&&e.attr(`style`,r),T(t,e)}return t.intersect=function(e){return G.polygon(t,y,e)},s}c(vt,`subroutine`);var yt=.2;async function bt(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-yt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height?t?.height:c.height)+o*2,u=yt*l,f=yt*l,p=(t?.width?t?.width:c.width)+a*2+u-u,g=l,_=-p/2,v=-g/2,{cssStyles:y}=t,b=d.svg(s),x=h(t,{}),S=[{x:_-u/2,y:v},{x:_+p+u/2,y:v},{x:_+p+u/2,y:v+g},{x:_-u/2,y:v+g}],w=[{x:_+p-u/2,y:v+g},{x:_+p+u/2,y:v+g},{x:_+p+u/2,y:v+g-f}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let O=D(S),k=b.path(O,x),A=D(w),j=b.path(A,{...x,fillStyle:`solid`}),M=s.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),T(t,M),t.intersect=function(e){return G.polygon(t,S,e)},s}c(bt,`taggedRect`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,f=.2*c,p=c+l,{cssStyles:g}=t,_=d.svg(i),v=h(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:-s/2-s/2*.1,y:p/2},...O(-s/2-s/2*.1,p/2,s/2+s/2*.1,p/2,l,.8),{x:s/2+s/2*.1,y:-p/2},{x:-s/2-s/2*.1,y:-p/2}],b=-s/2+s/2*.1,x=-p/2-f*.4,S=[{x:b+s-u,y:(x+c)*1.3},{x:b+s,y:x+c-f},{x:b+s,y:(x+c)*.9},...O(b+s,(x+c)*1.25,b+s-u,(x+c)*1.3,-c*.02,.5)],w=D(y),k=_.path(w,v),A=D(S),j=_.path(A,{...v,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),T(t,M),t.intersect=function(e){return G.polygon(t,y,e)},i}c(xt,`taggedWaveEdgedRectangle`);async function St(e,t){let{labelStyles:n,nodeStyles:r}=m(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),T(t,u),t.intersect=function(e){return G.rect(t,e)},i}c(St,`text`);var Ct=c((e,t,n,r,i,a)=>`M${e},${t}
|
|
3
3
|
a${i},${a} 0,0,1 0,${-r}
|
|
4
4
|
l${n},0
|