@loopstack/loopstack-studio 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/LoadingCentered.js +2 -2
- package/dist/components/ai-elements/code-block.js +96 -0
- package/dist/components/ai-elements/message.js +87 -0
- package/dist/components/ai-elements/prompt-input.js +321 -0
- package/dist/components/ai-elements/reasoning.js +124 -0
- package/dist/components/ai-elements/shimmer.js +37 -0
- package/dist/components/ai-elements/sources.js +65 -0
- package/dist/components/ai-elements/tool.js +158 -0
- package/dist/components/content/ErrorAlert.js +17 -0
- package/dist/components/data-table/DataTable.js +99 -96
- package/dist/components/dynamic-form/CodeContent.js +2 -2
- package/dist/components/dynamic-form/FormElement.js +3 -3
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/ObjectController.js +2 -2
- package/dist/components/layout/MainLayout.js +0 -1
- package/dist/components/lists/ListView.js +62 -59
- package/dist/components/loopstack-elements/link.js +115 -0
- package/dist/components/ui/button-group.js +13 -0
- package/dist/components/ui/command.js +7 -0
- package/dist/components/ui/context-menu.js +63 -0
- package/dist/components/ui/hover-card.js +6 -0
- package/dist/components/ui/input-group.js +85 -0
- package/dist/components/ui/table.js +2 -2
- package/dist/components/ui/tabs.js +54 -0
- package/dist/components/ui-widgets/UiActions.js +24 -0
- package/dist/components/ui-widgets/UiWidget.js +43 -0
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +43 -0
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +23 -0
- package/dist/components/ui-widgets/widgets/SubmitButton.js +23 -0
- package/dist/features/code-explorer/CodeExplorer.js +69 -0
- package/dist/features/code-explorer/components/CodeExplorerTree.js +43 -0
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +82 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +237 -0
- package/dist/features/code-explorer/components/FileTabsBar.js +191 -0
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +165 -0
- package/dist/features/code-explorer/utils/fileIcons.js +42 -0
- package/dist/features/dashboard/Dashboard.js +125 -0
- package/dist/features/dashboard/RunItem.js +76 -0
- package/dist/features/dashboard/RunList.js +32 -0
- package/dist/features/debug/components/ConfigFlowViewer.js +79 -0
- package/dist/features/debug/components/PipelineDebugHeader.js +48 -0
- package/dist/features/debug/components/PipelineDebugLegend.js +68 -0
- package/dist/features/debug/components/PipelineFlowViewer.js +109 -0
- package/dist/features/debug/components/pipeline-flow/StateNode.js +111 -0
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +41 -0
- package/dist/features/debug/components/pipeline-flow/WorkflowTransitionEdge.js +97 -0
- package/dist/features/debug/lib/edge-paths.js +47 -0
- package/dist/features/debug/lib/flow-utils.js +247 -0
- package/dist/features/health/LocalHealthCheck.js +1 -1
- package/dist/features/oauth/OAuthCallbackPage.js +2 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +223 -0
- package/dist/features/oauth/index.js +3 -0
- package/dist/features/oauth/useOAuthPopup.js +83 -0
- package/dist/features/workbench/NavigationItems.js +52 -0
- package/dist/features/workbench/Workbench.js +101 -0
- package/dist/features/workbench/WorkbenchNavigation.js +38 -0
- package/dist/features/workbench/WorkflowItem.js +67 -0
- package/dist/features/workbench/WorkflowList.js +110 -0
- package/dist/features/workbench/components/DocumentItem.js +27 -0
- package/dist/features/workbench/components/DocumentList.js +40 -0
- package/dist/features/workbench/components/DocumentMetadataPills.js +63 -0
- package/dist/features/workbench/components/DocumentRenderer.js +54 -0
- package/dist/features/workbench/components/NavigationItem.js +68 -0
- package/dist/features/workbench/components/PipelineHistoryList.js +56 -0
- package/dist/features/workbench/components/WorkbenchSettingsModal.js +89 -0
- package/dist/features/workbench/components/WorkbenchSidebar.js +109 -0
- package/dist/features/workbench/components/WorkflowForms.js +22 -0
- package/dist/features/workbench/components/WorkflowHistoryItem.js +144 -0
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +85 -0
- package/dist/features/workbench/components/document-details/DocumentDetails.js +425 -0
- package/dist/features/workbench/components/document-details/PromptDetails.js +146 -0
- package/dist/features/workbench/components/document-renderer/AiMessage.js +56 -0
- package/dist/features/workbench/components/document-renderer/AiMessageContent.js +174 -0
- package/dist/features/workbench/components/document-renderer/DocumentDebugRenderer.js +30 -0
- package/dist/features/workbench/components/document-renderer/DocumentFormRenderer.js +79 -0
- package/dist/features/workbench/components/document-renderer/DocumentMessageRenderer.js +10 -0
- package/dist/features/workbench/components/document-renderer/ErrorMessageRenderer.js +13 -0
- package/dist/features/workbench/components/document-renderer/LinkMessageRenderer.js +17 -0
- package/dist/features/workbench/components/document-renderer/MarkdownMessageRenderer.js +10 -0
- package/dist/features/workbench/components/document-renderer/PlainMessageRenderer.js +9 -0
- package/dist/features/workbench/hooks/useAutoScrollBottom.js +29 -0
- package/dist/features/workbench/hooks/useIntersectionObserver.js +44 -0
- package/dist/features/workbench/hooks/useScrollToListItem.js +23 -0
- package/dist/features/workbench/providers/ScrollProvider.js +22 -0
- package/dist/features/workbench/providers/WorkbenchContextProvider.js +3 -0
- package/dist/features/workspaces/Workspaces.js +156 -89
- package/dist/features/workspaces/components/CreateWorkspace.js +101 -78
- package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useDashboard.js +23 -0
- package/dist/hooks/useDocuments.js +45 -0
- package/dist/hooks/useFiles.js +63 -0
- package/dist/hooks/useNamespaceTree.js +27 -0
- package/dist/hooks/useNamespaces.js +34 -0
- package/dist/hooks/usePipelines.js +83 -6
- package/dist/hooks/useWorkflows.js +122 -0
- package/dist/hooks/useWorkspaces.js +49 -29
- package/dist/index.d.ts +75 -9
- package/dist/index.js +9 -1
- package/dist/lib/requireParam.js +6 -0
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@ai-sdk/provider/dist/index.js +65 -0
- package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +1008 -0
- package/dist/node_modules/@dagrejs/dagre/dist/dagre.esm.js +1968 -0
- package/dist/node_modules/@shikijs/core/dist/index.js +1420 -0
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +236 -0
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/abap.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/actionscript-3.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ada.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-expression.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-html.js +14 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-inline-style.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-inline-template.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-let-declaration.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-template-blocks.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-template.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-ts.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/apache.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/apex.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/apl.js +14 -0
- package/dist/node_modules/@shikijs/langs/dist/applescript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ara.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/asm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/astro.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/awk.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ballerina.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/bat.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/beancount.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/berry.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/bibtex.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/bicep.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/bird2.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/blade.js +18 -0
- package/dist/node_modules/@shikijs/langs/dist/bsl.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/c.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/c3.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cadence.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cairo.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/clarity.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/clojure.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cmake.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cobol.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/codeowners.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/codeql.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/coffee.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/common-lisp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/coq.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cpp-macro.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/cpp.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/crystal.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/csharp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/css.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/csv.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cue.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cypher.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/d.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/dart.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/dax.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/desktop.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/diff.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/docker.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/dotenv.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/dream-maker.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/edge.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/elixir.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/elm.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/erb.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/erlang.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-css.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-glsl.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-html.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-xml.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/fennel.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/fish.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/fluent.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/fortran-free-form.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/fsharp.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/gdresource.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/gdscript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/gdshader.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/genie.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/gherkin.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/git-commit.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/git-rebase.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/gleam.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/glimmer-js.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/glimmer-ts.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/glsl.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/gn.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/gnuplot.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/go.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/graphql.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/groovy.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/hack.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/haml.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/handlebars.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/haskell.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/haxe.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/hcl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/hjson.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/hlsl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/html-derivative.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/html.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/http.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/hurl.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/hxml.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/hy.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/imba.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ini.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/java.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/javascript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jinja-html.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/jinja.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/jison.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/json.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/json5.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jsonc.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jsonl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jsonnet.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jssm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jsx.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/julia.js +14 -0
- package/dist/node_modules/@shikijs/langs/dist/just.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/kdl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/kotlin.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/kusto.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/latex.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/lean.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/less.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/liquid.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/llvm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/log.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/logo.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/lua.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/luau.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/make.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/markdown-nix.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/markdown-vue.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/markdown.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/marko.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/matlab.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/mdc.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/mdx.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/mermaid.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/mipsasm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/mojo.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/moonbit.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/move.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/narrat.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/nextflow.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/nginx.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/nim.js +18 -0
- package/dist/node_modules/@shikijs/langs/dist/nix.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/nushell.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/objective-c.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/objective-cpp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ocaml.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/odin.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/openscad.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/pascal.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/perl.js +14 -0
- package/dist/node_modules/@shikijs/langs/dist/php.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/pkl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/plsql.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/po.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/polar.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/postcss.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/powerquery.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/powershell.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/prisma.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/prolog.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/proto.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/pug.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/puppet.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/purescript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/python.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/qml.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/qmldir.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/qss.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/r.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/racket.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/raku.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/razor.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/reg.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/regexp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/rel.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/riscv.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ron.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/rosmsg.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/rst.js +20 -0
- package/dist/node_modules/@shikijs/langs/dist/ruby.js +28 -0
- package/dist/node_modules/@shikijs/langs/dist/rust.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/sas.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/sass.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/scala.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/scheme.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/scss.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/sdbl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/shaderlab.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/shellscript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/shellsession.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/smalltalk.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/solidity.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/soy.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/sparql.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/splunk.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/sql.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ssh-config.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/stata.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/stylus.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/surrealql.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/svelte.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/swift.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/system-verilog.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/systemd.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/talonscript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/tasl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/tcl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/templ.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/terraform.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/tex.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/toml.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ts-tags.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/tsv.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/tsx.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/turtle.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/twig.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/typescript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/typespec.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/typst.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/v.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vala.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vb.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/verilog.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vhdl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/viml.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-directives.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-html.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-interpolations.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/vue.js +24 -0
- package/dist/node_modules/@shikijs/langs/dist/vyper.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wasm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wenyan.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wgsl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wikitext.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wit.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wolfram.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/xml.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/xsl.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/yaml.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/zenscript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/zig.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/aurora-x.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/ayu-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/ayu-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/ayu-mirage.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/dark-plus.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/dracula-soft.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/dracula.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/everforest-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/everforest-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-dark-default.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-light-default.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/horizon.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/houston.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-wave.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/laserwave.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/light-plus.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme-darker.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme-lighter.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme-ocean.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme-palenight.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/min-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/min-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/monokai.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/night-owl-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/night-owl.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/nord.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/one-dark-pro.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/one-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/plastic.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/poimandres.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/red.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/rose-pine-moon.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/rose-pine.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/slack-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/slack-ochin.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/snazzy-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/solarized-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/solarized-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/synthwave-84.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/tokyo-night.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/vesper.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/vitesse-black.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/vitesse-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/vitesse-light.js +2 -0
- package/dist/node_modules/@shikijs/types/dist/index.js +6 -0
- package/dist/node_modules/@shikijs/vscode-textmate/dist/index.js +1580 -0
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +51 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +4 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +91 -0
- package/dist/node_modules/@ungap/structured-clone/esm/types.js +2 -0
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +3280 -0
- package/dist/node_modules/@xyflow/system/dist/esm/index.js +1839 -0
- package/dist/node_modules/ai/dist/index.js +1083 -0
- package/dist/node_modules/bail/index.js +4 -0
- package/dist/node_modules/character-entities-html4/index.js +255 -0
- package/dist/node_modules/character-entities-legacy/index.js +2 -0
- package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +6 -1
- package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +4 -10
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +56 -65
- package/dist/node_modules/classcat/index.js +8 -0
- package/dist/node_modules/comma-separated-tokens/index.js +5 -1
- package/dist/node_modules/d3/src/index.js +5 -0
- package/dist/node_modules/d3-drag/src/constant.js +2 -0
- package/dist/node_modules/d3-drag/src/drag.js +112 -0
- package/dist/node_modules/d3-drag/src/event.js +60 -0
- package/dist/node_modules/d3-drag/src/nodrag.js +13 -0
- package/dist/node_modules/d3-drag/src/noevent.js +11 -0
- package/dist/node_modules/d3-interpolate/src/zoom.js +39 -0
- package/dist/node_modules/d3-selection/src/pointer.js +16 -0
- package/dist/node_modules/d3-selection/src/sourceEvent.js +6 -0
- package/dist/node_modules/d3-zoom/src/constant.js +2 -0
- package/dist/node_modules/d3-zoom/src/event.js +26 -0
- package/dist/node_modules/d3-zoom/src/index.js +1 -1
- package/dist/node_modules/d3-zoom/src/noevent.js +7 -0
- package/dist/node_modules/d3-zoom/src/zoom.js +214 -1
- package/dist/node_modules/decode-named-character-reference/index.dom.js +8 -0
- package/dist/node_modules/entities/dist/esm/decode-codepoint.js +35 -0
- package/dist/node_modules/entities/dist/esm/decode.js +129 -0
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +2 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +5 -0
- package/dist/node_modules/extend/index.js +37 -0
- package/dist/node_modules/hast-util-from-parse5/lib/index.js +121 -0
- package/dist/node_modules/hast-util-raw/lib/index.js +204 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.js +34 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.js +5 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.js +150 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.js +267 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.js +9 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.js +65 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/index.js +8 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.js +69 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.js +1936 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.js +239 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.js +22 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +1451 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.js +75 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.js +155 -0
- package/dist/node_modules/hast-util-sanitize/lib/index.js +159 -0
- package/dist/node_modules/hast-util-sanitize/lib/schema.js +73 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/comment.js +9 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/doctype.js +4 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/element.js +47 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/index.js +27 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/raw.js +5 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/root.js +4 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/text.js +6 -0
- package/dist/node_modules/hast-util-to-html/lib/index.js +46 -0
- package/dist/node_modules/hast-util-to-html/lib/omission/closing.js +84 -0
- package/dist/node_modules/hast-util-to-html/lib/omission/omission.js +8 -0
- package/dist/node_modules/hast-util-to-html/lib/omission/opening.js +37 -0
- package/dist/node_modules/hast-util-to-html/lib/omission/util/siblings.js +12 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +251 -0
- package/dist/node_modules/hast-util-to-parse5/lib/index.js +113 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js +8 -0
- package/dist/node_modules/html-url-attributes/lib/index.js +34 -0
- package/dist/node_modules/html-void-elements/index.js +23 -0
- package/dist/node_modules/inline-style-parser/cjs/index.js +88 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +555 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +101 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +20 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +28 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +19 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +54 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +16 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +57 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +18 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +22 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +33 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +9 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +18 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +106 -0
- package/dist/node_modules/micromark/lib/constructs.js +79 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +175 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +32 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +101 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +23 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +84 -0
- package/dist/node_modules/micromark/lib/parse.js +27 -0
- package/dist/node_modules/micromark/lib/postprocess.js +6 -0
- package/dist/node_modules/micromark/lib/preprocess.js +30 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +112 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +41 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +36 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +15 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +27 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +88 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +42 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +41 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +46 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +59 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +15 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +65 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +140 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +98 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +157 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +21 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +18 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +12 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +77 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +57 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +23 -0
- package/dist/node_modules/micromark-factory-destination/index.js +24 -0
- package/dist/node_modules/micromark-factory-label/index.js +18 -0
- package/dist/node_modules/micromark-factory-title/index.js +22 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +10 -0
- package/dist/node_modules/micromark-util-character/index.js +6 -5
- package/dist/node_modules/micromark-util-chunked/index.js +4 -1
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +5 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +15 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +7 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +16 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js +33 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +55 -0
- package/dist/node_modules/motion/dist/es/react.js +3 -0
- package/dist/node_modules/nanoid/index.browser.js +7 -0
- package/dist/node_modules/nanoid/url-alphabet/index.js +2 -0
- package/dist/node_modules/property-information/index.js +1 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js +20 -0
- package/dist/node_modules/rehype-harden/dist/index.js +168 -0
- package/dist/node_modules/rehype-raw/lib/index.js +10 -0
- package/dist/node_modules/rehype-sanitize/lib/index.js +7 -0
- package/dist/node_modules/remark-parse/lib/index.js +14 -0
- package/dist/node_modules/remark-rehype/lib/index.js +16 -0
- package/dist/node_modules/remend/dist/index.js +459 -0
- package/dist/node_modules/shiki/dist/bundle-full.js +11 -0
- package/dist/node_modules/shiki/dist/langs.js +1278 -0
- package/dist/node_modules/shiki/dist/themes.js +393 -0
- package/dist/node_modules/shiki/dist/wasm.js +2 -0
- package/dist/node_modules/space-separated-tokens/index.js +4 -1
- package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +2189 -0
- package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +33 -0
- package/dist/node_modules/streamdown/dist/index.js +2 -0
- package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +3 -0
- package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +1421 -0
- package/dist/node_modules/stringify-entities/lib/constant/dangerous.js +11 -0
- package/dist/node_modules/stringify-entities/lib/core.js +21 -0
- package/dist/node_modules/stringify-entities/lib/index.js +6 -0
- package/dist/node_modules/stringify-entities/lib/util/format-smart.js +12 -0
- package/dist/node_modules/stringify-entities/lib/util/to-decimal.js +6 -0
- package/dist/node_modules/stringify-entities/lib/util/to-hexadecimal.js +6 -0
- package/dist/node_modules/stringify-entities/lib/util/to-named.js +15 -0
- package/dist/node_modules/style-to-js/cjs/index.js +17 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +16 -0
- package/dist/node_modules/style-to-object/cjs/index.js +21 -0
- package/dist/node_modules/trim-lines/index.js +19 -0
- package/dist/node_modules/trough/lib/index.js +48 -0
- package/dist/node_modules/unified/lib/callable-instance.js +7 -0
- package/dist/node_modules/unified/lib/index.js +160 -0
- package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +6 -0
- package/dist/node_modules/unist-util-position/lib/index.js +20 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +13 -0
- package/dist/node_modules/vfile/lib/index.js +87 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js +97 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js +5 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js +29 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js +4 -0
- package/dist/node_modules/vfile-location/lib/index.js +41 -0
- package/dist/node_modules/vfile-message/lib/index.js +22 -0
- package/dist/node_modules/zod/v3/ZodError.js +79 -0
- package/dist/node_modules/zod/v3/errors.js +6 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +5 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +90 -0
- package/dist/node_modules/zod/v3/helpers/util.js +72 -0
- package/dist/node_modules/zod/v3/locales/en.js +58 -0
- package/dist/node_modules/zod/v3/types.js +2425 -0
- package/dist/node_modules/zod/v4/classic/errors.js +21 -0
- package/dist/node_modules/zod/v4/classic/iso.js +29 -0
- package/dist/node_modules/zod/v4/classic/parse.js +4 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +392 -0
- package/dist/node_modules/zod/v4/core/api.js +532 -0
- package/dist/node_modules/zod/v4/core/checks.js +283 -0
- package/dist/node_modules/zod/v4/core/core.js +44 -0
- package/dist/node_modules/zod/v4/core/doc.js +21 -0
- package/dist/node_modules/zod/v4/core/errors.js +40 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +305 -0
- package/dist/node_modules/zod/v4/core/parse.js +66 -0
- package/dist/node_modules/zod/v4/core/regexes.js +28 -0
- package/dist/node_modules/zod/v4/core/registries.js +38 -0
- package/dist/node_modules/zod/v4/core/schemas.js +863 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +220 -0
- package/dist/node_modules/zod/v4/core/util.js +267 -0
- package/dist/node_modules/zod/v4/core/versions.js +6 -0
- package/dist/node_modules/zwitch/index.js +14 -0
- package/dist/pages/DashboardPage.js +58 -0
- package/dist/pages/DebugWorkflowDetailsPage.js +121 -0
- package/dist/pages/DebugWorkflowsPage.js +130 -0
- package/dist/pages/EmbedWorkbenchPage.js +73 -0
- package/dist/pages/PipelineDebugPage.js +114 -0
- package/dist/pages/WorkbenchPage.js +67 -0
- package/dist/pages/WorkspacePage.js +1 -1
- package/dist/providers/ComponentOverridesProvider.js +12 -0
- package/dist/routing/LocalRouter.js +3 -0
- package/package.json +3 -3
|
@@ -0,0 +1,1968 @@
|
|
|
1
|
+
var v = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), y = v((e, t) => {
|
|
2
|
+
var n = Object.defineProperty, r = (e, t, r) => t in e ? n(e, t, {
|
|
3
|
+
enumerable: !0,
|
|
4
|
+
configurable: !0,
|
|
5
|
+
writable: !0,
|
|
6
|
+
value: r
|
|
7
|
+
}) : e[t] = r, i = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), a = (e, t, n) => r(e, typeof t == "symbol" ? t : t + "", n), o = i((e, t) => {
|
|
8
|
+
var n = "\0", r = "\0", i = "", o = class {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
a(this, "_isDirected", !0), a(this, "_isMultigraph", !1), a(this, "_isCompound", !1), a(this, "_label"), a(this, "_defaultNodeLabelFn", () => {}), a(this, "_defaultEdgeLabelFn", () => {}), a(this, "_nodes", {}), a(this, "_in", {}), a(this, "_preds", {}), a(this, "_out", {}), a(this, "_sucs", {}), a(this, "_edgeObjs", {}), a(this, "_edgeLabels", {}), a(this, "_nodeCount", 0), a(this, "_edgeCount", 0), a(this, "_parent"), a(this, "_children"), e && (this._isDirected = Object.hasOwn(e, "directed") ? e.directed : !0, this._isMultigraph = Object.hasOwn(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.hasOwn(e, "compound") ? e.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[r] = {});
|
|
11
|
+
}
|
|
12
|
+
isDirected() {
|
|
13
|
+
return this._isDirected;
|
|
14
|
+
}
|
|
15
|
+
isMultigraph() {
|
|
16
|
+
return this._isMultigraph;
|
|
17
|
+
}
|
|
18
|
+
isCompound() {
|
|
19
|
+
return this._isCompound;
|
|
20
|
+
}
|
|
21
|
+
setGraph(e) {
|
|
22
|
+
return this._label = e, this;
|
|
23
|
+
}
|
|
24
|
+
graph() {
|
|
25
|
+
return this._label;
|
|
26
|
+
}
|
|
27
|
+
setDefaultNodeLabel(e) {
|
|
28
|
+
return this._defaultNodeLabelFn = e, typeof e != "function" && (this._defaultNodeLabelFn = () => e), this;
|
|
29
|
+
}
|
|
30
|
+
nodeCount() {
|
|
31
|
+
return this._nodeCount;
|
|
32
|
+
}
|
|
33
|
+
nodes() {
|
|
34
|
+
return Object.keys(this._nodes);
|
|
35
|
+
}
|
|
36
|
+
sources() {
|
|
37
|
+
var e = this;
|
|
38
|
+
return this.nodes().filter((t) => Object.keys(e._in[t]).length === 0);
|
|
39
|
+
}
|
|
40
|
+
sinks() {
|
|
41
|
+
var e = this;
|
|
42
|
+
return this.nodes().filter((t) => Object.keys(e._out[t]).length === 0);
|
|
43
|
+
}
|
|
44
|
+
setNodes(e, t) {
|
|
45
|
+
var n = arguments, r = this;
|
|
46
|
+
return e.forEach(function(e) {
|
|
47
|
+
n.length > 1 ? r.setNode(e, t) : r.setNode(e);
|
|
48
|
+
}), this;
|
|
49
|
+
}
|
|
50
|
+
setNode(e, t) {
|
|
51
|
+
return Object.hasOwn(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = r, this._children[e] = {}, this._children[r][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
|
52
|
+
}
|
|
53
|
+
node(e) {
|
|
54
|
+
return this._nodes[e];
|
|
55
|
+
}
|
|
56
|
+
hasNode(e) {
|
|
57
|
+
return Object.hasOwn(this._nodes, e);
|
|
58
|
+
}
|
|
59
|
+
removeNode(e) {
|
|
60
|
+
var t = this;
|
|
61
|
+
if (Object.hasOwn(this._nodes, e)) {
|
|
62
|
+
var n = (e) => t.removeEdge(t._edgeObjs[e]);
|
|
63
|
+
delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], this.children(e).forEach(function(e) {
|
|
64
|
+
t.setParent(e);
|
|
65
|
+
}), delete this._children[e]), Object.keys(this._in[e]).forEach(n), delete this._in[e], delete this._preds[e], Object.keys(this._out[e]).forEach(n), delete this._out[e], delete this._sucs[e], --this._nodeCount;
|
|
66
|
+
}
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
setParent(e, t) {
|
|
70
|
+
if (!this._isCompound) throw Error("Cannot set parent in a non-compound graph");
|
|
71
|
+
if (t === void 0) t = r;
|
|
72
|
+
else {
|
|
73
|
+
t += "";
|
|
74
|
+
for (var n = t; n !== void 0; n = this.parent(n)) if (n === e) throw Error("Setting " + t + " as parent of " + e + " would create a cycle");
|
|
75
|
+
this.setNode(t);
|
|
76
|
+
}
|
|
77
|
+
return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = t, this._children[t][e] = !0, this;
|
|
78
|
+
}
|
|
79
|
+
_removeFromParentsChildList(e) {
|
|
80
|
+
delete this._children[this._parent[e]][e];
|
|
81
|
+
}
|
|
82
|
+
parent(e) {
|
|
83
|
+
if (this._isCompound) {
|
|
84
|
+
var t = this._parent[e];
|
|
85
|
+
if (t !== r) return t;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
children(e = r) {
|
|
89
|
+
if (this._isCompound) {
|
|
90
|
+
var t = this._children[e];
|
|
91
|
+
if (t) return Object.keys(t);
|
|
92
|
+
} else {
|
|
93
|
+
if (e === r) return this.nodes();
|
|
94
|
+
if (this.hasNode(e)) return [];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
predecessors(e) {
|
|
98
|
+
var t = this._preds[e];
|
|
99
|
+
if (t) return Object.keys(t);
|
|
100
|
+
}
|
|
101
|
+
successors(e) {
|
|
102
|
+
var t = this._sucs[e];
|
|
103
|
+
if (t) return Object.keys(t);
|
|
104
|
+
}
|
|
105
|
+
neighbors(e) {
|
|
106
|
+
var t = this.predecessors(e);
|
|
107
|
+
if (t) {
|
|
108
|
+
let r = new Set(t);
|
|
109
|
+
for (var n of this.successors(e)) r.add(n);
|
|
110
|
+
return Array.from(r.values());
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
isLeaf(e) {
|
|
114
|
+
var t;
|
|
115
|
+
return t = this.isDirected() ? this.successors(e) : this.neighbors(e), t.length === 0;
|
|
116
|
+
}
|
|
117
|
+
filterNodes(e) {
|
|
118
|
+
var t = new this.constructor({
|
|
119
|
+
directed: this._isDirected,
|
|
120
|
+
multigraph: this._isMultigraph,
|
|
121
|
+
compound: this._isCompound
|
|
122
|
+
});
|
|
123
|
+
t.setGraph(this.graph());
|
|
124
|
+
var n = this;
|
|
125
|
+
Object.entries(this._nodes).forEach(function([n, r]) {
|
|
126
|
+
e(n) && t.setNode(n, r);
|
|
127
|
+
}), Object.values(this._edgeObjs).forEach(function(e) {
|
|
128
|
+
t.hasNode(e.v) && t.hasNode(e.w) && t.setEdge(e, n.edge(e));
|
|
129
|
+
});
|
|
130
|
+
var r = {};
|
|
131
|
+
function i(e) {
|
|
132
|
+
var a = n.parent(e);
|
|
133
|
+
return a === void 0 || t.hasNode(a) ? (r[e] = a, a) : a in r ? r[a] : i(a);
|
|
134
|
+
}
|
|
135
|
+
return this._isCompound && t.nodes().forEach((e) => t.setParent(e, i(e))), t;
|
|
136
|
+
}
|
|
137
|
+
setDefaultEdgeLabel(e) {
|
|
138
|
+
return this._defaultEdgeLabelFn = e, typeof e != "function" && (this._defaultEdgeLabelFn = () => e), this;
|
|
139
|
+
}
|
|
140
|
+
edgeCount() {
|
|
141
|
+
return this._edgeCount;
|
|
142
|
+
}
|
|
143
|
+
edges() {
|
|
144
|
+
return Object.values(this._edgeObjs);
|
|
145
|
+
}
|
|
146
|
+
setPath(e, t) {
|
|
147
|
+
var n = this, r = arguments;
|
|
148
|
+
return e.reduce(function(e, i) {
|
|
149
|
+
return r.length > 1 ? n.setEdge(e, i, t) : n.setEdge(e, i), i;
|
|
150
|
+
}), this;
|
|
151
|
+
}
|
|
152
|
+
setEdge() {
|
|
153
|
+
var e, t, n, r, i = !1, a = arguments[0];
|
|
154
|
+
typeof a == "object" && a && "v" in a ? (e = a.v, t = a.w, n = a.name, arguments.length === 2 && (r = arguments[1], i = !0)) : (e = a, t = arguments[1], n = arguments[3], arguments.length > 2 && (r = arguments[2], i = !0)), e = "" + e, t = "" + t, n !== void 0 && (n = "" + n);
|
|
155
|
+
var o = l(this._isDirected, e, t, n);
|
|
156
|
+
if (Object.hasOwn(this._edgeLabels, o)) return i && (this._edgeLabels[o] = r), this;
|
|
157
|
+
if (n !== void 0 && !this._isMultigraph) throw Error("Cannot set a named edge when isMultigraph = false");
|
|
158
|
+
this.setNode(e), this.setNode(t), this._edgeLabels[o] = i ? r : this._defaultEdgeLabelFn(e, t, n);
|
|
159
|
+
var c = u(this._isDirected, e, t, n);
|
|
160
|
+
return e = c.v, t = c.w, Object.freeze(c), this._edgeObjs[o] = c, s(this._preds[t], e), s(this._sucs[e], t), this._in[t][o] = c, this._out[e][o] = c, this._edgeCount++, this;
|
|
161
|
+
}
|
|
162
|
+
edge(e, t, n) {
|
|
163
|
+
var r = arguments.length === 1 ? d(this._isDirected, arguments[0]) : l(this._isDirected, e, t, n);
|
|
164
|
+
return this._edgeLabels[r];
|
|
165
|
+
}
|
|
166
|
+
edgeAsObj() {
|
|
167
|
+
let e = this.edge(...arguments);
|
|
168
|
+
return typeof e == "object" ? e : { label: e };
|
|
169
|
+
}
|
|
170
|
+
hasEdge(e, t, n) {
|
|
171
|
+
var r = arguments.length === 1 ? d(this._isDirected, arguments[0]) : l(this._isDirected, e, t, n);
|
|
172
|
+
return Object.hasOwn(this._edgeLabels, r);
|
|
173
|
+
}
|
|
174
|
+
removeEdge(e, t, n) {
|
|
175
|
+
var r = arguments.length === 1 ? d(this._isDirected, arguments[0]) : l(this._isDirected, e, t, n), i = this._edgeObjs[r];
|
|
176
|
+
return i && (e = i.v, t = i.w, delete this._edgeLabels[r], delete this._edgeObjs[r], c(this._preds[t], e), c(this._sucs[e], t), delete this._in[t][r], delete this._out[e][r], this._edgeCount--), this;
|
|
177
|
+
}
|
|
178
|
+
inEdges(e, t) {
|
|
179
|
+
return this.isDirected() ? this.filterEdges(this._in[e], e, t) : this.nodeEdges(e, t);
|
|
180
|
+
}
|
|
181
|
+
outEdges(e, t) {
|
|
182
|
+
return this.isDirected() ? this.filterEdges(this._out[e], e, t) : this.nodeEdges(e, t);
|
|
183
|
+
}
|
|
184
|
+
nodeEdges(e, t) {
|
|
185
|
+
if (e in this._nodes) return this.filterEdges({
|
|
186
|
+
...this._in[e],
|
|
187
|
+
...this._out[e]
|
|
188
|
+
}, e, t);
|
|
189
|
+
}
|
|
190
|
+
filterEdges(e, t, n) {
|
|
191
|
+
if (e) {
|
|
192
|
+
var r = Object.values(e);
|
|
193
|
+
return n ? r.filter(function(e) {
|
|
194
|
+
return e.v === t && e.w === n || e.v === n && e.w === t;
|
|
195
|
+
}) : r;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
function s(e, t) {
|
|
200
|
+
e[t] ? e[t]++ : e[t] = 1;
|
|
201
|
+
}
|
|
202
|
+
function c(e, t) {
|
|
203
|
+
--e[t] || delete e[t];
|
|
204
|
+
}
|
|
205
|
+
function l(e, t, r, a) {
|
|
206
|
+
var o = "" + t, s = "" + r;
|
|
207
|
+
if (!e && o > s) {
|
|
208
|
+
var c = o;
|
|
209
|
+
o = s, s = c;
|
|
210
|
+
}
|
|
211
|
+
return o + i + s + i + (a === void 0 ? n : a);
|
|
212
|
+
}
|
|
213
|
+
function u(e, t, n, r) {
|
|
214
|
+
var i = "" + t, a = "" + n;
|
|
215
|
+
if (!e && i > a) {
|
|
216
|
+
var o = i;
|
|
217
|
+
i = a, a = o;
|
|
218
|
+
}
|
|
219
|
+
var s = {
|
|
220
|
+
v: i,
|
|
221
|
+
w: a
|
|
222
|
+
};
|
|
223
|
+
return r && (s.name = r), s;
|
|
224
|
+
}
|
|
225
|
+
function d(e, t) {
|
|
226
|
+
return l(e, t.v, t.w, t.name);
|
|
227
|
+
}
|
|
228
|
+
t.exports = o;
|
|
229
|
+
}), s = i((e, t) => {
|
|
230
|
+
t.exports = "3.0.2";
|
|
231
|
+
}), c = i((e, t) => {
|
|
232
|
+
t.exports = {
|
|
233
|
+
Graph: o(),
|
|
234
|
+
version: s()
|
|
235
|
+
};
|
|
236
|
+
}), l = i((e, t) => {
|
|
237
|
+
var n = o();
|
|
238
|
+
t.exports = {
|
|
239
|
+
write: r,
|
|
240
|
+
read: s
|
|
241
|
+
};
|
|
242
|
+
function r(e) {
|
|
243
|
+
var t = {
|
|
244
|
+
options: {
|
|
245
|
+
directed: e.isDirected(),
|
|
246
|
+
multigraph: e.isMultigraph(),
|
|
247
|
+
compound: e.isCompound()
|
|
248
|
+
},
|
|
249
|
+
nodes: i(e),
|
|
250
|
+
edges: a(e)
|
|
251
|
+
};
|
|
252
|
+
return e.graph() !== void 0 && (t.value = structuredClone(e.graph())), t;
|
|
253
|
+
}
|
|
254
|
+
function i(e) {
|
|
255
|
+
return e.nodes().map(function(t) {
|
|
256
|
+
var n = e.node(t), r = e.parent(t), i = { v: t };
|
|
257
|
+
return n !== void 0 && (i.value = n), r !== void 0 && (i.parent = r), i;
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function a(e) {
|
|
261
|
+
return e.edges().map(function(t) {
|
|
262
|
+
var n = e.edge(t), r = {
|
|
263
|
+
v: t.v,
|
|
264
|
+
w: t.w
|
|
265
|
+
};
|
|
266
|
+
return t.name !== void 0 && (r.name = t.name), n !== void 0 && (r.value = n), r;
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
function s(e) {
|
|
270
|
+
var t = new n(e.options).setGraph(e.value);
|
|
271
|
+
return e.nodes.forEach(function(e) {
|
|
272
|
+
t.setNode(e.v, e.value), e.parent && t.setParent(e.v, e.parent);
|
|
273
|
+
}), e.edges.forEach(function(e) {
|
|
274
|
+
t.setEdge({
|
|
275
|
+
v: e.v,
|
|
276
|
+
w: e.w,
|
|
277
|
+
name: e.name
|
|
278
|
+
}, e.value);
|
|
279
|
+
}), t;
|
|
280
|
+
}
|
|
281
|
+
}), u = i((e, t) => {
|
|
282
|
+
t.exports = r;
|
|
283
|
+
var n = () => 1;
|
|
284
|
+
function r(e, t, r, a) {
|
|
285
|
+
return i(e, String(t), r || n, a || function(t) {
|
|
286
|
+
return e.outEdges(t);
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
function i(e, t, n, r) {
|
|
290
|
+
var i = {}, a = !0, o = 0, s = e.nodes(), c = function(e) {
|
|
291
|
+
var t = n(e);
|
|
292
|
+
i[e.v].distance + t < i[e.w].distance && (i[e.w] = {
|
|
293
|
+
distance: i[e.v].distance + t,
|
|
294
|
+
predecessor: e.v
|
|
295
|
+
}, a = !0);
|
|
296
|
+
}, l = function() {
|
|
297
|
+
s.forEach(function(e) {
|
|
298
|
+
r(e).forEach(function(t) {
|
|
299
|
+
var n = t.v === e ? t.v : t.w;
|
|
300
|
+
c({
|
|
301
|
+
v: n,
|
|
302
|
+
w: n === t.v ? t.w : t.v
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
s.forEach(function(e) {
|
|
308
|
+
i[e] = { distance: e === t ? 0 : Infinity };
|
|
309
|
+
});
|
|
310
|
+
for (var u = s.length, d = 1; d < u && (a = !1, o++, l(), a); d++);
|
|
311
|
+
if (o === u - 1 && (a = !1, l(), a)) throw Error("The graph contains a negative weight cycle");
|
|
312
|
+
return i;
|
|
313
|
+
}
|
|
314
|
+
}), d = i((e, t) => {
|
|
315
|
+
t.exports = n;
|
|
316
|
+
function n(e) {
|
|
317
|
+
var t = {}, n = [], r;
|
|
318
|
+
function i(n) {
|
|
319
|
+
Object.hasOwn(t, n) || (t[n] = !0, r.push(n), e.successors(n).forEach(i), e.predecessors(n).forEach(i));
|
|
320
|
+
}
|
|
321
|
+
return e.nodes().forEach(function(e) {
|
|
322
|
+
r = [], i(e), r.length && n.push(r);
|
|
323
|
+
}), n;
|
|
324
|
+
}
|
|
325
|
+
}), f = i((e, t) => {
|
|
326
|
+
t.exports = class {
|
|
327
|
+
constructor() {
|
|
328
|
+
a(this, "_arr", []), a(this, "_keyIndices", {});
|
|
329
|
+
}
|
|
330
|
+
size() {
|
|
331
|
+
return this._arr.length;
|
|
332
|
+
}
|
|
333
|
+
keys() {
|
|
334
|
+
return this._arr.map(function(e) {
|
|
335
|
+
return e.key;
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
has(e) {
|
|
339
|
+
return Object.hasOwn(this._keyIndices, e);
|
|
340
|
+
}
|
|
341
|
+
priority(e) {
|
|
342
|
+
var t = this._keyIndices[e];
|
|
343
|
+
if (t !== void 0) return this._arr[t].priority;
|
|
344
|
+
}
|
|
345
|
+
min() {
|
|
346
|
+
if (this.size() === 0) throw Error("Queue underflow");
|
|
347
|
+
return this._arr[0].key;
|
|
348
|
+
}
|
|
349
|
+
add(e, t) {
|
|
350
|
+
var n = this._keyIndices;
|
|
351
|
+
if (e = String(e), !Object.hasOwn(n, e)) {
|
|
352
|
+
var r = this._arr, i = r.length;
|
|
353
|
+
return n[e] = i, r.push({
|
|
354
|
+
key: e,
|
|
355
|
+
priority: t
|
|
356
|
+
}), this._decrease(i), !0;
|
|
357
|
+
}
|
|
358
|
+
return !1;
|
|
359
|
+
}
|
|
360
|
+
removeMin() {
|
|
361
|
+
this._swap(0, this._arr.length - 1);
|
|
362
|
+
var e = this._arr.pop();
|
|
363
|
+
return delete this._keyIndices[e.key], this._heapify(0), e.key;
|
|
364
|
+
}
|
|
365
|
+
decrease(e, t) {
|
|
366
|
+
var n = this._keyIndices[e];
|
|
367
|
+
if (t > this._arr[n].priority) throw Error("New priority is greater than current priority. Key: " + e + " Old: " + this._arr[n].priority + " New: " + t);
|
|
368
|
+
this._arr[n].priority = t, this._decrease(n);
|
|
369
|
+
}
|
|
370
|
+
_heapify(e) {
|
|
371
|
+
var t = this._arr, n = 2 * e, r = n + 1, i = e;
|
|
372
|
+
n < t.length && (i = t[n].priority < t[i].priority ? n : i, r < t.length && (i = t[r].priority < t[i].priority ? r : i), i !== e && (this._swap(e, i), this._heapify(i)));
|
|
373
|
+
}
|
|
374
|
+
_decrease(e) {
|
|
375
|
+
for (var t = this._arr, n = t[e].priority, r; e !== 0 && (r = e >> 1, !(t[r].priority < n));) this._swap(e, r), e = r;
|
|
376
|
+
}
|
|
377
|
+
_swap(e, t) {
|
|
378
|
+
var n = this._arr, r = this._keyIndices, i = n[e], a = n[t];
|
|
379
|
+
n[e] = a, n[t] = i, r[a.key] = e, r[i.key] = t;
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
}), p = i((e, t) => {
|
|
383
|
+
var n = f();
|
|
384
|
+
t.exports = i;
|
|
385
|
+
var r = () => 1;
|
|
386
|
+
function i(e, t, n, i) {
|
|
387
|
+
return a(e, String(t), n || r, i || function(t) {
|
|
388
|
+
return e.outEdges(t);
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
function a(e, t, r, i) {
|
|
392
|
+
var a = {}, o = new n(), s, c, l = function(e) {
|
|
393
|
+
var t = e.v === s ? e.w : e.v, n = a[t], i = r(e), l = c.distance + i;
|
|
394
|
+
if (i < 0) throw Error("dijkstra does not allow negative edge weights. Bad edge: " + e + " Weight: " + i);
|
|
395
|
+
l < n.distance && (n.distance = l, n.predecessor = s, o.decrease(t, l));
|
|
396
|
+
};
|
|
397
|
+
for (e.nodes().forEach(function(e) {
|
|
398
|
+
var n = e === t ? 0 : Infinity;
|
|
399
|
+
a[e] = { distance: n }, o.add(e, n);
|
|
400
|
+
}); o.size() > 0 && (s = o.removeMin(), c = a[s], c.distance !== Infinity);) i(s).forEach(l);
|
|
401
|
+
return a;
|
|
402
|
+
}
|
|
403
|
+
}), m = i((e, t) => {
|
|
404
|
+
var n = p();
|
|
405
|
+
t.exports = r;
|
|
406
|
+
function r(e, t, r) {
|
|
407
|
+
return e.nodes().reduce(function(i, a) {
|
|
408
|
+
return i[a] = n(e, a, t, r), i;
|
|
409
|
+
}, {});
|
|
410
|
+
}
|
|
411
|
+
}), h = i((e, t) => {
|
|
412
|
+
t.exports = n;
|
|
413
|
+
function n(e, t, n) {
|
|
414
|
+
if (e[t].predecessor !== void 0) throw Error("Invalid source vertex");
|
|
415
|
+
if (e[n].predecessor === void 0 && n !== t) throw Error("Invalid destination vertex");
|
|
416
|
+
return {
|
|
417
|
+
weight: e[n].distance,
|
|
418
|
+
path: r(e, t, n)
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
function r(e, t, n) {
|
|
422
|
+
for (var r = [], i = n; i !== t;) r.push(i), i = e[i].predecessor;
|
|
423
|
+
return r.push(t), r.reverse();
|
|
424
|
+
}
|
|
425
|
+
}), g = i((e, t) => {
|
|
426
|
+
t.exports = n;
|
|
427
|
+
function n(e) {
|
|
428
|
+
var t = 0, n = [], r = {}, i = [];
|
|
429
|
+
function a(o) {
|
|
430
|
+
var s = r[o] = {
|
|
431
|
+
onStack: !0,
|
|
432
|
+
lowlink: t,
|
|
433
|
+
index: t++
|
|
434
|
+
};
|
|
435
|
+
if (n.push(o), e.successors(o).forEach(function(e) {
|
|
436
|
+
Object.hasOwn(r, e) ? r[e].onStack && (s.lowlink = Math.min(s.lowlink, r[e].index)) : (a(e), s.lowlink = Math.min(s.lowlink, r[e].lowlink));
|
|
437
|
+
}), s.lowlink === s.index) {
|
|
438
|
+
var c = [], l;
|
|
439
|
+
do
|
|
440
|
+
l = n.pop(), r[l].onStack = !1, c.push(l);
|
|
441
|
+
while (o !== l);
|
|
442
|
+
i.push(c);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return e.nodes().forEach(function(e) {
|
|
446
|
+
Object.hasOwn(r, e) || a(e);
|
|
447
|
+
}), i;
|
|
448
|
+
}
|
|
449
|
+
}), b = i((e, t) => {
|
|
450
|
+
var n = g();
|
|
451
|
+
t.exports = r;
|
|
452
|
+
function r(e) {
|
|
453
|
+
return n(e).filter(function(t) {
|
|
454
|
+
return t.length > 1 || t.length === 1 && e.hasEdge(t[0], t[0]);
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
}), x = i((e, t) => {
|
|
458
|
+
t.exports = r;
|
|
459
|
+
var n = () => 1;
|
|
460
|
+
function r(e, t, r) {
|
|
461
|
+
return i(e, t || n, r || function(t) {
|
|
462
|
+
return e.outEdges(t);
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
function i(e, t, n) {
|
|
466
|
+
var r = {}, i = e.nodes();
|
|
467
|
+
return i.forEach(function(e) {
|
|
468
|
+
r[e] = {}, r[e][e] = { distance: 0 }, i.forEach(function(t) {
|
|
469
|
+
e !== t && (r[e][t] = { distance: Infinity });
|
|
470
|
+
}), n(e).forEach(function(n) {
|
|
471
|
+
var i = n.v === e ? n.w : n.v, a = t(n);
|
|
472
|
+
r[e][i] = {
|
|
473
|
+
distance: a,
|
|
474
|
+
predecessor: e
|
|
475
|
+
};
|
|
476
|
+
});
|
|
477
|
+
}), i.forEach(function(e) {
|
|
478
|
+
var t = r[e];
|
|
479
|
+
i.forEach(function(n) {
|
|
480
|
+
var a = r[n];
|
|
481
|
+
i.forEach(function(n) {
|
|
482
|
+
var r = a[e], i = t[n], o = a[n], s = r.distance + i.distance;
|
|
483
|
+
s < o.distance && (o.distance = s, o.predecessor = i.predecessor);
|
|
484
|
+
});
|
|
485
|
+
});
|
|
486
|
+
}), r;
|
|
487
|
+
}
|
|
488
|
+
}), S = i((e, t) => {
|
|
489
|
+
function n(e) {
|
|
490
|
+
var t = {}, n = {}, i = [];
|
|
491
|
+
function a(o) {
|
|
492
|
+
if (Object.hasOwn(n, o)) throw new r();
|
|
493
|
+
Object.hasOwn(t, o) || (n[o] = !0, t[o] = !0, e.predecessors(o).forEach(a), delete n[o], i.push(o));
|
|
494
|
+
}
|
|
495
|
+
if (e.sinks().forEach(a), Object.keys(t).length !== e.nodeCount()) throw new r();
|
|
496
|
+
return i;
|
|
497
|
+
}
|
|
498
|
+
var r = class extends Error {
|
|
499
|
+
constructor() {
|
|
500
|
+
super(...arguments);
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
t.exports = n, n.CycleException = r;
|
|
504
|
+
}), C = i((e, t) => {
|
|
505
|
+
var n = S();
|
|
506
|
+
t.exports = r;
|
|
507
|
+
function r(e) {
|
|
508
|
+
try {
|
|
509
|
+
n(e);
|
|
510
|
+
} catch (e) {
|
|
511
|
+
if (e instanceof n.CycleException) return !1;
|
|
512
|
+
throw e;
|
|
513
|
+
}
|
|
514
|
+
return !0;
|
|
515
|
+
}
|
|
516
|
+
}), w = i((e, t) => {
|
|
517
|
+
t.exports = n;
|
|
518
|
+
function n(e, t, n, i, a) {
|
|
519
|
+
Array.isArray(t) || (t = [t]);
|
|
520
|
+
var o = (e.isDirected() ? e.successors : e.neighbors).bind(e), s = {};
|
|
521
|
+
return t.forEach(function(t) {
|
|
522
|
+
if (!e.hasNode(t)) throw Error("Graph does not have node: " + t);
|
|
523
|
+
a = r(e, t, n === "post", s, o, i, a);
|
|
524
|
+
}), a;
|
|
525
|
+
}
|
|
526
|
+
function r(e, t, n, i, a, o, s) {
|
|
527
|
+
return Object.hasOwn(i, t) || (i[t] = !0, n || (s = o(s, t)), a(t).forEach(function(t) {
|
|
528
|
+
s = r(e, t, n, i, a, o, s);
|
|
529
|
+
}), n && (s = o(s, t))), s;
|
|
530
|
+
}
|
|
531
|
+
}), T = i((e, t) => {
|
|
532
|
+
var n = w();
|
|
533
|
+
t.exports = r;
|
|
534
|
+
function r(e, t, r) {
|
|
535
|
+
return n(e, t, r, function(e, t) {
|
|
536
|
+
return e.push(t), e;
|
|
537
|
+
}, []);
|
|
538
|
+
}
|
|
539
|
+
}), E = i((e, t) => {
|
|
540
|
+
var n = T();
|
|
541
|
+
t.exports = r;
|
|
542
|
+
function r(e, t) {
|
|
543
|
+
return n(e, t, "post");
|
|
544
|
+
}
|
|
545
|
+
}), D = i((e, t) => {
|
|
546
|
+
var n = T();
|
|
547
|
+
t.exports = r;
|
|
548
|
+
function r(e, t) {
|
|
549
|
+
return n(e, t, "pre");
|
|
550
|
+
}
|
|
551
|
+
}), O = i((e, t) => {
|
|
552
|
+
var n = o(), r = f();
|
|
553
|
+
t.exports = i;
|
|
554
|
+
function i(e, t) {
|
|
555
|
+
var i = new n(), a = {}, o = new r(), s;
|
|
556
|
+
function c(e) {
|
|
557
|
+
var n = e.v === s ? e.w : e.v, r = o.priority(n);
|
|
558
|
+
if (r !== void 0) {
|
|
559
|
+
var i = t(e);
|
|
560
|
+
i < r && (a[n] = s, o.decrease(n, i));
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
if (e.nodeCount() === 0) return i;
|
|
564
|
+
e.nodes().forEach(function(e) {
|
|
565
|
+
o.add(e, Infinity), i.setNode(e);
|
|
566
|
+
}), o.decrease(e.nodes()[0], 0);
|
|
567
|
+
for (var l = !1; o.size() > 0;) {
|
|
568
|
+
if (s = o.removeMin(), Object.hasOwn(a, s)) i.setEdge(s, a[s]);
|
|
569
|
+
else {
|
|
570
|
+
if (l) throw Error("Input graph is not connected: " + e);
|
|
571
|
+
l = !0;
|
|
572
|
+
}
|
|
573
|
+
e.nodeEdges(s).forEach(c);
|
|
574
|
+
}
|
|
575
|
+
return i;
|
|
576
|
+
}
|
|
577
|
+
}), k = i((e, t) => {
|
|
578
|
+
var n = p(), r = u();
|
|
579
|
+
t.exports = i;
|
|
580
|
+
function i(e, t, n, r) {
|
|
581
|
+
return a(e, t, n, r || function(t) {
|
|
582
|
+
return e.outEdges(t);
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
function a(e, t, i, a) {
|
|
586
|
+
if (i === void 0) return n(e, t, i, a);
|
|
587
|
+
for (var o = !1, s = e.nodes(), c = 0; c < s.length; c++) {
|
|
588
|
+
for (var l = a(s[c]), u = 0; u < l.length; u++) {
|
|
589
|
+
var d = l[u], f = d.v === s[c] ? d.v : d.w;
|
|
590
|
+
i({
|
|
591
|
+
v: f,
|
|
592
|
+
w: f === d.v ? d.w : d.v
|
|
593
|
+
}) < 0 && (o = !0);
|
|
594
|
+
}
|
|
595
|
+
if (o) return r(e, t, i, a);
|
|
596
|
+
}
|
|
597
|
+
return n(e, t, i, a);
|
|
598
|
+
}
|
|
599
|
+
}), A = i((e, t) => {
|
|
600
|
+
t.exports = {
|
|
601
|
+
bellmanFord: u(),
|
|
602
|
+
components: d(),
|
|
603
|
+
dijkstra: p(),
|
|
604
|
+
dijkstraAll: m(),
|
|
605
|
+
extractPath: h(),
|
|
606
|
+
findCycles: b(),
|
|
607
|
+
floydWarshall: x(),
|
|
608
|
+
isAcyclic: C(),
|
|
609
|
+
postorder: E(),
|
|
610
|
+
preorder: D(),
|
|
611
|
+
prim: O(),
|
|
612
|
+
shortestPaths: k(),
|
|
613
|
+
reduce: w(),
|
|
614
|
+
tarjan: g(),
|
|
615
|
+
topsort: S()
|
|
616
|
+
};
|
|
617
|
+
}), M = c();
|
|
618
|
+
t.exports = {
|
|
619
|
+
Graph: M.Graph,
|
|
620
|
+
json: l(),
|
|
621
|
+
alg: A(),
|
|
622
|
+
version: M.version
|
|
623
|
+
};
|
|
624
|
+
}), ne = v((e, t) => {
|
|
625
|
+
var n = class {
|
|
626
|
+
constructor() {
|
|
627
|
+
let e = {};
|
|
628
|
+
e._next = e._prev = e, this._sentinel = e;
|
|
629
|
+
}
|
|
630
|
+
dequeue() {
|
|
631
|
+
let e = this._sentinel, t = e._prev;
|
|
632
|
+
if (t !== e) return r(t), t;
|
|
633
|
+
}
|
|
634
|
+
enqueue(e) {
|
|
635
|
+
let t = this._sentinel;
|
|
636
|
+
e._prev && e._next && r(e), e._next = t._next, t._next._prev = e, t._next = e, e._prev = t;
|
|
637
|
+
}
|
|
638
|
+
toString() {
|
|
639
|
+
let e = [], t = this._sentinel, n = t._prev;
|
|
640
|
+
for (; n !== t;) e.push(JSON.stringify(n, i)), n = n._prev;
|
|
641
|
+
return "[" + e.join(", ") + "]";
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
function r(e) {
|
|
645
|
+
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
646
|
+
}
|
|
647
|
+
function i(e, t) {
|
|
648
|
+
if (e !== "_next" && e !== "_prev") return t;
|
|
649
|
+
}
|
|
650
|
+
t.exports = n;
|
|
651
|
+
}), oe = v((e, r) => {
|
|
652
|
+
var i = y().Graph, a = ne();
|
|
653
|
+
r.exports = s;
|
|
654
|
+
var o = () => 1;
|
|
655
|
+
function s(e, t) {
|
|
656
|
+
if (e.nodeCount() <= 1) return [];
|
|
657
|
+
let n = u(e, t || o);
|
|
658
|
+
return c(n.graph, n.buckets, n.zeroIdx).flatMap((t) => e.outEdges(t.v, t.w));
|
|
659
|
+
}
|
|
660
|
+
function c(e, t, n) {
|
|
661
|
+
let r = [], i = t[t.length - 1], a = t[0], o;
|
|
662
|
+
for (; e.nodeCount();) {
|
|
663
|
+
for (; o = a.dequeue();) l(e, t, n, o);
|
|
664
|
+
for (; o = i.dequeue();) l(e, t, n, o);
|
|
665
|
+
if (e.nodeCount()) {
|
|
666
|
+
for (let i = t.length - 2; i > 0; --i) if (o = t[i].dequeue(), o) {
|
|
667
|
+
r = r.concat(l(e, t, n, o, !0));
|
|
668
|
+
break;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
return r;
|
|
673
|
+
}
|
|
674
|
+
function l(e, t, n, r, i) {
|
|
675
|
+
let a = i ? [] : void 0;
|
|
676
|
+
return e.inEdges(r.v).forEach((r) => {
|
|
677
|
+
let o = e.edge(r), s = e.node(r.v);
|
|
678
|
+
i && a.push({
|
|
679
|
+
v: r.v,
|
|
680
|
+
w: r.w
|
|
681
|
+
}), s.out -= o, d(t, n, s);
|
|
682
|
+
}), e.outEdges(r.v).forEach((r) => {
|
|
683
|
+
let i = e.edge(r), a = r.w, o = e.node(a);
|
|
684
|
+
o.in -= i, d(t, n, o);
|
|
685
|
+
}), e.removeNode(r.v), a;
|
|
686
|
+
}
|
|
687
|
+
function u(e, t) {
|
|
688
|
+
let n = new i(), r = 0, o = 0;
|
|
689
|
+
e.nodes().forEach((e) => {
|
|
690
|
+
n.setNode(e, {
|
|
691
|
+
v: e,
|
|
692
|
+
in: 0,
|
|
693
|
+
out: 0
|
|
694
|
+
});
|
|
695
|
+
}), e.edges().forEach((e) => {
|
|
696
|
+
let i = n.edge(e.v, e.w) || 0, a = t(e), s = i + a;
|
|
697
|
+
n.setEdge(e.v, e.w, s), o = Math.max(o, n.node(e.v).out += a), r = Math.max(r, n.node(e.w).in += a);
|
|
698
|
+
});
|
|
699
|
+
let s = f(o + r + 3).map(() => new a()), c = r + 1;
|
|
700
|
+
return n.nodes().forEach((e) => {
|
|
701
|
+
d(s, c, n.node(e));
|
|
702
|
+
}), {
|
|
703
|
+
graph: n,
|
|
704
|
+
buckets: s,
|
|
705
|
+
zeroIdx: c
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
function d(e, t, n) {
|
|
709
|
+
n.out ? n.in ? e[n.out - n.in + t].enqueue(n) : e[e.length - 1].enqueue(n) : e[0].enqueue(n);
|
|
710
|
+
}
|
|
711
|
+
function f(e) {
|
|
712
|
+
let t = [];
|
|
713
|
+
for (let n = 0; n < e; n++) t.push(n);
|
|
714
|
+
return t;
|
|
715
|
+
}
|
|
716
|
+
}), _ = v((e, n) => {
|
|
717
|
+
var r = y().Graph;
|
|
718
|
+
n.exports = {
|
|
719
|
+
addBorderNode: p,
|
|
720
|
+
addDummyNode: i,
|
|
721
|
+
applyWithChunking: g,
|
|
722
|
+
asNonCompoundGraph: o,
|
|
723
|
+
buildLayerMatrix: u,
|
|
724
|
+
intersectRect: l,
|
|
725
|
+
mapValues: O,
|
|
726
|
+
maxRank: b,
|
|
727
|
+
normalizeRanks: d,
|
|
728
|
+
notime: C,
|
|
729
|
+
partition: x,
|
|
730
|
+
pick: D,
|
|
731
|
+
predecessorWeights: c,
|
|
732
|
+
range: E,
|
|
733
|
+
removeEmptyRanks: f,
|
|
734
|
+
simplify: a,
|
|
735
|
+
successorWeights: s,
|
|
736
|
+
time: S,
|
|
737
|
+
uniqueId: T,
|
|
738
|
+
zipObject: k
|
|
739
|
+
};
|
|
740
|
+
function i(e, t, n, r) {
|
|
741
|
+
for (var i = r; e.hasNode(i);) i = T(r);
|
|
742
|
+
return n.dummy = t, e.setNode(i, n), i;
|
|
743
|
+
}
|
|
744
|
+
function a(e) {
|
|
745
|
+
let t = new r().setGraph(e.graph());
|
|
746
|
+
return e.nodes().forEach((n) => t.setNode(n, e.node(n))), e.edges().forEach((n) => {
|
|
747
|
+
let r = t.edge(n.v, n.w) || {
|
|
748
|
+
weight: 0,
|
|
749
|
+
minlen: 1
|
|
750
|
+
}, i = e.edge(n);
|
|
751
|
+
t.setEdge(n.v, n.w, {
|
|
752
|
+
weight: r.weight + i.weight,
|
|
753
|
+
minlen: Math.max(r.minlen, i.minlen)
|
|
754
|
+
});
|
|
755
|
+
}), t;
|
|
756
|
+
}
|
|
757
|
+
function o(e) {
|
|
758
|
+
let t = new r({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
759
|
+
return e.nodes().forEach((n) => {
|
|
760
|
+
e.children(n).length || t.setNode(n, e.node(n));
|
|
761
|
+
}), e.edges().forEach((n) => {
|
|
762
|
+
t.setEdge(n, e.edge(n));
|
|
763
|
+
}), t;
|
|
764
|
+
}
|
|
765
|
+
function s(e) {
|
|
766
|
+
let t = e.nodes().map((t) => {
|
|
767
|
+
let n = {};
|
|
768
|
+
return e.outEdges(t).forEach((t) => {
|
|
769
|
+
n[t.w] = (n[t.w] || 0) + e.edge(t).weight;
|
|
770
|
+
}), n;
|
|
771
|
+
});
|
|
772
|
+
return k(e.nodes(), t);
|
|
773
|
+
}
|
|
774
|
+
function c(e) {
|
|
775
|
+
let t = e.nodes().map((t) => {
|
|
776
|
+
let n = {};
|
|
777
|
+
return e.inEdges(t).forEach((t) => {
|
|
778
|
+
n[t.v] = (n[t.v] || 0) + e.edge(t).weight;
|
|
779
|
+
}), n;
|
|
780
|
+
});
|
|
781
|
+
return k(e.nodes(), t);
|
|
782
|
+
}
|
|
783
|
+
function l(e, t) {
|
|
784
|
+
let n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2;
|
|
785
|
+
if (!i && !a) throw Error("Not possible to find intersection inside of the rectangle");
|
|
786
|
+
let c, l;
|
|
787
|
+
return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = o * a / i), {
|
|
788
|
+
x: n + c,
|
|
789
|
+
y: r + l
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
function u(e) {
|
|
793
|
+
let t = E(b(e) + 1).map(() => []);
|
|
794
|
+
return e.nodes().forEach((n) => {
|
|
795
|
+
let r = e.node(n), i = r.rank;
|
|
796
|
+
i !== void 0 && (t[i][r.order] = n);
|
|
797
|
+
}), t;
|
|
798
|
+
}
|
|
799
|
+
function d(e) {
|
|
800
|
+
let t = e.nodes().map((t) => {
|
|
801
|
+
let n = e.node(t).rank;
|
|
802
|
+
return n === void 0 ? Number.MAX_VALUE : n;
|
|
803
|
+
}), n = g(Math.min, t);
|
|
804
|
+
e.nodes().forEach((t) => {
|
|
805
|
+
let r = e.node(t);
|
|
806
|
+
Object.hasOwn(r, "rank") && (r.rank -= n);
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
function f(e) {
|
|
810
|
+
let t = e.nodes().map((t) => e.node(t).rank).filter((e) => e !== void 0), n = g(Math.min, t), r = [];
|
|
811
|
+
e.nodes().forEach((t) => {
|
|
812
|
+
let i = e.node(t).rank - n;
|
|
813
|
+
r[i] || (r[i] = []), r[i].push(t);
|
|
814
|
+
});
|
|
815
|
+
let i = 0, a = e.graph().nodeRankFactor;
|
|
816
|
+
Array.from(r).forEach((t, n) => {
|
|
817
|
+
t === void 0 && n % a !== 0 ? --i : t !== void 0 && i && t.forEach((t) => e.node(t).rank += i);
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
function p(e, t, n, r) {
|
|
821
|
+
let a = {
|
|
822
|
+
width: 0,
|
|
823
|
+
height: 0
|
|
824
|
+
};
|
|
825
|
+
return arguments.length >= 4 && (a.rank = n, a.order = r), i(e, "border", a, t);
|
|
826
|
+
}
|
|
827
|
+
function m(e, t = h) {
|
|
828
|
+
let n = [];
|
|
829
|
+
for (let r = 0; r < e.length; r += t) {
|
|
830
|
+
let i = e.slice(r, r + t);
|
|
831
|
+
n.push(i);
|
|
832
|
+
}
|
|
833
|
+
return n;
|
|
834
|
+
}
|
|
835
|
+
var h = 65535;
|
|
836
|
+
function g(e, t) {
|
|
837
|
+
if (t.length > h) {
|
|
838
|
+
let n = m(t);
|
|
839
|
+
return e.apply(null, n.map((t) => e.apply(null, t)));
|
|
840
|
+
} else return e.apply(null, t);
|
|
841
|
+
}
|
|
842
|
+
function b(e) {
|
|
843
|
+
let t = e.nodes().map((t) => {
|
|
844
|
+
let n = e.node(t).rank;
|
|
845
|
+
return n === void 0 ? Number.MIN_VALUE : n;
|
|
846
|
+
});
|
|
847
|
+
return g(Math.max, t);
|
|
848
|
+
}
|
|
849
|
+
function x(e, t) {
|
|
850
|
+
let n = {
|
|
851
|
+
lhs: [],
|
|
852
|
+
rhs: []
|
|
853
|
+
};
|
|
854
|
+
return e.forEach((e) => {
|
|
855
|
+
t(e) ? n.lhs.push(e) : n.rhs.push(e);
|
|
856
|
+
}), n;
|
|
857
|
+
}
|
|
858
|
+
function S(e, t) {
|
|
859
|
+
let n = Date.now();
|
|
860
|
+
try {
|
|
861
|
+
return t();
|
|
862
|
+
} finally {
|
|
863
|
+
console.log(e + " time: " + (Date.now() - n) + "ms");
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
function C(e, t) {
|
|
867
|
+
return t();
|
|
868
|
+
}
|
|
869
|
+
var w = 0;
|
|
870
|
+
function T(e) {
|
|
871
|
+
return e + ("" + ++w);
|
|
872
|
+
}
|
|
873
|
+
function E(e, t, n = 1) {
|
|
874
|
+
t ?? (t = e, e = 0);
|
|
875
|
+
let r = (e) => e < t;
|
|
876
|
+
n < 0 && (r = (e) => t < e);
|
|
877
|
+
let i = [];
|
|
878
|
+
for (let t = e; r(t); t += n) i.push(t);
|
|
879
|
+
return i;
|
|
880
|
+
}
|
|
881
|
+
function D(e, t) {
|
|
882
|
+
let n = {};
|
|
883
|
+
for (let r of t) e[r] !== void 0 && (n[r] = e[r]);
|
|
884
|
+
return n;
|
|
885
|
+
}
|
|
886
|
+
function O(e, t) {
|
|
887
|
+
let n = t;
|
|
888
|
+
return typeof t == "string" && (n = (e) => e[t]), Object.entries(e).reduce((e, [t, r]) => (e[t] = n(r, t), e), {});
|
|
889
|
+
}
|
|
890
|
+
function k(e, t) {
|
|
891
|
+
return e.reduce((e, n, r) => (e[n] = t[r], e), {});
|
|
892
|
+
}
|
|
893
|
+
}), pe = v((e, t) => {
|
|
894
|
+
var n = oe(), a = _().uniqueId;
|
|
895
|
+
t.exports = {
|
|
896
|
+
run: o,
|
|
897
|
+
undo: c
|
|
898
|
+
};
|
|
899
|
+
function o(e) {
|
|
900
|
+
(e.graph().acyclicer === "greedy" ? n(e, t(e)) : s(e)).forEach((t) => {
|
|
901
|
+
let n = e.edge(t);
|
|
902
|
+
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n, a("rev"));
|
|
903
|
+
});
|
|
904
|
+
function t(e) {
|
|
905
|
+
return (t) => e.edge(t).weight;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
function s(e) {
|
|
909
|
+
let t = [], n = {}, r = {};
|
|
910
|
+
function i(a) {
|
|
911
|
+
Object.hasOwn(r, a) || (r[a] = !0, n[a] = !0, e.outEdges(a).forEach((e) => {
|
|
912
|
+
Object.hasOwn(n, e.w) ? t.push(e) : i(e.w);
|
|
913
|
+
}), delete n[a]);
|
|
914
|
+
}
|
|
915
|
+
return e.nodes().forEach(i), t;
|
|
916
|
+
}
|
|
917
|
+
function c(e) {
|
|
918
|
+
e.edges().forEach((t) => {
|
|
919
|
+
let n = e.edge(t);
|
|
920
|
+
if (n.reversed) {
|
|
921
|
+
e.removeEdge(t);
|
|
922
|
+
let r = n.forwardName;
|
|
923
|
+
delete n.reversed, delete n.forwardName, e.setEdge(t.w, t.v, n, r);
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
}), we = v((e, t) => {
|
|
928
|
+
var n = _();
|
|
929
|
+
t.exports = {
|
|
930
|
+
run: r,
|
|
931
|
+
undo: o
|
|
932
|
+
};
|
|
933
|
+
function r(e) {
|
|
934
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => a(e, t));
|
|
935
|
+
}
|
|
936
|
+
function a(e, t) {
|
|
937
|
+
let r = t.v, i = e.node(r).rank, a = t.w, o = e.node(a).rank, s = t.name, c = e.edge(t), l = c.labelRank;
|
|
938
|
+
if (o === i + 1) return;
|
|
939
|
+
e.removeEdge(t);
|
|
940
|
+
let u, d, f;
|
|
941
|
+
for (f = 0, ++i; i < o; ++f, ++i) c.points = [], d = {
|
|
942
|
+
width: 0,
|
|
943
|
+
height: 0,
|
|
944
|
+
edgeLabel: c,
|
|
945
|
+
edgeObj: t,
|
|
946
|
+
rank: i
|
|
947
|
+
}, u = n.addDummyNode(e, "edge", d, "_d"), i === l && (d.width = c.width, d.height = c.height, d.dummy = "edge-label", d.labelpos = c.labelpos), e.setEdge(r, u, { weight: c.weight }, s), f === 0 && e.graph().dummyChains.push(u), r = u;
|
|
948
|
+
e.setEdge(r, a, { weight: c.weight }, s);
|
|
949
|
+
}
|
|
950
|
+
function o(e) {
|
|
951
|
+
e.graph().dummyChains.forEach((t) => {
|
|
952
|
+
let n = e.node(t), r = n.edgeLabel, i;
|
|
953
|
+
for (e.setEdge(n.edgeObj, r); n.dummy;) i = e.successors(t)[0], e.removeNode(t), r.points.push({
|
|
954
|
+
x: n.x,
|
|
955
|
+
y: n.y
|
|
956
|
+
}), n.dummy === "edge-label" && (r.x = n.x, r.y = n.y, r.width = n.width, r.height = n.height), t = i, n = e.node(t);
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
}), j = v((e, t) => {
|
|
960
|
+
var { applyWithChunking: n } = _();
|
|
961
|
+
t.exports = {
|
|
962
|
+
longestPath: r,
|
|
963
|
+
slack: a
|
|
964
|
+
};
|
|
965
|
+
function r(e) {
|
|
966
|
+
var t = {};
|
|
967
|
+
function r(i) {
|
|
968
|
+
var a = e.node(i);
|
|
969
|
+
if (Object.hasOwn(t, i)) return a.rank;
|
|
970
|
+
t[i] = !0;
|
|
971
|
+
let o = e.outEdges(i).map((t) => t == null ? Infinity : r(t.w) - e.edge(t).minlen);
|
|
972
|
+
var s = n(Math.min, o);
|
|
973
|
+
return s === Infinity && (s = 0), a.rank = s;
|
|
974
|
+
}
|
|
975
|
+
e.sources().forEach(r);
|
|
976
|
+
}
|
|
977
|
+
function a(e, t) {
|
|
978
|
+
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
979
|
+
}
|
|
980
|
+
}), G = v((e, n) => {
|
|
981
|
+
var r = y().Graph, i = j().slack;
|
|
982
|
+
n.exports = a;
|
|
983
|
+
function a(e) {
|
|
984
|
+
var t = new r({ directed: !1 }), n = e.nodes()[0], a = e.nodeCount();
|
|
985
|
+
t.setNode(n, {});
|
|
986
|
+
for (var s, u; o(t, e) < a;) s = c(t, e), u = t.hasNode(s.v) ? i(e, s) : -i(e, s), l(t, e, u);
|
|
987
|
+
return t;
|
|
988
|
+
}
|
|
989
|
+
function o(e, t) {
|
|
990
|
+
function n(r) {
|
|
991
|
+
t.nodeEdges(r).forEach((a) => {
|
|
992
|
+
var o = a.v, s = r === o ? a.w : o;
|
|
993
|
+
!e.hasNode(s) && !i(t, a) && (e.setNode(s, {}), e.setEdge(r, s, {}), n(s));
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
return e.nodes().forEach(n), e.nodeCount();
|
|
997
|
+
}
|
|
998
|
+
function c(e, t) {
|
|
999
|
+
return t.edges().reduce((n, r) => {
|
|
1000
|
+
let a = Infinity;
|
|
1001
|
+
return e.hasNode(r.v) !== e.hasNode(r.w) && (a = i(t, r)), a < n[0] ? [a, r] : n;
|
|
1002
|
+
}, [Infinity, null])[1];
|
|
1003
|
+
}
|
|
1004
|
+
function l(e, t, n) {
|
|
1005
|
+
e.nodes().forEach((e) => t.node(e).rank += n);
|
|
1006
|
+
}
|
|
1007
|
+
}), Ie = v((e, n) => {
|
|
1008
|
+
var r = G(), a = j().slack, o = j().longestPath, l = y().alg.preorder, u = y().alg.postorder, d = _().simplify;
|
|
1009
|
+
n.exports = f, f.initLowLimValues = g, f.initCutValues = p, f.calcCutValue = h, f.leaveEdge = x, f.enterEdge = S, f.exchangeEdges = C;
|
|
1010
|
+
function f(e) {
|
|
1011
|
+
e = d(e), o(e);
|
|
1012
|
+
var t = r(e);
|
|
1013
|
+
g(t), p(t, e);
|
|
1014
|
+
for (var n, i; n = x(t);) i = S(t, e, n), C(t, e, n, i);
|
|
1015
|
+
}
|
|
1016
|
+
function p(e, t) {
|
|
1017
|
+
var n = u(e, e.nodes());
|
|
1018
|
+
n = n.slice(0, n.length - 1), n.forEach((n) => m(e, t, n));
|
|
1019
|
+
}
|
|
1020
|
+
function m(e, t, n) {
|
|
1021
|
+
var r = e.node(n).parent;
|
|
1022
|
+
e.edge(n, r).cutvalue = h(e, t, n);
|
|
1023
|
+
}
|
|
1024
|
+
function h(e, t, n) {
|
|
1025
|
+
var r = e.node(n).parent, i = !0, a = t.edge(n, r), o = 0;
|
|
1026
|
+
return a ||= (i = !1, t.edge(r, n)), o = a.weight, t.nodeEdges(n).forEach((a) => {
|
|
1027
|
+
var s = a.v === n, c = s ? a.w : a.v;
|
|
1028
|
+
if (c !== r) {
|
|
1029
|
+
var l = s === i, u = t.edge(a).weight;
|
|
1030
|
+
if (o += l ? u : -u, T(e, n, c)) {
|
|
1031
|
+
var d = e.edge(n, c).cutvalue;
|
|
1032
|
+
o += l ? -d : d;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
}), o;
|
|
1036
|
+
}
|
|
1037
|
+
function g(e, t) {
|
|
1038
|
+
arguments.length < 2 && (t = e.nodes()[0]), b(e, {}, 1, t);
|
|
1039
|
+
}
|
|
1040
|
+
function b(e, t, n, r, i) {
|
|
1041
|
+
var a = n, o = e.node(r);
|
|
1042
|
+
return t[r] = !0, e.neighbors(r).forEach((i) => {
|
|
1043
|
+
Object.hasOwn(t, i) || (n = b(e, t, n, i, r));
|
|
1044
|
+
}), o.low = a, o.lim = n++, i ? o.parent = i : delete o.parent, n;
|
|
1045
|
+
}
|
|
1046
|
+
function x(e) {
|
|
1047
|
+
return e.edges().find((t) => e.edge(t).cutvalue < 0);
|
|
1048
|
+
}
|
|
1049
|
+
function S(e, t, n) {
|
|
1050
|
+
var r = n.v, i = n.w;
|
|
1051
|
+
t.hasEdge(r, i) || (r = n.w, i = n.v);
|
|
1052
|
+
var o = e.node(r), s = e.node(i), c = o, l = !1;
|
|
1053
|
+
return o.lim > s.lim && (c = s, l = !0), t.edges().filter((t) => l === E(e, e.node(t.v), c) && l !== E(e, e.node(t.w), c)).reduce((e, n) => a(t, n) < a(t, e) ? n : e);
|
|
1054
|
+
}
|
|
1055
|
+
function C(e, t, n, r) {
|
|
1056
|
+
var i = n.v, a = n.w;
|
|
1057
|
+
e.removeEdge(i, a), e.setEdge(r.v, r.w, {}), g(e), p(e, t), w(e, t);
|
|
1058
|
+
}
|
|
1059
|
+
function w(e, t) {
|
|
1060
|
+
var n = l(e, e.nodes().find((e) => !t.node(e).parent));
|
|
1061
|
+
n = n.slice(1), n.forEach((n) => {
|
|
1062
|
+
var r = e.node(n).parent, i = t.edge(n, r), a = !1;
|
|
1063
|
+
i || (i = t.edge(r, n), a = !0), t.node(n).rank = t.node(r).rank + (a ? i.minlen : -i.minlen);
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
function T(e, t, n) {
|
|
1067
|
+
return e.hasEdge(t, n);
|
|
1068
|
+
}
|
|
1069
|
+
function E(e, t, n) {
|
|
1070
|
+
return n.low <= t.lim && t.lim <= n.lim;
|
|
1071
|
+
}
|
|
1072
|
+
}), qe = v((e, t) => {
|
|
1073
|
+
var n = j().longestPath, r = G(), i = Ie();
|
|
1074
|
+
t.exports = a;
|
|
1075
|
+
function a(e) {
|
|
1076
|
+
var t = e.graph().ranker;
|
|
1077
|
+
if (t instanceof Function) return t(e);
|
|
1078
|
+
switch (e.graph().ranker) {
|
|
1079
|
+
case "network-simplex":
|
|
1080
|
+
d(e);
|
|
1081
|
+
break;
|
|
1082
|
+
case "tight-tree":
|
|
1083
|
+
u(e);
|
|
1084
|
+
break;
|
|
1085
|
+
case "longest-path":
|
|
1086
|
+
o(e);
|
|
1087
|
+
break;
|
|
1088
|
+
case "none": break;
|
|
1089
|
+
default: d(e);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
var o = n;
|
|
1093
|
+
function u(e) {
|
|
1094
|
+
n(e), r(e);
|
|
1095
|
+
}
|
|
1096
|
+
function d(e) {
|
|
1097
|
+
i(e);
|
|
1098
|
+
}
|
|
1099
|
+
}), Re = v((e, t) => {
|
|
1100
|
+
t.exports = n;
|
|
1101
|
+
function n(e) {
|
|
1102
|
+
let t = i(e);
|
|
1103
|
+
e.graph().dummyChains.forEach((n) => {
|
|
1104
|
+
let i = e.node(n), a = i.edgeObj, o = r(e, t, a.v, a.w), s = o.path, c = o.lca, l = 0, u = s[l], d = !0;
|
|
1105
|
+
for (; n !== a.w;) {
|
|
1106
|
+
if (i = e.node(n), d) {
|
|
1107
|
+
for (; (u = s[l]) !== c && e.node(u).maxRank < i.rank;) l++;
|
|
1108
|
+
u === c && (d = !1);
|
|
1109
|
+
}
|
|
1110
|
+
if (!d) {
|
|
1111
|
+
for (; l < s.length - 1 && e.node(u = s[l + 1]).minRank <= i.rank;) l++;
|
|
1112
|
+
u = s[l];
|
|
1113
|
+
}
|
|
1114
|
+
e.setParent(n, u), n = e.successors(n)[0];
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
function r(e, t, n, r) {
|
|
1119
|
+
let i = [], a = [], o = Math.min(t[n].low, t[r].low), s = Math.max(t[n].lim, t[r].lim), c, l;
|
|
1120
|
+
c = n;
|
|
1121
|
+
do
|
|
1122
|
+
c = e.parent(c), i.push(c);
|
|
1123
|
+
while (c && (t[c].low > o || s > t[c].lim));
|
|
1124
|
+
for (l = c, c = r; (c = e.parent(c)) !== l;) a.push(c);
|
|
1125
|
+
return {
|
|
1126
|
+
path: i.concat(a.reverse()),
|
|
1127
|
+
lca: l
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
function i(e) {
|
|
1131
|
+
let t = {}, n = 0;
|
|
1132
|
+
function r(i) {
|
|
1133
|
+
let a = n;
|
|
1134
|
+
e.children(i).forEach(r), t[i] = {
|
|
1135
|
+
low: a,
|
|
1136
|
+
lim: n++
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
return e.children().forEach(r), t;
|
|
1140
|
+
}
|
|
1141
|
+
}), Pe = v((e, t) => {
|
|
1142
|
+
var n = _();
|
|
1143
|
+
t.exports = {
|
|
1144
|
+
run: r,
|
|
1145
|
+
cleanup: c
|
|
1146
|
+
};
|
|
1147
|
+
function r(e) {
|
|
1148
|
+
let t = n.addDummyNode(e, "root", {}, "_root"), r = o(e), i = Object.values(r), c = n.applyWithChunking(Math.max, i) - 1, l = 2 * c + 1;
|
|
1149
|
+
e.graph().nestingRoot = t, e.edges().forEach((t) => e.edge(t).minlen *= l);
|
|
1150
|
+
let u = s(e) + 1;
|
|
1151
|
+
e.children().forEach((n) => a(e, t, l, u, c, r, n)), e.graph().nodeRankFactor = l;
|
|
1152
|
+
}
|
|
1153
|
+
function a(e, t, r, i, o, s, c) {
|
|
1154
|
+
let l = e.children(c);
|
|
1155
|
+
if (!l.length) {
|
|
1156
|
+
c !== t && e.setEdge(t, c, {
|
|
1157
|
+
weight: 0,
|
|
1158
|
+
minlen: r
|
|
1159
|
+
});
|
|
1160
|
+
return;
|
|
1161
|
+
}
|
|
1162
|
+
let u = n.addBorderNode(e, "_bt"), d = n.addBorderNode(e, "_bb"), f = e.node(c);
|
|
1163
|
+
e.setParent(u, c), f.borderTop = u, e.setParent(d, c), f.borderBottom = d, l.forEach((n) => {
|
|
1164
|
+
a(e, t, r, i, o, s, n);
|
|
1165
|
+
let l = e.node(n), f = l.borderTop ? l.borderTop : n, p = l.borderBottom ? l.borderBottom : n, m = l.borderTop ? i : 2 * i, h = f === p ? o - s[c] + 1 : 1;
|
|
1166
|
+
e.setEdge(u, f, {
|
|
1167
|
+
weight: m,
|
|
1168
|
+
minlen: h,
|
|
1169
|
+
nestingEdge: !0
|
|
1170
|
+
}), e.setEdge(p, d, {
|
|
1171
|
+
weight: m,
|
|
1172
|
+
minlen: h,
|
|
1173
|
+
nestingEdge: !0
|
|
1174
|
+
});
|
|
1175
|
+
}), e.parent(c) || e.setEdge(t, u, {
|
|
1176
|
+
weight: 0,
|
|
1177
|
+
minlen: o + s[c]
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
function o(e) {
|
|
1181
|
+
var t = {};
|
|
1182
|
+
function n(r, i) {
|
|
1183
|
+
var a = e.children(r);
|
|
1184
|
+
a && a.length && a.forEach((e) => n(e, i + 1)), t[r] = i;
|
|
1185
|
+
}
|
|
1186
|
+
return e.children().forEach((e) => n(e, 1)), t;
|
|
1187
|
+
}
|
|
1188
|
+
function s(e) {
|
|
1189
|
+
return e.edges().reduce((t, n) => t + e.edge(n).weight, 0);
|
|
1190
|
+
}
|
|
1191
|
+
function c(e) {
|
|
1192
|
+
var t = e.graph();
|
|
1193
|
+
e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((t) => {
|
|
1194
|
+
e.edge(t).nestingEdge && e.removeEdge(t);
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
}), Ge = v((e, t) => {
|
|
1198
|
+
var n = _();
|
|
1199
|
+
t.exports = r;
|
|
1200
|
+
function r(e) {
|
|
1201
|
+
function t(n) {
|
|
1202
|
+
let r = e.children(n), i = e.node(n);
|
|
1203
|
+
if (r.length && r.forEach(t), Object.hasOwn(i, "minRank")) {
|
|
1204
|
+
i.borderLeft = [], i.borderRight = [];
|
|
1205
|
+
for (let t = i.minRank, r = i.maxRank + 1; t < r; ++t) a(e, "borderLeft", "_bl", n, i, t), a(e, "borderRight", "_br", n, i, t);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
e.children().forEach(t);
|
|
1209
|
+
}
|
|
1210
|
+
function a(e, t, r, i, a, o) {
|
|
1211
|
+
let s = {
|
|
1212
|
+
width: 0,
|
|
1213
|
+
height: 0,
|
|
1214
|
+
rank: o,
|
|
1215
|
+
borderType: t
|
|
1216
|
+
}, c = a[t][o - 1], l = n.addDummyNode(e, "border", s, r);
|
|
1217
|
+
a[t][o] = l, e.setParent(l, i), c && e.setEdge(c, l, { weight: 1 });
|
|
1218
|
+
}
|
|
1219
|
+
}), Be = v((e, t) => {
|
|
1220
|
+
t.exports = {
|
|
1221
|
+
adjust: n,
|
|
1222
|
+
undo: r
|
|
1223
|
+
};
|
|
1224
|
+
function n(e) {
|
|
1225
|
+
let t = e.graph().rankdir.toLowerCase();
|
|
1226
|
+
(t === "lr" || t === "rl") && i(e);
|
|
1227
|
+
}
|
|
1228
|
+
function r(e) {
|
|
1229
|
+
let t = e.graph().rankdir.toLowerCase();
|
|
1230
|
+
(t === "bt" || t === "rl") && o(e), (t === "lr" || t === "rl") && (c(e), i(e));
|
|
1231
|
+
}
|
|
1232
|
+
function i(e) {
|
|
1233
|
+
e.nodes().forEach((t) => a(e.node(t))), e.edges().forEach((t) => a(e.edge(t)));
|
|
1234
|
+
}
|
|
1235
|
+
function a(e) {
|
|
1236
|
+
let t = e.width;
|
|
1237
|
+
e.width = e.height, e.height = t;
|
|
1238
|
+
}
|
|
1239
|
+
function o(e) {
|
|
1240
|
+
e.nodes().forEach((t) => s(e.node(t))), e.edges().forEach((t) => {
|
|
1241
|
+
let n = e.edge(t);
|
|
1242
|
+
n.points.forEach(s), Object.hasOwn(n, "y") && s(n);
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
function s(e) {
|
|
1246
|
+
e.y = -e.y;
|
|
1247
|
+
}
|
|
1248
|
+
function c(e) {
|
|
1249
|
+
e.nodes().forEach((t) => l(e.node(t))), e.edges().forEach((t) => {
|
|
1250
|
+
let n = e.edge(t);
|
|
1251
|
+
n.points.forEach(l), Object.hasOwn(n, "x") && l(n);
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
function l(e) {
|
|
1255
|
+
let t = e.x;
|
|
1256
|
+
e.x = e.y, e.y = t;
|
|
1257
|
+
}
|
|
1258
|
+
}), Xe = v((e, t) => {
|
|
1259
|
+
var n = _();
|
|
1260
|
+
t.exports = r;
|
|
1261
|
+
function r(e) {
|
|
1262
|
+
let t = {}, r = e.nodes().filter((t) => !e.children(t).length), i = r.map((t) => e.node(t).rank), a = n.applyWithChunking(Math.max, i), o = n.range(a + 1).map(() => []);
|
|
1263
|
+
function s(n) {
|
|
1264
|
+
t[n] || (t[n] = !0, o[e.node(n).rank].push(n), e.successors(n).forEach(s));
|
|
1265
|
+
}
|
|
1266
|
+
return r.sort((t, n) => e.node(t).rank - e.node(n).rank).forEach(s), o;
|
|
1267
|
+
}
|
|
1268
|
+
}), Ue = v((e, t) => {
|
|
1269
|
+
var n = _().zipObject;
|
|
1270
|
+
t.exports = r;
|
|
1271
|
+
function r(e, t) {
|
|
1272
|
+
let n = 0;
|
|
1273
|
+
for (let r = 1; r < t.length; ++r) n += a(e, t[r - 1], t[r]);
|
|
1274
|
+
return n;
|
|
1275
|
+
}
|
|
1276
|
+
function a(e, t, r) {
|
|
1277
|
+
let i = n(r, r.map((e, t) => t)), a = t.flatMap((t) => e.outEdges(t).map((t) => ({
|
|
1278
|
+
pos: i[t.w],
|
|
1279
|
+
weight: e.edge(t).weight
|
|
1280
|
+
})).sort((e, t) => e.pos - t.pos)), o = 1;
|
|
1281
|
+
for (; o < r.length;) o <<= 1;
|
|
1282
|
+
let s = 2 * o - 1;
|
|
1283
|
+
--o;
|
|
1284
|
+
let c = Array(s).fill(0), l = 0;
|
|
1285
|
+
return a.forEach((e) => {
|
|
1286
|
+
let t = e.pos + o;
|
|
1287
|
+
c[t] += e.weight;
|
|
1288
|
+
let n = 0;
|
|
1289
|
+
for (; t > 0;) t % 2 && (n += c[t + 1]), t = t - 1 >> 1, c[t] += e.weight;
|
|
1290
|
+
l += e.weight * n;
|
|
1291
|
+
}), l;
|
|
1292
|
+
}
|
|
1293
|
+
}), Qe = v((e, t) => {
|
|
1294
|
+
t.exports = n;
|
|
1295
|
+
function n(e, t = []) {
|
|
1296
|
+
return t.map((t) => {
|
|
1297
|
+
let n = e.inEdges(t);
|
|
1298
|
+
if (n.length) {
|
|
1299
|
+
let r = n.reduce((t, n) => {
|
|
1300
|
+
let r = e.edge(n), i = e.node(n.v);
|
|
1301
|
+
return {
|
|
1302
|
+
sum: t.sum + r.weight * i.order,
|
|
1303
|
+
weight: t.weight + r.weight
|
|
1304
|
+
};
|
|
1305
|
+
}, {
|
|
1306
|
+
sum: 0,
|
|
1307
|
+
weight: 0
|
|
1308
|
+
});
|
|
1309
|
+
return {
|
|
1310
|
+
v: t,
|
|
1311
|
+
barycenter: r.sum / r.weight,
|
|
1312
|
+
weight: r.weight
|
|
1313
|
+
};
|
|
1314
|
+
} else return { v: t };
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
}), Ze = v((e, t) => {
|
|
1318
|
+
var n = _();
|
|
1319
|
+
t.exports = r;
|
|
1320
|
+
function r(e, t) {
|
|
1321
|
+
let n = {};
|
|
1322
|
+
return e.forEach((e, t) => {
|
|
1323
|
+
let r = n[e.v] = {
|
|
1324
|
+
indegree: 0,
|
|
1325
|
+
in: [],
|
|
1326
|
+
out: [],
|
|
1327
|
+
vs: [e.v],
|
|
1328
|
+
i: t
|
|
1329
|
+
};
|
|
1330
|
+
e.barycenter !== void 0 && (r.barycenter = e.barycenter, r.weight = e.weight);
|
|
1331
|
+
}), t.edges().forEach((e) => {
|
|
1332
|
+
let t = n[e.v], r = n[e.w];
|
|
1333
|
+
t !== void 0 && r !== void 0 && (r.indegree++, t.out.push(n[e.w]));
|
|
1334
|
+
}), a(Object.values(n).filter((e) => !e.indegree));
|
|
1335
|
+
}
|
|
1336
|
+
function a(e) {
|
|
1337
|
+
let t = [];
|
|
1338
|
+
function r(e) {
|
|
1339
|
+
return (t) => {
|
|
1340
|
+
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) && o(e, t);
|
|
1341
|
+
};
|
|
1342
|
+
}
|
|
1343
|
+
function i(t) {
|
|
1344
|
+
return (n) => {
|
|
1345
|
+
n.in.push(t), --n.indegree === 0 && e.push(n);
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1348
|
+
for (; e.length;) {
|
|
1349
|
+
let n = e.pop();
|
|
1350
|
+
t.push(n), n.in.reverse().forEach(r(n)), n.out.forEach(i(n));
|
|
1351
|
+
}
|
|
1352
|
+
return t.filter((e) => !e.merged).map((e) => n.pick(e, [
|
|
1353
|
+
"vs",
|
|
1354
|
+
"i",
|
|
1355
|
+
"barycenter",
|
|
1356
|
+
"weight"
|
|
1357
|
+
]));
|
|
1358
|
+
}
|
|
1359
|
+
function o(e, t) {
|
|
1360
|
+
let n = 0, r = 0;
|
|
1361
|
+
e.weight && (n += e.barycenter * e.weight, r += e.weight), t.weight && (n += t.barycenter * t.weight, r += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / r, e.weight = r, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
1362
|
+
}
|
|
1363
|
+
}), tt = v((e, t) => {
|
|
1364
|
+
var n = _();
|
|
1365
|
+
t.exports = r;
|
|
1366
|
+
function r(e, t) {
|
|
1367
|
+
let r = n.partition(e, (e) => Object.hasOwn(e, "barycenter")), i = r.lhs, s = r.rhs.sort((e, t) => t.i - e.i), c = [], l = 0, u = 0, d = 0;
|
|
1368
|
+
i.sort(o(!!t)), d = a(c, s, d), i.forEach((e) => {
|
|
1369
|
+
d += e.vs.length, c.push(e.vs), l += e.barycenter * e.weight, u += e.weight, d = a(c, s, d);
|
|
1370
|
+
});
|
|
1371
|
+
let f = { vs: c.flat(!0) };
|
|
1372
|
+
return u && (f.barycenter = l / u, f.weight = u), f;
|
|
1373
|
+
}
|
|
1374
|
+
function a(e, t, n) {
|
|
1375
|
+
let r;
|
|
1376
|
+
for (; t.length && (r = t[t.length - 1]).i <= n;) t.pop(), e.push(r.vs), n++;
|
|
1377
|
+
return n;
|
|
1378
|
+
}
|
|
1379
|
+
function o(e) {
|
|
1380
|
+
return (t, n) => t.barycenter < n.barycenter ? -1 : t.barycenter > n.barycenter ? 1 : e ? n.i - t.i : t.i - n.i;
|
|
1381
|
+
}
|
|
1382
|
+
}), it = v((e, t) => {
|
|
1383
|
+
var n = Qe(), r = Ze(), i = tt();
|
|
1384
|
+
t.exports = a;
|
|
1385
|
+
function a(e, t, c, l) {
|
|
1386
|
+
let u = e.children(t), d = e.node(t), f = d ? d.borderLeft : void 0, p = d ? d.borderRight : void 0, m = {};
|
|
1387
|
+
f && (u = u.filter((e) => e !== f && e !== p));
|
|
1388
|
+
let h = n(e, u);
|
|
1389
|
+
h.forEach((t) => {
|
|
1390
|
+
if (e.children(t.v).length) {
|
|
1391
|
+
let n = a(e, t.v, c, l);
|
|
1392
|
+
m[t.v] = n, Object.hasOwn(n, "barycenter") && s(t, n);
|
|
1393
|
+
}
|
|
1394
|
+
});
|
|
1395
|
+
let g = r(h, c);
|
|
1396
|
+
o(g, m);
|
|
1397
|
+
let b = i(g, l);
|
|
1398
|
+
if (f && (b.vs = [
|
|
1399
|
+
f,
|
|
1400
|
+
b.vs,
|
|
1401
|
+
p
|
|
1402
|
+
].flat(!0), e.predecessors(f).length)) {
|
|
1403
|
+
let t = e.node(e.predecessors(f)[0]), n = e.node(e.predecessors(p)[0]);
|
|
1404
|
+
Object.hasOwn(b, "barycenter") || (b.barycenter = 0, b.weight = 0), b.barycenter = (b.barycenter * b.weight + t.order + n.order) / (b.weight + 2), b.weight += 2;
|
|
1405
|
+
}
|
|
1406
|
+
return b;
|
|
1407
|
+
}
|
|
1408
|
+
function o(e, t) {
|
|
1409
|
+
e.forEach((e) => {
|
|
1410
|
+
e.vs = e.vs.flatMap((e) => t[e] ? t[e].vs : e);
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
function s(e, t) {
|
|
1414
|
+
e.barycenter === void 0 ? (e.barycenter = t.barycenter, e.weight = t.weight) : (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight);
|
|
1415
|
+
}
|
|
1416
|
+
}), st = v((e, n) => {
|
|
1417
|
+
var r = y().Graph, a = _();
|
|
1418
|
+
n.exports = o;
|
|
1419
|
+
function o(e, t, n, i) {
|
|
1420
|
+
i ||= e.nodes();
|
|
1421
|
+
let a = s(e), o = new r({ compound: !0 }).setGraph({ root: a }).setDefaultNodeLabel((t) => e.node(t));
|
|
1422
|
+
return i.forEach((r) => {
|
|
1423
|
+
let i = e.node(r), s = e.parent(r);
|
|
1424
|
+
(i.rank === t || i.minRank <= t && t <= i.maxRank) && (o.setNode(r), o.setParent(r, s || a), e[n](r).forEach((t) => {
|
|
1425
|
+
let n = t.v === r ? t.w : t.v, i = o.edge(n, r), a = i === void 0 ? 0 : i.weight;
|
|
1426
|
+
o.setEdge(n, r, { weight: e.edge(t).weight + a });
|
|
1427
|
+
}), Object.hasOwn(i, "minRank") && o.setNode(r, {
|
|
1428
|
+
borderLeft: i.borderLeft[t],
|
|
1429
|
+
borderRight: i.borderRight[t]
|
|
1430
|
+
}));
|
|
1431
|
+
}), o;
|
|
1432
|
+
}
|
|
1433
|
+
function s(e) {
|
|
1434
|
+
for (var t; e.hasNode(t = a.uniqueId("_root")););
|
|
1435
|
+
return t;
|
|
1436
|
+
}
|
|
1437
|
+
}), dt = v((e, t) => {
|
|
1438
|
+
t.exports = n;
|
|
1439
|
+
function n(e, t, n) {
|
|
1440
|
+
let r = {}, i;
|
|
1441
|
+
n.forEach((n) => {
|
|
1442
|
+
let a = e.parent(n), o, s;
|
|
1443
|
+
for (; a;) {
|
|
1444
|
+
if (o = e.parent(a), o ? (s = r[o], r[o] = a) : (s = i, i = a), s && s !== a) {
|
|
1445
|
+
t.setEdge(s, a);
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
a = o;
|
|
1449
|
+
}
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
}), ft = v((e, n) => {
|
|
1453
|
+
var r = Xe(), a = Ue(), o = it(), s = st(), c = dt(), l = y().Graph, u = _();
|
|
1454
|
+
n.exports = d;
|
|
1455
|
+
function d(e, t = {}) {
|
|
1456
|
+
if (typeof t.customOrder == "function") {
|
|
1457
|
+
t.customOrder(e, d);
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
let n = u.maxRank(e), i = f(e, u.range(1, n + 1), "inEdges"), o = f(e, u.range(n - 1, -1, -1), "outEdges"), s = r(e);
|
|
1461
|
+
if (m(e, s), t.disableOptimalOrderHeuristic) return;
|
|
1462
|
+
let c = Infinity, l, h = t.constraints || [];
|
|
1463
|
+
for (let t = 0, n = 0; n < 4; ++t, ++n) {
|
|
1464
|
+
p(t % 2 ? i : o, t % 4 >= 2, h), s = u.buildLayerMatrix(e);
|
|
1465
|
+
let r = a(e, s);
|
|
1466
|
+
r < c ? (n = 0, l = Object.assign({}, s), c = r) : r === c && (l = structuredClone(s));
|
|
1467
|
+
}
|
|
1468
|
+
m(e, l);
|
|
1469
|
+
}
|
|
1470
|
+
function f(e, t, n) {
|
|
1471
|
+
let r = /* @__PURE__ */ new Map(), i = (e, t) => {
|
|
1472
|
+
r.has(e) || r.set(e, []), r.get(e).push(t);
|
|
1473
|
+
};
|
|
1474
|
+
for (let t of e.nodes()) {
|
|
1475
|
+
let n = e.node(t);
|
|
1476
|
+
if (typeof n.rank == "number" && i(n.rank, t), typeof n.minRank == "number" && typeof n.maxRank == "number") for (let e = n.minRank; e <= n.maxRank; e++) e !== n.rank && i(e, t);
|
|
1477
|
+
}
|
|
1478
|
+
return t.map(function(t) {
|
|
1479
|
+
return s(e, t, n, r.get(t) || []);
|
|
1480
|
+
});
|
|
1481
|
+
}
|
|
1482
|
+
function p(e, t, n) {
|
|
1483
|
+
let r = new l();
|
|
1484
|
+
e.forEach(function(e) {
|
|
1485
|
+
n.forEach((e) => r.setEdge(e.left, e.right));
|
|
1486
|
+
let i = e.graph().root, a = o(e, i, r, t);
|
|
1487
|
+
a.vs.forEach((t, n) => e.node(t).order = n), c(e, r, a.vs);
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1490
|
+
function m(e, t) {
|
|
1491
|
+
Object.values(t).forEach((t) => t.forEach((t, n) => e.node(t).order = n));
|
|
1492
|
+
}
|
|
1493
|
+
}), yt = v((e, n) => {
|
|
1494
|
+
var r = y().Graph, a = _();
|
|
1495
|
+
n.exports = {
|
|
1496
|
+
positionX: b,
|
|
1497
|
+
findType1Conflicts: o,
|
|
1498
|
+
findType2Conflicts: s,
|
|
1499
|
+
addConflict: l,
|
|
1500
|
+
hasConflict: u,
|
|
1501
|
+
verticalAlignment: d,
|
|
1502
|
+
horizontalCompaction: f,
|
|
1503
|
+
alignCoordinates: h,
|
|
1504
|
+
findSmallestWidthAlignment: m,
|
|
1505
|
+
balance: g
|
|
1506
|
+
};
|
|
1507
|
+
function o(e, t) {
|
|
1508
|
+
let n = {};
|
|
1509
|
+
function r(t, r) {
|
|
1510
|
+
let i = 0, a = 0, o = t.length, s = r[r.length - 1];
|
|
1511
|
+
return r.forEach((t, u) => {
|
|
1512
|
+
let d = c(e, t), f = d ? e.node(d).order : o;
|
|
1513
|
+
(d || t === s) && (r.slice(a, u + 1).forEach((t) => {
|
|
1514
|
+
e.predecessors(t).forEach((r) => {
|
|
1515
|
+
let a = e.node(r), o = a.order;
|
|
1516
|
+
(o < i || f < o) && !(a.dummy && e.node(t).dummy) && l(n, r, t);
|
|
1517
|
+
});
|
|
1518
|
+
}), a = u + 1, i = f);
|
|
1519
|
+
}), r;
|
|
1520
|
+
}
|
|
1521
|
+
return t.length && t.reduce(r), n;
|
|
1522
|
+
}
|
|
1523
|
+
function s(e, t) {
|
|
1524
|
+
let n = {};
|
|
1525
|
+
function r(t, r, i, o, s) {
|
|
1526
|
+
let c;
|
|
1527
|
+
a.range(r, i).forEach((r) => {
|
|
1528
|
+
c = t[r], e.node(c).dummy && e.predecessors(c).forEach((t) => {
|
|
1529
|
+
let r = e.node(t);
|
|
1530
|
+
r.dummy && (r.order < o || r.order > s) && l(n, t, c);
|
|
1531
|
+
});
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
function i(t, n) {
|
|
1535
|
+
let i = -1, a, o = 0;
|
|
1536
|
+
return n.forEach((s, c) => {
|
|
1537
|
+
if (e.node(s).dummy === "border") {
|
|
1538
|
+
let t = e.predecessors(s);
|
|
1539
|
+
t.length && (a = e.node(t[0]).order, r(n, o, c, i, a), o = c, i = a);
|
|
1540
|
+
}
|
|
1541
|
+
r(n, o, n.length, a, t.length);
|
|
1542
|
+
}), n;
|
|
1543
|
+
}
|
|
1544
|
+
return t.length && t.reduce(i), n;
|
|
1545
|
+
}
|
|
1546
|
+
function c(e, t) {
|
|
1547
|
+
if (e.node(t).dummy) return e.predecessors(t).find((t) => e.node(t).dummy);
|
|
1548
|
+
}
|
|
1549
|
+
function l(e, t, n) {
|
|
1550
|
+
if (t > n) {
|
|
1551
|
+
let e = t;
|
|
1552
|
+
t = n, n = e;
|
|
1553
|
+
}
|
|
1554
|
+
let r = e[t];
|
|
1555
|
+
r || (e[t] = r = {}), r[n] = !0;
|
|
1556
|
+
}
|
|
1557
|
+
function u(e, t, n) {
|
|
1558
|
+
if (t > n) {
|
|
1559
|
+
let e = t;
|
|
1560
|
+
t = n, n = e;
|
|
1561
|
+
}
|
|
1562
|
+
return !!e[t] && Object.hasOwn(e[t], n);
|
|
1563
|
+
}
|
|
1564
|
+
function d(e, t, n, r) {
|
|
1565
|
+
let i = {}, a = {}, o = {};
|
|
1566
|
+
return t.forEach((e) => {
|
|
1567
|
+
e.forEach((e, t) => {
|
|
1568
|
+
i[e] = e, a[e] = e, o[e] = t;
|
|
1569
|
+
});
|
|
1570
|
+
}), t.forEach((e) => {
|
|
1571
|
+
let t = -1;
|
|
1572
|
+
e.forEach((e) => {
|
|
1573
|
+
let s = r(e);
|
|
1574
|
+
if (s.length) {
|
|
1575
|
+
s = s.sort((e, t) => o[e] - o[t]);
|
|
1576
|
+
let r = (s.length - 1) / 2;
|
|
1577
|
+
for (let c = Math.floor(r), l = Math.ceil(r); c <= l; ++c) {
|
|
1578
|
+
let r = s[c];
|
|
1579
|
+
a[e] === e && t < o[r] && !u(n, e, r) && (a[r] = e, a[e] = i[e] = i[r], t = o[r]);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
});
|
|
1583
|
+
}), {
|
|
1584
|
+
root: i,
|
|
1585
|
+
align: a
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
function f(e, t, n, r, i) {
|
|
1589
|
+
let a = {}, o = p(e, t, n, i), s = i ? "borderLeft" : "borderRight";
|
|
1590
|
+
function c(e, t) {
|
|
1591
|
+
let n = o.nodes().slice(), r = {}, i = n.pop();
|
|
1592
|
+
for (; i;) {
|
|
1593
|
+
if (r[i]) e(i);
|
|
1594
|
+
else {
|
|
1595
|
+
r[i] = !0, n.push(i);
|
|
1596
|
+
for (let e of t(i)) n.push(e);
|
|
1597
|
+
}
|
|
1598
|
+
i = n.pop();
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
function l(e) {
|
|
1602
|
+
a[e] = o.inEdges(e).reduce((e, t) => Math.max(e, a[t.v] + o.edge(t)), 0);
|
|
1603
|
+
}
|
|
1604
|
+
function u(t) {
|
|
1605
|
+
let n = o.outEdges(t).reduce((e, t) => Math.min(e, a[t.w] - o.edge(t)), Infinity), r = e.node(t);
|
|
1606
|
+
n !== Infinity && r.borderType !== s && (a[t] = Math.max(a[t], n));
|
|
1607
|
+
}
|
|
1608
|
+
return c(l, o.predecessors.bind(o)), c(u, o.successors.bind(o)), Object.keys(r).forEach((e) => a[e] = a[n[e]]), a;
|
|
1609
|
+
}
|
|
1610
|
+
function p(e, t, n, i) {
|
|
1611
|
+
let a = new r(), o = e.graph(), s = x(o.nodesep, o.edgesep, i);
|
|
1612
|
+
return t.forEach((t) => {
|
|
1613
|
+
let r;
|
|
1614
|
+
t.forEach((t) => {
|
|
1615
|
+
let i = n[t];
|
|
1616
|
+
if (a.setNode(i), r) {
|
|
1617
|
+
var o = n[r], c = a.edge(o, i);
|
|
1618
|
+
a.setEdge(o, i, Math.max(s(e, t, r), c || 0));
|
|
1619
|
+
}
|
|
1620
|
+
r = t;
|
|
1621
|
+
});
|
|
1622
|
+
}), a;
|
|
1623
|
+
}
|
|
1624
|
+
function m(e, t) {
|
|
1625
|
+
return Object.values(t).reduce((t, n) => {
|
|
1626
|
+
let r = -Infinity, i = Infinity;
|
|
1627
|
+
Object.entries(n).forEach(([t, n]) => {
|
|
1628
|
+
let a = S(e, t) / 2;
|
|
1629
|
+
r = Math.max(n + a, r), i = Math.min(n - a, i);
|
|
1630
|
+
});
|
|
1631
|
+
let a = r - i;
|
|
1632
|
+
return a < t[0] && (t = [a, n]), t;
|
|
1633
|
+
}, [Infinity, null])[1];
|
|
1634
|
+
}
|
|
1635
|
+
function h(e, t) {
|
|
1636
|
+
let n = Object.values(t), r = a.applyWithChunking(Math.min, n), i = a.applyWithChunking(Math.max, n);
|
|
1637
|
+
["u", "d"].forEach((n) => {
|
|
1638
|
+
["l", "r"].forEach((o) => {
|
|
1639
|
+
let s = n + o, c = e[s];
|
|
1640
|
+
if (c === t) return;
|
|
1641
|
+
let l = Object.values(c), u = r - a.applyWithChunking(Math.min, l);
|
|
1642
|
+
o !== "l" && (u = i - a.applyWithChunking(Math.max, l)), u && (e[s] = a.mapValues(c, (e) => e + u));
|
|
1643
|
+
});
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
function g(e, t) {
|
|
1647
|
+
return a.mapValues(e.ul, (n, r) => {
|
|
1648
|
+
if (t) return e[t.toLowerCase()][r];
|
|
1649
|
+
{
|
|
1650
|
+
let t = Object.values(e).map((e) => e[r]).sort((e, t) => e - t);
|
|
1651
|
+
return (t[1] + t[2]) / 2;
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
function b(e) {
|
|
1656
|
+
let t = a.buildLayerMatrix(e), n = Object.assign(o(e, t), s(e, t)), r = {}, i;
|
|
1657
|
+
return ["u", "d"].forEach((o) => {
|
|
1658
|
+
i = o === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((t) => {
|
|
1659
|
+
t === "r" && (i = i.map((e) => Object.values(e).reverse()));
|
|
1660
|
+
let s = (o === "u" ? e.predecessors : e.successors).bind(e), c = d(e, i, n, s), l = f(e, i, c.root, c.align, t === "r");
|
|
1661
|
+
t === "r" && (l = a.mapValues(l, (e) => -e)), r[o + t] = l;
|
|
1662
|
+
});
|
|
1663
|
+
}), h(r, m(e, r)), g(r, e.graph().align);
|
|
1664
|
+
}
|
|
1665
|
+
function x(e, t, n) {
|
|
1666
|
+
return (r, i, a) => {
|
|
1667
|
+
let o = r.node(i), s = r.node(a), c = 0, l;
|
|
1668
|
+
if (c += o.width / 2, Object.hasOwn(o, "labelpos")) switch (o.labelpos.toLowerCase()) {
|
|
1669
|
+
case "l":
|
|
1670
|
+
l = -o.width / 2;
|
|
1671
|
+
break;
|
|
1672
|
+
case "r":
|
|
1673
|
+
l = o.width / 2;
|
|
1674
|
+
break;
|
|
1675
|
+
}
|
|
1676
|
+
if (l && (c += n ? l : -l), l = 0, c += (o.dummy ? t : e) / 2, c += (s.dummy ? t : e) / 2, c += s.width / 2, Object.hasOwn(s, "labelpos")) switch (s.labelpos.toLowerCase()) {
|
|
1677
|
+
case "l":
|
|
1678
|
+
l = s.width / 2;
|
|
1679
|
+
break;
|
|
1680
|
+
case "r":
|
|
1681
|
+
l = -s.width / 2;
|
|
1682
|
+
break;
|
|
1683
|
+
}
|
|
1684
|
+
return l && (c += n ? l : -l), l = 0, c;
|
|
1685
|
+
};
|
|
1686
|
+
}
|
|
1687
|
+
function S(e, t) {
|
|
1688
|
+
return e.node(t).width;
|
|
1689
|
+
}
|
|
1690
|
+
}), Nt = v((e, t) => {
|
|
1691
|
+
var n = _(), r = yt().positionX;
|
|
1692
|
+
t.exports = a;
|
|
1693
|
+
function a(e) {
|
|
1694
|
+
e = n.asNonCompoundGraph(e), o(e), Object.entries(r(e)).forEach(([t, n]) => e.node(t).x = n);
|
|
1695
|
+
}
|
|
1696
|
+
function o(e) {
|
|
1697
|
+
let t = n.buildLayerMatrix(e), r = e.graph().ranksep, i = e.graph().rankalign, a = 0;
|
|
1698
|
+
t.forEach((t) => {
|
|
1699
|
+
let n = t.reduce((t, n) => {
|
|
1700
|
+
let r = e.node(n).height;
|
|
1701
|
+
return t > r ? t : r;
|
|
1702
|
+
}, 0);
|
|
1703
|
+
t.forEach((t) => {
|
|
1704
|
+
let r = e.node(t);
|
|
1705
|
+
i === "top" ? r.y = a + r.height / 2 : i === "bottom" ? r.y = a + n - r.height / 2 : r.y = a + n / 2;
|
|
1706
|
+
}), a += n + r;
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
}), Rt = v((e, n) => {
|
|
1710
|
+
var r = pe(), s = we(), c = qe(), l = _().normalizeRanks, h = Re(), g = _().removeEmptyRanks, b = Pe(), x = Ge(), S = Be(), C = ft(), w = Nt(), T = _(), D = y().Graph;
|
|
1711
|
+
n.exports = k;
|
|
1712
|
+
function k(e, t = {}) {
|
|
1713
|
+
let n = t.debugTiming ? T.time : T.notime;
|
|
1714
|
+
return n("layout", () => {
|
|
1715
|
+
let r = n(" buildLayoutGraph", () => V(e));
|
|
1716
|
+
return n(" runLayout", () => A(r, n, t)), n(" updateInputGraph", () => M(e, r)), r;
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
function A(e, t, n) {
|
|
1720
|
+
t(" makeSpaceForEdgeLabels", () => H(e)), t(" removeSelfEdges", () => ee(e)), t(" acyclic", () => r.run(e)), t(" nestingGraph.run", () => b.run(e)), t(" rank", () => c(T.asNonCompoundGraph(e))), t(" injectEdgeLabelProxies", () => U(e)), t(" removeEmptyRanks", () => g(e)), t(" nestingGraph.cleanup", () => b.cleanup(e)), t(" normalizeRanks", () => l(e)), t(" assignRankMinMax", () => W(e)), t(" removeEdgeLabelProxies", () => K(e)), t(" normalize.run", () => s.run(e)), t(" parentDummyChains", () => h(e)), t(" addBorderSegments", () => x(e)), t(" order", () => C(e, n)), t(" insertSelfEdges", () => te(e)), t(" adjustCoordinateSystem", () => S.adjust(e)), t(" position", () => w(e)), t(" positionSelfEdges", () => re(e)), t(" removeBorderNodes", () => Z(e)), t(" normalize.undo", () => s.undo(e)), t(" fixupEdgeLabelCoords", () => Y(e)), t(" undoCoordinateSystem", () => S.undo(e)), t(" translateGraph", () => q(e)), t(" assignNodeIntersects", () => J(e)), t(" reversePoints", () => X(e)), t(" acyclic.undo", () => r.undo(e));
|
|
1721
|
+
}
|
|
1722
|
+
function M(e, t) {
|
|
1723
|
+
e.nodes().forEach((n) => {
|
|
1724
|
+
let r = e.node(n), i = t.node(n);
|
|
1725
|
+
r && (r.x = i.x, r.y = i.y, r.order = i.order, r.rank = i.rank, t.children(n).length && (r.width = i.width, r.height = i.height));
|
|
1726
|
+
}), e.edges().forEach((n) => {
|
|
1727
|
+
let r = e.edge(n), i = t.edge(n);
|
|
1728
|
+
r.points = i.points, Object.hasOwn(i, "x") && (r.x = i.x, r.y = i.y);
|
|
1729
|
+
}), e.graph().width = t.graph().width, e.graph().height = t.graph().height;
|
|
1730
|
+
}
|
|
1731
|
+
var N = [
|
|
1732
|
+
"nodesep",
|
|
1733
|
+
"edgesep",
|
|
1734
|
+
"ranksep",
|
|
1735
|
+
"marginx",
|
|
1736
|
+
"marginy"
|
|
1737
|
+
], P = {
|
|
1738
|
+
ranksep: 50,
|
|
1739
|
+
edgesep: 20,
|
|
1740
|
+
nodesep: 50,
|
|
1741
|
+
rankdir: "tb",
|
|
1742
|
+
rankalign: "center"
|
|
1743
|
+
}, F = [
|
|
1744
|
+
"acyclicer",
|
|
1745
|
+
"ranker",
|
|
1746
|
+
"rankdir",
|
|
1747
|
+
"align",
|
|
1748
|
+
"rankalign"
|
|
1749
|
+
], I = [
|
|
1750
|
+
"width",
|
|
1751
|
+
"height",
|
|
1752
|
+
"rank"
|
|
1753
|
+
], L = {
|
|
1754
|
+
width: 0,
|
|
1755
|
+
height: 0
|
|
1756
|
+
}, R = [
|
|
1757
|
+
"minlen",
|
|
1758
|
+
"weight",
|
|
1759
|
+
"width",
|
|
1760
|
+
"height",
|
|
1761
|
+
"labeloffset"
|
|
1762
|
+
], z = {
|
|
1763
|
+
minlen: 1,
|
|
1764
|
+
weight: 1,
|
|
1765
|
+
width: 0,
|
|
1766
|
+
height: 0,
|
|
1767
|
+
labeloffset: 10,
|
|
1768
|
+
labelpos: "r"
|
|
1769
|
+
}, B = ["labelpos"];
|
|
1770
|
+
function V(e) {
|
|
1771
|
+
let t = new D({
|
|
1772
|
+
multigraph: !0,
|
|
1773
|
+
compound: !0
|
|
1774
|
+
}), n = $(e.graph());
|
|
1775
|
+
return t.setGraph(Object.assign({}, P, Q(n, N), T.pick(n, F))), e.nodes().forEach((n) => {
|
|
1776
|
+
let r = Q($(e.node(n)), I);
|
|
1777
|
+
Object.keys(L).forEach((e) => {
|
|
1778
|
+
r[e] === void 0 && (r[e] = L[e]);
|
|
1779
|
+
}), t.setNode(n, r), t.setParent(n, e.parent(n));
|
|
1780
|
+
}), e.edges().forEach((n) => {
|
|
1781
|
+
let r = $(e.edge(n));
|
|
1782
|
+
t.setEdge(n, Object.assign({}, z, Q(r, R), T.pick(r, B)));
|
|
1783
|
+
}), t;
|
|
1784
|
+
}
|
|
1785
|
+
function H(e) {
|
|
1786
|
+
let t = e.graph();
|
|
1787
|
+
t.ranksep /= 2, e.edges().forEach((n) => {
|
|
1788
|
+
let r = e.edge(n);
|
|
1789
|
+
r.minlen *= 2, r.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? r.width += r.labeloffset : r.height += r.labeloffset);
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
function U(e) {
|
|
1793
|
+
e.edges().forEach((t) => {
|
|
1794
|
+
let n = e.edge(t);
|
|
1795
|
+
if (n.width && n.height) {
|
|
1796
|
+
let n = e.node(t.v), r = {
|
|
1797
|
+
rank: (e.node(t.w).rank - n.rank) / 2 + n.rank,
|
|
1798
|
+
e: t
|
|
1799
|
+
};
|
|
1800
|
+
T.addDummyNode(e, "edge-proxy", r, "_ep");
|
|
1801
|
+
}
|
|
1802
|
+
});
|
|
1803
|
+
}
|
|
1804
|
+
function W(e) {
|
|
1805
|
+
let t = 0;
|
|
1806
|
+
e.nodes().forEach((n) => {
|
|
1807
|
+
let r = e.node(n);
|
|
1808
|
+
r.borderTop && (r.minRank = e.node(r.borderTop).rank, r.maxRank = e.node(r.borderBottom).rank, t = Math.max(t, r.maxRank));
|
|
1809
|
+
}), e.graph().maxRank = t;
|
|
1810
|
+
}
|
|
1811
|
+
function K(e) {
|
|
1812
|
+
e.nodes().forEach((t) => {
|
|
1813
|
+
let n = e.node(t);
|
|
1814
|
+
n.dummy === "edge-proxy" && (e.edge(n.e).labelRank = n.rank, e.removeNode(t));
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1817
|
+
function q(e) {
|
|
1818
|
+
let t = Infinity, n = 0, r = Infinity, i = 0, a = e.graph(), o = a.marginx || 0, s = a.marginy || 0;
|
|
1819
|
+
function c(e) {
|
|
1820
|
+
let a = e.x, o = e.y, s = e.width, c = e.height;
|
|
1821
|
+
t = Math.min(t, a - s / 2), n = Math.max(n, a + s / 2), r = Math.min(r, o - c / 2), i = Math.max(i, o + c / 2);
|
|
1822
|
+
}
|
|
1823
|
+
e.nodes().forEach((t) => c(e.node(t))), e.edges().forEach((t) => {
|
|
1824
|
+
let n = e.edge(t);
|
|
1825
|
+
Object.hasOwn(n, "x") && c(n);
|
|
1826
|
+
}), t -= o, r -= s, e.nodes().forEach((n) => {
|
|
1827
|
+
let i = e.node(n);
|
|
1828
|
+
i.x -= t, i.y -= r;
|
|
1829
|
+
}), e.edges().forEach((n) => {
|
|
1830
|
+
let i = e.edge(n);
|
|
1831
|
+
i.points.forEach((e) => {
|
|
1832
|
+
e.x -= t, e.y -= r;
|
|
1833
|
+
}), Object.hasOwn(i, "x") && (i.x -= t), Object.hasOwn(i, "y") && (i.y -= r);
|
|
1834
|
+
}), a.width = n - t + o, a.height = i - r + s;
|
|
1835
|
+
}
|
|
1836
|
+
function J(e) {
|
|
1837
|
+
e.edges().forEach((t) => {
|
|
1838
|
+
let n = e.edge(t), r = e.node(t.v), i = e.node(t.w), a, o;
|
|
1839
|
+
n.points ? (a = n.points[0], o = n.points[n.points.length - 1]) : (n.points = [], a = i, o = r), n.points.unshift(T.intersectRect(r, a)), n.points.push(T.intersectRect(i, o));
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
function Y(e) {
|
|
1843
|
+
e.edges().forEach((t) => {
|
|
1844
|
+
let n = e.edge(t);
|
|
1845
|
+
if (Object.hasOwn(n, "x")) switch ((n.labelpos === "l" || n.labelpos === "r") && (n.width -= n.labeloffset), n.labelpos) {
|
|
1846
|
+
case "l":
|
|
1847
|
+
n.x -= n.width / 2 + n.labeloffset;
|
|
1848
|
+
break;
|
|
1849
|
+
case "r":
|
|
1850
|
+
n.x += n.width / 2 + n.labeloffset;
|
|
1851
|
+
break;
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
function X(e) {
|
|
1856
|
+
e.edges().forEach((t) => {
|
|
1857
|
+
let n = e.edge(t);
|
|
1858
|
+
n.reversed && n.points.reverse();
|
|
1859
|
+
});
|
|
1860
|
+
}
|
|
1861
|
+
function Z(e) {
|
|
1862
|
+
e.nodes().forEach((t) => {
|
|
1863
|
+
if (e.children(t).length) {
|
|
1864
|
+
let n = e.node(t), r = e.node(n.borderTop), i = e.node(n.borderBottom), a = e.node(n.borderLeft[n.borderLeft.length - 1]), o = e.node(n.borderRight[n.borderRight.length - 1]);
|
|
1865
|
+
n.width = Math.abs(o.x - a.x), n.height = Math.abs(i.y - r.y), n.x = a.x + n.width / 2, n.y = r.y + n.height / 2;
|
|
1866
|
+
}
|
|
1867
|
+
}), e.nodes().forEach((t) => {
|
|
1868
|
+
e.node(t).dummy === "border" && e.removeNode(t);
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
function ee(e) {
|
|
1872
|
+
e.edges().forEach((t) => {
|
|
1873
|
+
if (t.v === t.w) {
|
|
1874
|
+
var n = e.node(t.v);
|
|
1875
|
+
n.selfEdges ||= [], n.selfEdges.push({
|
|
1876
|
+
e: t,
|
|
1877
|
+
label: e.edge(t)
|
|
1878
|
+
}), e.removeEdge(t);
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1881
|
+
}
|
|
1882
|
+
function te(e) {
|
|
1883
|
+
T.buildLayerMatrix(e).forEach((t) => {
|
|
1884
|
+
var n = 0;
|
|
1885
|
+
t.forEach((t, r) => {
|
|
1886
|
+
var i = e.node(t);
|
|
1887
|
+
i.order = r + n, (i.selfEdges || []).forEach((t) => {
|
|
1888
|
+
T.addDummyNode(e, "selfedge", {
|
|
1889
|
+
width: t.label.width,
|
|
1890
|
+
height: t.label.height,
|
|
1891
|
+
rank: i.rank,
|
|
1892
|
+
order: r + ++n,
|
|
1893
|
+
e: t.e,
|
|
1894
|
+
label: t.label
|
|
1895
|
+
}, "_se");
|
|
1896
|
+
}), delete i.selfEdges;
|
|
1897
|
+
});
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
function re(e) {
|
|
1901
|
+
e.nodes().forEach((t) => {
|
|
1902
|
+
var n = e.node(t);
|
|
1903
|
+
if (n.dummy === "selfedge") {
|
|
1904
|
+
var r = e.node(n.e.v), i = r.x + r.width / 2, a = r.y, o = n.x - i, s = r.height / 2;
|
|
1905
|
+
e.setEdge(n.e, n.label), e.removeNode(t), n.label.points = [
|
|
1906
|
+
{
|
|
1907
|
+
x: i + 2 * o / 3,
|
|
1908
|
+
y: a - s
|
|
1909
|
+
},
|
|
1910
|
+
{
|
|
1911
|
+
x: i + 5 * o / 6,
|
|
1912
|
+
y: a - s
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
x: i + o,
|
|
1916
|
+
y: a
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
x: i + 5 * o / 6,
|
|
1920
|
+
y: a + s
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
x: i + 2 * o / 3,
|
|
1924
|
+
y: a + s
|
|
1925
|
+
}
|
|
1926
|
+
], n.label.x = n.x, n.label.y = n.y;
|
|
1927
|
+
}
|
|
1928
|
+
});
|
|
1929
|
+
}
|
|
1930
|
+
function Q(e, t) {
|
|
1931
|
+
return T.mapValues(T.pick(e, t), Number);
|
|
1932
|
+
}
|
|
1933
|
+
function $(e) {
|
|
1934
|
+
var t = {};
|
|
1935
|
+
return e && Object.entries(e).forEach(([e, n]) => {
|
|
1936
|
+
typeof e == "string" && (e = e.toLowerCase()), t[e] = n;
|
|
1937
|
+
}), t;
|
|
1938
|
+
}
|
|
1939
|
+
}), St = v((e, n) => {
|
|
1940
|
+
var r = _(), a = y().Graph;
|
|
1941
|
+
n.exports = { debugOrdering: o };
|
|
1942
|
+
function o(e) {
|
|
1943
|
+
let t = r.buildLayerMatrix(e), n = new a({
|
|
1944
|
+
compound: !0,
|
|
1945
|
+
multigraph: !0
|
|
1946
|
+
}).setGraph({});
|
|
1947
|
+
return e.nodes().forEach((t) => {
|
|
1948
|
+
n.setNode(t, { label: t }), n.setParent(t, "layer" + e.node(t).rank);
|
|
1949
|
+
}), e.edges().forEach((e) => n.setEdge(e.v, e.w, {}, e.name)), t.forEach((e, t) => {
|
|
1950
|
+
let r = "layer" + t;
|
|
1951
|
+
n.setNode(r, { rank: "same" }), e.reduce((e, t) => (n.setEdge(e, t, { style: "invis" }), t));
|
|
1952
|
+
}), n;
|
|
1953
|
+
}
|
|
1954
|
+
}), Ft = v((e, t) => {
|
|
1955
|
+
t.exports = "2.0.4";
|
|
1956
|
+
}), dagre_esm_default = v((e, n) => {
|
|
1957
|
+
n.exports = {
|
|
1958
|
+
graphlib: y(),
|
|
1959
|
+
layout: Rt(),
|
|
1960
|
+
debug: St(),
|
|
1961
|
+
util: {
|
|
1962
|
+
time: _().time,
|
|
1963
|
+
notime: _().notime
|
|
1964
|
+
},
|
|
1965
|
+
version: Ft()
|
|
1966
|
+
};
|
|
1967
|
+
})();
|
|
1968
|
+
export { dagre_esm_default as default };
|