groove-dev 0.15.0 → 0.16.0
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/docs/FILE-EDITOR-PLAN.md +253 -0
- package/node_modules/@codemirror/autocomplete/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/autocomplete/CHANGELOG.md +639 -0
- package/node_modules/@codemirror/autocomplete/LICENSE +21 -0
- package/node_modules/@codemirror/autocomplete/README.md +43 -0
- package/node_modules/@codemirror/autocomplete/dist/index.cjs +2151 -0
- package/node_modules/@codemirror/autocomplete/dist/index.d.cts +648 -0
- package/node_modules/@codemirror/autocomplete/dist/index.d.ts +648 -0
- package/node_modules/@codemirror/autocomplete/dist/index.js +2120 -0
- package/node_modules/@codemirror/autocomplete/package.json +41 -0
- package/node_modules/@codemirror/commands/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/commands/CHANGELOG.md +386 -0
- package/node_modules/@codemirror/commands/LICENSE +21 -0
- package/node_modules/@codemirror/commands/README.md +35 -0
- package/node_modules/@codemirror/commands/dist/index.cjs +1909 -0
- package/node_modules/@codemirror/commands/dist/index.d.cts +650 -0
- package/node_modules/@codemirror/commands/dist/index.d.ts +650 -0
- package/node_modules/@codemirror/commands/dist/index.js +1795 -0
- package/node_modules/@codemirror/commands/package.json +42 -0
- package/node_modules/@codemirror/lang-css/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-css/CHANGELOG.md +106 -0
- package/node_modules/@codemirror/lang-css/LICENSE +21 -0
- package/node_modules/@codemirror/lang-css/README.md +50 -0
- package/node_modules/@codemirror/lang-css/dist/index.cjs +269 -0
- package/node_modules/@codemirror/lang-css/dist/index.d.cts +28 -0
- package/node_modules/@codemirror/lang-css/dist/index.d.ts +28 -0
- package/node_modules/@codemirror/lang-css/dist/index.js +264 -0
- package/node_modules/@codemirror/lang-css/package.json +42 -0
- package/node_modules/@codemirror/lang-html/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-html/CHANGELOG.md +210 -0
- package/node_modules/@codemirror/lang-html/LICENSE +21 -0
- package/node_modules/@codemirror/lang-html/README.md +147 -0
- package/node_modules/@codemirror/lang-html/dist/index.cjs +667 -0
- package/node_modules/@codemirror/lang-html/dist/index.d.cts +115 -0
- package/node_modules/@codemirror/lang-html/dist/index.d.ts +115 -0
- package/node_modules/@codemirror/lang-html/dist/index.js +661 -0
- package/node_modules/@codemirror/lang-html/package.json +46 -0
- package/node_modules/@codemirror/lang-javascript/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-javascript/CHANGELOG.md +206 -0
- package/node_modules/@codemirror/lang-javascript/LICENSE +21 -0
- package/node_modules/@codemirror/lang-javascript/README.md +125 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.cjs +526 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.d.cts +93 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.d.ts +93 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.js +513 -0
- package/node_modules/@codemirror/lang-javascript/package.json +45 -0
- package/node_modules/@codemirror/lang-json/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-json/CHANGELOG.md +59 -0
- package/node_modules/@codemirror/lang-json/LICENSE +21 -0
- package/node_modules/@codemirror/lang-json/README.md +56 -0
- package/node_modules/@codemirror/lang-json/dist/index.cjs +68 -0
- package/node_modules/@codemirror/lang-json/dist/index.d.cts +22 -0
- package/node_modules/@codemirror/lang-json/dist/index.d.ts +22 -0
- package/node_modules/@codemirror/lang-json/dist/index.js +64 -0
- package/node_modules/@codemirror/lang-json/package.json +39 -0
- package/node_modules/@codemirror/lang-markdown/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-markdown/CHANGELOG.md +246 -0
- package/node_modules/@codemirror/lang-markdown/LICENSE +21 -0
- package/node_modules/@codemirror/lang-markdown/README.md +162 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.cjs +501 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.d.cts +124 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.d.ts +124 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.js +492 -0
- package/node_modules/@codemirror/lang-markdown/package.json +44 -0
- package/node_modules/@codemirror/lang-python/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-python/CHANGELOG.md +174 -0
- package/node_modules/@codemirror/lang-python/LICENSE +21 -0
- package/node_modules/@codemirror/lang-python/README.md +61 -0
- package/node_modules/@codemirror/lang-python/dist/index.cjs +313 -0
- package/node_modules/@codemirror/lang-python/dist/index.d.cts +26 -0
- package/node_modules/@codemirror/lang-python/dist/index.d.ts +26 -0
- package/node_modules/@codemirror/lang-python/dist/index.js +308 -0
- package/node_modules/@codemirror/lang-python/package.json +42 -0
- package/node_modules/@codemirror/language/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/language/CHANGELOG.md +412 -0
- package/node_modules/@codemirror/language/LICENSE +21 -0
- package/node_modules/@codemirror/language/README.md +66 -0
- package/node_modules/@codemirror/language/dist/index.cjs +2742 -0
- package/node_modules/@codemirror/language/dist/index.d.cts +1220 -0
- package/node_modules/@codemirror/language/dist/index.d.ts +1220 -0
- package/node_modules/@codemirror/language/dist/index.js +2687 -0
- package/node_modules/@codemirror/language/package.json +44 -0
- package/node_modules/@codemirror/lint/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lint/CHANGELOG.md +318 -0
- package/node_modules/@codemirror/lint/LICENSE +21 -0
- package/node_modules/@codemirror/lint/README.md +18 -0
- package/node_modules/@codemirror/lint/dist/index.cjs +958 -0
- package/node_modules/@codemirror/lint/dist/index.d.cts +195 -0
- package/node_modules/@codemirror/lint/dist/index.d.ts +195 -0
- package/node_modules/@codemirror/lint/dist/index.js +945 -0
- package/node_modules/@codemirror/lint/package.json +40 -0
- package/node_modules/@codemirror/search/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/search/CHANGELOG.md +324 -0
- package/node_modules/@codemirror/search/LICENSE +21 -0
- package/node_modules/@codemirror/search/README.md +18 -0
- package/node_modules/@codemirror/search/dist/index.cjs +1237 -0
- package/node_modules/@codemirror/search/dist/index.d.cts +385 -0
- package/node_modules/@codemirror/search/dist/index.d.ts +385 -0
- package/node_modules/@codemirror/search/dist/index.js +1217 -0
- package/node_modules/@codemirror/search/package.json +40 -0
- package/node_modules/@codemirror/state/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/state/CHANGELOG.md +308 -0
- package/node_modules/@codemirror/state/LICENSE +21 -0
- package/node_modules/@codemirror/state/README.md +18 -0
- package/node_modules/@codemirror/state/dist/index.cjs +3922 -0
- package/node_modules/@codemirror/state/dist/index.d.cts +1713 -0
- package/node_modules/@codemirror/state/dist/index.d.ts +1713 -0
- package/node_modules/@codemirror/state/dist/index.js +3892 -0
- package/node_modules/@codemirror/state/package.json +38 -0
- package/node_modules/@codemirror/theme-one-dark/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/theme-one-dark/CHANGELOG.md +97 -0
- package/node_modules/@codemirror/theme-one-dark/LICENSE +21 -0
- package/node_modules/@codemirror/theme-one-dark/README.md +46 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.cjs +139 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.d.cts +39 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.d.ts +39 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.js +134 -0
- package/node_modules/@codemirror/theme-one-dark/package.json +41 -0
- package/node_modules/@codemirror/view/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/view/CHANGELOG.md +2284 -0
- package/node_modules/@codemirror/view/LICENSE +21 -0
- package/node_modules/@codemirror/view/README.md +37 -0
- package/node_modules/@codemirror/view/dist/index.cjs +11796 -0
- package/node_modules/@codemirror/view/dist/index.d.cts +2389 -0
- package/node_modules/@codemirror/view/dist/index.d.ts +2389 -0
- package/node_modules/@codemirror/view/dist/index.js +11745 -0
- package/node_modules/@codemirror/view/package.json +41 -0
- package/node_modules/@groove-dev/daemon/src/api.js +157 -2
- package/node_modules/@groove-dev/daemon/src/filewatcher.js +59 -0
- package/node_modules/@groove-dev/daemon/src/index.js +28 -1
- package/node_modules/@groove-dev/daemon/src/skills.js +20 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-Dxg9hdf3.js +103 -0
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/package.json +15 -2
- package/node_modules/@groove-dev/gui/src/App.jsx +3 -0
- package/node_modules/@groove-dev/gui/src/components/CodeEditor.jsx +143 -0
- package/node_modules/@groove-dev/gui/src/components/EditorTabs.jsx +83 -0
- package/node_modules/@groove-dev/gui/src/components/FileTree.jsx +193 -0
- package/node_modules/@groove-dev/gui/src/stores/groove.js +158 -1
- package/node_modules/@groove-dev/gui/src/views/FileEditor.jsx +142 -0
- package/node_modules/@groove-dev/gui/src/views/SkillsMarketplace.jsx +112 -1
- package/node_modules/@lezer/common/LICENSE +21 -0
- package/node_modules/@lezer/common/README.md +14 -0
- package/node_modules/@lezer/common/dist/index.cjs +2209 -0
- package/node_modules/@lezer/common/dist/index.d.cts +1174 -0
- package/node_modules/@lezer/common/dist/index.d.ts +1174 -0
- package/node_modules/@lezer/common/dist/index.js +2196 -0
- package/node_modules/@lezer/common/package.json +32 -0
- package/node_modules/@lezer/css/CHANGELOG.md +307 -0
- package/node_modules/@lezer/css/LICENSE +21 -0
- package/node_modules/@lezer/css/README.md +6 -0
- package/node_modules/@lezer/css/dist/index.cjs +151 -0
- package/node_modules/@lezer/css/dist/index.d.cts +3 -0
- package/node_modules/@lezer/css/dist/index.d.ts +3 -0
- package/node_modules/@lezer/css/dist/index.js +147 -0
- package/node_modules/@lezer/css/package.json +36 -0
- package/node_modules/@lezer/css/rollup.config.js +16 -0
- package/node_modules/@lezer/css/src/css.grammar +290 -0
- package/node_modules/@lezer/css/src/highlight.js +36 -0
- package/node_modules/@lezer/css/src/parser.js +31 -0
- package/node_modules/@lezer/css/src/parser.terms.js +63 -0
- package/node_modules/@lezer/css/src/tokens.js +75 -0
- package/node_modules/@lezer/css/test/declarations.txt +241 -0
- package/node_modules/@lezer/css/test/selector.txt +178 -0
- package/node_modules/@lezer/css/test/statements.txt +227 -0
- package/node_modules/@lezer/css/test/test-css.js +16 -0
- package/node_modules/@lezer/highlight/LICENSE +21 -0
- package/node_modules/@lezer/highlight/README.md +14 -0
- package/node_modules/@lezer/highlight/dist/index.cjs +936 -0
- package/node_modules/@lezer/highlight/dist/index.d.cts +623 -0
- package/node_modules/@lezer/highlight/dist/index.d.ts +623 -0
- package/node_modules/@lezer/highlight/dist/index.js +927 -0
- package/node_modules/@lezer/highlight/package.json +31 -0
- package/node_modules/@lezer/html/CHANGELOG.md +303 -0
- package/node_modules/@lezer/html/LICENSE +21 -0
- package/node_modules/@lezer/html/README.md +37 -0
- package/node_modules/@lezer/html/dist/index.cjs +354 -0
- package/node_modules/@lezer/html/dist/index.d.cts +14 -0
- package/node_modules/@lezer/html/dist/index.d.ts +14 -0
- package/node_modules/@lezer/html/dist/index.js +349 -0
- package/node_modules/@lezer/html/package.json +37 -0
- package/node_modules/@lezer/html/rollup.config.js +16 -0
- package/node_modules/@lezer/html/src/.tern-port +1 -0
- package/node_modules/@lezer/html/src/content.js +87 -0
- package/node_modules/@lezer/html/src/highlight.js +15 -0
- package/node_modules/@lezer/html/src/html.grammar +181 -0
- package/node_modules/@lezer/html/src/index.js +2 -0
- package/node_modules/@lezer/html/src/parser.js +27 -0
- package/node_modules/@lezer/html/src/parser.terms.js +53 -0
- package/node_modules/@lezer/html/src/tokens.js +199 -0
- package/node_modules/@lezer/html/test/mixed.txt +69 -0
- package/node_modules/@lezer/html/test/tags.txt +370 -0
- package/node_modules/@lezer/html/test/test-html.js +29 -0
- package/node_modules/@lezer/html/test/test-incremental.js +97 -0
- package/node_modules/@lezer/html/test/vue.txt +56 -0
- package/node_modules/@lezer/javascript/CHANGELOG.md +485 -0
- package/node_modules/@lezer/javascript/LICENSE +21 -0
- package/node_modules/@lezer/javascript/README.md +14 -0
- package/node_modules/@lezer/javascript/dist/index.cjs +196 -0
- package/node_modules/@lezer/javascript/dist/index.d.cts +3 -0
- package/node_modules/@lezer/javascript/dist/index.d.ts +3 -0
- package/node_modules/@lezer/javascript/dist/index.js +192 -0
- package/node_modules/@lezer/javascript/package.json +36 -0
- package/node_modules/@lezer/javascript/rollup.config.js +16 -0
- package/node_modules/@lezer/javascript/src/highlight.js +62 -0
- package/node_modules/@lezer/javascript/src/javascript.grammar +735 -0
- package/node_modules/@lezer/javascript/src/parser.js +33 -0
- package/node_modules/@lezer/javascript/src/parser.terms.js +177 -0
- package/node_modules/@lezer/javascript/src/tokens.js +87 -0
- package/node_modules/@lezer/javascript/test/decorator.txt +64 -0
- package/node_modules/@lezer/javascript/test/expression.txt +686 -0
- package/node_modules/@lezer/javascript/test/jsx.txt +79 -0
- package/node_modules/@lezer/javascript/test/semicolon.txt +77 -0
- package/node_modules/@lezer/javascript/test/statement.txt +404 -0
- package/node_modules/@lezer/javascript/test/test-javascript.js +17 -0
- package/node_modules/@lezer/javascript/test/typescript.txt +401 -0
- package/node_modules/@lezer/json/CHANGELOG.md +79 -0
- package/node_modules/@lezer/json/LICENSE +21 -0
- package/node_modules/@lezer/json/README.md +7 -0
- package/node_modules/@lezer/json/dist/index.cjs +41 -0
- package/node_modules/@lezer/json/dist/index.d.cts +3 -0
- package/node_modules/@lezer/json/dist/index.d.ts +3 -0
- package/node_modules/@lezer/json/dist/index.js +37 -0
- package/node_modules/@lezer/json/package.json +36 -0
- package/node_modules/@lezer/json/rollup.config.js +15 -0
- package/node_modules/@lezer/json/src/highlight.js +12 -0
- package/node_modules/@lezer/json/src/json.grammar +38 -0
- package/node_modules/@lezer/json/src/parser.js +23 -0
- package/node_modules/@lezer/json/src/parser.terms.js +12 -0
- package/node_modules/@lezer/json/test/arrays.txt +34 -0
- package/node_modules/@lezer/json/test/literals.txt +23 -0
- package/node_modules/@lezer/json/test/numbers.txt +87 -0
- package/node_modules/@lezer/json/test/objects.txt +34 -0
- package/node_modules/@lezer/json/test/strings.txt +50 -0
- package/node_modules/@lezer/json/test/test-json.js +17 -0
- package/node_modules/@lezer/lr/LICENSE +21 -0
- package/node_modules/@lezer/lr/README.md +25 -0
- package/node_modules/@lezer/lr/dist/constants.d.ts +45 -0
- package/node_modules/@lezer/lr/dist/constants.js +5 -0
- package/node_modules/@lezer/lr/dist/index.cjs +1891 -0
- package/node_modules/@lezer/lr/dist/index.d.cts +303 -0
- package/node_modules/@lezer/lr/dist/index.d.ts +303 -0
- package/node_modules/@lezer/lr/dist/index.js +1884 -0
- package/node_modules/@lezer/lr/package.json +32 -0
- package/node_modules/@lezer/markdown/CHANGELOG.md +279 -0
- package/node_modules/@lezer/markdown/LICENSE +21 -0
- package/node_modules/@lezer/markdown/README.md +725 -0
- package/node_modules/@lezer/markdown/bin/build-readme.cjs +39 -0
- package/node_modules/@lezer/markdown/build.js +16 -0
- package/node_modules/@lezer/markdown/dist/index.cjs +2352 -0
- package/node_modules/@lezer/markdown/dist/index.d.cts +600 -0
- package/node_modules/@lezer/markdown/dist/index.d.ts +600 -0
- package/node_modules/@lezer/markdown/dist/index.js +2335 -0
- package/node_modules/@lezer/markdown/package.json +37 -0
- package/node_modules/@lezer/markdown/src/README.md +83 -0
- package/node_modules/@lezer/markdown/src/extension.ts +301 -0
- package/node_modules/@lezer/markdown/src/index.ts +5 -0
- package/node_modules/@lezer/markdown/src/markdown.ts +1961 -0
- package/node_modules/@lezer/markdown/src/nest.ts +46 -0
- package/node_modules/@lezer/markdown/test/compare-tree.ts +14 -0
- package/node_modules/@lezer/markdown/test/spec.ts +79 -0
- package/node_modules/@lezer/markdown/test/test-extension.ts +269 -0
- package/node_modules/@lezer/markdown/test/test-incremental.ts +265 -0
- package/node_modules/@lezer/markdown/test/test-markdown.ts +3574 -0
- package/node_modules/@lezer/markdown/test/test-nesting.ts +86 -0
- package/node_modules/@lezer/markdown/test/tsconfig.json +12 -0
- package/node_modules/@lezer/markdown/tsconfig.json +14 -0
- package/node_modules/@lezer/python/CHANGELOG.md +243 -0
- package/node_modules/@lezer/python/LICENSE +21 -0
- package/node_modules/@lezer/python/README.md +6 -0
- package/node_modules/@lezer/python/dist/index.cjs +330 -0
- package/node_modules/@lezer/python/dist/index.d.cts +3 -0
- package/node_modules/@lezer/python/dist/index.d.ts +3 -0
- package/node_modules/@lezer/python/dist/index.js +326 -0
- package/node_modules/@lezer/python/package.json +36 -0
- package/node_modules/@lezer/python/rollup.config.js +16 -0
- package/node_modules/@lezer/python/src/highlight.js +35 -0
- package/node_modules/@lezer/python/src/python.grammar +381 -0
- package/node_modules/@lezer/python/src/tokens.js +224 -0
- package/node_modules/@lezer/python/test/expression.txt +231 -0
- package/node_modules/@lezer/python/test/statement.txt +442 -0
- package/node_modules/@lezer/python/test/test-incremental.js +33 -0
- package/node_modules/@lezer/python/test/test-python.js +17 -0
- package/node_modules/@marijn/find-cluster-break/LICENSE +21 -0
- package/node_modules/@marijn/find-cluster-break/README.md +28 -0
- package/node_modules/@marijn/find-cluster-break/dist/index.cjs +85 -0
- package/node_modules/@marijn/find-cluster-break/dist/index.d.cts +15 -0
- package/node_modules/@marijn/find-cluster-break/package.json +35 -0
- package/node_modules/@marijn/find-cluster-break/rollup.config.js +7 -0
- package/node_modules/@marijn/find-cluster-break/src/index.d.ts +15 -0
- package/node_modules/@marijn/find-cluster-break/src/index.js +87 -0
- package/node_modules/@marijn/find-cluster-break/test/test-cluster.js +30 -0
- package/node_modules/crelt/LICENSE +19 -0
- package/node_modules/crelt/README.md +23 -0
- package/node_modules/crelt/dist/index.cjs +31 -0
- package/node_modules/crelt/dist/index.d.cts +4 -0
- package/node_modules/crelt/index.d.ts +4 -0
- package/node_modules/crelt/index.js +28 -0
- package/node_modules/crelt/package.json +35 -0
- package/node_modules/crelt/rollup.config.js +13 -0
- package/node_modules/style-mod/LICENSE +19 -0
- package/node_modules/style-mod/README.md +98 -0
- package/node_modules/style-mod/dist/style-mod.cjs +165 -0
- package/node_modules/style-mod/dist/style-mod.d.cts +16 -0
- package/node_modules/style-mod/package.json +39 -0
- package/node_modules/style-mod/src/README.md +34 -0
- package/node_modules/style-mod/src/style-mod.d.ts +16 -0
- package/node_modules/style-mod/src/style-mod.js +172 -0
- package/node_modules/style-mod/test/test-style-mod.js +104 -0
- package/node_modules/w3c-keyname/.tern-port +1 -0
- package/node_modules/w3c-keyname/LICENSE +19 -0
- package/node_modules/w3c-keyname/README.md +18 -0
- package/node_modules/w3c-keyname/index.cjs +127 -0
- package/node_modules/w3c-keyname/index.d.cts +5 -0
- package/node_modules/w3c-keyname/index.d.ts +5 -0
- package/node_modules/w3c-keyname/index.js +119 -0
- package/node_modules/w3c-keyname/package.json +37 -0
- package/package.json +1 -1
- package/packages/daemon/src/api.js +157 -2
- package/packages/daemon/src/filewatcher.js +59 -0
- package/packages/daemon/src/index.js +28 -1
- package/packages/daemon/src/skills.js +20 -0
- package/packages/gui/dist/assets/index-Dxg9hdf3.js +103 -0
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/package.json +15 -2
- package/packages/gui/src/App.jsx +3 -0
- package/packages/gui/src/components/CodeEditor.jsx +143 -0
- package/packages/gui/src/components/EditorTabs.jsx +83 -0
- package/packages/gui/src/components/FileTree.jsx +193 -0
- package/packages/gui/src/stores/groove.js +158 -1
- package/packages/gui/src/views/FileEditor.jsx +142 -0
- package/packages/gui/src/views/SkillsMarketplace.jsx +112 -1
- package/node_modules/@groove-dev/gui/dist/assets/index-CNCSwHwH.js +0 -74
- package/packages/gui/dist/assets/index-CNCSwHwH.js +0 -74
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(r){if(r.ep)return;r.ep=!0;const l=n(r);fetch(r.href,l)}})();function $T(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ng={exports:{}},dc={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var kv;function Rz(){if(kv)return dc;kv=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,l){var a=null;if(l!==void 0&&(a=""+l),r.key!==void 0&&(a=""+r.key),"key"in r){l={};for(var c in r)c!=="key"&&(l[c]=r[c])}else l=r;return r=l.ref,{$$typeof:t,type:i,key:a,ref:r!==void 0?r:null,props:l}}return dc.Fragment=e,dc.jsx=n,dc.jsxs=n,dc}var Tv;function zz(){return Tv||(Tv=1,Ng.exports=Rz()),Ng.exports}var S=zz(),Vg={exports:{}},je={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var $v;function Ez(){if($v)return je;$v=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function y(z){return z===null||typeof z!="object"?null:(z=m&&z[m]||z["@@iterator"],typeof z=="function"?z:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,k={};function Q(z,Z,te){this.props=z,this.context=Z,this.refs=k,this.updater=te||b}Q.prototype.isReactComponent={},Q.prototype.setState=function(z,Z){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,Z,"setState")},Q.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function P(){}P.prototype=Q.prototype;function T(z,Z,te){this.props=z,this.context=Z,this.refs=k,this.updater=te||b}var $=T.prototype=new P;$.constructor=T,v($,Q.prototype),$.isPureReactComponent=!0;var _=Array.isArray;function A(){}var E={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function G(z,Z,te){var re=te.ref;return{$$typeof:t,type:z,key:Z,ref:re!==void 0?re:null,props:te}}function ne(z,Z){return G(z.type,Z,z.props)}function V(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function Y(z){var Z={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(te){return Z[te]})}var H=/\/+/g;function X(z,Z){return typeof z=="object"&&z!==null&&z.key!=null?Y(""+z.key):Z.toString(36)}function W(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(A,A):(z.status="pending",z.then(function(Z){z.status==="pending"&&(z.status="fulfilled",z.value=Z)},function(Z){z.status==="pending"&&(z.status="rejected",z.reason=Z)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function R(z,Z,te,re,ue){var he=typeof z;(he==="undefined"||he==="boolean")&&(z=null);var Oe=!1;if(z===null)Oe=!0;else switch(he){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(z.$$typeof){case t:case e:Oe=!0;break;case O:return Oe=z._init,R(Oe(z._payload),Z,te,re,ue)}}if(Oe)return ue=ue(z),Oe=re===""?"."+X(z,0):re,_(ue)?(te="",Oe!=null&&(te=Oe.replace(H,"$&/")+"/"),R(ue,Z,te,"",function(ze){return ze})):ue!=null&&(V(ue)&&(ue=ne(ue,te+(ue.key==null||z&&z.key===ue.key?"":(""+ue.key).replace(H,"$&/")+"/")+Oe)),Z.push(ue)),1;Oe=0;var fe=re===""?".":re+":";if(_(z))for(var ge=0;ge<z.length;ge++)re=z[ge],he=fe+X(re,ge),Oe+=R(re,Z,te,he,ue);else if(ge=y(z),typeof ge=="function")for(z=ge.call(z),ge=0;!(re=z.next()).done;)re=re.value,he=fe+X(re,ge++),Oe+=R(re,Z,te,he,ue);else if(he==="object"){if(typeof z.then=="function")return R(W(z),Z,te,re,ue);throw Z=String(z),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function q(z,Z,te){if(z==null)return z;var re=[],ue=0;return R(z,re,"","",function(he){return Z.call(te,he,ue++)}),re}function B(z){if(z._status===-1){var Z=z._result;Z=Z(),Z.then(function(te){(z._status===0||z._status===-1)&&(z._status=1,z._result=te)},function(te){(z._status===0||z._status===-1)&&(z._status=2,z._result=te)}),z._status===-1&&(z._status=0,z._result=Z)}if(z._status===1)return z._result.default;throw z._result}var M=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},F={map:q,forEach:function(z,Z,te){q(z,function(){Z.apply(this,arguments)},te)},count:function(z){var Z=0;return q(z,function(){Z++}),Z},toArray:function(z){return q(z,function(Z){return Z})||[]},only:function(z){if(!V(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return je.Activity=p,je.Children=F,je.Component=Q,je.Fragment=n,je.Profiler=r,je.PureComponent=T,je.StrictMode=i,je.Suspense=f,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,je.__COMPILER_RUNTIME={__proto__:null,c:function(z){return E.H.useMemoCache(z)}},je.cache=function(z){return function(){return z.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(z,Z,te){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var re=v({},z.props),ue=z.key;if(Z!=null)for(he in Z.key!==void 0&&(ue=""+Z.key),Z)!N.call(Z,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&Z.ref===void 0||(re[he]=Z[he]);var he=arguments.length-2;if(he===1)re.children=te;else if(1<he){for(var Oe=Array(he),fe=0;fe<he;fe++)Oe[fe]=arguments[fe+2];re.children=Oe}return G(z.type,ue,re)},je.createContext=function(z){return z={$$typeof:a,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:l,_context:z},z},je.createElement=function(z,Z,te){var re,ue={},he=null;if(Z!=null)for(re in Z.key!==void 0&&(he=""+Z.key),Z)N.call(Z,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ue[re]=Z[re]);var Oe=arguments.length-2;if(Oe===1)ue.children=te;else if(1<Oe){for(var fe=Array(Oe),ge=0;ge<Oe;ge++)fe[ge]=arguments[ge+2];ue.children=fe}if(z&&z.defaultProps)for(re in Oe=z.defaultProps,Oe)ue[re]===void 0&&(ue[re]=Oe[re]);return G(z,he,ue)},je.createRef=function(){return{current:null}},je.forwardRef=function(z){return{$$typeof:c,render:z}},je.isValidElement=V,je.lazy=function(z){return{$$typeof:O,_payload:{_status:-1,_result:z},_init:B}},je.memo=function(z,Z){return{$$typeof:h,type:z,compare:Z===void 0?null:Z}},je.startTransition=function(z){var Z=E.T,te={};E.T=te;try{var re=z(),ue=E.S;ue!==null&&ue(te,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(A,M)}catch(he){M(he)}finally{Z!==null&&te.types!==null&&(Z.types=te.types),E.T=Z}},je.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},je.use=function(z){return E.H.use(z)},je.useActionState=function(z,Z,te){return E.H.useActionState(z,Z,te)},je.useCallback=function(z,Z){return E.H.useCallback(z,Z)},je.useContext=function(z){return E.H.useContext(z)},je.useDebugValue=function(){},je.useDeferredValue=function(z,Z){return E.H.useDeferredValue(z,Z)},je.useEffect=function(z,Z){return E.H.useEffect(z,Z)},je.useEffectEvent=function(z){return E.H.useEffectEvent(z)},je.useId=function(){return E.H.useId()},je.useImperativeHandle=function(z,Z,te){return E.H.useImperativeHandle(z,Z,te)},je.useInsertionEffect=function(z,Z){return E.H.useInsertionEffect(z,Z)},je.useLayoutEffect=function(z,Z){return E.H.useLayoutEffect(z,Z)},je.useMemo=function(z,Z){return E.H.useMemo(z,Z)},je.useOptimistic=function(z,Z){return E.H.useOptimistic(z,Z)},je.useReducer=function(z,Z,te){return E.H.useReducer(z,Z,te)},je.useRef=function(z){return E.H.useRef(z)},je.useState=function(z){return E.H.useState(z)},je.useSyncExternalStore=function(z,Z,te){return E.H.useSyncExternalStore(z,Z,te)},je.useTransition=function(){return E.H.useTransition()},je.version="19.2.4",je}var Pv;function mu(){return Pv||(Pv=1,Vg.exports=Ez()),Vg.exports}var D=mu();const Pc=$T(D);var Yg={exports:{}},Oc={},Wg={exports:{}},Ug={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Cv;function _z(){return Cv||(Cv=1,(function(t){function e(R,q){var B=R.length;R.push(q);e:for(;0<B;){var M=B-1>>>1,F=R[M];if(0<r(F,q))R[M]=q,R[B]=F,B=M;else break e}}function n(R){return R.length===0?null:R[0]}function i(R){if(R.length===0)return null;var q=R[0],B=R.pop();if(B!==q){R[0]=B;e:for(var M=0,F=R.length,z=F>>>1;M<z;){var Z=2*(M+1)-1,te=R[Z],re=Z+1,ue=R[re];if(0>r(te,B))re<F&&0>r(ue,te)?(R[M]=ue,R[re]=B,M=re):(R[M]=te,R[Z]=B,M=Z);else if(re<F&&0>r(ue,B))R[M]=ue,R[re]=B,M=re;else break e}}return q}function r(R,q){var B=R.sortIndex-q.sortIndex;return B!==0?B:R.id-q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var f=[],h=[],O=1,p=null,m=3,y=!1,b=!1,v=!1,k=!1,Q=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function $(R){for(var q=n(h);q!==null;){if(q.callback===null)i(h);else if(q.startTime<=R)i(h),q.sortIndex=q.expirationTime,e(f,q);else break;q=n(h)}}function _(R){if(v=!1,$(R),!b)if(n(f)!==null)b=!0,A||(A=!0,Y());else{var q=n(h);q!==null&&W(_,q.startTime-R)}}var A=!1,E=-1,N=5,G=-1;function ne(){return k?!0:!(t.unstable_now()-G<N)}function V(){if(k=!1,A){var R=t.unstable_now();G=R;var q=!0;try{e:{b=!1,v&&(v=!1,P(E),E=-1),y=!0;var B=m;try{t:{for($(R),p=n(f);p!==null&&!(p.expirationTime>R&&ne());){var M=p.callback;if(typeof M=="function"){p.callback=null,m=p.priorityLevel;var F=M(p.expirationTime<=R);if(R=t.unstable_now(),typeof F=="function"){p.callback=F,$(R),q=!0;break t}p===n(f)&&i(f),$(R)}else i(f);p=n(f)}if(p!==null)q=!0;else{var z=n(h);z!==null&&W(_,z.startTime-R),q=!1}}break e}finally{p=null,m=B,y=!1}q=void 0}}finally{q?Y():A=!1}}}var Y;if(typeof T=="function")Y=function(){T(V)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,X=H.port2;H.port1.onmessage=V,Y=function(){X.postMessage(null)}}else Y=function(){Q(V,0)};function W(R,q){E=Q(function(){R(t.unstable_now())},q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(R){R.callback=null},t.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<R?Math.floor(1e3/R):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function(R){switch(m){case 1:case 2:case 3:var q=3;break;default:q=m}var B=m;m=q;try{return R()}finally{m=B}},t.unstable_requestPaint=function(){k=!0},t.unstable_runWithPriority=function(R,q){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var B=m;m=R;try{return q()}finally{m=B}},t.unstable_scheduleCallback=function(R,q,B){var M=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?M+B:M):B=M,R){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=B+F,R={id:O++,callback:q,priorityLevel:R,startTime:B,expirationTime:F,sortIndex:-1},B>M?(R.sortIndex=B,e(h,R),n(f)===null&&R===n(h)&&(v?(P(E),E=-1):v=!0,W(_,B-M))):(R.sortIndex=F,e(f,R),b||y||(b=!0,A||(A=!0,Y()))),R},t.unstable_shouldYield=ne,t.unstable_wrapCallback=function(R){var q=m;return function(){var B=m;m=q;try{return R.apply(this,arguments)}finally{m=B}}}})(Ug)),Ug}var Av;function jz(){return Av||(Av=1,Wg.exports=_z()),Wg.exports}var Gg={exports:{}},un={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Rv;function Mz(){if(Rv)return un;Rv=1;var t=mu();function e(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var O=2;O<arguments.length;O++)h+="&args[]="+encodeURIComponent(arguments[O])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");function l(f,h,O){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:p==null?null:""+p,children:f,containerInfo:h,implementation:O}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return un.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,un.createPortal=function(f,h){var O=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return l(f,h,null,O)},un.flushSync=function(f){var h=a.T,O=i.p;try{if(a.T=null,i.p=2,f)return f()}finally{a.T=h,i.p=O,i.d.f()}},un.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(f,h))},un.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},un.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var O=h.as,p=c(O,h.crossOrigin),m=typeof h.integrity=="string"?h.integrity:void 0,y=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;O==="style"?i.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:y}):O==="script"&&i.d.X(f,{crossOrigin:p,integrity:m,fetchPriority:y,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},un.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var O=c(h.as,h.crossOrigin);i.d.M(f,{crossOrigin:O,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(f)},un.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var O=h.as,p=c(O,h.crossOrigin);i.d.L(f,O,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},un.preloadModule=function(f,h){if(typeof f=="string")if(h){var O=c(h.as,h.crossOrigin);i.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:O,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(f)},un.requestFormReset=function(f){i.d.r(f)},un.unstable_batchedUpdates=function(f,h){return f(h)},un.useFormState=function(f,h,O){return a.H.useFormState(f,h,O)},un.useFormStatus=function(){return a.H.useHostTransitionStatus()},un.version="19.2.4",un}var zv;function PT(){if(zv)return Gg.exports;zv=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Gg.exports=Mz(),Gg.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Ev;function Xz(){if(Ev)return Oc;Ev=1;var t=jz(),e=mu(),n=PT();function i(s){var o="https://react.dev/errors/"+s;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+s+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function l(s){var o=s,u=s;if(s.alternate)for(;o.return;)o=o.return;else{s=o;do o=s,(o.flags&4098)!==0&&(u=o.return),s=o.return;while(s)}return o.tag===3?u:null}function a(s){if(s.tag===13){var o=s.memoizedState;if(o===null&&(s=s.alternate,s!==null&&(o=s.memoizedState)),o!==null)return o.dehydrated}return null}function c(s){if(s.tag===31){var o=s.memoizedState;if(o===null&&(s=s.alternate,s!==null&&(o=s.memoizedState)),o!==null)return o.dehydrated}return null}function f(s){if(l(s)!==s)throw Error(i(188))}function h(s){var o=s.alternate;if(!o){if(o=l(s),o===null)throw Error(i(188));return o!==s?null:s}for(var u=s,d=o;;){var g=u.return;if(g===null)break;var x=g.alternate;if(x===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===x.child){for(x=g.child;x;){if(x===u)return f(g),s;if(x===d)return f(g),o;x=x.sibling}throw Error(i(188))}if(u.return!==d.return)u=g,d=x;else{for(var w=!1,C=g.child;C;){if(C===u){w=!0,u=g,d=x;break}if(C===d){w=!0,d=g,u=x;break}C=C.sibling}if(!w){for(C=x.child;C;){if(C===u){w=!0,u=x,d=g;break}if(C===d){w=!0,d=x,u=g;break}C=C.sibling}if(!w)throw Error(i(189))}}if(u.alternate!==d)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?s:o}function O(s){var o=s.tag;if(o===5||o===26||o===27||o===6)return s;for(s=s.child;s!==null;){if(o=O(s),o!==null)return o;s=s.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),T=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function Y(s){return s===null||typeof s!="object"?null:(s=V&&s[V]||s["@@iterator"],typeof s=="function"?s:null)}var H=Symbol.for("react.client.reference");function X(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===H?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case Q:return"Profiler";case k:return"StrictMode";case _:return"Suspense";case A:return"SuspenseList";case G:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case T:return s.displayName||"Context";case P:return(s._context.displayName||"Context")+".Consumer";case $:var o=s.render;return s=s.displayName,s||(s=o.displayName||o.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case E:return o=s.displayName||null,o!==null?o:X(s.type)||"Memo";case N:o=s._payload,s=s._init;try{return X(s(o))}catch{}}return null}var W=Array.isArray,R=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},M=[],F=-1;function z(s){return{current:s}}function Z(s){0>F||(s.current=M[F],M[F]=null,F--)}function te(s,o){F++,M[F]=s.current,s.current=o}var re=z(null),ue=z(null),he=z(null),Oe=z(null);function fe(s,o){switch(te(he,o),te(ue,s),te(re,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?Gb(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=Gb(o),s=Hb(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}Z(re),te(re,s)}function ge(){Z(re),Z(ue),Z(he)}function ze(s){s.memoizedState!==null&&te(Oe,s);var o=re.current,u=Hb(o,s.type);o!==u&&(te(ue,s),te(re,u))}function Re(s){ue.current===s&&(Z(re),Z(ue)),Oe.current===s&&(Z(Oe),cc._currentValue=B)}var ke,Te;function Ze(s){if(ke===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ke=o&&o[1]||"",Te=-1<u.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ke+s+Te}var tt=!1;function se(s,o){if(!s||tt)return"";tt=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(o){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ie){var ee=ie}Reflect.construct(s,[],ce)}else{try{ce.call()}catch(ie){ee=ie}s.call(ce.prototype)}}else{try{throw Error()}catch(ie){ee=ie}(ce=s())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ie){if(ie&&ee&&typeof ie.stack=="string")return[ie.stack,ee.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=d.DetermineComponentFrameRoot(),w=x[0],C=x[1];if(w&&C){var L=w.split(`
|
|
44
|
+
`),J=C.split(`
|
|
45
|
+
`);for(g=d=0;d<L.length&&!L[d].includes("DetermineComponentFrameRoot");)d++;for(;g<J.length&&!J[g].includes("DetermineComponentFrameRoot");)g++;if(d===L.length||g===J.length)for(d=L.length-1,g=J.length-1;1<=d&&0<=g&&L[d]!==J[g];)g--;for(;1<=d&&0<=g;d--,g--)if(L[d]!==J[g]){if(d!==1||g!==1)do if(d--,g--,0>g||L[d]!==J[g]){var le=`
|
|
46
|
+
`+L[d].replace(" at new "," at ");return s.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",s.displayName)),le}while(1<=d&&0<=g);break}}}finally{tt=!1,Error.prepareStackTrace=u}return(u=s?s.displayName||s.name:"")?Ze(u):""}function qe(s,o){switch(s.tag){case 26:case 27:case 5:return Ze(s.type);case 16:return Ze("Lazy");case 13:return s.child!==o&&o!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return se(s.type,!1);case 11:return se(s.type.render,!1);case 1:return se(s.type,!0);case 31:return Ze("Activity");default:return""}}function at(s){try{var o="",u=null;do o+=qe(s,u),u=s,s=s.return;while(s);return o}catch(d){return`
|
|
47
|
+
Error generating stack: `+d.message+`
|
|
48
|
+
`+d.stack}}var Yt=Object.prototype.hasOwnProperty,an=t.unstable_scheduleCallback,on=t.unstable_cancelCallback,Bs=t.unstable_shouldYield,Ns=t.unstable_requestPaint,It=t.unstable_now,Ll=t.unstable_getCurrentPriorityLevel,er=t.unstable_ImmediatePriority,Dr=t.unstable_UserBlockingPriority,Vs=t.unstable_NormalPriority,TO=t.unstable_LowPriority,Bl=t.unstable_IdlePriority,$O=t.log,PO=t.unstable_setDisableYieldValue,Ys=null,pn=null;function Ri(s){if(typeof $O=="function"&&PO(s),pn&&typeof pn.setStrictMode=="function")try{pn.setStrictMode(Ys,s)}catch{}}var gn=Math.clz32?Math.clz32:RO,CO=Math.log,AO=Math.LN2;function RO(s){return s>>>=0,s===0?32:31-(CO(s)/AO|0)|0}var Nl=256,Vl=262144,Yl=4194304;function tr(s){var o=s&42;if(o!==0)return o;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Wl(s,o,u){var d=s.pendingLanes;if(d===0)return 0;var g=0,x=s.suspendedLanes,w=s.pingedLanes;s=s.warmLanes;var C=d&134217727;return C!==0?(d=C&~x,d!==0?g=tr(d):(w&=C,w!==0?g=tr(w):u||(u=C&~s,u!==0&&(g=tr(u))))):(C=d&~x,C!==0?g=tr(C):w!==0?g=tr(w):u||(u=d&~s,u!==0&&(g=tr(u)))),g===0?0:o!==0&&o!==g&&(o&x)===0&&(x=g&-g,u=o&-o,x>=u||x===32&&(u&4194048)!==0)?o:g}function Ws(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function zO(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _u(){var s=Yl;return Yl<<=1,(Yl&62914560)===0&&(Yl=4194304),s}function So(s){for(var o=[],u=0;31>u;u++)o.push(s);return o}function Us(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function EO(s,o,u,d,g,x){var w=s.pendingLanes;s.pendingLanes=u,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=u,s.entangledLanes&=u,s.errorRecoveryDisabledLanes&=u,s.shellSuspendCounter=0;var C=s.entanglements,L=s.expirationTimes,J=s.hiddenUpdates;for(u=w&~u;0<u;){var le=31-gn(u),ce=1<<le;C[le]=0,L[le]=-1;var ee=J[le];if(ee!==null)for(J[le]=null,le=0;le<ee.length;le++){var ie=ee[le];ie!==null&&(ie.lane&=-536870913)}u&=~ce}d!==0&&ju(s,d,0),x!==0&&g===0&&s.tag!==0&&(s.suspendedLanes|=x&~(w&~o))}function ju(s,o,u){s.pendingLanes|=o,s.suspendedLanes&=~o;var d=31-gn(o);s.entangledLanes|=o,s.entanglements[d]=s.entanglements[d]|1073741824|u&261930}function Mu(s,o){var u=s.entangledLanes|=o;for(s=s.entanglements;u;){var d=31-gn(u),g=1<<d;g&o|s[d]&o&&(s[d]|=o),u&=~g}}function Xu(s,o){var u=o&-o;return u=(u&42)!==0?1:bo(u),(u&(s.suspendedLanes|o))!==0?0:u}function bo(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function vo(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Zu(){var s=q.p;return s!==0?s:(s=window.event,s===void 0?32:yv(s.type))}function qu(s,o){var u=q.p;try{return q.p=s,o()}finally{q.p=u}}var zi=Math.random().toString(36).slice(2),Dt="__reactFiber$"+zi,cn="__reactProps$"+zi,nr="__reactContainer$"+zi,Ul="__reactEvents$"+zi,Du="__reactListeners$"+zi,_O="__reactHandles$"+zi,Lu="__reactResources$"+zi,Gs="__reactMarker$"+zi;function Qo(s){delete s[Dt],delete s[cn],delete s[Ul],delete s[Du],delete s[_O]}function Lr(s){var o=s[Dt];if(o)return o;for(var u=s.parentNode;u;){if(o=u[nr]||u[Dt]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(s=nv(s);s!==null;){if(u=s[Dt])return u;s=nv(s)}return o}s=u,u=s.parentNode}return null}function Br(s){if(s=s[Dt]||s[nr]){var o=s.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return s}return null}function Nr(s){var o=s.tag;if(o===5||o===26||o===27||o===6)return s.stateNode;throw Error(i(33))}function Vr(s){var o=s[Lu];return o||(o=s[Lu]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function zt(s){s[Gs]=!0}var Bu=new Set,Nu={};function ir(s,o){Yr(s,o),Yr(s+"Capture",o)}function Yr(s,o){for(Nu[s]=o,s=0;s<o.length;s++)Bu.add(o[s])}var jO=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),wo={},Vu={};function MO(s){return Yt.call(Vu,s)?!0:Yt.call(wo,s)?!1:jO.test(s)?Vu[s]=!0:(wo[s]=!0,!1)}function Gl(s,o,u){if(MO(o))if(u===null)s.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":s.removeAttribute(o);return;case"boolean":var d=o.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){s.removeAttribute(o);return}}s.setAttribute(o,""+u)}}function Hl(s,o,u){if(u===null)s.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(o);return}s.setAttribute(o,""+u)}}function pi(s,o,u,d){if(d===null)s.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(u);return}s.setAttributeNS(o,u,""+d)}}function vn(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Yu(s){var o=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function XO(s,o,u){var d=Object.getOwnPropertyDescriptor(s.constructor.prototype,o);if(!s.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,x=d.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return g.call(this)},set:function(w){u=""+w,x.call(this,w)}}),Object.defineProperty(s,o,{enumerable:d.enumerable}),{getValue:function(){return u},setValue:function(w){u=""+w},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}function Wr(s){if(!s._valueTracker){var o=Yu(s)?"checked":"value";s._valueTracker=XO(s,o,""+s[o])}}function Wu(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var u=o.getValue(),d="";return s&&(d=Yu(s)?s.checked?"true":"false":s.value),s=d,s!==u?(o.setValue(s),!0):!1}function Hs(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var ZO=/[\n"\\]/g;function Qn(s){return s.replace(ZO,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Is(s,o,u,d,g,x,w,C){s.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?s.type=w:s.removeAttribute("type"),o!=null?w==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+vn(o)):s.value!==""+vn(o)&&(s.value=""+vn(o)):w!=="submit"&&w!=="reset"||s.removeAttribute("value"),o!=null?ko(s,w,vn(o)):u!=null?ko(s,w,vn(u)):d!=null&&s.removeAttribute("value"),g==null&&x!=null&&(s.defaultChecked=!!x),g!=null&&(s.checked=g&&typeof g!="function"&&typeof g!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?s.name=""+vn(C):s.removeAttribute("name")}function Uu(s,o,u,d,g,x,w,C){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(s.type=x),o!=null||u!=null){if(!(x!=="submit"&&x!=="reset"||o!=null)){Wr(s);return}u=u!=null?""+vn(u):"",o=o!=null?""+vn(o):u,C||o===s.value||(s.value=o),s.defaultValue=o}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,s.checked=C?s.checked:!!d,s.defaultChecked=!!d,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.name=w),Wr(s)}function ko(s,o,u){o==="number"&&Hs(s.ownerDocument)===s||s.defaultValue===""+u||(s.defaultValue=""+u)}function rr(s,o,u,d){if(s=s.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<s.length;u++)g=o.hasOwnProperty("$"+s[u].value),s[u].selected!==g&&(s[u].selected=g),g&&d&&(s[u].defaultSelected=!0)}else{for(u=""+vn(u),o=null,g=0;g<s.length;g++){if(s[g].value===u){s[g].selected=!0,d&&(s[g].defaultSelected=!0);return}o!==null||s[g].disabled||(o=s[g])}o!==null&&(o.selected=!0)}}function N1(s,o,u){if(o!=null&&(o=""+vn(o),o!==s.value&&(s.value=o),u==null)){s.defaultValue!==o&&(s.defaultValue=o);return}s.defaultValue=u!=null?""+vn(u):""}function V1(s,o,u,d){if(o==null){if(d!=null){if(u!=null)throw Error(i(92));if(W(d)){if(1<d.length)throw Error(i(93));d=d[0]}u=d}u==null&&(u=""),o=u}u=vn(o),s.defaultValue=u,d=s.textContent,d===u&&d!==""&&d!==null&&(s.value=d),Wr(s)}function Il(s,o){if(o){var u=s.firstChild;if(u&&u===s.lastChild&&u.nodeType===3){u.nodeValue=o;return}}s.textContent=o}var T5=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Y1(s,o,u){var d=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?d?s.setProperty(o,""):o==="float"?s.cssFloat="":s[o]="":d?s.setProperty(o,u):typeof u!="number"||u===0||T5.has(o)?o==="float"?s.cssFloat=u:s[o]=(""+u).trim():s[o]=u+"px"}function W1(s,o,u){if(o!=null&&typeof o!="object")throw Error(i(62));if(s=s.style,u!=null){for(var d in u)!u.hasOwnProperty(d)||o!=null&&o.hasOwnProperty(d)||(d.indexOf("--")===0?s.setProperty(d,""):d==="float"?s.cssFloat="":s[d]="");for(var g in o)d=o[g],o.hasOwnProperty(g)&&u[g]!==d&&Y1(s,g,d)}else for(var x in o)o.hasOwnProperty(x)&&Y1(s,x,o[x])}function qO(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $5=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),P5=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gu(s){return P5.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function sr(){}var DO=null;function LO(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Fl=null,Kl=null;function U1(s){var o=Br(s);if(o&&(s=o.stateNode)){var u=s[cn]||null;e:switch(s=o.stateNode,o.type){case"input":if(Is(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=s;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Qn(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var d=u[o];if(d!==s&&d.form===s.form){var g=d[cn]||null;if(!g)throw Error(i(90));Is(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(o=0;o<u.length;o++)d=u[o],d.form===s.form&&Wu(d)}break e;case"textarea":N1(s,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&rr(s,!!u.multiple,o,!1)}}}var BO=!1;function G1(s,o,u){if(BO)return s(o,u);BO=!0;try{var d=s(o);return d}finally{if(BO=!1,(Fl!==null||Kl!==null)&&(Mf(),Fl&&(o=Fl,s=Kl,Kl=Fl=null,U1(o),s)))for(o=0;o<s.length;o++)U1(s[o])}}function To(s,o){var u=s.stateNode;if(u===null)return null;var d=u[cn]||null;if(d===null)return null;u=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(s=s.type,d=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!d;break e;default:s=!1}if(s)return null;if(u&&typeof u!="function")throw Error(i(231,o,typeof u));return u}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),NO=!1;if(lr)try{var $o={};Object.defineProperty($o,"passive",{get:function(){NO=!0}}),window.addEventListener("test",$o,$o),window.removeEventListener("test",$o,$o)}catch{NO=!1}var Ur=null,VO=null,Hu=null;function H1(){if(Hu)return Hu;var s,o=VO,u=o.length,d,g="value"in Ur?Ur.value:Ur.textContent,x=g.length;for(s=0;s<u&&o[s]===g[s];s++);var w=u-s;for(d=1;d<=w&&o[u-d]===g[x-d];d++);return Hu=g.slice(s,1<d?1-d:void 0)}function Iu(s){var o=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&o===13&&(s=13)):s=o,s===10&&(s=13),32<=s||s===13?s:0}function Fu(){return!0}function I1(){return!1}function wn(s){function o(u,d,g,x,w){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=x,this.target=w,this.currentTarget=null;for(var C in s)s.hasOwnProperty(C)&&(u=s[C],this[C]=u?u(x):x[C]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Fu:I1,this.isPropagationStopped=I1,this}return p(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Fu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Fu)},persist:function(){},isPersistent:Fu}),o}var Fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ku=wn(Fs),Po=p({},Fs,{view:0,detail:0}),C5=wn(Po),YO,WO,Co,Ju=p({},Po,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:GO,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Co&&(Co&&s.type==="mousemove"?(YO=s.screenX-Co.screenX,WO=s.screenY-Co.screenY):WO=YO=0,Co=s),YO)},movementY:function(s){return"movementY"in s?s.movementY:WO}}),F1=wn(Ju),A5=p({},Ju,{dataTransfer:0}),R5=wn(A5),z5=p({},Po,{relatedTarget:0}),UO=wn(z5),E5=p({},Fs,{animationName:0,elapsedTime:0,pseudoElement:0}),_5=wn(E5),j5=p({},Fs,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),M5=wn(j5),X5=p({},Fs,{data:0}),K1=wn(X5),Z5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q5={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},D5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L5(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):(s=D5[s])?!!o[s]:!1}function GO(){return L5}var B5=p({},Po,{key:function(s){if(s.key){var o=Z5[s.key]||s.key;if(o!=="Unidentified")return o}return s.type==="keypress"?(s=Iu(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?q5[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:GO,charCode:function(s){return s.type==="keypress"?Iu(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Iu(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),N5=wn(B5),V5=p({},Ju,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),J1=wn(V5),Y5=p({},Po,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:GO}),W5=wn(Y5),U5=p({},Fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),G5=wn(U5),H5=p({},Ju,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),I5=wn(H5),F5=p({},Fs,{newState:0,oldState:0}),K5=wn(F5),J5=[9,13,27,32],HO=lr&&"CompositionEvent"in window,Ao=null;lr&&"documentMode"in document&&(Ao=document.documentMode);var eR=lr&&"TextEvent"in window&&!Ao,ex=lr&&(!HO||Ao&&8<Ao&&11>=Ao),tx=" ",nx=!1;function ix(s,o){switch(s){case"keyup":return J5.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rx(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Jl=!1;function tR(s,o){switch(s){case"compositionend":return rx(o);case"keypress":return o.which!==32?null:(nx=!0,tx);case"textInput":return s=o.data,s===tx&&nx?null:s;default:return null}}function nR(s,o){if(Jl)return s==="compositionend"||!HO&&ix(s,o)?(s=H1(),Hu=VO=Ur=null,Jl=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return ex&&o.locale!=="ko"?null:o.data;default:return null}}var iR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sx(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o==="input"?!!iR[s.type]:o==="textarea"}function lx(s,o,u,d){Fl?Kl?Kl.push(d):Kl=[d]:Fl=d,o=Nf(o,"onChange"),0<o.length&&(u=new Ku("onChange","change",null,u,d),s.push({event:u,listeners:o}))}var Ro=null,zo=null;function rR(s){Bb(s,0)}function ef(s){var o=Nr(s);if(Wu(o))return s}function ax(s,o){if(s==="change")return o}var ox=!1;if(lr){var IO;if(lr){var FO="oninput"in document;if(!FO){var cx=document.createElement("div");cx.setAttribute("oninput","return;"),FO=typeof cx.oninput=="function"}IO=FO}else IO=!1;ox=IO&&(!document.documentMode||9<document.documentMode)}function ux(){Ro&&(Ro.detachEvent("onpropertychange",fx),zo=Ro=null)}function fx(s){if(s.propertyName==="value"&&ef(zo)){var o=[];lx(o,zo,s,LO(s)),G1(rR,o)}}function sR(s,o,u){s==="focusin"?(ux(),Ro=o,zo=u,Ro.attachEvent("onpropertychange",fx)):s==="focusout"&&ux()}function lR(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return ef(zo)}function aR(s,o){if(s==="click")return ef(o)}function oR(s,o){if(s==="input"||s==="change")return ef(o)}function cR(s,o){return s===o&&(s!==0||1/s===1/o)||s!==s&&o!==o}var Mn=typeof Object.is=="function"?Object.is:cR;function Eo(s,o){if(Mn(s,o))return!0;if(typeof s!="object"||s===null||typeof o!="object"||o===null)return!1;var u=Object.keys(s),d=Object.keys(o);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!Yt.call(o,g)||!Mn(s[g],o[g]))return!1}return!0}function hx(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function dx(s,o){var u=hx(s);s=0;for(var d;u;){if(u.nodeType===3){if(d=s+u.textContent.length,s<=o&&d>=o)return{node:u,offset:o-s};s=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=hx(u)}}function Ox(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?Ox(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function px(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=Hs(s.document);o instanceof s.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)s=o.contentWindow;else break;o=Hs(s.document)}return o}function KO(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var uR=lr&&"documentMode"in document&&11>=document.documentMode,ea=null,JO=null,_o=null,ep=!1;function gx(s,o,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;ep||ea==null||ea!==Hs(d)||(d=ea,"selectionStart"in d&&KO(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),_o&&Eo(_o,d)||(_o=d,d=Nf(JO,"onSelect"),0<d.length&&(o=new Ku("onSelect","select",null,o,u),s.push({event:o,listeners:d}),o.target=ea)))}function Ks(s,o){var u={};return u[s.toLowerCase()]=o.toLowerCase(),u["Webkit"+s]="webkit"+o,u["Moz"+s]="moz"+o,u}var ta={animationend:Ks("Animation","AnimationEnd"),animationiteration:Ks("Animation","AnimationIteration"),animationstart:Ks("Animation","AnimationStart"),transitionrun:Ks("Transition","TransitionRun"),transitionstart:Ks("Transition","TransitionStart"),transitioncancel:Ks("Transition","TransitionCancel"),transitionend:Ks("Transition","TransitionEnd")},tp={},mx={};lr&&(mx=document.createElement("div").style,"AnimationEvent"in window||(delete ta.animationend.animation,delete ta.animationiteration.animation,delete ta.animationstart.animation),"TransitionEvent"in window||delete ta.transitionend.transition);function Js(s){if(tp[s])return tp[s];if(!ta[s])return s;var o=ta[s],u;for(u in o)if(o.hasOwnProperty(u)&&u in mx)return tp[s]=o[u];return s}var yx=Js("animationend"),xx=Js("animationiteration"),Sx=Js("animationstart"),fR=Js("transitionrun"),hR=Js("transitionstart"),dR=Js("transitioncancel"),bx=Js("transitionend"),vx=new Map,np="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");np.push("scrollEnd");function gi(s,o){vx.set(s,o),ir(o,[s])}var tf=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Jn=[],na=0,ip=0;function nf(){for(var s=na,o=ip=na=0;o<s;){var u=Jn[o];Jn[o++]=null;var d=Jn[o];Jn[o++]=null;var g=Jn[o];Jn[o++]=null;var x=Jn[o];if(Jn[o++]=null,d!==null&&g!==null){var w=d.pending;w===null?g.next=g:(g.next=w.next,w.next=g),d.pending=g}x!==0&&Qx(u,g,x)}}function rf(s,o,u,d){Jn[na++]=s,Jn[na++]=o,Jn[na++]=u,Jn[na++]=d,ip|=d,s.lanes|=d,s=s.alternate,s!==null&&(s.lanes|=d)}function rp(s,o,u,d){return rf(s,o,u,d),sf(s)}function el(s,o){return rf(s,null,null,o),sf(s)}function Qx(s,o,u){s.lanes|=u;var d=s.alternate;d!==null&&(d.lanes|=u);for(var g=!1,x=s.return;x!==null;)x.childLanes|=u,d=x.alternate,d!==null&&(d.childLanes|=u),x.tag===22&&(s=x.stateNode,s===null||s._visibility&1||(g=!0)),s=x,x=x.return;return s.tag===3?(x=s.stateNode,g&&o!==null&&(g=31-gn(u),s=x.hiddenUpdates,d=s[g],d===null?s[g]=[o]:d.push(o),o.lane=u|536870912),x):null}function sf(s){if(50<nc)throw nc=0,dg=null,Error(i(185));for(var o=s.return;o!==null;)s=o,o=s.return;return s.tag===3?s.stateNode:null}var ia={};function OR(s,o,u,d){this.tag=s,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(s,o,u,d){return new OR(s,o,u,d)}function sp(s){return s=s.prototype,!(!s||!s.isReactComponent)}function ar(s,o){var u=s.alternate;return u===null?(u=Xn(s.tag,o,s.key,s.mode),u.elementType=s.elementType,u.type=s.type,u.stateNode=s.stateNode,u.alternate=s,s.alternate=u):(u.pendingProps=o,u.type=s.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=s.flags&65011712,u.childLanes=s.childLanes,u.lanes=s.lanes,u.child=s.child,u.memoizedProps=s.memoizedProps,u.memoizedState=s.memoizedState,u.updateQueue=s.updateQueue,o=s.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=s.sibling,u.index=s.index,u.ref=s.ref,u.refCleanup=s.refCleanup,u}function wx(s,o){s.flags&=65011714;var u=s.alternate;return u===null?(s.childLanes=0,s.lanes=o,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,o=u.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),s}function lf(s,o,u,d,g,x){var w=0;if(d=s,typeof s=="function")sp(s)&&(w=1);else if(typeof s=="string")w=xz(s,u,re.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case G:return s=Xn(31,u,o,g),s.elementType=G,s.lanes=x,s;case v:return tl(u.children,g,x,o);case k:w=8,g|=24;break;case Q:return s=Xn(12,u,o,g|2),s.elementType=Q,s.lanes=x,s;case _:return s=Xn(13,u,o,g),s.elementType=_,s.lanes=x,s;case A:return s=Xn(19,u,o,g),s.elementType=A,s.lanes=x,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case T:w=10;break e;case P:w=9;break e;case $:w=11;break e;case E:w=14;break e;case N:w=16,d=null;break e}w=29,u=Error(i(130,s===null?"null":typeof s,"")),d=null}return o=Xn(w,u,o,g),o.elementType=s,o.type=d,o.lanes=x,o}function tl(s,o,u,d){return s=Xn(7,s,d,o),s.lanes=u,s}function lp(s,o,u){return s=Xn(6,s,null,o),s.lanes=u,s}function kx(s){var o=Xn(18,null,null,0);return o.stateNode=s,o}function ap(s,o,u){return o=Xn(4,s.children!==null?s.children:[],s.key,o),o.lanes=u,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}var Tx=new WeakMap;function ei(s,o){if(typeof s=="object"&&s!==null){var u=Tx.get(s);return u!==void 0?u:(o={value:s,source:o,stack:at(o)},Tx.set(s,o),o)}return{value:s,source:o,stack:at(o)}}var ra=[],sa=0,af=null,jo=0,ti=[],ni=0,Gr=null,Ei=1,_i="";function or(s,o){ra[sa++]=jo,ra[sa++]=af,af=s,jo=o}function $x(s,o,u){ti[ni++]=Ei,ti[ni++]=_i,ti[ni++]=Gr,Gr=s;var d=Ei;s=_i;var g=32-gn(d)-1;d&=~(1<<g),u+=1;var x=32-gn(o)+g;if(30<x){var w=g-g%5;x=(d&(1<<w)-1).toString(32),d>>=w,g-=w,Ei=1<<32-gn(o)+g|u<<g|d,_i=x+s}else Ei=1<<x|u<<g|d,_i=s}function op(s){s.return!==null&&(or(s,1),$x(s,1,0))}function cp(s){for(;s===af;)af=ra[--sa],ra[sa]=null,jo=ra[--sa],ra[sa]=null;for(;s===Gr;)Gr=ti[--ni],ti[ni]=null,_i=ti[--ni],ti[ni]=null,Ei=ti[--ni],ti[ni]=null}function Px(s,o){ti[ni++]=Ei,ti[ni++]=_i,ti[ni++]=Gr,Ei=o.id,_i=o.overflow,Gr=s}var Ft=null,yt=null,Ge=!1,Hr=null,ii=!1,up=Error(i(519));function Ir(s){var o=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mo(ei(o,s)),up}function Cx(s){var o=s.stateNode,u=s.type,d=s.memoizedProps;switch(o[Dt]=s,o[cn]=d,u){case"dialog":Be("cancel",o),Be("close",o);break;case"iframe":case"object":case"embed":Be("load",o);break;case"video":case"audio":for(u=0;u<rc.length;u++)Be(rc[u],o);break;case"source":Be("error",o);break;case"img":case"image":case"link":Be("error",o),Be("load",o);break;case"details":Be("toggle",o);break;case"input":Be("invalid",o),Uu(o,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Be("invalid",o);break;case"textarea":Be("invalid",o),V1(o,d.value,d.defaultValue,d.children)}u=d.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||d.suppressHydrationWarning===!0||Wb(o.textContent,u)?(d.popover!=null&&(Be("beforetoggle",o),Be("toggle",o)),d.onScroll!=null&&Be("scroll",o),d.onScrollEnd!=null&&Be("scrollend",o),d.onClick!=null&&(o.onclick=sr),o=!0):o=!1,o||Ir(s,!0)}function Ax(s){for(Ft=s.return;Ft;)switch(Ft.tag){case 5:case 31:case 13:ii=!1;return;case 27:case 3:ii=!0;return;default:Ft=Ft.return}}function la(s){if(s!==Ft)return!1;if(!Ge)return Ax(s),Ge=!0,!1;var o=s.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=s.type,u=!(u!=="form"&&u!=="button")||Pg(s.type,s.memoizedProps)),u=!u),u&&yt&&Ir(s),Ax(s),o===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(317));yt=tv(s)}else if(o===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(317));yt=tv(s)}else o===27?(o=yt,us(s.type)?(s=Eg,Eg=null,yt=s):yt=o):yt=Ft?si(s.stateNode.nextSibling):null;return!0}function nl(){yt=Ft=null,Ge=!1}function fp(){var s=Hr;return s!==null&&(Pn===null?Pn=s:Pn.push.apply(Pn,s),Hr=null),s}function Mo(s){Hr===null?Hr=[s]:Hr.push(s)}var hp=z(null),il=null,cr=null;function Fr(s,o,u){te(hp,o._currentValue),o._currentValue=u}function ur(s){s._currentValue=hp.current,Z(hp)}function dp(s,o,u){for(;s!==null;){var d=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),s===u)break;s=s.return}}function Op(s,o,u,d){var g=s.child;for(g!==null&&(g.return=s);g!==null;){var x=g.dependencies;if(x!==null){var w=g.child;x=x.firstContext;e:for(;x!==null;){var C=x;x=g;for(var L=0;L<o.length;L++)if(C.context===o[L]){x.lanes|=u,C=x.alternate,C!==null&&(C.lanes|=u),dp(x.return,u,s),d||(w=null);break e}x=C.next}}else if(g.tag===18){if(w=g.return,w===null)throw Error(i(341));w.lanes|=u,x=w.alternate,x!==null&&(x.lanes|=u),dp(w,u,s),w=null}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===s){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}}function aa(s,o,u,d){s=null;for(var g=o,x=!1;g!==null;){if(!x){if((g.flags&524288)!==0)x=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var w=g.alternate;if(w===null)throw Error(i(387));if(w=w.memoizedProps,w!==null){var C=g.type;Mn(g.pendingProps.value,w.value)||(s!==null?s.push(C):s=[C])}}else if(g===Oe.current){if(w=g.alternate,w===null)throw Error(i(387));w.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(s!==null?s.push(cc):s=[cc])}g=g.return}s!==null&&Op(o,s,u,d),o.flags|=262144}function of(s){for(s=s.firstContext;s!==null;){if(!Mn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function rl(s){il=s,cr=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Kt(s){return Rx(il,s)}function cf(s,o){return il===null&&rl(s),Rx(s,o)}function Rx(s,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},cr===null){if(s===null)throw Error(i(308));cr=o,s.dependencies={lanes:0,firstContext:o},s.flags|=524288}else cr=cr.next=o;return u}var pR=typeof AbortController<"u"?AbortController:function(){var s=[],o=this.signal={aborted:!1,addEventListener:function(u,d){s.push(d)}};this.abort=function(){o.aborted=!0,s.forEach(function(u){return u()})}},gR=t.unstable_scheduleCallback,mR=t.unstable_NormalPriority,Et={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pp(){return{controller:new pR,data:new Map,refCount:0}}function Xo(s){s.refCount--,s.refCount===0&&gR(mR,function(){s.controller.abort()})}var Zo=null,gp=0,oa=0,ca=null;function yR(s,o){if(Zo===null){var u=Zo=[];gp=0,oa=xg(),ca={status:"pending",value:void 0,then:function(d){u.push(d)}}}return gp++,o.then(zx,zx),o}function zx(){if(--gp===0&&Zo!==null){ca!==null&&(ca.status="fulfilled");var s=Zo;Zo=null,oa=0,ca=null;for(var o=0;o<s.length;o++)(0,s[o])()}}function xR(s,o){var u=[],d={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return s.then(function(){d.status="fulfilled",d.value=o;for(var g=0;g<u.length;g++)(0,u[g])(o)},function(g){for(d.status="rejected",d.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),d}var Ex=R.S;R.S=function(s,o){gb=It(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&yR(s,o),Ex!==null&&Ex(s,o)};var sl=z(null);function mp(){var s=sl.current;return s!==null?s:dt.pooledCache}function uf(s,o){o===null?te(sl,sl.current):te(sl,o.pool)}function _x(){var s=mp();return s===null?null:{parent:Et._currentValue,pool:s}}var ua=Error(i(460)),yp=Error(i(474)),ff=Error(i(542)),hf={then:function(){}};function jx(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Mx(s,o,u){switch(u=s[u],u===void 0?s.push(o):u!==o&&(o.then(sr,sr),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw s=o.reason,Zx(s),s;default:if(typeof o.status=="string")o.then(sr,sr);else{if(s=dt,s!==null&&100<s.shellSuspendCounter)throw Error(i(482));s=o,s.status="pending",s.then(function(d){if(o.status==="pending"){var g=o;g.status="fulfilled",g.value=d}},function(d){if(o.status==="pending"){var g=o;g.status="rejected",g.reason=d}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw s=o.reason,Zx(s),s}throw al=o,ua}}function ll(s){try{var o=s._init;return o(s._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(al=u,ua):u}}var al=null;function Xx(){if(al===null)throw Error(i(459));var s=al;return al=null,s}function Zx(s){if(s===ua||s===ff)throw Error(i(483))}var fa=null,qo=0;function df(s){var o=qo;return qo+=1,fa===null&&(fa=[]),Mx(fa,s,o)}function Do(s,o){o=o.props.ref,s.ref=o!==void 0?o:null}function Of(s,o){throw o.$$typeof===m?Error(i(525)):(s=Object.prototype.toString.call(o),Error(i(31,s==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":s)))}function qx(s){function o(I,U){if(s){var K=I.deletions;K===null?(I.deletions=[U],I.flags|=16):K.push(U)}}function u(I,U){if(!s)return null;for(;U!==null;)o(I,U),U=U.sibling;return null}function d(I){for(var U=new Map;I!==null;)I.key!==null?U.set(I.key,I):U.set(I.index,I),I=I.sibling;return U}function g(I,U){return I=ar(I,U),I.index=0,I.sibling=null,I}function x(I,U,K){return I.index=K,s?(K=I.alternate,K!==null?(K=K.index,K<U?(I.flags|=67108866,U):K):(I.flags|=67108866,U)):(I.flags|=1048576,U)}function w(I){return s&&I.alternate===null&&(I.flags|=67108866),I}function C(I,U,K,ae){return U===null||U.tag!==6?(U=lp(K,I.mode,ae),U.return=I,U):(U=g(U,K),U.return=I,U)}function L(I,U,K,ae){var $e=K.type;return $e===v?le(I,U,K.props.children,ae,K.key):U!==null&&(U.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===N&&ll($e)===U.type)?(U=g(U,K.props),Do(U,K),U.return=I,U):(U=lf(K.type,K.key,K.props,null,I.mode,ae),Do(U,K),U.return=I,U)}function J(I,U,K,ae){return U===null||U.tag!==4||U.stateNode.containerInfo!==K.containerInfo||U.stateNode.implementation!==K.implementation?(U=ap(K,I.mode,ae),U.return=I,U):(U=g(U,K.children||[]),U.return=I,U)}function le(I,U,K,ae,$e){return U===null||U.tag!==7?(U=tl(K,I.mode,ae,$e),U.return=I,U):(U=g(U,K),U.return=I,U)}function ce(I,U,K){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=lp(""+U,I.mode,K),U.return=I,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case y:return K=lf(U.type,U.key,U.props,null,I.mode,K),Do(K,U),K.return=I,K;case b:return U=ap(U,I.mode,K),U.return=I,U;case N:return U=ll(U),ce(I,U,K)}if(W(U)||Y(U))return U=tl(U,I.mode,K,null),U.return=I,U;if(typeof U.then=="function")return ce(I,df(U),K);if(U.$$typeof===T)return ce(I,cf(I,U),K);Of(I,U)}return null}function ee(I,U,K,ae){var $e=U!==null?U.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return $e!==null?null:C(I,U,""+K,ae);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case y:return K.key===$e?L(I,U,K,ae):null;case b:return K.key===$e?J(I,U,K,ae):null;case N:return K=ll(K),ee(I,U,K,ae)}if(W(K)||Y(K))return $e!==null?null:le(I,U,K,ae,null);if(typeof K.then=="function")return ee(I,U,df(K),ae);if(K.$$typeof===T)return ee(I,U,cf(I,K),ae);Of(I,K)}return null}function ie(I,U,K,ae,$e){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return I=I.get(K)||null,C(U,I,""+ae,$e);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case y:return I=I.get(ae.key===null?K:ae.key)||null,L(U,I,ae,$e);case b:return I=I.get(ae.key===null?K:ae.key)||null,J(U,I,ae,$e);case N:return ae=ll(ae),ie(I,U,K,ae,$e)}if(W(ae)||Y(ae))return I=I.get(K)||null,le(U,I,ae,$e,null);if(typeof ae.then=="function")return ie(I,U,K,df(ae),$e);if(ae.$$typeof===T)return ie(I,U,K,cf(U,ae),$e);Of(U,ae)}return null}function Se(I,U,K,ae){for(var $e=null,Je=null,be=U,De=U=0,Ye=null;be!==null&&De<K.length;De++){be.index>De?(Ye=be,be=null):Ye=be.sibling;var et=ee(I,be,K[De],ae);if(et===null){be===null&&(be=Ye);break}s&&be&&et.alternate===null&&o(I,be),U=x(et,U,De),Je===null?$e=et:Je.sibling=et,Je=et,be=Ye}if(De===K.length)return u(I,be),Ge&&or(I,De),$e;if(be===null){for(;De<K.length;De++)be=ce(I,K[De],ae),be!==null&&(U=x(be,U,De),Je===null?$e=be:Je.sibling=be,Je=be);return Ge&&or(I,De),$e}for(be=d(be);De<K.length;De++)Ye=ie(be,I,De,K[De],ae),Ye!==null&&(s&&Ye.alternate!==null&&be.delete(Ye.key===null?De:Ye.key),U=x(Ye,U,De),Je===null?$e=Ye:Je.sibling=Ye,Je=Ye);return s&&be.forEach(function(ps){return o(I,ps)}),Ge&&or(I,De),$e}function Ae(I,U,K,ae){if(K==null)throw Error(i(151));for(var $e=null,Je=null,be=U,De=U=0,Ye=null,et=K.next();be!==null&&!et.done;De++,et=K.next()){be.index>De?(Ye=be,be=null):Ye=be.sibling;var ps=ee(I,be,et.value,ae);if(ps===null){be===null&&(be=Ye);break}s&&be&&ps.alternate===null&&o(I,be),U=x(ps,U,De),Je===null?$e=ps:Je.sibling=ps,Je=ps,be=Ye}if(et.done)return u(I,be),Ge&&or(I,De),$e;if(be===null){for(;!et.done;De++,et=K.next())et=ce(I,et.value,ae),et!==null&&(U=x(et,U,De),Je===null?$e=et:Je.sibling=et,Je=et);return Ge&&or(I,De),$e}for(be=d(be);!et.done;De++,et=K.next())et=ie(be,I,De,et.value,ae),et!==null&&(s&&et.alternate!==null&&be.delete(et.key===null?De:et.key),U=x(et,U,De),Je===null?$e=et:Je.sibling=et,Je=et);return s&&be.forEach(function(Az){return o(I,Az)}),Ge&&or(I,De),$e}function ht(I,U,K,ae){if(typeof K=="object"&&K!==null&&K.type===v&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case y:e:{for(var $e=K.key;U!==null;){if(U.key===$e){if($e=K.type,$e===v){if(U.tag===7){u(I,U.sibling),ae=g(U,K.props.children),ae.return=I,I=ae;break e}}else if(U.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===N&&ll($e)===U.type){u(I,U.sibling),ae=g(U,K.props),Do(ae,K),ae.return=I,I=ae;break e}u(I,U);break}else o(I,U);U=U.sibling}K.type===v?(ae=tl(K.props.children,I.mode,ae,K.key),ae.return=I,I=ae):(ae=lf(K.type,K.key,K.props,null,I.mode,ae),Do(ae,K),ae.return=I,I=ae)}return w(I);case b:e:{for($e=K.key;U!==null;){if(U.key===$e)if(U.tag===4&&U.stateNode.containerInfo===K.containerInfo&&U.stateNode.implementation===K.implementation){u(I,U.sibling),ae=g(U,K.children||[]),ae.return=I,I=ae;break e}else{u(I,U);break}else o(I,U);U=U.sibling}ae=ap(K,I.mode,ae),ae.return=I,I=ae}return w(I);case N:return K=ll(K),ht(I,U,K,ae)}if(W(K))return Se(I,U,K,ae);if(Y(K)){if($e=Y(K),typeof $e!="function")throw Error(i(150));return K=$e.call(K),Ae(I,U,K,ae)}if(typeof K.then=="function")return ht(I,U,df(K),ae);if(K.$$typeof===T)return ht(I,U,cf(I,K),ae);Of(I,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,U!==null&&U.tag===6?(u(I,U.sibling),ae=g(U,K),ae.return=I,I=ae):(u(I,U),ae=lp(K,I.mode,ae),ae.return=I,I=ae),w(I)):u(I,U)}return function(I,U,K,ae){try{qo=0;var $e=ht(I,U,K,ae);return fa=null,$e}catch(be){if(be===ua||be===ff)throw be;var Je=Xn(29,be,null,I.mode);return Je.lanes=ae,Je.return=I,Je}finally{}}}var ol=qx(!0),Dx=qx(!1),Kr=!1;function xp(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sp(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Jr(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function es(s,o,u){var d=s.updateQueue;if(d===null)return null;if(d=d.shared,(nt&2)!==0){var g=d.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),d.pending=o,o=sf(s),Qx(s,null,u),o}return rf(s,d,o,u),sf(s)}function Lo(s,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var d=o.lanes;d&=s.pendingLanes,u|=d,o.lanes=u,Mu(s,u)}}function bp(s,o){var u=s.updateQueue,d=s.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,x=null;if(u=u.firstBaseUpdate,u!==null){do{var w={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};x===null?g=x=w:x=x.next=w,u=u.next}while(u!==null);x===null?g=x=o:x=x.next=o}else g=x=o;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:x,shared:d.shared,callbacks:d.callbacks},s.updateQueue=u;return}s=u.lastBaseUpdate,s===null?u.firstBaseUpdate=o:s.next=o,u.lastBaseUpdate=o}var vp=!1;function Bo(){if(vp){var s=ca;if(s!==null)throw s}}function No(s,o,u,d){vp=!1;var g=s.updateQueue;Kr=!1;var x=g.firstBaseUpdate,w=g.lastBaseUpdate,C=g.shared.pending;if(C!==null){g.shared.pending=null;var L=C,J=L.next;L.next=null,w===null?x=J:w.next=J,w=L;var le=s.alternate;le!==null&&(le=le.updateQueue,C=le.lastBaseUpdate,C!==w&&(C===null?le.firstBaseUpdate=J:C.next=J,le.lastBaseUpdate=L))}if(x!==null){var ce=g.baseState;w=0,le=J=L=null,C=x;do{var ee=C.lane&-536870913,ie=ee!==C.lane;if(ie?(Ve&ee)===ee:(d&ee)===ee){ee!==0&&ee===oa&&(vp=!0),le!==null&&(le=le.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var Se=s,Ae=C;ee=o;var ht=u;switch(Ae.tag){case 1:if(Se=Ae.payload,typeof Se=="function"){ce=Se.call(ht,ce,ee);break e}ce=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ae.payload,ee=typeof Se=="function"?Se.call(ht,ce,ee):Se,ee==null)break e;ce=p({},ce,ee);break e;case 2:Kr=!0}}ee=C.callback,ee!==null&&(s.flags|=64,ie&&(s.flags|=8192),ie=g.callbacks,ie===null?g.callbacks=[ee]:ie.push(ee))}else ie={lane:ee,tag:C.tag,payload:C.payload,callback:C.callback,next:null},le===null?(J=le=ie,L=ce):le=le.next=ie,w|=ee;if(C=C.next,C===null){if(C=g.shared.pending,C===null)break;ie=C,C=ie.next,ie.next=null,g.lastBaseUpdate=ie,g.shared.pending=null}}while(!0);le===null&&(L=ce),g.baseState=L,g.firstBaseUpdate=J,g.lastBaseUpdate=le,x===null&&(g.shared.lanes=0),ss|=w,s.lanes=w,s.memoizedState=ce}}function Lx(s,o){if(typeof s!="function")throw Error(i(191,s));s.call(o)}function Bx(s,o){var u=s.callbacks;if(u!==null)for(s.callbacks=null,s=0;s<u.length;s++)Lx(u[s],o)}var ha=z(null),pf=z(0);function Nx(s,o){s=xr,te(pf,s),te(ha,o),xr=s|o.baseLanes}function Qp(){te(pf,xr),te(ha,ha.current)}function wp(){xr=pf.current,Z(ha),Z(pf)}var Zn=z(null),ri=null;function ts(s){var o=s.alternate;te(Pt,Pt.current&1),te(Zn,s),ri===null&&(o===null||ha.current!==null||o.memoizedState!==null)&&(ri=s)}function kp(s){te(Pt,Pt.current),te(Zn,s),ri===null&&(ri=s)}function Vx(s){s.tag===22?(te(Pt,Pt.current),te(Zn,s),ri===null&&(ri=s)):ns()}function ns(){te(Pt,Pt.current),te(Zn,Zn.current)}function qn(s){Z(Zn),ri===s&&(ri=null),Z(Pt)}var Pt=z(0);function gf(s){for(var o=s;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Rg(u)||zg(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var fr=0,Xe=null,ut=null,_t=null,mf=!1,da=!1,cl=!1,yf=0,Vo=0,Oa=null,SR=0;function kt(){throw Error(i(321))}function Tp(s,o){if(o===null)return!1;for(var u=0;u<o.length&&u<s.length;u++)if(!Mn(s[u],o[u]))return!1;return!0}function $p(s,o,u,d,g,x){return fr=x,Xe=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,R.H=s===null||s.memoizedState===null?$S:Bp,cl=!1,x=u(d,g),cl=!1,da&&(x=Wx(o,u,d,g)),Yx(s),x}function Yx(s){R.H=Uo;var o=ut!==null&&ut.next!==null;if(fr=0,_t=ut=Xe=null,mf=!1,Vo=0,Oa=null,o)throw Error(i(300));s===null||jt||(s=s.dependencies,s!==null&&of(s)&&(jt=!0))}function Wx(s,o,u,d){Xe=s;var g=0;do{if(da&&(Oa=null),Vo=0,da=!1,25<=g)throw Error(i(301));if(g+=1,_t=ut=null,s.updateQueue!=null){var x=s.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}R.H=PS,x=o(u,d)}while(da);return x}function bR(){var s=R.H,o=s.useState()[0];return o=typeof o.then=="function"?Yo(o):o,s=s.useState()[0],(ut!==null?ut.memoizedState:null)!==s&&(Xe.flags|=1024),o}function Pp(){var s=yf!==0;return yf=0,s}function Cp(s,o,u){o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~u}function Ap(s){if(mf){for(s=s.memoizedState;s!==null;){var o=s.queue;o!==null&&(o.pending=null),s=s.next}mf=!1}fr=0,_t=ut=Xe=null,da=!1,Vo=yf=0,Oa=null}function mn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Xe.memoizedState=_t=s:_t=_t.next=s,_t}function Ct(){if(ut===null){var s=Xe.alternate;s=s!==null?s.memoizedState:null}else s=ut.next;var o=_t===null?Xe.memoizedState:_t.next;if(o!==null)_t=o,ut=s;else{if(s===null)throw Xe.alternate===null?Error(i(467)):Error(i(310));ut=s,s={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},_t===null?Xe.memoizedState=_t=s:_t=_t.next=s}return _t}function xf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(s){var o=Vo;return Vo+=1,Oa===null&&(Oa=[]),s=Mx(Oa,s,o),o=Xe,(_t===null?o.memoizedState:_t.next)===null&&(o=o.alternate,R.H=o===null||o.memoizedState===null?$S:Bp),s}function Sf(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Yo(s);if(s.$$typeof===T)return Kt(s)}throw Error(i(438,String(s)))}function Rp(s){var o=null,u=Xe.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var d=Xe.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(o={data:d.data.map(function(g){return g.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=xf(),Xe.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(s),d=0;d<s;d++)u[d]=ne;return o.index++,u}function hr(s,o){return typeof o=="function"?o(s):o}function bf(s){var o=Ct();return zp(o,ut,s)}function zp(s,o,u){var d=s.queue;if(d===null)throw Error(i(311));d.lastRenderedReducer=u;var g=s.baseQueue,x=d.pending;if(x!==null){if(g!==null){var w=g.next;g.next=x.next,x.next=w}o.baseQueue=g=x,d.pending=null}if(x=s.baseState,g===null)s.memoizedState=x;else{o=g.next;var C=w=null,L=null,J=o,le=!1;do{var ce=J.lane&-536870913;if(ce!==J.lane?(Ve&ce)===ce:(fr&ce)===ce){var ee=J.revertLane;if(ee===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ce===oa&&(le=!0);else if((fr&ee)===ee){J=J.next,ee===oa&&(le=!0);continue}else ce={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},L===null?(C=L=ce,w=x):L=L.next=ce,Xe.lanes|=ee,ss|=ee;ce=J.action,cl&&u(x,ce),x=J.hasEagerState?J.eagerState:u(x,ce)}else ee={lane:ce,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},L===null?(C=L=ee,w=x):L=L.next=ee,Xe.lanes|=ce,ss|=ce;J=J.next}while(J!==null&&J!==o);if(L===null?w=x:L.next=C,!Mn(x,s.memoizedState)&&(jt=!0,le&&(u=ca,u!==null)))throw u;s.memoizedState=x,s.baseState=w,s.baseQueue=L,d.lastRenderedState=x}return g===null&&(d.lanes=0),[s.memoizedState,d.dispatch]}function Ep(s){var o=Ct(),u=o.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=s;var d=u.dispatch,g=u.pending,x=o.memoizedState;if(g!==null){u.pending=null;var w=g=g.next;do x=s(x,w.action),w=w.next;while(w!==g);Mn(x,o.memoizedState)||(jt=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),u.lastRenderedState=x}return[x,d]}function Ux(s,o,u){var d=Xe,g=Ct(),x=Ge;if(x){if(u===void 0)throw Error(i(407));u=u()}else u=o();var w=!Mn((ut||g).memoizedState,u);if(w&&(g.memoizedState=u,jt=!0),g=g.queue,Mp(Ix.bind(null,d,g,s),[s]),g.getSnapshot!==o||w||_t!==null&&_t.memoizedState.tag&1){if(d.flags|=2048,pa(9,{destroy:void 0},Hx.bind(null,d,g,u,o),null),dt===null)throw Error(i(349));x||(fr&127)!==0||Gx(d,o,u)}return u}function Gx(s,o,u){s.flags|=16384,s={getSnapshot:o,value:u},o=Xe.updateQueue,o===null?(o=xf(),Xe.updateQueue=o,o.stores=[s]):(u=o.stores,u===null?o.stores=[s]:u.push(s))}function Hx(s,o,u,d){o.value=u,o.getSnapshot=d,Fx(o)&&Kx(s)}function Ix(s,o,u){return u(function(){Fx(o)&&Kx(s)})}function Fx(s){var o=s.getSnapshot;s=s.value;try{var u=o();return!Mn(s,u)}catch{return!0}}function Kx(s){var o=el(s,2);o!==null&&Cn(o,s,2)}function _p(s){var o=mn();if(typeof s=="function"){var u=s;if(s=u(),cl){Ri(!0);try{u()}finally{Ri(!1)}}}return o.memoizedState=o.baseState=s,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:s},o}function Jx(s,o,u,d){return s.baseState=u,zp(s,ut,typeof d=="function"?d:hr)}function vR(s,o,u,d,g){if(wf(s))throw Error(i(485));if(s=o.action,s!==null){var x={payload:g,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){x.listeners.push(w)}};R.T!==null?u(!0):x.isTransition=!1,d(x),u=o.pending,u===null?(x.next=o.pending=x,eS(o,x)):(x.next=u.next,o.pending=u.next=x)}}function eS(s,o){var u=o.action,d=o.payload,g=s.state;if(o.isTransition){var x=R.T,w={};R.T=w;try{var C=u(g,d),L=R.S;L!==null&&L(w,C),tS(s,o,C)}catch(J){jp(s,o,J)}finally{x!==null&&w.types!==null&&(x.types=w.types),R.T=x}}else try{x=u(g,d),tS(s,o,x)}catch(J){jp(s,o,J)}}function tS(s,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(d){nS(s,o,d)},function(d){return jp(s,o,d)}):nS(s,o,u)}function nS(s,o,u){o.status="fulfilled",o.value=u,iS(o),s.state=u,o=s.pending,o!==null&&(u=o.next,u===o?s.pending=null:(u=u.next,o.next=u,eS(s,u)))}function jp(s,o,u){var d=s.pending;if(s.pending=null,d!==null){d=d.next;do o.status="rejected",o.reason=u,iS(o),o=o.next;while(o!==d)}s.action=null}function iS(s){s=s.listeners;for(var o=0;o<s.length;o++)(0,s[o])()}function rS(s,o){return o}function sS(s,o){if(Ge){var u=dt.formState;if(u!==null){e:{var d=Xe;if(Ge){if(yt){t:{for(var g=yt,x=ii;g.nodeType!==8;){if(!x){g=null;break t}if(g=si(g.nextSibling),g===null){g=null;break t}}x=g.data,g=x==="F!"||x==="F"?g:null}if(g){yt=si(g.nextSibling),d=g.data==="F!";break e}}Ir(d)}d=!1}d&&(o=u[0])}}return u=mn(),u.memoizedState=u.baseState=o,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rS,lastRenderedState:o},u.queue=d,u=wS.bind(null,Xe,d),d.dispatch=u,d=_p(!1),x=Lp.bind(null,Xe,!1,d.queue),d=mn(),g={state:o,dispatch:null,action:s,pending:null},d.queue=g,u=vR.bind(null,Xe,g,x,u),g.dispatch=u,d.memoizedState=s,[o,u,!1]}function lS(s){var o=Ct();return aS(o,ut,s)}function aS(s,o,u){if(o=zp(s,o,rS)[0],s=bf(hr)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var d=Yo(o)}catch(w){throw w===ua?ff:w}else d=o;o=Ct();var g=o.queue,x=g.dispatch;return u!==o.memoizedState&&(Xe.flags|=2048,pa(9,{destroy:void 0},QR.bind(null,g,u),null)),[d,x,s]}function QR(s,o){s.action=o}function oS(s){var o=Ct(),u=ut;if(u!==null)return aS(o,u,s);Ct(),o=o.memoizedState,u=Ct();var d=u.queue.dispatch;return u.memoizedState=s,[o,d,!1]}function pa(s,o,u,d){return s={tag:s,create:u,deps:d,inst:o,next:null},o=Xe.updateQueue,o===null&&(o=xf(),Xe.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=s.next=s:(d=u.next,u.next=s,s.next=d,o.lastEffect=s),s}function cS(){return Ct().memoizedState}function vf(s,o,u,d){var g=mn();Xe.flags|=s,g.memoizedState=pa(1|o,{destroy:void 0},u,d===void 0?null:d)}function Qf(s,o,u,d){var g=Ct();d=d===void 0?null:d;var x=g.memoizedState.inst;ut!==null&&d!==null&&Tp(d,ut.memoizedState.deps)?g.memoizedState=pa(o,x,u,d):(Xe.flags|=s,g.memoizedState=pa(1|o,x,u,d))}function uS(s,o){vf(8390656,8,s,o)}function Mp(s,o){Qf(2048,8,s,o)}function wR(s){Xe.flags|=4;var o=Xe.updateQueue;if(o===null)o=xf(),Xe.updateQueue=o,o.events=[s];else{var u=o.events;u===null?o.events=[s]:u.push(s)}}function fS(s){var o=Ct().memoizedState;return wR({ref:o,nextImpl:s}),function(){if((nt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}function hS(s,o){return Qf(4,2,s,o)}function dS(s,o){return Qf(4,4,s,o)}function OS(s,o){if(typeof o=="function"){s=s();var u=o(s);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return s=s(),o.current=s,function(){o.current=null}}function pS(s,o,u){u=u!=null?u.concat([s]):null,Qf(4,4,OS.bind(null,o,s),u)}function Xp(){}function gS(s,o){var u=Ct();o=o===void 0?null:o;var d=u.memoizedState;return o!==null&&Tp(o,d[1])?d[0]:(u.memoizedState=[s,o],s)}function mS(s,o){var u=Ct();o=o===void 0?null:o;var d=u.memoizedState;if(o!==null&&Tp(o,d[1]))return d[0];if(d=s(),cl){Ri(!0);try{s()}finally{Ri(!1)}}return u.memoizedState=[d,o],d}function Zp(s,o,u){return u===void 0||(fr&1073741824)!==0&&(Ve&261930)===0?s.memoizedState=o:(s.memoizedState=u,s=yb(),Xe.lanes|=s,ss|=s,u)}function yS(s,o,u,d){return Mn(u,o)?u:ha.current!==null?(s=Zp(s,u,d),Mn(s,o)||(jt=!0),s):(fr&42)===0||(fr&1073741824)!==0&&(Ve&261930)===0?(jt=!0,s.memoizedState=u):(s=yb(),Xe.lanes|=s,ss|=s,o)}function xS(s,o,u,d,g){var x=q.p;q.p=x!==0&&8>x?x:8;var w=R.T,C={};R.T=C,Lp(s,!1,o,u);try{var L=g(),J=R.S;if(J!==null&&J(C,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var le=xR(L,d);Wo(s,o,le,Bn(s))}else Wo(s,o,d,Bn(s))}catch(ce){Wo(s,o,{then:function(){},status:"rejected",reason:ce},Bn())}finally{q.p=x,w!==null&&C.types!==null&&(w.types=C.types),R.T=w}}function kR(){}function qp(s,o,u,d){if(s.tag!==5)throw Error(i(476));var g=SS(s).queue;xS(s,g,o,B,u===null?kR:function(){return bS(s),u(d)})}function SS(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:B},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:u},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function bS(s){var o=SS(s);o.next===null&&(o=s.alternate.memoizedState),Wo(s,o.next.queue,{},Bn())}function Dp(){return Kt(cc)}function vS(){return Ct().memoizedState}function QS(){return Ct().memoizedState}function TR(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var u=Bn();s=Jr(u);var d=es(o,s,u);d!==null&&(Cn(d,o,u),Lo(d,o,u)),o={cache:pp()},s.payload=o;return}o=o.return}}function $R(s,o,u){var d=Bn();u={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},wf(s)?kS(o,u):(u=rp(s,o,u,d),u!==null&&(Cn(u,s,d),TS(u,o,d)))}function wS(s,o,u){var d=Bn();Wo(s,o,u,d)}function Wo(s,o,u,d){var g={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(wf(s))kS(o,g);else{var x=s.alternate;if(s.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var w=o.lastRenderedState,C=x(w,u);if(g.hasEagerState=!0,g.eagerState=C,Mn(C,w))return rf(s,o,g,0),dt===null&&nf(),!1}catch{}finally{}if(u=rp(s,o,g,d),u!==null)return Cn(u,s,d),TS(u,o,d),!0}return!1}function Lp(s,o,u,d){if(d={lane:2,revertLane:xg(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},wf(s)){if(o)throw Error(i(479))}else o=rp(s,u,d,2),o!==null&&Cn(o,s,2)}function wf(s){var o=s.alternate;return s===Xe||o!==null&&o===Xe}function kS(s,o){da=mf=!0;var u=s.pending;u===null?o.next=o:(o.next=u.next,u.next=o),s.pending=o}function TS(s,o,u){if((u&4194048)!==0){var d=o.lanes;d&=s.pendingLanes,u|=d,o.lanes=u,Mu(s,u)}}var Uo={readContext:Kt,use:Sf,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt};Uo.useEffectEvent=kt;var $S={readContext:Kt,use:Sf,useCallback:function(s,o){return mn().memoizedState=[s,o===void 0?null:o],s},useContext:Kt,useEffect:uS,useImperativeHandle:function(s,o,u){u=u!=null?u.concat([s]):null,vf(4194308,4,OS.bind(null,o,s),u)},useLayoutEffect:function(s,o){return vf(4194308,4,s,o)},useInsertionEffect:function(s,o){vf(4,2,s,o)},useMemo:function(s,o){var u=mn();o=o===void 0?null:o;var d=s();if(cl){Ri(!0);try{s()}finally{Ri(!1)}}return u.memoizedState=[d,o],d},useReducer:function(s,o,u){var d=mn();if(u!==void 0){var g=u(o);if(cl){Ri(!0);try{u(o)}finally{Ri(!1)}}}else g=o;return d.memoizedState=d.baseState=g,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:g},d.queue=s,s=s.dispatch=$R.bind(null,Xe,s),[d.memoizedState,s]},useRef:function(s){var o=mn();return s={current:s},o.memoizedState=s},useState:function(s){s=_p(s);var o=s.queue,u=wS.bind(null,Xe,o);return o.dispatch=u,[s.memoizedState,u]},useDebugValue:Xp,useDeferredValue:function(s,o){var u=mn();return Zp(u,s,o)},useTransition:function(){var s=_p(!1);return s=xS.bind(null,Xe,s.queue,!0,!1),mn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,u){var d=Xe,g=mn();if(Ge){if(u===void 0)throw Error(i(407));u=u()}else{if(u=o(),dt===null)throw Error(i(349));(Ve&127)!==0||Gx(d,o,u)}g.memoizedState=u;var x={value:u,getSnapshot:o};return g.queue=x,uS(Ix.bind(null,d,x,s),[s]),d.flags|=2048,pa(9,{destroy:void 0},Hx.bind(null,d,x,u,o),null),u},useId:function(){var s=mn(),o=dt.identifierPrefix;if(Ge){var u=_i,d=Ei;u=(d&~(1<<32-gn(d)-1)).toString(32)+u,o="_"+o+"R_"+u,u=yf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=SR++,o="_"+o+"r_"+u.toString(32)+"_";return s.memoizedState=o},useHostTransitionStatus:Dp,useFormState:sS,useActionState:sS,useOptimistic:function(s){var o=mn();o.memoizedState=o.baseState=s;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Lp.bind(null,Xe,!0,u),u.dispatch=o,[s,o]},useMemoCache:Rp,useCacheRefresh:function(){return mn().memoizedState=TR.bind(null,Xe)},useEffectEvent:function(s){var o=mn(),u={impl:s};return o.memoizedState=u,function(){if((nt&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},Bp={readContext:Kt,use:Sf,useCallback:gS,useContext:Kt,useEffect:Mp,useImperativeHandle:pS,useInsertionEffect:hS,useLayoutEffect:dS,useMemo:mS,useReducer:bf,useRef:cS,useState:function(){return bf(hr)},useDebugValue:Xp,useDeferredValue:function(s,o){var u=Ct();return yS(u,ut.memoizedState,s,o)},useTransition:function(){var s=bf(hr)[0],o=Ct().memoizedState;return[typeof s=="boolean"?s:Yo(s),o]},useSyncExternalStore:Ux,useId:vS,useHostTransitionStatus:Dp,useFormState:lS,useActionState:lS,useOptimistic:function(s,o){var u=Ct();return Jx(u,ut,s,o)},useMemoCache:Rp,useCacheRefresh:QS};Bp.useEffectEvent=fS;var PS={readContext:Kt,use:Sf,useCallback:gS,useContext:Kt,useEffect:Mp,useImperativeHandle:pS,useInsertionEffect:hS,useLayoutEffect:dS,useMemo:mS,useReducer:Ep,useRef:cS,useState:function(){return Ep(hr)},useDebugValue:Xp,useDeferredValue:function(s,o){var u=Ct();return ut===null?Zp(u,s,o):yS(u,ut.memoizedState,s,o)},useTransition:function(){var s=Ep(hr)[0],o=Ct().memoizedState;return[typeof s=="boolean"?s:Yo(s),o]},useSyncExternalStore:Ux,useId:vS,useHostTransitionStatus:Dp,useFormState:oS,useActionState:oS,useOptimistic:function(s,o){var u=Ct();return ut!==null?Jx(u,ut,s,o):(u.baseState=s,[s,u.queue.dispatch])},useMemoCache:Rp,useCacheRefresh:QS};PS.useEffectEvent=fS;function Np(s,o,u,d){o=s.memoizedState,u=u(d,o),u=u==null?o:p({},o,u),s.memoizedState=u,s.lanes===0&&(s.updateQueue.baseState=u)}var Vp={enqueueSetState:function(s,o,u){s=s._reactInternals;var d=Bn(),g=Jr(d);g.payload=o,u!=null&&(g.callback=u),o=es(s,g,d),o!==null&&(Cn(o,s,d),Lo(o,s,d))},enqueueReplaceState:function(s,o,u){s=s._reactInternals;var d=Bn(),g=Jr(d);g.tag=1,g.payload=o,u!=null&&(g.callback=u),o=es(s,g,d),o!==null&&(Cn(o,s,d),Lo(o,s,d))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var u=Bn(),d=Jr(u);d.tag=2,o!=null&&(d.callback=o),o=es(s,d,u),o!==null&&(Cn(o,s,u),Lo(o,s,u))}};function CS(s,o,u,d,g,x,w){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(d,x,w):o.prototype&&o.prototype.isPureReactComponent?!Eo(u,d)||!Eo(g,x):!0}function AS(s,o,u,d){s=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,d),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,d),o.state!==s&&Vp.enqueueReplaceState(o,o.state,null)}function ul(s,o){var u=o;if("ref"in o){u={};for(var d in o)d!=="ref"&&(u[d]=o[d])}if(s=s.defaultProps){u===o&&(u=p({},u));for(var g in s)u[g]===void 0&&(u[g]=s[g])}return u}function RS(s){tf(s)}function zS(s){console.error(s)}function ES(s){tf(s)}function kf(s,o){try{var u=s.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(d){setTimeout(function(){throw d})}}function _S(s,o,u){try{var d=s.onCaughtError;d(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Yp(s,o,u){return u=Jr(u),u.tag=3,u.payload={element:null},u.callback=function(){kf(s,o)},u}function jS(s){return s=Jr(s),s.tag=3,s}function MS(s,o,u,d){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var x=d.value;s.payload=function(){return g(x)},s.callback=function(){_S(o,u,d)}}var w=u.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(s.callback=function(){_S(o,u,d),typeof g!="function"&&(ls===null?ls=new Set([this]):ls.add(this));var C=d.stack;this.componentDidCatch(d.value,{componentStack:C!==null?C:""})})}function PR(s,o,u,d,g){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(o=u.alternate,o!==null&&aa(o,u,g,!0),u=Zn.current,u!==null){switch(u.tag){case 31:case 13:return ri===null?Xf():u.alternate===null&&Tt===0&&(Tt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,d===hf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([d]):o.add(d),gg(s,d,g)),!1;case 22:return u.flags|=65536,d===hf?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([d])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([d]):u.add(d)),gg(s,d,g)),!1}throw Error(i(435,u.tag))}return gg(s,d,g),Xf(),!1}if(Ge)return o=Zn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=g,d!==up&&(s=Error(i(422),{cause:d}),Mo(ei(s,u)))):(d!==up&&(o=Error(i(423),{cause:d}),Mo(ei(o,u))),s=s.current.alternate,s.flags|=65536,g&=-g,s.lanes|=g,d=ei(d,u),g=Yp(s.stateNode,d,g),bp(s,g),Tt!==4&&(Tt=2)),!1;var x=Error(i(520),{cause:d});if(x=ei(x,u),tc===null?tc=[x]:tc.push(x),Tt!==4&&(Tt=2),o===null)return!0;d=ei(d,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,s=g&-g,u.lanes|=s,s=Yp(u.stateNode,d,s),bp(u,s),!1;case 1:if(o=u.type,x=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ls===null||!ls.has(x))))return u.flags|=65536,g&=-g,u.lanes|=g,g=jS(g),MS(g,s,u,d),bp(u,g),!1}u=u.return}while(u!==null);return!1}var Wp=Error(i(461)),jt=!1;function Jt(s,o,u,d){o.child=s===null?Dx(o,null,u,d):ol(o,s.child,u,d)}function XS(s,o,u,d,g){u=u.render;var x=o.ref;if("ref"in d){var w={};for(var C in d)C!=="ref"&&(w[C]=d[C])}else w=d;return rl(o),d=$p(s,o,u,w,x,g),C=Pp(),s!==null&&!jt?(Cp(s,o,g),dr(s,o,g)):(Ge&&C&&op(o),o.flags|=1,Jt(s,o,d,g),o.child)}function ZS(s,o,u,d,g){if(s===null){var x=u.type;return typeof x=="function"&&!sp(x)&&x.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=x,qS(s,o,x,d,g)):(s=lf(u.type,null,d,o,o.mode,g),s.ref=o.ref,s.return=o,o.child=s)}if(x=s.child,!eg(s,g)){var w=x.memoizedProps;if(u=u.compare,u=u!==null?u:Eo,u(w,d)&&s.ref===o.ref)return dr(s,o,g)}return o.flags|=1,s=ar(x,d),s.ref=o.ref,s.return=o,o.child=s}function qS(s,o,u,d,g){if(s!==null){var x=s.memoizedProps;if(Eo(x,d)&&s.ref===o.ref)if(jt=!1,o.pendingProps=d=x,eg(s,g))(s.flags&131072)!==0&&(jt=!0);else return o.lanes=s.lanes,dr(s,o,g)}return Up(s,o,u,d,g)}function DS(s,o,u,d){var g=d.children,x=s!==null?s.memoizedState:null;if(s===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((o.flags&128)!==0){if(x=x!==null?x.baseLanes|u:u,s!==null){for(d=o.child=s.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;d=g&~x}else d=0,o.child=null;return LS(s,o,x,u,d)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},s!==null&&uf(o,x!==null?x.cachePool:null),x!==null?Nx(o,x):Qp(),Vx(o);else return d=o.lanes=536870912,LS(s,o,x!==null?x.baseLanes|u:u,u,d)}else x!==null?(uf(o,x.cachePool),Nx(o,x),ns(),o.memoizedState=null):(s!==null&&uf(o,null),Qp(),ns());return Jt(s,o,g,u),o.child}function Go(s,o){return s!==null&&s.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function LS(s,o,u,d,g){var x=mp();return x=x===null?null:{parent:Et._currentValue,pool:x},o.memoizedState={baseLanes:u,cachePool:x},s!==null&&uf(o,null),Qp(),Vx(o),s!==null&&aa(s,o,d,!0),o.childLanes=g,null}function Tf(s,o){return o=Pf({mode:o.mode,children:o.children},s.mode),o.ref=s.ref,s.child=o,o.return=s,o}function BS(s,o,u){return ol(o,s.child,null,u),s=Tf(o,o.pendingProps),s.flags|=2,qn(o),o.memoizedState=null,s}function CR(s,o,u){var d=o.pendingProps,g=(o.flags&128)!==0;if(o.flags&=-129,s===null){if(Ge){if(d.mode==="hidden")return s=Tf(o,d),o.lanes=536870912,Go(null,s);if(kp(o),(s=yt)?(s=ev(s,ii),s=s!==null&&s.data==="&"?s:null,s!==null&&(o.memoizedState={dehydrated:s,treeContext:Gr!==null?{id:Ei,overflow:_i}:null,retryLane:536870912,hydrationErrors:null},u=kx(s),u.return=o,o.child=u,Ft=o,yt=null)):s=null,s===null)throw Ir(o);return o.lanes=536870912,null}return Tf(o,d)}var x=s.memoizedState;if(x!==null){var w=x.dehydrated;if(kp(o),g)if(o.flags&256)o.flags&=-257,o=BS(s,o,u);else if(o.memoizedState!==null)o.child=s.child,o.flags|=128,o=null;else throw Error(i(558));else if(jt||aa(s,o,u,!1),g=(u&s.childLanes)!==0,jt||g){if(d=dt,d!==null&&(w=Xu(d,u),w!==0&&w!==x.retryLane))throw x.retryLane=w,el(s,w),Cn(d,s,w),Wp;Xf(),o=BS(s,o,u)}else s=x.treeContext,yt=si(w.nextSibling),Ft=o,Ge=!0,Hr=null,ii=!1,s!==null&&Px(o,s),o=Tf(o,d),o.flags|=4096;return o}return s=ar(s.child,{mode:d.mode,children:d.children}),s.ref=o.ref,o.child=s,s.return=o,s}function $f(s,o){var u=o.ref;if(u===null)s!==null&&s.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(s===null||s.ref!==u)&&(o.flags|=4194816)}}function Up(s,o,u,d,g){return rl(o),u=$p(s,o,u,d,void 0,g),d=Pp(),s!==null&&!jt?(Cp(s,o,g),dr(s,o,g)):(Ge&&d&&op(o),o.flags|=1,Jt(s,o,u,g),o.child)}function NS(s,o,u,d,g,x){return rl(o),o.updateQueue=null,u=Wx(o,d,u,g),Yx(s),d=Pp(),s!==null&&!jt?(Cp(s,o,x),dr(s,o,x)):(Ge&&d&&op(o),o.flags|=1,Jt(s,o,u,x),o.child)}function VS(s,o,u,d,g){if(rl(o),o.stateNode===null){var x=ia,w=u.contextType;typeof w=="object"&&w!==null&&(x=Kt(w)),x=new u(d,x),o.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Vp,o.stateNode=x,x._reactInternals=o,x=o.stateNode,x.props=d,x.state=o.memoizedState,x.refs={},xp(o),w=u.contextType,x.context=typeof w=="object"&&w!==null?Kt(w):ia,x.state=o.memoizedState,w=u.getDerivedStateFromProps,typeof w=="function"&&(Np(o,u,w,d),x.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(w=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),w!==x.state&&Vp.enqueueReplaceState(x,x.state,null),No(o,d,x,g),Bo(),x.state=o.memoizedState),typeof x.componentDidMount=="function"&&(o.flags|=4194308),d=!0}else if(s===null){x=o.stateNode;var C=o.memoizedProps,L=ul(u,C);x.props=L;var J=x.context,le=u.contextType;w=ia,typeof le=="object"&&le!==null&&(w=Kt(le));var ce=u.getDerivedStateFromProps;le=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function",C=o.pendingProps!==C,le||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C||J!==w)&&AS(o,x,d,w),Kr=!1;var ee=o.memoizedState;x.state=ee,No(o,d,x,g),Bo(),J=o.memoizedState,C||ee!==J||Kr?(typeof ce=="function"&&(Np(o,u,ce,d),J=o.memoizedState),(L=Kr||CS(o,u,L,d,ee,J,w))?(le||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=J),x.props=d,x.state=J,x.context=w,d=L):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{x=o.stateNode,Sp(s,o),w=o.memoizedProps,le=ul(u,w),x.props=le,ce=o.pendingProps,ee=x.context,J=u.contextType,L=ia,typeof J=="object"&&J!==null&&(L=Kt(J)),C=u.getDerivedStateFromProps,(J=typeof C=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(w!==ce||ee!==L)&&AS(o,x,d,L),Kr=!1,ee=o.memoizedState,x.state=ee,No(o,d,x,g),Bo();var ie=o.memoizedState;w!==ce||ee!==ie||Kr||s!==null&&s.dependencies!==null&&of(s.dependencies)?(typeof C=="function"&&(Np(o,u,C,d),ie=o.memoizedState),(le=Kr||CS(o,u,le,d,ee,ie,L)||s!==null&&s.dependencies!==null&&of(s.dependencies))?(J||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,ie,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,ie,L)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||w===s.memoizedProps&&ee===s.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||w===s.memoizedProps&&ee===s.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=ie),x.props=d,x.state=ie,x.context=L,d=le):(typeof x.componentDidUpdate!="function"||w===s.memoizedProps&&ee===s.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||w===s.memoizedProps&&ee===s.memoizedState||(o.flags|=1024),d=!1)}return x=d,$f(s,o),d=(o.flags&128)!==0,x||d?(x=o.stateNode,u=d&&typeof u.getDerivedStateFromError!="function"?null:x.render(),o.flags|=1,s!==null&&d?(o.child=ol(o,s.child,null,g),o.child=ol(o,null,u,g)):Jt(s,o,u,g),o.memoizedState=x.state,s=o.child):s=dr(s,o,g),s}function YS(s,o,u,d){return nl(),o.flags|=256,Jt(s,o,u,d),o.child}var Gp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hp(s){return{baseLanes:s,cachePool:_x()}}function Ip(s,o,u){return s=s!==null?s.childLanes&~u:0,o&&(s|=Ln),s}function WS(s,o,u){var d=o.pendingProps,g=!1,x=(o.flags&128)!==0,w;if((w=x)||(w=s!==null&&s.memoizedState===null?!1:(Pt.current&2)!==0),w&&(g=!0,o.flags&=-129),w=(o.flags&32)!==0,o.flags&=-33,s===null){if(Ge){if(g?ts(o):ns(),(s=yt)?(s=ev(s,ii),s=s!==null&&s.data!=="&"?s:null,s!==null&&(o.memoizedState={dehydrated:s,treeContext:Gr!==null?{id:Ei,overflow:_i}:null,retryLane:536870912,hydrationErrors:null},u=kx(s),u.return=o,o.child=u,Ft=o,yt=null)):s=null,s===null)throw Ir(o);return zg(s)?o.lanes=32:o.lanes=536870912,null}var C=d.children;return d=d.fallback,g?(ns(),g=o.mode,C=Pf({mode:"hidden",children:C},g),d=tl(d,g,u,null),C.return=o,d.return=o,C.sibling=d,o.child=C,d=o.child,d.memoizedState=Hp(u),d.childLanes=Ip(s,w,u),o.memoizedState=Gp,Go(null,d)):(ts(o),Fp(o,C))}var L=s.memoizedState;if(L!==null&&(C=L.dehydrated,C!==null)){if(x)o.flags&256?(ts(o),o.flags&=-257,o=Kp(s,o,u)):o.memoizedState!==null?(ns(),o.child=s.child,o.flags|=128,o=null):(ns(),C=d.fallback,g=o.mode,d=Pf({mode:"visible",children:d.children},g),C=tl(C,g,u,null),C.flags|=2,d.return=o,C.return=o,d.sibling=C,o.child=d,ol(o,s.child,null,u),d=o.child,d.memoizedState=Hp(u),d.childLanes=Ip(s,w,u),o.memoizedState=Gp,o=Go(null,d));else if(ts(o),zg(C)){if(w=C.nextSibling&&C.nextSibling.dataset,w)var J=w.dgst;w=J,d=Error(i(419)),d.stack="",d.digest=w,Mo({value:d,source:null,stack:null}),o=Kp(s,o,u)}else if(jt||aa(s,o,u,!1),w=(u&s.childLanes)!==0,jt||w){if(w=dt,w!==null&&(d=Xu(w,u),d!==0&&d!==L.retryLane))throw L.retryLane=d,el(s,d),Cn(w,s,d),Wp;Rg(C)||Xf(),o=Kp(s,o,u)}else Rg(C)?(o.flags|=192,o.child=s.child,o=null):(s=L.treeContext,yt=si(C.nextSibling),Ft=o,Ge=!0,Hr=null,ii=!1,s!==null&&Px(o,s),o=Fp(o,d.children),o.flags|=4096);return o}return g?(ns(),C=d.fallback,g=o.mode,L=s.child,J=L.sibling,d=ar(L,{mode:"hidden",children:d.children}),d.subtreeFlags=L.subtreeFlags&65011712,J!==null?C=ar(J,C):(C=tl(C,g,u,null),C.flags|=2),C.return=o,d.return=o,d.sibling=C,o.child=d,Go(null,d),d=o.child,C=s.child.memoizedState,C===null?C=Hp(u):(g=C.cachePool,g!==null?(L=Et._currentValue,g=g.parent!==L?{parent:L,pool:L}:g):g=_x(),C={baseLanes:C.baseLanes|u,cachePool:g}),d.memoizedState=C,d.childLanes=Ip(s,w,u),o.memoizedState=Gp,Go(s.child,d)):(ts(o),u=s.child,s=u.sibling,u=ar(u,{mode:"visible",children:d.children}),u.return=o,u.sibling=null,s!==null&&(w=o.deletions,w===null?(o.deletions=[s],o.flags|=16):w.push(s)),o.child=u,o.memoizedState=null,u)}function Fp(s,o){return o=Pf({mode:"visible",children:o},s.mode),o.return=s,s.child=o}function Pf(s,o){return s=Xn(22,s,null,o),s.lanes=0,s}function Kp(s,o,u){return ol(o,s.child,null,u),s=Fp(o,o.pendingProps.children),s.flags|=2,o.memoizedState=null,s}function US(s,o,u){s.lanes|=o;var d=s.alternate;d!==null&&(d.lanes|=o),dp(s.return,o,u)}function Jp(s,o,u,d,g,x){var w=s.memoizedState;w===null?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g,treeForkCount:x}:(w.isBackwards=o,w.rendering=null,w.renderingStartTime=0,w.last=d,w.tail=u,w.tailMode=g,w.treeForkCount=x)}function GS(s,o,u){var d=o.pendingProps,g=d.revealOrder,x=d.tail;d=d.children;var w=Pt.current,C=(w&2)!==0;if(C?(w=w&1|2,o.flags|=128):w&=1,te(Pt,w),Jt(s,o,d,u),d=Ge?jo:0,!C&&s!==null&&(s.flags&128)!==0)e:for(s=o.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&US(s,u,o);else if(s.tag===19)US(s,u,o);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(g){case"forwards":for(u=o.child,g=null;u!==null;)s=u.alternate,s!==null&&gf(s)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),Jp(o,!1,g,u,x,d);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(s=g.alternate,s!==null&&gf(s)===null){o.child=g;break}s=g.sibling,g.sibling=u,u=g,g=s}Jp(o,!0,u,null,x,d);break;case"together":Jp(o,!1,null,null,void 0,d);break;default:o.memoizedState=null}return o.child}function dr(s,o,u){if(s!==null&&(o.dependencies=s.dependencies),ss|=o.lanes,(u&o.childLanes)===0)if(s!==null){if(aa(s,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(s!==null&&o.child!==s.child)throw Error(i(153));if(o.child!==null){for(s=o.child,u=ar(s,s.pendingProps),o.child=u,u.return=o;s.sibling!==null;)s=s.sibling,u=u.sibling=ar(s,s.pendingProps),u.return=o;u.sibling=null}return o.child}function eg(s,o){return(s.lanes&o)!==0?!0:(s=s.dependencies,!!(s!==null&&of(s)))}function AR(s,o,u){switch(o.tag){case 3:fe(o,o.stateNode.containerInfo),Fr(o,Et,s.memoizedState.cache),nl();break;case 27:case 5:ze(o);break;case 4:fe(o,o.stateNode.containerInfo);break;case 10:Fr(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,kp(o),null;break;case 13:var d=o.memoizedState;if(d!==null)return d.dehydrated!==null?(ts(o),o.flags|=128,null):(u&o.child.childLanes)!==0?WS(s,o,u):(ts(o),s=dr(s,o,u),s!==null?s.sibling:null);ts(o);break;case 19:var g=(s.flags&128)!==0;if(d=(u&o.childLanes)!==0,d||(aa(s,o,u,!1),d=(u&o.childLanes)!==0),g){if(d)return GS(s,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),te(Pt,Pt.current),d)break;return null;case 22:return o.lanes=0,DS(s,o,u,o.pendingProps);case 24:Fr(o,Et,s.memoizedState.cache)}return dr(s,o,u)}function HS(s,o,u){if(s!==null)if(s.memoizedProps!==o.pendingProps)jt=!0;else{if(!eg(s,u)&&(o.flags&128)===0)return jt=!1,AR(s,o,u);jt=(s.flags&131072)!==0}else jt=!1,Ge&&(o.flags&1048576)!==0&&$x(o,jo,o.index);switch(o.lanes=0,o.tag){case 16:e:{var d=o.pendingProps;if(s=ll(o.elementType),o.type=s,typeof s=="function")sp(s)?(d=ul(s,d),o.tag=1,o=VS(null,o,s,d,u)):(o.tag=0,o=Up(null,o,s,d,u));else{if(s!=null){var g=s.$$typeof;if(g===$){o.tag=11,o=XS(null,o,s,d,u);break e}else if(g===E){o.tag=14,o=ZS(null,o,s,d,u);break e}}throw o=X(s)||s,Error(i(306,o,""))}}return o;case 0:return Up(s,o,o.type,o.pendingProps,u);case 1:return d=o.type,g=ul(d,o.pendingProps),VS(s,o,d,g,u);case 3:e:{if(fe(o,o.stateNode.containerInfo),s===null)throw Error(i(387));d=o.pendingProps;var x=o.memoizedState;g=x.element,Sp(s,o),No(o,d,null,u);var w=o.memoizedState;if(d=w.cache,Fr(o,Et,d),d!==x.cache&&Op(o,[Et],u,!0),Bo(),d=w.element,x.isDehydrated)if(x={element:d,isDehydrated:!1,cache:w.cache},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){o=YS(s,o,d,u);break e}else if(d!==g){g=ei(Error(i(424)),o),Mo(g),o=YS(s,o,d,u);break e}else{switch(s=o.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(yt=si(s.firstChild),Ft=o,Ge=!0,Hr=null,ii=!0,u=Dx(o,null,d,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(nl(),d===g){o=dr(s,o,u);break e}Jt(s,o,d,u)}o=o.child}return o;case 26:return $f(s,o),s===null?(u=lv(o.type,null,o.pendingProps,null))?o.memoizedState=u:Ge||(u=o.type,s=o.pendingProps,d=Vf(he.current).createElement(u),d[Dt]=o,d[cn]=s,en(d,u,s),zt(d),o.stateNode=d):o.memoizedState=lv(o.type,s.memoizedProps,o.pendingProps,s.memoizedState),null;case 27:return ze(o),s===null&&Ge&&(d=o.stateNode=iv(o.type,o.pendingProps,he.current),Ft=o,ii=!0,g=yt,us(o.type)?(Eg=g,yt=si(d.firstChild)):yt=g),Jt(s,o,o.pendingProps.children,u),$f(s,o),s===null&&(o.flags|=4194304),o.child;case 5:return s===null&&Ge&&((g=d=yt)&&(d=lz(d,o.type,o.pendingProps,ii),d!==null?(o.stateNode=d,Ft=o,yt=si(d.firstChild),ii=!1,g=!0):g=!1),g||Ir(o)),ze(o),g=o.type,x=o.pendingProps,w=s!==null?s.memoizedProps:null,d=x.children,Pg(g,x)?d=null:w!==null&&Pg(g,w)&&(o.flags|=32),o.memoizedState!==null&&(g=$p(s,o,bR,null,null,u),cc._currentValue=g),$f(s,o),Jt(s,o,d,u),o.child;case 6:return s===null&&Ge&&((s=u=yt)&&(u=az(u,o.pendingProps,ii),u!==null?(o.stateNode=u,Ft=o,yt=null,s=!0):s=!1),s||Ir(o)),null;case 13:return WS(s,o,u);case 4:return fe(o,o.stateNode.containerInfo),d=o.pendingProps,s===null?o.child=ol(o,null,d,u):Jt(s,o,d,u),o.child;case 11:return XS(s,o,o.type,o.pendingProps,u);case 7:return Jt(s,o,o.pendingProps,u),o.child;case 8:return Jt(s,o,o.pendingProps.children,u),o.child;case 12:return Jt(s,o,o.pendingProps.children,u),o.child;case 10:return d=o.pendingProps,Fr(o,o.type,d.value),Jt(s,o,d.children,u),o.child;case 9:return g=o.type._context,d=o.pendingProps.children,rl(o),g=Kt(g),d=d(g),o.flags|=1,Jt(s,o,d,u),o.child;case 14:return ZS(s,o,o.type,o.pendingProps,u);case 15:return qS(s,o,o.type,o.pendingProps,u);case 19:return GS(s,o,u);case 31:return CR(s,o,u);case 22:return DS(s,o,u,o.pendingProps);case 24:return rl(o),d=Kt(Et),s===null?(g=mp(),g===null&&(g=dt,x=pp(),g.pooledCache=x,x.refCount++,x!==null&&(g.pooledCacheLanes|=u),g=x),o.memoizedState={parent:d,cache:g},xp(o),Fr(o,Et,g)):((s.lanes&u)!==0&&(Sp(s,o),No(o,null,null,u),Bo()),g=s.memoizedState,x=o.memoizedState,g.parent!==d?(g={parent:d,cache:d},o.memoizedState=g,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=g),Fr(o,Et,d)):(d=x.cache,Fr(o,Et,d),d!==g.cache&&Op(o,[Et],u,!0))),Jt(s,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(i(156,o.tag))}function Or(s){s.flags|=4}function tg(s,o,u,d,g){if((o=(s.mode&32)!==0)&&(o=!1),o){if(s.flags|=16777216,(g&335544128)===g)if(s.stateNode.complete)s.flags|=8192;else if(vb())s.flags|=8192;else throw al=hf,yp}else s.flags&=-16777217}function IS(s,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!fv(o))if(vb())s.flags|=8192;else throw al=hf,yp}function Cf(s,o){o!==null&&(s.flags|=4),s.flags&16384&&(o=s.tag!==22?_u():536870912,s.lanes|=o,xa|=o)}function Ho(s,o){if(!Ge)switch(s.tailMode){case"hidden":o=s.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?s.tail=null:u.sibling=null;break;case"collapsed":u=s.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?o||s.tail===null?s.tail=null:s.tail.sibling=null:d.sibling=null}}function xt(s){var o=s.alternate!==null&&s.alternate.child===s.child,u=0,d=0;if(o)for(var g=s.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=s,g=g.sibling;else for(g=s.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=s,g=g.sibling;return s.subtreeFlags|=d,s.childLanes=u,o}function RR(s,o,u){var d=o.pendingProps;switch(cp(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(o),null;case 1:return xt(o),null;case 3:return u=o.stateNode,d=null,s!==null&&(d=s.memoizedState.cache),o.memoizedState.cache!==d&&(o.flags|=2048),ur(Et),ge(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(s===null||s.child===null)&&(la(o)?Or(o):s===null||s.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,fp())),xt(o),null;case 26:var g=o.type,x=o.memoizedState;return s===null?(Or(o),x!==null?(xt(o),IS(o,x)):(xt(o),tg(o,g,null,d,u))):x?x!==s.memoizedState?(Or(o),xt(o),IS(o,x)):(xt(o),o.flags&=-16777217):(s=s.memoizedProps,s!==d&&Or(o),xt(o),tg(o,g,s,d,u)),null;case 27:if(Re(o),u=he.current,g=o.type,s!==null&&o.stateNode!=null)s.memoizedProps!==d&&Or(o);else{if(!d){if(o.stateNode===null)throw Error(i(166));return xt(o),null}s=re.current,la(o)?Cx(o):(s=iv(g,d,u),o.stateNode=s,Or(o))}return xt(o),null;case 5:if(Re(o),g=o.type,s!==null&&o.stateNode!=null)s.memoizedProps!==d&&Or(o);else{if(!d){if(o.stateNode===null)throw Error(i(166));return xt(o),null}if(x=re.current,la(o))Cx(o);else{var w=Vf(he.current);switch(x){case 1:x=w.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:x=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":x=w.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":x=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":x=w.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof d.is=="string"?w.createElement("select",{is:d.is}):w.createElement("select"),d.multiple?x.multiple=!0:d.size&&(x.size=d.size);break;default:x=typeof d.is=="string"?w.createElement(g,{is:d.is}):w.createElement(g)}}x[Dt]=o,x[cn]=d;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)x.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=x;e:switch(en(x,g,d),g){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Or(o)}}return xt(o),tg(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,u),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==d&&Or(o);else{if(typeof d!="string"&&o.stateNode===null)throw Error(i(166));if(s=he.current,la(o)){if(s=o.stateNode,u=o.memoizedProps,d=null,g=Ft,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}s[Dt]=o,s=!!(s.nodeValue===u||d!==null&&d.suppressHydrationWarning===!0||Wb(s.nodeValue,u)),s||Ir(o,!0)}else s=Vf(s).createTextNode(d),s[Dt]=o,o.stateNode=s}return xt(o),null;case 31:if(u=o.memoizedState,s===null||s.memoizedState!==null){if(d=la(o),u!==null){if(s===null){if(!d)throw Error(i(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Dt]=o}else nl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;xt(o),s=!1}else u=fp(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=u),s=!0;if(!s)return o.flags&256?(qn(o),o):(qn(o),null);if((o.flags&128)!==0)throw Error(i(558))}return xt(o),null;case 13:if(d=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(g=la(o),d!==null&&d.dehydrated!==null){if(s===null){if(!g)throw Error(i(318));if(g=o.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(i(317));g[Dt]=o}else nl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;xt(o),g=!1}else g=fp(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=g),g=!0;if(!g)return o.flags&256?(qn(o),o):(qn(o),null)}return qn(o),(o.flags&128)!==0?(o.lanes=u,o):(u=d!==null,s=s!==null&&s.memoizedState!==null,u&&(d=o.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool),x=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(x=d.memoizedState.cachePool.pool),x!==g&&(d.flags|=2048)),u!==s&&u&&(o.child.flags|=8192),Cf(o,o.updateQueue),xt(o),null);case 4:return ge(),s===null&&Qg(o.stateNode.containerInfo),xt(o),null;case 10:return ur(o.type),xt(o),null;case 19:if(Z(Pt),d=o.memoizedState,d===null)return xt(o),null;if(g=(o.flags&128)!==0,x=d.rendering,x===null)if(g)Ho(d,!1);else{if(Tt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(x=gf(s),x!==null){for(o.flags|=128,Ho(d,!1),s=x.updateQueue,o.updateQueue=s,Cf(o,s),o.subtreeFlags=0,s=u,u=o.child;u!==null;)wx(u,s),u=u.sibling;return te(Pt,Pt.current&1|2),Ge&&or(o,d.treeForkCount),o.child}s=s.sibling}d.tail!==null&&It()>_f&&(o.flags|=128,g=!0,Ho(d,!1),o.lanes=4194304)}else{if(!g)if(s=gf(x),s!==null){if(o.flags|=128,g=!0,s=s.updateQueue,o.updateQueue=s,Cf(o,s),Ho(d,!0),d.tail===null&&d.tailMode==="hidden"&&!x.alternate&&!Ge)return xt(o),null}else 2*It()-d.renderingStartTime>_f&&u!==536870912&&(o.flags|=128,g=!0,Ho(d,!1),o.lanes=4194304);d.isBackwards?(x.sibling=o.child,o.child=x):(s=d.last,s!==null?s.sibling=x:o.child=x,d.last=x)}return d.tail!==null?(s=d.tail,d.rendering=s,d.tail=s.sibling,d.renderingStartTime=It(),s.sibling=null,u=Pt.current,te(Pt,g?u&1|2:u&1),Ge&&or(o,d.treeForkCount),s):(xt(o),null);case 22:case 23:return qn(o),wp(),d=o.memoizedState!==null,s!==null?s.memoizedState!==null!==d&&(o.flags|=8192):d&&(o.flags|=8192),d?(u&536870912)!==0&&(o.flags&128)===0&&(xt(o),o.subtreeFlags&6&&(o.flags|=8192)):xt(o),u=o.updateQueue,u!==null&&Cf(o,u.retryQueue),u=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==u&&(o.flags|=2048),s!==null&&Z(sl),null;case 24:return u=null,s!==null&&(u=s.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),ur(Et),xt(o),null;case 25:return null;case 30:return null}throw Error(i(156,o.tag))}function zR(s,o){switch(cp(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return ur(Et),ge(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Re(o),null;case 31:if(o.memoizedState!==null){if(qn(o),o.alternate===null)throw Error(i(340));nl()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(qn(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(i(340));nl()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return Z(Pt),null;case 4:return ge(),null;case 10:return ur(o.type),null;case 22:case 23:return qn(o),wp(),s!==null&&Z(sl),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return ur(Et),null;case 25:return null;default:return null}}function FS(s,o){switch(cp(o),o.tag){case 3:ur(Et),ge();break;case 26:case 27:case 5:Re(o);break;case 4:ge();break;case 31:o.memoizedState!==null&&qn(o);break;case 13:qn(o);break;case 19:Z(Pt);break;case 10:ur(o.type);break;case 22:case 23:qn(o),wp(),s!==null&&Z(sl);break;case 24:ur(Et)}}function Io(s,o){try{var u=o.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var g=d.next;u=g;do{if((u.tag&s)===s){d=void 0;var x=u.create,w=u.inst;d=x(),w.destroy=d}u=u.next}while(u!==g)}}catch(C){ct(o,o.return,C)}}function is(s,o,u){try{var d=o.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var x=g.next;d=x;do{if((d.tag&s)===s){var w=d.inst,C=w.destroy;if(C!==void 0){w.destroy=void 0,g=o;var L=u,J=C;try{J()}catch(le){ct(g,L,le)}}}d=d.next}while(d!==x)}}catch(le){ct(o,o.return,le)}}function KS(s){var o=s.updateQueue;if(o!==null){var u=s.stateNode;try{Bx(o,u)}catch(d){ct(s,s.return,d)}}}function JS(s,o,u){u.props=ul(s.type,s.memoizedProps),u.state=s.memoizedState;try{u.componentWillUnmount()}catch(d){ct(s,o,d)}}function Fo(s,o){try{var u=s.ref;if(u!==null){switch(s.tag){case 26:case 27:case 5:var d=s.stateNode;break;case 30:d=s.stateNode;break;default:d=s.stateNode}typeof u=="function"?s.refCleanup=u(d):u.current=d}}catch(g){ct(s,o,g)}}function ji(s,o){var u=s.ref,d=s.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(g){ct(s,o,g)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){ct(s,o,g)}else u.current=null}function eb(s){var o=s.type,u=s.memoizedProps,d=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&d.focus();break e;case"img":u.src?d.src=u.src:u.srcSet&&(d.srcset=u.srcSet)}}catch(g){ct(s,s.return,g)}}function ng(s,o,u){try{var d=s.stateNode;ez(d,s.type,u,o),d[cn]=o}catch(g){ct(s,s.return,g)}}function tb(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&us(s.type)||s.tag===4}function ig(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||tb(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&us(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function rg(s,o,u){var d=s.tag;if(d===5||d===6)s=s.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(s,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(s),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=sr));else if(d!==4&&(d===27&&us(s.type)&&(u=s.stateNode,o=null),s=s.child,s!==null))for(rg(s,o,u),s=s.sibling;s!==null;)rg(s,o,u),s=s.sibling}function Af(s,o,u){var d=s.tag;if(d===5||d===6)s=s.stateNode,o?u.insertBefore(s,o):u.appendChild(s);else if(d!==4&&(d===27&&us(s.type)&&(u=s.stateNode),s=s.child,s!==null))for(Af(s,o,u),s=s.sibling;s!==null;)Af(s,o,u),s=s.sibling}function nb(s){var o=s.stateNode,u=s.memoizedProps;try{for(var d=s.type,g=o.attributes;g.length;)o.removeAttributeNode(g[0]);en(o,d,u),o[Dt]=s,o[cn]=u}catch(x){ct(s,s.return,x)}}var pr=!1,Mt=!1,sg=!1,ib=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function ER(s,o){if(s=s.containerInfo,Tg=Ff,s=px(s),KO(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{u=(u=s.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,x=d.focusNode;d=d.focusOffset;try{u.nodeType,x.nodeType}catch{u=null;break e}var w=0,C=-1,L=-1,J=0,le=0,ce=s,ee=null;t:for(;;){for(var ie;ce!==u||g!==0&&ce.nodeType!==3||(C=w+g),ce!==x||d!==0&&ce.nodeType!==3||(L=w+d),ce.nodeType===3&&(w+=ce.nodeValue.length),(ie=ce.firstChild)!==null;)ee=ce,ce=ie;for(;;){if(ce===s)break t;if(ee===u&&++J===g&&(C=w),ee===x&&++le===d&&(L=w),(ie=ce.nextSibling)!==null)break;ce=ee,ee=ce.parentNode}ce=ie}u=C===-1||L===-1?null:{start:C,end:L}}else u=null}u=u||{start:0,end:0}}else u=null;for($g={focusedElem:s,selectionRange:u},Ff=!1,Wt=o;Wt!==null;)if(o=Wt,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,Wt=s;else for(;Wt!==null;){switch(o=Wt,x=o.alternate,s=o.flags,o.tag){case 0:if((s&4)!==0&&(s=o.updateQueue,s=s!==null?s.events:null,s!==null))for(u=0;u<s.length;u++)g=s[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&x!==null){s=void 0,u=o,g=x.memoizedProps,x=x.memoizedState,d=u.stateNode;try{var Se=ul(u.type,g);s=d.getSnapshotBeforeUpdate(Se,x),d.__reactInternalSnapshotBeforeUpdate=s}catch(Ae){ct(u,u.return,Ae)}}break;case 3:if((s&1024)!==0){if(s=o.stateNode.containerInfo,u=s.nodeType,u===9)Ag(s);else if(u===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Ag(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(i(163))}if(s=o.sibling,s!==null){s.return=o.return,Wt=s;break}Wt=o.return}}function rb(s,o,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:mr(s,u),d&4&&Io(5,u);break;case 1:if(mr(s,u),d&4)if(s=u.stateNode,o===null)try{s.componentDidMount()}catch(w){ct(u,u.return,w)}else{var g=ul(u.type,o.memoizedProps);o=o.memoizedState;try{s.componentDidUpdate(g,o,s.__reactInternalSnapshotBeforeUpdate)}catch(w){ct(u,u.return,w)}}d&64&&KS(u),d&512&&Fo(u,u.return);break;case 3:if(mr(s,u),d&64&&(s=u.updateQueue,s!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{Bx(s,o)}catch(w){ct(u,u.return,w)}}break;case 27:o===null&&d&4&&nb(u);case 26:case 5:mr(s,u),o===null&&d&4&&eb(u),d&512&&Fo(u,u.return);break;case 12:mr(s,u);break;case 31:mr(s,u),d&4&&ab(s,u);break;case 13:mr(s,u),d&4&&ob(s,u),d&64&&(s=u.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(u=BR.bind(null,u),oz(s,u))));break;case 22:if(d=u.memoizedState!==null||pr,!d){o=o!==null&&o.memoizedState!==null||Mt,g=pr;var x=Mt;pr=d,(Mt=o)&&!x?yr(s,u,(u.subtreeFlags&8772)!==0):mr(s,u),pr=g,Mt=x}break;case 30:break;default:mr(s,u)}}function sb(s){var o=s.alternate;o!==null&&(s.alternate=null,sb(o)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(o=s.stateNode,o!==null&&Qo(o)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var St=null,kn=!1;function gr(s,o,u){for(u=u.child;u!==null;)lb(s,o,u),u=u.sibling}function lb(s,o,u){if(pn&&typeof pn.onCommitFiberUnmount=="function")try{pn.onCommitFiberUnmount(Ys,u)}catch{}switch(u.tag){case 26:Mt||ji(u,o),gr(s,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Mt||ji(u,o);var d=St,g=kn;us(u.type)&&(St=u.stateNode,kn=!1),gr(s,o,u),lc(u.stateNode),St=d,kn=g;break;case 5:Mt||ji(u,o);case 6:if(d=St,g=kn,St=null,gr(s,o,u),St=d,kn=g,St!==null)if(kn)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(u.stateNode)}catch(x){ct(u,o,x)}else try{St.removeChild(u.stateNode)}catch(x){ct(u,o,x)}break;case 18:St!==null&&(kn?(s=St,Kb(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,u.stateNode),$a(s)):Kb(St,u.stateNode));break;case 4:d=St,g=kn,St=u.stateNode.containerInfo,kn=!0,gr(s,o,u),St=d,kn=g;break;case 0:case 11:case 14:case 15:is(2,u,o),Mt||is(4,u,o),gr(s,o,u);break;case 1:Mt||(ji(u,o),d=u.stateNode,typeof d.componentWillUnmount=="function"&&JS(u,o,d)),gr(s,o,u);break;case 21:gr(s,o,u);break;case 22:Mt=(d=Mt)||u.memoizedState!==null,gr(s,o,u),Mt=d;break;default:gr(s,o,u)}}function ab(s,o){if(o.memoizedState===null&&(s=o.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{$a(s)}catch(u){ct(o,o.return,u)}}}function ob(s,o){if(o.memoizedState===null&&(s=o.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{$a(s)}catch(u){ct(o,o.return,u)}}function _R(s){switch(s.tag){case 31:case 13:case 19:var o=s.stateNode;return o===null&&(o=s.stateNode=new ib),o;case 22:return s=s.stateNode,o=s._retryCache,o===null&&(o=s._retryCache=new ib),o;default:throw Error(i(435,s.tag))}}function Rf(s,o){var u=_R(s);o.forEach(function(d){if(!u.has(d)){u.add(d);var g=NR.bind(null,s,d);d.then(g,g)}})}function Tn(s,o){var u=o.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d],x=s,w=o,C=w;e:for(;C!==null;){switch(C.tag){case 27:if(us(C.type)){St=C.stateNode,kn=!1;break e}break;case 5:St=C.stateNode,kn=!1;break e;case 3:case 4:St=C.stateNode.containerInfo,kn=!0;break e}C=C.return}if(St===null)throw Error(i(160));lb(x,w,g),St=null,kn=!1,x=g.alternate,x!==null&&(x.return=null),g.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)cb(o,s),o=o.sibling}var mi=null;function cb(s,o){var u=s.alternate,d=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Tn(o,s),$n(s),d&4&&(is(3,s,s.return),Io(3,s),is(5,s,s.return));break;case 1:Tn(o,s),$n(s),d&512&&(Mt||u===null||ji(u,u.return)),d&64&&pr&&(s=s.updateQueue,s!==null&&(d=s.callbacks,d!==null&&(u=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=u===null?d:u.concat(d))));break;case 26:var g=mi;if(Tn(o,s),$n(s),d&512&&(Mt||u===null||ji(u,u.return)),d&4){var x=u!==null?u.memoizedState:null;if(d=s.memoizedState,u===null)if(d===null)if(s.stateNode===null){e:{d=s.type,u=s.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":x=g.getElementsByTagName("title")[0],(!x||x[Gs]||x[Dt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=g.createElement(d),g.head.insertBefore(x,g.querySelector("head > title"))),en(x,d,u),x[Dt]=s,zt(x),d=x;break e;case"link":var w=cv("link","href",g).get(d+(u.href||""));if(w){for(var C=0;C<w.length;C++)if(x=w[C],x.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&x.getAttribute("rel")===(u.rel==null?null:u.rel)&&x.getAttribute("title")===(u.title==null?null:u.title)&&x.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){w.splice(C,1);break t}}x=g.createElement(d),en(x,d,u),g.head.appendChild(x);break;case"meta":if(w=cv("meta","content",g).get(d+(u.content||""))){for(C=0;C<w.length;C++)if(x=w[C],x.getAttribute("content")===(u.content==null?null:""+u.content)&&x.getAttribute("name")===(u.name==null?null:u.name)&&x.getAttribute("property")===(u.property==null?null:u.property)&&x.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&x.getAttribute("charset")===(u.charSet==null?null:u.charSet)){w.splice(C,1);break t}}x=g.createElement(d),en(x,d,u),g.head.appendChild(x);break;default:throw Error(i(468,d))}x[Dt]=s,zt(x),d=x}s.stateNode=d}else uv(g,s.type,s.stateNode);else s.stateNode=ov(g,d,s.memoizedProps);else x!==d?(x===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):x.count--,d===null?uv(g,s.type,s.stateNode):ov(g,d,s.memoizedProps)):d===null&&s.stateNode!==null&&ng(s,s.memoizedProps,u.memoizedProps)}break;case 27:Tn(o,s),$n(s),d&512&&(Mt||u===null||ji(u,u.return)),u!==null&&d&4&&ng(s,s.memoizedProps,u.memoizedProps);break;case 5:if(Tn(o,s),$n(s),d&512&&(Mt||u===null||ji(u,u.return)),s.flags&32){g=s.stateNode;try{Il(g,"")}catch(Se){ct(s,s.return,Se)}}d&4&&s.stateNode!=null&&(g=s.memoizedProps,ng(s,g,u!==null?u.memoizedProps:g)),d&1024&&(sg=!0);break;case 6:if(Tn(o,s),$n(s),d&4){if(s.stateNode===null)throw Error(i(162));d=s.memoizedProps,u=s.stateNode;try{u.nodeValue=d}catch(Se){ct(s,s.return,Se)}}break;case 3:if(Uf=null,g=mi,mi=Yf(o.containerInfo),Tn(o,s),mi=g,$n(s),d&4&&u!==null&&u.memoizedState.isDehydrated)try{$a(o.containerInfo)}catch(Se){ct(s,s.return,Se)}sg&&(sg=!1,ub(s));break;case 4:d=mi,mi=Yf(s.stateNode.containerInfo),Tn(o,s),$n(s),mi=d;break;case 12:Tn(o,s),$n(s);break;case 31:Tn(o,s),$n(s),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,Rf(s,d)));break;case 13:Tn(o,s),$n(s),s.child.flags&8192&&s.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Ef=It()),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,Rf(s,d)));break;case 22:g=s.memoizedState!==null;var L=u!==null&&u.memoizedState!==null,J=pr,le=Mt;if(pr=J||g,Mt=le||L,Tn(o,s),Mt=le,pr=J,$n(s),d&8192)e:for(o=s.stateNode,o._visibility=g?o._visibility&-2:o._visibility|1,g&&(u===null||L||pr||Mt||fl(s)),u=null,o=s;;){if(o.tag===5||o.tag===26){if(u===null){L=u=o;try{if(x=L.stateNode,g)w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{C=L.stateNode;var ce=L.memoizedProps.style,ee=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;C.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(Se){ct(L,L.return,Se)}}}else if(o.tag===6){if(u===null){L=o;try{L.stateNode.nodeValue=g?"":L.memoizedProps}catch(Se){ct(L,L.return,Se)}}}else if(o.tag===18){if(u===null){L=o;try{var ie=L.stateNode;g?Jb(ie,!0):Jb(L.stateNode,!1)}catch(Se){ct(L,L.return,Se)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===s)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}d&4&&(d=s.updateQueue,d!==null&&(u=d.retryQueue,u!==null&&(d.retryQueue=null,Rf(s,u))));break;case 19:Tn(o,s),$n(s),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,Rf(s,d)));break;case 30:break;case 21:break;default:Tn(o,s),$n(s)}}function $n(s){var o=s.flags;if(o&2){try{for(var u,d=s.return;d!==null;){if(tb(d)){u=d;break}d=d.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var g=u.stateNode,x=ig(s);Af(s,x,g);break;case 5:var w=u.stateNode;u.flags&32&&(Il(w,""),u.flags&=-33);var C=ig(s);Af(s,C,w);break;case 3:case 4:var L=u.stateNode.containerInfo,J=ig(s);rg(s,J,L);break;default:throw Error(i(161))}}catch(le){ct(s,s.return,le)}s.flags&=-3}o&4096&&(s.flags&=-4097)}function ub(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var o=s;ub(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),s=s.sibling}}function mr(s,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)rb(s,o.alternate,o),o=o.sibling}function fl(s){for(s=s.child;s!==null;){var o=s;switch(o.tag){case 0:case 11:case 14:case 15:is(4,o,o.return),fl(o);break;case 1:ji(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&JS(o,o.return,u),fl(o);break;case 27:lc(o.stateNode);case 26:case 5:ji(o,o.return),fl(o);break;case 22:o.memoizedState===null&&fl(o);break;case 30:fl(o);break;default:fl(o)}s=s.sibling}}function yr(s,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var d=o.alternate,g=s,x=o,w=x.flags;switch(x.tag){case 0:case 11:case 15:yr(g,x,u),Io(4,x);break;case 1:if(yr(g,x,u),d=x,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(J){ct(d,d.return,J)}if(d=x,g=d.updateQueue,g!==null){var C=d.stateNode;try{var L=g.shared.hiddenCallbacks;if(L!==null)for(g.shared.hiddenCallbacks=null,g=0;g<L.length;g++)Lx(L[g],C)}catch(J){ct(d,d.return,J)}}u&&w&64&&KS(x),Fo(x,x.return);break;case 27:nb(x);case 26:case 5:yr(g,x,u),u&&d===null&&w&4&&eb(x),Fo(x,x.return);break;case 12:yr(g,x,u);break;case 31:yr(g,x,u),u&&w&4&&ab(g,x);break;case 13:yr(g,x,u),u&&w&4&&ob(g,x);break;case 22:x.memoizedState===null&&yr(g,x,u),Fo(x,x.return);break;case 30:break;default:yr(g,x,u)}o=o.sibling}}function lg(s,o){var u=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),s=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(s=o.memoizedState.cachePool.pool),s!==u&&(s!=null&&s.refCount++,u!=null&&Xo(u))}function ag(s,o){s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==s&&(o.refCount++,s!=null&&Xo(s))}function yi(s,o,u,d){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)fb(s,o,u,d),o=o.sibling}function fb(s,o,u,d){var g=o.flags;switch(o.tag){case 0:case 11:case 15:yi(s,o,u,d),g&2048&&Io(9,o);break;case 1:yi(s,o,u,d);break;case 3:yi(s,o,u,d),g&2048&&(s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==s&&(o.refCount++,s!=null&&Xo(s)));break;case 12:if(g&2048){yi(s,o,u,d),s=o.stateNode;try{var x=o.memoizedProps,w=x.id,C=x.onPostCommit;typeof C=="function"&&C(w,o.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(L){ct(o,o.return,L)}}else yi(s,o,u,d);break;case 31:yi(s,o,u,d);break;case 13:yi(s,o,u,d);break;case 23:break;case 22:x=o.stateNode,w=o.alternate,o.memoizedState!==null?x._visibility&2?yi(s,o,u,d):Ko(s,o):x._visibility&2?yi(s,o,u,d):(x._visibility|=2,ga(s,o,u,d,(o.subtreeFlags&10256)!==0||!1)),g&2048&&lg(w,o);break;case 24:yi(s,o,u,d),g&2048&&ag(o.alternate,o);break;default:yi(s,o,u,d)}}function ga(s,o,u,d,g){for(g=g&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var x=s,w=o,C=u,L=d,J=w.flags;switch(w.tag){case 0:case 11:case 15:ga(x,w,C,L,g),Io(8,w);break;case 23:break;case 22:var le=w.stateNode;w.memoizedState!==null?le._visibility&2?ga(x,w,C,L,g):Ko(x,w):(le._visibility|=2,ga(x,w,C,L,g)),g&&J&2048&&lg(w.alternate,w);break;case 24:ga(x,w,C,L,g),g&&J&2048&&ag(w.alternate,w);break;default:ga(x,w,C,L,g)}o=o.sibling}}function Ko(s,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=s,d=o,g=d.flags;switch(d.tag){case 22:Ko(u,d),g&2048&&lg(d.alternate,d);break;case 24:Ko(u,d),g&2048&&ag(d.alternate,d);break;default:Ko(u,d)}o=o.sibling}}var Jo=8192;function ma(s,o,u){if(s.subtreeFlags&Jo)for(s=s.child;s!==null;)hb(s,o,u),s=s.sibling}function hb(s,o,u){switch(s.tag){case 26:ma(s,o,u),s.flags&Jo&&s.memoizedState!==null&&Sz(u,mi,s.memoizedState,s.memoizedProps);break;case 5:ma(s,o,u);break;case 3:case 4:var d=mi;mi=Yf(s.stateNode.containerInfo),ma(s,o,u),mi=d;break;case 22:s.memoizedState===null&&(d=s.alternate,d!==null&&d.memoizedState!==null?(d=Jo,Jo=16777216,ma(s,o,u),Jo=d):ma(s,o,u));break;default:ma(s,o,u)}}function db(s){var o=s.alternate;if(o!==null&&(s=o.child,s!==null)){o.child=null;do o=s.sibling,s.sibling=null,s=o;while(s!==null)}}function ec(s){var o=s.deletions;if((s.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var d=o[u];Wt=d,pb(d,s)}db(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Ob(s),s=s.sibling}function Ob(s){switch(s.tag){case 0:case 11:case 15:ec(s),s.flags&2048&&is(9,s,s.return);break;case 3:ec(s);break;case 12:ec(s);break;case 22:var o=s.stateNode;s.memoizedState!==null&&o._visibility&2&&(s.return===null||s.return.tag!==13)?(o._visibility&=-3,zf(s)):ec(s);break;default:ec(s)}}function zf(s){var o=s.deletions;if((s.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var d=o[u];Wt=d,pb(d,s)}db(s)}for(s=s.child;s!==null;){switch(o=s,o.tag){case 0:case 11:case 15:is(8,o,o.return),zf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,zf(o));break;default:zf(o)}s=s.sibling}}function pb(s,o){for(;Wt!==null;){var u=Wt;switch(u.tag){case 0:case 11:case 15:is(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var d=u.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Xo(u.memoizedState.cache)}if(d=u.child,d!==null)d.return=u,Wt=d;else e:for(u=s;Wt!==null;){d=Wt;var g=d.sibling,x=d.return;if(sb(d),d===u){Wt=null;break e}if(g!==null){g.return=x,Wt=g;break e}Wt=x}}}var jR={getCacheForType:function(s){var o=Kt(Et),u=o.data.get(s);return u===void 0&&(u=s(),o.data.set(s,u)),u},cacheSignal:function(){return Kt(Et).controller.signal}},MR=typeof WeakMap=="function"?WeakMap:Map,nt=0,dt=null,Le=null,Ve=0,ot=0,Dn=null,rs=!1,ya=!1,og=!1,xr=0,Tt=0,ss=0,hl=0,cg=0,Ln=0,xa=0,tc=null,Pn=null,ug=!1,Ef=0,gb=0,_f=1/0,jf=null,ls=null,Lt=0,as=null,Sa=null,Sr=0,fg=0,hg=null,mb=null,nc=0,dg=null;function Bn(){return(nt&2)!==0&&Ve!==0?Ve&-Ve:R.T!==null?xg():Zu()}function yb(){if(Ln===0)if((Ve&536870912)===0||Ge){var s=Vl;Vl<<=1,(Vl&3932160)===0&&(Vl=262144),Ln=s}else Ln=536870912;return s=Zn.current,s!==null&&(s.flags|=32),Ln}function Cn(s,o,u){(s===dt&&(ot===2||ot===9)||s.cancelPendingCommit!==null)&&(ba(s,0),os(s,Ve,Ln,!1)),Us(s,u),((nt&2)===0||s!==dt)&&(s===dt&&((nt&2)===0&&(hl|=u),Tt===4&&os(s,Ve,Ln,!1)),Mi(s))}function xb(s,o,u){if((nt&6)!==0)throw Error(i(327));var d=!u&&(o&127)===0&&(o&s.expiredLanes)===0||Ws(s,o),g=d?qR(s,o):pg(s,o,!0),x=d;do{if(g===0){ya&&!d&&os(s,o,0,!1);break}else{if(u=s.current.alternate,x&&!XR(u)){g=pg(s,o,!1),x=!1;continue}if(g===2){if(x=o,s.errorRecoveryDisabledLanes&x)var w=0;else w=s.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){o=w;e:{var C=s;g=tc;var L=C.current.memoizedState.isDehydrated;if(L&&(ba(C,w).flags|=256),w=pg(C,w,!1),w!==2){if(og&&!L){C.errorRecoveryDisabledLanes|=x,hl|=x,g=4;break e}x=Pn,Pn=g,x!==null&&(Pn===null?Pn=x:Pn.push.apply(Pn,x))}g=w}if(x=!1,g!==2)continue}}if(g===1){ba(s,0),os(s,o,0,!0);break}e:{switch(d=s,x=g,x){case 0:case 1:throw Error(i(345));case 4:if((o&4194048)!==o)break;case 6:os(d,o,Ln,!rs);break e;case 2:Pn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((o&62914560)===o&&(g=Ef+300-It(),10<g)){if(os(d,o,Ln,!rs),Wl(d,0,!0)!==0)break e;Sr=o,d.timeoutHandle=Ib(Sb.bind(null,d,u,Pn,jf,ug,o,Ln,hl,xa,rs,x,"Throttled",-0,0),g);break e}Sb(d,u,Pn,jf,ug,o,Ln,hl,xa,rs,x,null,-0,0)}}break}while(!0);Mi(s)}function Sb(s,o,u,d,g,x,w,C,L,J,le,ce,ee,ie){if(s.timeoutHandle=-1,ce=o.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:sr},hb(o,x,ce);var Se=(x&62914560)===x?Ef-It():(x&4194048)===x?gb-It():0;if(Se=bz(ce,Se),Se!==null){Sr=x,s.cancelPendingCommit=Se(Pb.bind(null,s,o,x,u,d,g,w,C,L,le,ce,null,ee,ie)),os(s,x,w,!J);return}}Pb(s,o,x,u,d,g,w,C,L)}function XR(s){for(var o=s;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var d=0;d<u.length;d++){var g=u[d],x=g.getSnapshot;g=g.value;try{if(!Mn(x(),g))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function os(s,o,u,d){o&=~cg,o&=~hl,s.suspendedLanes|=o,s.pingedLanes&=~o,d&&(s.warmLanes|=o),d=s.expirationTimes;for(var g=o;0<g;){var x=31-gn(g),w=1<<x;d[x]=-1,g&=~w}u!==0&&ju(s,u,o)}function Mf(){return(nt&6)===0?(ic(0),!1):!0}function Og(){if(Le!==null){if(ot===0)var s=Le.return;else s=Le,cr=il=null,Ap(s),fa=null,qo=0,s=Le;for(;s!==null;)FS(s.alternate,s),s=s.return;Le=null}}function ba(s,o){var u=s.timeoutHandle;u!==-1&&(s.timeoutHandle=-1,iz(u)),u=s.cancelPendingCommit,u!==null&&(s.cancelPendingCommit=null,u()),Sr=0,Og(),dt=s,Le=u=ar(s.current,null),Ve=o,ot=0,Dn=null,rs=!1,ya=Ws(s,o),og=!1,xa=Ln=cg=hl=ss=Tt=0,Pn=tc=null,ug=!1,(o&8)!==0&&(o|=o&32);var d=s.entangledLanes;if(d!==0)for(s=s.entanglements,d&=o;0<d;){var g=31-gn(d),x=1<<g;o|=s[g],d&=~x}return xr=o,nf(),u}function bb(s,o){Xe=null,R.H=Uo,o===ua||o===ff?(o=Xx(),ot=3):o===yp?(o=Xx(),ot=4):ot=o===Wp?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Dn=o,Le===null&&(Tt=1,kf(s,ei(o,s.current)))}function vb(){var s=Zn.current;return s===null?!0:(Ve&4194048)===Ve?ri===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?s===ri:!1}function Qb(){var s=R.H;return R.H=Uo,s===null?Uo:s}function wb(){var s=R.A;return R.A=jR,s}function Xf(){Tt=4,rs||(Ve&4194048)!==Ve&&Zn.current!==null||(ya=!0),(ss&134217727)===0&&(hl&134217727)===0||dt===null||os(dt,Ve,Ln,!1)}function pg(s,o,u){var d=nt;nt|=2;var g=Qb(),x=wb();(dt!==s||Ve!==o)&&(jf=null,ba(s,o)),o=!1;var w=Tt;e:do try{if(ot!==0&&Le!==null){var C=Le,L=Dn;switch(ot){case 8:Og(),w=6;break e;case 3:case 2:case 9:case 6:Zn.current===null&&(o=!0);var J=ot;if(ot=0,Dn=null,va(s,C,L,J),u&&ya){w=0;break e}break;default:J=ot,ot=0,Dn=null,va(s,C,L,J)}}ZR(),w=Tt;break}catch(le){bb(s,le)}while(!0);return o&&s.shellSuspendCounter++,cr=il=null,nt=d,R.H=g,R.A=x,Le===null&&(dt=null,Ve=0,nf()),w}function ZR(){for(;Le!==null;)kb(Le)}function qR(s,o){var u=nt;nt|=2;var d=Qb(),g=wb();dt!==s||Ve!==o?(jf=null,_f=It()+500,ba(s,o)):ya=Ws(s,o);e:do try{if(ot!==0&&Le!==null){o=Le;var x=Dn;t:switch(ot){case 1:ot=0,Dn=null,va(s,o,x,1);break;case 2:case 9:if(jx(x)){ot=0,Dn=null,Tb(o);break}o=function(){ot!==2&&ot!==9||dt!==s||(ot=7),Mi(s)},x.then(o,o);break e;case 3:ot=7;break e;case 4:ot=5;break e;case 7:jx(x)?(ot=0,Dn=null,Tb(o)):(ot=0,Dn=null,va(s,o,x,7));break;case 5:var w=null;switch(Le.tag){case 26:w=Le.memoizedState;case 5:case 27:var C=Le;if(w?fv(w):C.stateNode.complete){ot=0,Dn=null;var L=C.sibling;if(L!==null)Le=L;else{var J=C.return;J!==null?(Le=J,Zf(J)):Le=null}break t}}ot=0,Dn=null,va(s,o,x,5);break;case 6:ot=0,Dn=null,va(s,o,x,6);break;case 8:Og(),Tt=6;break e;default:throw Error(i(462))}}DR();break}catch(le){bb(s,le)}while(!0);return cr=il=null,R.H=d,R.A=g,nt=u,Le!==null?0:(dt=null,Ve=0,nf(),Tt)}function DR(){for(;Le!==null&&!Bs();)kb(Le)}function kb(s){var o=HS(s.alternate,s,xr);s.memoizedProps=s.pendingProps,o===null?Zf(s):Le=o}function Tb(s){var o=s,u=o.alternate;switch(o.tag){case 15:case 0:o=NS(u,o,o.pendingProps,o.type,void 0,Ve);break;case 11:o=NS(u,o,o.pendingProps,o.type.render,o.ref,Ve);break;case 5:Ap(o);default:FS(u,o),o=Le=wx(o,xr),o=HS(u,o,xr)}s.memoizedProps=s.pendingProps,o===null?Zf(s):Le=o}function va(s,o,u,d){cr=il=null,Ap(o),fa=null,qo=0;var g=o.return;try{if(PR(s,g,o,u,Ve)){Tt=1,kf(s,ei(u,s.current)),Le=null;return}}catch(x){if(g!==null)throw Le=g,x;Tt=1,kf(s,ei(u,s.current)),Le=null;return}o.flags&32768?(Ge||d===1?s=!0:ya||(Ve&536870912)!==0?s=!1:(rs=s=!0,(d===2||d===9||d===3||d===6)&&(d=Zn.current,d!==null&&d.tag===13&&(d.flags|=16384))),$b(o,s)):Zf(o)}function Zf(s){var o=s;do{if((o.flags&32768)!==0){$b(o,rs);return}s=o.return;var u=RR(o.alternate,o,xr);if(u!==null){Le=u;return}if(o=o.sibling,o!==null){Le=o;return}Le=o=s}while(o!==null);Tt===0&&(Tt=5)}function $b(s,o){do{var u=zR(s.alternate,s);if(u!==null){u.flags&=32767,Le=u;return}if(u=s.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(s=s.sibling,s!==null)){Le=s;return}Le=s=u}while(s!==null);Tt=6,Le=null}function Pb(s,o,u,d,g,x,w,C,L){s.cancelPendingCommit=null;do qf();while(Lt!==0);if((nt&6)!==0)throw Error(i(327));if(o!==null){if(o===s.current)throw Error(i(177));if(x=o.lanes|o.childLanes,x|=ip,EO(s,u,x,w,C,L),s===dt&&(Le=dt=null,Ve=0),Sa=o,as=s,Sr=u,fg=x,hg=g,mb=d,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,VR(Vs,function(){return Eb(),null})):(s.callbackNode=null,s.callbackPriority=0),d=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||d){d=R.T,R.T=null,g=q.p,q.p=2,w=nt,nt|=4;try{ER(s,o,u)}finally{nt=w,q.p=g,R.T=d}}Lt=1,Cb(),Ab(),Rb()}}function Cb(){if(Lt===1){Lt=0;var s=as,o=Sa,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=R.T,R.T=null;var d=q.p;q.p=2;var g=nt;nt|=4;try{cb(o,s);var x=$g,w=px(s.containerInfo),C=x.focusedElem,L=x.selectionRange;if(w!==C&&C&&C.ownerDocument&&Ox(C.ownerDocument.documentElement,C)){if(L!==null&&KO(C)){var J=L.start,le=L.end;if(le===void 0&&(le=J),"selectionStart"in C)C.selectionStart=J,C.selectionEnd=Math.min(le,C.value.length);else{var ce=C.ownerDocument||document,ee=ce&&ce.defaultView||window;if(ee.getSelection){var ie=ee.getSelection(),Se=C.textContent.length,Ae=Math.min(L.start,Se),ht=L.end===void 0?Ae:Math.min(L.end,Se);!ie.extend&&Ae>ht&&(w=ht,ht=Ae,Ae=w);var I=dx(C,Ae),U=dx(C,ht);if(I&&U&&(ie.rangeCount!==1||ie.anchorNode!==I.node||ie.anchorOffset!==I.offset||ie.focusNode!==U.node||ie.focusOffset!==U.offset)){var K=ce.createRange();K.setStart(I.node,I.offset),ie.removeAllRanges(),Ae>ht?(ie.addRange(K),ie.extend(U.node,U.offset)):(K.setEnd(U.node,U.offset),ie.addRange(K))}}}}for(ce=[],ie=C;ie=ie.parentNode;)ie.nodeType===1&&ce.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<ce.length;C++){var ae=ce[C];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}Ff=!!Tg,$g=Tg=null}finally{nt=g,q.p=d,R.T=u}}s.current=o,Lt=2}}function Ab(){if(Lt===2){Lt=0;var s=as,o=Sa,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=R.T,R.T=null;var d=q.p;q.p=2;var g=nt;nt|=4;try{rb(s,o.alternate,o)}finally{nt=g,q.p=d,R.T=u}}Lt=3}}function Rb(){if(Lt===4||Lt===3){Lt=0,Ns();var s=as,o=Sa,u=Sr,d=mb;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Lt=5:(Lt=0,Sa=as=null,zb(s,s.pendingLanes));var g=s.pendingLanes;if(g===0&&(ls=null),vo(u),o=o.stateNode,pn&&typeof pn.onCommitFiberRoot=="function")try{pn.onCommitFiberRoot(Ys,o,void 0,(o.current.flags&128)===128)}catch{}if(d!==null){o=R.T,g=q.p,q.p=2,R.T=null;try{for(var x=s.onRecoverableError,w=0;w<d.length;w++){var C=d[w];x(C.value,{componentStack:C.stack})}}finally{R.T=o,q.p=g}}(Sr&3)!==0&&qf(),Mi(s),g=s.pendingLanes,(u&261930)!==0&&(g&42)!==0?s===dg?nc++:(nc=0,dg=s):nc=0,ic(0)}}function zb(s,o){(s.pooledCacheLanes&=o)===0&&(o=s.pooledCache,o!=null&&(s.pooledCache=null,Xo(o)))}function qf(){return Cb(),Ab(),Rb(),Eb()}function Eb(){if(Lt!==5)return!1;var s=as,o=fg;fg=0;var u=vo(Sr),d=R.T,g=q.p;try{q.p=32>u?32:u,R.T=null,u=hg,hg=null;var x=as,w=Sr;if(Lt=0,Sa=as=null,Sr=0,(nt&6)!==0)throw Error(i(331));var C=nt;if(nt|=4,Ob(x.current),fb(x,x.current,w,u),nt=C,ic(0,!1),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(Ys,x)}catch{}return!0}finally{q.p=g,R.T=d,zb(s,o)}}function _b(s,o,u){o=ei(u,o),o=Yp(s.stateNode,o,2),s=es(s,o,2),s!==null&&(Us(s,2),Mi(s))}function ct(s,o,u){if(s.tag===3)_b(s,s,u);else for(;o!==null;){if(o.tag===3){_b(o,s,u);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ls===null||!ls.has(d))){s=ei(u,s),u=jS(2),d=es(o,u,2),d!==null&&(MS(u,d,o,s),Us(d,2),Mi(d));break}}o=o.return}}function gg(s,o,u){var d=s.pingCache;if(d===null){d=s.pingCache=new MR;var g=new Set;d.set(o,g)}else g=d.get(o),g===void 0&&(g=new Set,d.set(o,g));g.has(u)||(og=!0,g.add(u),s=LR.bind(null,s,o,u),o.then(s,s))}function LR(s,o,u){var d=s.pingCache;d!==null&&d.delete(o),s.pingedLanes|=s.suspendedLanes&u,s.warmLanes&=~u,dt===s&&(Ve&u)===u&&(Tt===4||Tt===3&&(Ve&62914560)===Ve&&300>It()-Ef?(nt&2)===0&&ba(s,0):cg|=u,xa===Ve&&(xa=0)),Mi(s)}function jb(s,o){o===0&&(o=_u()),s=el(s,o),s!==null&&(Us(s,o),Mi(s))}function BR(s){var o=s.memoizedState,u=0;o!==null&&(u=o.retryLane),jb(s,u)}function NR(s,o){var u=0;switch(s.tag){case 31:case 13:var d=s.stateNode,g=s.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=s.stateNode;break;case 22:d=s.stateNode._retryCache;break;default:throw Error(i(314))}d!==null&&d.delete(o),jb(s,u)}function VR(s,o){return an(s,o)}var Df=null,Qa=null,mg=!1,Lf=!1,yg=!1,cs=0;function Mi(s){s!==Qa&&s.next===null&&(Qa===null?Df=Qa=s:Qa=Qa.next=s),Lf=!0,mg||(mg=!0,WR())}function ic(s,o){if(!yg&&Lf){yg=!0;do for(var u=!1,d=Df;d!==null;){if(s!==0){var g=d.pendingLanes;if(g===0)var x=0;else{var w=d.suspendedLanes,C=d.pingedLanes;x=(1<<31-gn(42|s)+1)-1,x&=g&~(w&~C),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(u=!0,qb(d,x))}else x=Ve,x=Wl(d,d===dt?x:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(x&3)===0||Ws(d,x)||(u=!0,qb(d,x));d=d.next}while(u);yg=!1}}function YR(){Mb()}function Mb(){Lf=mg=!1;var s=0;cs!==0&&nz()&&(s=cs);for(var o=It(),u=null,d=Df;d!==null;){var g=d.next,x=Xb(d,o);x===0?(d.next=null,u===null?Df=g:u.next=g,g===null&&(Qa=u)):(u=d,(s!==0||(x&3)!==0)&&(Lf=!0)),d=g}Lt!==0&&Lt!==5||ic(s),cs!==0&&(cs=0)}function Xb(s,o){for(var u=s.suspendedLanes,d=s.pingedLanes,g=s.expirationTimes,x=s.pendingLanes&-62914561;0<x;){var w=31-gn(x),C=1<<w,L=g[w];L===-1?((C&u)===0||(C&d)!==0)&&(g[w]=zO(C,o)):L<=o&&(s.expiredLanes|=C),x&=~C}if(o=dt,u=Ve,u=Wl(s,s===o?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),d=s.callbackNode,u===0||s===o&&(ot===2||ot===9)||s.cancelPendingCommit!==null)return d!==null&&d!==null&&on(d),s.callbackNode=null,s.callbackPriority=0;if((u&3)===0||Ws(s,u)){if(o=u&-u,o===s.callbackPriority)return o;switch(d!==null&&on(d),vo(u)){case 2:case 8:u=Dr;break;case 32:u=Vs;break;case 268435456:u=Bl;break;default:u=Vs}return d=Zb.bind(null,s),u=an(u,d),s.callbackPriority=o,s.callbackNode=u,o}return d!==null&&d!==null&&on(d),s.callbackPriority=2,s.callbackNode=null,2}function Zb(s,o){if(Lt!==0&&Lt!==5)return s.callbackNode=null,s.callbackPriority=0,null;var u=s.callbackNode;if(qf()&&s.callbackNode!==u)return null;var d=Ve;return d=Wl(s,s===dt?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),d===0?null:(xb(s,d,o),Xb(s,It()),s.callbackNode!=null&&s.callbackNode===u?Zb.bind(null,s):null)}function qb(s,o){if(qf())return null;xb(s,o,!0)}function WR(){rz(function(){(nt&6)!==0?an(er,YR):Mb()})}function xg(){if(cs===0){var s=oa;s===0&&(s=Nl,Nl<<=1,(Nl&261888)===0&&(Nl=256)),cs=s}return cs}function Db(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Gu(""+s)}function Lb(s,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,s.id&&u.setAttribute("form",s.id),o.parentNode.insertBefore(u,o),s=new FormData(s),u.parentNode.removeChild(u),s}function UR(s,o,u,d,g){if(o==="submit"&&u&&u.stateNode===g){var x=Db((g[cn]||null).action),w=d.submitter;w&&(o=(o=w[cn]||null)?Db(o.formAction):w.getAttribute("formAction"),o!==null&&(x=o,w=null));var C=new Ku("action","action",null,d,g);s.push({event:C,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(cs!==0){var L=w?Lb(g,w):new FormData(g);qp(u,{pending:!0,data:L,method:g.method,action:x},null,L)}}else typeof x=="function"&&(C.preventDefault(),L=w?Lb(g,w):new FormData(g),qp(u,{pending:!0,data:L,method:g.method,action:x},x,L))},currentTarget:g}]})}}for(var Sg=0;Sg<np.length;Sg++){var bg=np[Sg],GR=bg.toLowerCase(),HR=bg[0].toUpperCase()+bg.slice(1);gi(GR,"on"+HR)}gi(yx,"onAnimationEnd"),gi(xx,"onAnimationIteration"),gi(Sx,"onAnimationStart"),gi("dblclick","onDoubleClick"),gi("focusin","onFocus"),gi("focusout","onBlur"),gi(fR,"onTransitionRun"),gi(hR,"onTransitionStart"),gi(dR,"onTransitionCancel"),gi(bx,"onTransitionEnd"),Yr("onMouseEnter",["mouseout","mouseover"]),Yr("onMouseLeave",["mouseout","mouseover"]),Yr("onPointerEnter",["pointerout","pointerover"]),Yr("onPointerLeave",["pointerout","pointerover"]),ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ir("onBeforeInput",["compositionend","keypress","textInput","paste"]),ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),IR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(rc));function Bb(s,o){o=(o&4)!==0;for(var u=0;u<s.length;u++){var d=s[u],g=d.event;d=d.listeners;e:{var x=void 0;if(o)for(var w=d.length-1;0<=w;w--){var C=d[w],L=C.instance,J=C.currentTarget;if(C=C.listener,L!==x&&g.isPropagationStopped())break e;x=C,g.currentTarget=J;try{x(g)}catch(le){tf(le)}g.currentTarget=null,x=L}else for(w=0;w<d.length;w++){if(C=d[w],L=C.instance,J=C.currentTarget,C=C.listener,L!==x&&g.isPropagationStopped())break e;x=C,g.currentTarget=J;try{x(g)}catch(le){tf(le)}g.currentTarget=null,x=L}}}}function Be(s,o){var u=o[Ul];u===void 0&&(u=o[Ul]=new Set);var d=s+"__bubble";u.has(d)||(Nb(o,s,2,!1),u.add(d))}function vg(s,o,u){var d=0;o&&(d|=4),Nb(u,s,d,o)}var Bf="_reactListening"+Math.random().toString(36).slice(2);function Qg(s){if(!s[Bf]){s[Bf]=!0,Bu.forEach(function(u){u!=="selectionchange"&&(IR.has(u)||vg(u,!1,s),vg(u,!0,s))});var o=s.nodeType===9?s:s.ownerDocument;o===null||o[Bf]||(o[Bf]=!0,vg("selectionchange",!1,o))}}function Nb(s,o,u,d){switch(yv(o)){case 2:var g=wz;break;case 8:g=kz;break;default:g=Zg}u=g.bind(null,o,u,s),g=void 0,!NO||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),d?g!==void 0?s.addEventListener(o,u,{capture:!0,passive:g}):s.addEventListener(o,u,!0):g!==void 0?s.addEventListener(o,u,{passive:g}):s.addEventListener(o,u,!1)}function wg(s,o,u,d,g){var x=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var w=d.tag;if(w===3||w===4){var C=d.stateNode.containerInfo;if(C===g)break;if(w===4)for(w=d.return;w!==null;){var L=w.tag;if((L===3||L===4)&&w.stateNode.containerInfo===g)return;w=w.return}for(;C!==null;){if(w=Lr(C),w===null)return;if(L=w.tag,L===5||L===6||L===26||L===27){d=x=w;continue e}C=C.parentNode}}d=d.return}G1(function(){var J=x,le=LO(u),ce=[];e:{var ee=vx.get(s);if(ee!==void 0){var ie=Ku,Se=s;switch(s){case"keypress":if(Iu(u)===0)break e;case"keydown":case"keyup":ie=N5;break;case"focusin":Se="focus",ie=UO;break;case"focusout":Se="blur",ie=UO;break;case"beforeblur":case"afterblur":ie=UO;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=F1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=R5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=W5;break;case yx:case xx:case Sx:ie=_5;break;case bx:ie=G5;break;case"scroll":case"scrollend":ie=C5;break;case"wheel":ie=I5;break;case"copy":case"cut":case"paste":ie=M5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=J1;break;case"toggle":case"beforetoggle":ie=K5}var Ae=(o&4)!==0,ht=!Ae&&(s==="scroll"||s==="scrollend"),I=Ae?ee!==null?ee+"Capture":null:ee;Ae=[];for(var U=J,K;U!==null;){var ae=U;if(K=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||K===null||I===null||(ae=To(U,I),ae!=null&&Ae.push(sc(U,ae,K))),ht)break;U=U.return}0<Ae.length&&(ee=new ie(ee,Se,null,u,le),ce.push({event:ee,listeners:Ae}))}}if((o&7)===0){e:{if(ee=s==="mouseover"||s==="pointerover",ie=s==="mouseout"||s==="pointerout",ee&&u!==DO&&(Se=u.relatedTarget||u.fromElement)&&(Lr(Se)||Se[nr]))break e;if((ie||ee)&&(ee=le.window===le?le:(ee=le.ownerDocument)?ee.defaultView||ee.parentWindow:window,ie?(Se=u.relatedTarget||u.toElement,ie=J,Se=Se?Lr(Se):null,Se!==null&&(ht=l(Se),Ae=Se.tag,Se!==ht||Ae!==5&&Ae!==27&&Ae!==6)&&(Se=null)):(ie=null,Se=J),ie!==Se)){if(Ae=F1,ae="onMouseLeave",I="onMouseEnter",U="mouse",(s==="pointerout"||s==="pointerover")&&(Ae=J1,ae="onPointerLeave",I="onPointerEnter",U="pointer"),ht=ie==null?ee:Nr(ie),K=Se==null?ee:Nr(Se),ee=new Ae(ae,U+"leave",ie,u,le),ee.target=ht,ee.relatedTarget=K,ae=null,Lr(le)===J&&(Ae=new Ae(I,U+"enter",Se,u,le),Ae.target=K,Ae.relatedTarget=ht,ae=Ae),ht=ae,ie&&Se)t:{for(Ae=FR,I=ie,U=Se,K=0,ae=I;ae;ae=Ae(ae))K++;ae=0;for(var $e=U;$e;$e=Ae($e))ae++;for(;0<K-ae;)I=Ae(I),K--;for(;0<ae-K;)U=Ae(U),ae--;for(;K--;){if(I===U||U!==null&&I===U.alternate){Ae=I;break t}I=Ae(I),U=Ae(U)}Ae=null}else Ae=null;ie!==null&&Vb(ce,ee,ie,Ae,!1),Se!==null&&ht!==null&&Vb(ce,ht,Se,Ae,!0)}}e:{if(ee=J?Nr(J):window,ie=ee.nodeName&&ee.nodeName.toLowerCase(),ie==="select"||ie==="input"&&ee.type==="file")var Je=ax;else if(sx(ee))if(ox)Je=oR;else{Je=lR;var be=sR}else ie=ee.nodeName,!ie||ie.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?J&&qO(J.elementType)&&(Je=ax):Je=aR;if(Je&&(Je=Je(s,J))){lx(ce,Je,u,le);break e}be&&be(s,ee,J),s==="focusout"&&J&&ee.type==="number"&&J.memoizedProps.value!=null&&ko(ee,"number",ee.value)}switch(be=J?Nr(J):window,s){case"focusin":(sx(be)||be.contentEditable==="true")&&(ea=be,JO=J,_o=null);break;case"focusout":_o=JO=ea=null;break;case"mousedown":ep=!0;break;case"contextmenu":case"mouseup":case"dragend":ep=!1,gx(ce,u,le);break;case"selectionchange":if(uR)break;case"keydown":case"keyup":gx(ce,u,le)}var De;if(HO)e:{switch(s){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Jl?ix(s,u)&&(Ye="onCompositionEnd"):s==="keydown"&&u.keyCode===229&&(Ye="onCompositionStart");Ye&&(ex&&u.locale!=="ko"&&(Jl||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Jl&&(De=H1()):(Ur=le,VO="value"in Ur?Ur.value:Ur.textContent,Jl=!0)),be=Nf(J,Ye),0<be.length&&(Ye=new K1(Ye,s,null,u,le),ce.push({event:Ye,listeners:be}),De?Ye.data=De:(De=rx(u),De!==null&&(Ye.data=De)))),(De=eR?tR(s,u):nR(s,u))&&(Ye=Nf(J,"onBeforeInput"),0<Ye.length&&(be=new K1("onBeforeInput","beforeinput",null,u,le),ce.push({event:be,listeners:Ye}),be.data=De)),UR(ce,s,J,u,le)}Bb(ce,o)})}function sc(s,o,u){return{instance:s,listener:o,currentTarget:u}}function Nf(s,o){for(var u=o+"Capture",d=[];s!==null;){var g=s,x=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||x===null||(g=To(s,u),g!=null&&d.unshift(sc(s,g,x)),g=To(s,o),g!=null&&d.push(sc(s,g,x))),s.tag===3)return d;s=s.return}return[]}function FR(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function Vb(s,o,u,d,g){for(var x=o._reactName,w=[];u!==null&&u!==d;){var C=u,L=C.alternate,J=C.stateNode;if(C=C.tag,L!==null&&L===d)break;C!==5&&C!==26&&C!==27||J===null||(L=J,g?(J=To(u,x),J!=null&&w.unshift(sc(u,J,L))):g||(J=To(u,x),J!=null&&w.push(sc(u,J,L)))),u=u.return}w.length!==0&&s.push({event:o,listeners:w})}var KR=/\r\n?/g,JR=/\u0000|\uFFFD/g;function Yb(s){return(typeof s=="string"?s:""+s).replace(KR,`
|
|
49
|
+
`).replace(JR,"")}function Wb(s,o){return o=Yb(o),Yb(s)===o}function ft(s,o,u,d,g,x){switch(u){case"children":typeof d=="string"?o==="body"||o==="textarea"&&d===""||Il(s,d):(typeof d=="number"||typeof d=="bigint")&&o!=="body"&&Il(s,""+d);break;case"className":Hl(s,"class",d);break;case"tabIndex":Hl(s,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Hl(s,u,d);break;case"style":W1(s,d,x);break;case"data":if(o!=="object"){Hl(s,"data",d);break}case"src":case"href":if(d===""&&(o!=="a"||u!=="href")){s.removeAttribute(u);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){s.removeAttribute(u);break}d=Gu(""+d),s.setAttribute(u,d);break;case"action":case"formAction":if(typeof d=="function"){s.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(u==="formAction"?(o!=="input"&&ft(s,o,"name",g.name,g,null),ft(s,o,"formEncType",g.formEncType,g,null),ft(s,o,"formMethod",g.formMethod,g,null),ft(s,o,"formTarget",g.formTarget,g,null)):(ft(s,o,"encType",g.encType,g,null),ft(s,o,"method",g.method,g,null),ft(s,o,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){s.removeAttribute(u);break}d=Gu(""+d),s.setAttribute(u,d);break;case"onClick":d!=null&&(s.onclick=sr);break;case"onScroll":d!=null&&Be("scroll",s);break;case"onScrollEnd":d!=null&&Be("scrollend",s);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(u=d.__html,u!=null){if(g.children!=null)throw Error(i(60));s.innerHTML=u}}break;case"multiple":s.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":s.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){s.removeAttribute("xlink:href");break}u=Gu(""+d),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(u,""+d):s.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(u,""):s.removeAttribute(u);break;case"capture":case"download":d===!0?s.setAttribute(u,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(u,d):s.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?s.setAttribute(u,d):s.removeAttribute(u);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?s.removeAttribute(u):s.setAttribute(u,d);break;case"popover":Be("beforetoggle",s),Be("toggle",s),Gl(s,"popover",d);break;case"xlinkActuate":pi(s,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":pi(s,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":pi(s,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":pi(s,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":pi(s,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":pi(s,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":pi(s,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":pi(s,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":pi(s,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Gl(s,"is",d);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=$5.get(u)||u,Gl(s,u,d))}}function kg(s,o,u,d,g,x){switch(u){case"style":W1(s,d,x);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(u=d.__html,u!=null){if(g.children!=null)throw Error(i(60));s.innerHTML=u}}break;case"children":typeof d=="string"?Il(s,d):(typeof d=="number"||typeof d=="bigint")&&Il(s,""+d);break;case"onScroll":d!=null&&Be("scroll",s);break;case"onScrollEnd":d!=null&&Be("scrollend",s);break;case"onClick":d!=null&&(s.onclick=sr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nu.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),o=u.slice(2,g?u.length-7:void 0),x=s[cn]||null,x=x!=null?x[u]:null,typeof x=="function"&&s.removeEventListener(o,x,g),typeof d=="function")){typeof x!="function"&&x!==null&&(u in s?s[u]=null:s.hasAttribute(u)&&s.removeAttribute(u)),s.addEventListener(o,d,g);break e}u in s?s[u]=d:d===!0?s.setAttribute(u,""):Gl(s,u,d)}}}function en(s,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",s),Be("load",s);var d=!1,g=!1,x;for(x in u)if(u.hasOwnProperty(x)){var w=u[x];if(w!=null)switch(x){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,o));default:ft(s,o,x,w,u,null)}}g&&ft(s,o,"srcSet",u.srcSet,u,null),d&&ft(s,o,"src",u.src,u,null);return;case"input":Be("invalid",s);var C=x=w=g=null,L=null,J=null;for(d in u)if(u.hasOwnProperty(d)){var le=u[d];if(le!=null)switch(d){case"name":g=le;break;case"type":w=le;break;case"checked":L=le;break;case"defaultChecked":J=le;break;case"value":x=le;break;case"defaultValue":C=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,o));break;default:ft(s,o,d,le,u,null)}}Uu(s,x,C,L,J,w,g,!1);return;case"select":Be("invalid",s),d=w=x=null;for(g in u)if(u.hasOwnProperty(g)&&(C=u[g],C!=null))switch(g){case"value":x=C;break;case"defaultValue":w=C;break;case"multiple":d=C;default:ft(s,o,g,C,u,null)}o=x,u=w,s.multiple=!!d,o!=null?rr(s,!!d,o,!1):u!=null&&rr(s,!!d,u,!0);return;case"textarea":Be("invalid",s),x=g=d=null;for(w in u)if(u.hasOwnProperty(w)&&(C=u[w],C!=null))switch(w){case"value":d=C;break;case"defaultValue":g=C;break;case"children":x=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(i(91));break;default:ft(s,o,w,C,u,null)}V1(s,d,g,x);return;case"option":for(L in u)if(u.hasOwnProperty(L)&&(d=u[L],d!=null))switch(L){case"selected":s.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:ft(s,o,L,d,u,null)}return;case"dialog":Be("beforetoggle",s),Be("toggle",s),Be("cancel",s),Be("close",s);break;case"iframe":case"object":Be("load",s);break;case"video":case"audio":for(d=0;d<rc.length;d++)Be(rc[d],s);break;case"image":Be("error",s),Be("load",s);break;case"details":Be("toggle",s);break;case"embed":case"source":case"link":Be("error",s),Be("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in u)if(u.hasOwnProperty(J)&&(d=u[J],d!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,o));default:ft(s,o,J,d,u,null)}return;default:if(qO(o)){for(le in u)u.hasOwnProperty(le)&&(d=u[le],d!==void 0&&kg(s,o,le,d,u,void 0));return}}for(C in u)u.hasOwnProperty(C)&&(d=u[C],d!=null&&ft(s,o,C,d,u,null))}function ez(s,o,u,d){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,x=null,w=null,C=null,L=null,J=null,le=null;for(ie in u){var ce=u[ie];if(u.hasOwnProperty(ie)&&ce!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":L=ce;default:d.hasOwnProperty(ie)||ft(s,o,ie,null,d,ce)}}for(var ee in d){var ie=d[ee];if(ce=u[ee],d.hasOwnProperty(ee)&&(ie!=null||ce!=null))switch(ee){case"type":x=ie;break;case"name":g=ie;break;case"checked":J=ie;break;case"defaultChecked":le=ie;break;case"value":w=ie;break;case"defaultValue":C=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,o));break;default:ie!==ce&&ft(s,o,ee,ie,d,ce)}}Is(s,w,C,L,J,le,x,g);return;case"select":ie=w=C=ee=null;for(x in u)if(L=u[x],u.hasOwnProperty(x)&&L!=null)switch(x){case"value":break;case"multiple":ie=L;default:d.hasOwnProperty(x)||ft(s,o,x,null,d,L)}for(g in d)if(x=d[g],L=u[g],d.hasOwnProperty(g)&&(x!=null||L!=null))switch(g){case"value":ee=x;break;case"defaultValue":C=x;break;case"multiple":w=x;default:x!==L&&ft(s,o,g,x,d,L)}o=C,u=w,d=ie,ee!=null?rr(s,!!u,ee,!1):!!d!=!!u&&(o!=null?rr(s,!!u,o,!0):rr(s,!!u,u?[]:"",!1));return;case"textarea":ie=ee=null;for(C in u)if(g=u[C],u.hasOwnProperty(C)&&g!=null&&!d.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:ft(s,o,C,null,d,g)}for(w in d)if(g=d[w],x=u[w],d.hasOwnProperty(w)&&(g!=null||x!=null))switch(w){case"value":ee=g;break;case"defaultValue":ie=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(i(91));break;default:g!==x&&ft(s,o,w,g,d,x)}N1(s,ee,ie);return;case"option":for(var Se in u)if(ee=u[Se],u.hasOwnProperty(Se)&&ee!=null&&!d.hasOwnProperty(Se))switch(Se){case"selected":s.selected=!1;break;default:ft(s,o,Se,null,d,ee)}for(L in d)if(ee=d[L],ie=u[L],d.hasOwnProperty(L)&&ee!==ie&&(ee!=null||ie!=null))switch(L){case"selected":s.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:ft(s,o,L,ee,d,ie)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in u)ee=u[Ae],u.hasOwnProperty(Ae)&&ee!=null&&!d.hasOwnProperty(Ae)&&ft(s,o,Ae,null,d,ee);for(J in d)if(ee=d[J],ie=u[J],d.hasOwnProperty(J)&&ee!==ie&&(ee!=null||ie!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(i(137,o));break;default:ft(s,o,J,ee,d,ie)}return;default:if(qO(o)){for(var ht in u)ee=u[ht],u.hasOwnProperty(ht)&&ee!==void 0&&!d.hasOwnProperty(ht)&&kg(s,o,ht,void 0,d,ee);for(le in d)ee=d[le],ie=u[le],!d.hasOwnProperty(le)||ee===ie||ee===void 0&&ie===void 0||kg(s,o,le,ee,d,ie);return}}for(var I in u)ee=u[I],u.hasOwnProperty(I)&&ee!=null&&!d.hasOwnProperty(I)&&ft(s,o,I,null,d,ee);for(ce in d)ee=d[ce],ie=u[ce],!d.hasOwnProperty(ce)||ee===ie||ee==null&&ie==null||ft(s,o,ce,ee,d,ie)}function Ub(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function tz(){if(typeof performance.getEntriesByType=="function"){for(var s=0,o=0,u=performance.getEntriesByType("resource"),d=0;d<u.length;d++){var g=u[d],x=g.transferSize,w=g.initiatorType,C=g.duration;if(x&&C&&Ub(w)){for(w=0,C=g.responseEnd,d+=1;d<u.length;d++){var L=u[d],J=L.startTime;if(J>C)break;var le=L.transferSize,ce=L.initiatorType;le&&Ub(ce)&&(L=L.responseEnd,w+=le*(L<C?1:(C-J)/(L-J)))}if(--d,o+=8*(x+w)/(g.duration/1e3),s++,10<s)break}}if(0<s)return o/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var Tg=null,$g=null;function Vf(s){return s.nodeType===9?s:s.ownerDocument}function Gb(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hb(s,o){if(s===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&o==="foreignObject"?0:s}function Pg(s,o){return s==="textarea"||s==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Cg=null;function nz(){var s=window.event;return s&&s.type==="popstate"?s===Cg?!1:(Cg=s,!0):(Cg=null,!1)}var Ib=typeof setTimeout=="function"?setTimeout:void 0,iz=typeof clearTimeout=="function"?clearTimeout:void 0,Fb=typeof Promise=="function"?Promise:void 0,rz=typeof queueMicrotask=="function"?queueMicrotask:typeof Fb<"u"?function(s){return Fb.resolve(null).then(s).catch(sz)}:Ib;function sz(s){setTimeout(function(){throw s})}function us(s){return s==="head"}function Kb(s,o){var u=o,d=0;do{var g=u.nextSibling;if(s.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(d===0){s.removeChild(g),$a(o);return}d--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")d++;else if(u==="html")lc(s.ownerDocument.documentElement);else if(u==="head"){u=s.ownerDocument.head,lc(u);for(var x=u.firstChild;x;){var w=x.nextSibling,C=x.nodeName;x[Gs]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&x.rel.toLowerCase()==="stylesheet"||u.removeChild(x),x=w}}else u==="body"&&lc(s.ownerDocument.body);u=g}while(u);$a(o)}function Jb(s,o){var u=s;s=0;do{var d=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),d&&d.nodeType===8)if(u=d.data,u==="/$"){if(s===0)break;s--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||s++;u=d}while(u)}function Ag(s){var o=s.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Ag(u),Qo(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}s.removeChild(u)}}function lz(s,o,u,d){for(;s.nodeType===1;){var g=u;if(s.nodeName.toLowerCase()!==o.toLowerCase()){if(!d&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(d){if(!s[Gs])switch(o){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(x=s.getAttribute("rel"),x==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(x!==g.rel||s.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||s.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||s.getAttribute("title")!==(g.title==null?null:g.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(x=s.getAttribute("src"),(x!==(g.src==null?null:g.src)||s.getAttribute("type")!==(g.type==null?null:g.type)||s.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&x&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(o==="input"&&s.type==="hidden"){var x=g.name==null?null:""+g.name;if(g.type==="hidden"&&s.getAttribute("name")===x)return s}else return s;if(s=si(s.nextSibling),s===null)break}return null}function az(s,o,u){if(o==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!u||(s=si(s.nextSibling),s===null))return null;return s}function ev(s,o){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!o||(s=si(s.nextSibling),s===null))return null;return s}function Rg(s){return s.data==="$?"||s.data==="$~"}function zg(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function oz(s,o){var u=s.ownerDocument;if(s.data==="$~")s._reactRetry=o;else if(s.data!=="$?"||u.readyState!=="loading")o();else{var d=function(){o(),u.removeEventListener("DOMContentLoaded",d)};u.addEventListener("DOMContentLoaded",d),s._reactRetry=d}}function si(s){for(;s!=null;s=s.nextSibling){var o=s.nodeType;if(o===1||o===3)break;if(o===8){if(o=s.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return s}var Eg=null;function tv(s){s=s.nextSibling;for(var o=0;s;){if(s.nodeType===8){var u=s.data;if(u==="/$"||u==="/&"){if(o===0)return si(s.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}s=s.nextSibling}return null}function nv(s){s=s.previousSibling;for(var o=0;s;){if(s.nodeType===8){var u=s.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return s;o--}else u!=="/$"&&u!=="/&"||o++}s=s.previousSibling}return null}function iv(s,o,u){switch(o=Vf(u),s){case"html":if(s=o.documentElement,!s)throw Error(i(452));return s;case"head":if(s=o.head,!s)throw Error(i(453));return s;case"body":if(s=o.body,!s)throw Error(i(454));return s;default:throw Error(i(451))}}function lc(s){for(var o=s.attributes;o.length;)s.removeAttributeNode(o[0]);Qo(s)}var li=new Map,rv=new Set;function Yf(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var br=q.d;q.d={f:cz,r:uz,D:fz,C:hz,L:dz,m:Oz,X:gz,S:pz,M:mz};function cz(){var s=br.f(),o=Mf();return s||o}function uz(s){var o=Br(s);o!==null&&o.tag===5&&o.type==="form"?bS(o):br.r(s)}var wa=typeof document>"u"?null:document;function sv(s,o,u){var d=wa;if(d&&typeof o=="string"&&o){var g=Qn(o);g='link[rel="'+s+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),rv.has(g)||(rv.add(g),s={rel:s,crossOrigin:u,href:o},d.querySelector(g)===null&&(o=d.createElement("link"),en(o,"link",s),zt(o),d.head.appendChild(o)))}}function fz(s){br.D(s),sv("dns-prefetch",s,null)}function hz(s,o){br.C(s,o),sv("preconnect",s,o)}function dz(s,o,u){br.L(s,o,u);var d=wa;if(d&&s&&o){var g='link[rel="preload"][as="'+Qn(o)+'"]';o==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+Qn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+Qn(u.imageSizes)+'"]')):g+='[href="'+Qn(s)+'"]';var x=g;switch(o){case"style":x=ka(s);break;case"script":x=Ta(s)}li.has(x)||(s=p({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:s,as:o},u),li.set(x,s),d.querySelector(g)!==null||o==="style"&&d.querySelector(ac(x))||o==="script"&&d.querySelector(oc(x))||(o=d.createElement("link"),en(o,"link",s),zt(o),d.head.appendChild(o)))}}function Oz(s,o){br.m(s,o);var u=wa;if(u&&s){var d=o&&typeof o.as=="string"?o.as:"script",g='link[rel="modulepreload"][as="'+Qn(d)+'"][href="'+Qn(s)+'"]',x=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Ta(s)}if(!li.has(x)&&(s=p({rel:"modulepreload",href:s},o),li.set(x,s),u.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(oc(x)))return}d=u.createElement("link"),en(d,"link",s),zt(d),u.head.appendChild(d)}}}function pz(s,o,u){br.S(s,o,u);var d=wa;if(d&&s){var g=Vr(d).hoistableStyles,x=ka(s);o=o||"default";var w=g.get(x);if(!w){var C={loading:0,preload:null};if(w=d.querySelector(ac(x)))C.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":o},u),(u=li.get(x))&&_g(s,u);var L=w=d.createElement("link");zt(L),en(L,"link",s),L._p=new Promise(function(J,le){L.onload=J,L.onerror=le}),L.addEventListener("load",function(){C.loading|=1}),L.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Wf(w,o,d)}w={type:"stylesheet",instance:w,count:1,state:C},g.set(x,w)}}}function gz(s,o){br.X(s,o);var u=wa;if(u&&s){var d=Vr(u).hoistableScripts,g=Ta(s),x=d.get(g);x||(x=u.querySelector(oc(g)),x||(s=p({src:s,async:!0},o),(o=li.get(g))&&jg(s,o),x=u.createElement("script"),zt(x),en(x,"link",s),u.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},d.set(g,x))}}function mz(s,o){br.M(s,o);var u=wa;if(u&&s){var d=Vr(u).hoistableScripts,g=Ta(s),x=d.get(g);x||(x=u.querySelector(oc(g)),x||(s=p({src:s,async:!0,type:"module"},o),(o=li.get(g))&&jg(s,o),x=u.createElement("script"),zt(x),en(x,"link",s),u.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},d.set(g,x))}}function lv(s,o,u,d){var g=(g=he.current)?Yf(g):null;if(!g)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=ka(u.href),u=Vr(g).hoistableStyles,d=u.get(o),d||(d={type:"style",instance:null,count:0,state:null},u.set(o,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){s=ka(u.href);var x=Vr(g).hoistableStyles,w=x.get(s);if(w||(g=g.ownerDocument||g,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(s,w),(x=g.querySelector(ac(s)))&&!x._p&&(w.instance=x,w.state.loading=5),li.has(s)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},li.set(s,u),x||yz(g,s,u,w.state))),o&&d===null)throw Error(i(528,""));return w}if(o&&d!==null)throw Error(i(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Ta(u),u=Vr(g).hoistableScripts,d=u.get(o),d||(d={type:"script",instance:null,count:0,state:null},u.set(o,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function ka(s){return'href="'+Qn(s)+'"'}function ac(s){return'link[rel="stylesheet"]['+s+"]"}function av(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function yz(s,o,u,d){s.querySelector('link[rel="preload"][as="style"]['+o+"]")?d.loading=1:(o=s.createElement("link"),d.preload=o,o.addEventListener("load",function(){return d.loading|=1}),o.addEventListener("error",function(){return d.loading|=2}),en(o,"link",u),zt(o),s.head.appendChild(o))}function Ta(s){return'[src="'+Qn(s)+'"]'}function oc(s){return"script[async]"+s}function ov(s,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var d=s.querySelector('style[data-href~="'+Qn(u.href)+'"]');if(d)return o.instance=d,zt(d),d;var g=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return d=(s.ownerDocument||s).createElement("style"),zt(d),en(d,"style",g),Wf(d,u.precedence,s),o.instance=d;case"stylesheet":g=ka(u.href);var x=s.querySelector(ac(g));if(x)return o.state.loading|=4,o.instance=x,zt(x),x;d=av(u),(g=li.get(g))&&_g(d,g),x=(s.ownerDocument||s).createElement("link"),zt(x);var w=x;return w._p=new Promise(function(C,L){w.onload=C,w.onerror=L}),en(x,"link",d),o.state.loading|=4,Wf(x,u.precedence,s),o.instance=x;case"script":return x=Ta(u.src),(g=s.querySelector(oc(x)))?(o.instance=g,zt(g),g):(d=u,(g=li.get(x))&&(d=p({},u),jg(d,g)),s=s.ownerDocument||s,g=s.createElement("script"),zt(g),en(g,"link",d),s.head.appendChild(g),o.instance=g);case"void":return null;default:throw Error(i(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(d=o.instance,o.state.loading|=4,Wf(d,u.precedence,s));return o.instance}function Wf(s,o,u){for(var d=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,x=g,w=0;w<d.length;w++){var C=d[w];if(C.dataset.precedence===o)x=C;else if(x!==g)break}x?x.parentNode.insertBefore(s,x.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(s,o.firstChild))}function _g(s,o){s.crossOrigin==null&&(s.crossOrigin=o.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=o.referrerPolicy),s.title==null&&(s.title=o.title)}function jg(s,o){s.crossOrigin==null&&(s.crossOrigin=o.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=o.referrerPolicy),s.integrity==null&&(s.integrity=o.integrity)}var Uf=null;function cv(s,o,u){if(Uf===null){var d=new Map,g=Uf=new Map;g.set(u,d)}else g=Uf,d=g.get(u),d||(d=new Map,g.set(u,d));if(d.has(s))return d;for(d.set(s,null),u=u.getElementsByTagName(s),g=0;g<u.length;g++){var x=u[g];if(!(x[Gs]||x[Dt]||s==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var w=x.getAttribute(o)||"";w=s+w;var C=d.get(w);C?C.push(x):d.set(w,[x])}}return d}function uv(s,o,u){s=s.ownerDocument||s,s.head.insertBefore(u,o==="title"?s.querySelector("head > title"):null)}function xz(s,o,u){if(u===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return s=o.disabled,typeof o.precedence=="string"&&s==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function fv(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function Sz(s,o,u,d){if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=ka(d.href),x=o.querySelector(ac(g));if(x){o=x._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=Gf.bind(s),o.then(s,s)),u.state.loading|=4,u.instance=x,zt(x);return}x=o.ownerDocument||o,d=av(d),(g=li.get(g))&&_g(d,g),x=x.createElement("link"),zt(x);var w=x;w._p=new Promise(function(C,L){w.onload=C,w.onerror=L}),en(x,"link",d),u.instance=x}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(s.count++,u=Gf.bind(s),o.addEventListener("load",u),o.addEventListener("error",u))}}var Mg=0;function bz(s,o){return s.stylesheets&&s.count===0&&If(s,s.stylesheets),0<s.count||0<s.imgCount?function(u){var d=setTimeout(function(){if(s.stylesheets&&If(s,s.stylesheets),s.unsuspend){var x=s.unsuspend;s.unsuspend=null,x()}},6e4+o);0<s.imgBytes&&Mg===0&&(Mg=62500*tz());var g=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&If(s,s.stylesheets),s.unsuspend)){var x=s.unsuspend;s.unsuspend=null,x()}},(s.imgBytes>Mg?50:800)+o);return s.unsuspend=u,function(){s.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function Gf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)If(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Hf=null;function If(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Hf=new Map,o.forEach(vz,s),Hf=null,Gf.call(s))}function vz(s,o){if(!(o.state.loading&4)){var u=Hf.get(s);if(u)var d=u.get(null);else{u=new Map,Hf.set(s,u);for(var g=s.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<g.length;x++){var w=g[x];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(u.set(w.dataset.precedence,w),d=w)}d&&u.set(null,d)}g=o.instance,w=g.getAttribute("data-precedence"),x=u.get(w)||d,x===d&&u.set(null,g),u.set(w,g),this.count++,d=Gf.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),x?x.parentNode.insertBefore(g,x.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(g,s.firstChild)),o.state.loading|=4}}var cc={$$typeof:T,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function Qz(s,o,u,d,g,x,w,C,L){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=So(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=So(0),this.hiddenUpdates=So(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=x,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function hv(s,o,u,d,g,x,w,C,L,J,le,ce){return s=new Qz(s,o,u,w,L,J,le,ce,C),o=1,x===!0&&(o|=24),x=Xn(3,null,null,o),s.current=x,x.stateNode=s,o=pp(),o.refCount++,s.pooledCache=o,o.refCount++,x.memoizedState={element:d,isDehydrated:u,cache:o},xp(x),s}function dv(s){return s?(s=ia,s):ia}function Ov(s,o,u,d,g,x){g=dv(g),d.context===null?d.context=g:d.pendingContext=g,d=Jr(o),d.payload={element:u},x=x===void 0?null:x,x!==null&&(d.callback=x),u=es(s,d,o),u!==null&&(Cn(u,s,o),Lo(u,s,o))}function pv(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var u=s.retryLane;s.retryLane=u!==0&&u<o?u:o}}function Xg(s,o){pv(s,o),(s=s.alternate)&&pv(s,o)}function gv(s){if(s.tag===13||s.tag===31){var o=el(s,67108864);o!==null&&Cn(o,s,67108864),Xg(s,67108864)}}function mv(s){if(s.tag===13||s.tag===31){var o=Bn();o=bo(o);var u=el(s,o);u!==null&&Cn(u,s,o),Xg(s,o)}}var Ff=!0;function wz(s,o,u,d){var g=R.T;R.T=null;var x=q.p;try{q.p=2,Zg(s,o,u,d)}finally{q.p=x,R.T=g}}function kz(s,o,u,d){var g=R.T;R.T=null;var x=q.p;try{q.p=8,Zg(s,o,u,d)}finally{q.p=x,R.T=g}}function Zg(s,o,u,d){if(Ff){var g=qg(d);if(g===null)wg(s,o,d,Kf,u),xv(s,d);else if($z(g,s,o,u,d))d.stopPropagation();else if(xv(s,d),o&4&&-1<Tz.indexOf(s)){for(;g!==null;){var x=Br(g);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var w=tr(x.pendingLanes);if(w!==0){var C=x;for(C.pendingLanes|=2,C.entangledLanes|=2;w;){var L=1<<31-gn(w);C.entanglements[1]|=L,w&=~L}Mi(x),(nt&6)===0&&(_f=It()+500,ic(0))}}break;case 31:case 13:C=el(x,2),C!==null&&Cn(C,x,2),Mf(),Xg(x,2)}if(x=qg(d),x===null&&wg(s,o,d,Kf,u),x===g)break;g=x}g!==null&&d.stopPropagation()}else wg(s,o,d,null,u)}}function qg(s){return s=LO(s),Dg(s)}var Kf=null;function Dg(s){if(Kf=null,s=Lr(s),s!==null){var o=l(s);if(o===null)s=null;else{var u=o.tag;if(u===13){if(s=a(o),s!==null)return s;s=null}else if(u===31){if(s=c(o),s!==null)return s;s=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null)}}return Kf=s,null}function yv(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ll()){case er:return 2;case Dr:return 8;case Vs:case TO:return 32;case Bl:return 268435456;default:return 32}default:return 32}}var Lg=!1,fs=null,hs=null,ds=null,uc=new Map,fc=new Map,Os=[],Tz="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function xv(s,o){switch(s){case"focusin":case"focusout":fs=null;break;case"dragenter":case"dragleave":hs=null;break;case"mouseover":case"mouseout":ds=null;break;case"pointerover":case"pointerout":uc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":fc.delete(o.pointerId)}}function hc(s,o,u,d,g,x){return s===null||s.nativeEvent!==x?(s={blockedOn:o,domEventName:u,eventSystemFlags:d,nativeEvent:x,targetContainers:[g]},o!==null&&(o=Br(o),o!==null&&gv(o)),s):(s.eventSystemFlags|=d,o=s.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),s)}function $z(s,o,u,d,g){switch(o){case"focusin":return fs=hc(fs,s,o,u,d,g),!0;case"dragenter":return hs=hc(hs,s,o,u,d,g),!0;case"mouseover":return ds=hc(ds,s,o,u,d,g),!0;case"pointerover":var x=g.pointerId;return uc.set(x,hc(uc.get(x)||null,s,o,u,d,g)),!0;case"gotpointercapture":return x=g.pointerId,fc.set(x,hc(fc.get(x)||null,s,o,u,d,g)),!0}return!1}function Sv(s){var o=Lr(s.target);if(o!==null){var u=l(o);if(u!==null){if(o=u.tag,o===13){if(o=a(u),o!==null){s.blockedOn=o,qu(s.priority,function(){mv(u)});return}}else if(o===31){if(o=c(u),o!==null){s.blockedOn=o,qu(s.priority,function(){mv(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){s.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Jf(s){if(s.blockedOn!==null)return!1;for(var o=s.targetContainers;0<o.length;){var u=qg(s.nativeEvent);if(u===null){u=s.nativeEvent;var d=new u.constructor(u.type,u);DO=d,u.target.dispatchEvent(d),DO=null}else return o=Br(u),o!==null&&gv(o),s.blockedOn=u,!1;o.shift()}return!0}function bv(s,o,u){Jf(s)&&u.delete(o)}function Pz(){Lg=!1,fs!==null&&Jf(fs)&&(fs=null),hs!==null&&Jf(hs)&&(hs=null),ds!==null&&Jf(ds)&&(ds=null),uc.forEach(bv),fc.forEach(bv)}function eh(s,o){s.blockedOn===o&&(s.blockedOn=null,Lg||(Lg=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pz)))}var th=null;function vv(s){th!==s&&(th=s,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){th===s&&(th=null);for(var o=0;o<s.length;o+=3){var u=s[o],d=s[o+1],g=s[o+2];if(typeof d!="function"){if(Dg(d||u)===null)continue;break}var x=Br(u);x!==null&&(s.splice(o,3),o-=3,qp(x,{pending:!0,data:g,method:u.method,action:d},d,g))}}))}function $a(s){function o(L){return eh(L,s)}fs!==null&&eh(fs,s),hs!==null&&eh(hs,s),ds!==null&&eh(ds,s),uc.forEach(o),fc.forEach(o);for(var u=0;u<Os.length;u++){var d=Os[u];d.blockedOn===s&&(d.blockedOn=null)}for(;0<Os.length&&(u=Os[0],u.blockedOn===null);)Sv(u),u.blockedOn===null&&Os.shift();if(u=(s.ownerDocument||s).$$reactFormReplay,u!=null)for(d=0;d<u.length;d+=3){var g=u[d],x=u[d+1],w=g[cn]||null;if(typeof x=="function")w||vv(u);else if(w){var C=null;if(x&&x.hasAttribute("formAction")){if(g=x,w=x[cn]||null)C=w.formAction;else if(Dg(g)!==null)continue}else C=w.action;typeof C=="function"?u[d+1]=C:(u.splice(d,3),d-=3),vv(u)}}}function Qv(){function s(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(w){return g=w})},focusReset:"manual",scroll:"manual"})}function o(){g!==null&&(g(),g=null),d||setTimeout(u,20)}function u(){if(!d&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){d=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),g!==null&&(g(),g=null)}}}function Bg(s){this._internalRoot=s}nh.prototype.render=Bg.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(i(409));var u=o.current,d=Bn();Ov(u,d,s,o,null,null)},nh.prototype.unmount=Bg.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;Ov(s.current,2,null,s,null,null),Mf(),o[nr]=null}};function nh(s){this._internalRoot=s}nh.prototype.unstable_scheduleHydration=function(s){if(s){var o=Zu();s={blockedOn:null,target:s,priority:o};for(var u=0;u<Os.length&&o!==0&&o<Os[u].priority;u++);Os.splice(u,0,s),u===0&&Sv(s)}};var wv=e.version;if(wv!=="19.2.4")throw Error(i(527,wv,"19.2.4"));q.findDOMNode=function(s){var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(i(188)):(s=Object.keys(s).join(","),Error(i(268,s)));return s=h(o),s=s!==null?O(s):null,s=s===null?null:s.stateNode,s};var Cz={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ih=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ih.isDisabled&&ih.supportsFiber)try{Ys=ih.inject(Cz),pn=ih}catch{}}return Oc.createRoot=function(s,o){if(!r(s))throw Error(i(299));var u=!1,d="",g=RS,x=zS,w=ES;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(g=o.onUncaughtError),o.onCaughtError!==void 0&&(x=o.onCaughtError),o.onRecoverableError!==void 0&&(w=o.onRecoverableError)),o=hv(s,1,!1,null,null,u,d,null,g,x,w,Qv),s[nr]=o.current,Qg(s),new Bg(o)},Oc.hydrateRoot=function(s,o,u){if(!r(s))throw Error(i(299));var d=!1,g="",x=RS,w=zS,C=ES,L=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(x=u.onUncaughtError),u.onCaughtError!==void 0&&(w=u.onCaughtError),u.onRecoverableError!==void 0&&(C=u.onRecoverableError),u.formState!==void 0&&(L=u.formState)),o=hv(s,1,!0,o,u??null,d,g,L,x,w,C,Qv),o.context=dv(null),u=o.current,d=Bn(),d=bo(d),g=Jr(d),g.callback=null,es(u,g,d),u=d,o.current.lanes=u,Us(o,u),Mi(o),s[nr]=o.current,Qg(s),new nh(o)},Oc.version="19.2.4",Oc}var _v;function Zz(){if(_v)return Yg.exports;_v=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Yg.exports=Xz(),Yg.exports}var qz=Zz();const jv=t=>{let e;const n=new Set,i=(h,O)=>{const p=typeof h=="function"?h(e):h;if(!Object.is(p,e)){const m=e;e=O??(typeof p!="object"||p===null)?p:Object.assign({},e,p),n.forEach(y=>y(e,m))}},r=()=>e,c={setState:i,getState:r,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=e=t(i,r,c);return c},Dz=(t=>t?jv(t):jv),Lz=t=>t;function Bz(t,e=Lz){const n=Pc.useSyncExternalStore(t.subscribe,Pc.useCallback(()=>e(t.getState()),[t,e]),Pc.useCallback(()=>e(t.getInitialState()),[t,e]));return Pc.useDebugValue(n),n}const Mv=t=>{const e=Dz(t),n=i=>Bz(e,i);return Object.assign(n,e),n},Nz=(t=>t?Mv(t):Mv),Vz=`ws://${window.location.hostname}:${window.location.port||31415}`,xi="",Qe=Nz((t,e)=>({agents:[],connected:!1,ws:null,daemonHost:null,tunneled:!1,activeTab:"agents",detailPanel:null,activityLog:{},statusMessage:null,commandHistory:[],chatHistory:{},tokenTimeline:{},dashTelemetry:{},editorFiles:{},editorActiveFile:null,editorOpenTabs:[],editorTreeCache:{},editorChangedFiles:{},connect(){if(e().ws)return;const n=new WebSocket(Vz);n.onopen=()=>{t({connected:!0,ws:n}),fetch(`${xi}/api/status`).then(i=>i.json()).then(i=>{const r={};i.host&&i.host!=="127.0.0.1"&&(r.daemonHost=i.host);const l=window.location.port||"80";String(i.port)!==l&&(r.tunneled=!0),Object.keys(r).length>0&&t(r)}).catch(()=>{})},n.onmessage=i=>{const r=JSON.parse(i.data);switch(r.type){case"state":{const l={...e().tokenTimeline},a=Date.now();for(const c of r.data){l[c.id]||(l[c.id]=[]);const f=l[c.id],h=f[f.length-1];(!h||c.tokensUsed!==h.v||a-h.t>5e3)&&(f.push({t:a,v:c.tokensUsed||0}),f.length>200&&(l[c.id]=f.slice(-200)))}t({agents:r.data,tokenTimeline:l});break}case"agent:output":{const{agentId:l,data:a}=r,c={...e().activityLog};c[l]||(c[l]=[]),c[l]=[...c[l].slice(-200),{timestamp:Date.now(),text:typeof a.data=="string"?a.data:JSON.stringify(a.data),type:a.type}],t({activityLog:c});break}case"agent:exit":{const l=e().agents.find(f=>f.id===r.agentId),a=(l==null?void 0:l.name)||r.agentId,c=r.status==="completed"?`${a} completed`:r.status==="killed"?`${a} killed`:`${a} crashed (exit ${r.code})`;e().showStatus(c);break}case"rotation:start":e().showStatus(`rotating ${r.agentName}...`);break;case"rotation:complete":{e().showStatus(`rotated ${r.agentName} (saved ${r.tokensSaved} tokens)`);const l=e().detailPanel;(l==null?void 0:l.type)==="agent"&&l.agentId===r.oldAgentId&&r.newAgentId&&t(a=>{const c={...a.chatHistory},f={...a.tokenTimeline},h=c[r.oldAgentId]||[],O=f[r.oldAgentId]||[];return h.length>0&&(c[r.newAgentId]=[...h]),O.length>0&&(f[r.newAgentId]=[...O]),{chatHistory:c,tokenTimeline:f,detailPanel:{type:"agent",agentId:r.newAgentId}}});break}case"rotation:failed":e().showStatus(`rotation failed: ${r.error}`);break;case"file:changed":t(l=>({editorChangedFiles:{...l.editorChangedFiles,[r.path]:r.timestamp}}));break}},n.onclose=()=>{t({connected:!1,ws:null,daemonHost:null,tunneled:!1}),setTimeout(()=>e().connect(),2e3)},n.onerror=()=>n.close()},async spawnAgent(n){const i=await fetch(`${xi}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok){const l=await i.json().catch(()=>({}));throw new Error(l.error||"Spawn failed")}const r=await i.json();return e().showStatus(`spawned ${r.name}`),r},async killAgent(n,i=!1){await fetch(`${xi}/api/agents/${n}?purge=${i}`,{method:"DELETE"})},async rotateAgent(n){const i=await fetch(`${xi}/api/agents/${n}/rotate`,{method:"POST"});if(!i.ok){const r=await i.json().catch(()=>({}));throw new Error(r.error||"Rotation failed")}return i.json()},async fetchProviders(){return(await fetch(`${xi}/api/providers`)).json()},setActiveTab(n){t({activeTab:n})},openDetail(n){t({detailPanel:n})},closeDetail(){t({detailPanel:null})},selectAgent(n){t({detailPanel:{type:"agent",agentId:n}})},clearSelection(){t({detailPanel:null})},showStatus(n){t({statusMessage:n}),setTimeout(()=>{e().statusMessage===n&&t({statusMessage:null})},4e3)},addChatMessage(n,i,r,l=!1){t(a=>{const c={...a.chatHistory};return c[n]||(c[n]=[]),c[n]=[...c[n].slice(-100),{from:i,text:r,timestamp:Date.now(),isQuery:l}],{chatHistory:c}})},async instructAgent(n,i){const r=e().agents.find(O=>O.id===n),l=r&&(r.status==="running"||r.status==="starting");e().addChatMessage(n,"user",i,!1),e().addChatMessage(n,"system",l?"sending instruction...":"continuing conversation...");const a=await fetch(`${xi}/api/agents/${n}/instruct`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:i})});if(!a.ok){const O=await a.json().catch(()=>({}));throw e().addChatMessage(n,"system",`failed: ${O.error||"unknown error"}`),new Error(O.error||"Instruction failed")}const c=await a.json(),f=e().chatHistory[n]||[];f.length>0&&t(O=>{const p={...O.chatHistory};return p[c.id]=[...f],{chatHistory:p}});const h=e().tokenTimeline[n]||[];return h.length>0&&t(O=>{const p={...O.tokenTimeline};return p[c.id]=[...h],{tokenTimeline:p}}),e().selectAgent(c.id),e().addChatMessage(c.id,"system","agent resumed with context"),c},async queryAgent(n,i){e().addChatMessage(n,"user",i,!0);const r=await fetch(`${xi}/api/agents/${n}/query`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:i})});if(!r.ok){const a=await r.json().catch(()=>({}));throw e().addChatMessage(n,"system",`query failed: ${a.error||"unknown error"}`),new Error(a.error||"Query failed")}const l=await r.json();return e().addChatMessage(n,"agent",l.response),l},async openFile(n){if(e().editorFiles[n]){t(i=>({editorActiveFile:n,editorOpenTabs:i.editorOpenTabs.includes(n)?i.editorOpenTabs:[...i.editorOpenTabs,n]}));return}try{const i=await fetch(`${xi}/api/files/read?path=${encodeURIComponent(n)}`);if(!i.ok){const a=await i.json().catch(()=>({}));e().showStatus(a.error||"Failed to read file");return}const r=await i.json();if(r.binary){e().showStatus("Binary file — cannot open");return}t(a=>({editorFiles:{...a.editorFiles,[n]:{content:r.content,originalContent:r.content,language:r.language,loadedAt:Date.now()}},editorActiveFile:n,editorOpenTabs:a.editorOpenTabs.includes(n)?a.editorOpenTabs:[...a.editorOpenTabs,n]}));const l=e().ws;(l==null?void 0:l.readyState)===1&&l.send(JSON.stringify({type:"editor:watch",path:n}))}catch{e().showStatus("Failed to open file")}},closeFile(n){t(r=>{const l=r.editorOpenTabs.filter(h=>h!==n),a={...r.editorFiles};delete a[n];const c={...r.editorChangedFiles};delete c[n];let f=r.editorActiveFile;if(f===n){const h=r.editorOpenTabs.indexOf(n);f=l[Math.min(h,l.length-1)]||null}return{editorOpenTabs:l,editorFiles:a,editorChangedFiles:c,editorActiveFile:f}});const i=e().ws;(i==null?void 0:i.readyState)===1&&i.send(JSON.stringify({type:"editor:unwatch",path:n}))},setActiveFile(n){t({editorActiveFile:n})},updateFileContent(n,i){t(r=>({editorFiles:{...r.editorFiles,[n]:{...r.editorFiles[n],content:i}}}))},async saveFile(n){const i=e().editorFiles[n];if(i)try{const r=await fetch(`${xi}/api/files/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n,content:i.content})});if(!r.ok){const l=await r.json().catch(()=>({}));e().showStatus(l.error||"Save failed");return}t(l=>({editorFiles:{...l.editorFiles,[n]:{...l.editorFiles[n],originalContent:i.content}},editorChangedFiles:(()=>{const a={...l.editorChangedFiles};return delete a[n],a})()})),e().showStatus("Saved")}catch{e().showStatus("Save failed")}},async reloadFile(n){try{const i=await fetch(`${xi}/api/files/read?path=${encodeURIComponent(n)}`);if(!i.ok)return;const r=await i.json();if(r.binary)return;t(l=>({editorFiles:{...l.editorFiles,[n]:{content:r.content,originalContent:r.content,language:r.language,loadedAt:Date.now()}},editorChangedFiles:(()=>{const a={...l.editorChangedFiles};return delete a[n],a})()}))}catch{}},dismissFileChange(n){t(i=>{const r={...i.editorChangedFiles};return delete r[n],{editorChangedFiles:r}})},async fetchTreeDir(n){try{const i=await fetch(`${xi}/api/files/tree?path=${encodeURIComponent(n)}`);if(!i.ok)return;const r=await i.json();t(l=>({editorTreeCache:{...l.editorTreeCache,[n]:r.entries}}))}catch{}},addCommand(n){t(i=>({commandHistory:[...i.commandHistory.slice(-49),n]}))}}));function qt(t){if(typeof t=="string"||typeof t=="number")return""+t;let e="";if(Array.isArray(t))for(let n=0,i;n<t.length;n++)(i=qt(t[n]))!==""&&(e+=(e&&" ")+i);else for(let n in t)t[n]&&(e+=(e&&" ")+n);return e}var Yz={value:()=>{}};function Kd(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Bh(n)}function Bh(t){this._=t}function Wz(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Bh.prototype=Kd.prototype={constructor:Bh,on:function(t,e){var n=this._,i=Wz(t+"",n),r,l=-1,a=i.length;if(arguments.length<2){for(;++l<a;)if((r=(t=i[l]).type)&&(r=Uz(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++l<a;)if(r=(t=i[l]).type)n[r]=Xv(n[r],t.name,e);else if(e==null)for(r in n)n[r]=Xv(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Bh(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,l;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(l=this._[t],i=0,r=l.length;i<r;++i)l[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,l=i.length;r<l;++r)i[r].value.apply(e,n)}};function Uz(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function Xv(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Yz,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var n0="http://www.w3.org/1999/xhtml";const Zv={svg:"http://www.w3.org/2000/svg",xhtml:n0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jd(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Zv.hasOwnProperty(e)?{space:Zv[e],local:t}:t}function Gz(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===n0&&e.documentElement.namespaceURI===n0?e.createElement(t):e.createElementNS(n,t)}}function Hz(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function CT(t){var e=Jd(t);return(e.local?Hz:Gz)(e)}function Iz(){}function xy(t){return t==null?Iz:function(){return this.querySelector(t)}}function Fz(t){typeof t!="function"&&(t=xy(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var l=e[r],a=l.length,c=i[r]=new Array(a),f,h,O=0;O<a;++O)(f=l[O])&&(h=t.call(f,f.__data__,O,l))&&("__data__"in f&&(h.__data__=f.__data__),c[O]=h);return new Fn(i,this._parents)}function Kz(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Jz(){return[]}function AT(t){return t==null?Jz:function(){return this.querySelectorAll(t)}}function eE(t){return function(){return Kz(t.apply(this,arguments))}}function tE(t){typeof t=="function"?t=eE(t):t=AT(t);for(var e=this._groups,n=e.length,i=[],r=[],l=0;l<n;++l)for(var a=e[l],c=a.length,f,h=0;h<c;++h)(f=a[h])&&(i.push(t.call(f,f.__data__,h,a)),r.push(f));return new Fn(i,r)}function RT(t){return function(){return this.matches(t)}}function zT(t){return function(e){return e.matches(t)}}var nE=Array.prototype.find;function iE(t){return function(){return nE.call(this.children,t)}}function rE(){return this.firstElementChild}function sE(t){return this.select(t==null?rE:iE(typeof t=="function"?t:zT(t)))}var lE=Array.prototype.filter;function aE(){return Array.from(this.children)}function oE(t){return function(){return lE.call(this.children,t)}}function cE(t){return this.selectAll(t==null?aE:oE(typeof t=="function"?t:zT(t)))}function uE(t){typeof t!="function"&&(t=RT(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var l=e[r],a=l.length,c=i[r]=[],f,h=0;h<a;++h)(f=l[h])&&t.call(f,f.__data__,h,l)&&c.push(f);return new Fn(i,this._parents)}function ET(t){return new Array(t.length)}function fE(){return new Fn(this._enter||this._groups.map(ET),this._parents)}function ad(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ad.prototype={constructor:ad,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function hE(t){return function(){return t}}function dE(t,e,n,i,r,l){for(var a=0,c,f=e.length,h=l.length;a<h;++a)(c=e[a])?(c.__data__=l[a],i[a]=c):n[a]=new ad(t,l[a]);for(;a<f;++a)(c=e[a])&&(r[a]=c)}function OE(t,e,n,i,r,l,a){var c,f,h=new Map,O=e.length,p=l.length,m=new Array(O),y;for(c=0;c<O;++c)(f=e[c])&&(m[c]=y=a.call(f,f.__data__,c,e)+"",h.has(y)?r[c]=f:h.set(y,f));for(c=0;c<p;++c)y=a.call(t,l[c],c,l)+"",(f=h.get(y))?(i[c]=f,f.__data__=l[c],h.delete(y)):n[c]=new ad(t,l[c]);for(c=0;c<O;++c)(f=e[c])&&h.get(m[c])===f&&(r[c]=f)}function pE(t){return t.__data__}function gE(t,e){if(!arguments.length)return Array.from(this,pE);var n=e?OE:dE,i=this._parents,r=this._groups;typeof t!="function"&&(t=hE(t));for(var l=r.length,a=new Array(l),c=new Array(l),f=new Array(l),h=0;h<l;++h){var O=i[h],p=r[h],m=p.length,y=mE(t.call(O,O&&O.__data__,h,i)),b=y.length,v=c[h]=new Array(b),k=a[h]=new Array(b),Q=f[h]=new Array(m);n(O,p,v,k,Q,y,e);for(var P=0,T=0,$,_;P<b;++P)if($=v[P]){for(P>=T&&(T=P+1);!(_=k[T])&&++T<b;);$._next=_||null}}return a=new Fn(a,i),a._enter=c,a._exit=f,a}function mE(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yE(){return new Fn(this._exit||this._groups.map(ET),this._parents)}function xE(t,e,n){var i=this.enter(),r=this,l=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?l.remove():n(l),i&&r?i.merge(r).order():r}function SE(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,l=i.length,a=Math.min(r,l),c=new Array(r),f=0;f<a;++f)for(var h=n[f],O=i[f],p=h.length,m=c[f]=new Array(p),y,b=0;b<p;++b)(y=h[b]||O[b])&&(m[b]=y);for(;f<r;++f)c[f]=n[f];return new Fn(c,this._parents)}function bE(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,l=i[r],a;--r>=0;)(a=i[r])&&(l&&a.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(a,l),l=a);return this}function vE(t){t||(t=QE);function e(p,m){return p&&m?t(p.__data__,m.__data__):!p-!m}for(var n=this._groups,i=n.length,r=new Array(i),l=0;l<i;++l){for(var a=n[l],c=a.length,f=r[l]=new Array(c),h,O=0;O<c;++O)(h=a[O])&&(f[O]=h);f.sort(e)}return new Fn(r,this._parents).order()}function QE(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function wE(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function kE(){return Array.from(this)}function TE(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,l=i.length;r<l;++r){var a=i[r];if(a)return a}return null}function $E(){let t=0;for(const e of this)++t;return t}function PE(){return!this.node()}function CE(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],l=0,a=r.length,c;l<a;++l)(c=r[l])&&t.call(c,c.__data__,l,r);return this}function AE(t){return function(){this.removeAttribute(t)}}function RE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function zE(t,e){return function(){this.setAttribute(t,e)}}function EE(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function _E(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function jE(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function ME(t,e){var n=Jd(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?RE:AE:typeof e=="function"?n.local?jE:_E:n.local?EE:zE)(n,e))}function _T(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function XE(t){return function(){this.style.removeProperty(t)}}function ZE(t,e,n){return function(){this.style.setProperty(t,e,n)}}function qE(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function DE(t,e,n){return arguments.length>1?this.each((e==null?XE:typeof e=="function"?qE:ZE)(t,e,n??"")):Fa(this.node(),t)}function Fa(t,e){return t.style.getPropertyValue(e)||_T(t).getComputedStyle(t,null).getPropertyValue(e)}function LE(t){return function(){delete this[t]}}function BE(t,e){return function(){this[t]=e}}function NE(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function VE(t,e){return arguments.length>1?this.each((e==null?LE:typeof e=="function"?NE:BE)(t,e)):this.node()[t]}function jT(t){return t.trim().split(/^|\s+/)}function Sy(t){return t.classList||new MT(t)}function MT(t){this._node=t,this._names=jT(t.getAttribute("class")||"")}MT.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function XT(t,e){for(var n=Sy(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function ZT(t,e){for(var n=Sy(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function YE(t){return function(){XT(this,t)}}function WE(t){return function(){ZT(this,t)}}function UE(t,e){return function(){(e.apply(this,arguments)?XT:ZT)(this,t)}}function GE(t,e){var n=jT(t+"");if(arguments.length<2){for(var i=Sy(this.node()),r=-1,l=n.length;++r<l;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?UE:e?YE:WE)(n,e))}function HE(){this.textContent=""}function IE(t){return function(){this.textContent=t}}function FE(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function KE(t){return arguments.length?this.each(t==null?HE:(typeof t=="function"?FE:IE)(t)):this.node().textContent}function JE(){this.innerHTML=""}function e_(t){return function(){this.innerHTML=t}}function t_(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function n_(t){return arguments.length?this.each(t==null?JE:(typeof t=="function"?t_:e_)(t)):this.node().innerHTML}function i_(){this.nextSibling&&this.parentNode.appendChild(this)}function r_(){return this.each(i_)}function s_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function l_(){return this.each(s_)}function a_(t){var e=typeof t=="function"?t:CT(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function o_(){return null}function c_(t,e){var n=typeof t=="function"?t:CT(t),i=e==null?o_:typeof e=="function"?e:xy(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function u_(){var t=this.parentNode;t&&t.removeChild(this)}function f_(){return this.each(u_)}function h_(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function d_(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function O_(t){return this.select(t?d_:h_)}function p_(t){return arguments.length?this.property("__data__",t):this.node().__data__}function g_(t){return function(e){t.call(this,e,this.__data__)}}function m_(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function y_(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,l;n<r;++n)l=e[n],(!t.type||l.type===t.type)&&l.name===t.name?this.removeEventListener(l.type,l.listener,l.options):e[++i]=l;++i?e.length=i:delete this.__on}}}function x_(t,e,n){return function(){var i=this.__on,r,l=g_(e);if(i){for(var a=0,c=i.length;a<c;++a)if((r=i[a]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=l,r.options=n),r.value=e;return}}this.addEventListener(t.type,l,n),r={type:t.type,name:t.name,value:e,listener:l,options:n},i?i.push(r):this.__on=[r]}}function S_(t,e,n){var i=m_(t+""),r,l=i.length,a;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,h=c.length,O;f<h;++f)for(r=0,O=c[f];r<l;++r)if((a=i[r]).type===O.type&&a.name===O.name)return O.value}return}for(c=e?x_:y_,r=0;r<l;++r)this.each(c(i[r],e,n));return this}function qT(t,e,n){var i=_T(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function b_(t,e){return function(){return qT(this,t,e)}}function v_(t,e){return function(){return qT(this,t,e.apply(this,arguments))}}function Q_(t,e){return this.each((typeof e=="function"?v_:b_)(t,e))}function*w_(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,l=i.length,a;r<l;++r)(a=i[r])&&(yield a)}var DT=[null];function Fn(t,e){this._groups=t,this._parents=e}function yu(){return new Fn([[document.documentElement]],DT)}function k_(){return this}Fn.prototype=yu.prototype={constructor:Fn,select:Fz,selectAll:tE,selectChild:sE,selectChildren:cE,filter:uE,data:gE,enter:fE,exit:yE,join:xE,merge:SE,selection:k_,order:bE,sort:vE,call:wE,nodes:kE,node:TE,size:$E,empty:PE,each:CE,attr:ME,style:DE,property:VE,classed:GE,text:KE,html:n_,raise:r_,lower:l_,append:a_,insert:c_,remove:f_,clone:O_,datum:p_,on:S_,dispatch:Q_,[Symbol.iterator]:w_};function Hn(t){return typeof t=="string"?new Fn([[document.querySelector(t)]],[document.documentElement]):new Fn([[t]],DT)}function T_(t){let e;for(;e=t.sourceEvent;)t=e;return t}function bi(t,e){if(t=T_(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}const $_={passive:!1},Vc={capture:!0,passive:!1};function Hg(t){t.stopImmediatePropagation()}function Da(t){t.preventDefault(),t.stopImmediatePropagation()}function LT(t){var e=t.document.documentElement,n=Hn(t).on("dragstart.drag",Da,Vc);"onselectstart"in e?n.on("selectstart.drag",Da,Vc):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function BT(t,e){var n=t.document.documentElement,i=Hn(t).on("dragstart.drag",null);e&&(i.on("click.drag",Da,Vc),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const rh=t=>()=>t;function i0(t,{sourceEvent:e,subject:n,target:i,identifier:r,active:l,x:a,y:c,dx:f,dy:h,dispatch:O}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:l,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:O}})}i0.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function P_(t){return!t.ctrlKey&&!t.button}function C_(){return this.parentNode}function A_(t,e){return e??{x:t.x,y:t.y}}function R_(){return navigator.maxTouchPoints||"ontouchstart"in this}function NT(){var t=P_,e=C_,n=A_,i=R_,r={},l=Kd("start","drag","end"),a=0,c,f,h,O,p=0;function m($){$.on("mousedown.drag",y).filter(i).on("touchstart.drag",k).on("touchmove.drag",Q,$_).on("touchend.drag touchcancel.drag",P).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y($,_){if(!(O||!t.call(this,$,_))){var A=T(this,e.call(this,$,_),$,_,"mouse");A&&(Hn($.view).on("mousemove.drag",b,Vc).on("mouseup.drag",v,Vc),LT($.view),Hg($),h=!1,c=$.clientX,f=$.clientY,A("start",$))}}function b($){if(Da($),!h){var _=$.clientX-c,A=$.clientY-f;h=_*_+A*A>p}r.mouse("drag",$)}function v($){Hn($.view).on("mousemove.drag mouseup.drag",null),BT($.view,h),Da($),r.mouse("end",$)}function k($,_){if(t.call(this,$,_)){var A=$.changedTouches,E=e.call(this,$,_),N=A.length,G,ne;for(G=0;G<N;++G)(ne=T(this,E,$,_,A[G].identifier,A[G]))&&(Hg($),ne("start",$,A[G]))}}function Q($){var _=$.changedTouches,A=_.length,E,N;for(E=0;E<A;++E)(N=r[_[E].identifier])&&(Da($),N("drag",$,_[E]))}function P($){var _=$.changedTouches,A=_.length,E,N;for(O&&clearTimeout(O),O=setTimeout(function(){O=null},500),E=0;E<A;++E)(N=r[_[E].identifier])&&(Hg($),N("end",$,_[E]))}function T($,_,A,E,N,G){var ne=l.copy(),V=bi(G||A,_),Y,H,X;if((X=n.call($,new i0("beforestart",{sourceEvent:A,target:m,identifier:N,active:a,x:V[0],y:V[1],dx:0,dy:0,dispatch:ne}),E))!=null)return Y=X.x-V[0]||0,H=X.y-V[1]||0,function W(R,q,B){var M=V,F;switch(R){case"start":r[N]=W,F=a++;break;case"end":delete r[N],--a;case"drag":V=bi(B||q,_),F=a;break}ne.call(R,$,new i0(R,{sourceEvent:q,subject:X,target:m,identifier:N,active:F,x:V[0]+Y,y:V[1]+H,dx:V[0]-M[0],dy:V[1]-M[1],dispatch:ne}),E)}}return m.filter=function($){return arguments.length?(t=typeof $=="function"?$:rh(!!$),m):t},m.container=function($){return arguments.length?(e=typeof $=="function"?$:rh($),m):e},m.subject=function($){return arguments.length?(n=typeof $=="function"?$:rh($),m):n},m.touchable=function($){return arguments.length?(i=typeof $=="function"?$:rh(!!$),m):i},m.on=function(){var $=l.on.apply(l,arguments);return $===l?m:$},m.clickDistance=function($){return arguments.length?(p=($=+$)*$,m):Math.sqrt(p)},m}function by(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function VT(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function xu(){}var Yc=.7,od=1/Yc,La="\\s*([+-]?\\d+)\\s*",Wc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z_=/^#([0-9a-f]{3,8})$/,E_=new RegExp(`^rgb\\(${La},${La},${La}\\)$`),__=new RegExp(`^rgb\\(${Hi},${Hi},${Hi}\\)$`),j_=new RegExp(`^rgba\\(${La},${La},${La},${Wc}\\)$`),M_=new RegExp(`^rgba\\(${Hi},${Hi},${Hi},${Wc}\\)$`),X_=new RegExp(`^hsl\\(${Wc},${Hi},${Hi}\\)$`),Z_=new RegExp(`^hsla\\(${Wc},${Hi},${Hi},${Wc}\\)$`),qv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};by(xu,Pl,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Dv,formatHex:Dv,formatHex8:q_,formatHsl:D_,formatRgb:Lv,toString:Lv});function Dv(){return this.rgb().formatHex()}function q_(){return this.rgb().formatHex8()}function D_(){return YT(this).formatHsl()}function Lv(){return this.rgb().formatRgb()}function Pl(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=z_.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Bv(e):n===3?new En(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?sh(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?sh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=E_.exec(t))?new En(e[1],e[2],e[3],1):(e=__.exec(t))?new En(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=j_.exec(t))?sh(e[1],e[2],e[3],e[4]):(e=M_.exec(t))?sh(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=X_.exec(t))?Yv(e[1],e[2]/100,e[3]/100,1):(e=Z_.exec(t))?Yv(e[1],e[2]/100,e[3]/100,e[4]):qv.hasOwnProperty(t)?Bv(qv[t]):t==="transparent"?new En(NaN,NaN,NaN,0):null}function Bv(t){return new En(t>>16&255,t>>8&255,t&255,1)}function sh(t,e,n,i){return i<=0&&(t=e=n=NaN),new En(t,e,n,i)}function L_(t){return t instanceof xu||(t=Pl(t)),t?(t=t.rgb(),new En(t.r,t.g,t.b,t.opacity)):new En}function r0(t,e,n,i){return arguments.length===1?L_(t):new En(t,e,n,i??1)}function En(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}by(En,r0,VT(xu,{brighter(t){return t=t==null?od:Math.pow(od,t),new En(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Yc:Math.pow(Yc,t),new En(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new En(wl(this.r),wl(this.g),wl(this.b),cd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Nv,formatHex:Nv,formatHex8:B_,formatRgb:Vv,toString:Vv}));function Nv(){return`#${Sl(this.r)}${Sl(this.g)}${Sl(this.b)}`}function B_(){return`#${Sl(this.r)}${Sl(this.g)}${Sl(this.b)}${Sl((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vv(){const t=cd(this.opacity);return`${t===1?"rgb(":"rgba("}${wl(this.r)}, ${wl(this.g)}, ${wl(this.b)}${t===1?")":`, ${t})`}`}function cd(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function wl(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Sl(t){return t=wl(t),(t<16?"0":"")+t.toString(16)}function Yv(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new vi(t,e,n,i)}function YT(t){if(t instanceof vi)return new vi(t.h,t.s,t.l,t.opacity);if(t instanceof xu||(t=Pl(t)),!t)return new vi;if(t instanceof vi)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),l=Math.max(e,n,i),a=NaN,c=l-r,f=(l+r)/2;return c?(e===l?a=(n-i)/c+(n<i)*6:n===l?a=(i-e)/c+2:a=(e-n)/c+4,c/=f<.5?l+r:2-l-r,a*=60):c=f>0&&f<1?0:a,new vi(a,c,f,t.opacity)}function N_(t,e,n,i){return arguments.length===1?YT(t):new vi(t,e,n,i??1)}function vi(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}by(vi,N_,VT(xu,{brighter(t){return t=t==null?od:Math.pow(od,t),new vi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Yc:Math.pow(Yc,t),new vi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new En(Ig(t>=240?t-240:t+120,r,i),Ig(t,r,i),Ig(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new vi(Wv(this.h),lh(this.s),lh(this.l),cd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=cd(this.opacity);return`${t===1?"hsl(":"hsla("}${Wv(this.h)}, ${lh(this.s)*100}%, ${lh(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Wv(t){return t=(t||0)%360,t<0?t+360:t}function lh(t){return Math.max(0,Math.min(1,t||0))}function Ig(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const vy=t=>()=>t;function V_(t,e){return function(n){return t+n*e}}function Y_(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function W_(t){return(t=+t)==1?WT:function(e,n){return n-e?Y_(e,n,t):vy(isNaN(e)?n:e)}}function WT(t,e){var n=e-t;return n?V_(t,n):vy(isNaN(t)?e:t)}const ud=(function t(e){var n=W_(e);function i(r,l){var a=n((r=r0(r)).r,(l=r0(l)).r),c=n(r.g,l.g),f=n(r.b,l.b),h=WT(r.opacity,l.opacity);return function(O){return r.r=a(O),r.g=c(O),r.b=f(O),r.opacity=h(O),r+""}}return i.gamma=t,i})(1);function U_(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(l){for(r=0;r<n;++r)i[r]=t[r]*(1-l)+e[r]*l;return i}}function G_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function H_(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),l=new Array(n),a;for(a=0;a<i;++a)r[a]=_c(t[a],e[a]);for(;a<n;++a)l[a]=e[a];return function(c){for(a=0;a<i;++a)l[a]=r[a](c);return l}}function I_(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Li(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function F_(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=_c(t[r],e[r]):i[r]=e[r];return function(l){for(r in n)i[r]=n[r](l);return i}}var s0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fg=new RegExp(s0.source,"g");function K_(t){return function(){return t}}function J_(t){return function(e){return t(e)+""}}function UT(t,e){var n=s0.lastIndex=Fg.lastIndex=0,i,r,l,a=-1,c=[],f=[];for(t=t+"",e=e+"";(i=s0.exec(t))&&(r=Fg.exec(e));)(l=r.index)>n&&(l=e.slice(n,l),c[a]?c[a]+=l:c[++a]=l),(i=i[0])===(r=r[0])?c[a]?c[a]+=r:c[++a]=r:(c[++a]=null,f.push({i:a,x:Li(i,r)})),n=Fg.lastIndex;return n<e.length&&(l=e.slice(n),c[a]?c[a]+=l:c[++a]=l),c.length<2?f[0]?J_(f[0].x):K_(e):(e=f.length,function(h){for(var O=0,p;O<e;++O)c[(p=f[O]).i]=p.x(h);return c.join("")})}function _c(t,e){var n=typeof e,i;return e==null||n==="boolean"?vy(e):(n==="number"?Li:n==="string"?(i=Pl(e))?(e=i,ud):UT:e instanceof Pl?ud:e instanceof Date?I_:G_(e)?U_:Array.isArray(e)?H_:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?F_:Li)(t,e)}var Uv=180/Math.PI,l0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function GT(t,e,n,i,r,l){var a,c,f;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(f=t*n+e*i)&&(n-=t*f,i-=e*f),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,f/=c),t*i<e*n&&(t=-t,e=-e,f=-f,a=-a),{translateX:r,translateY:l,rotate:Math.atan2(e,t)*Uv,skewX:Math.atan(f)*Uv,scaleX:a,scaleY:c}}var ah;function ej(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?l0:GT(e.a,e.b,e.c,e.d,e.e,e.f)}function tj(t){return t==null||(ah||(ah=document.createElementNS("http://www.w3.org/2000/svg","g")),ah.setAttribute("transform",t),!(t=ah.transform.baseVal.consolidate()))?l0:(t=t.matrix,GT(t.a,t.b,t.c,t.d,t.e,t.f))}function HT(t,e,n,i){function r(h){return h.length?h.pop()+" ":""}function l(h,O,p,m,y,b){if(h!==p||O!==m){var v=y.push("translate(",null,e,null,n);b.push({i:v-4,x:Li(h,p)},{i:v-2,x:Li(O,m)})}else(p||m)&&y.push("translate("+p+e+m+n)}function a(h,O,p,m){h!==O?(h-O>180?O+=360:O-h>180&&(h+=360),m.push({i:p.push(r(p)+"rotate(",null,i)-2,x:Li(h,O)})):O&&p.push(r(p)+"rotate("+O+i)}function c(h,O,p,m){h!==O?m.push({i:p.push(r(p)+"skewX(",null,i)-2,x:Li(h,O)}):O&&p.push(r(p)+"skewX("+O+i)}function f(h,O,p,m,y,b){if(h!==p||O!==m){var v=y.push(r(y)+"scale(",null,",",null,")");b.push({i:v-4,x:Li(h,p)},{i:v-2,x:Li(O,m)})}else(p!==1||m!==1)&&y.push(r(y)+"scale("+p+","+m+")")}return function(h,O){var p=[],m=[];return h=t(h),O=t(O),l(h.translateX,h.translateY,O.translateX,O.translateY,p,m),a(h.rotate,O.rotate,p,m),c(h.skewX,O.skewX,p,m),f(h.scaleX,h.scaleY,O.scaleX,O.scaleY,p,m),h=O=null,function(y){for(var b=-1,v=m.length,k;++b<v;)p[(k=m[b]).i]=k.x(y);return p.join("")}}}var nj=HT(ej,"px, ","px)","deg)"),ij=HT(tj,", ",")",")"),rj=1e-12;function Gv(t){return((t=Math.exp(t))+1/t)/2}function sj(t){return((t=Math.exp(t))-1/t)/2}function lj(t){return((t=Math.exp(2*t))-1)/(t+1)}const Nh=(function t(e,n,i){function r(l,a){var c=l[0],f=l[1],h=l[2],O=a[0],p=a[1],m=a[2],y=O-c,b=p-f,v=y*y+b*b,k,Q;if(v<rj)Q=Math.log(m/h)/e,k=function(E){return[c+E*y,f+E*b,h*Math.exp(e*E*Q)]};else{var P=Math.sqrt(v),T=(m*m-h*h+i*v)/(2*h*n*P),$=(m*m-h*h-i*v)/(2*m*n*P),_=Math.log(Math.sqrt(T*T+1)-T),A=Math.log(Math.sqrt($*$+1)-$);Q=(A-_)/e,k=function(E){var N=E*Q,G=Gv(_),ne=h/(n*P)*(G*lj(e*N+_)-sj(_));return[c+ne*y,f+ne*b,h*G/Gv(e*N+_)]}}return k.duration=Q*1e3*e/Math.SQRT2,k}return r.rho=function(l){var a=Math.max(.001,+l),c=a*a,f=c*c;return t(a,c,f)},r})(Math.SQRT2,2,4);var Ka=0,Cc=0,pc=0,IT=1e3,fd,Ac,hd=0,Cl=0,eO=0,Uc=typeof performance=="object"&&performance.now?performance:Date,FT=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Qy(){return Cl||(FT(aj),Cl=Uc.now()+eO)}function aj(){Cl=0}function dd(){this._call=this._time=this._next=null}dd.prototype=KT.prototype={constructor:dd,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Qy():+n)+(e==null?0:+e),!this._next&&Ac!==this&&(Ac?Ac._next=this:fd=this,Ac=this),this._call=t,this._time=n,a0()},stop:function(){this._call&&(this._call=null,this._time=1/0,a0())}};function KT(t,e,n){var i=new dd;return i.restart(t,e,n),i}function oj(){Qy(),++Ka;for(var t=fd,e;t;)(e=Cl-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ka}function Hv(){Cl=(hd=Uc.now())+eO,Ka=Cc=0;try{oj()}finally{Ka=0,uj(),Cl=0}}function cj(){var t=Uc.now(),e=t-hd;e>IT&&(eO-=e,hd=t)}function uj(){for(var t,e=fd,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:fd=n);Ac=t,a0(i)}function a0(t){if(!Ka){Cc&&(Cc=clearTimeout(Cc));var e=t-Cl;e>24?(t<1/0&&(Cc=setTimeout(Hv,t-Uc.now()-eO)),pc&&(pc=clearInterval(pc))):(pc||(hd=Uc.now(),pc=setInterval(cj,IT)),Ka=1,FT(Hv))}}function Iv(t,e,n){var i=new dd;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var fj=Kd("start","end","cancel","interrupt"),hj=[],JT=0,Fv=1,o0=2,Vh=3,Kv=4,c0=5,Yh=6;function tO(t,e,n,i,r,l){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;dj(t,n,{name:e,index:i,group:r,on:fj,tween:hj,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:JT})}function wy(t,e){var n=Pi(t,e);if(n.state>JT)throw new Error("too late; already scheduled");return n}function Ji(t,e){var n=Pi(t,e);if(n.state>Vh)throw new Error("too late; already running");return n}function Pi(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function dj(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=KT(l,0,n.time);function l(h){n.state=Fv,n.timer.restart(a,n.delay,n.time),n.delay<=h&&a(h-n.delay)}function a(h){var O,p,m,y;if(n.state!==Fv)return f();for(O in i)if(y=i[O],y.name===n.name){if(y.state===Vh)return Iv(a);y.state===Kv?(y.state=Yh,y.timer.stop(),y.on.call("interrupt",t,t.__data__,y.index,y.group),delete i[O]):+O<e&&(y.state=Yh,y.timer.stop(),y.on.call("cancel",t,t.__data__,y.index,y.group),delete i[O])}if(Iv(function(){n.state===Vh&&(n.state=Kv,n.timer.restart(c,n.delay,n.time),c(h))}),n.state=o0,n.on.call("start",t,t.__data__,n.index,n.group),n.state===o0){for(n.state=Vh,r=new Array(m=n.tween.length),O=0,p=-1;O<m;++O)(y=n.tween[O].value.call(t,t.__data__,n.index,n.group))&&(r[++p]=y);r.length=p+1}}function c(h){for(var O=h<n.duration?n.ease.call(null,h/n.duration):(n.timer.restart(f),n.state=c0,1),p=-1,m=r.length;++p<m;)r[p].call(t,O);n.state===c0&&(n.on.call("end",t,t.__data__,n.index,n.group),f())}function f(){n.state=Yh,n.timer.stop(),delete i[e];for(var h in i)return;delete t.__transition}}function Wh(t,e){var n=t.__transition,i,r,l=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((i=n[a]).name!==e){l=!1;continue}r=i.state>o0&&i.state<c0,i.state=Yh,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[a]}l&&delete t.__transition}}function Oj(t){return this.each(function(){Wh(this,t)})}function pj(t,e){var n,i;return function(){var r=Ji(this,t),l=r.tween;if(l!==n){i=n=l;for(var a=0,c=i.length;a<c;++a)if(i[a].name===e){i=i.slice(),i.splice(a,1);break}}r.tween=i}}function gj(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var l=Ji(this,t),a=l.tween;if(a!==i){r=(i=a).slice();for(var c={name:e,value:n},f=0,h=r.length;f<h;++f)if(r[f].name===e){r[f]=c;break}f===h&&r.push(c)}l.tween=r}}function mj(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=Pi(this.node(),n).tween,r=0,l=i.length,a;r<l;++r)if((a=i[r]).name===t)return a.value;return null}return this.each((e==null?pj:gj)(n,t,e))}function ky(t,e,n){var i=t._id;return t.each(function(){var r=Ji(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return Pi(r,i).value[e]}}function e$(t,e){var n;return(typeof e=="number"?Li:e instanceof Pl?ud:(n=Pl(e))?(e=n,ud):UT)(t,e)}function yj(t){return function(){this.removeAttribute(t)}}function xj(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Sj(t,e,n){var i,r=n+"",l;return function(){var a=this.getAttribute(t);return a===r?null:a===i?l:l=e(i=a,n)}}function bj(t,e,n){var i,r=n+"",l;return function(){var a=this.getAttributeNS(t.space,t.local);return a===r?null:a===i?l:l=e(i=a,n)}}function vj(t,e,n){var i,r,l;return function(){var a,c=n(this),f;return c==null?void this.removeAttribute(t):(a=this.getAttribute(t),f=c+"",a===f?null:a===i&&f===r?l:(r=f,l=e(i=a,c)))}}function Qj(t,e,n){var i,r,l;return function(){var a,c=n(this),f;return c==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),f=c+"",a===f?null:a===i&&f===r?l:(r=f,l=e(i=a,c)))}}function wj(t,e){var n=Jd(t),i=n==="transform"?ij:e$;return this.attrTween(t,typeof e=="function"?(n.local?Qj:vj)(n,i,ky(this,"attr."+t,e)):e==null?(n.local?xj:yj)(n):(n.local?bj:Sj)(n,i,e))}function kj(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Tj(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function $j(t,e){var n,i;function r(){var l=e.apply(this,arguments);return l!==i&&(n=(i=l)&&Tj(t,l)),n}return r._value=e,r}function Pj(t,e){var n,i;function r(){var l=e.apply(this,arguments);return l!==i&&(n=(i=l)&&kj(t,l)),n}return r._value=e,r}function Cj(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=Jd(t);return this.tween(n,(i.local?$j:Pj)(i,e))}function Aj(t,e){return function(){wy(this,t).delay=+e.apply(this,arguments)}}function Rj(t,e){return e=+e,function(){wy(this,t).delay=e}}function zj(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Aj:Rj)(e,t)):Pi(this.node(),e).delay}function Ej(t,e){return function(){Ji(this,t).duration=+e.apply(this,arguments)}}function _j(t,e){return e=+e,function(){Ji(this,t).duration=e}}function jj(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ej:_j)(e,t)):Pi(this.node(),e).duration}function Mj(t,e){if(typeof e!="function")throw new Error;return function(){Ji(this,t).ease=e}}function Xj(t){var e=this._id;return arguments.length?this.each(Mj(e,t)):Pi(this.node(),e).ease}function Zj(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ji(this,t).ease=n}}function qj(t){if(typeof t!="function")throw new Error;return this.each(Zj(this._id,t))}function Dj(t){typeof t!="function"&&(t=RT(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var l=e[r],a=l.length,c=i[r]=[],f,h=0;h<a;++h)(f=l[h])&&t.call(f,f.__data__,h,l)&&c.push(f);return new Er(i,this._parents,this._name,this._id)}function Lj(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,l=Math.min(i,r),a=new Array(i),c=0;c<l;++c)for(var f=e[c],h=n[c],O=f.length,p=a[c]=new Array(O),m,y=0;y<O;++y)(m=f[y]||h[y])&&(p[y]=m);for(;c<i;++c)a[c]=e[c];return new Er(a,this._parents,this._name,this._id)}function Bj(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Nj(t,e,n){var i,r,l=Bj(e)?wy:Ji;return function(){var a=l(this,t),c=a.on;c!==i&&(r=(i=c).copy()).on(e,n),a.on=r}}function Vj(t,e){var n=this._id;return arguments.length<2?Pi(this.node(),n).on.on(t):this.each(Nj(n,t,e))}function Yj(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Wj(){return this.on("end.remove",Yj(this._id))}function Uj(t){var e=this._name,n=this._id;typeof t!="function"&&(t=xy(t));for(var i=this._groups,r=i.length,l=new Array(r),a=0;a<r;++a)for(var c=i[a],f=c.length,h=l[a]=new Array(f),O,p,m=0;m<f;++m)(O=c[m])&&(p=t.call(O,O.__data__,m,c))&&("__data__"in O&&(p.__data__=O.__data__),h[m]=p,tO(h[m],e,n,m,h,Pi(O,n)));return new Er(l,this._parents,e,n)}function Gj(t){var e=this._name,n=this._id;typeof t!="function"&&(t=AT(t));for(var i=this._groups,r=i.length,l=[],a=[],c=0;c<r;++c)for(var f=i[c],h=f.length,O,p=0;p<h;++p)if(O=f[p]){for(var m=t.call(O,O.__data__,p,f),y,b=Pi(O,n),v=0,k=m.length;v<k;++v)(y=m[v])&&tO(y,e,n,v,m,b);l.push(m),a.push(O)}return new Er(l,a,e,n)}var Hj=yu.prototype.constructor;function Ij(){return new Hj(this._groups,this._parents)}function Fj(t,e){var n,i,r;return function(){var l=Fa(this,t),a=(this.style.removeProperty(t),Fa(this,t));return l===a?null:l===n&&a===i?r:r=e(n=l,i=a)}}function t$(t){return function(){this.style.removeProperty(t)}}function Kj(t,e,n){var i,r=n+"",l;return function(){var a=Fa(this,t);return a===r?null:a===i?l:l=e(i=a,n)}}function Jj(t,e,n){var i,r,l;return function(){var a=Fa(this,t),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(t),Fa(this,t))),a===f?null:a===i&&f===r?l:(r=f,l=e(i=a,c))}}function eM(t,e){var n,i,r,l="style."+e,a="end."+l,c;return function(){var f=Ji(this,t),h=f.on,O=f.value[l]==null?c||(c=t$(e)):void 0;(h!==n||r!==O)&&(i=(n=h).copy()).on(a,r=O),f.on=i}}function tM(t,e,n){var i=(t+="")=="transform"?nj:e$;return e==null?this.styleTween(t,Fj(t,i)).on("end.style."+t,t$(t)):typeof e=="function"?this.styleTween(t,Jj(t,i,ky(this,"style."+t,e))).each(eM(this._id,t)):this.styleTween(t,Kj(t,i,e),n).on("end.style."+t,null)}function nM(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function iM(t,e,n){var i,r;function l(){var a=e.apply(this,arguments);return a!==r&&(i=(r=a)&&nM(t,a,n)),i}return l._value=e,l}function rM(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,iM(t,e,n??""))}function sM(t){return function(){this.textContent=t}}function lM(t){return function(){var e=t(this);this.textContent=e??""}}function aM(t){return this.tween("text",typeof t=="function"?lM(ky(this,"text",t)):sM(t==null?"":t+""))}function oM(t){return function(e){this.textContent=t.call(this,e)}}function cM(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&oM(r)),e}return i._value=t,i}function uM(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,cM(t))}function fM(){for(var t=this._name,e=this._id,n=n$(),i=this._groups,r=i.length,l=0;l<r;++l)for(var a=i[l],c=a.length,f,h=0;h<c;++h)if(f=a[h]){var O=Pi(f,e);tO(f,t,n,h,a,{time:O.time+O.delay+O.duration,delay:0,duration:O.duration,ease:O.ease})}return new Er(i,this._parents,t,n)}function hM(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(l,a){var c={value:a},f={value:function(){--r===0&&l()}};n.each(function(){var h=Ji(this,i),O=h.on;O!==t&&(e=(t=O).copy(),e._.cancel.push(c),e._.interrupt.push(c),e._.end.push(f)),h.on=e}),r===0&&l()})}var dM=0;function Er(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function n$(){return++dM}var vr=yu.prototype;Er.prototype={constructor:Er,select:Uj,selectAll:Gj,selectChild:vr.selectChild,selectChildren:vr.selectChildren,filter:Dj,merge:Lj,selection:Ij,transition:fM,call:vr.call,nodes:vr.nodes,node:vr.node,size:vr.size,empty:vr.empty,each:vr.each,on:Vj,attr:wj,attrTween:Cj,style:tM,styleTween:rM,text:aM,textTween:uM,remove:Wj,tween:mj,delay:zj,duration:jj,ease:Xj,easeVarying:qj,end:hM,[Symbol.iterator]:vr[Symbol.iterator]};function OM(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var pM={time:null,delay:0,duration:250,ease:OM};function gM(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function mM(t){var e,n;t instanceof Er?(e=t._id,t=t._name):(e=n$(),(n=pM).time=Qy(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,l=0;l<r;++l)for(var a=i[l],c=a.length,f,h=0;h<c;++h)(f=a[h])&&tO(f,t,e,h,a,n||gM(f,e));return new Er(i,this._parents,t,e)}yu.prototype.interrupt=Oj;yu.prototype.transition=mM;const oh=t=>()=>t;function yM(t,{sourceEvent:e,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function Ar(t,e,n){this.k=t,this.x=e,this.y=n}Ar.prototype={constructor:Ar,scale:function(t){return t===1?this:new Ar(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ar(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nO=new Ar(1,0,0);i$.prototype=Ar.prototype;function i$(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nO;return t.__zoom}function Kg(t){t.stopImmediatePropagation()}function gc(t){t.preventDefault(),t.stopImmediatePropagation()}function xM(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function SM(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Jv(){return this.__zoom||nO}function bM(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function vM(){return navigator.maxTouchPoints||"ontouchstart"in this}function QM(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],l=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),a>l?(l+a)/2:Math.min(0,l)||Math.max(0,a))}function r$(){var t=xM,e=SM,n=QM,i=bM,r=vM,l=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],c=250,f=Nh,h=Kd("start","zoom","end"),O,p,m,y=500,b=150,v=0,k=10;function Q(X){X.property("__zoom",Jv).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",G).on("dblclick.zoom",ne).filter(r).on("touchstart.zoom",V).on("touchmove.zoom",Y).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}Q.transform=function(X,W,R,q){var B=X.selection?X.selection():X;B.property("__zoom",Jv),X!==B?_(X,W,R,q):B.interrupt().each(function(){A(this,arguments).event(q).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},Q.scaleBy=function(X,W,R,q){Q.scaleTo(X,function(){var B=this.__zoom.k,M=typeof W=="function"?W.apply(this,arguments):W;return B*M},R,q)},Q.scaleTo=function(X,W,R,q){Q.transform(X,function(){var B=e.apply(this,arguments),M=this.__zoom,F=R==null?$(B):typeof R=="function"?R.apply(this,arguments):R,z=M.invert(F),Z=typeof W=="function"?W.apply(this,arguments):W;return n(T(P(M,Z),F,z),B,a)},R,q)},Q.translateBy=function(X,W,R,q){Q.transform(X,function(){return n(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof R=="function"?R.apply(this,arguments):R),e.apply(this,arguments),a)},null,q)},Q.translateTo=function(X,W,R,q,B){Q.transform(X,function(){var M=e.apply(this,arguments),F=this.__zoom,z=q==null?$(M):typeof q=="function"?q.apply(this,arguments):q;return n(nO.translate(z[0],z[1]).scale(F.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof R=="function"?-R.apply(this,arguments):-R),M,a)},q,B)};function P(X,W){return W=Math.max(l[0],Math.min(l[1],W)),W===X.k?X:new Ar(W,X.x,X.y)}function T(X,W,R){var q=W[0]-R[0]*X.k,B=W[1]-R[1]*X.k;return q===X.x&&B===X.y?X:new Ar(X.k,q,B)}function $(X){return[(+X[0][0]+ +X[1][0])/2,(+X[0][1]+ +X[1][1])/2]}function _(X,W,R,q){X.on("start.zoom",function(){A(this,arguments).event(q).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(q).end()}).tween("zoom",function(){var B=this,M=arguments,F=A(B,M).event(q),z=e.apply(B,M),Z=R==null?$(z):typeof R=="function"?R.apply(B,M):R,te=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),re=B.__zoom,ue=typeof W=="function"?W.apply(B,M):W,he=f(re.invert(Z).concat(te/re.k),ue.invert(Z).concat(te/ue.k));return function(Oe){if(Oe===1)Oe=ue;else{var fe=he(Oe),ge=te/fe[2];Oe=new Ar(ge,Z[0]-fe[0]*ge,Z[1]-fe[1]*ge)}F.zoom(null,Oe)}})}function A(X,W,R){return!R&&X.__zooming||new E(X,W)}function E(X,W){this.that=X,this.args=W,this.active=0,this.sourceEvent=null,this.extent=e.apply(X,W),this.taps=0}E.prototype={event:function(X){return X&&(this.sourceEvent=X),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(X,W){return this.mouse&&X!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&X!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&X!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(X){var W=Hn(this.that).datum();h.call(X,this.that,new yM(X,{sourceEvent:this.sourceEvent,target:Q,transform:this.that.__zoom,dispatch:h}),W)}};function N(X,...W){if(!t.apply(this,arguments))return;var R=A(this,W).event(X),q=this.__zoom,B=Math.max(l[0],Math.min(l[1],q.k*Math.pow(2,i.apply(this,arguments)))),M=bi(X);if(R.wheel)(R.mouse[0][0]!==M[0]||R.mouse[0][1]!==M[1])&&(R.mouse[1]=q.invert(R.mouse[0]=M)),clearTimeout(R.wheel);else{if(q.k===B)return;R.mouse=[M,q.invert(M)],Wh(this),R.start()}gc(X),R.wheel=setTimeout(F,b),R.zoom("mouse",n(T(P(q,B),R.mouse[0],R.mouse[1]),R.extent,a));function F(){R.wheel=null,R.end()}}function G(X,...W){if(m||!t.apply(this,arguments))return;var R=X.currentTarget,q=A(this,W,!0).event(X),B=Hn(X.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",te,!0),M=bi(X,R),F=X.clientX,z=X.clientY;LT(X.view),Kg(X),q.mouse=[M,this.__zoom.invert(M)],Wh(this),q.start();function Z(re){if(gc(re),!q.moved){var ue=re.clientX-F,he=re.clientY-z;q.moved=ue*ue+he*he>v}q.event(re).zoom("mouse",n(T(q.that.__zoom,q.mouse[0]=bi(re,R),q.mouse[1]),q.extent,a))}function te(re){B.on("mousemove.zoom mouseup.zoom",null),BT(re.view,q.moved),gc(re),q.event(re).end()}}function ne(X,...W){if(t.apply(this,arguments)){var R=this.__zoom,q=bi(X.changedTouches?X.changedTouches[0]:X,this),B=R.invert(q),M=R.k*(X.shiftKey?.5:2),F=n(T(P(R,M),q,B),e.apply(this,W),a);gc(X),c>0?Hn(this).transition().duration(c).call(_,F,q,X):Hn(this).call(Q.transform,F,q,X)}}function V(X,...W){if(t.apply(this,arguments)){var R=X.touches,q=R.length,B=A(this,W,X.changedTouches.length===q).event(X),M,F,z,Z;for(Kg(X),F=0;F<q;++F)z=R[F],Z=bi(z,this),Z=[Z,this.__zoom.invert(Z),z.identifier],B.touch0?!B.touch1&&B.touch0[2]!==Z[2]&&(B.touch1=Z,B.taps=0):(B.touch0=Z,M=!0,B.taps=1+!!O);O&&(O=clearTimeout(O)),M&&(B.taps<2&&(p=Z[0],O=setTimeout(function(){O=null},y)),Wh(this),B.start())}}function Y(X,...W){if(this.__zooming){var R=A(this,W).event(X),q=X.changedTouches,B=q.length,M,F,z,Z;for(gc(X),M=0;M<B;++M)F=q[M],z=bi(F,this),R.touch0&&R.touch0[2]===F.identifier?R.touch0[0]=z:R.touch1&&R.touch1[2]===F.identifier&&(R.touch1[0]=z);if(F=R.that.__zoom,R.touch1){var te=R.touch0[0],re=R.touch0[1],ue=R.touch1[0],he=R.touch1[1],Oe=(Oe=ue[0]-te[0])*Oe+(Oe=ue[1]-te[1])*Oe,fe=(fe=he[0]-re[0])*fe+(fe=he[1]-re[1])*fe;F=P(F,Math.sqrt(Oe/fe)),z=[(te[0]+ue[0])/2,(te[1]+ue[1])/2],Z=[(re[0]+he[0])/2,(re[1]+he[1])/2]}else if(R.touch0)z=R.touch0[0],Z=R.touch0[1];else return;R.zoom("touch",n(T(F,z,Z),R.extent,a))}}function H(X,...W){if(this.__zooming){var R=A(this,W).event(X),q=X.changedTouches,B=q.length,M,F;for(Kg(X),m&&clearTimeout(m),m=setTimeout(function(){m=null},y),M=0;M<B;++M)F=q[M],R.touch0&&R.touch0[2]===F.identifier?delete R.touch0:R.touch1&&R.touch1[2]===F.identifier&&delete R.touch1;if(R.touch1&&!R.touch0&&(R.touch0=R.touch1,delete R.touch1),R.touch0)R.touch0[1]=this.__zoom.invert(R.touch0[0]);else if(R.end(),R.taps===2&&(F=bi(F,this),Math.hypot(p[0]-F[0],p[1]-F[1])<k)){var z=Hn(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return Q.wheelDelta=function(X){return arguments.length?(i=typeof X=="function"?X:oh(+X),Q):i},Q.filter=function(X){return arguments.length?(t=typeof X=="function"?X:oh(!!X),Q):t},Q.touchable=function(X){return arguments.length?(r=typeof X=="function"?X:oh(!!X),Q):r},Q.extent=function(X){return arguments.length?(e=typeof X=="function"?X:oh([[+X[0][0],+X[0][1]],[+X[1][0],+X[1][1]]]),Q):e},Q.scaleExtent=function(X){return arguments.length?(l[0]=+X[0],l[1]=+X[1],Q):[l[0],l[1]]},Q.translateExtent=function(X){return arguments.length?(a[0][0]=+X[0][0],a[1][0]=+X[1][0],a[0][1]=+X[0][1],a[1][1]=+X[1][1],Q):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},Q.constrain=function(X){return arguments.length?(n=X,Q):n},Q.duration=function(X){return arguments.length?(c=+X,Q):c},Q.interpolate=function(X){return arguments.length?(f=X,Q):f},Q.on=function(){var X=h.on.apply(h,arguments);return X===h?Q:X},Q.clickDistance=function(X){return arguments.length?(v=(X=+X)*X,Q):Math.sqrt(v)},Q.tapDistance=function(X){return arguments.length?(k=+X,Q):k},Q}const Ki={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:e,sourceHandle:n,targetHandle:i})=>`Couldn't create edge for ${t} handle id: "${t==="source"?n:i}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Gc=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],s$=["Enter"," ","Escape"],l$={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:e,y:n})=>`Moved selected node ${t}. New position, x: ${e}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ja;(function(t){t.Strict="strict",t.Loose="loose"})(Ja||(Ja={}));var kl;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(kl||(kl={}));var Hc;(function(t){t.Partial="partial",t.Full="full"})(Hc||(Hc={}));const a$={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ks;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(ks||(ks={}));var Od;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Od||(Od={}));var we;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(we||(we={}));const eQ={[we.Left]:we.Right,[we.Right]:we.Left,[we.Top]:we.Bottom,[we.Bottom]:we.Top};function o$(t){return t===null?null:t?"valid":"invalid"}const c$=t=>"id"in t&&"source"in t&&"target"in t,wM=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Ty=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Su=(t,e=[0,0])=>{const{width:n,height:i}=Xr(t),r=t.origin??e,l=n*r[0],a=i*r[1];return{x:t.position.x-l,y:t.position.y-a}},kM=(t,e={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const n=t.reduce((i,r)=>{const l=typeof r=="string";let a=!e.nodeLookup&&!l?r:void 0;e.nodeLookup&&(a=l?e.nodeLookup.get(r):Ty(r)?r:e.nodeLookup.get(r.id));const c=a?pd(a,e.nodeOrigin):{x:0,y:0,x2:0,y2:0};return iO(i,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return rO(n)},bu=(t,e={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},i=!1;return t.forEach(r=>{(e.filter===void 0||e.filter(r))&&(n=iO(n,pd(r)),i=!0)}),i?rO(n):{x:0,y:0,width:0,height:0}},$y=(t,e,[n,i,r]=[0,0,1],l=!1,a=!1)=>{const c={...Qu(e,[n,i,r]),width:e.width/r,height:e.height/r},f=[];for(const h of t.values()){const{measured:O,selectable:p=!0,hidden:m=!1}=h;if(a&&!p||m)continue;const y=O.width??h.width??h.initialWidth??null,b=O.height??h.height??h.initialHeight??null,v=Ic(c,to(h)),k=(y??0)*(b??0),Q=l&&v>0;(!h.internals.handleBounds||Q||v>=k||h.dragging)&&f.push(h)}return f},TM=(t,e)=>{const n=new Set;return t.forEach(i=>{n.add(i.id)}),e.filter(i=>n.has(i.source)||n.has(i.target))};function $M(t,e){const n=new Map,i=e!=null&&e.nodes?new Set(e.nodes.map(r=>r.id)):null;return t.forEach(r=>{r.measured.width&&r.measured.height&&((e==null?void 0:e.includeHiddenNodes)||!r.hidden)&&(!i||i.has(r.id))&&n.set(r.id,r)}),n}async function PM({nodes:t,width:e,height:n,panZoom:i,minZoom:r,maxZoom:l},a){if(t.size===0)return Promise.resolve(!0);const c=$M(t,a),f=bu(c),h=Py(f,e,n,(a==null?void 0:a.minZoom)??r,(a==null?void 0:a.maxZoom)??l,(a==null?void 0:a.padding)??.1);return await i.setViewport(h,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)}function u$({nodeId:t,nextPosition:e,nodeLookup:n,nodeOrigin:i=[0,0],nodeExtent:r,onError:l}){const a=n.get(t),c=a.parentId?n.get(a.parentId):void 0,{x:f,y:h}=c?c.internals.positionAbsolute:{x:0,y:0},O=a.origin??i;let p=a.extent||r;if(a.extent==="parent"&&!a.expandParent)if(!c)l==null||l("005",Ki.error005());else{const y=c.measured.width,b=c.measured.height;y&&b&&(p=[[f,h],[f+y,h+b]])}else c&&no(a.extent)&&(p=[[a.extent[0][0]+f,a.extent[0][1]+h],[a.extent[1][0]+f,a.extent[1][1]+h]]);const m=no(p)?Al(e,p,a.measured):e;return(a.measured.width===void 0||a.measured.height===void 0)&&(l==null||l("015",Ki.error015())),{position:{x:m.x-f+(a.measured.width??0)*O[0],y:m.y-h+(a.measured.height??0)*O[1]},positionAbsolute:m}}async function CM({nodesToRemove:t=[],edgesToRemove:e=[],nodes:n,edges:i,onBeforeDelete:r}){const l=new Set(t.map(m=>m.id)),a=[];for(const m of n){if(m.deletable===!1)continue;const y=l.has(m.id),b=!y&&m.parentId&&a.find(v=>v.id===m.parentId);(y||b)&&a.push(m)}const c=new Set(e.map(m=>m.id)),f=i.filter(m=>m.deletable!==!1),O=TM(a,f);for(const m of f)c.has(m.id)&&!O.find(b=>b.id===m.id)&&O.push(m);if(!r)return{edges:O,nodes:a};const p=await r({nodes:a,edges:O});return typeof p=="boolean"?p?{edges:O,nodes:a}:{edges:[],nodes:[]}:p}const eo=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),Al=(t={x:0,y:0},e,n)=>({x:eo(t.x,e[0][0],e[1][0]-((n==null?void 0:n.width)??0)),y:eo(t.y,e[0][1],e[1][1]-((n==null?void 0:n.height)??0))});function f$(t,e,n){const{width:i,height:r}=Xr(n),{x:l,y:a}=n.internals.positionAbsolute;return Al(t,[[l,a],[l+i,a+r]],e)}const tQ=(t,e,n)=>t<e?eo(Math.abs(t-e),1,e)/e:t>n?-eo(Math.abs(t-n),1,e)/e:0,h$=(t,e,n=15,i=40)=>{const r=tQ(t.x,i,e.width-i)*n,l=tQ(t.y,i,e.height-i)*n;return[r,l]},iO=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),u0=({x:t,y:e,width:n,height:i})=>({x:t,y:e,x2:t+n,y2:e+i}),rO=({x:t,y:e,x2:n,y2:i})=>({x:t,y:e,width:n-t,height:i-e}),to=(t,e=[0,0])=>{var r,l;const{x:n,y:i}=Ty(t)?t.internals.positionAbsolute:Su(t,e);return{x:n,y:i,width:((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0,height:((l=t.measured)==null?void 0:l.height)??t.height??t.initialHeight??0}},pd=(t,e=[0,0])=>{var r,l;const{x:n,y:i}=Ty(t)?t.internals.positionAbsolute:Su(t,e);return{x:n,y:i,x2:n+(((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0),y2:i+(((l=t.measured)==null?void 0:l.height)??t.height??t.initialHeight??0)}},d$=(t,e)=>rO(iO(u0(t),u0(e))),Ic=(t,e)=>{const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),i=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*i)},nQ=t=>wi(t.width)&&wi(t.height)&&wi(t.x)&&wi(t.y),wi=t=>!isNaN(t)&&isFinite(t),AM=(t,e)=>{},vu=(t,e=[1,1])=>({x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}),Qu=({x:t,y:e},[n,i,r],l=!1,a=[1,1])=>{const c={x:(t-n)/r,y:(e-i)/r};return l?vu(c,a):c},gd=({x:t,y:e},[n,i,r])=>({x:t*r+n,y:e*r+i});function Pa(t,e){if(typeof t=="number")return Math.floor((e-e/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(n)}if(typeof t=="string"&&t.endsWith("%")){const n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(e*n*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function RM(t,e,n){if(typeof t=="string"||typeof t=="number"){const i=Pa(t,n),r=Pa(t,e);return{top:i,right:r,bottom:i,left:r,x:r*2,y:i*2}}if(typeof t=="object"){const i=Pa(t.top??t.y??0,n),r=Pa(t.bottom??t.y??0,n),l=Pa(t.left??t.x??0,e),a=Pa(t.right??t.x??0,e);return{top:i,right:a,bottom:r,left:l,x:l+a,y:i+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function zM(t,e,n,i,r,l){const{x:a,y:c}=gd(t,[e,n,i]),{x:f,y:h}=gd({x:t.x+t.width,y:t.y+t.height},[e,n,i]),O=r-f,p=l-h;return{left:Math.floor(a),top:Math.floor(c),right:Math.floor(O),bottom:Math.floor(p)}}const Py=(t,e,n,i,r,l)=>{const a=RM(l,e,n),c=(e-a.x)/t.width,f=(n-a.y)/t.height,h=Math.min(c,f),O=eo(h,i,r),p=t.x+t.width/2,m=t.y+t.height/2,y=e/2-p*O,b=n/2-m*O,v=zM(t,y,b,O,e,n),k={left:Math.min(v.left-a.left,0),top:Math.min(v.top-a.top,0),right:Math.min(v.right-a.right,0),bottom:Math.min(v.bottom-a.bottom,0)};return{x:y-k.left+k.right,y:b-k.top+k.bottom,zoom:O}},Fc=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function no(t){return t!=null&&t!=="parent"}function Xr(t){var e,n;return{width:((e=t.measured)==null?void 0:e.width)??t.width??t.initialWidth??0,height:((n=t.measured)==null?void 0:n.height)??t.height??t.initialHeight??0}}function O$(t){var e,n;return(((e=t.measured)==null?void 0:e.width)??t.width??t.initialWidth)!==void 0&&(((n=t.measured)==null?void 0:n.height)??t.height??t.initialHeight)!==void 0}function p$(t,e={width:0,height:0},n,i,r){const l={...t},a=i.get(n);if(a){const c=a.origin||r;l.x+=a.internals.positionAbsolute.x-(e.width??0)*c[0],l.y+=a.internals.positionAbsolute.y-(e.height??0)*c[1]}return l}function iQ(t,e){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}function EM(){let t,e;return{promise:new Promise((i,r)=>{t=i,e=r}),resolve:t,reject:e}}function _M(t){return{...l$,...t||{}}}function jc(t,{snapGrid:e=[0,0],snapToGrid:n=!1,transform:i,containerBounds:r}){const{x:l,y:a}=ki(t),c=Qu({x:l-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)},i),{x:f,y:h}=n?vu(c,e):c;return{xSnapped:f,ySnapped:h,...c}}const Cy=t=>({width:t.offsetWidth,height:t.offsetHeight}),g$=t=>{var e;return((e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t))||(window==null?void 0:window.document)},jM=["INPUT","SELECT","TEXTAREA"];function m$(t){var i,r;const e=((r=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:r[0])||t.target;return(e==null?void 0:e.nodeType)!==1?!1:jM.includes(e.nodeName)||e.hasAttribute("contenteditable")||!!e.closest(".nokey")}const y$=t=>"clientX"in t,ki=(t,e)=>{var l,a;const n=y$(t),i=n?t.clientX:(l=t.touches)==null?void 0:l[0].clientX,r=n?t.clientY:(a=t.touches)==null?void 0:a[0].clientY;return{x:i-((e==null?void 0:e.left)??0),y:r-((e==null?void 0:e.top)??0)}},rQ=(t,e,n,i,r)=>{const l=e.querySelectorAll(`.${t}`);return!l||!l.length?null:Array.from(l).map(a=>{const c=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:t,nodeId:r,position:a.getAttribute("data-handlepos"),x:(c.left-n.left)/i,y:(c.top-n.top)/i,...Cy(a)}})};function x$({sourceX:t,sourceY:e,targetX:n,targetY:i,sourceControlX:r,sourceControlY:l,targetControlX:a,targetControlY:c}){const f=t*.125+r*.375+a*.375+n*.125,h=e*.125+l*.375+c*.375+i*.125,O=Math.abs(f-t),p=Math.abs(h-e);return[f,h,O,p]}function ch(t,e){return t>=0?.5*t:e*25*Math.sqrt(-t)}function sQ({pos:t,x1:e,y1:n,x2:i,y2:r,c:l}){switch(t){case we.Left:return[e-ch(e-i,l),n];case we.Right:return[e+ch(i-e,l),n];case we.Top:return[e,n-ch(n-r,l)];case we.Bottom:return[e,n+ch(r-n,l)]}}function S$({sourceX:t,sourceY:e,sourcePosition:n=we.Bottom,targetX:i,targetY:r,targetPosition:l=we.Top,curvature:a=.25}){const[c,f]=sQ({pos:n,x1:t,y1:e,x2:i,y2:r,c:a}),[h,O]=sQ({pos:l,x1:i,y1:r,x2:t,y2:e,c:a}),[p,m,y,b]=x$({sourceX:t,sourceY:e,targetX:i,targetY:r,sourceControlX:c,sourceControlY:f,targetControlX:h,targetControlY:O});return[`M${t},${e} C${c},${f} ${h},${O} ${i},${r}`,p,m,y,b]}function b$({sourceX:t,sourceY:e,targetX:n,targetY:i}){const r=Math.abs(n-t)/2,l=n<t?n+r:n-r,a=Math.abs(i-e)/2,c=i<e?i+a:i-a;return[l,c,r,a]}function MM({sourceNode:t,targetNode:e,selected:n=!1,zIndex:i=0,elevateOnSelect:r=!1,zIndexMode:l="basic"}){if(l==="manual")return i;const a=r&&n?i+1e3:i,c=Math.max(t.parentId||r&&t.selected?t.internals.z:0,e.parentId||r&&e.selected?e.internals.z:0);return a+c}function XM({sourceNode:t,targetNode:e,width:n,height:i,transform:r}){const l=iO(pd(t),pd(e));l.x===l.x2&&(l.x2+=1),l.y===l.y2&&(l.y2+=1);const a={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:i/r[2]};return Ic(a,rO(l))>0}const ZM=({source:t,sourceHandle:e,target:n,targetHandle:i})=>`xy-edge__${t}${e||""}-${n}${i||""}`,qM=(t,e)=>e.some(n=>n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)),DM=(t,e,n={})=>{if(!t.source||!t.target)return e;const i=n.getEdgeId||ZM;let r;return c$(t)?r={...t}:r={...t,id:i(t)},qM(r,e)?e:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,e.concat(r))};function v$({sourceX:t,sourceY:e,targetX:n,targetY:i}){const[r,l,a,c]=b$({sourceX:t,sourceY:e,targetX:n,targetY:i});return[`M ${t},${e}L ${n},${i}`,r,l,a,c]}const lQ={[we.Left]:{x:-1,y:0},[we.Right]:{x:1,y:0},[we.Top]:{x:0,y:-1},[we.Bottom]:{x:0,y:1}},LM=({source:t,sourcePosition:e=we.Bottom,target:n})=>e===we.Left||e===we.Right?t.x<n.x?{x:1,y:0}:{x:-1,y:0}:t.y<n.y?{x:0,y:1}:{x:0,y:-1},aQ=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function BM({source:t,sourcePosition:e=we.Bottom,target:n,targetPosition:i=we.Top,center:r,offset:l,stepPosition:a}){const c=lQ[e],f=lQ[i],h={x:t.x+c.x*l,y:t.y+c.y*l},O={x:n.x+f.x*l,y:n.y+f.y*l},p=LM({source:h,sourcePosition:e,target:O}),m=p.x!==0?"x":"y",y=p[m];let b=[],v,k;const Q={x:0,y:0},P={x:0,y:0},[,,T,$]=b$({sourceX:t.x,sourceY:t.y,targetX:n.x,targetY:n.y});if(c[m]*f[m]===-1){m==="x"?(v=r.x??h.x+(O.x-h.x)*a,k=r.y??(h.y+O.y)/2):(v=r.x??(h.x+O.x)/2,k=r.y??h.y+(O.y-h.y)*a);const N=[{x:v,y:h.y},{x:v,y:O.y}],G=[{x:h.x,y:k},{x:O.x,y:k}];c[m]===y?b=m==="x"?N:G:b=m==="x"?G:N}else{const N=[{x:h.x,y:O.y}],G=[{x:O.x,y:h.y}];if(m==="x"?b=c.x===y?G:N:b=c.y===y?N:G,e===i){const X=Math.abs(t[m]-n[m]);if(X<=l){const W=Math.min(l-1,l-X);c[m]===y?Q[m]=(h[m]>t[m]?-1:1)*W:P[m]=(O[m]>n[m]?-1:1)*W}}if(e!==i){const X=m==="x"?"y":"x",W=c[m]===f[X],R=h[X]>O[X],q=h[X]<O[X];(c[m]===1&&(!W&&R||W&&q)||c[m]!==1&&(!W&&q||W&&R))&&(b=m==="x"?N:G)}const ne={x:h.x+Q.x,y:h.y+Q.y},V={x:O.x+P.x,y:O.y+P.y},Y=Math.max(Math.abs(ne.x-b[0].x),Math.abs(V.x-b[0].x)),H=Math.max(Math.abs(ne.y-b[0].y),Math.abs(V.y-b[0].y));Y>=H?(v=(ne.x+V.x)/2,k=b[0].y):(v=b[0].x,k=(ne.y+V.y)/2)}const _={x:h.x+Q.x,y:h.y+Q.y},A={x:O.x+P.x,y:O.y+P.y};return[[t,..._.x!==b[0].x||_.y!==b[0].y?[_]:[],...b,...A.x!==b[b.length-1].x||A.y!==b[b.length-1].y?[A]:[],n],v,k,T,$]}function NM(t,e,n,i){const r=Math.min(aQ(t,e)/2,aQ(e,n)/2,i),{x:l,y:a}=e;if(t.x===l&&l===n.x||t.y===a&&a===n.y)return`L${l} ${a}`;if(t.y===a){const h=t.x<n.x?-1:1,O=t.y<n.y?1:-1;return`L ${l+r*h},${a}Q ${l},${a} ${l},${a+r*O}`}const c=t.x<n.x?1:-1,f=t.y<n.y?-1:1;return`L ${l},${a+r*f}Q ${l},${a} ${l+r*c},${a}`}function f0({sourceX:t,sourceY:e,sourcePosition:n=we.Bottom,targetX:i,targetY:r,targetPosition:l=we.Top,borderRadius:a=5,centerX:c,centerY:f,offset:h=20,stepPosition:O=.5}){const[p,m,y,b,v]=BM({source:{x:t,y:e},sourcePosition:n,target:{x:i,y:r},targetPosition:l,center:{x:c,y:f},offset:h,stepPosition:O});let k=`M${p[0].x} ${p[0].y}`;for(let Q=1;Q<p.length-1;Q++)k+=NM(p[Q-1],p[Q],p[Q+1],a);return k+=`L${p[p.length-1].x} ${p[p.length-1].y}`,[k,m,y,b,v]}function oQ(t){var e;return t&&!!(t.internals.handleBounds||(e=t.handles)!=null&&e.length)&&!!(t.measured.width||t.width||t.initialWidth)}function VM(t){var p;const{sourceNode:e,targetNode:n}=t;if(!oQ(e)||!oQ(n))return null;const i=e.internals.handleBounds||cQ(e.handles),r=n.internals.handleBounds||cQ(n.handles),l=uQ((i==null?void 0:i.source)??[],t.sourceHandle),a=uQ(t.connectionMode===Ja.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),t.targetHandle);if(!l||!a)return(p=t.onError)==null||p.call(t,"008",Ki.error008(l?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const c=(l==null?void 0:l.position)||we.Bottom,f=(a==null?void 0:a.position)||we.Top,h=Rl(e,l,c),O=Rl(n,a,f);return{sourceX:h.x,sourceY:h.y,targetX:O.x,targetY:O.y,sourcePosition:c,targetPosition:f}}function cQ(t){if(!t)return null;const e=[],n=[];for(const i of t)i.width=i.width??1,i.height=i.height??1,i.type==="source"?e.push(i):i.type==="target"&&n.push(i);return{source:e,target:n}}function Rl(t,e,n=we.Left,i=!1){const r=((e==null?void 0:e.x)??0)+t.internals.positionAbsolute.x,l=((e==null?void 0:e.y)??0)+t.internals.positionAbsolute.y,{width:a,height:c}=e??Xr(t);if(i)return{x:r+a/2,y:l+c/2};switch((e==null?void 0:e.position)??n){case we.Top:return{x:r+a/2,y:l};case we.Right:return{x:r+a,y:l+c/2};case we.Bottom:return{x:r+a/2,y:l+c};case we.Left:return{x:r,y:l+c/2}}}function uQ(t,e){return t&&(e?t.find(n=>n.id===e):t[0])||null}function h0(t,e){return t?typeof t=="string"?t:`${e?`${e}__`:""}${Object.keys(t).sort().map(i=>`${i}=${t[i]}`).join("&")}`:""}function YM(t,{id:e,defaultColor:n,defaultMarkerStart:i,defaultMarkerEnd:r}){const l=new Set;return t.reduce((a,c)=>([c.markerStart||i,c.markerEnd||r].forEach(f=>{if(f&&typeof f=="object"){const h=h0(f,e);l.has(h)||(a.push({id:h,color:f.color||n,...f}),l.add(h))}}),a),[]).sort((a,c)=>a.id.localeCompare(c.id))}const Q$=1e3,WM=10,Ay={nodeOrigin:[0,0],nodeExtent:Gc,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},UM={...Ay,checkEquality:!0};function Ry(t,e){const n={...t};for(const i in e)e[i]!==void 0&&(n[i]=e[i]);return n}function GM(t,e,n){const i=Ry(Ay,n);for(const r of t.values())if(r.parentId)Ey(r,t,e,i);else{const l=Su(r,i.nodeOrigin),a=no(r.extent)?r.extent:i.nodeExtent,c=Al(l,a,Xr(r));r.internals.positionAbsolute=c}}function HM(t,e){if(!t.handles)return t.measured?e==null?void 0:e.internals.handleBounds:void 0;const n=[],i=[];for(const r of t.handles){const l={id:r.id,width:r.width??1,height:r.height??1,nodeId:t.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(l):r.type==="target"&&i.push(l)}return{source:n,target:i}}function zy(t){return t==="manual"}function d0(t,e,n,i={}){var O,p;const r=Ry(UM,i),l={i:0},a=new Map(e),c=r!=null&&r.elevateNodesOnSelect&&!zy(r.zIndexMode)?Q$:0;let f=t.length>0,h=!1;e.clear(),n.clear();for(const m of t){let y=a.get(m.id);if(r.checkEquality&&m===(y==null?void 0:y.internals.userNode))e.set(m.id,y);else{const b=Su(m,r.nodeOrigin),v=no(m.extent)?m.extent:r.nodeExtent,k=Al(b,v,Xr(m));y={...r.defaults,...m,measured:{width:(O=m.measured)==null?void 0:O.width,height:(p=m.measured)==null?void 0:p.height},internals:{positionAbsolute:k,handleBounds:HM(m,y),z:w$(m,c,r.zIndexMode),userNode:m}},e.set(m.id,y)}(y.measured===void 0||y.measured.width===void 0||y.measured.height===void 0)&&!y.hidden&&(f=!1),m.parentId&&Ey(y,e,n,i,l),h||(h=m.selected??!1)}return{nodesInitialized:f,hasSelectedNodes:h}}function IM(t,e){if(!t.parentId)return;const n=e.get(t.parentId);n?n.set(t.id,t):e.set(t.parentId,new Map([[t.id,t]]))}function Ey(t,e,n,i,r){const{elevateNodesOnSelect:l,nodeOrigin:a,nodeExtent:c,zIndexMode:f}=Ry(Ay,i),h=t.parentId,O=e.get(h);if(!O){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}IM(t,n),r&&!O.parentId&&O.internals.rootParentIndex===void 0&&f==="auto"&&(O.internals.rootParentIndex=++r.i,O.internals.z=O.internals.z+r.i*WM),r&&O.internals.rootParentIndex!==void 0&&(r.i=O.internals.rootParentIndex);const p=l&&!zy(f)?Q$:0,{x:m,y,z:b}=FM(t,O,a,c,p,f),{positionAbsolute:v}=t.internals,k=m!==v.x||y!==v.y;(k||b!==t.internals.z)&&e.set(t.id,{...t,internals:{...t.internals,positionAbsolute:k?{x:m,y}:v,z:b}})}function w$(t,e,n){const i=wi(t.zIndex)?t.zIndex:0;return zy(n)?i:i+(t.selected?e:0)}function FM(t,e,n,i,r,l){const{x:a,y:c}=e.internals.positionAbsolute,f=Xr(t),h=Su(t,n),O=no(t.extent)?Al(h,t.extent,f):h;let p=Al({x:a+O.x,y:c+O.y},i,f);t.extent==="parent"&&(p=f$(p,f,e));const m=w$(t,r,l),y=e.internals.z??0;return{x:p.x,y:p.y,z:y>=m?y+1:m}}function _y(t,e,n,i=[0,0]){var a;const r=[],l=new Map;for(const c of t){const f=e.get(c.parentId);if(!f)continue;const h=((a=l.get(c.parentId))==null?void 0:a.expandedRect)??to(f),O=d$(h,c.rect);l.set(c.parentId,{expandedRect:O,parent:f})}return l.size>0&&l.forEach(({expandedRect:c,parent:f},h)=>{var T;const O=f.internals.positionAbsolute,p=Xr(f),m=f.origin??i,y=c.x<O.x?Math.round(Math.abs(O.x-c.x)):0,b=c.y<O.y?Math.round(Math.abs(O.y-c.y)):0,v=Math.max(p.width,Math.round(c.width)),k=Math.max(p.height,Math.round(c.height)),Q=(v-p.width)*m[0],P=(k-p.height)*m[1];(y>0||b>0||Q||P)&&(r.push({id:h,type:"position",position:{x:f.position.x-y+Q,y:f.position.y-b+P}}),(T=n.get(h))==null||T.forEach($=>{t.some(_=>_.id===$.id)||r.push({id:$.id,type:"position",position:{x:$.position.x+y,y:$.position.y+b}})})),(p.width<c.width||p.height<c.height||y||b)&&r.push({id:h,type:"dimensions",setAttributes:!0,dimensions:{width:v+(y?m[0]*y-Q:0),height:k+(b?m[1]*b-P:0)}})}),r}function KM(t,e,n,i,r,l,a){const c=i==null?void 0:i.querySelector(".xyflow__viewport");let f=!1;if(!c)return{changes:[],updatedInternals:f};const h=[],O=window.getComputedStyle(c),{m22:p}=new window.DOMMatrixReadOnly(O.transform),m=[];for(const y of t.values()){const b=e.get(y.id);if(!b)continue;if(b.hidden){e.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),f=!0;continue}const v=Cy(y.nodeElement),k=b.measured.width!==v.width||b.measured.height!==v.height;if(!!(v.width&&v.height&&(k||!b.internals.handleBounds||y.force))){const P=y.nodeElement.getBoundingClientRect(),T=no(b.extent)?b.extent:l;let{positionAbsolute:$}=b.internals;b.parentId&&b.extent==="parent"?$=f$($,v,e.get(b.parentId)):T&&($=Al($,T,v));const _={...b,measured:v,internals:{...b.internals,positionAbsolute:$,handleBounds:{source:rQ("source",y.nodeElement,P,p,b.id),target:rQ("target",y.nodeElement,P,p,b.id)}}};e.set(b.id,_),b.parentId&&Ey(_,e,n,{nodeOrigin:r,zIndexMode:a}),f=!0,k&&(h.push({id:b.id,type:"dimensions",dimensions:v}),b.expandParent&&b.parentId&&m.push({id:b.id,parentId:b.parentId,rect:to(_,r)}))}}if(m.length>0){const y=_y(m,e,n,r);h.push(...y)}return{changes:h,updatedInternals:f}}async function JM({delta:t,panZoom:e,transform:n,translateExtent:i,width:r,height:l}){if(!e||!t.x&&!t.y)return Promise.resolve(!1);const a=await e.setViewportConstrained({x:n[0]+t.x,y:n[1]+t.y,zoom:n[2]},[[0,0],[r,l]],i),c=!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2]);return Promise.resolve(c)}function fQ(t,e,n,i,r,l){let a=r;const c=i.get(a)||new Map;i.set(a,c.set(n,e)),a=`${r}-${t}`;const f=i.get(a)||new Map;if(i.set(a,f.set(n,e)),l){a=`${r}-${t}-${l}`;const h=i.get(a)||new Map;i.set(a,h.set(n,e))}}function k$(t,e,n){t.clear(),e.clear();for(const i of n){const{source:r,target:l,sourceHandle:a=null,targetHandle:c=null}=i,f={edgeId:i.id,source:r,target:l,sourceHandle:a,targetHandle:c},h=`${r}-${a}--${l}-${c}`,O=`${l}-${c}--${r}-${a}`;fQ("source",f,O,t,r,a),fQ("target",f,h,t,l,c),e.set(i.id,i)}}function T$(t,e){if(!t.parentId)return!1;const n=e.get(t.parentId);return n?n.selected?!0:T$(n,e):!1}function hQ(t,e,n){var r;let i=t;do{if((r=i==null?void 0:i.matches)!=null&&r.call(i,e))return!0;if(i===n)return!1;i=i==null?void 0:i.parentElement}while(i);return!1}function eX(t,e,n,i){const r=new Map;for(const[l,a]of t)if((a.selected||a.id===i)&&(!a.parentId||!T$(a,t))&&(a.draggable||e&&typeof a.draggable>"u")){const c=t.get(l);c&&r.set(l,{id:l,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return r}function Jg({nodeId:t,dragItems:e,nodeLookup:n,dragging:i=!0}){var a,c,f;const r=[];for(const[h,O]of e){const p=(a=n.get(h))==null?void 0:a.internals.userNode;p&&r.push({...p,position:O.position,dragging:i})}if(!t)return[r[0],r];const l=(c=n.get(t))==null?void 0:c.internals.userNode;return[l?{...l,position:((f=e.get(t))==null?void 0:f.position)||l.position,dragging:i}:r[0],r]}function tX({dragItems:t,snapGrid:e,x:n,y:i}){const r=t.values().next().value;if(!r)return null;const l={x:n-r.distance.x,y:i-r.distance.y},a=vu(l,e);return{x:a.x-l.x,y:a.y-l.y}}function nX({onNodeMouseDown:t,getStoreItems:e,onDragStart:n,onDrag:i,onDragStop:r}){let l={x:null,y:null},a=0,c=new Map,f=!1,h={x:0,y:0},O=null,p=!1,m=null,y=!1,b=!1,v=null;function k({noDragClassName:P,handleSelector:T,domNode:$,isSelectable:_,nodeId:A,nodeClickDistance:E=0}){m=Hn($);function N({x:Y,y:H}){const{nodeLookup:X,nodeExtent:W,snapGrid:R,snapToGrid:q,nodeOrigin:B,onNodeDrag:M,onSelectionDrag:F,onError:z,updateNodePositions:Z}=e();l={x:Y,y:H};let te=!1;const re=c.size>1,ue=re&&W?u0(bu(c)):null,he=re&&q?tX({dragItems:c,snapGrid:R,x:Y,y:H}):null;for(const[Oe,fe]of c){if(!X.has(Oe))continue;let ge={x:Y-fe.distance.x,y:H-fe.distance.y};q&&(ge=he?{x:Math.round(ge.x+he.x),y:Math.round(ge.y+he.y)}:vu(ge,R));let ze=null;if(re&&W&&!fe.extent&&ue){const{positionAbsolute:Te}=fe.internals,Ze=Te.x-ue.x+W[0][0],tt=Te.x+fe.measured.width-ue.x2+W[1][0],se=Te.y-ue.y+W[0][1],qe=Te.y+fe.measured.height-ue.y2+W[1][1];ze=[[Ze,se],[tt,qe]]}const{position:Re,positionAbsolute:ke}=u$({nodeId:Oe,nextPosition:ge,nodeLookup:X,nodeExtent:ze||W,nodeOrigin:B,onError:z});te=te||fe.position.x!==Re.x||fe.position.y!==Re.y,fe.position=Re,fe.internals.positionAbsolute=ke}if(b=b||te,!!te&&(Z(c,!0),v&&(i||M||!A&&F))){const[Oe,fe]=Jg({nodeId:A,dragItems:c,nodeLookup:X});i==null||i(v,c,Oe,fe),M==null||M(v,Oe,fe),A||F==null||F(v,fe)}}async function G(){if(!O)return;const{transform:Y,panBy:H,autoPanSpeed:X,autoPanOnNodeDrag:W}=e();if(!W){f=!1,cancelAnimationFrame(a);return}const[R,q]=h$(h,O,X);(R!==0||q!==0)&&(l.x=(l.x??0)-R/Y[2],l.y=(l.y??0)-q/Y[2],await H({x:R,y:q})&&N(l)),a=requestAnimationFrame(G)}function ne(Y){var re;const{nodeLookup:H,multiSelectionActive:X,nodesDraggable:W,transform:R,snapGrid:q,snapToGrid:B,selectNodesOnDrag:M,onNodeDragStart:F,onSelectionDragStart:z,unselectNodesAndEdges:Z}=e();p=!0,(!M||!_)&&!X&&A&&((re=H.get(A))!=null&&re.selected||Z()),_&&M&&A&&(t==null||t(A));const te=jc(Y.sourceEvent,{transform:R,snapGrid:q,snapToGrid:B,containerBounds:O});if(l=te,c=eX(H,W,te,A),c.size>0&&(n||F||!A&&z)){const[ue,he]=Jg({nodeId:A,dragItems:c,nodeLookup:H});n==null||n(Y.sourceEvent,c,ue,he),F==null||F(Y.sourceEvent,ue,he),A||z==null||z(Y.sourceEvent,he)}}const V=NT().clickDistance(E).on("start",Y=>{const{domNode:H,nodeDragThreshold:X,transform:W,snapGrid:R,snapToGrid:q}=e();O=(H==null?void 0:H.getBoundingClientRect())||null,y=!1,b=!1,v=Y.sourceEvent,X===0&&ne(Y),l=jc(Y.sourceEvent,{transform:W,snapGrid:R,snapToGrid:q,containerBounds:O}),h=ki(Y.sourceEvent,O)}).on("drag",Y=>{const{autoPanOnNodeDrag:H,transform:X,snapGrid:W,snapToGrid:R,nodeDragThreshold:q,nodeLookup:B}=e(),M=jc(Y.sourceEvent,{transform:X,snapGrid:W,snapToGrid:R,containerBounds:O});if(v=Y.sourceEvent,(Y.sourceEvent.type==="touchmove"&&Y.sourceEvent.touches.length>1||A&&!B.has(A))&&(y=!0),!y){if(!f&&H&&p&&(f=!0,G()),!p){const F=ki(Y.sourceEvent,O),z=F.x-h.x,Z=F.y-h.y;Math.sqrt(z*z+Z*Z)>q&&ne(Y)}(l.x!==M.xSnapped||l.y!==M.ySnapped)&&c&&p&&(h=ki(Y.sourceEvent,O),N(M))}}).on("end",Y=>{if(!(!p||y)&&(f=!1,p=!1,cancelAnimationFrame(a),c.size>0)){const{nodeLookup:H,updateNodePositions:X,onNodeDragStop:W,onSelectionDragStop:R}=e();if(b&&(X(c,!1),b=!1),r||W||!A&&R){const[q,B]=Jg({nodeId:A,dragItems:c,nodeLookup:H,dragging:!1});r==null||r(Y.sourceEvent,c,q,B),W==null||W(Y.sourceEvent,q,B),A||R==null||R(Y.sourceEvent,B)}}}).filter(Y=>{const H=Y.target;return!Y.button&&(!P||!hQ(H,`.${P}`,$))&&(!T||hQ(H,T,$))});m.call(V)}function Q(){m==null||m.on(".drag",null)}return{update:k,destroy:Q}}function iX(t,e,n){const i=[],r={x:t.x-n,y:t.y-n,width:n*2,height:n*2};for(const l of e.values())Ic(r,to(l))>0&&i.push(l);return i}const rX=250;function sX(t,e,n,i){var c,f;let r=[],l=1/0;const a=iX(t,n,e+rX);for(const h of a){const O=[...((c=h.internals.handleBounds)==null?void 0:c.source)??[],...((f=h.internals.handleBounds)==null?void 0:f.target)??[]];for(const p of O){if(i.nodeId===p.nodeId&&i.type===p.type&&i.id===p.id)continue;const{x:m,y}=Rl(h,p,p.position,!0),b=Math.sqrt(Math.pow(m-t.x,2)+Math.pow(y-t.y,2));b>e||(b<l?(r=[{...p,x:m,y}],l=b):b===l&&r.push({...p,x:m,y}))}}if(!r.length)return null;if(r.length>1){const h=i.type==="source"?"target":"source";return r.find(O=>O.type===h)??r[0]}return r[0]}function $$(t,e,n,i,r,l=!1){var h,O,p;const a=i.get(t);if(!a)return null;const c=r==="strict"?(h=a.internals.handleBounds)==null?void 0:h[e]:[...((O=a.internals.handleBounds)==null?void 0:O.source)??[],...((p=a.internals.handleBounds)==null?void 0:p.target)??[]],f=(n?c==null?void 0:c.find(m=>m.id===n):c==null?void 0:c[0])??null;return f&&l?{...f,...Rl(a,f,f.position,!0)}:f}function P$(t,e){return t||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function lX(t,e){let n=null;return e?n=!0:t&&!e&&(n=!1),n}const C$=()=>!0;function aX(t,{connectionMode:e,connectionRadius:n,handleId:i,nodeId:r,edgeUpdaterType:l,isTarget:a,domNode:c,nodeLookup:f,lib:h,autoPanOnConnect:O,flowId:p,panBy:m,cancelConnection:y,onConnectStart:b,onConnect:v,onConnectEnd:k,isValidConnection:Q=C$,onReconnectEnd:P,updateConnection:T,getTransform:$,getFromHandle:_,autoPanSpeed:A,dragThreshold:E=1,handleDomNode:N}){const G=g$(t.target);let ne=0,V;const{x:Y,y:H}=ki(t),X=P$(l,N),W=c==null?void 0:c.getBoundingClientRect();let R=!1;if(!W||!X)return;const q=$$(r,X,i,f,e);if(!q)return;let B=ki(t,W),M=!1,F=null,z=!1,Z=null;function te(){if(!O||!W)return;const[Re,ke]=h$(B,W,A);m({x:Re,y:ke}),ne=requestAnimationFrame(te)}const re={...q,nodeId:r,type:X,position:q.position},ue=f.get(r);let Oe={inProgress:!0,isValid:null,from:Rl(ue,re,we.Left,!0),fromHandle:re,fromPosition:re.position,fromNode:ue,to:B,toHandle:null,toPosition:eQ[re.position],toNode:null,pointer:B};function fe(){R=!0,T(Oe),b==null||b(t,{nodeId:r,handleId:i,handleType:X})}E===0&&fe();function ge(Re){if(!R){const{x:qe,y:at}=ki(Re),Yt=qe-Y,an=at-H;if(!(Yt*Yt+an*an>E*E))return;fe()}if(!_()||!re){ze(Re);return}const ke=$();B=ki(Re,W),V=sX(Qu(B,ke,!1,[1,1]),n,f,re),M||(te(),M=!0);const Te=A$(Re,{handle:V,connectionMode:e,fromNodeId:r,fromHandleId:i,fromType:a?"target":"source",isValidConnection:Q,doc:G,lib:h,flowId:p,nodeLookup:f});Z=Te.handleDomNode,F=Te.connection,z=lX(!!V,Te.isValid);const Ze=f.get(r),tt=Ze?Rl(Ze,re,we.Left,!0):Oe.from,se={...Oe,from:tt,isValid:z,to:Te.toHandle&&z?gd({x:Te.toHandle.x,y:Te.toHandle.y},ke):B,toHandle:Te.toHandle,toPosition:z&&Te.toHandle?Te.toHandle.position:eQ[re.position],toNode:Te.toHandle?f.get(Te.toHandle.nodeId):null,pointer:B};T(se),Oe=se}function ze(Re){if(!("touches"in Re&&Re.touches.length>0)){if(R){(V||Z)&&F&&z&&(v==null||v(F));const{inProgress:ke,...Te}=Oe,Ze={...Te,toPosition:Oe.toHandle?Oe.toPosition:null};k==null||k(Re,Ze),l&&(P==null||P(Re,Ze))}y(),cancelAnimationFrame(ne),M=!1,z=!1,F=null,Z=null,G.removeEventListener("mousemove",ge),G.removeEventListener("mouseup",ze),G.removeEventListener("touchmove",ge),G.removeEventListener("touchend",ze)}}G.addEventListener("mousemove",ge),G.addEventListener("mouseup",ze),G.addEventListener("touchmove",ge),G.addEventListener("touchend",ze)}function A$(t,{handle:e,connectionMode:n,fromNodeId:i,fromHandleId:r,fromType:l,doc:a,lib:c,flowId:f,isValidConnection:h=C$,nodeLookup:O}){const p=l==="target",m=e?a.querySelector(`.${c}-flow__handle[data-id="${f}-${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`):null,{x:y,y:b}=ki(t),v=a.elementFromPoint(y,b),k=v!=null&&v.classList.contains(`${c}-flow__handle`)?v:m,Q={handleDomNode:k,isValid:!1,connection:null,toHandle:null};if(k){const P=P$(void 0,k),T=k.getAttribute("data-nodeid"),$=k.getAttribute("data-handleid"),_=k.classList.contains("connectable"),A=k.classList.contains("connectableend");if(!T||!P)return Q;const E={source:p?T:i,sourceHandle:p?$:r,target:p?i:T,targetHandle:p?r:$};Q.connection=E;const G=_&&A&&(n===Ja.Strict?p&&P==="source"||!p&&P==="target":T!==i||$!==r);Q.isValid=G&&h(E),Q.toHandle=$$(T,P,$,O,n,!0)}return Q}const O0={onPointerDown:aX,isValid:A$};function oX({domNode:t,panZoom:e,getTransform:n,getViewScale:i}){const r=Hn(t);function l({translateExtent:c,width:f,height:h,zoomStep:O=1,pannable:p=!0,zoomable:m=!0,inversePan:y=!1}){const b=T=>{if(T.sourceEvent.type!=="wheel"||!e)return;const $=n(),_=T.sourceEvent.ctrlKey&&Fc()?10:1,A=-T.sourceEvent.deltaY*(T.sourceEvent.deltaMode===1?.05:T.sourceEvent.deltaMode?1:.002)*O,E=$[2]*Math.pow(2,A*_);e.scaleTo(E)};let v=[0,0];const k=T=>{(T.sourceEvent.type==="mousedown"||T.sourceEvent.type==="touchstart")&&(v=[T.sourceEvent.clientX??T.sourceEvent.touches[0].clientX,T.sourceEvent.clientY??T.sourceEvent.touches[0].clientY])},Q=T=>{const $=n();if(T.sourceEvent.type!=="mousemove"&&T.sourceEvent.type!=="touchmove"||!e)return;const _=[T.sourceEvent.clientX??T.sourceEvent.touches[0].clientX,T.sourceEvent.clientY??T.sourceEvent.touches[0].clientY],A=[_[0]-v[0],_[1]-v[1]];v=_;const E=i()*Math.max($[2],Math.log($[2]))*(y?-1:1),N={x:$[0]-A[0]*E,y:$[1]-A[1]*E},G=[[0,0],[f,h]];e.setViewportConstrained({x:N.x,y:N.y,zoom:$[2]},G,c)},P=r$().on("start",k).on("zoom",p?Q:null).on("zoom.wheel",m?b:null);r.call(P,{})}function a(){r.on("zoom",null)}return{update:l,destroy:a,pointer:bi}}const sO=t=>({x:t.x,y:t.y,zoom:t.k}),em=({x:t,y:e,zoom:n})=>nO.translate(t,e).scale(n),_a=(t,e)=>t.target.closest(`.${e}`),R$=(t,e)=>e===2&&Array.isArray(t)&&t.includes(2),cX=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,tm=(t,e=0,n=cX,i=()=>{})=>{const r=typeof e=="number"&&e>0;return r||i(),r?t.transition().duration(e).ease(n).on("end",i):t},z$=t=>{const e=t.ctrlKey&&Fc()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*e};function uX({zoomPanValues:t,noWheelClassName:e,d3Selection:n,d3Zoom:i,panOnScrollMode:r,panOnScrollSpeed:l,zoomOnPinch:a,onPanZoomStart:c,onPanZoom:f,onPanZoomEnd:h}){return O=>{if(_a(O,e))return O.ctrlKey&&O.preventDefault(),!1;O.preventDefault(),O.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(O.ctrlKey&&a){const k=bi(O),Q=z$(O),P=p*Math.pow(2,Q);i.scaleTo(n,P,k,O);return}const m=O.deltaMode===1?20:1;let y=r===kl.Vertical?0:O.deltaX*m,b=r===kl.Horizontal?0:O.deltaY*m;!Fc()&&O.shiftKey&&r!==kl.Vertical&&(y=O.deltaY*m,b=0),i.translateBy(n,-(y/p)*l,-(b/p)*l,{internal:!0});const v=sO(n.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(f==null||f(O,v),t.panScrollTimeout=setTimeout(()=>{h==null||h(O,v),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,c==null||c(O,v))}}function fX({noWheelClassName:t,preventScrolling:e,d3ZoomHandler:n}){return function(i,r){const l=i.type==="wheel",a=!e&&l&&!i.ctrlKey,c=_a(i,t);if(i.ctrlKey&&l&&c&&i.preventDefault(),a||c)return null;i.preventDefault(),n.call(this,i,r)}}function hX({zoomPanValues:t,onDraggingChange:e,onPanZoomStart:n}){return i=>{var l,a,c;if((l=i.sourceEvent)!=null&&l.internal)return;const r=sO(i.transform);t.mouseButton=((a=i.sourceEvent)==null?void 0:a.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=r,((c=i.sourceEvent)==null?void 0:c.type)==="mousedown"&&e(!0),n&&(n==null||n(i.sourceEvent,r))}}function dX({zoomPanValues:t,panOnDrag:e,onPaneContextMenu:n,onTransformChange:i,onPanZoom:r}){return l=>{var a,c;t.usedRightMouseButton=!!(n&&R$(e,t.mouseButton??0)),(a=l.sourceEvent)!=null&&a.sync||i([l.transform.x,l.transform.y,l.transform.k]),r&&!((c=l.sourceEvent)!=null&&c.internal)&&(r==null||r(l.sourceEvent,sO(l.transform)))}}function OX({zoomPanValues:t,panOnDrag:e,panOnScroll:n,onDraggingChange:i,onPanZoomEnd:r,onPaneContextMenu:l}){return a=>{var c;if(!((c=a.sourceEvent)!=null&&c.internal)&&(t.isZoomingOrPanning=!1,l&&R$(e,t.mouseButton??0)&&!t.usedRightMouseButton&&a.sourceEvent&&l(a.sourceEvent),t.usedRightMouseButton=!1,i(!1),r)){const f=sO(a.transform);t.prevViewport=f,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{r==null||r(a.sourceEvent,f)},n?150:0)}}}function pX({zoomActivationKeyPressed:t,zoomOnScroll:e,zoomOnPinch:n,panOnDrag:i,panOnScroll:r,zoomOnDoubleClick:l,userSelectionActive:a,noWheelClassName:c,noPanClassName:f,lib:h,connectionInProgress:O}){return p=>{var k;const m=t||e,y=n&&p.ctrlKey,b=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(_a(p,`${h}-flow__node`)||_a(p,`${h}-flow__edge`)))return!0;if(!i&&!m&&!r&&!l&&!n||a||O&&!b||_a(p,c)&&b||_a(p,f)&&(!b||r&&b&&!t)||!n&&p.ctrlKey&&b)return!1;if(!n&&p.type==="touchstart"&&((k=p.touches)==null?void 0:k.length)>1)return p.preventDefault(),!1;if(!m&&!r&&!y&&b||!i&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(i)&&!i.includes(p.button)&&p.type==="mousedown")return!1;const v=Array.isArray(i)&&i.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||b)&&v}}function gX({domNode:t,minZoom:e,maxZoom:n,translateExtent:i,viewport:r,onPanZoom:l,onPanZoomStart:a,onPanZoomEnd:c,onDraggingChange:f}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},O=t.getBoundingClientRect(),p=r$().scaleExtent([e,n]).translateExtent(i),m=Hn(t).call(p);P({x:r.x,y:r.y,zoom:eo(r.zoom,e,n)},[[0,0],[O.width,O.height]],i);const y=m.on("wheel.zoom"),b=m.on("dblclick.zoom");p.wheelDelta(z$);function v(V,Y){return m?new Promise(H=>{p==null||p.interpolate((Y==null?void 0:Y.interpolate)==="linear"?_c:Nh).transform(tm(m,Y==null?void 0:Y.duration,Y==null?void 0:Y.ease,()=>H(!0)),V)}):Promise.resolve(!1)}function k({noWheelClassName:V,noPanClassName:Y,onPaneContextMenu:H,userSelectionActive:X,panOnScroll:W,panOnDrag:R,panOnScrollMode:q,panOnScrollSpeed:B,preventScrolling:M,zoomOnPinch:F,zoomOnScroll:z,zoomOnDoubleClick:Z,zoomActivationKeyPressed:te,lib:re,onTransformChange:ue,connectionInProgress:he,paneClickDistance:Oe,selectionOnDrag:fe}){X&&!h.isZoomingOrPanning&&Q();const ge=W&&!te&&!X;p.clickDistance(fe?1/0:!wi(Oe)||Oe<0?0:Oe);const ze=ge?uX({zoomPanValues:h,noWheelClassName:V,d3Selection:m,d3Zoom:p,panOnScrollMode:q,panOnScrollSpeed:B,zoomOnPinch:F,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}):fX({noWheelClassName:V,preventScrolling:M,d3ZoomHandler:y});if(m.on("wheel.zoom",ze,{passive:!1}),!X){const ke=hX({zoomPanValues:h,onDraggingChange:f,onPanZoomStart:a});p.on("start",ke);const Te=dX({zoomPanValues:h,panOnDrag:R,onPaneContextMenu:!!H,onPanZoom:l,onTransformChange:ue});p.on("zoom",Te);const Ze=OX({zoomPanValues:h,panOnDrag:R,panOnScroll:W,onPaneContextMenu:H,onPanZoomEnd:c,onDraggingChange:f});p.on("end",Ze)}const Re=pX({zoomActivationKeyPressed:te,panOnDrag:R,zoomOnScroll:z,panOnScroll:W,zoomOnDoubleClick:Z,zoomOnPinch:F,userSelectionActive:X,noPanClassName:Y,noWheelClassName:V,lib:re,connectionInProgress:he});p.filter(Re),Z?m.on("dblclick.zoom",b):m.on("dblclick.zoom",null)}function Q(){p.on("zoom",null)}async function P(V,Y,H){const X=em(V),W=p==null?void 0:p.constrain()(X,Y,H);return W&&await v(W),new Promise(R=>R(W))}async function T(V,Y){const H=em(V);return await v(H,Y),new Promise(X=>X(H))}function $(V){if(m){const Y=em(V),H=m.property("__zoom");(H.k!==V.zoom||H.x!==V.x||H.y!==V.y)&&(p==null||p.transform(m,Y,null,{sync:!0}))}}function _(){const V=m?i$(m.node()):{x:0,y:0,k:1};return{x:V.x,y:V.y,zoom:V.k}}function A(V,Y){return m?new Promise(H=>{p==null||p.interpolate((Y==null?void 0:Y.interpolate)==="linear"?_c:Nh).scaleTo(tm(m,Y==null?void 0:Y.duration,Y==null?void 0:Y.ease,()=>H(!0)),V)}):Promise.resolve(!1)}function E(V,Y){return m?new Promise(H=>{p==null||p.interpolate((Y==null?void 0:Y.interpolate)==="linear"?_c:Nh).scaleBy(tm(m,Y==null?void 0:Y.duration,Y==null?void 0:Y.ease,()=>H(!0)),V)}):Promise.resolve(!1)}function N(V){p==null||p.scaleExtent(V)}function G(V){p==null||p.translateExtent(V)}function ne(V){const Y=!wi(V)||V<0?0:V;p==null||p.clickDistance(Y)}return{update:k,destroy:Q,setViewport:T,setViewportConstrained:P,getViewport:_,scaleTo:A,scaleBy:E,setScaleExtent:N,setTranslateExtent:G,syncViewport:$,setClickDistance:ne}}var io;(function(t){t.Line="line",t.Handle="handle"})(io||(io={}));function mX({width:t,prevWidth:e,height:n,prevHeight:i,affectsX:r,affectsY:l}){const a=t-e,c=n-i,f=[a>0?1:a<0?-1:0,c>0?1:c<0?-1:0];return a&&r&&(f[0]=f[0]*-1),c&&l&&(f[1]=f[1]*-1),f}function dQ(t){const e=t.includes("right")||t.includes("left"),n=t.includes("bottom")||t.includes("top"),i=t.includes("left"),r=t.includes("top");return{isHorizontal:e,isVertical:n,affectsX:i,affectsY:r}}function gs(t,e){return Math.max(0,e-t)}function ms(t,e){return Math.max(0,t-e)}function uh(t,e,n){return Math.max(0,e-t,t-n)}function OQ(t,e){return t?!e:e}function yX(t,e,n,i,r,l,a,c){let{affectsX:f,affectsY:h}=e;const{isHorizontal:O,isVertical:p}=e,m=O&&p,{xSnapped:y,ySnapped:b}=n,{minWidth:v,maxWidth:k,minHeight:Q,maxHeight:P}=i,{x:T,y:$,width:_,height:A,aspectRatio:E}=t;let N=Math.floor(O?y-t.pointerX:0),G=Math.floor(p?b-t.pointerY:0);const ne=_+(f?-N:N),V=A+(h?-G:G),Y=-l[0]*_,H=-l[1]*A;let X=uh(ne,v,k),W=uh(V,Q,P);if(a){let B=0,M=0;f&&N<0?B=gs(T+N+Y,a[0][0]):!f&&N>0&&(B=ms(T+ne+Y,a[1][0])),h&&G<0?M=gs($+G+H,a[0][1]):!h&&G>0&&(M=ms($+V+H,a[1][1])),X=Math.max(X,B),W=Math.max(W,M)}if(c){let B=0,M=0;f&&N>0?B=ms(T+N,c[0][0]):!f&&N<0&&(B=gs(T+ne,c[1][0])),h&&G>0?M=ms($+G,c[0][1]):!h&&G<0&&(M=gs($+V,c[1][1])),X=Math.max(X,B),W=Math.max(W,M)}if(r){if(O){const B=uh(ne/E,Q,P)*E;if(X=Math.max(X,B),a){let M=0;!f&&!h||f&&!h&&m?M=ms($+H+ne/E,a[1][1])*E:M=gs($+H+(f?N:-N)/E,a[0][1])*E,X=Math.max(X,M)}if(c){let M=0;!f&&!h||f&&!h&&m?M=gs($+ne/E,c[1][1])*E:M=ms($+(f?N:-N)/E,c[0][1])*E,X=Math.max(X,M)}}if(p){const B=uh(V*E,v,k)/E;if(W=Math.max(W,B),a){let M=0;!f&&!h||h&&!f&&m?M=ms(T+V*E+Y,a[1][0])/E:M=gs(T+(h?G:-G)*E+Y,a[0][0])/E,W=Math.max(W,M)}if(c){let M=0;!f&&!h||h&&!f&&m?M=gs(T+V*E,c[1][0])/E:M=ms(T+(h?G:-G)*E,c[0][0])/E,W=Math.max(W,M)}}}G=G+(G<0?W:-W),N=N+(N<0?X:-X),r&&(m?ne>V*E?G=(OQ(f,h)?-N:N)/E:N=(OQ(f,h)?-G:G)*E:O?(G=N/E,h=f):(N=G*E,f=h));const R=f?T+N:T,q=h?$+G:$;return{width:_+(f?-N:N),height:A+(h?-G:G),x:l[0]*N*(f?-1:1)+R,y:l[1]*G*(h?-1:1)+q}}const E$={width:0,height:0,x:0,y:0},xX={...E$,pointerX:0,pointerY:0,aspectRatio:1};function SX(t){return[[0,0],[t.measured.width,t.measured.height]]}function bX(t,e,n){const i=e.position.x+t.position.x,r=e.position.y+t.position.y,l=t.measured.width??0,a=t.measured.height??0,c=n[0]*l,f=n[1]*a;return[[i-c,r-f],[i+l-c,r+a-f]]}function vX({domNode:t,nodeId:e,getStoreItems:n,onChange:i,onEnd:r}){const l=Hn(t);let a={controlDirection:dQ("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:h,boundaries:O,keepAspectRatio:p,resizeDirection:m,onResizeStart:y,onResize:b,onResizeEnd:v,shouldResize:k}){let Q={...E$},P={...xX};a={boundaries:O,resizeDirection:m,keepAspectRatio:p,controlDirection:dQ(h)};let T,$=null,_=[],A,E,N,G=!1;const ne=NT().on("start",V=>{const{nodeLookup:Y,transform:H,snapGrid:X,snapToGrid:W,nodeOrigin:R,paneDomNode:q}=n();if(T=Y.get(e),!T)return;$=(q==null?void 0:q.getBoundingClientRect())??null;const{xSnapped:B,ySnapped:M}=jc(V.sourceEvent,{transform:H,snapGrid:X,snapToGrid:W,containerBounds:$});Q={width:T.measured.width??0,height:T.measured.height??0,x:T.position.x??0,y:T.position.y??0},P={...Q,pointerX:B,pointerY:M,aspectRatio:Q.width/Q.height},A=void 0,T.parentId&&(T.extent==="parent"||T.expandParent)&&(A=Y.get(T.parentId),E=A&&T.extent==="parent"?SX(A):void 0),_=[],N=void 0;for(const[F,z]of Y)if(z.parentId===e&&(_.push({id:F,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const Z=bX(z,T,z.origin??R);N?N=[[Math.min(Z[0][0],N[0][0]),Math.min(Z[0][1],N[0][1])],[Math.max(Z[1][0],N[1][0]),Math.max(Z[1][1],N[1][1])]]:N=Z}y==null||y(V,{...Q})}).on("drag",V=>{const{transform:Y,snapGrid:H,snapToGrid:X,nodeOrigin:W}=n(),R=jc(V.sourceEvent,{transform:Y,snapGrid:H,snapToGrid:X,containerBounds:$}),q=[];if(!T)return;const{x:B,y:M,width:F,height:z}=Q,Z={},te=T.origin??W,{width:re,height:ue,x:he,y:Oe}=yX(P,a.controlDirection,R,a.boundaries,a.keepAspectRatio,te,E,N),fe=re!==F,ge=ue!==z,ze=he!==B&&fe,Re=Oe!==M&≥if(!ze&&!Re&&!fe&&!ge)return;if((ze||Re||te[0]===1||te[1]===1)&&(Z.x=ze?he:Q.x,Z.y=Re?Oe:Q.y,Q.x=Z.x,Q.y=Z.y,_.length>0)){const tt=he-B,se=Oe-M;for(const qe of _)qe.position={x:qe.position.x-tt+te[0]*(re-F),y:qe.position.y-se+te[1]*(ue-z)},q.push(qe)}if((fe||ge)&&(Z.width=fe&&(!a.resizeDirection||a.resizeDirection==="horizontal")?re:Q.width,Z.height=ge&&(!a.resizeDirection||a.resizeDirection==="vertical")?ue:Q.height,Q.width=Z.width,Q.height=Z.height),A&&T.expandParent){const tt=te[0]*(Z.width??0);Z.x&&Z.x<tt&&(Q.x=tt,P.x=P.x-(Z.x-tt));const se=te[1]*(Z.height??0);Z.y&&Z.y<se&&(Q.y=se,P.y=P.y-(Z.y-se))}const ke=mX({width:Q.width,prevWidth:F,height:Q.height,prevHeight:z,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),Te={...Q,direction:ke};(k==null?void 0:k(V,Te))!==!1&&(G=!0,b==null||b(V,Te),i(Z,q))}).on("end",V=>{G&&(v==null||v(V,{...Q}),r==null||r({...Q}),G=!1)});l.call(ne)}function f(){l.on(".drag",null)}return{update:c,destroy:f}}var nm={exports:{}},im={},rm={exports:{}},sm={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var pQ;function QX(){if(pQ)return sm;pQ=1;var t=mu();function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:e,i=t.useState,r=t.useEffect,l=t.useLayoutEffect,a=t.useDebugValue;function c(p,m){var y=m(),b=i({inst:{value:y,getSnapshot:m}}),v=b[0].inst,k=b[1];return l(function(){v.value=y,v.getSnapshot=m,f(v)&&k({inst:v})},[p,y,m]),r(function(){return f(v)&&k({inst:v}),p(function(){f(v)&&k({inst:v})})},[p]),a(y),y}function f(p){var m=p.getSnapshot;p=p.value;try{var y=m();return!n(p,y)}catch{return!0}}function h(p,m){return m()}var O=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return sm.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:O,sm}var gQ;function wX(){return gQ||(gQ=1,rm.exports=QX()),rm.exports}/**
|
|
58
|
+
* @license React
|
|
59
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/var mQ;function kX(){if(mQ)return im;mQ=1;var t=mu(),e=wX();function n(h,O){return h===O&&(h!==0||1/h===1/O)||h!==h&&O!==O}var i=typeof Object.is=="function"?Object.is:n,r=e.useSyncExternalStore,l=t.useRef,a=t.useEffect,c=t.useMemo,f=t.useDebugValue;return im.useSyncExternalStoreWithSelector=function(h,O,p,m,y){var b=l(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=c(function(){function Q(A){if(!P){if(P=!0,T=A,A=m(A),y!==void 0&&v.hasValue){var E=v.value;if(y(E,A))return $=E}return $=A}if(E=$,i(T,A))return E;var N=m(A);return y!==void 0&&y(E,N)?(T=A,E):(T=A,$=N)}var P=!1,T,$,_=p===void 0?null:p;return[function(){return Q(O())},_===null?void 0:function(){return Q(_())}]},[O,p,m,y]);var k=r(h,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=k},[k]),f(k),k},im}var yQ;function TX(){return yQ||(yQ=1,nm.exports=kX()),nm.exports}var $X=TX();const PX=$T($X),CX={},xQ=t=>{let e;const n=new Set,i=(O,p)=>{const m=typeof O=="function"?O(e):O;if(!Object.is(m,e)){const y=e;e=p??(typeof m!="object"||m===null)?m:Object.assign({},e,m),n.forEach(b=>b(e,y))}},r=()=>e,f={setState:i,getState:r,getInitialState:()=>h,subscribe:O=>(n.add(O),()=>n.delete(O)),destroy:()=>{(CX?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},h=e=t(i,r,f);return f},AX=t=>t?xQ(t):xQ,{useDebugValue:RX}=Pc,{useSyncExternalStoreWithSelector:zX}=PX,EX=t=>t;function _$(t,e=EX,n){const i=zX(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return RX(i),i}const SQ=(t,e)=>{const n=AX(t),i=(r,l=e)=>_$(n,r,l);return Object.assign(i,n),i},_X=(t,e)=>t?SQ(t,e):SQ;function vt(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[i,r]of t)if(!Object.is(r,e.get(i)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0}const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(e,i)||!Object.is(t[i],e[i]))return!1;return!0}PT();const lO=D.createContext(null),jX=lO.Provider,j$=Ki.error001();function Fe(t,e){const n=D.useContext(lO);if(n===null)throw new Error(j$);return _$(n,t,e)}function Qt(){const t=D.useContext(lO);if(t===null)throw new Error(j$);return D.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const bQ={display:"none"},MX={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},M$="react-flow__node-desc",X$="react-flow__edge-desc",XX="react-flow__aria-live",ZX=t=>t.ariaLiveMessage,qX=t=>t.ariaLabelConfig;function DX({rfId:t}){const e=Fe(ZX);return S.jsx("div",{id:`${XX}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:MX,children:e})}function LX({rfId:t,disableKeyboardA11y:e}){const n=Fe(qX);return S.jsxs(S.Fragment,{children:[S.jsx("div",{id:`${M$}-${t}`,style:bQ,children:e?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),S.jsx("div",{id:`${X$}-${t}`,style:bQ,children:n["edge.a11yDescription.default"]}),!e&&S.jsx(DX,{rfId:t})]})}const aO=D.forwardRef(({position:t="top-left",children:e,className:n,style:i,...r},l)=>{const a=`${t}`.split("-");return S.jsx("div",{className:qt(["react-flow__panel",n,...a]),style:i,ref:l,...r,children:e})});aO.displayName="Panel";function BX({proOptions:t,position:e="bottom-right"}){return t!=null&&t.hideAttribution?null:S.jsx(aO,{position:e,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:S.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const NX=t=>{const e=[],n=[];for(const[,i]of t.nodeLookup)i.selected&&e.push(i.internals.userNode);for(const[,i]of t.edgeLookup)i.selected&&n.push(i);return{selectedNodes:e,selectedEdges:n}},fh=t=>t.id;function VX(t,e){return vt(t.selectedNodes.map(fh),e.selectedNodes.map(fh))&&vt(t.selectedEdges.map(fh),e.selectedEdges.map(fh))}function YX({onSelectionChange:t}){const e=Qt(),{selectedNodes:n,selectedEdges:i}=Fe(NX,VX);return D.useEffect(()=>{const r={nodes:n,edges:i};t==null||t(r),e.getState().onSelectionChangeHandlers.forEach(l=>l(r))},[n,i,t]),null}const WX=t=>!!t.onSelectionChangeHandlers;function UX({onSelectionChange:t}){const e=Fe(WX);return t||e?S.jsx(YX,{onSelectionChange:t}):null}const p0=typeof window<"u"?D.useLayoutEffect:D.useEffect,Z$=[0,0],GX={x:0,y:0,zoom:1},HX=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],vQ=[...HX,"rfId"],IX=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),QQ={translateExtent:Gc,nodeOrigin:Z$,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function FX(t){const{setNodes:e,setEdges:n,setMinZoom:i,setMaxZoom:r,setTranslateExtent:l,setNodeExtent:a,reset:c,setDefaultNodesAndEdges:f}=Fe(IX,vt),h=Qt();p0(()=>(f(t.defaultNodes,t.defaultEdges),()=>{O.current=QQ,c()}),[]);const O=D.useRef(QQ);return p0(()=>{for(const p of vQ){const m=t[p],y=O.current[p];m!==y&&(typeof t[p]>"u"||(p==="nodes"?e(m):p==="edges"?n(m):p==="minZoom"?i(m):p==="maxZoom"?r(m):p==="translateExtent"?l(m):p==="nodeExtent"?a(m):p==="ariaLabelConfig"?h.setState({ariaLabelConfig:_M(m)}):p==="fitView"?h.setState({fitViewQueued:m}):p==="fitViewOptions"?h.setState({fitViewOptions:m}):h.setState({[p]:m})))}O.current=t},vQ.map(p=>t[p])),null}function wQ(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function KX(t){var i;const[e,n]=D.useState(t==="system"?null:t);return D.useEffect(()=>{if(t!=="system"){n(t);return}const r=wQ(),l=()=>n(r!=null&&r.matches?"dark":"light");return l(),r==null||r.addEventListener("change",l),()=>{r==null||r.removeEventListener("change",l)}},[t]),e!==null?e:(i=wQ())!=null&&i.matches?"dark":"light"}const kQ=typeof document<"u"?document:null;function Kc(t=null,e={target:kQ,actInsideInputWithModifier:!0}){const[n,i]=D.useState(!1),r=D.useRef(!1),l=D.useRef(new Set([])),[a,c]=D.useMemo(()=>{if(t!==null){const h=(Array.isArray(t)?t:[t]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
66
|
+
`).replace(`
|
|
67
|
+
|
|
68
|
+
`,`
|
|
69
|
+
+`).split(`
|
|
70
|
+
`)),O=h.reduce((p,m)=>p.concat(...m),[]);return[h,O]}return[[],[]]},[t]);return D.useEffect(()=>{const f=(e==null?void 0:e.target)??kQ,h=(e==null?void 0:e.actInsideInputWithModifier)??!0;if(t!==null){const O=y=>{var k,Q;if(r.current=y.ctrlKey||y.metaKey||y.shiftKey||y.altKey,(!r.current||r.current&&!h)&&m$(y))return!1;const v=$Q(y.code,c);if(l.current.add(y[v]),TQ(a,l.current,!1)){const P=((Q=(k=y.composedPath)==null?void 0:k.call(y))==null?void 0:Q[0])||y.target,T=(P==null?void 0:P.nodeName)==="BUTTON"||(P==null?void 0:P.nodeName)==="A";e.preventDefault!==!1&&(r.current||!T)&&y.preventDefault(),i(!0)}},p=y=>{const b=$Q(y.code,c);TQ(a,l.current,!0)?(i(!1),l.current.clear()):l.current.delete(y[b]),y.key==="Meta"&&l.current.clear(),r.current=!1},m=()=>{l.current.clear(),i(!1)};return f==null||f.addEventListener("keydown",O),f==null||f.addEventListener("keyup",p),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{f==null||f.removeEventListener("keydown",O),f==null||f.removeEventListener("keyup",p),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[t,i]),n}function TQ(t,e,n){return t.filter(i=>n||i.length===e.size).some(i=>i.every(r=>e.has(r)))}function $Q(t,e){return e.includes(t)?"code":"key"}const JX=()=>{const t=Qt();return D.useMemo(()=>({zoomIn:e=>{const{panZoom:n}=t.getState();return n?n.scaleBy(1.2,e):Promise.resolve(!1)},zoomOut:e=>{const{panZoom:n}=t.getState();return n?n.scaleBy(1/1.2,e):Promise.resolve(!1)},zoomTo:(e,n)=>{const{panZoom:i}=t.getState();return i?i.scaleTo(e,n):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(e,n)=>{const{transform:[i,r,l],panZoom:a}=t.getState();return a?(await a.setViewport({x:e.x??i,y:e.y??r,zoom:e.zoom??l},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[e,n,i]=t.getState().transform;return{x:e,y:n,zoom:i}},setCenter:async(e,n,i)=>t.getState().setCenter(e,n,i),fitBounds:async(e,n)=>{const{width:i,height:r,minZoom:l,maxZoom:a,panZoom:c}=t.getState(),f=Py(e,i,r,l,a,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(f,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(e,n={})=>{const{transform:i,snapGrid:r,snapToGrid:l,domNode:a}=t.getState();if(!a)return e;const{x:c,y:f}=a.getBoundingClientRect(),h={x:e.x-c,y:e.y-f},O=n.snapGrid??r,p=n.snapToGrid??l;return Qu(h,i,p,O)},flowToScreenPosition:e=>{const{transform:n,domNode:i}=t.getState();if(!i)return e;const{x:r,y:l}=i.getBoundingClientRect(),a=gd(e,n);return{x:a.x+r,y:a.y+l}}}),[])};function q$(t,e){const n=[],i=new Map,r=[];for(const l of t)if(l.type==="add"){r.push(l);continue}else if(l.type==="remove"||l.type==="replace")i.set(l.id,[l]);else{const a=i.get(l.id);a?a.push(l):i.set(l.id,[l])}for(const l of e){const a=i.get(l.id);if(!a){n.push(l);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const c={...l};for(const f of a)eZ(f,c);n.push(c)}return r.length&&r.forEach(l=>{l.index!==void 0?n.splice(l.index,0,{...l.item}):n.push({...l.item})}),n}function eZ(t,e){switch(t.type){case"select":{e.selected=t.selected;break}case"position":{typeof t.position<"u"&&(e.position=t.position),typeof t.dragging<"u"&&(e.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(e.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(e.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(e.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(e.resizing=t.resizing);break}}}function tZ(t,e){return q$(t,e)}function nZ(t,e){return q$(t,e)}function Ol(t,e){return{id:t,type:"select",selected:e}}function ja(t,e=new Set,n=!1){const i=[];for(const[r,l]of t){const a=e.has(r);!(l.selected===void 0&&!a)&&l.selected!==a&&(n&&(l.selected=a),i.push(Ol(l.id,a)))}return i}function PQ({items:t=[],lookup:e}){var r;const n=[],i=new Map(t.map(l=>[l.id,l]));for(const[l,a]of t.entries()){const c=e.get(a.id),f=((r=c==null?void 0:c.internals)==null?void 0:r.userNode)??c;f!==void 0&&f!==a&&n.push({id:a.id,item:a,type:"replace"}),f===void 0&&n.push({item:a,type:"add",index:l})}for(const[l]of e)i.get(l)===void 0&&n.push({id:l,type:"remove"});return n}function CQ(t){return{id:t.id,type:"remove"}}const AQ=t=>wM(t),iZ=t=>c$(t);function D$(t){return D.forwardRef(t)}function RQ(t){const[e,n]=D.useState(BigInt(0)),[i]=D.useState(()=>rZ(()=>n(r=>r+BigInt(1))));return p0(()=>{const r=i.get();r.length&&(t(r),i.reset())},[e]),i}function rZ(t){let e=[];return{get:()=>e,reset:()=>{e=[]},push:n=>{e.push(n),t()}}}const L$=D.createContext(null);function sZ({children:t}){const e=Qt(),n=D.useCallback(c=>{const{nodes:f=[],setNodes:h,hasDefaultNodes:O,onNodesChange:p,nodeLookup:m,fitViewQueued:y,onNodesChangeMiddlewareMap:b}=e.getState();let v=f;for(const Q of c)v=typeof Q=="function"?Q(v):Q;let k=PQ({items:v,lookup:m});for(const Q of b.values())k=Q(k);O&&h(v),k.length>0?p==null||p(k):y&&window.requestAnimationFrame(()=>{const{fitViewQueued:Q,nodes:P,setNodes:T}=e.getState();Q&&T(P)})},[]),i=RQ(n),r=D.useCallback(c=>{const{edges:f=[],setEdges:h,hasDefaultEdges:O,onEdgesChange:p,edgeLookup:m}=e.getState();let y=f;for(const b of c)y=typeof b=="function"?b(y):b;O?h(y):p&&p(PQ({items:y,lookup:m}))},[]),l=RQ(r),a=D.useMemo(()=>({nodeQueue:i,edgeQueue:l}),[]);return S.jsx(L$.Provider,{value:a,children:t})}function lZ(){const t=D.useContext(L$);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const aZ=t=>!!t.panZoom;function oO(){const t=JX(),e=Qt(),n=lZ(),i=Fe(aZ),r=D.useMemo(()=>{const l=p=>e.getState().nodeLookup.get(p),a=p=>{n.nodeQueue.push(p)},c=p=>{n.edgeQueue.push(p)},f=p=>{var Q,P;const{nodeLookup:m,nodeOrigin:y}=e.getState(),b=AQ(p)?p:m.get(p.id),v=b.parentId?p$(b.position,b.measured,b.parentId,m,y):b.position,k={...b,position:v,width:((Q=b.measured)==null?void 0:Q.width)??b.width,height:((P=b.measured)==null?void 0:P.height)??b.height};return to(k)},h=(p,m,y={replace:!1})=>{a(b=>b.map(v=>{if(v.id===p){const k=typeof m=="function"?m(v):m;return y.replace&&AQ(k)?k:{...v,...k}}return v}))},O=(p,m,y={replace:!1})=>{c(b=>b.map(v=>{if(v.id===p){const k=typeof m=="function"?m(v):m;return y.replace&&iZ(k)?k:{...v,...k}}return v}))};return{getNodes:()=>e.getState().nodes.map(p=>({...p})),getNode:p=>{var m;return(m=l(p))==null?void 0:m.internals.userNode},getInternalNode:l,getEdges:()=>{const{edges:p=[]}=e.getState();return p.map(m=>({...m}))},getEdge:p=>e.getState().edgeLookup.get(p),setNodes:a,setEdges:c,addNodes:p=>{const m=Array.isArray(p)?p:[p];n.nodeQueue.push(y=>[...y,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];n.edgeQueue.push(y=>[...y,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:y}=e.getState(),[b,v,k]=y;return{nodes:p.map(Q=>({...Q})),edges:m.map(Q=>({...Q})),viewport:{x:b,y:v,zoom:k}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:y,edges:b,onNodesDelete:v,onEdgesDelete:k,triggerNodeChanges:Q,triggerEdgeChanges:P,onDelete:T,onBeforeDelete:$}=e.getState(),{nodes:_,edges:A}=await CM({nodesToRemove:p,edgesToRemove:m,nodes:y,edges:b,onBeforeDelete:$}),E=A.length>0,N=_.length>0;if(E){const G=A.map(CQ);k==null||k(A),P(G)}if(N){const G=_.map(CQ);v==null||v(_),Q(G)}return(N||E)&&(T==null||T({nodes:_,edges:A})),{deletedNodes:_,deletedEdges:A}},getIntersectingNodes:(p,m=!0,y)=>{const b=nQ(p),v=b?p:f(p),k=y!==void 0;return v?(y||e.getState().nodes).filter(Q=>{const P=e.getState().nodeLookup.get(Q.id);if(P&&!b&&(Q.id===p.id||!P.internals.positionAbsolute))return!1;const T=to(k?Q:P),$=Ic(T,v);return m&&$>0||$>=T.width*T.height||$>=v.width*v.height}):[]},isNodeIntersecting:(p,m,y=!0)=>{const v=nQ(p)?p:f(p);if(!v)return!1;const k=Ic(v,m);return y&&k>0||k>=m.width*m.height||k>=v.width*v.height},updateNode:h,updateNodeData:(p,m,y={replace:!1})=>{h(p,b=>{const v=typeof m=="function"?m(b):m;return y.replace?{...b,data:v}:{...b,data:{...b.data,...v}}},y)},updateEdge:O,updateEdgeData:(p,m,y={replace:!1})=>{O(p,b=>{const v=typeof m=="function"?m(b):m;return y.replace?{...b,data:v}:{...b,data:{...b.data,...v}}},y)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:y}=e.getState();return kM(p,{nodeLookup:m,nodeOrigin:y})},getHandleConnections:({type:p,id:m,nodeId:y})=>{var b;return Array.from(((b=e.getState().connectionLookup.get(`${y}-${p}${m?`-${m}`:""}`))==null?void 0:b.values())??[])},getNodeConnections:({type:p,handleId:m,nodeId:y})=>{var b;return Array.from(((b=e.getState().connectionLookup.get(`${y}${p?m?`-${p}-${m}`:`-${p}`:""}`))==null?void 0:b.values())??[])},fitView:async p=>{const m=e.getState().fitViewResolver??EM();return e.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),n.nodeQueue.push(y=>[...y]),m.promise}}},[]);return D.useMemo(()=>({...r,...t,viewportInitialized:i}),[i])}const zQ=t=>t.selected,oZ=typeof window<"u"?window:void 0;function cZ({deleteKeyCode:t,multiSelectionKeyCode:e}){const n=Qt(),{deleteElements:i}=oO(),r=Kc(t,{actInsideInputWithModifier:!1}),l=Kc(e,{target:oZ});D.useEffect(()=>{if(r){const{edges:a,nodes:c}=n.getState();i({nodes:c.filter(zQ),edges:a.filter(zQ)}),n.setState({nodesSelectionActive:!1})}},[r]),D.useEffect(()=>{n.setState({multiSelectionActive:l})},[l])}function uZ(t){const e=Qt();D.useEffect(()=>{const n=()=>{var r,l,a,c;if(!t.current||!(((l=(r=t.current).checkVisibility)==null?void 0:l.call(r))??!0))return!1;const i=Cy(t.current);(i.height===0||i.width===0)&&((c=(a=e.getState()).onError)==null||c.call(a,"004",Ki.error004())),e.setState({width:i.width||500,height:i.height||500})};if(t.current){n(),window.addEventListener("resize",n);const i=new ResizeObserver(()=>n());return i.observe(t.current),()=>{window.removeEventListener("resize",n),i&&t.current&&i.unobserve(t.current)}}},[])}const cO={position:"absolute",width:"100%",height:"100%",top:0,left:0},fZ=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function hZ({onPaneContextMenu:t,zoomOnScroll:e=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:r=.5,panOnScrollMode:l=kl.Free,zoomOnDoubleClick:a=!0,panOnDrag:c=!0,defaultViewport:f,translateExtent:h,minZoom:O,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:y=!0,children:b,noWheelClassName:v,noPanClassName:k,onViewportChange:Q,isControlledViewport:P,paneClickDistance:T,selectionOnDrag:$}){const _=Qt(),A=D.useRef(null),{userSelectionActive:E,lib:N,connectionInProgress:G}=Fe(fZ,vt),ne=Kc(m),V=D.useRef();uZ(A);const Y=D.useCallback(H=>{Q==null||Q({x:H[0],y:H[1],zoom:H[2]}),P||_.setState({transform:H})},[Q,P]);return D.useEffect(()=>{if(A.current){V.current=gX({domNode:A.current,minZoom:O,maxZoom:p,translateExtent:h,viewport:f,onDraggingChange:R=>_.setState(q=>q.paneDragging===R?q:{paneDragging:R}),onPanZoomStart:(R,q)=>{const{onViewportChangeStart:B,onMoveStart:M}=_.getState();M==null||M(R,q),B==null||B(q)},onPanZoom:(R,q)=>{const{onViewportChange:B,onMove:M}=_.getState();M==null||M(R,q),B==null||B(q)},onPanZoomEnd:(R,q)=>{const{onViewportChangeEnd:B,onMoveEnd:M}=_.getState();M==null||M(R,q),B==null||B(q)}});const{x:H,y:X,zoom:W}=V.current.getViewport();return _.setState({panZoom:V.current,transform:[H,X,W],domNode:A.current.closest(".react-flow")}),()=>{var R;(R=V.current)==null||R.destroy()}}},[]),D.useEffect(()=>{var H;(H=V.current)==null||H.update({onPaneContextMenu:t,zoomOnScroll:e,zoomOnPinch:n,panOnScroll:i,panOnScrollSpeed:r,panOnScrollMode:l,zoomOnDoubleClick:a,panOnDrag:c,zoomActivationKeyPressed:ne,preventScrolling:y,noPanClassName:k,userSelectionActive:E,noWheelClassName:v,lib:N,onTransformChange:Y,connectionInProgress:G,selectionOnDrag:$,paneClickDistance:T})},[t,e,n,i,r,l,a,c,ne,y,k,E,v,N,Y,G,$,T]),S.jsx("div",{className:"react-flow__renderer",ref:A,style:cO,children:b})}const dZ=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function OZ(){const{userSelectionActive:t,userSelectionRect:e}=Fe(dZ,vt);return t&&e?S.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:e.width,height:e.height,transform:`translate(${e.x}px, ${e.y}px)`}}):null}const lm=(t,e)=>n=>{n.target===e.current&&(t==null||t(n))},pZ=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function gZ({isSelecting:t,selectionKeyPressed:e,selectionMode:n=Hc.Full,panOnDrag:i,paneClickDistance:r,selectionOnDrag:l,onSelectionStart:a,onSelectionEnd:c,onPaneClick:f,onPaneContextMenu:h,onPaneScroll:O,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:y,children:b}){const v=Qt(),{userSelectionActive:k,elementsSelectable:Q,dragging:P,connectionInProgress:T}=Fe(pZ,vt),$=Q&&(t||k),_=D.useRef(null),A=D.useRef(),E=D.useRef(new Set),N=D.useRef(new Set),G=D.useRef(!1),ne=B=>{if(G.current||T){G.current=!1;return}f==null||f(B),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},V=B=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){B.preventDefault();return}h==null||h(B)},Y=O?B=>O(B):void 0,H=B=>{G.current&&(B.stopPropagation(),G.current=!1)},X=B=>{var ue,he;const{domNode:M}=v.getState();if(A.current=M==null?void 0:M.getBoundingClientRect(),!A.current)return;const F=B.target===_.current;if(!F&&!!B.target.closest(".nokey")||!t||!(l&&F||e)||B.button!==0||!B.isPrimary)return;(he=(ue=B.target)==null?void 0:ue.setPointerCapture)==null||he.call(ue,B.pointerId),G.current=!1;const{x:te,y:re}=ki(B.nativeEvent,A.current);v.setState({userSelectionRect:{width:0,height:0,startX:te,startY:re,x:te,y:re}}),F||(B.stopPropagation(),B.preventDefault())},W=B=>{const{userSelectionRect:M,transform:F,nodeLookup:z,edgeLookup:Z,connectionLookup:te,triggerNodeChanges:re,triggerEdgeChanges:ue,defaultEdgeOptions:he,resetSelectedElements:Oe}=v.getState();if(!A.current||!M)return;const{x:fe,y:ge}=ki(B.nativeEvent,A.current),{startX:ze,startY:Re}=M;if(!G.current){const se=e?0:r;if(Math.hypot(fe-ze,ge-Re)<=se)return;Oe(),a==null||a(B)}G.current=!0;const ke={startX:ze,startY:Re,x:fe<ze?fe:ze,y:ge<Re?ge:Re,width:Math.abs(fe-ze),height:Math.abs(ge-Re)},Te=E.current,Ze=N.current;E.current=new Set($y(z,ke,F,n===Hc.Partial,!0).map(se=>se.id)),N.current=new Set;const tt=(he==null?void 0:he.selectable)??!0;for(const se of E.current){const qe=te.get(se);if(qe)for(const{edgeId:at}of qe.values()){const Yt=Z.get(at);Yt&&(Yt.selectable??tt)&&N.current.add(at)}}if(!iQ(Te,E.current)){const se=ja(z,E.current,!0);re(se)}if(!iQ(Ze,N.current)){const se=ja(Z,N.current);ue(se)}v.setState({userSelectionRect:ke,userSelectionActive:!0,nodesSelectionActive:!1})},R=B=>{var M,F;B.button===0&&((F=(M=B.target)==null?void 0:M.releasePointerCapture)==null||F.call(M,B.pointerId),!k&&B.target===_.current&&v.getState().userSelectionRect&&(ne==null||ne(B)),v.setState({userSelectionActive:!1,userSelectionRect:null}),G.current&&(c==null||c(B),v.setState({nodesSelectionActive:E.current.size>0})))},q=i===!0||Array.isArray(i)&&i.includes(0);return S.jsxs("div",{className:qt(["react-flow__pane",{draggable:q,dragging:P,selection:t}]),onClick:$?void 0:lm(ne,_),onContextMenu:lm(V,_),onWheel:lm(Y,_),onPointerEnter:$?void 0:p,onPointerMove:$?W:m,onPointerUp:$?R:void 0,onPointerDownCapture:$?X:void 0,onClickCapture:$?H:void 0,onPointerLeave:y,ref:_,style:cO,children:[b,S.jsx(OZ,{})]})}function g0({id:t,store:e,unselect:n=!1,nodeRef:i}){const{addSelectedNodes:r,unselectNodesAndEdges:l,multiSelectionActive:a,nodeLookup:c,onError:f}=e.getState(),h=c.get(t);if(!h){f==null||f("012",Ki.error012(t));return}e.setState({nodesSelectionActive:!1}),h.selected?(n||h.selected&&a)&&(l({nodes:[h],edges:[]}),requestAnimationFrame(()=>{var O;return(O=i==null?void 0:i.current)==null?void 0:O.blur()})):r([t])}function B$({nodeRef:t,disabled:e=!1,noDragClassName:n,handleSelector:i,nodeId:r,isSelectable:l,nodeClickDistance:a}){const c=Qt(),[f,h]=D.useState(!1),O=D.useRef();return D.useEffect(()=>{O.current=nX({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{g0({id:p,store:c,nodeRef:t})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),D.useEffect(()=>{if(!(e||!t.current||!O.current))return O.current.update({noDragClassName:n,handleSelector:i,domNode:t.current,isSelectable:l,nodeId:r,nodeClickDistance:a}),()=>{var p;(p=O.current)==null||p.destroy()}},[n,i,e,l,t,r,a]),f}const mZ=t=>e=>e.selected&&(e.draggable||t&&typeof e.draggable>"u");function N$(){const t=Qt();return D.useCallback(n=>{const{nodeExtent:i,snapToGrid:r,snapGrid:l,nodesDraggable:a,onError:c,updateNodePositions:f,nodeLookup:h,nodeOrigin:O}=t.getState(),p=new Map,m=mZ(a),y=r?l[0]:5,b=r?l[1]:5,v=n.direction.x*y*n.factor,k=n.direction.y*b*n.factor;for(const[,Q]of h){if(!m(Q))continue;let P={x:Q.internals.positionAbsolute.x+v,y:Q.internals.positionAbsolute.y+k};r&&(P=vu(P,l));const{position:T,positionAbsolute:$}=u$({nodeId:Q.id,nextPosition:P,nodeLookup:h,nodeExtent:i,nodeOrigin:O,onError:c});Q.position=T,Q.internals.positionAbsolute=$,p.set(Q.id,Q)}f(p)},[])}const jy=D.createContext(null),yZ=jy.Provider;jy.Consumer;const V$=()=>D.useContext(jy),xZ=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),SZ=(t,e,n)=>i=>{const{connectionClickStartHandle:r,connectionMode:l,connection:a}=i,{fromHandle:c,toHandle:f,isValid:h}=a,O=(f==null?void 0:f.nodeId)===t&&(f==null?void 0:f.id)===e&&(f==null?void 0:f.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===t&&(c==null?void 0:c.id)===e&&(c==null?void 0:c.type)===n,connectingTo:O,clickConnecting:(r==null?void 0:r.nodeId)===t&&(r==null?void 0:r.id)===e&&(r==null?void 0:r.type)===n,isPossibleEndHandle:l===Ja.Strict?(c==null?void 0:c.type)!==n:t!==(c==null?void 0:c.nodeId)||e!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!r,valid:O&&h}};function bZ({type:t="source",position:e=we.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:r=!0,isConnectableEnd:l=!0,id:a,onConnect:c,children:f,className:h,onMouseDown:O,onTouchStart:p,...m},y){var W,R;const b=a||null,v=t==="target",k=Qt(),Q=V$(),{connectOnClick:P,noPanClassName:T,rfId:$}=Fe(xZ,vt),{connectingFrom:_,connectingTo:A,clickConnecting:E,isPossibleEndHandle:N,connectionInProcess:G,clickConnectionInProcess:ne,valid:V}=Fe(SZ(Q,b,t),vt);Q||(R=(W=k.getState()).onError)==null||R.call(W,"010",Ki.error010());const Y=q=>{const{defaultEdgeOptions:B,onConnect:M,hasDefaultEdges:F}=k.getState(),z={...B,...q};if(F){const{edges:Z,setEdges:te}=k.getState();te(DM(z,Z))}M==null||M(z),c==null||c(z)},H=q=>{if(!Q)return;const B=y$(q.nativeEvent);if(r&&(B&&q.button===0||!B)){const M=k.getState();O0.onPointerDown(q.nativeEvent,{handleDomNode:q.currentTarget,autoPanOnConnect:M.autoPanOnConnect,connectionMode:M.connectionMode,connectionRadius:M.connectionRadius,domNode:M.domNode,nodeLookup:M.nodeLookup,lib:M.lib,isTarget:v,handleId:b,nodeId:Q,flowId:M.rfId,panBy:M.panBy,cancelConnection:M.cancelConnection,onConnectStart:M.onConnectStart,onConnectEnd:(...F)=>{var z,Z;return(Z=(z=k.getState()).onConnectEnd)==null?void 0:Z.call(z,...F)},updateConnection:M.updateConnection,onConnect:Y,isValidConnection:n||((...F)=>{var z,Z;return((Z=(z=k.getState()).isValidConnection)==null?void 0:Z.call(z,...F))??!0}),getTransform:()=>k.getState().transform,getFromHandle:()=>k.getState().connection.fromHandle,autoPanSpeed:M.autoPanSpeed,dragThreshold:M.connectionDragThreshold})}B?O==null||O(q):p==null||p(q)},X=q=>{const{onClickConnectStart:B,onClickConnectEnd:M,connectionClickStartHandle:F,connectionMode:z,isValidConnection:Z,lib:te,rfId:re,nodeLookup:ue,connection:he}=k.getState();if(!Q||!F&&!r)return;if(!F){B==null||B(q.nativeEvent,{nodeId:Q,handleId:b,handleType:t}),k.setState({connectionClickStartHandle:{nodeId:Q,type:t,id:b}});return}const Oe=g$(q.target),fe=n||Z,{connection:ge,isValid:ze}=O0.isValid(q.nativeEvent,{handle:{nodeId:Q,id:b,type:t},connectionMode:z,fromNodeId:F.nodeId,fromHandleId:F.id||null,fromType:F.type,isValidConnection:fe,flowId:re,doc:Oe,lib:te,nodeLookup:ue});ze&&ge&&Y(ge);const Re=structuredClone(he);delete Re.inProgress,Re.toPosition=Re.toHandle?Re.toHandle.position:null,M==null||M(q,Re),k.setState({connectionClickStartHandle:null})};return S.jsx("div",{"data-handleid":b,"data-nodeid":Q,"data-handlepos":e,"data-id":`${$}-${Q}-${b}-${t}`,className:qt(["react-flow__handle",`react-flow__handle-${e}`,"nodrag",T,h,{source:!v,target:v,connectable:i,connectablestart:r,connectableend:l,clickconnecting:E,connectingfrom:_,connectingto:A,valid:V,connectionindicator:i&&(!G||N)&&(G||ne?l:r)}]),onMouseDown:H,onTouchStart:H,onClick:P?X:void 0,ref:y,...m,children:f})}const ro=D.memo(D$(bZ));function vZ({data:t,isConnectable:e,sourcePosition:n=we.Bottom}){return S.jsxs(S.Fragment,{children:[t==null?void 0:t.label,S.jsx(ro,{type:"source",position:n,isConnectable:e})]})}function QZ({data:t,isConnectable:e,targetPosition:n=we.Top,sourcePosition:i=we.Bottom}){return S.jsxs(S.Fragment,{children:[S.jsx(ro,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label,S.jsx(ro,{type:"source",position:i,isConnectable:e})]})}function wZ(){return null}function kZ({data:t,isConnectable:e,targetPosition:n=we.Top}){return S.jsxs(S.Fragment,{children:[S.jsx(ro,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label]})}const md={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},EQ={input:vZ,default:QZ,output:kZ,group:wZ};function TZ(t){var e,n,i,r;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((e=t.style)==null?void 0:e.width),height:t.height??t.initialHeight??((n=t.style)==null?void 0:n.height)}:{width:t.width??((i=t.style)==null?void 0:i.width),height:t.height??((r=t.style)==null?void 0:r.height)}}const $Z=t=>{const{width:e,height:n,x:i,y:r}=bu(t.nodeLookup,{filter:l=>!!l.selected});return{width:wi(e)?e:null,height:wi(n)?n:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${i}px,${r}px)`}};function PZ({onSelectionContextMenu:t,noPanClassName:e,disableKeyboardA11y:n}){const i=Qt(),{width:r,height:l,transformString:a,userSelectionActive:c}=Fe($Z,vt),f=N$(),h=D.useRef(null);D.useEffect(()=>{var y;n||(y=h.current)==null||y.focus({preventScroll:!0})},[n]);const O=!c&&r!==null&&l!==null;if(B$({nodeRef:h,disabled:!O}),!O)return null;const p=t?y=>{const b=i.getState().nodes.filter(v=>v.selected);t(y,b)}:void 0,m=y=>{Object.prototype.hasOwnProperty.call(md,y.key)&&(y.preventDefault(),f({direction:md[y.key],factor:y.shiftKey?4:1}))};return S.jsx("div",{className:qt(["react-flow__nodesselection","react-flow__container",e]),style:{transform:a},children:S.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:n?void 0:-1,onKeyDown:n?void 0:m,style:{width:r,height:l}})})}const _Q=typeof window<"u"?window:void 0,CZ=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function Y$({children:t,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:r,onPaneContextMenu:l,onPaneScroll:a,paneClickDistance:c,deleteKeyCode:f,selectionKeyCode:h,selectionOnDrag:O,selectionMode:p,onSelectionStart:m,onSelectionEnd:y,multiSelectionKeyCode:b,panActivationKeyCode:v,zoomActivationKeyCode:k,elementsSelectable:Q,zoomOnScroll:P,zoomOnPinch:T,panOnScroll:$,panOnScrollSpeed:_,panOnScrollMode:A,zoomOnDoubleClick:E,panOnDrag:N,defaultViewport:G,translateExtent:ne,minZoom:V,maxZoom:Y,preventScrolling:H,onSelectionContextMenu:X,noWheelClassName:W,noPanClassName:R,disableKeyboardA11y:q,onViewportChange:B,isControlledViewport:M}){const{nodesSelectionActive:F,userSelectionActive:z}=Fe(CZ,vt),Z=Kc(h,{target:_Q}),te=Kc(v,{target:_Q}),re=te||N,ue=te||$,he=O&&re!==!0,Oe=Z||z||he;return cZ({deleteKeyCode:f,multiSelectionKeyCode:b}),S.jsx(hZ,{onPaneContextMenu:l,elementsSelectable:Q,zoomOnScroll:P,zoomOnPinch:T,panOnScroll:ue,panOnScrollSpeed:_,panOnScrollMode:A,zoomOnDoubleClick:E,panOnDrag:!Z&&re,defaultViewport:G,translateExtent:ne,minZoom:V,maxZoom:Y,zoomActivationKeyCode:k,preventScrolling:H,noWheelClassName:W,noPanClassName:R,onViewportChange:B,isControlledViewport:M,paneClickDistance:c,selectionOnDrag:he,children:S.jsxs(gZ,{onSelectionStart:m,onSelectionEnd:y,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:r,onPaneContextMenu:l,onPaneScroll:a,panOnDrag:re,isSelecting:!!Oe,selectionMode:p,selectionKeyPressed:Z,paneClickDistance:c,selectionOnDrag:he,children:[t,F&&S.jsx(PZ,{onSelectionContextMenu:X,noPanClassName:R,disableKeyboardA11y:q})]})})}Y$.displayName="FlowRenderer";const AZ=D.memo(Y$),RZ=t=>e=>t?$y(e.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(n=>n.id):Array.from(e.nodeLookup.keys());function zZ(t){return Fe(D.useCallback(RZ(t),[t]),vt)}const EZ=t=>t.updateNodeInternals;function _Z(){const t=Fe(EZ),[e]=D.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const i=new Map;n.forEach(r=>{const l=r.target.getAttribute("data-id");i.set(l,{id:l,nodeElement:r.target,force:!0})}),t(i)}));return D.useEffect(()=>()=>{e==null||e.disconnect()},[e]),e}function jZ({node:t,nodeType:e,hasDimensions:n,resizeObserver:i}){const r=Qt(),l=D.useRef(null),a=D.useRef(null),c=D.useRef(t.sourcePosition),f=D.useRef(t.targetPosition),h=D.useRef(e),O=n&&!!t.internals.handleBounds;return D.useEffect(()=>{l.current&&!t.hidden&&(!O||a.current!==l.current)&&(a.current&&(i==null||i.unobserve(a.current)),i==null||i.observe(l.current),a.current=l.current)},[O,t.hidden]),D.useEffect(()=>()=>{a.current&&(i==null||i.unobserve(a.current),a.current=null)},[]),D.useEffect(()=>{if(l.current){const p=h.current!==e,m=c.current!==t.sourcePosition,y=f.current!==t.targetPosition;(p||m||y)&&(h.current=e,c.current=t.sourcePosition,f.current=t.targetPosition,r.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:l.current,force:!0}]])))}},[t.id,e,t.sourcePosition,t.targetPosition]),l}function MZ({id:t,onClick:e,onMouseEnter:n,onMouseMove:i,onMouseLeave:r,onContextMenu:l,onDoubleClick:a,nodesDraggable:c,elementsSelectable:f,nodesConnectable:h,nodesFocusable:O,resizeObserver:p,noDragClassName:m,noPanClassName:y,disableKeyboardA11y:b,rfId:v,nodeTypes:k,nodeClickDistance:Q,onError:P}){const{node:T,internals:$,isParent:_}=Fe(fe=>{const ge=fe.nodeLookup.get(t),ze=fe.parentLookup.has(t);return{node:ge,internals:ge.internals,isParent:ze}},vt);let A=T.type||"default",E=(k==null?void 0:k[A])||EQ[A];E===void 0&&(P==null||P("003",Ki.error003(A)),A="default",E=(k==null?void 0:k.default)||EQ.default);const N=!!(T.draggable||c&&typeof T.draggable>"u"),G=!!(T.selectable||f&&typeof T.selectable>"u"),ne=!!(T.connectable||h&&typeof T.connectable>"u"),V=!!(T.focusable||O&&typeof T.focusable>"u"),Y=Qt(),H=O$(T),X=jZ({node:T,nodeType:A,hasDimensions:H,resizeObserver:p}),W=B$({nodeRef:X,disabled:T.hidden||!N,noDragClassName:m,handleSelector:T.dragHandle,nodeId:t,isSelectable:G,nodeClickDistance:Q}),R=N$();if(T.hidden)return null;const q=Xr(T),B=TZ(T),M=G||N||e||n||i||r,F=n?fe=>n(fe,{...$.userNode}):void 0,z=i?fe=>i(fe,{...$.userNode}):void 0,Z=r?fe=>r(fe,{...$.userNode}):void 0,te=l?fe=>l(fe,{...$.userNode}):void 0,re=a?fe=>a(fe,{...$.userNode}):void 0,ue=fe=>{const{selectNodesOnDrag:ge,nodeDragThreshold:ze}=Y.getState();G&&(!ge||!N||ze>0)&&g0({id:t,store:Y,nodeRef:X}),e&&e(fe,{...$.userNode})},he=fe=>{if(!(m$(fe.nativeEvent)||b)){if(s$.includes(fe.key)&&G){const ge=fe.key==="Escape";g0({id:t,store:Y,unselect:ge,nodeRef:X})}else if(N&&T.selected&&Object.prototype.hasOwnProperty.call(md,fe.key)){fe.preventDefault();const{ariaLabelConfig:ge}=Y.getState();Y.setState({ariaLiveMessage:ge["node.a11yDescription.ariaLiveMessage"]({direction:fe.key.replace("Arrow","").toLowerCase(),x:~~$.positionAbsolute.x,y:~~$.positionAbsolute.y})}),R({direction:md[fe.key],factor:fe.shiftKey?4:1})}}},Oe=()=>{var Ze;if(b||!((Ze=X.current)!=null&&Ze.matches(":focus-visible")))return;const{transform:fe,width:ge,height:ze,autoPanOnNodeFocus:Re,setCenter:ke}=Y.getState();if(!Re)return;$y(new Map([[t,T]]),{x:0,y:0,width:ge,height:ze},fe,!0).length>0||ke(T.position.x+q.width/2,T.position.y+q.height/2,{zoom:fe[2]})};return S.jsx("div",{className:qt(["react-flow__node",`react-flow__node-${A}`,{[y]:N},T.className,{selected:T.selected,selectable:G,parent:_,draggable:N,dragging:W}]),ref:X,style:{zIndex:$.z,transform:`translate(${$.positionAbsolute.x}px,${$.positionAbsolute.y}px)`,pointerEvents:M?"all":"none",visibility:H?"visible":"hidden",...T.style,...B},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:F,onMouseMove:z,onMouseLeave:Z,onContextMenu:te,onClick:ue,onDoubleClick:re,onKeyDown:V?he:void 0,tabIndex:V?0:void 0,onFocus:V?Oe:void 0,role:T.ariaRole??(V?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${M$}-${v}`,"aria-label":T.ariaLabel,...T.domAttributes,children:S.jsx(yZ,{value:t,children:S.jsx(E,{id:t,data:T.data,type:A,positionAbsoluteX:$.positionAbsolute.x,positionAbsoluteY:$.positionAbsolute.y,selected:T.selected??!1,selectable:G,draggable:N,deletable:T.deletable??!0,isConnectable:ne,sourcePosition:T.sourcePosition,targetPosition:T.targetPosition,dragging:W,dragHandle:T.dragHandle,zIndex:$.z,parentId:T.parentId,...q})})})}var XZ=D.memo(MZ);const ZZ=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function W$(t){const{nodesDraggable:e,nodesConnectable:n,nodesFocusable:i,elementsSelectable:r,onError:l}=Fe(ZZ,vt),a=zZ(t.onlyRenderVisibleElements),c=_Z();return S.jsx("div",{className:"react-flow__nodes",style:cO,children:a.map(f=>S.jsx(XZ,{id:f,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:c,nodesDraggable:e,nodesConnectable:n,nodesFocusable:i,elementsSelectable:r,nodeClickDistance:t.nodeClickDistance,onError:l},f))})}W$.displayName="NodeRenderer";const qZ=D.memo(W$);function DZ(t){return Fe(D.useCallback(n=>{if(!t)return n.edges.map(r=>r.id);const i=[];if(n.width&&n.height)for(const r of n.edges){const l=n.nodeLookup.get(r.source),a=n.nodeLookup.get(r.target);l&&a&&XM({sourceNode:l,targetNode:a,width:n.width,height:n.height,transform:n.transform})&&i.push(r.id)}return i},[t]),vt)}const LZ=({color:t="none",strokeWidth:e=1})=>{const n={strokeWidth:e,...t&&{stroke:t}};return S.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},BZ=({color:t="none",strokeWidth:e=1})=>{const n={strokeWidth:e,...t&&{stroke:t,fill:t}};return S.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},jQ={[Od.Arrow]:LZ,[Od.ArrowClosed]:BZ};function NZ(t){const e=Qt();return D.useMemo(()=>{var r,l;return Object.prototype.hasOwnProperty.call(jQ,t)?jQ[t]:((l=(r=e.getState()).onError)==null||l.call(r,"009",Ki.error009(t)),null)},[t])}const VZ=({id:t,type:e,color:n,width:i=12.5,height:r=12.5,markerUnits:l="strokeWidth",strokeWidth:a,orient:c="auto-start-reverse"})=>{const f=NZ(e);return f?S.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${i}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:l,orient:c,refX:"0",refY:"0",children:S.jsx(f,{color:n,strokeWidth:a})}):null},U$=({defaultColor:t,rfId:e})=>{const n=Fe(l=>l.edges),i=Fe(l=>l.defaultEdgeOptions),r=D.useMemo(()=>YM(n,{id:e,defaultColor:t,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[n,i,e,t]);return r.length?S.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:S.jsx("defs",{children:r.map(l=>S.jsx(VZ,{id:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,strokeWidth:l.strokeWidth,orient:l.orient},l.id))})}):null};U$.displayName="MarkerDefinitions";var YZ=D.memo(U$);function G$({x:t,y:e,label:n,labelStyle:i,labelShowBg:r=!0,labelBgStyle:l,labelBgPadding:a=[2,4],labelBgBorderRadius:c=2,children:f,className:h,...O}){const[p,m]=D.useState({x:1,y:0,width:0,height:0}),y=qt(["react-flow__edge-textwrapper",h]),b=D.useRef(null);return D.useEffect(()=>{if(b.current){const v=b.current.getBBox();m({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),n?S.jsxs("g",{transform:`translate(${t-p.width/2} ${e-p.height/2})`,className:y,visibility:p.width?"visible":"hidden",...O,children:[r&&S.jsx("rect",{width:p.width+2*a[0],x:-a[0],y:-a[1],height:p.height+2*a[1],className:"react-flow__edge-textbg",style:l,rx:c,ry:c}),S.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:b,style:i,children:n}),f]}):null}G$.displayName="EdgeText";const WZ=D.memo(G$);function uO({path:t,labelX:e,labelY:n,label:i,labelStyle:r,labelShowBg:l,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f,interactionWidth:h=20,...O}){return S.jsxs(S.Fragment,{children:[S.jsx("path",{...O,d:t,fill:"none",className:qt(["react-flow__edge-path",O.className])}),h?S.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,i&&wi(e)&&wi(n)?S.jsx(WZ,{x:e,y:n,label:i,labelStyle:r,labelShowBg:l,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f}):null]})}function MQ({pos:t,x1:e,y1:n,x2:i,y2:r}){return t===we.Left||t===we.Right?[.5*(e+i),n]:[e,.5*(n+r)]}function H$({sourceX:t,sourceY:e,sourcePosition:n=we.Bottom,targetX:i,targetY:r,targetPosition:l=we.Top}){const[a,c]=MQ({pos:n,x1:t,y1:e,x2:i,y2:r}),[f,h]=MQ({pos:l,x1:i,y1:r,x2:t,y2:e}),[O,p,m,y]=x$({sourceX:t,sourceY:e,targetX:i,targetY:r,sourceControlX:a,sourceControlY:c,targetControlX:f,targetControlY:h});return[`M${t},${e} C${a},${c} ${f},${h} ${i},${r}`,O,p,m,y]}function I$(t){return D.memo(({id:e,sourceX:n,sourceY:i,targetX:r,targetY:l,sourcePosition:a,targetPosition:c,label:f,labelStyle:h,labelShowBg:O,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:y,style:b,markerEnd:v,markerStart:k,interactionWidth:Q})=>{const[P,T,$]=H$({sourceX:n,sourceY:i,sourcePosition:a,targetX:r,targetY:l,targetPosition:c}),_=t.isInternal?void 0:e;return S.jsx(uO,{id:_,path:P,labelX:T,labelY:$,label:f,labelStyle:h,labelShowBg:O,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:y,style:b,markerEnd:v,markerStart:k,interactionWidth:Q})})}const UZ=I$({isInternal:!1}),F$=I$({isInternal:!0});UZ.displayName="SimpleBezierEdge";F$.displayName="SimpleBezierEdgeInternal";function K$(t){return D.memo(({id:e,sourceX:n,sourceY:i,targetX:r,targetY:l,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:O,labelBgBorderRadius:p,style:m,sourcePosition:y=we.Bottom,targetPosition:b=we.Top,markerEnd:v,markerStart:k,pathOptions:Q,interactionWidth:P})=>{const[T,$,_]=f0({sourceX:n,sourceY:i,sourcePosition:y,targetX:r,targetY:l,targetPosition:b,borderRadius:Q==null?void 0:Q.borderRadius,offset:Q==null?void 0:Q.offset,stepPosition:Q==null?void 0:Q.stepPosition}),A=t.isInternal?void 0:e;return S.jsx(uO,{id:A,path:T,labelX:$,labelY:_,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:O,labelBgBorderRadius:p,style:m,markerEnd:v,markerStart:k,interactionWidth:P})})}const J$=K$({isInternal:!1}),e2=K$({isInternal:!0});J$.displayName="SmoothStepEdge";e2.displayName="SmoothStepEdgeInternal";function t2(t){return D.memo(({id:e,...n})=>{var r;const i=t.isInternal?void 0:e;return S.jsx(J$,{...n,id:i,pathOptions:D.useMemo(()=>{var l;return{borderRadius:0,offset:(l=n.pathOptions)==null?void 0:l.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const GZ=t2({isInternal:!1}),n2=t2({isInternal:!0});GZ.displayName="StepEdge";n2.displayName="StepEdgeInternal";function i2(t){return D.memo(({id:e,sourceX:n,sourceY:i,targetX:r,targetY:l,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:O,labelBgBorderRadius:p,style:m,markerEnd:y,markerStart:b,interactionWidth:v})=>{const[k,Q,P]=v$({sourceX:n,sourceY:i,targetX:r,targetY:l}),T=t.isInternal?void 0:e;return S.jsx(uO,{id:T,path:k,labelX:Q,labelY:P,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:O,labelBgBorderRadius:p,style:m,markerEnd:y,markerStart:b,interactionWidth:v})})}const HZ=i2({isInternal:!1}),r2=i2({isInternal:!0});HZ.displayName="StraightEdge";r2.displayName="StraightEdgeInternal";function s2(t){return D.memo(({id:e,sourceX:n,sourceY:i,targetX:r,targetY:l,sourcePosition:a=we.Bottom,targetPosition:c=we.Top,label:f,labelStyle:h,labelShowBg:O,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:y,style:b,markerEnd:v,markerStart:k,pathOptions:Q,interactionWidth:P})=>{const[T,$,_]=S$({sourceX:n,sourceY:i,sourcePosition:a,targetX:r,targetY:l,targetPosition:c,curvature:Q==null?void 0:Q.curvature}),A=t.isInternal?void 0:e;return S.jsx(uO,{id:A,path:T,labelX:$,labelY:_,label:f,labelStyle:h,labelShowBg:O,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:y,style:b,markerEnd:v,markerStart:k,interactionWidth:P})})}const IZ=s2({isInternal:!1}),l2=s2({isInternal:!0});IZ.displayName="BezierEdge";l2.displayName="BezierEdgeInternal";const XQ={default:l2,straight:r2,step:n2,smoothstep:e2,simplebezier:F$},ZQ={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},FZ=(t,e,n)=>n===we.Left?t-e:n===we.Right?t+e:t,KZ=(t,e,n)=>n===we.Top?t-e:n===we.Bottom?t+e:t,qQ="react-flow__edgeupdater";function DQ({position:t,centerX:e,centerY:n,radius:i=10,onMouseDown:r,onMouseEnter:l,onMouseOut:a,type:c}){return S.jsx("circle",{onMouseDown:r,onMouseEnter:l,onMouseOut:a,className:qt([qQ,`${qQ}-${c}`]),cx:FZ(e,i,t),cy:KZ(n,i,t),r:i,stroke:"transparent",fill:"transparent"})}function JZ({isReconnectable:t,reconnectRadius:e,edge:n,sourceX:i,sourceY:r,targetX:l,targetY:a,sourcePosition:c,targetPosition:f,onReconnect:h,onReconnectStart:O,onReconnectEnd:p,setReconnecting:m,setUpdateHover:y}){const b=Qt(),v=($,_)=>{if($.button!==0)return;const{autoPanOnConnect:A,domNode:E,connectionMode:N,connectionRadius:G,lib:ne,onConnectStart:V,cancelConnection:Y,nodeLookup:H,rfId:X,panBy:W,updateConnection:R}=b.getState(),q=_.type==="target",B=(z,Z)=>{m(!1),p==null||p(z,n,_.type,Z)},M=z=>h==null?void 0:h(n,z),F=(z,Z)=>{m(!0),O==null||O($,n,_.type),V==null||V(z,Z)};O0.onPointerDown($.nativeEvent,{autoPanOnConnect:A,connectionMode:N,connectionRadius:G,domNode:E,handleId:_.id,nodeId:_.nodeId,nodeLookup:H,isTarget:q,edgeUpdaterType:_.type,lib:ne,flowId:X,cancelConnection:Y,panBy:W,isValidConnection:(...z)=>{var Z,te;return((te=(Z=b.getState()).isValidConnection)==null?void 0:te.call(Z,...z))??!0},onConnect:M,onConnectStart:F,onConnectEnd:(...z)=>{var Z,te;return(te=(Z=b.getState()).onConnectEnd)==null?void 0:te.call(Z,...z)},onReconnectEnd:B,updateConnection:R,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:$.currentTarget})},k=$=>v($,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),Q=$=>v($,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),P=()=>y(!0),T=()=>y(!1);return S.jsxs(S.Fragment,{children:[(t===!0||t==="source")&&S.jsx(DQ,{position:c,centerX:i,centerY:r,radius:e,onMouseDown:k,onMouseEnter:P,onMouseOut:T,type:"source"}),(t===!0||t==="target")&&S.jsx(DQ,{position:f,centerX:l,centerY:a,radius:e,onMouseDown:Q,onMouseEnter:P,onMouseOut:T,type:"target"})]})}function e3({id:t,edgesFocusable:e,edgesReconnectable:n,elementsSelectable:i,onClick:r,onDoubleClick:l,onContextMenu:a,onMouseEnter:c,onMouseMove:f,onMouseLeave:h,reconnectRadius:O,onReconnect:p,onReconnectStart:m,onReconnectEnd:y,rfId:b,edgeTypes:v,noPanClassName:k,onError:Q,disableKeyboardA11y:P}){let T=Fe(ke=>ke.edgeLookup.get(t));const $=Fe(ke=>ke.defaultEdgeOptions);T=$?{...$,...T}:T;let _=T.type||"default",A=(v==null?void 0:v[_])||XQ[_];A===void 0&&(Q==null||Q("011",Ki.error011(_)),_="default",A=(v==null?void 0:v.default)||XQ.default);const E=!!(T.focusable||e&&typeof T.focusable>"u"),N=typeof p<"u"&&(T.reconnectable||n&&typeof T.reconnectable>"u"),G=!!(T.selectable||i&&typeof T.selectable>"u"),ne=D.useRef(null),[V,Y]=D.useState(!1),[H,X]=D.useState(!1),W=Qt(),{zIndex:R,sourceX:q,sourceY:B,targetX:M,targetY:F,sourcePosition:z,targetPosition:Z}=Fe(D.useCallback(ke=>{const Te=ke.nodeLookup.get(T.source),Ze=ke.nodeLookup.get(T.target);if(!Te||!Ze)return{zIndex:T.zIndex,...ZQ};const tt=VM({id:t,sourceNode:Te,targetNode:Ze,sourceHandle:T.sourceHandle||null,targetHandle:T.targetHandle||null,connectionMode:ke.connectionMode,onError:Q});return{zIndex:MM({selected:T.selected,zIndex:T.zIndex,sourceNode:Te,targetNode:Ze,elevateOnSelect:ke.elevateEdgesOnSelect,zIndexMode:ke.zIndexMode}),...tt||ZQ}},[T.source,T.target,T.sourceHandle,T.targetHandle,T.selected,T.zIndex]),vt),te=D.useMemo(()=>T.markerStart?`url('#${h0(T.markerStart,b)}')`:void 0,[T.markerStart,b]),re=D.useMemo(()=>T.markerEnd?`url('#${h0(T.markerEnd,b)}')`:void 0,[T.markerEnd,b]);if(T.hidden||q===null||B===null||M===null||F===null)return null;const ue=ke=>{var se;const{addSelectedEdges:Te,unselectNodesAndEdges:Ze,multiSelectionActive:tt}=W.getState();G&&(W.setState({nodesSelectionActive:!1}),T.selected&&tt?(Ze({nodes:[],edges:[T]}),(se=ne.current)==null||se.blur()):Te([t])),r&&r(ke,T)},he=l?ke=>{l(ke,{...T})}:void 0,Oe=a?ke=>{a(ke,{...T})}:void 0,fe=c?ke=>{c(ke,{...T})}:void 0,ge=f?ke=>{f(ke,{...T})}:void 0,ze=h?ke=>{h(ke,{...T})}:void 0,Re=ke=>{var Te;if(!P&&s$.includes(ke.key)&&G){const{unselectNodesAndEdges:Ze,addSelectedEdges:tt}=W.getState();ke.key==="Escape"?((Te=ne.current)==null||Te.blur(),Ze({edges:[T]})):tt([t])}};return S.jsx("svg",{style:{zIndex:R},children:S.jsxs("g",{className:qt(["react-flow__edge",`react-flow__edge-${_}`,T.className,k,{selected:T.selected,animated:T.animated,inactive:!G&&!r,updating:V,selectable:G}]),onClick:ue,onDoubleClick:he,onContextMenu:Oe,onMouseEnter:fe,onMouseMove:ge,onMouseLeave:ze,onKeyDown:E?Re:void 0,tabIndex:E?0:void 0,role:T.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":T.ariaLabel===null?void 0:T.ariaLabel||`Edge from ${T.source} to ${T.target}`,"aria-describedby":E?`${X$}-${b}`:void 0,ref:ne,...T.domAttributes,children:[!H&&S.jsx(A,{id:t,source:T.source,target:T.target,type:T.type,selected:T.selected,animated:T.animated,selectable:G,deletable:T.deletable??!0,label:T.label,labelStyle:T.labelStyle,labelShowBg:T.labelShowBg,labelBgStyle:T.labelBgStyle,labelBgPadding:T.labelBgPadding,labelBgBorderRadius:T.labelBgBorderRadius,sourceX:q,sourceY:B,targetX:M,targetY:F,sourcePosition:z,targetPosition:Z,data:T.data,style:T.style,sourceHandleId:T.sourceHandle,targetHandleId:T.targetHandle,markerStart:te,markerEnd:re,pathOptions:"pathOptions"in T?T.pathOptions:void 0,interactionWidth:T.interactionWidth}),N&&S.jsx(JZ,{edge:T,isReconnectable:N,reconnectRadius:O,onReconnect:p,onReconnectStart:m,onReconnectEnd:y,sourceX:q,sourceY:B,targetX:M,targetY:F,sourcePosition:z,targetPosition:Z,setUpdateHover:Y,setReconnecting:X})]})})}var t3=D.memo(e3);const n3=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function a2({defaultMarkerColor:t,onlyRenderVisibleElements:e,rfId:n,edgeTypes:i,noPanClassName:r,onReconnect:l,onEdgeContextMenu:a,onEdgeMouseEnter:c,onEdgeMouseMove:f,onEdgeMouseLeave:h,onEdgeClick:O,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:y,onReconnectEnd:b,disableKeyboardA11y:v}){const{edgesFocusable:k,edgesReconnectable:Q,elementsSelectable:P,onError:T}=Fe(n3,vt),$=DZ(e);return S.jsxs("div",{className:"react-flow__edges",children:[S.jsx(YZ,{defaultColor:t,rfId:n}),$.map(_=>S.jsx(t3,{id:_,edgesFocusable:k,edgesReconnectable:Q,elementsSelectable:P,noPanClassName:r,onReconnect:l,onContextMenu:a,onMouseEnter:c,onMouseMove:f,onMouseLeave:h,onClick:O,reconnectRadius:p,onDoubleClick:m,onReconnectStart:y,onReconnectEnd:b,rfId:n,onError:T,edgeTypes:i,disableKeyboardA11y:v},_))]})}a2.displayName="EdgeRenderer";const i3=D.memo(a2),r3=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function s3({children:t}){const e=Fe(r3);return S.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:e},children:t})}function l3(t){const e=oO(),n=D.useRef(!1);D.useEffect(()=>{!n.current&&e.viewportInitialized&&t&&(setTimeout(()=>t(e),1),n.current=!0)},[t,e.viewportInitialized])}const a3=t=>{var e;return(e=t.panZoom)==null?void 0:e.syncViewport};function o3(t){const e=Fe(a3),n=Qt();return D.useEffect(()=>{t&&(e==null||e(t),n.setState({transform:[t.x,t.y,t.zoom]}))},[t,e]),null}function c3(t){return t.connection.inProgress?{...t.connection,to:Qu(t.connection.to,t.transform)}:{...t.connection}}function u3(t){return c3}function f3(t){const e=u3();return Fe(e,vt)}const h3=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function d3({containerStyle:t,style:e,type:n,component:i}){const{nodesConnectable:r,width:l,height:a,isValid:c,inProgress:f}=Fe(h3,vt);return!(l&&r&&f)?null:S.jsx("svg",{style:t,width:l,height:a,className:"react-flow__connectionline react-flow__container",children:S.jsx("g",{className:qt(["react-flow__connection",o$(c)]),children:S.jsx(o2,{style:e,type:n,CustomComponent:i,isValid:c})})})}const o2=({style:t,type:e=ks.Bezier,CustomComponent:n,isValid:i})=>{const{inProgress:r,from:l,fromNode:a,fromHandle:c,fromPosition:f,to:h,toNode:O,toHandle:p,toPosition:m,pointer:y}=f3();if(!r)return;if(n)return S.jsx(n,{connectionLineType:e,connectionLineStyle:t,fromNode:a,fromHandle:c,fromX:l.x,fromY:l.y,toX:h.x,toY:h.y,fromPosition:f,toPosition:m,connectionStatus:o$(i),toNode:O,toHandle:p,pointer:y});let b="";const v={sourceX:l.x,sourceY:l.y,sourcePosition:f,targetX:h.x,targetY:h.y,targetPosition:m};switch(e){case ks.Bezier:[b]=S$(v);break;case ks.SimpleBezier:[b]=H$(v);break;case ks.Step:[b]=f0({...v,borderRadius:0});break;case ks.SmoothStep:[b]=f0(v);break;default:[b]=v$(v)}return S.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:t})};o2.displayName="ConnectionLine";const O3={};function LQ(t=O3){D.useRef(t),Qt(),D.useEffect(()=>{},[t])}function p3(){Qt(),D.useRef(!1),D.useEffect(()=>{},[])}function c2({nodeTypes:t,edgeTypes:e,onInit:n,onNodeClick:i,onEdgeClick:r,onNodeDoubleClick:l,onEdgeDoubleClick:a,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:O,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:y,connectionLineType:b,connectionLineStyle:v,connectionLineComponent:k,connectionLineContainerStyle:Q,selectionKeyCode:P,selectionOnDrag:T,selectionMode:$,multiSelectionKeyCode:_,panActivationKeyCode:A,zoomActivationKeyCode:E,deleteKeyCode:N,onlyRenderVisibleElements:G,elementsSelectable:ne,defaultViewport:V,translateExtent:Y,minZoom:H,maxZoom:X,preventScrolling:W,defaultMarkerColor:R,zoomOnScroll:q,zoomOnPinch:B,panOnScroll:M,panOnScrollSpeed:F,panOnScrollMode:z,zoomOnDoubleClick:Z,panOnDrag:te,onPaneClick:re,onPaneMouseEnter:ue,onPaneMouseMove:he,onPaneMouseLeave:Oe,onPaneScroll:fe,onPaneContextMenu:ge,paneClickDistance:ze,nodeClickDistance:Re,onEdgeContextMenu:ke,onEdgeMouseEnter:Te,onEdgeMouseMove:Ze,onEdgeMouseLeave:tt,reconnectRadius:se,onReconnect:qe,onReconnectStart:at,onReconnectEnd:Yt,noDragClassName:an,noWheelClassName:on,noPanClassName:Bs,disableKeyboardA11y:Ns,nodeExtent:It,rfId:Ll,viewport:er,onViewportChange:Dr}){return LQ(t),LQ(e),p3(),l3(n),o3(er),S.jsx(AZ,{onPaneClick:re,onPaneMouseEnter:ue,onPaneMouseMove:he,onPaneMouseLeave:Oe,onPaneContextMenu:ge,onPaneScroll:fe,paneClickDistance:ze,deleteKeyCode:N,selectionKeyCode:P,selectionOnDrag:T,selectionMode:$,onSelectionStart:m,onSelectionEnd:y,multiSelectionKeyCode:_,panActivationKeyCode:A,zoomActivationKeyCode:E,elementsSelectable:ne,zoomOnScroll:q,zoomOnPinch:B,zoomOnDoubleClick:Z,panOnScroll:M,panOnScrollSpeed:F,panOnScrollMode:z,panOnDrag:te,defaultViewport:V,translateExtent:Y,minZoom:H,maxZoom:X,onSelectionContextMenu:p,preventScrolling:W,noDragClassName:an,noWheelClassName:on,noPanClassName:Bs,disableKeyboardA11y:Ns,onViewportChange:Dr,isControlledViewport:!!er,children:S.jsxs(s3,{children:[S.jsx(i3,{edgeTypes:e,onEdgeClick:r,onEdgeDoubleClick:a,onReconnect:qe,onReconnectStart:at,onReconnectEnd:Yt,onlyRenderVisibleElements:G,onEdgeContextMenu:ke,onEdgeMouseEnter:Te,onEdgeMouseMove:Ze,onEdgeMouseLeave:tt,reconnectRadius:se,defaultMarkerColor:R,noPanClassName:Bs,disableKeyboardA11y:Ns,rfId:Ll}),S.jsx(d3,{style:v,type:b,component:k,containerStyle:Q}),S.jsx("div",{className:"react-flow__edgelabel-renderer"}),S.jsx(qZ,{nodeTypes:t,onNodeClick:i,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:O,nodeClickDistance:Re,onlyRenderVisibleElements:G,noPanClassName:Bs,noDragClassName:an,disableKeyboardA11y:Ns,nodeExtent:It,rfId:Ll}),S.jsx("div",{className:"react-flow__viewport-portal"})]})})}c2.displayName="GraphView";const g3=D.memo(c2),BQ=({nodes:t,edges:e,defaultNodes:n,defaultEdges:i,width:r,height:l,fitView:a,fitViewOptions:c,minZoom:f=.5,maxZoom:h=2,nodeOrigin:O,nodeExtent:p,zIndexMode:m="basic"}={})=>{const y=new Map,b=new Map,v=new Map,k=new Map,Q=i??e??[],P=n??t??[],T=O??[0,0],$=p??Gc;k$(v,k,Q);const{nodesInitialized:_}=d0(P,y,b,{nodeOrigin:T,nodeExtent:$,zIndexMode:m});let A=[0,0,1];if(a&&r&&l){const E=bu(y,{filter:V=>!!((V.width||V.initialWidth)&&(V.height||V.initialHeight))}),{x:N,y:G,zoom:ne}=Py(E,r,l,f,h,(c==null?void 0:c.padding)??.1);A=[N,G,ne]}return{rfId:"1",width:r??0,height:l??0,transform:A,nodes:P,nodesInitialized:_,nodeLookup:y,parentLookup:b,edges:Q,edgeLookup:k,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:f,maxZoom:h,translateExtent:Gc,nodeExtent:$,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ja.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:T,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:c,fitViewResolver:null,connection:{...a$},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:AM,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:l$,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},m3=({nodes:t,edges:e,defaultNodes:n,defaultEdges:i,width:r,height:l,fitView:a,fitViewOptions:c,minZoom:f,maxZoom:h,nodeOrigin:O,nodeExtent:p,zIndexMode:m})=>_X((y,b)=>{async function v(){const{nodeLookup:k,panZoom:Q,fitViewOptions:P,fitViewResolver:T,width:$,height:_,minZoom:A,maxZoom:E}=b();Q&&(await PM({nodes:k,width:$,height:_,panZoom:Q,minZoom:A,maxZoom:E},P),T==null||T.resolve(!0),y({fitViewResolver:null}))}return{...BQ({nodes:t,edges:e,width:r,height:l,fitView:a,fitViewOptions:c,minZoom:f,maxZoom:h,nodeOrigin:O,nodeExtent:p,defaultNodes:n,defaultEdges:i,zIndexMode:m}),setNodes:k=>{const{nodeLookup:Q,parentLookup:P,nodeOrigin:T,elevateNodesOnSelect:$,fitViewQueued:_,zIndexMode:A,nodesSelectionActive:E}=b(),{nodesInitialized:N,hasSelectedNodes:G}=d0(k,Q,P,{nodeOrigin:T,nodeExtent:p,elevateNodesOnSelect:$,checkEquality:!0,zIndexMode:A}),ne=E&&G;_&&N?(v(),y({nodes:k,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:ne})):y({nodes:k,nodesInitialized:N,nodesSelectionActive:ne})},setEdges:k=>{const{connectionLookup:Q,edgeLookup:P}=b();k$(Q,P,k),y({edges:k})},setDefaultNodesAndEdges:(k,Q)=>{if(k){const{setNodes:P}=b();P(k),y({hasDefaultNodes:!0})}if(Q){const{setEdges:P}=b();P(Q),y({hasDefaultEdges:!0})}},updateNodeInternals:k=>{const{triggerNodeChanges:Q,nodeLookup:P,parentLookup:T,domNode:$,nodeOrigin:_,nodeExtent:A,debug:E,fitViewQueued:N,zIndexMode:G}=b(),{changes:ne,updatedInternals:V}=KM(k,P,T,$,_,A,G);V&&(GM(P,T,{nodeOrigin:_,nodeExtent:A,zIndexMode:G}),N?(v(),y({fitViewQueued:!1,fitViewOptions:void 0})):y({}),(ne==null?void 0:ne.length)>0&&(E&&console.log("React Flow: trigger node changes",ne),Q==null||Q(ne)))},updateNodePositions:(k,Q=!1)=>{const P=[];let T=[];const{nodeLookup:$,triggerNodeChanges:_,connection:A,updateConnection:E,onNodesChangeMiddlewareMap:N}=b();for(const[G,ne]of k){const V=$.get(G),Y=!!(V!=null&&V.expandParent&&(V!=null&&V.parentId)&&(ne!=null&&ne.position)),H={id:G,type:"position",position:Y?{x:Math.max(0,ne.position.x),y:Math.max(0,ne.position.y)}:ne.position,dragging:Q};if(V&&A.inProgress&&A.fromNode.id===V.id){const X=Rl(V,A.fromHandle,we.Left,!0);E({...A,from:X})}Y&&V.parentId&&P.push({id:G,parentId:V.parentId,rect:{...ne.internals.positionAbsolute,width:ne.measured.width??0,height:ne.measured.height??0}}),T.push(H)}if(P.length>0){const{parentLookup:G,nodeOrigin:ne}=b(),V=_y(P,$,G,ne);T.push(...V)}for(const G of N.values())T=G(T);_(T)},triggerNodeChanges:k=>{const{onNodesChange:Q,setNodes:P,nodes:T,hasDefaultNodes:$,debug:_}=b();if(k!=null&&k.length){if($){const A=tZ(k,T);P(A)}_&&console.log("React Flow: trigger node changes",k),Q==null||Q(k)}},triggerEdgeChanges:k=>{const{onEdgesChange:Q,setEdges:P,edges:T,hasDefaultEdges:$,debug:_}=b();if(k!=null&&k.length){if($){const A=nZ(k,T);P(A)}_&&console.log("React Flow: trigger edge changes",k),Q==null||Q(k)}},addSelectedNodes:k=>{const{multiSelectionActive:Q,edgeLookup:P,nodeLookup:T,triggerNodeChanges:$,triggerEdgeChanges:_}=b();if(Q){const A=k.map(E=>Ol(E,!0));$(A);return}$(ja(T,new Set([...k]),!0)),_(ja(P))},addSelectedEdges:k=>{const{multiSelectionActive:Q,edgeLookup:P,nodeLookup:T,triggerNodeChanges:$,triggerEdgeChanges:_}=b();if(Q){const A=k.map(E=>Ol(E,!0));_(A);return}_(ja(P,new Set([...k]))),$(ja(T,new Set,!0))},unselectNodesAndEdges:({nodes:k,edges:Q}={})=>{const{edges:P,nodes:T,nodeLookup:$,triggerNodeChanges:_,triggerEdgeChanges:A}=b(),E=k||T,N=Q||P,G=[];for(const V of E){if(!V.selected)continue;const Y=$.get(V.id);Y&&(Y.selected=!1),G.push(Ol(V.id,!1))}const ne=[];for(const V of N)V.selected&&ne.push(Ol(V.id,!1));_(G),A(ne)},setMinZoom:k=>{const{panZoom:Q,maxZoom:P}=b();Q==null||Q.setScaleExtent([k,P]),y({minZoom:k})},setMaxZoom:k=>{const{panZoom:Q,minZoom:P}=b();Q==null||Q.setScaleExtent([P,k]),y({maxZoom:k})},setTranslateExtent:k=>{var Q;(Q=b().panZoom)==null||Q.setTranslateExtent(k),y({translateExtent:k})},resetSelectedElements:()=>{const{edges:k,nodes:Q,triggerNodeChanges:P,triggerEdgeChanges:T,elementsSelectable:$}=b();if(!$)return;const _=Q.reduce((E,N)=>N.selected?[...E,Ol(N.id,!1)]:E,[]),A=k.reduce((E,N)=>N.selected?[...E,Ol(N.id,!1)]:E,[]);P(_),T(A)},setNodeExtent:k=>{const{nodes:Q,nodeLookup:P,parentLookup:T,nodeOrigin:$,elevateNodesOnSelect:_,nodeExtent:A,zIndexMode:E}=b();k[0][0]===A[0][0]&&k[0][1]===A[0][1]&&k[1][0]===A[1][0]&&k[1][1]===A[1][1]||(d0(Q,P,T,{nodeOrigin:$,nodeExtent:k,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:E}),y({nodeExtent:k}))},panBy:k=>{const{transform:Q,width:P,height:T,panZoom:$,translateExtent:_}=b();return JM({delta:k,panZoom:$,transform:Q,translateExtent:_,width:P,height:T})},setCenter:async(k,Q,P)=>{const{width:T,height:$,maxZoom:_,panZoom:A}=b();if(!A)return Promise.resolve(!1);const E=typeof(P==null?void 0:P.zoom)<"u"?P.zoom:_;return await A.setViewport({x:T/2-k*E,y:$/2-Q*E,zoom:E},{duration:P==null?void 0:P.duration,ease:P==null?void 0:P.ease,interpolate:P==null?void 0:P.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{y({connection:{...a$}})},updateConnection:k=>{y({connection:k})},reset:()=>y({...BQ()})}},Object.is);function u2({initialNodes:t,initialEdges:e,defaultNodes:n,defaultEdges:i,initialWidth:r,initialHeight:l,initialMinZoom:a,initialMaxZoom:c,initialFitViewOptions:f,fitView:h,nodeOrigin:O,nodeExtent:p,zIndexMode:m,children:y}){const[b]=D.useState(()=>m3({nodes:t,edges:e,defaultNodes:n,defaultEdges:i,width:r,height:l,fitView:h,minZoom:a,maxZoom:c,fitViewOptions:f,nodeOrigin:O,nodeExtent:p,zIndexMode:m}));return S.jsx(jX,{value:b,children:S.jsx(sZ,{children:y})})}function y3({children:t,nodes:e,edges:n,defaultNodes:i,defaultEdges:r,width:l,height:a,fitView:c,fitViewOptions:f,minZoom:h,maxZoom:O,nodeOrigin:p,nodeExtent:m,zIndexMode:y}){return D.useContext(lO)?S.jsx(S.Fragment,{children:t}):S.jsx(u2,{initialNodes:e,initialEdges:n,defaultNodes:i,defaultEdges:r,initialWidth:l,initialHeight:a,fitView:c,initialFitViewOptions:f,initialMinZoom:h,initialMaxZoom:O,nodeOrigin:p,nodeExtent:m,zIndexMode:y,children:t})}const x3={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function S3({nodes:t,edges:e,defaultNodes:n,defaultEdges:i,className:r,nodeTypes:l,edgeTypes:a,onNodeClick:c,onEdgeClick:f,onInit:h,onMove:O,onMoveStart:p,onMoveEnd:m,onConnect:y,onConnectStart:b,onConnectEnd:v,onClickConnectStart:k,onClickConnectEnd:Q,onNodeMouseEnter:P,onNodeMouseMove:T,onNodeMouseLeave:$,onNodeContextMenu:_,onNodeDoubleClick:A,onNodeDragStart:E,onNodeDrag:N,onNodeDragStop:G,onNodesDelete:ne,onEdgesDelete:V,onDelete:Y,onSelectionChange:H,onSelectionDragStart:X,onSelectionDrag:W,onSelectionDragStop:R,onSelectionContextMenu:q,onSelectionStart:B,onSelectionEnd:M,onBeforeDelete:F,connectionMode:z,connectionLineType:Z=ks.Bezier,connectionLineStyle:te,connectionLineComponent:re,connectionLineContainerStyle:ue,deleteKeyCode:he="Backspace",selectionKeyCode:Oe="Shift",selectionOnDrag:fe=!1,selectionMode:ge=Hc.Full,panActivationKeyCode:ze="Space",multiSelectionKeyCode:Re=Fc()?"Meta":"Control",zoomActivationKeyCode:ke=Fc()?"Meta":"Control",snapToGrid:Te,snapGrid:Ze,onlyRenderVisibleElements:tt=!1,selectNodesOnDrag:se,nodesDraggable:qe,autoPanOnNodeFocus:at,nodesConnectable:Yt,nodesFocusable:an,nodeOrigin:on=Z$,edgesFocusable:Bs,edgesReconnectable:Ns,elementsSelectable:It=!0,defaultViewport:Ll=GX,minZoom:er=.5,maxZoom:Dr=2,translateExtent:Vs=Gc,preventScrolling:TO=!0,nodeExtent:Bl,defaultMarkerColor:$O="#b1b1b7",zoomOnScroll:PO=!0,zoomOnPinch:Ys=!0,panOnScroll:pn=!1,panOnScrollSpeed:Ri=.5,panOnScrollMode:gn=kl.Free,zoomOnDoubleClick:CO=!0,panOnDrag:AO=!0,onPaneClick:RO,onPaneMouseEnter:Nl,onPaneMouseMove:Vl,onPaneMouseLeave:Yl,onPaneScroll:tr,onPaneContextMenu:Wl,paneClickDistance:Ws=1,nodeClickDistance:zO=0,children:_u,onReconnect:So,onReconnectStart:Us,onReconnectEnd:EO,onEdgeContextMenu:ju,onEdgeDoubleClick:Mu,onEdgeMouseEnter:Xu,onEdgeMouseMove:bo,onEdgeMouseLeave:vo,reconnectRadius:Zu=10,onNodesChange:qu,onEdgesChange:zi,noDragClassName:Dt="nodrag",noWheelClassName:cn="nowheel",noPanClassName:nr="nopan",fitView:Ul,fitViewOptions:Du,connectOnClick:_O,attributionPosition:Lu,proOptions:Gs,defaultEdgeOptions:Qo,elevateNodesOnSelect:Lr=!0,elevateEdgesOnSelect:Br=!1,disableKeyboardA11y:Nr=!1,autoPanOnConnect:Vr,autoPanOnNodeDrag:zt,autoPanSpeed:Bu,connectionRadius:Nu,isValidConnection:ir,onError:Yr,style:jO,id:wo,nodeDragThreshold:Vu,connectionDragThreshold:MO,viewport:Gl,onViewportChange:Hl,width:pi,height:vn,colorMode:Yu="light",debug:XO,onScroll:Wr,ariaLabelConfig:Wu,zIndexMode:Hs="basic",...ZO},Qn){const Is=wo||"1",Uu=KX(Yu),ko=D.useCallback(rr=>{rr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Wr==null||Wr(rr)},[Wr]);return S.jsx("div",{"data-testid":"rf__wrapper",...ZO,onScroll:ko,style:{...jO,...x3},ref:Qn,className:qt(["react-flow",r,Uu]),id:wo,role:"application",children:S.jsxs(y3,{nodes:t,edges:e,width:pi,height:vn,fitView:Ul,fitViewOptions:Du,minZoom:er,maxZoom:Dr,nodeOrigin:on,nodeExtent:Bl,zIndexMode:Hs,children:[S.jsx(FX,{nodes:t,edges:e,defaultNodes:n,defaultEdges:i,onConnect:y,onConnectStart:b,onConnectEnd:v,onClickConnectStart:k,onClickConnectEnd:Q,nodesDraggable:qe,autoPanOnNodeFocus:at,nodesConnectable:Yt,nodesFocusable:an,edgesFocusable:Bs,edgesReconnectable:Ns,elementsSelectable:It,elevateNodesOnSelect:Lr,elevateEdgesOnSelect:Br,minZoom:er,maxZoom:Dr,nodeExtent:Bl,onNodesChange:qu,onEdgesChange:zi,snapToGrid:Te,snapGrid:Ze,connectionMode:z,translateExtent:Vs,connectOnClick:_O,defaultEdgeOptions:Qo,fitView:Ul,fitViewOptions:Du,onNodesDelete:ne,onEdgesDelete:V,onDelete:Y,onNodeDragStart:E,onNodeDrag:N,onNodeDragStop:G,onSelectionDrag:W,onSelectionDragStart:X,onSelectionDragStop:R,onMove:O,onMoveStart:p,onMoveEnd:m,noPanClassName:nr,nodeOrigin:on,rfId:Is,autoPanOnConnect:Vr,autoPanOnNodeDrag:zt,autoPanSpeed:Bu,onError:Yr,connectionRadius:Nu,isValidConnection:ir,selectNodesOnDrag:se,nodeDragThreshold:Vu,connectionDragThreshold:MO,onBeforeDelete:F,debug:XO,ariaLabelConfig:Wu,zIndexMode:Hs}),S.jsx(g3,{onInit:h,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:P,onNodeMouseMove:T,onNodeMouseLeave:$,onNodeContextMenu:_,onNodeDoubleClick:A,nodeTypes:l,edgeTypes:a,connectionLineType:Z,connectionLineStyle:te,connectionLineComponent:re,connectionLineContainerStyle:ue,selectionKeyCode:Oe,selectionOnDrag:fe,selectionMode:ge,deleteKeyCode:he,multiSelectionKeyCode:Re,panActivationKeyCode:ze,zoomActivationKeyCode:ke,onlyRenderVisibleElements:tt,defaultViewport:Ll,translateExtent:Vs,minZoom:er,maxZoom:Dr,preventScrolling:TO,zoomOnScroll:PO,zoomOnPinch:Ys,zoomOnDoubleClick:CO,panOnScroll:pn,panOnScrollSpeed:Ri,panOnScrollMode:gn,panOnDrag:AO,onPaneClick:RO,onPaneMouseEnter:Nl,onPaneMouseMove:Vl,onPaneMouseLeave:Yl,onPaneScroll:tr,onPaneContextMenu:Wl,paneClickDistance:Ws,nodeClickDistance:zO,onSelectionContextMenu:q,onSelectionStart:B,onSelectionEnd:M,onReconnect:So,onReconnectStart:Us,onReconnectEnd:EO,onEdgeContextMenu:ju,onEdgeDoubleClick:Mu,onEdgeMouseEnter:Xu,onEdgeMouseMove:bo,onEdgeMouseLeave:vo,reconnectRadius:Zu,defaultMarkerColor:$O,noDragClassName:Dt,noWheelClassName:cn,noPanClassName:nr,rfId:Is,disableKeyboardA11y:Nr,nodeExtent:Bl,viewport:Gl,onViewportChange:Hl}),S.jsx(UX,{onSelectionChange:H}),_u,S.jsx(BX,{proOptions:Gs,position:Lu}),S.jsx(LX,{rfId:Is,disableKeyboardA11y:Nr})]})})}var b3=D$(S3);function v3({dimensions:t,lineWidth:e,variant:n,className:i}){return S.jsx("path",{strokeWidth:e,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:qt(["react-flow__background-pattern",n,i])})}function Q3({radius:t,className:e}){return S.jsx("circle",{cx:t,cy:t,r:t,className:qt(["react-flow__background-pattern","dots",e])})}var Ps;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Ps||(Ps={}));const w3={[Ps.Dots]:1,[Ps.Lines]:1,[Ps.Cross]:6},k3=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function f2({id:t,variant:e=Ps.Dots,gap:n=20,size:i,lineWidth:r=1,offset:l=0,color:a,bgColor:c,style:f,className:h,patternClassName:O}){const p=D.useRef(null),{transform:m,patternId:y}=Fe(k3,vt),b=i||w3[e],v=e===Ps.Dots,k=e===Ps.Cross,Q=Array.isArray(n)?n:[n,n],P=[Q[0]*m[2]||1,Q[1]*m[2]||1],T=b*m[2],$=Array.isArray(l)?l:[l,l],_=k?[T,T]:P,A=[$[0]*m[2]||1+_[0]/2,$[1]*m[2]||1+_[1]/2],E=`${y}${t||""}`;return S.jsxs("svg",{className:qt(["react-flow__background",h]),style:{...f,...cO,"--xy-background-color-props":c,"--xy-background-pattern-color-props":a},ref:p,"data-testid":"rf__background",children:[S.jsx("pattern",{id:E,x:m[0]%P[0],y:m[1]%P[1],width:P[0],height:P[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:v?S.jsx(Q3,{radius:T/2,className:O}):S.jsx(v3,{dimensions:_,lineWidth:r,variant:e,className:O})}),S.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}f2.displayName="Background";const T3=D.memo(f2);function $3(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:S.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function P3(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:S.jsx("path",{d:"M0 0h32v4.2H0z"})})}function C3(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:S.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function A3(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:S.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function R3(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:S.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function hh({children:t,className:e,...n}){return S.jsx("button",{type:"button",className:qt(["react-flow__controls-button",e]),...n,children:t})}const z3=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function h2({style:t,showZoom:e=!0,showFitView:n=!0,showInteractive:i=!0,fitViewOptions:r,onZoomIn:l,onZoomOut:a,onFitView:c,onInteractiveChange:f,className:h,children:O,position:p="bottom-left",orientation:m="vertical","aria-label":y}){const b=Qt(),{isInteractive:v,minZoomReached:k,maxZoomReached:Q,ariaLabelConfig:P}=Fe(z3,vt),{zoomIn:T,zoomOut:$,fitView:_}=oO(),A=()=>{T(),l==null||l()},E=()=>{$(),a==null||a()},N=()=>{_(r),c==null||c()},G=()=>{b.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),f==null||f(!v)},ne=m==="horizontal"?"horizontal":"vertical";return S.jsxs(aO,{className:qt(["react-flow__controls",ne,h]),position:p,style:t,"data-testid":"rf__controls","aria-label":y??P["controls.ariaLabel"],children:[e&&S.jsxs(S.Fragment,{children:[S.jsx(hh,{onClick:A,className:"react-flow__controls-zoomin",title:P["controls.zoomIn.ariaLabel"],"aria-label":P["controls.zoomIn.ariaLabel"],disabled:Q,children:S.jsx($3,{})}),S.jsx(hh,{onClick:E,className:"react-flow__controls-zoomout",title:P["controls.zoomOut.ariaLabel"],"aria-label":P["controls.zoomOut.ariaLabel"],disabled:k,children:S.jsx(P3,{})})]}),n&&S.jsx(hh,{className:"react-flow__controls-fitview",onClick:N,title:P["controls.fitView.ariaLabel"],"aria-label":P["controls.fitView.ariaLabel"],children:S.jsx(C3,{})}),i&&S.jsx(hh,{className:"react-flow__controls-interactive",onClick:G,title:P["controls.interactive.ariaLabel"],"aria-label":P["controls.interactive.ariaLabel"],children:v?S.jsx(R3,{}):S.jsx(A3,{})}),O]})}h2.displayName="Controls";D.memo(h2);function E3({id:t,x:e,y:n,width:i,height:r,style:l,color:a,strokeColor:c,strokeWidth:f,className:h,borderRadius:O,shapeRendering:p,selected:m,onClick:y}){const{background:b,backgroundColor:v}=l||{},k=a||b||v;return S.jsx("rect",{className:qt(["react-flow__minimap-node",{selected:m},h]),x:e,y:n,rx:O,ry:O,width:i,height:r,style:{fill:k,stroke:c,strokeWidth:f},shapeRendering:p,onClick:y?Q=>y(Q,t):void 0})}const _3=D.memo(E3),j3=t=>t.nodes.map(e=>e.id),am=t=>t instanceof Function?t:()=>t;function M3({nodeStrokeColor:t,nodeColor:e,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:r,nodeComponent:l=_3,onClick:a}){const c=Fe(j3,vt),f=am(e),h=am(t),O=am(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return S.jsx(S.Fragment,{children:c.map(m=>S.jsx(Z3,{id:m,nodeColorFunc:f,nodeStrokeColorFunc:h,nodeClassNameFunc:O,nodeBorderRadius:i,nodeStrokeWidth:r,NodeComponent:l,onClick:a,shapeRendering:p},m))})}function X3({id:t,nodeColorFunc:e,nodeStrokeColorFunc:n,nodeClassNameFunc:i,nodeBorderRadius:r,nodeStrokeWidth:l,shapeRendering:a,NodeComponent:c,onClick:f}){const{node:h,x:O,y:p,width:m,height:y}=Fe(b=>{const v=b.nodeLookup.get(t);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const k=v.internals.userNode,{x:Q,y:P}=v.internals.positionAbsolute,{width:T,height:$}=Xr(k);return{node:k,x:Q,y:P,width:T,height:$}},vt);return!h||h.hidden||!O$(h)?null:S.jsx(c,{x:O,y:p,width:m,height:y,style:h.style,selected:!!h.selected,className:i(h),color:e(h),borderRadius:r,strokeColor:n(h),strokeWidth:l,shapeRendering:a,onClick:f,id:h.id})}const Z3=D.memo(X3);var q3=D.memo(M3);const D3=200,L3=150,B3=t=>!t.hidden,N3=t=>{const e={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:e,boundingRect:t.nodeLookup.size>0?d$(bu(t.nodeLookup,{filter:B3}),e):e,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},V3="react-flow__minimap-desc";function d2({style:t,className:e,nodeStrokeColor:n,nodeColor:i,nodeClassName:r="",nodeBorderRadius:l=5,nodeStrokeWidth:a,nodeComponent:c,bgColor:f,maskColor:h,maskStrokeColor:O,maskStrokeWidth:p,position:m="bottom-right",onClick:y,onNodeClick:b,pannable:v=!1,zoomable:k=!1,ariaLabel:Q,inversePan:P,zoomStep:T=1,offsetScale:$=5}){const _=Qt(),A=D.useRef(null),{boundingRect:E,viewBB:N,rfId:G,panZoom:ne,translateExtent:V,flowWidth:Y,flowHeight:H,ariaLabelConfig:X}=Fe(N3,vt),W=(t==null?void 0:t.width)??D3,R=(t==null?void 0:t.height)??L3,q=E.width/W,B=E.height/R,M=Math.max(q,B),F=M*W,z=M*R,Z=$*M,te=E.x-(F-E.width)/2-Z,re=E.y-(z-E.height)/2-Z,ue=F+Z*2,he=z+Z*2,Oe=`${V3}-${G}`,fe=D.useRef(0),ge=D.useRef();fe.current=M,D.useEffect(()=>{if(A.current&&ne)return ge.current=oX({domNode:A.current,panZoom:ne,getTransform:()=>_.getState().transform,getViewScale:()=>fe.current}),()=>{var Te;(Te=ge.current)==null||Te.destroy()}},[ne]),D.useEffect(()=>{var Te;(Te=ge.current)==null||Te.update({translateExtent:V,width:Y,height:H,inversePan:P,pannable:v,zoomStep:T,zoomable:k})},[v,k,P,T,V,Y,H]);const ze=y?Te=>{var se;const[Ze,tt]=((se=ge.current)==null?void 0:se.pointer(Te))||[0,0];y(Te,{x:Ze,y:tt})}:void 0,Re=b?D.useCallback((Te,Ze)=>{const tt=_.getState().nodeLookup.get(Ze).internals.userNode;b(Te,tt)},[]):void 0,ke=Q??X["minimap.ariaLabel"];return S.jsx(aO,{position:m,style:{...t,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof O=="string"?O:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*M:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:qt(["react-flow__minimap",e]),"data-testid":"rf__minimap",children:S.jsxs("svg",{width:W,height:R,viewBox:`${te} ${re} ${ue} ${he}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Oe,ref:A,onClick:ze,children:[ke&&S.jsx("title",{id:Oe,children:ke}),S.jsx(q3,{onClick:Re,nodeColor:i,nodeStrokeColor:n,nodeBorderRadius:l,nodeClassName:r,nodeStrokeWidth:a,nodeComponent:c}),S.jsx("path",{className:"react-flow__minimap-mask",d:`M${te-Z},${re-Z}h${ue+Z*2}v${he+Z*2}h${-ue-Z*2}z
|
|
71
|
+
M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}d2.displayName="MiniMap";D.memo(d2);const Y3=t=>e=>t?`${Math.max(1/e.transform[2],1)}`:void 0,W3={[io.Line]:"right",[io.Handle]:"bottom-right"};function U3({nodeId:t,position:e,variant:n=io.Handle,className:i,style:r=void 0,children:l,color:a,minWidth:c=10,minHeight:f=10,maxWidth:h=Number.MAX_VALUE,maxHeight:O=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,autoScale:y=!0,shouldResize:b,onResizeStart:v,onResize:k,onResizeEnd:Q}){const P=V$(),T=typeof t=="string"?t:P,$=Qt(),_=D.useRef(null),A=n===io.Handle,E=Fe(D.useCallback(Y3(A&&y),[A,y]),vt),N=D.useRef(null),G=e??W3[n];D.useEffect(()=>{if(!(!_.current||!T))return N.current||(N.current=vX({domNode:_.current,nodeId:T,getStoreItems:()=>{const{nodeLookup:V,transform:Y,snapGrid:H,snapToGrid:X,nodeOrigin:W,domNode:R}=$.getState();return{nodeLookup:V,transform:Y,snapGrid:H,snapToGrid:X,nodeOrigin:W,paneDomNode:R}},onChange:(V,Y)=>{const{triggerNodeChanges:H,nodeLookup:X,parentLookup:W,nodeOrigin:R}=$.getState(),q=[],B={x:V.x,y:V.y},M=X.get(T);if(M&&M.expandParent&&M.parentId){const F=M.origin??R,z=V.width??M.measured.width??0,Z=V.height??M.measured.height??0,te={id:M.id,parentId:M.parentId,rect:{width:z,height:Z,...p$({x:V.x??M.position.x,y:V.y??M.position.y},{width:z,height:Z},M.parentId,X,F)}},re=_y([te],X,W,R);q.push(...re),B.x=V.x?Math.max(F[0]*z,V.x):void 0,B.y=V.y?Math.max(F[1]*Z,V.y):void 0}if(B.x!==void 0&&B.y!==void 0){const F={id:T,type:"position",position:{...B}};q.push(F)}if(V.width!==void 0&&V.height!==void 0){const z={id:T,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:V.width,height:V.height}};q.push(z)}for(const F of Y){const z={...F,type:"position"};q.push(z)}H(q)},onEnd:({width:V,height:Y})=>{const H={id:T,type:"dimensions",resizing:!1,dimensions:{width:V,height:Y}};$.getState().triggerNodeChanges([H])}})),N.current.update({controlPosition:G,boundaries:{minWidth:c,minHeight:f,maxWidth:h,maxHeight:O},keepAspectRatio:p,resizeDirection:m,onResizeStart:v,onResize:k,onResizeEnd:Q,shouldResize:b}),()=>{var V;(V=N.current)==null||V.destroy()}},[G,c,f,h,O,p,v,k,Q,b]);const ne=G.split("-");return S.jsx("div",{className:qt(["react-flow__resize-control","nodrag",...ne,n,i]),ref:_,style:{...r,scale:E,...a&&{[A?"backgroundColor":"borderColor"]:a}},children:l})}D.memo(U3);const NQ={running:"#4ae168",starting:"#e5c07b",stopped:"#5c6370",crashed:"#e06c75",completed:"#33afbc",killed:"#5c6370"},VQ={planner:{bg:"#4ae16820",color:"#4ae168"},backend:{bg:"#33afbc20",color:"#33afbc"},frontend:{bg:"#e5c07b20",color:"#e5c07b"},fullstack:{bg:"#4ae16820",color:"#4ae168"},testing:{bg:"#61afef20",color:"#61afef"},devops:{bg:"#d19a6620",color:"#d19a66"},docs:{bg:"#5c637020",color:"#8b929e"}};function G3({data:t}){var f;const e=NQ[t.status]||NQ.stopped,n=VQ[t.role]||VQ.docs,i=t.status==="running"||t.status==="starting",r=t.selected,l=Math.round((t.contextUsage||0)*100),a=t.tokensUsed>0?t.tokensUsed>999?`${(t.tokensUsed/1e3).toFixed(1)}k`:`${t.tokensUsed}`:"0",c=t.workingDir?t.workingDir.replace(/^\.\//,""):((f=t.scope)==null?void 0:f.length)>0?t.scope[0].replace(/\/\*\*$/,"").replace(/^src\//,""):t.role;return S.jsxs("div",{style:{background:"#282c34",border:r?"1px solid #33afbc":"1px solid #3e4451",borderRadius:10,width:210,padding:0,cursor:"pointer",fontFamily:"'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace",fontSize:10,overflow:"hidden"},children:[S.jsx(ro,{type:"target",position:we.Top,style:{background:"#282c34",border:"2px solid #3e4451",width:8,height:8,borderRadius:"50%",top:-4}}),S.jsxs("div",{style:{padding:"10px 12px 8px"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,marginBottom:6},children:[S.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:e,flexShrink:0,...i?{animation:"pulse 2s infinite"}:{}}}),S.jsx("span",{style:{color:"#e6e6e6",fontWeight:700,fontSize:12,flex:1},children:t.name})]}),S.jsx("div",{style:{marginBottom:10},children:S.jsx("span",{style:{fontSize:9,fontWeight:700,textTransform:"uppercase",letterSpacing:1,color:n.color,background:n.bg,padding:"3px 8px",borderRadius:4,display:"inline-block"},children:t.role})}),S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",color:"#5c6370",fontSize:10,marginBottom:4},children:[S.jsxs("span",{children:[a," tok"]}),S.jsxs("span",{children:[l,"% ctx"]})]}),S.jsx("div",{style:{color:"#3e4451",fontSize:9,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c})]}),i&&S.jsx(H3,{agentId:t.id,color:e}),S.jsx(ro,{type:"source",position:we.Bottom,style:{background:"#282c34",border:"2px solid #3e4451",width:8,height:8,borderRadius:"50%",bottom:-4}})]})}function H3({agentId:t,color:e}){const n=D.useRef(),i=Qe(r=>r.tokenTimeline);return D.useEffect(()=>{const r=n.current;if(!r)return;const l=window.devicePixelRatio||1,a=210,c=24;r.width=a*l,r.height=c*l;const f=r.getContext("2d");f.scale(l,l),f.clearRect(0,0,a,c);const h=i[t]||[];if(h.length<2){f.strokeStyle="#2c313a",f.lineWidth=.5,f.beginPath(),f.moveTo(0,c/2),f.lineTo(a,c/2),f.stroke();return}const O=h.slice(-40),p=O.map($=>$.v),m=Math.min(...p),b=Math.max(...p)-m||1,v=4,k=c-v*2,Q=a/(O.length-1);f.beginPath(),O.forEach(($,_)=>{const A=_*Q,E=v+k-($.v-m)/b*k;_===0?f.moveTo(A,E):f.lineTo(A,E)}),f.strokeStyle=e,f.lineWidth=1,f.stroke();const P=(O.length-1)*Q,T=v+k-(O[O.length-1].v-m)/b*k;f.beginPath(),f.arc(P,T,2,0,Math.PI*2),f.fillStyle=e,f.fill()},[i,t,e]),S.jsx("div",{style:{borderTop:"1px solid #2c313a",background:"#1e222a"},children:S.jsx("canvas",{ref:n,style:{display:"block",width:210,height:24}})})}const I3={agent:G3},Ca=4,dh=250,om=140;function F3(){const t=Qe(p=>p.agents),e=Qe(p=>p.detailPanel),n=Qe(p=>p.selectAgent),i=Qe(p=>p.clearSelection),{fitView:r}=oO(),l=(e==null?void 0:e.type)==="agent"?e.agentId:null,a=D.useRef(0),{nodes:c,edges:f}=D.useMemo(()=>{const p=t.filter(A=>A.status==="running"||A.status==="starting"),m=t.filter(A=>A.status!=="running"&&A.status!=="starting"),y=p.map((A,E)=>({id:A.id,type:"agent",position:{x:E%Ca*dh,y:80+Math.floor(E/Ca)*om},data:{...A,selected:A.id===l},draggable:!0})),v=80+(Math.ceil(p.length/Ca)||1)*om+50,k=m.map((A,E)=>({id:A.id,type:"agent",position:{x:E%Ca*dh,y:v+Math.floor(E/Ca)*om},data:{...A,selected:A.id===l},draggable:!0})),Q=[...y,...k],$={id:"groove-root",type:"default",position:{x:(Math.min(Math.max(p.length,m.length,1),Ca)*dh-dh)/2+25,y:0},data:{label:"GROOVE"},selectable:!1,draggable:!1,style:{background:"#282c34",color:"#e6e6e6",border:"1px solid #3e4451",borderRadius:24,fontWeight:600,fontSize:11,letterSpacing:6,padding:"10px 36px 9px",fontFamily:"'JetBrains Mono', 'SF Mono', Consolas, monospace"}},_=Q.map(A=>{const E=t.find(G=>G.id===A.id),N=(E==null?void 0:E.status)==="running";return{id:`groove-${A.id}`,source:"groove-root",target:A.id,type:"default",style:{stroke:N?"#5c6370":"#2c313a",strokeWidth:1},animated:N}});return{nodes:[$,...Q],edges:_}},[t,l]);D.useEffect(()=>{const p=t.length;p!==a.current&&setTimeout(()=>r({padding:.3,maxZoom:1.4,duration:200}),50),a.current=p},[t.length,r]),D.useEffect(()=>{setTimeout(()=>r({padding:.3,maxZoom:1.4,duration:0}),100)},[]);const h=D.useCallback((p,m)=>{m.id!=="groove-root"&&n(m.id)},[n]),O=D.useCallback(()=>{i()},[i]);return S.jsx(b3,{nodes:c,edges:f,nodeTypes:I3,onNodeClick:h,onPaneClick:O,proOptions:{hideAttribution:!0},nodesConnectable:!1,elementsSelectable:!0,minZoom:.3,maxZoom:2,fitView:!0,fitViewOptions:{padding:.3,maxZoom:1.4},children:S.jsx(T3,{color:"#3e4451",gap:20,size:1})})}function K3(){return S.jsx(u2,{children:S.jsx(F3,{})})}function J3({agent:t}){const[e,n]=D.useState(""),[i,r]=D.useState(null),l=D.useRef(),a=Qe(Q=>Q.activityLog),c=Qe(Q=>Q.instructAgent),f=Qe(Q=>Q.queryAgent),h=Qe(Q=>Q.showStatus),O=Qe(Q=>Q.chatHistory),p=a[t.id]||[],m=O[t.id]||[],y=i4(m,p),b=t.status==="running"||t.status==="starting";D.useEffect(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[y.length]);async function v(){const Q=e.trim();if(!Q||i)return;const P=Q.startsWith("?"),T=P?Q.slice(1).trim():Q;if(T)if(n(""),P&&b){r("querying...");try{await f(t.id,T)}catch{}r(null)}else{r(b?"sending...":"continuing...");try{await c(t.id,T)}catch($){h(`failed: ${$.message}`)}r(null)}}function k(Q){Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),Q.stopPropagation(),v())}return S.jsxs("div",{style:bt.container,children:[S.jsxs("div",{ref:l,style:bt.timeline,children:[y.length===0&&S.jsx("div",{style:bt.hint,children:b?"Type a message to instruct this agent. Prefix with ? to query without disrupting.":"Agent finished. Reply to continue the conversation."}),y.map((Q,P)=>S.jsxs("div",{style:bt.entry,children:[Q.from==="user"&&S.jsxs("div",{style:bt.userMsg,children:[S.jsx("span",{style:bt.userLabel,children:Q.isQuery?"? you":"> you"}),S.jsx("div",{style:bt.userText,children:Q.text})]}),Q.from==="agent"&&S.jsxs("div",{style:bt.agentMsg,children:[S.jsx("span",{style:bt.agentLabel,children:t.name}),S.jsx("div",{style:bt.agentText,children:P===y.length-1&&Q.from==="agent"&&Date.now()-Q.timestamp<5e3?S.jsx(e4,{text:Q.text}):S.jsx(O2,{text:Q.text})})]}),Q.from==="system"&&S.jsx("div",{style:bt.systemMsg,children:Q.text}),S.jsx("span",{style:bt.time,children:new Date(Q.timestamp).toLocaleTimeString()})]},P)),i&&S.jsx("div",{style:bt.statusMsg,children:i})]}),t.role==="planner"&&t.status==="completed"&&S.jsx(t4,{showStatus:h}),S.jsxs("div",{style:bt.inputRow,children:[S.jsx("input",{style:bt.input,value:e,onChange:Q=>n(Q.target.value),onKeyDown:k,placeholder:b?"message or ?query...":"reply to continue...",disabled:!!i,spellCheck:!1}),S.jsx("button",{type:"button",onClick:v,disabled:!!i||!e.trim(),style:{...bt.sendBtn,opacity:i||!e.trim()?.3:1},children:"Send"})]})]})}function e4({text:t}){const[e,n]=D.useState(0),i=D.useRef(t);D.useEffect(()=>{i.current=t,n(0)},[t]),D.useEffect(()=>{if(e>=t.length)return;const a=Math.random()>.7?4:2,c=setTimeout(()=>{n(f=>Math.min(f+a,t.length))},12);return()=>clearTimeout(c)},[e,t.length]);const r=t.slice(0,e),l=e>=t.length;return S.jsxs(S.Fragment,{children:[S.jsx(O2,{text:r}),!l&&S.jsx("span",{style:bt.cursor,children:"|"})]})}function t4({showStatus:t}){const[e,n]=D.useState(null),[i,r]=D.useState(!1),[l,a]=D.useState(!1);D.useEffect(()=>{fetch("/api/recommended-team").then(f=>f.json()).then(f=>{f.exists&&f.agents.length>0&&n(f.agents)}).catch(()=>{})},[]);async function c(){r(!0);try{const h=await(await fetch("/api/recommended-team/launch",{method:"POST"})).json();h.launched?(t(`Launched ${h.launched} agents`),a(!0)):t(`Launch failed: ${h.error||"unknown"}`)}catch(f){t(`Launch failed: ${f.message}`)}r(!1)}return!e||l?null:S.jsxs("div",{style:bt.launchBox,children:[S.jsxs("div",{style:bt.launchHeader,children:["Recommended Team (",e.length," agents)"]}),S.jsx("div",{style:bt.launchList,children:e.map((f,h)=>S.jsxs("div",{style:bt.launchAgent,children:[S.jsx("span",{style:bt.launchRole,children:f.role}),S.jsxs("span",{style:bt.launchPrompt,children:[(f.prompt||"").slice(0,80),(f.prompt||"").length>80?"...":""]})]},h))}),S.jsx("button",{type:"button",onClick:c,disabled:i,style:{...bt.launchBtn,opacity:i?.5:1},children:i?"Launching...":"Launch Team"})]})}function O2({text:t}){return t?t.split(`
|
|
72
|
+
`).map((n,i)=>{if(/^#{1,3}\s/.test(n)){const r=n.replace(/^#{1,3}\s+/,"");return S.jsx("div",{style:{fontWeight:700,color:"var(--text-bright)",marginTop:i>0?6:0,marginBottom:2,fontSize:11},children:Oh(r)},i)}if(/^[-*_]{3,}\s*$/.test(n))return S.jsx("div",{style:{borderTop:"1px solid var(--border)",margin:"4px 0"}},i);if(/^\s*[-*]\s/.test(n)){const r=n.match(/^(\s*)/)[1].length,l=n.replace(/^\s*[-*]\s+/,"");return S.jsxs("div",{style:{paddingLeft:8+r*6,position:"relative"},children:[S.jsx("span",{style:{position:"absolute",left:r*6,color:"var(--text-dim)"},children:"-"}),Oh(l)]},i)}if(/^\s*\d+\.\s/.test(n)){const r=n.match(/^(\s*)/)[1].length,l=n.match(/(\d+)\./)[1],a=n.replace(/^\s*\d+\.\s+/,"");return S.jsxs("div",{style:{paddingLeft:12+r*6,position:"relative"},children:[S.jsxs("span",{style:{position:"absolute",left:r*6,color:"var(--text-dim)"},children:[l,"."]}),Oh(a)]},i)}return n.trim()?S.jsx("div",{children:Oh(n)},i):S.jsx("div",{style:{height:4}},i)}):null}function Oh(t){const e=[];let n=t,i=0;for(;n.length>0;){const r=n.match(/^(.*?)\*\*(.+?)\*\*(.*)/s);if(r){r[1]&&e.push(S.jsx("span",{children:r[1]},i++)),e.push(S.jsx("span",{style:{fontWeight:700,color:"var(--text-bright)"},children:r[2]},i++)),n=r[3];continue}const l=n.match(/^(.*?)`(.+?)`(.*)/s);if(l){l[1]&&e.push(S.jsx("span",{children:l[1]},i++)),e.push(S.jsx("span",{style:{background:"var(--bg-base)",padding:"0 3px",borderRadius:2,color:"var(--accent)",fontSize:"0.95em"},children:l[2]},i++)),n=l[3];continue}e.push(S.jsx("span",{children:n},i++));break}return e.length>0?e:t}function n4(t){if(!t)return"";try{const e=JSON.parse(t);return Array.isArray(e)?e.map(n=>n.type==="text"&&n.text?n.text:(n.type==="thinking"&&n.thinking||n.type==="tool_use",null)).filter(Boolean).join(`
|
|
73
|
+
`)||null:e.type==="text"&&e.text?e.text:e.type==="result"&&e.result?e.result:null}catch{return t.length>5?t:null}}function i4(t,e){const n=[];for(const i of t)n.push({timestamp:i.timestamp,from:i.from,text:i.text,isQuery:i.isQuery});for(const i of e.slice(-30)){const r=n4(i.text);if(!r||r.trimStart().startsWith("[")||r.trimStart().startsWith("{"))continue;n.some(a=>Math.abs(a.timestamp-i.timestamp)<2e3&&a.from==="agent")||n.push({timestamp:i.timestamp,from:"agent",text:r.slice(0,2e3)})}return n.sort((i,r)=>i.timestamp-r.timestamp),n}const bt={container:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},timeline:{flex:1,overflowY:"auto",padding:"10px 0"},hint:{color:"var(--text-dim)",fontSize:11,padding:"20px 4px",textAlign:"center",lineHeight:1.6},entry:{padding:"4px 0",position:"relative"},userMsg:{display:"flex",flexDirection:"column",gap:2},userLabel:{fontSize:10,fontWeight:600,color:"var(--accent)",textTransform:"uppercase",letterSpacing:.5},userText:{fontSize:12,color:"var(--text-bright)",lineHeight:1.5,padding:"4px 8px",background:"var(--bg-surface)",borderRadius:2,border:"1px solid var(--border)",whiteSpace:"pre-wrap",wordBreak:"break-word"},agentMsg:{display:"flex",flexDirection:"column",gap:2},agentLabel:{fontSize:10,fontWeight:600,color:"var(--green)",textTransform:"uppercase",letterSpacing:.5},agentText:{fontSize:12,color:"var(--text-primary)",lineHeight:1.5,padding:"4px 8px",background:"var(--bg-base)",borderRadius:2,whiteSpace:"pre-wrap",wordBreak:"break-word"},systemMsg:{fontSize:10,color:"var(--text-dim)",fontStyle:"italic",padding:"2px 0"},time:{position:"absolute",top:4,right:0,fontSize:9,color:"var(--text-muted)"},statusMsg:{fontSize:11,color:"var(--text-dim)",fontStyle:"italic",padding:"6px 0"},inputRow:{display:"flex",gap:6,padding:"8px 0 0",borderTop:"1px solid var(--border)"},input:{flex:1,background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:"8px 10px",color:"var(--text-primary)",fontSize:12,fontFamily:"var(--font)",outline:"none"},sendBtn:{padding:"8px 14px",background:"transparent",border:"1px solid var(--accent)",borderRadius:2,color:"var(--accent)",fontSize:11,fontWeight:600,fontFamily:"var(--font)",cursor:"pointer"},cursor:{color:"var(--accent)",fontWeight:400,animation:"pulse 1s infinite",marginLeft:1},launchBox:{padding:"8px 0",borderTop:"1px solid var(--border)",flexShrink:0},launchHeader:{fontSize:10,fontWeight:700,color:"var(--text-bright)",marginBottom:6},launchList:{display:"flex",flexDirection:"column",gap:3,marginBottom:8},launchAgent:{display:"flex",alignItems:"baseline",gap:6,fontSize:10,padding:"2px 0"},launchRole:{fontWeight:600,color:"var(--accent)",minWidth:60},launchPrompt:{color:"var(--text-dim)",fontSize:9,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},launchBtn:{width:"100%",padding:"8px",background:"rgba(51, 175, 188, 0.1)",border:"1px solid var(--accent)",color:"var(--accent)",fontSize:11,fontWeight:700,fontFamily:"var(--font)",cursor:"pointer",letterSpacing:.5}};function r4({agent:t}){var f;const e=Qe(h=>h.activityLog),n=Qe(h=>h.tokenTimeline),i=e[t.id]||[],r=n[t.id]||[],l=Math.round((t.contextUsage||0)*100),a=t.spawnedAt?a4(Date.now()-new Date(t.spawnedAt).getTime()):"-",c=t.spawnedAt&&t.tokensUsed>0?Math.round(t.tokensUsed/((Date.now()-new Date(t.spawnedAt).getTime())/6e4)):0;return S.jsxs("div",{style:Xt.container,children:[S.jsxs("div",{style:Xt.metricsGrid,children:[S.jsx(ph,{label:"Tokens",value:((f=t.tokensUsed)==null?void 0:f.toLocaleString())||"0"}),S.jsx(ph,{label:"Burn Rate",value:`${c}/min`}),S.jsx(ph,{label:"Uptime",value:a}),S.jsx(ph,{label:"Activity",value:`${i.length} events`})]}),S.jsxs("div",{style:{marginTop:16},children:[S.jsx("div",{style:Xt.sectionLabel,children:"TOKEN HEARTBEAT"}),S.jsx(s4,{data:r,isAlive:t.status==="running"})]}),S.jsxs("div",{style:{marginTop:16},children:[S.jsx("div",{style:Xt.sectionLabel,children:"CONTEXT USAGE"}),S.jsxs("div",{style:Xt.gaugeRow,children:[S.jsx("div",{style:Xt.gaugeTrack,children:S.jsx("div",{style:{height:"100%",width:`${l}%`,borderRadius:1,background:l>80?"var(--red)":l>60?"var(--amber)":"var(--green)",transition:"width 0.3s"}})}),S.jsxs("span",{style:Xt.gaugeLabel,children:[l,"%"]})]})]}),S.jsxs("div",{style:{marginTop:16},children:[S.jsx("div",{style:Xt.sectionLabel,children:"ACTIVITY PULSE"}),S.jsx(l4,{activity:i})]}),S.jsxs("div",{style:{marginTop:16},children:[S.jsx("div",{style:Xt.sectionLabel,children:"DETAILS"}),S.jsxs("div",{style:Xt.infoList,children:[S.jsx(ys,{label:"ID",value:t.id}),S.jsx(ys,{label:"Role",value:t.role}),S.jsx(ys,{label:"Provider",value:t.provider}),S.jsx(ys,{label:"Model",value:t.model||"default"}),t.workingDir&&S.jsx(ys,{label:"Directory",value:t.workingDir}),S.jsx(ys,{label:"Scope",value:(t.scope||[]).join(", ")||"unrestricted"}),S.jsx(ys,{label:"Spawned",value:t.spawnedAt?new Date(t.spawnedAt).toLocaleTimeString():"-"}),S.jsx(ys,{label:"Last Active",value:t.lastActivity?new Date(t.lastActivity).toLocaleTimeString():"-"})]})]}),t.prompt&&S.jsxs("div",{style:{marginTop:16},children:[S.jsx("div",{style:Xt.sectionLabel,children:"ORIGINAL PROMPT"}),S.jsx("div",{style:Xt.promptBox,children:t.prompt})]}),S.jsxs("div",{style:{marginTop:16},children:[S.jsxs("div",{style:Xt.sectionLabel,children:["RECENT LOG (",i.length,")"]}),S.jsxs("div",{style:Xt.logScroll,children:[i.length===0&&S.jsx("div",{style:{color:"var(--text-dim)",fontSize:11,padding:8},children:"No activity yet..."}),i.slice(-30).reverse().map((h,O)=>{var p;return S.jsxs("div",{style:Xt.logEntry,children:[S.jsx("span",{style:Xt.logTime,children:new Date(h.timestamp).toLocaleTimeString()}),S.jsx("span",{style:Xt.logText,children:(p=h.text)==null?void 0:p.slice(0,200)})]},O)})]})]})]})}function s4({data:t,isAlive:e}){const n=D.useRef();return D.useEffect(()=>{const i=n.current;if(!i)return;const r=i.getContext("2d"),l=i.width,a=i.height;r.clearRect(0,0,l,a),r.strokeStyle="#3e4451",r.lineWidth=.5;for(let y=0;y<a;y+=a/4)r.beginPath(),r.moveTo(0,y),r.lineTo(l,y),r.stroke();if(t.length<2){r.strokeStyle=e?"#5c6370":"#3e4451",r.lineWidth=1,r.beginPath(),r.moveTo(0,a/2),r.lineTo(l,a/2),r.stroke(),e&&(r.fillStyle="#5c6370",r.font="10px monospace",r.fillText("waiting for data...",8,a/2-6));return}const c=t.map(y=>y.v),f=Math.min(...c),h=Math.max(...c),O=h-f||1,p=[];for(let y=1;y<c.length;y++){const b=c[y]-c[y-1];b>O*.2&&b>0&&p.push(y)}const m=r.createLinearGradient(0,0,0,a);m.addColorStop(0,e?"rgba(51, 175, 188, 0.15)":"rgba(92, 99, 112, 0.1)"),m.addColorStop(1,"transparent"),r.beginPath(),r.moveTo(0,a);for(let y=0;y<t.length;y++){const b=y/(t.length-1)*l,v=a-4-(c[y]-f)/O*(a-8);r.lineTo(b,v)}r.lineTo(l,a),r.closePath(),r.fillStyle=m,r.fill(),r.strokeStyle=e?"#33afbc":"#5c6370",r.lineWidth=1.5,r.beginPath();for(let y=0;y<t.length;y++){const b=y/(t.length-1)*l,v=a-4-(c[y]-f)/O*(a-8);y===0?r.moveTo(b,v):r.lineTo(b,v)}r.stroke();for(const y of p){const b=y/(t.length-1)*l,v=a-4-(c[y]-f)/O*(a-8);r.fillStyle="#e5c07b",r.beginPath(),r.arc(b,v,3,0,Math.PI*2),r.fill()}if(e&&t.length>0){const y=l,b=a-4-(c[c.length-1]-f)/O*(a-8);r.fillStyle="#33afbc",r.beginPath(),r.arc(y-2,b,3,0,Math.PI*2),r.fill()}r.fillStyle="#5c6370",r.font="9px monospace",r.fillText(h.toLocaleString(),4,10),r.fillText(f.toLocaleString(),4,a-2)},[t,e]),S.jsx("div",{style:Xt.chartContainer,children:S.jsx("canvas",{ref:n,width:400,height:60,style:{width:"100%",height:60,display:"block"}})})}function l4({activity:t}){const n=Date.now(),i=300*1e3,r=i/40,l=new Array(40).fill(0);for(const f of t){const h=n-f.timestamp;if(h>i)continue;const O=Math.min(Math.floor((i-h)/r),39);l[O]++}const a=Math.max(...l,1),c=l.map((f,h)=>{const O=h/39*300,p=28-f/a*24;return`${O},${p}`}).join(" ");return S.jsx("div",{style:Xt.chartContainer,children:S.jsxs("svg",{width:"100%",height:"32",viewBox:"0 0 300 32",preserveAspectRatio:"none",style:{display:"block"},children:[S.jsx("polyline",{points:c,fill:"none",stroke:"var(--green)",strokeWidth:"1",opacity:"0.6"}),S.jsx("line",{x1:"0",y1:"31",x2:"300",y2:"31",stroke:"var(--text-muted)",strokeWidth:"0.5"})]})})}function ph({label:t,value:e}){return S.jsxs("div",{style:Xt.metric,children:[S.jsx("div",{style:{fontSize:14,fontWeight:700,color:"var(--text-bright)"},children:e}),S.jsx("div",{style:{fontSize:10,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1},children:t})]})}function ys({label:t,value:e}){return S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"3px 0"},children:[S.jsx("span",{style:{color:"var(--text-dim)",fontSize:11},children:t}),S.jsx("span",{style:{color:"var(--text-primary)",fontSize:11,maxWidth:"65%",textAlign:"right",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})]})}function a4(t){const e=Math.floor(t/1e3),n=Math.floor(e/60),i=Math.floor(n/60);return i>0?`${i}h ${n%60}m`:n>0?`${n}m ${e%60}s`:`${e}s`}const Xt={container:{flex:1,overflowY:"auto",padding:"10px 0"},metricsGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},metric:{background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:10,textAlign:"center"},sectionLabel:{fontSize:11,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1.5,marginBottom:6,fontWeight:600},gaugeRow:{display:"flex",alignItems:"center",gap:8},gaugeTrack:{flex:1,height:4,background:"var(--text-muted)",borderRadius:2,overflow:"hidden"},gaugeLabel:{fontSize:12,color:"var(--text-primary)",fontWeight:600,minWidth:36,textAlign:"right"},chartContainer:{background:"var(--bg-base)",border:"1px solid var(--border)",borderRadius:2,padding:"6px 8px",overflow:"hidden"},infoList:{borderTop:"1px solid var(--border)",paddingTop:6},promptBox:{background:"var(--bg-base)",border:"1px solid var(--border)",borderRadius:2,padding:8,fontSize:12,color:"var(--text-primary)",lineHeight:1.5,whiteSpace:"pre-wrap"},logScroll:{maxHeight:160,overflowY:"auto",background:"var(--bg-base)",borderRadius:2,border:"1px solid var(--border)"},logEntry:{padding:"3px 8px",borderBottom:"1px solid var(--bg-surface)",fontSize:10,display:"flex",gap:6},logTime:{color:"var(--text-dim)",whiteSpace:"nowrap"},logText:{color:"var(--text-primary)",wordBreak:"break-word"}};function o4({agent:t}){const e=Qe(M=>M.killAgent),n=Qe(M=>M.rotateAgent),i=Qe(M=>M.spawnAgent),r=Qe(M=>M.instructAgent),l=Qe(M=>M.showStatus),a=Qe(M=>M.closeDetail),[c,f]=D.useState(!1),[h,O]=D.useState(!1),[p,m]=D.useState(""),[y,b]=D.useState(!1),[v,k]=D.useState(t.model||""),[Q,P]=D.useState([]),[T,$]=D.useState([]),[_,A]=D.useState(!1),E=t.status==="running"||t.status==="starting";D.useEffect(()=>{fetch("/api/providers").then(M=>M.json()).then(P).catch(()=>{}),fetch("/api/skills/installed").then(M=>M.json()).then($).catch(()=>{})},[]);const N=Q.find(M=>M.id===t.provider),G=(N==null?void 0:N.models)||[];async function ne(){try{await n(t.id)}catch(M){l(`rotate failed: ${M.message}`)}}async function V(){if(!c){f(!0),setTimeout(()=>f(!1),3e3);return}try{await e(t.id),l(`${t.name} killed`)}catch(M){l(`kill failed: ${M.message}`)}f(!1)}async function Y(){if(!h){O(!0),setTimeout(()=>O(!1),3e3);return}try{await e(t.id,!0),a(),l(`${t.name} deleted`)}catch(M){l(`delete failed: ${M.message}`)}O(!1)}async function H(M){try{await fetch(`/api/agents/${t.id}/skills/${M}`,{method:"POST"}),l(`skill attached to ${t.name}`)}catch(F){l(`attach failed: ${F.message}`)}}async function X(M){try{await fetch(`/api/agents/${t.id}/skills/${M}`,{method:"DELETE"}),l(`skill detached from ${t.name}`)}catch(F){l(`detach failed: ${F.message}`)}}async function W(){try{const M=await i({role:t.role,scope:t.scope,prompt:t.prompt,provider:t.provider,model:t.model,skills:t.skills});l(`cloned as ${M.name}`)}catch(M){l(`clone failed: ${M.message}`)}}async function R(M){k(M);try{await fetch(`/api/agents/${t.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:M||null})}),l(`model set to ${M||"default"} (takes effect on next rotation)`)}catch(F){l(`model change failed: ${F.message}`)}}async function q(){if(p.trim())try{await r(t.id,p.trim()),b(!1),m("")}catch(M){l(`prompt update failed: ${M.message}`)}}async function B(){try{await e(t.id,!0);const M=await i({role:t.role,scope:t.scope,prompt:t.prompt,provider:t.provider,model:t.model,skills:t.skills});l(`restarted as ${M.name}`)}catch(M){l(`restart failed: ${M.message}`)}}return S.jsxs("div",{style:it.container,children:[S.jsx("div",{style:it.sectionLabel,children:"LIFECYCLE"}),S.jsxs("div",{style:it.btnGrid,children:[E&&S.jsxs(S.Fragment,{children:[S.jsx(mc,{icon:"~",label:"Rotate",desc:"Fresh context + handoff brief",onClick:ne,color:"var(--accent)"}),S.jsx(mc,{icon:"||",label:c?"Confirm Kill":"Stop",desc:"Stop the agent process",onClick:V,color:c?"var(--red)":"var(--amber)"})]}),!E&&S.jsx(mc,{icon:">",label:"Restart",desc:"Spawn fresh with same config",onClick:B,color:"var(--green)"}),S.jsx(mc,{icon:"+",label:"Clone",desc:"Spawn duplicate agent",onClick:W,color:"var(--accent)"}),S.jsx(mc,{icon:"x",label:h?"Confirm Delete":"Delete",desc:"Kill and remove permanently",onClick:Y,color:h?"var(--red)":"var(--text-dim)"})]}),S.jsxs("div",{style:{...it.sectionLabel,marginTop:20},children:["MODEL ",t.routingMode==="auto"&&S.jsx("span",{style:{color:"var(--accent)",fontWeight:400,textTransform:"none"},children:" — auto-routed"})]}),S.jsxs("select",{style:it.select,value:v,onChange:M=>R(M.target.value),children:[S.jsx("option",{value:"",children:"Default"}),G.map(M=>S.jsxs("option",{value:M.id,children:[M.name," (",M.tier,")"]},M.id))]}),S.jsx("div",{style:it.fieldHint,children:"Changes take effect on next rotation"}),S.jsx("div",{style:{...it.sectionLabel,marginTop:20},children:"PROMPT"}),t.prompt&&!y&&S.jsxs("div",{style:it.currentPrompt,children:[S.jsx("div",{style:it.promptText,children:t.prompt}),E&&S.jsx("button",{onClick:()=>{b(!0),m("")},style:it.editBtn,children:"Send New Instruction"})]}),!t.prompt&&!y&&S.jsx("div",{style:it.noPrompt,children:"No prompt set"}),y&&S.jsxs("div",{children:[S.jsx("textarea",{style:it.textarea,value:p,onChange:M=>m(M.target.value),placeholder:"New instruction for this agent...",rows:4,autoFocus:!0}),S.jsxs("div",{style:{display:"flex",gap:6,marginTop:6},children:[S.jsx("button",{onClick:q,style:it.saveBtn,disabled:!p.trim(),children:"Send (rotates agent)"}),S.jsx("button",{onClick:()=>b(!1),style:it.cancelBtn,children:"Cancel"})]})]}),S.jsxs("div",{style:{...it.sectionLabel,marginTop:20},children:["SKILLS (",(t.skills||[]).length,")"]}),(t.skills||[]).length>0?S.jsx("div",{style:it.skillsList,children:(t.skills||[]).map(M=>{const F=T.find(z=>z.id===M);return S.jsxs("div",{style:it.skillRow,children:[S.jsx("span",{style:it.skillRowIcon,children:(F==null?void 0:F.icon)||M.charAt(0).toUpperCase()}),S.jsxs("div",{style:{flex:1,minWidth:0},children:[S.jsx("div",{style:{fontSize:11,color:"var(--text-primary)",fontWeight:500},children:(F==null?void 0:F.name)||M}),S.jsx("div",{style:{fontSize:9,color:"var(--text-muted)"},children:(F==null?void 0:F.author)||"unknown"})]}),S.jsx("button",{onClick:()=>X(M),style:it.detachBtn,title:"Detach skill",children:"✕"})]},M)})}):S.jsx("div",{style:it.noPrompt,children:"No skills attached"}),!_&&T.length>0&&S.jsx("button",{onClick:()=>A(!0),style:{...it.editBtn,marginTop:6},children:"+ Attach Skill"}),_&&S.jsxs("div",{style:it.skillPicker,children:[T.filter(M=>!(t.skills||[]).includes(M.id)).map(M=>S.jsxs("button",{onClick:()=>{H(M.id),A(!1)},style:it.skillPickerItem,children:[S.jsx("span",{style:it.skillRowIcon,children:M.icon||M.name.charAt(0)}),S.jsxs("div",{style:{flex:1},children:[S.jsx("div",{style:{fontSize:11,color:"var(--text-primary)"},children:M.name}),S.jsx("div",{style:{fontSize:9,color:"var(--text-muted)"},children:M.author})]})]},M.id)),T.filter(M=>!(t.skills||[]).includes(M.id)).length===0&&S.jsx("div",{style:{fontSize:10,color:"var(--text-dim)",padding:8},children:"All installed skills are already attached"}),S.jsx("button",{onClick:()=>A(!1),style:it.cancelBtn,children:"cancel"})]}),S.jsx("div",{style:{...it.sectionLabel,marginTop:20},children:"CONFIGURATION"}),S.jsx(Aa,{label:"ID",value:t.id}),S.jsx(Aa,{label:"Role",value:t.role}),S.jsx(Aa,{label:"Provider",value:t.provider}),S.jsx(Aa,{label:"Model",value:t.routingMode==="auto"?`auto (${t.model||"pending"})`:t.model||"default"}),S.jsx(Aa,{label:"Scope",value:(t.scope||[]).join(", ")||"unrestricted"}),S.jsx(Aa,{label:"Status",value:t.status})]})}function mc({icon:t,label:e,desc:n,onClick:i,color:r}){return S.jsxs("button",{onClick:i,style:{...it.actionBtn,borderColor:r},children:[S.jsx("span",{style:{...it.actionIcon,color:r},children:t}),S.jsxs("div",{children:[S.jsx("div",{style:it.actionTitle,children:e}),S.jsx("div",{style:it.actionDesc,children:n})]})]})}function Aa({label:t,value:e}){return S.jsxs("div",{style:it.configRow,children:[S.jsx("span",{style:{color:"var(--text-dim)",fontSize:11,minWidth:60},children:t}),S.jsx("span",{style:{color:"var(--text-primary)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})]})}const it={container:{flex:1,overflowY:"auto",padding:"10px 0"},sectionLabel:{fontSize:11,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1.5,marginBottom:8,fontWeight:600},btnGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:4},actionBtn:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,cursor:"pointer",textAlign:"left",fontFamily:"var(--font)"},actionIcon:{fontSize:14,fontWeight:700,width:18,textAlign:"center",flexShrink:0},actionTitle:{fontSize:11,color:"var(--text-primary)",fontWeight:600},actionDesc:{fontSize:9,color:"var(--text-dim)",marginTop:1},select:{width:"100%",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:"6px 8px",color:"var(--text-primary)",fontSize:12,fontFamily:"var(--font)",outline:"none"},fieldHint:{fontSize:10,color:"var(--text-muted)",marginTop:4},currentPrompt:{},promptText:{background:"var(--bg-base)",border:"1px solid var(--border)",borderRadius:2,padding:8,fontSize:12,color:"var(--text-primary)",lineHeight:1.5,whiteSpace:"pre-wrap",maxHeight:100,overflowY:"auto"},noPrompt:{fontSize:12,color:"var(--text-dim)",fontStyle:"italic"},editBtn:{marginTop:6,padding:"4px 10px",background:"transparent",border:"1px solid var(--accent)",borderRadius:2,color:"var(--accent)",fontSize:11,fontWeight:600,fontFamily:"var(--font)",cursor:"pointer"},textarea:{width:"100%",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:"6px 8px",color:"var(--text-primary)",fontSize:12,fontFamily:"var(--font)",outline:"none",resize:"vertical"},saveBtn:{flex:1,padding:"6px",background:"transparent",border:"1px solid var(--accent)",borderRadius:2,color:"var(--accent)",fontSize:11,fontWeight:600,fontFamily:"var(--font)",cursor:"pointer"},cancelBtn:{padding:"6px 12px",background:"transparent",border:"1px solid var(--border)",borderRadius:2,color:"var(--text-dim)",fontSize:11,fontFamily:"var(--font)",cursor:"pointer"},configRow:{display:"flex",gap:8,padding:"3px 0",borderBottom:"1px solid var(--bg-surface)"},skillsList:{display:"flex",flexDirection:"column",gap:3},skillRow:{display:"flex",alignItems:"center",gap:8,padding:"5px 8px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2},skillRowIcon:{width:20,height:20,borderRadius:4,background:"var(--accent)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,fontWeight:700,color:"var(--bg-base)",flexShrink:0},detachBtn:{background:"none",border:"none",color:"var(--text-muted)",fontSize:11,cursor:"pointer",fontFamily:"var(--font)",padding:"2px 4px",flexShrink:0},skillPicker:{marginTop:6,padding:6,background:"var(--bg-base)",border:"1px solid var(--border)",borderRadius:2,display:"flex",flexDirection:"column",gap:2,maxHeight:180,overflowY:"auto"},skillPickerItem:{display:"flex",alignItems:"center",gap:8,padding:"5px 8px",width:"100%",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,cursor:"pointer",textAlign:"left",fontFamily:"var(--font)",transition:"border-color 0.1s"}},c4=[{id:"chat",label:"Chat"},{id:"stats",label:"Stats"},{id:"actions",label:"Actions"}],u4={running:"var(--green)",starting:"var(--amber)",stopped:"var(--text-dim)",crashed:"var(--red)",completed:"var(--accent)",killed:"var(--text-dim)"};function f4(){const[t,e]=D.useState("chat"),n=Qe(c=>c.detailPanel),r=Qe(c=>c.agents).find(c=>c.id===(n==null?void 0:n.agentId));if(!r)return S.jsx("div",{style:xs.empty,children:"Agent not found"});const l=u4[r.status]||"var(--text-dim)",a=r.status==="running"||r.status==="starting";return S.jsxs("div",{style:xs.container,children:[S.jsxs("div",{style:xs.agentHeader,children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[S.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:l,animation:a?"pulse 2s infinite":"none"}}),S.jsx("span",{style:xs.agentName,children:r.name}),S.jsx("span",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:.5,color:l,padding:"1px 6px",borderRadius:2,background:`color-mix(in srgb, ${l} 12%, transparent)`},children:r.status})]}),S.jsxs("span",{style:xs.agentMeta,children:[r.role," / ",r.provider]})]}),S.jsx("div",{style:xs.tabBar,children:c4.map(c=>S.jsx("button",{onClick:()=>e(c.id),style:{...xs.tab,color:t===c.id?"var(--text-bright)":"var(--text-dim)",borderBottom:t===c.id?"2px solid var(--accent)":"2px solid transparent"},children:c.label},c.id))}),S.jsxs("div",{style:xs.tabContent,children:[t==="chat"&&S.jsx(J3,{agent:r}),t==="stats"&&S.jsx(r4,{agent:r}),t==="actions"&&S.jsx(o4,{agent:r})]})]})}const xs={container:{display:"flex",flexDirection:"column",height:"100%"},agentHeader:{padding:"12px 0 8px",display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid var(--border)"},agentName:{fontSize:14,fontWeight:600,color:"var(--text-bright)"},agentMeta:{fontSize:11,color:"var(--text-dim)"},tabBar:{display:"flex",gap:0,borderBottom:"1px solid var(--border)"},tab:{padding:"8px 16px",background:"transparent",border:"none",borderBottom:"2px solid transparent",fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:1,fontFamily:"var(--font)",cursor:"pointer"},tabContent:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},empty:{color:"var(--text-dim)",fontSize:12,padding:16}};function h4(){const t=Qe(n=>n.openDetail),e=Qe(n=>n.connected);return S.jsx("div",{style:Si.container,children:S.jsx("div",{style:Si.inner,children:e?S.jsxs(S.Fragment,{children:[S.jsx("div",{style:Si.readyIcon,children:S.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[S.jsx("circle",{cx:"20",cy:"20",r:"18",fill:"none",stroke:"#2c313a",strokeWidth:"1"}),S.jsx("circle",{cx:"20",cy:"20",r:"18",fill:"none",stroke:"#33afbc",strokeWidth:"1",strokeDasharray:"113",strokeDashoffset:"28",strokeLinecap:"round",children:S.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 20 20",to:"360 20 20",dur:"3s",repeatCount:"indefinite"})}),S.jsx("text",{x:"20",y:"24",textAnchor:"middle",fill:"#33afbc",fontSize:"14",fontWeight:"700",fontFamily:"JetBrains Mono, monospace",children:"+"})]})}),S.jsx("div",{style:Si.title,children:"Ready to orchestrate"}),S.jsx("div",{style:Si.hint,children:"Spawn your first agent to start building"}),S.jsx("button",{onClick:()=>t({type:"spawn"}),style:Si.spawnBtn,children:"Spawn Agent"})]}):S.jsxs(S.Fragment,{children:[S.jsx("div",{style:Si.pulseRing,children:S.jsx("div",{style:Si.pulseCore})}),S.jsx("div",{style:Si.title,children:"Connecting to daemon..."}),S.jsx("div",{style:Si.hint,children:"Make sure the GROOVE daemon is running"}),S.jsx("code",{style:Si.code,children:"groove start"})]})})})}const Si={container:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",background:"#1a1e25"},inner:{display:"flex",flexDirection:"column",alignItems:"center",gap:12,padding:40},pulseRing:{width:40,height:40,borderRadius:"50%",border:"1px solid #33afbc",display:"flex",alignItems:"center",justifyContent:"center",animation:"pulse 2s infinite"},pulseCore:{width:8,height:8,borderRadius:"50%",background:"#33afbc",boxShadow:"0 0 12px rgba(51, 175, 188, 0.5)"},readyIcon:{marginBottom:4},title:{fontSize:14,color:"#e6e6e6",fontWeight:600,letterSpacing:.5},hint:{fontSize:12,color:"#6b7280",textAlign:"center",lineHeight:1.6,maxWidth:360},spawnBtn:{padding:"8px 24px",background:"rgba(51, 175, 188, 0.1)",border:"1px solid #33afbc",color:"#33afbc",fontSize:12,fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:"pointer",marginTop:4,transition:"background 0.2s"},code:{background:"#252a33",padding:"8px 16px",fontSize:11,color:"#33afbc",border:"1px solid #2c313a"}};function d4({onSelect:t,onClose:e,initial:n}){const[i,r]=D.useState(n||""),[l,a]=D.useState([]),[c,f]=D.useState(null),[h,O]=D.useState(0),[p,m]=D.useState(!0),[y,b]=D.useState(""),[v,k]=D.useState(null),Q=D.useRef(null);D.useEffect(()=>{P(i)},[i]),D.useEffect(()=>{Q.current&&(Q.current.scrollTop=0)},[l]);async function P($){m(!0),b("");try{const _=await fetch(`/api/browse?path=${encodeURIComponent($)}`);if(!_.ok){const E=await _.json().catch(()=>({}));b(E.error||"Failed to browse"),a([]);return}const A=await _.json();a(A.dirs),f(A.parent),O(A.fileCount||0)}catch{b("Failed to connect")}finally{m(!1)}}const T=i?[{label:"root",path:""},...i.split("/").map(($,_,A)=>({label:$,path:A.slice(0,_+1).join("/")}))]:[{label:"root",path:""}];return S.jsx("div",{style:We.overlay,onClick:e,children:S.jsxs("div",{style:We.modal,onClick:$=>$.stopPropagation(),children:[S.jsxs("div",{style:We.header,children:[S.jsxs("div",{children:[S.jsx("div",{style:We.title,children:"SELECT DIRECTORY"}),S.jsx("div",{style:We.subtitle,children:"Choose where this agent will work"})]}),S.jsx("button",{onClick:e,style:We.closeBtn,children:"x"})]}),S.jsxs("div",{style:We.breadcrumb,children:[T.map(($,_)=>S.jsxs("span",{children:[_>0&&S.jsx("span",{style:We.breadSep,children:"/"}),S.jsx("button",{onClick:()=>r($.path),style:{...We.breadPart,color:_===T.length-1?"var(--text-bright)":"var(--accent)"},children:$.label})]},_)),!p&&S.jsxs("span",{style:We.breadMeta,children:[l.length," folder",l.length!==1?"s":"",", ",h," file",h!==1?"s":""]})]}),S.jsxs("div",{style:We.list,ref:Q,children:[c!==null&&S.jsxs("div",{onClick:()=>r(c),onMouseEnter:()=>k("__parent"),onMouseLeave:()=>k(null),style:{...We.dirRow,background:v==="__parent"?"var(--bg-hover)":"transparent"},children:[S.jsx("div",{style:We.dirIconWrap,children:S.jsx("span",{style:We.dirArrow,children:"<"})}),S.jsx("div",{style:We.dirInfo,children:S.jsx("div",{style:We.dirNameText,children:".."})})]}),p&&S.jsx("div",{style:We.emptyState,children:S.jsx("div",{style:We.emptyText,children:"Loading..."})}),y&&S.jsx("div",{style:We.emptyState,children:S.jsx("div",{style:{...We.emptyText,color:"var(--red)"},children:y})}),!p&&!y&&l.length===0&&S.jsxs("div",{style:We.emptyState,children:[S.jsx("div",{style:We.emptyText,children:"No subdirectories"}),S.jsxs("div",{style:We.emptyHint,children:["This directory has ",h," file",h!==1?"s":""]})]}),l.map($=>S.jsxs("div",{onClick:()=>r($.path),onMouseEnter:()=>k($.path),onMouseLeave:()=>k(null),style:{...We.dirRow,background:v===$.path?"var(--bg-hover)":"transparent"},children:[S.jsx("div",{style:We.dirIconWrap,children:S.jsx("span",{style:We.dirArrow,children:$.hasChildren?">":""})}),S.jsxs("div",{style:We.dirInfo,children:[S.jsx("div",{style:We.dirNameText,children:$.name}),S.jsxs("div",{style:We.dirMeta,children:[$.childCount>0&&`${$.childCount} folder${$.childCount!==1?"s":""}`,$.childCount>0&&$.fileCount>0&&", ",$.fileCount>0&&`${$.fileCount} file${$.fileCount!==1?"s":""}`,$.childCount===0&&$.fileCount===0&&"empty"]})]})]},$.path))]}),S.jsxs("div",{style:We.footer,children:[S.jsxs("div",{style:We.footerLeft,children:[S.jsx("div",{style:We.selectedLabel,children:"Selected"}),S.jsxs("div",{style:We.selectedPath,children:["/",i||"(project root)"]})]}),S.jsxs("div",{style:We.footerActions,children:[S.jsx("button",{onClick:e,style:We.cancelBtn,children:"Cancel"}),S.jsx("button",{onClick:()=>{t(i),e()},style:We.selectBtn,children:"Select"})]})]})]})})}const We={overlay:{position:"fixed",inset:0,zIndex:200,background:"rgba(0, 0, 0, 0.65)",display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)"},modal:{width:480,maxHeight:"80vh",background:"var(--bg-chrome)",border:"1px solid var(--border)",borderRadius:6,display:"flex",flexDirection:"column",fontFamily:"var(--font)",boxShadow:"0 16px 48px rgba(0, 0, 0, 0.4)"},header:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",padding:"14px 16px 12px",borderBottom:"1px solid var(--border)"},title:{fontSize:12,fontWeight:700,color:"var(--text-bright)",letterSpacing:.5},subtitle:{fontSize:10,color:"var(--text-dim)",marginTop:2},closeBtn:{background:"none",border:"none",color:"var(--text-dim)",fontSize:14,cursor:"pointer",fontFamily:"var(--font)",padding:"0 4px",lineHeight:1},breadcrumb:{padding:"8px 16px",borderBottom:"1px solid var(--border)",fontSize:11,display:"flex",alignItems:"center",flexWrap:"wrap",gap:0,background:"var(--bg-base)"},breadSep:{color:"var(--text-muted)",margin:"0 3px"},breadPart:{background:"none",border:"none",cursor:"pointer",fontFamily:"var(--font)",fontSize:11,padding:0},breadMeta:{marginLeft:"auto",fontSize:10,color:"var(--text-muted)"},list:{flex:1,overflowY:"auto",minHeight:200,maxHeight:400},dirRow:{display:"flex",alignItems:"center",gap:0,padding:"8px 16px",cursor:"pointer",transition:"background 0.08s",borderBottom:"1px solid rgba(75, 82, 99, 0.2)"},dirIconWrap:{width:28,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"},dirArrow:{fontSize:10,color:"var(--text-muted)",fontWeight:600},dirInfo:{flex:1,minWidth:0},dirNameText:{fontSize:12,color:"var(--text-bright)",fontWeight:500},dirMeta:{fontSize:10,color:"var(--text-muted)",marginTop:1},emptyState:{padding:"32px 16px",textAlign:"center"},emptyText:{fontSize:12,color:"var(--text-dim)"},emptyHint:{fontSize:10,color:"var(--text-muted)",marginTop:4},footer:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderTop:"1px solid var(--border)",background:"var(--bg-base)"},footerLeft:{flex:1,minWidth:0,marginRight:12},selectedLabel:{fontSize:9,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:1,fontWeight:600},selectedPath:{fontSize:11,color:"var(--accent)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},footerActions:{display:"flex",gap:6,flexShrink:0},cancelBtn:{padding:"6px 14px",background:"transparent",border:"1px solid var(--border)",borderRadius:3,color:"var(--text-dim)",fontSize:11,fontWeight:500,fontFamily:"var(--font)",cursor:"pointer"},selectBtn:{padding:"6px 18px",background:"var(--accent)",border:"1px solid var(--accent)",borderRadius:3,color:"var(--bg-base)",fontSize:11,fontWeight:700,fontFamily:"var(--font)",cursor:"pointer"}},YQ=[{id:"backend",label:"Backend",desc:"APIs, server logic, database",scope:["src/api/**","src/server/**","src/lib/**","src/db/**"]},{id:"frontend",label:"Frontend",desc:"UI components, views, styles",scope:["src/components/**","src/views/**","src/pages/**","src/styles/**"]},{id:"fullstack",label:"Fullstack",desc:"Full codebase access",scope:[]},{id:"planner",label:"Planner",desc:"Architecture, research, planning",scope:[]},{id:"testing",label:"Testing",desc:"Tests, specs, coverage",scope:["tests/**","test/**","**/*.test.*","**/*.spec.*"]},{id:"devops",label:"DevOps",desc:"Docker, CI/CD, infra",scope:["Dockerfile*","docker-compose*",".github/**","infra/**"]},{id:"docs",label:"Docs",desc:"Documentation, READMEs",scope:["docs/**","*.md"]}],O4=[{id:"auto",label:"Auto",desc:"AI PM reviews risky operations before they happen",icon:"~"},{id:"full",label:"Full Send",desc:"No reviews, maximum speed",icon:">"}];function p4(){const t=Qe(se=>se.spawnAgent),e=Qe(se=>se.closeDetail),[n,i]=D.useState(""),[r,l]=D.useState(""),[a,c]=D.useState(""),[f,h]=D.useState(""),[O,p]=D.useState("auto"),[m,y]=D.useState("claude-code"),[b,v]=D.useState("auto"),[k,Q]=D.useState([]),[P,T]=D.useState(!1),[$,_]=D.useState(""),[A,E]=D.useState(!1),[N,G]=D.useState(""),[ne,V]=D.useState([]),[Y,H]=D.useState(null),[X,W]=D.useState(""),[R,q]=D.useState(!1),[B,M]=D.useState(!1),[F,z]=D.useState([]),[Z,te]=D.useState([]);D.useEffect(()=>{re(),ue(),he()},[]);async function re(){try{const se=await fetch("/api/providers");Q(await se.json())}catch{}}async function ue(){try{const qe=await(await fetch("/api/indexer/workspaces")).json();V(qe.workspaces||[])}catch{}}async function he(){try{const se=await fetch("/api/skills/installed");z(await se.json())}catch{}}function Oe(se){te(qe=>qe.includes(se)?qe.filter(at=>at!==se):[...qe,se])}const fe=YQ.find(se=>se.id===n),ge=n==="custom"?a:(fe==null?void 0:fe.scope.join(", "))||"",ze=n==="planner";function Re(se){if(se.installed&&(se.authType==="subscription"||se.authType==="local"||se.hasKey)){y(se.id),v("auto"),H(null);return}H(se.id),W("")}async function ke(){if(!(!X.trim()||!Y)){q(!0);try{await fetch(`/api/credentials/${Y}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:X.trim()})}),W(""),H(null),y(Y),v("auto"),await re()}catch{}q(!1)}}async function Te(se){se.preventDefault();const qe=n==="custom"?r:n;if(!qe){_("Select a role");return}T(!0),_("");try{const at=ge?ge.split(",").map(an=>an.trim()).filter(Boolean):[];await t({role:qe,scope:at,prompt:f||null,model:b||"auto",provider:m,permission:O,...N.trim()?{workingDir:N.trim()}:{},...Z.length>0?{skills:Z}:{}}),e()}catch(at){_(at.message)}finally{T(!1)}}function Ze(se){return se.installed?se.authType==="api-key"&&!se.hasKey?"needs key":se.authType==="subscription"?"subscription":se.authType==="local"?"local":"ready":"not installed"}function tt(se){return!(!se.installed||se.authType==="api-key"&&!se.hasKey)}return S.jsxs("div",{style:{paddingTop:4},children:[S.jsx("div",{style:Ce.title,children:"SPAWN AGENT"}),S.jsxs("form",{onSubmit:Te,children:[S.jsx("div",{style:Ce.label,children:"ROLE"}),S.jsxs("div",{style:Ce.roleGrid,children:[YQ.map(se=>S.jsx("button",{type:"button",onClick:()=>i(se.id),style:{...Ce.roleBtn,...n===se.id?Ce.roleBtnActive:{}},title:se.desc,children:se.label},se.id)),S.jsx("button",{type:"button",onClick:()=>i("custom"),style:{...Ce.roleBtn,...n==="custom"?Ce.roleBtnActive:{}},children:"Custom"})]}),fe&&S.jsx("div",{style:Ce.roleDesc,children:fe.desc}),n==="custom"&&S.jsx("input",{style:{...Ce.input,marginTop:6},placeholder:"Custom role name...",value:r,onChange:se=>l(se.target.value),autoFocus:!0}),S.jsx("div",{style:Ce.label,children:ze?"WHAT TO PLAN":"TASK PROMPT"}),S.jsx("textarea",{style:Ce.textarea,placeholder:ze?"What should this agent research or plan?":"What should this agent work on?",value:f,onChange:se=>h(se.target.value),rows:3}),S.jsx("div",{style:Ce.label,children:"DIRECTORY"}),S.jsxs("div",{style:Ce.wsRow,children:[S.jsx("button",{type:"button",onClick:()=>G(""),style:{...Ce.wsBtn,...N?{}:{borderColor:"var(--accent)",color:"var(--text-bright)"}},children:"project root"}),ne.map(se=>S.jsx("button",{type:"button",onClick:()=>G(se.path),style:{...Ce.wsBtn,...N===se.path?{borderColor:"var(--accent)",color:"var(--text-bright)"}:{}},title:`${se.name} (${se.files} files)`,children:se.path},se.path)),S.jsx("button",{type:"button",onClick:()=>M(!0),style:Ce.browseBtn,children:"Browse..."})]}),N&&S.jsx("div",{style:Ce.hint,children:N}),B&&S.jsx(d4,{initial:N,onSelect:se=>G(se),onClose:()=>M(!1)}),S.jsx("div",{style:Ce.label,children:"PERMISSIONS"}),S.jsx("div",{style:Ce.permGrid,children:O4.map(se=>S.jsxs("button",{type:"button",onClick:()=>p(se.id),style:{...Ce.permBtn,...O===se.id?Ce.permBtnActive:{}},children:[S.jsx("span",{style:Ce.permIcon,children:se.icon}),S.jsxs("div",{children:[S.jsx("div",{style:Ce.permLabel,children:se.label}),S.jsx("div",{style:Ce.permDesc,children:se.desc})]})]},se.id))}),F.length>0&&S.jsxs(S.Fragment,{children:[S.jsx("div",{style:Ce.label,children:"SKILLS"}),S.jsx("div",{style:Ce.skillsGrid,children:F.map(se=>{const qe=Z.includes(se.id);return S.jsxs("button",{type:"button",onClick:()=>Oe(se.id),style:{...Ce.skillBtn,borderColor:qe?"var(--accent)":"var(--border)",background:qe?"rgba(51, 175, 188, 0.08)":"var(--bg-surface)"},children:[S.jsx("span",{style:{...Ce.skillIcon,background:qe?"var(--accent)":"var(--bg-active)",color:qe?"var(--bg-base)":"var(--text-dim)"},children:se.icon||se.name.charAt(0)}),S.jsxs("div",{style:{flex:1,minWidth:0},children:[S.jsx("div",{style:{fontSize:11,fontWeight:600,color:qe?"var(--text-bright)":"var(--text-primary)"},children:se.name}),S.jsx("div",{style:{fontSize:9,color:"var(--text-muted)"},children:se.author||"local"})]}),qe&&S.jsx("span",{style:{fontSize:10,color:"var(--accent)",flexShrink:0},children:"✓"})]},se.id)})}),Z.length>0&&S.jsxs("div",{style:Ce.hint,children:[Z.length," skill",Z.length!==1?"s":""," will be injected into this agent's context"]})]}),S.jsx("button",{type:"button",onClick:()=>E(!A),style:Ce.advancedToggle,children:A?"- hide advanced":"+ advanced options"}),A&&S.jsxs(S.Fragment,{children:[S.jsx("div",{style:Ce.label,children:"PROVIDER"}),k.map(se=>{const qe=tt(se),at=Ze(se),Yt=m===se.id,an=Y===se.id;return S.jsxs("div",{style:{marginBottom:2},children:[S.jsxs("button",{type:"button",onClick:()=>Re(se),style:{...Ce.providerBtn,borderColor:Yt?"var(--accent)":"var(--border)",opacity:qe||an?1:.6},children:[S.jsxs("div",{style:{flex:1},children:[S.jsx("span",{style:{fontSize:12,fontWeight:600,color:Yt?"var(--text-bright)":"var(--text-primary)"},children:se.name}),S.jsx("span",{style:Ce.providerModels,children:se.models.map(on=>on.name).join(", ")})]}),S.jsx("span",{style:{fontSize:10,color:qe?"var(--green)":at==="not installed"?"var(--text-muted)":"var(--amber)"},children:qe?Yt?"active":"ready":at})]}),an&&S.jsxs("div",{style:Ce.connectBox,children:[!se.installed&&S.jsxs("div",{children:[S.jsx("div",{style:Ce.connectLabel,children:"Install first:"}),S.jsx("code",{style:Ce.connectCode,children:se.installCommand}),S.jsx("div",{style:Ce.connectHint,children:"Run this in your terminal, then click the provider again"})]}),se.installed&&se.authType==="api-key"&&!se.hasKey&&S.jsxs("div",{children:[S.jsxs("div",{style:Ce.connectLabel,children:["API Key ",se.envKey?`(${se.envKey})`:""]}),S.jsxs("div",{style:{display:"flex",gap:4},children:[S.jsx("input",{type:"password",style:Ce.input,placeholder:"sk-...",value:X,onChange:on=>W(on.target.value),onKeyDown:on=>on.key==="Enter"&&(on.preventDefault(),ke())}),S.jsx("button",{type:"button",onClick:ke,disabled:R||!X.trim(),style:Ce.connectSaveBtn,children:R?"...":"Save"})]}),S.jsx("div",{style:Ce.connectHint,children:"Encrypted locally. Never sent to GROOVE servers."})]}),se.installed&&se.authType==="subscription"&&S.jsxs("div",{children:[S.jsx("div",{style:Ce.connectLabel,children:"Subscription auth"}),S.jsxs("div",{style:Ce.connectHint,children:[se.name," uses your existing subscription. Make sure you're logged in via the CLI."]})]}),se.installed&&se.authType==="local"&&S.jsxs("div",{children:[S.jsx("div",{style:Ce.connectLabel,children:"Local model"}),S.jsxs("div",{style:Ce.connectHint,children:["Make sure ",se.name," is running locally. No API key needed."]})]}),S.jsx("button",{type:"button",onClick:()=>H(null),style:Ce.connectCancel,children:"cancel"})]})]},se.id)}),(()=>{const se=k.find(at=>at.id===m),qe=(se==null?void 0:se.models)||[];return qe.length===0?null:S.jsxs(S.Fragment,{children:[S.jsx("div",{style:Ce.label,children:"MODEL"}),S.jsxs("select",{style:Ce.input,value:b,onChange:at=>v(at.target.value),children:[S.jsx("option",{value:"auto",children:"Auto (recommended)"}),qe.map(at=>S.jsxs("option",{value:at.id,children:[at.name," (",at.tier,")"]},at.id))]})]})})(),S.jsx("div",{style:Ce.label,children:"FILE SCOPE"}),S.jsx("input",{style:Ce.input,placeholder:"e.g. src/api/**, src/lib/**",value:n==="custom"?a:ge,onChange:se=>{n==="custom"&&c(se.target.value)},readOnly:n!=="custom"}),S.jsx("div",{style:Ce.hint,children:n==="custom"?"Comma-separated glob patterns":"Auto-set by role preset"})]}),$&&S.jsx("div",{style:Ce.error,children:$}),S.jsx("button",{type:"submit",disabled:P,style:{...Ce.submitBtn,opacity:P?.5:1},children:P?"spawning...":ze?"Start Planning":"Spawn Agent"})]})]})}const Ce={title:{fontSize:11,fontWeight:600,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1.5,marginBottom:14},label:{fontSize:11,color:"var(--text-dim)",marginBottom:4,marginTop:12,textTransform:"uppercase",letterSpacing:1.5,fontWeight:600},roleGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:4},roleBtn:{background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:"6px 4px",color:"var(--text-primary)",fontSize:11,cursor:"pointer",fontFamily:"var(--font)",transition:"color 0.1s, border-color 0.1s"},roleBtnActive:{borderColor:"var(--accent)",color:"var(--text-bright)"},roleDesc:{fontSize:10,color:"var(--text-dim)",marginTop:4,fontStyle:"italic"},permGrid:{display:"flex",flexDirection:"column",gap:4},permBtn:{display:"flex",alignItems:"center",gap:10,padding:"8px 10px",width:"100%",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,cursor:"pointer",textAlign:"left",fontFamily:"var(--font)"},permBtnActive:{borderColor:"var(--accent)"},permIcon:{fontSize:14,fontWeight:700,color:"var(--accent)",width:18,textAlign:"center",flexShrink:0},permLabel:{fontSize:11,color:"var(--text-bright)",fontWeight:600},permDesc:{fontSize:10,color:"var(--text-dim)"},skillsGrid:{display:"flex",flexDirection:"column",gap:3},skillBtn:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",width:"100%",border:"1px solid var(--border)",borderRadius:2,cursor:"pointer",textAlign:"left",fontFamily:"var(--font)",transition:"border-color 0.1s, background 0.1s"},skillIcon:{width:22,height:22,borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:700,flexShrink:0},advancedToggle:{background:"none",border:"none",color:"var(--text-dim)",fontSize:10,cursor:"pointer",fontFamily:"var(--font)",padding:"8px 0",marginTop:8},providerBtn:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,cursor:"pointer",textAlign:"left",fontFamily:"var(--font)"},providerModels:{fontSize:10,color:"var(--text-dim)",marginLeft:6},connectBox:{padding:"8px 10px",margin:"2px 0 4px",background:"var(--bg-base)",border:"1px solid var(--border)",borderRadius:2},connectLabel:{fontSize:11,color:"var(--text-primary)",fontWeight:600,marginBottom:4},connectCode:{display:"block",padding:"6px 8px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,fontSize:11,color:"var(--accent)",wordBreak:"break-all"},connectHint:{fontSize:10,color:"var(--text-dim)",marginTop:4},connectSaveBtn:{padding:"6px 12px",flexShrink:0,background:"transparent",border:"1px solid var(--accent)",borderRadius:2,color:"var(--accent)",fontSize:11,fontWeight:600,fontFamily:"var(--font)",cursor:"pointer"},connectCancel:{background:"none",border:"none",color:"var(--text-dim)",fontSize:10,cursor:"pointer",fontFamily:"var(--font)",padding:"4px 0",marginTop:4},input:{width:"100%",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:"6px 8px",color:"var(--text-primary)",fontSize:12,outline:"none",fontFamily:"var(--font)"},textarea:{width:"100%",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:"6px 8px",color:"var(--text-primary)",fontSize:12,outline:"none",fontFamily:"var(--font)",resize:"vertical"},hint:{fontSize:10,color:"var(--text-dim)",marginTop:3},wsRow:{display:"flex",flexWrap:"wrap",gap:4,marginTop:6},wsBtn:{background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:"3px 8px",color:"var(--text-dim)",fontSize:10,cursor:"pointer",fontFamily:"var(--font)",transition:"color 0.1s, border-color 0.1s"},browseBtn:{background:"var(--bg-surface)",border:"1px solid var(--accent)",borderRadius:2,padding:"3px 10px",color:"var(--accent)",fontSize:10,fontWeight:600,cursor:"pointer",fontFamily:"var(--font)"},error:{color:"var(--red)",fontSize:11,marginTop:8},submitBtn:{width:"100%",marginTop:14,padding:"8px",background:"transparent",border:"1px solid var(--accent)",borderRadius:2,color:"var(--accent)",fontSize:12,fontWeight:600,fontFamily:"var(--font)",cursor:"pointer"}};function g4(){var a;const[t,e]=D.useState(null),[n,i]=D.useState(!0);D.useEffect(()=>{r();const c=setInterval(r,1e4);return()=>clearInterval(c)},[]);async function r(){try{const c=await fetch("/api/journalist");e(await c.json())}catch{}i(!1)}async function l(){i(!0);try{await fetch("/api/journalist/cycle",{method:"POST"}),await r()}catch{}i(!1)}return S.jsxs("div",{style:{paddingTop:4},children:[S.jsxs("div",{style:fn.header,children:[S.jsx("span",{style:fn.title,children:"THE JOURNALIST"}),S.jsx("button",{onClick:l,disabled:n,style:fn.btn,children:n?"synthesizing...":"Run Cycle"})]}),S.jsxs("div",{style:fn.statusRow,children:[S.jsxs("span",{children:["Status: ",t!=null&&t.running?"active":"stopped"]}),S.jsxs("span",{children:["Cycles: ",(t==null?void 0:t.cycleCount)||0]}),(t==null?void 0:t.lastCycleAt)&&S.jsxs("span",{children:["Last: ",new Date(t.lastCycleAt).toLocaleTimeString()]})]}),t!=null&&t.lastSynthesis?S.jsxs("div",{children:[S.jsx("div",{style:fn.sectionLabel,children:"SUMMARY"}),S.jsx("div",{style:fn.textBox,children:t.lastSynthesis.summary}),t.lastSynthesis.projectMap&&S.jsxs(S.Fragment,{children:[S.jsx("div",{style:fn.sectionLabel,children:"PROJECT MAP"}),S.jsx("pre",{style:fn.codeBox,children:t.lastSynthesis.projectMap})]}),t.lastSynthesis.decisions&&S.jsxs(S.Fragment,{children:[S.jsx("div",{style:fn.sectionLabel,children:"DECISIONS"}),S.jsx("pre",{style:fn.codeBox,children:t.lastSynthesis.decisions})]})]}):S.jsx("div",{style:fn.empty,children:"No synthesis yet. The Journalist runs every 2 minutes when agents are active."}),((a=t==null?void 0:t.history)==null?void 0:a.length)>0&&S.jsxs(S.Fragment,{children:[S.jsx("div",{style:fn.sectionLabel,children:"HISTORY"}),S.jsx("div",{style:fn.historyList,children:t.history.slice().reverse().map((c,f)=>{var h;return S.jsxs("div",{style:fn.historyEntry,children:[S.jsx("span",{style:fn.historyTime,children:new Date(c.timestamp).toLocaleTimeString()}),S.jsxs("span",{style:fn.historyText,children:["Cycle ",c.cycle,": ",c.agentCount," agent",c.agentCount!==1?"s":""," — ",(h=c.summary)==null?void 0:h.slice(0,80)]})]},f)})})]})]})}const fn={header:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:10},title:{fontSize:11,fontWeight:600,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1.5},btn:{padding:"3px 10px",background:"transparent",border:"1px solid var(--purple)",borderRadius:2,color:"var(--purple)",fontSize:11,cursor:"pointer",fontFamily:"var(--font)"},statusRow:{display:"flex",gap:12,fontSize:11,color:"var(--text-dim)",marginBottom:12,padding:"6px 0",borderBottom:"1px solid var(--border)",flexWrap:"wrap"},sectionLabel:{fontSize:11,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1.5,marginBottom:4,marginTop:12,fontWeight:600},textBox:{background:"var(--bg-base)",border:"1px solid var(--border)",borderRadius:2,padding:8,fontSize:12,color:"var(--text-primary)",lineHeight:1.5},codeBox:{background:"var(--bg-base)",border:"1px solid var(--border)",borderRadius:2,padding:8,fontSize:11,color:"var(--text-dim)",lineHeight:1.5,whiteSpace:"pre-wrap",maxHeight:200,overflowY:"auto",margin:0},empty:{color:"var(--text-dim)",fontSize:12,padding:16,textAlign:"center"},historyList:{maxHeight:160,overflowY:"auto",background:"var(--bg-base)",borderRadius:2,border:"1px solid var(--border)"},historyEntry:{padding:"4px 8px",borderBottom:"1px solid var(--bg-surface)",fontSize:10,display:"flex",gap:6},historyTime:{color:"var(--text-dim)",whiteSpace:"nowrap"},historyText:{color:"var(--text-primary)"}};function m4(){const[t,e]=D.useState([]),[n,i]=D.useState(null),[r,l]=D.useState(!1),[a,c]=D.useState(""),f=Qe(y=>y.showStatus);D.useEffect(()=>{h();const y=setInterval(h,5e3);return()=>clearInterval(y)},[]);async function h(){try{const b=await(await fetch("/api/teams")).json();e(b.teams),i(b.activeTeam)}catch{}}async function O(y){try{await fetch(`/api/teams/${encodeURIComponent(y)}/load`,{method:"POST"}),f(`loaded team "${y}"`),h()}catch{f("failed to load team")}}async function p(){if(a.trim())try{await fetch("/api/teams",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a.trim()})}),f(`saved team "${a}"`),c(""),l(!1),h()}catch{f("failed to save team")}}async function m(y){await fetch(`/api/teams/${encodeURIComponent(y)}`,{method:"DELETE"}),f(`deleted "${y}"`),h()}return S.jsxs("div",{style:An.container,children:[S.jsx("div",{style:An.title,children:"SAVED TEAMS"}),t.length===0?S.jsx("div",{style:An.empty,children:"No saved teams"}):t.map(y=>S.jsxs("div",{style:{...An.item,background:y.name===n?"var(--bg-hover)":"transparent"},children:[S.jsxs("div",{style:{flex:1},children:[S.jsxs("div",{style:An.teamName,children:[">"," ",y.name]}),S.jsxs("div",{style:An.teamMeta,children:[y.agents," agents"]})]}),S.jsxs("div",{style:{display:"flex",gap:8},children:[S.jsx("button",{onClick:()=>O(y.name),style:An.loadBtn,children:"Load"}),S.jsx("button",{onClick:()=>m(y.name),style:An.deleteBtn,children:"x"})]})]},y.name)),S.jsx("div",{style:An.divider}),r?S.jsxs("div",{style:An.saveRow,children:[S.jsx("input",{style:An.saveInput,placeholder:"Team name...",value:a,onChange:y=>c(y.target.value),onKeyDown:y=>y.key==="Enter"&&p(),autoFocus:!0}),S.jsx("button",{onClick:p,style:An.saveBtn,children:"Save"}),S.jsx("button",{onClick:()=>l(!1),style:An.cancelBtn,children:"x"})]}):S.jsx("button",{onClick:()=>l(!0),style:An.saveTeamBtn,children:"Save Current as Team"})]})}const An={container:{padding:24,maxWidth:600,margin:"0 auto"},title:{fontSize:11,fontWeight:600,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1.5,marginBottom:16},item:{padding:"10px 12px",display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid var(--border)"},teamName:{fontSize:12,color:"var(--text-bright)",fontWeight:600},teamMeta:{fontSize:11,color:"var(--text-dim)",marginTop:2},loadBtn:{background:"transparent",border:"none",color:"var(--accent)",fontSize:11,cursor:"pointer",fontFamily:"var(--font)",fontWeight:600},deleteBtn:{background:"none",border:"none",color:"var(--text-dim)",fontSize:12,cursor:"pointer",fontFamily:"var(--font)"},empty:{padding:20,color:"var(--text-dim)",fontSize:12,textAlign:"center"},divider:{borderTop:"1px solid var(--border)",margin:"12px 0"},saveTeamBtn:{background:"transparent",border:"1px solid var(--accent)",borderRadius:2,padding:"6px 14px",color:"var(--accent)",fontSize:12,cursor:"pointer",fontFamily:"var(--font)",fontWeight:600},saveRow:{display:"flex",gap:6,alignItems:"center"},saveInput:{flex:1,background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:2,padding:"6px 8px",color:"var(--text-primary)",fontSize:12,fontFamily:"var(--font)",outline:"none"},saveBtn:{padding:"6px 12px",background:"transparent",border:"1px solid var(--accent)",borderRadius:2,color:"var(--accent)",fontSize:12,cursor:"pointer",fontFamily:"var(--font)"},cancelBtn:{background:"none",border:"none",color:"var(--text-dim)",fontSize:12,cursor:"pointer",fontFamily:"var(--font)"}},gl="#4ae168",My="#33afbc",Xy="#e5c07b",Zy="#e06c75",y4="#c678dd",x4="#61afef",Ma=[My,Xy,gl,y4,Zy,x4,"#d19a66"],S4={medium:.009};function b4(){const[t,e]=D.useState(null),n=Qe(y=>y.agents),i=Qe(y=>y.dashTelemetry);D.useEffect(()=>{r();const y=setInterval(r,4e3);return()=>clearInterval(y)},[]);async function r(){try{const b=await(await fetch("/api/dashboard")).json();e(b),Qe.setState(v=>{const k={...v.dashTelemetry},Q=Date.now();for(const P of b.agents.breakdown){k[P.id]||(k[P.id]=[]);const T=k[P.id],$=T[T.length-1];(!$||P.tokens!==$.v||Q-$.t>1e4)&&(T.push({t:Q,v:P.tokens||0,name:P.name}),T.length>200&&(k[P.id]=T.slice(-200)))}return{dashTelemetry:k}})}catch{}}if(!t)return S.jsxs("div",{style:lt.loadingRoot,children:[S.jsx("div",{style:lt.loadingText,children:"COMMAND CENTER"}),S.jsx("div",{style:lt.loadingBar,children:S.jsx("div",{style:lt.loadingFill})})]});const{tokens:l,routing:a,rotation:c,adaptive:f,journalist:h,uptime:O}=t,p=t.agents.breakdown,m=l.savings.total/1e3*S4.medium;return S.jsxs("div",{style:lt.root,children:[S.jsxs("div",{style:lt.statBar,children:[S.jsx(yc,{label:"Total Tokens",value:bs(l.totalTokens),sub:`${t.agents.total} agent${t.agents.total!==1?"s":""}`}),S.jsx(yc,{label:"Tokens Saved",value:bs(l.savings.total),sub:`${l.savings.percentage||0}% efficiency`,color:gl}),S.jsx(yc,{label:"Est. Savings",value:m>0?`$${m.toFixed(2)}`:"$0.00",sub:"based on token costs",color:gl}),S.jsx(yc,{label:"Rotations",value:c.totalRotations,sub:`${bs(c.totalTokensSaved)} tok recovered`}),S.jsx(yc,{label:"Uptime",value:w4(O),sub:`${t.agents.running} running`})]}),S.jsxs("div",{style:lt.midRow,children:[S.jsxs("div",{style:lt.chartPanel,children:[S.jsxs("div",{style:lt.panelHead,children:[S.jsx("span",{children:"Token Usage"}),S.jsx("span",{style:lt.panelHeadRight,children:p.filter(y=>y.tokens>0).map((y,b)=>S.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,marginLeft:12},children:[S.jsx("span",{style:{width:6,height:2,background:Ma[b%Ma.length],display:"inline-block",borderRadius:1}}),S.jsx("span",{style:{fontSize:9},children:y.name})]},y.id))})]}),S.jsx(Q4,{tokenTimeline:i,agents:n})]}),S.jsxs("div",{style:lt.donutPanel,children:[S.jsx("div",{style:lt.panelHead,children:"Model Routing"}),S.jsx(v4,{routing:a})]})]}),S.jsxs("div",{style:lt.bottomRow,children:[S.jsxs("div",{style:lt.panel,children:[S.jsx("div",{style:lt.panelHead,children:"Savings Breakdown"}),S.jsxs("div",{style:lt.scrollInner,children:[S.jsx(gh,{label:"Rotation",value:l.savings.fromRotation,max:l.savings.total||1,color:My}),S.jsx(gh,{label:"Conflict Prevention",value:l.savings.fromConflictPrevention,max:l.savings.total||1,color:Xy}),S.jsx(gh,{label:"Cold-Start Skip",value:l.savings.fromColdStartSkip,max:l.savings.total||1,color:gl}),S.jsx("div",{style:lt.divider}),S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#8b929e",padding:"4px 0"},children:[S.jsx("span",{children:"Without Groove"}),S.jsx("span",{style:{color:Zy,fontWeight:600},children:bs(l.savings.estimatedWithoutGroove)})]}),S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#8b929e",padding:"4px 0"},children:[S.jsx("span",{children:"With Groove"}),S.jsx("span",{style:{color:gl,fontWeight:600},children:bs(l.totalTokens)})]}),S.jsx("div",{style:{fontSize:8,color:"#5c6370",marginTop:4,lineHeight:1.4},children:"Calculated from: rotation recovery (30% of degraded context), cold-start prevention (2K tokens/skip), conflict avoidance (500 tokens/conflict)."}),h.lastSummary&&S.jsxs(S.Fragment,{children:[S.jsx("div",{style:lt.divider}),S.jsx("div",{style:lt.panelHead,children:"Journalist"}),S.jsx("div",{style:lt.journSummary,children:h.lastSummary})]})]})]}),S.jsxs("div",{style:lt.panel,children:[S.jsx("div",{style:lt.panelHead,children:"Agent Fleet"}),S.jsxs("div",{style:lt.scrollInner,children:[p.length===0?S.jsx("div",{style:lt.empty,children:"No agents spawned"}):p.map((y,b)=>S.jsx(gh,{label:y.name,value:y.tokens,max:Math.max(...p.map(v=>v.tokens),1),color:Ma[b%Ma.length],sub:`${y.role} · ${y.model||"auto"}`},y.id)),c.history.length>0&&S.jsxs(S.Fragment,{children:[S.jsx("div",{style:lt.divider}),S.jsx("div",{style:lt.panelHead,children:"Rotation History"}),c.history.slice().reverse().slice(0,8).map((y,b)=>S.jsxs("div",{style:lt.rotEntry,children:[S.jsx("span",{style:lt.rotName,children:y.agentName}),S.jsxs("span",{style:{color:gl,fontSize:9},children:[bs(y.oldTokens)," saved"]}),S.jsx("span",{style:lt.rotTime,children:k4(y.timestamp)})]},b))]})]})]})]})]})}function yc({label:t,value:e,sub:n,color:i}){return S.jsxs("div",{style:lt.statCard,children:[S.jsx("div",{style:{fontSize:10,color:"#8b929e",textTransform:"uppercase",letterSpacing:1,marginBottom:6},children:t}),S.jsx("div",{style:{fontSize:20,fontWeight:700,color:i||"#e6e6e6",lineHeight:1},children:e}),n&&S.jsx("div",{style:{fontSize:9,color:"#6b7280",marginTop:4},children:n})]})}function gh({label:t,value:e,max:n,color:i,sub:r}){const l=n>0?e/n*100:0;return S.jsxs("div",{style:{padding:"6px 0"},children:[S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[S.jsx("span",{style:{fontSize:11,color:"#abb2bf"},children:t}),S.jsx("span",{style:{fontSize:11,color:"#e6e6e6",fontWeight:600},children:bs(e)})]}),S.jsx("div",{style:{height:4,background:"#1e222a",borderRadius:2},children:S.jsx("div",{style:{width:`${Math.max(l,e>0?1:0)}%`,height:"100%",background:i,borderRadius:2,transition:"width 0.3s"}})}),r&&S.jsx("div",{style:{fontSize:8,color:"#3e4451",marginTop:2},children:r})]})}function v4({routing:t}){const e=[{label:"Heavy",color:Zy,count:t.byTier.heavy,cost:"$0.045/1k"},{label:"Medium",color:Xy,count:t.byTier.medium,cost:"$0.009/1k"},{label:"Light",color:gl,count:t.byTier.light,cost:"$0.002/1k"}],n=e.reduce((f,h)=>f+h.count,0)||1,i=50,r=60,l=60,a=2*Math.PI*i;let c=0;return S.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,alignItems:"center",justifyContent:"center",gap:12,minHeight:0},children:[S.jsxs("svg",{width:"120",height:"120",viewBox:"0 0 120 120",children:[S.jsx("circle",{cx:r,cy:l,r:i,fill:"none",stroke:"#1e222a",strokeWidth:"10"}),e.map(f=>{if(f.count===0)return null;const O=f.count/n*a,p=S.jsx("circle",{cx:r,cy:l,r:i,fill:"none",stroke:f.color,strokeWidth:"10",strokeDasharray:`${O} ${a-O}`,strokeDashoffset:-c,strokeLinecap:"butt",transform:`rotate(-90 ${r} ${l})`,style:{transition:"stroke-dasharray 0.5s"}},f.label);return c+=O,p}),S.jsx("text",{x:r,y:l-4,textAnchor:"middle",fill:"#e6e6e6",fontSize:"16",fontWeight:"700",fontFamily:"JetBrains Mono, monospace",children:n>1?n:t.totalDecisions}),S.jsx("text",{x:r,y:l+10,textAnchor:"middle",fill:"#5c6370",fontSize:"8",fontFamily:"JetBrains Mono, monospace",children:"decisions"})]}),S.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,width:"100%",padding:"0 8px"},children:e.map(f=>S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:10},children:[S.jsx("span",{style:{width:8,height:8,borderRadius:2,background:f.color,flexShrink:0}}),S.jsx("span",{style:{color:"#abb2bf",flex:1},children:f.label}),S.jsx("span",{style:{color:"#5c6370",fontSize:9},children:f.cost}),S.jsx("span",{style:{color:"#e6e6e6",fontWeight:600,minWidth:20,textAlign:"right"},children:f.count})]},f.label))}),S.jsxs("div",{style:{fontSize:9,color:"#3e4451"},children:[t.autoRoutedCount," auto-routed"]})]})}function Q4({tokenTimeline:t,agents:e}){const n=D.useRef(),i=D.useRef(),r=D.useCallback(()=>{const l=n.current,a=i.current;if(!l||!a)return;const c=window.devicePixelRatio||1,f=l.clientWidth,h=l.clientHeight;if(f===0||h===0)return;a.width=f*c,a.height=h*c,a.style.width=f+"px",a.style.height=h+"px";const O=a.getContext("2d");O.scale(c,c),O.clearRect(0,0,f,h);const p=40,m=10,y=10,b=20,v=f-p-m,k=h-y-b;O.strokeStyle="#1e222a",O.lineWidth=.5;for(let A=0;A<=4;A++){const E=y+A/4*k;O.beginPath(),O.moveTo(p,E),O.lineTo(f-m,E),O.stroke()}const Q=Object.keys(t);if(Q.length===0){O.fillStyle="#3e4451",O.font="10px monospace",O.textAlign="center",O.fillText("Waiting for agent telemetry...",f/2,h/2);return}let P=1/0,T=0,$=0;for(const A of Q)for(const E of t[A]||[])E.t<P&&(P=E.t),E.t>T&&(T=E.t),E.v>$&&($=E.v);T===P&&(T=P+6e4),$===0&&($=100);const _=T-P;O.fillStyle="#3e4451",O.font="8px monospace",O.textAlign="right";for(let A=0;A<=4;A++){const E=$*(1-A/4);O.fillText(bs(Math.round(E)),p-4,y+A/4*k+3)}O.textAlign="center";for(let A=0;A<=4;A++){const E=P+A/4*_,N=new Date(E);O.fillText(`${N.getHours()}:${String(N.getMinutes()).padStart(2,"0")}`,p+A/4*v,h-4)}Q.forEach((A,E)=>{const N=t[A]||[];if(N.length<2)return;const G=Ma[E%Ma.length],ne=N.map(H=>({x:p+(H.t-P)/_*v,y:y+(1-H.v/$)*k}));O.beginPath(),O.moveTo(ne[0].x,y+k);for(const H of ne)O.lineTo(H.x,H.y);O.lineTo(ne[ne.length-1].x,y+k),O.closePath();const V=O.createLinearGradient(0,y,0,y+k);V.addColorStop(0,G+"20"),V.addColorStop(1,G+"03"),O.fillStyle=V,O.fill(),O.beginPath();for(let H=0;H<ne.length;H++)H===0?O.moveTo(ne[H].x,ne[H].y):O.lineTo(ne[H].x,ne[H].y);O.strokeStyle=G,O.lineWidth=1,O.stroke();const Y=ne[ne.length-1];O.beginPath(),O.arc(Y.x,Y.y,2,0,Math.PI*2),O.fillStyle=G,O.fill()})},[t,e]);return D.useEffect(()=>{r()},[r]),D.useEffect(()=>{const l=new ResizeObserver(r);return n.current&&l.observe(n.current),()=>l.disconnect()},[r]),S.jsx("div",{ref:n,style:{flex:1,minHeight:0,position:"relative"},children:S.jsx("canvas",{ref:i,style:{display:"block",position:"absolute",top:0,left:0}})})}function bs(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t||0)}function w4(t){const e=Math.floor(t/3600),n=Math.floor(t%3600/60);return e>0?`${e}h ${n}m`:`${n}m ${Math.floor(t%60)}s`}function k4(t){const e=Math.floor((Date.now()-new Date(t).getTime())/6e4);return e>=60?`${Math.floor(e/60)}h ago`:e>0?`${e}m ago`:"now"}const lt={root:{width:"100%",height:"100%",display:"flex",flexDirection:"column",overflow:"hidden",padding:14,gap:12,background:"var(--bg-base)"},loadingRoot:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:12},loadingText:{fontSize:11,fontWeight:700,color:"var(--text-dim)",letterSpacing:3,textTransform:"uppercase"},loadingBar:{width:120,height:2,background:"#282c34",borderRadius:1,overflow:"hidden"},loadingFill:{width:"40%",height:"100%",background:My,animation:"pulse 1.5s infinite"},statBar:{display:"flex",flexShrink:0,background:"#282c34",borderRadius:12,overflow:"hidden"},statCard:{flex:1,padding:"14px 16px",borderRight:"1px solid #1e222a",display:"flex",flexDirection:"column"},midRow:{display:"grid",gridTemplateColumns:"2fr 1fr",gap:12,flex:2,minHeight:0},chartPanel:{background:"#282c34",borderRadius:12,padding:"12px 14px",display:"flex",flexDirection:"column",minHeight:0},donutPanel:{background:"#282c34",borderRadius:12,padding:"12px 14px",display:"flex",flexDirection:"column",minHeight:0},bottomRow:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,flex:3,minHeight:0},panel:{background:"#282c34",borderRadius:12,padding:"12px 14px",display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},panelHead:{fontSize:10,fontWeight:600,color:"#5c6370",textTransform:"uppercase",letterSpacing:1,marginBottom:8,flexShrink:0,display:"flex",justifyContent:"space-between",alignItems:"center"},panelHeadRight:{display:"flex",alignItems:"center",color:"#3e4451"},scrollInner:{flex:1,minHeight:0,overflowY:"auto"},empty:{color:"#3e4451",fontSize:10,textAlign:"center",padding:20},divider:{height:1,background:"#1e222a",margin:"8px 0",flexShrink:0},journSummary:{fontSize:10,color:"#8b929e",lineHeight:1.5,padding:"4px 0",whiteSpace:"pre-wrap",maxHeight:80,overflowY:"auto"},rotEntry:{display:"flex",alignItems:"center",gap:8,padding:"4px 0",fontSize:10},rotName:{color:"#abb2bf",flex:1},rotTime:{color:"#3e4451",fontSize:9}};function T4(){const[t,e]=D.useState(null);D.useEffect(()=>{n();const l=setInterval(n,4e3);return()=>clearInterval(l)},[]);async function n(){try{const l=await fetch("/api/pm/history");e(await l.json())}catch{}}const i=(t==null?void 0:t.history)||[],r=(t==null?void 0:t.stats)||{};return S.jsxs("div",{style:Bt.container,children:[S.jsxs("div",{style:Bt.header,children:[S.jsx("div",{style:Bt.title,children:"PM REVIEW LOG"}),S.jsx("div",{style:Bt.subtitle,children:"AI Project Manager reviews risky agent operations in Auto mode"})]}),S.jsxs("div",{style:Bt.statsBar,children:[S.jsx(mh,{label:"REVIEWS",value:r.totalReviews||0}),S.jsx(mh,{label:"APPROVED",value:r.approved||0,color:"var(--green)"}),S.jsx(mh,{label:"REJECTED",value:r.rejected||0,color:"var(--red)"}),S.jsx(mh,{label:"AVG TIME",value:r.avgDurationMs?`${(r.avgDurationMs/1e3).toFixed(1)}s`:"-"})]}),i.length===0?S.jsxs("div",{style:Bt.empty,children:[S.jsx("div",{style:Bt.emptyTitle,children:"No reviews yet"}),S.jsx("div",{style:Bt.emptyDesc,children:"Spawn agents with Auto permission mode. The AI PM will review risky operations (new files, deletions, config changes) before they happen."})]}):S.jsx("div",{style:Bt.list,children:i.slice().reverse().map((l,a)=>S.jsxs("div",{style:Bt.entry,children:[S.jsxs("div",{style:Bt.entryTop,children:[S.jsx("span",{style:{...Bt.verdict,color:l.approved?"var(--green)":"var(--red)",borderColor:l.approved?"rgba(74,225,104,0.3)":"rgba(224,108,117,0.3)",background:l.approved?"rgba(74,225,104,0.08)":"rgba(224,108,117,0.08)"},children:l.approved?"APPROVED":"REJECTED"}),S.jsx("span",{style:Bt.entryAgent,children:l.agent}),S.jsx("span",{style:Bt.entryAction,children:l.action}),S.jsx("span",{style:Bt.entryTime,children:$4(l.timestamp)})]}),S.jsx("div",{style:Bt.entryFile,children:l.file}),l.description&&S.jsx("div",{style:Bt.entryDesc,children:l.description}),S.jsx("div",{style:Bt.entryReason,children:l.reason})]},a))})]})}function mh({label:t,value:e,color:n}){return S.jsxs("div",{style:Bt.stat,children:[S.jsx("div",{style:{fontSize:16,fontWeight:700,color:n||"var(--text-bright)"},children:e}),S.jsx("div",{style:{fontSize:7,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1},children:t})]})}function $4(t){const e=Math.floor((Date.now()-new Date(t).getTime())/6e4);return e>=60?`${Math.floor(e/60)}h ago`:e>0?`${e}m ago`:"just now"}const Bt={container:{padding:24,maxWidth:700,margin:"0 auto"},header:{marginBottom:16},title:{fontSize:11,fontWeight:700,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1.5},subtitle:{fontSize:10,color:"var(--text-dim)",marginTop:4},statsBar:{display:"flex",gap:8,marginBottom:16},stat:{flex:1,background:"var(--bg-surface)",border:"1px solid var(--border)",padding:"8px 10px",textAlign:"center"},empty:{textAlign:"center",padding:"40px 20px",background:"var(--bg-surface)",border:"1px solid var(--border)"},emptyTitle:{fontSize:12,color:"var(--text-primary)",fontWeight:600,marginBottom:8},emptyDesc:{fontSize:10,color:"var(--text-dim)",lineHeight:1.6,maxWidth:400,margin:"0 auto"},list:{display:"flex",flexDirection:"column",gap:4},entry:{background:"var(--bg-surface)",border:"1px solid var(--border)",padding:"8px 10px"},entryTop:{display:"flex",alignItems:"center",gap:8,marginBottom:4},verdict:{fontSize:8,fontWeight:700,letterSpacing:.5,padding:"1px 5px",border:"1px solid"},entryAgent:{fontSize:11,fontWeight:600,color:"var(--text-bright)"},entryAction:{fontSize:10,color:"var(--text-dim)"},entryTime:{fontSize:9,color:"var(--text-dim)",marginLeft:"auto"},entryFile:{fontSize:10,color:"var(--accent)",fontFamily:"var(--font)"},entryDesc:{fontSize:10,color:"var(--text-primary)",marginTop:2},entryReason:{fontSize:10,color:"var(--text-dim)",marginTop:3,fontStyle:"italic"}},qy={all:"All Skills",design:"Design",quality:"Quality",devtools:"Dev Tools",workflow:"Workflow",security:"Security",specialized:"Specialized"},Dy={design:"✨",quality:"✔",devtools:"⚙",workflow:"↻",security:"⛨",specialized:"☆"},P4=[{id:"popular",label:"Popular"},{id:"rating",label:"Top Rated"},{id:"newest",label:"Newest"},{id:"name",label:"A–Z"}];function C4(t){return t.source==="claude-official"?{label:"Anthropic",color:"#d4a574",bg:"rgba(212, 165, 116, 0.12)"}:t.source==="groove-official"?{label:"Groove",color:"var(--accent)",bg:"rgba(51, 175, 188, 0.12)"}:t.verified?{label:"Verified",color:"var(--green)",bg:"rgba(74, 225, 104, 0.10)"}:null}function Ly({skill:t,size:e="small"}){const n=C4(t);if(!n)return null;const i=e==="small";return S.jsxs("span",{title:`${n.label} — Verified publisher`,style:{display:"inline-flex",alignItems:"center",gap:3,fontSize:i?9:10,fontWeight:600,color:n.color,background:n.bg,padding:i?"1px 6px":"2px 8px",borderRadius:3,letterSpacing:.3,flexShrink:0,cursor:"default"},children:[S.jsx("span",{style:{fontSize:i?8:10,lineHeight:1},children:"✓"}),n.label]})}function By(t){return t?t>=1e3?(t/1e3).toFixed(1).replace(/\.0$/,"")+"k":String(t):"0"}function m0(t){if(!t)return null;const e=Math.floor(t),n=t-e>=.3,i=[];for(let r=0;r<5;r++)r<e?i.push("★"):i.push("☆");return i.join("")}function WQ(t,e){const n=[...t];switch(e){case"popular":return n.sort((i,r)=>(r.downloads||0)-(i.downloads||0));case"rating":return n.sort((i,r)=>(r.rating||0)-(i.rating||0));case"name":return n.sort((i,r)=>i.name.localeCompare(r.name));case"newest":return n.reverse();default:return n}}function A4({current:t,onRate:e,disabled:n}){const[i,r]=D.useState(0);return S.jsx("div",{style:{display:"flex",gap:2,alignItems:"center"},children:[1,2,3,4,5].map(l=>{const a=i>0?l<=i:l<=(t||0);return S.jsx("span",{onClick:()=>!n&&e(l),onMouseEnter:()=>!n&&r(l),onMouseLeave:()=>r(0),style:{fontSize:18,cursor:n?"default":"pointer",color:a?"var(--amber)":"var(--bg-active)",transition:"color 0.1s, transform 0.1s",transform:i===l?"scale(1.2)":"none",userSelect:"none"},children:"★"},l)})})}function R4({skill:t,content:e,installing:n,onInstall:i,onUninstall:r,onRate:l,onClose:a}){const[c,f]=D.useState(0),[h,O]=D.useState(!1),[p,m]=D.useState(!1);if(!t)return null;async function y(b){m(!0);try{await l(t.id,b),f(b),O(!0)}catch{}m(!1)}return S.jsx("div",{style:Ee.overlay,onClick:a,children:S.jsxs("div",{style:Ee.container,onClick:b=>b.stopPropagation(),children:[S.jsxs("div",{style:Ee.topBar,children:[S.jsx(Ly,{skill:t,size:"large"}),S.jsx("button",{onClick:a,style:Ee.closeBtn,children:"×"})]}),S.jsxs("div",{style:Ee.header,children:[S.jsx("div",{style:{...Ee.icon,background:t.installed?"var(--green)":t.price>0?"var(--purple)":"var(--accent)"},children:t.icon||t.name.charAt(0)}),S.jsxs("div",{style:Ee.headerInfo,children:[S.jsx("div",{style:Ee.name,children:t.name}),S.jsxs("div",{style:Ee.author,children:["by ",t.author]}),S.jsxs("div",{style:Ee.meta,children:[t.rating>0&&S.jsxs("span",{style:Ee.metaItem,children:[S.jsx("span",{style:{color:"var(--amber)"},children:m0(t.rating)})," ",t.rating," (",t.ratingCount||0,")"]}),t.downloads>0&&S.jsxs("span",{style:Ee.metaItem,children:["⤓"," ",By(t.downloads)]}),S.jsxs("span",{style:Ee.metaItem,children:[Dy[t.category]||""," ",qy[t.category]||t.category]})]})]})]}),S.jsxs("div",{style:Ee.actionBar,children:[t.installed?S.jsx("button",{onClick:()=>r(t.id),disabled:n===t.id,style:Ee.uninstallBtn,children:n===t.id?"Removing...":"Uninstall"}):S.jsx("button",{onClick:()=>i(t.id),disabled:n===t.id,style:t.price>0?Ee.buyBtn:Ee.installBtn,children:n===t.id?"Installing...":t.price>0?`$${t.price.toFixed(2)}`:"Install"}),t.price===0&&!t.installed&&S.jsx("span",{style:Ee.freeLabel,children:"Free"})]}),S.jsxs("div",{style:Ee.section,children:[S.jsx("div",{style:Ee.sectionTitle,children:"Rating"}),S.jsxs("div",{style:Ee.ratingRow,children:[S.jsxs("div",{style:Ee.ratingLeft,children:[S.jsx("div",{style:Ee.ratingBig,children:t.rating||"-"}),S.jsx("div",{style:{color:"var(--amber)",fontSize:13},children:m0(t.rating)}),S.jsxs("div",{style:Ee.ratingCount,children:[t.ratingCount||0," ratings"]})]}),S.jsxs("div",{style:Ee.ratingRight,children:[S.jsx("div",{style:Ee.rateLabel,children:h?"Thanks for rating!":"Rate this skill"}),S.jsx(A4,{current:c,onRate:y,disabled:p||h}),p&&S.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:4},children:"Submitting..."})]})]})]}),S.jsxs("div",{style:Ee.section,children:[S.jsx("div",{style:Ee.sectionTitle,children:"About"}),S.jsx("div",{style:Ee.description,children:t.description})]}),S.jsxs("div",{style:Ee.section,children:[S.jsx("div",{style:Ee.sectionTitle,children:"Tags"}),S.jsxs("div",{style:Ee.tagRow,children:[(t.tags||[]).map(b=>S.jsx("span",{style:Ee.tag,children:b},b)),(t.roles||[]).map(b=>S.jsx("span",{style:Ee.roleTag,children:b},b))]})]}),t.authorProfile&&S.jsxs("div",{style:Ee.section,children:[S.jsx("div",{style:Ee.sectionTitle,children:"Developer"}),S.jsxs("div",{style:Ee.authorCard,children:[S.jsx("div",{style:Ee.authorAvatar,children:t.authorProfile.avatar?S.jsx("img",{src:t.authorProfile.avatar,alt:"",style:{width:"100%",height:"100%",borderRadius:6}}):t.author.charAt(0)}),S.jsxs("div",{style:Ee.authorDetails,children:[S.jsx("div",{style:Ee.authorName,children:t.author}),S.jsxs("div",{style:Ee.authorLinks,children:[t.authorProfile.website&&S.jsx("a",{href:t.authorProfile.website,target:"_blank",rel:"noopener noreferrer",style:Ee.authorLink,children:"Website"}),t.authorProfile.github&&S.jsx("a",{href:`https://github.com/${t.authorProfile.github}`,target:"_blank",rel:"noopener noreferrer",style:Ee.authorLink,children:"GitHub"}),t.authorProfile.twitter&&S.jsxs("a",{href:`https://x.com/${t.authorProfile.twitter}`,target:"_blank",rel:"noopener noreferrer",style:Ee.authorLink,children:["@",t.authorProfile.twitter]})]})]})]})]}),e&&S.jsxs("div",{style:Ee.section,children:[S.jsx("div",{style:Ee.sectionTitle,children:"Skill Instructions"}),S.jsxs("pre",{style:Ee.contentPre,children:[e.replace(/^---[\s\S]*?---\n/,"").trim().slice(0,2e3),e.length>2e3?`
|
|
74
|
+
...`:""]})]})]})})}function z4({skills:t,onSelect:e}){const n=t.filter(i=>i.featured).slice(0,3);return n.length===0?null:S.jsxs("div",{style:Pe.featuredSection,children:[S.jsx("div",{style:Pe.featuredLabel,children:"Featured"}),S.jsx("div",{style:Pe.featuredRow,children:n.map(i=>S.jsxs("div",{onClick:()=>e(i),style:Pe.featuredCard,onMouseEnter:r=>{r.currentTarget.style.borderColor="var(--accent)",r.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:r=>{r.currentTarget.style.borderColor="var(--border)",r.currentTarget.style.transform="none"},children:[S.jsx("div",{style:Pe.featuredGradient,children:S.jsx("div",{style:{...Pe.featuredIcon,background:i.installed?"var(--green)":"var(--accent)"},children:i.icon||i.name.charAt(0)})}),S.jsxs("div",{style:Pe.featuredInfo,children:[S.jsx("div",{style:Pe.featuredName,children:i.name}),S.jsxs("div",{style:Pe.featuredAuthorRow,children:[S.jsx("span",{style:Pe.featuredAuthor,children:i.author}),S.jsx(Ly,{skill:i})]}),S.jsx("div",{style:Pe.featuredDesc,children:i.description}),S.jsxs("div",{style:Pe.featuredMeta,children:[i.rating>0&&S.jsxs("span",{style:{color:"var(--amber)",fontSize:10},children:[m0(i.rating)," ",i.rating]}),S.jsxs("span",{style:{color:"var(--text-muted)",fontSize:10},children:["⤓"," ",By(i.downloads)]})]})]}),i.installed&&S.jsx("div",{style:Pe.featuredBadge,children:"installed"})]},i.id))})]})}function E4({skill:t,onSelect:e,hovered:n,onHover:i}){return S.jsxs("div",{onClick:()=>e(t),onMouseEnter:()=>i(t.id),onMouseLeave:()=>i(null),style:{...Pe.card,borderColor:t.installed?"var(--green)":n?"var(--accent)":"var(--border)",background:n?"var(--bg-hover)":"var(--bg-surface)",transform:n?"translateY(-1px)":"none"},children:[S.jsxs("div",{style:Pe.cardTop,children:[S.jsx("div",{style:{...Pe.cardIcon,background:t.installed?"var(--green)":t.price>0?"var(--purple)":"var(--accent)"},children:t.icon||t.name.charAt(0)}),S.jsxs("div",{style:Pe.cardInfo,children:[S.jsx("div",{style:Pe.cardName,children:t.name}),S.jsxs("div",{style:Pe.cardAuthorRow,children:[S.jsx("span",{style:Pe.cardAuthor,children:t.author}),S.jsx(Ly,{skill:t})]})]}),t.installed&&S.jsx("div",{style:Pe.installedBadge,children:"installed"}),t.price>0&&!t.installed&&S.jsxs("div",{style:Pe.priceBadge,children:["$",t.price.toFixed(2)]}),t.price===0&&!t.installed&&S.jsx("div",{style:Pe.freeBadge,children:"Free"})]}),S.jsx("div",{style:Pe.cardDesc,children:t.description}),S.jsxs("div",{style:Pe.cardBottom,children:[S.jsxs("div",{style:Pe.cardStats,children:[t.rating>0&&S.jsxs("span",{style:Pe.cardRating,children:[S.jsx("span",{style:{color:"var(--amber)"},children:"★"})," ",t.rating]}),t.downloads>0&&S.jsxs("span",{style:Pe.cardDownloads,children:["⤓"," ",By(t.downloads)]})]}),S.jsxs("span",{style:Pe.catTag,children:[Dy[t.category]||""," ",qy[t.category]||t.category]})]})]})}function _4(){const[t,e]=D.useState([]),[n,i]=D.useState([]),[r,l]=D.useState(""),[a,c]=D.useState("all"),[f,h]=D.useState("popular"),[O,p]=D.useState("browse"),[m,y]=D.useState(!0),[b,v]=D.useState(null),[k,Q]=D.useState(null),[P,T]=D.useState(null),[$,_]=D.useState(null),A=D.useCallback(async()=>{y(!0);try{const H=new URLSearchParams;r&&H.set("search",r),a!=="all"&&H.set("category",a);const W=await(await fetch(`/api/skills/registry?${H}`)).json();e(W.skills||[]),i(W.categories||[])}catch{}y(!1)},[r,a]);D.useEffect(()=>{A()},[A]);async function E(H){v(H);try{await fetch(`/api/skills/${H}/install`,{method:"POST"}),await A(),e(X=>{const W=X.find(R=>R.id===H);return W&&(k==null?void 0:k.id)===H&&Q({...W,installed:!0}),X})}catch{}v(null)}async function N(H){v(H);try{await fetch(`/api/skills/${H}`,{method:"DELETE"}),await A(),(k==null?void 0:k.id)===H&&(Q(X=>X?{...X,installed:!1}:null),T(null))}catch{}v(null)}async function G(H,X){const W=await fetch(`/api/skills/${H}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rating:X})});if(!W.ok)throw new Error("Rating failed");const R=await W.json();e(q=>q.map(B=>B.id===H?{...B,rating:R.rating,ratingCount:R.rating_count??R.ratingCount}:B)),(k==null?void 0:k.id)===H&&Q(q=>q?{...q,rating:R.rating,ratingCount:R.rating_count??R.ratingCount}:null)}async function ne(H){if(Q(H),T(null),H.installed)try{const W=await(await fetch(`/api/skills/${H.id}/content`)).json();T(W.content)}catch{}}const V=t.filter(H=>H.installed),Y=WQ(O==="installed"?V:t,f);return S.jsxs("div",{style:Pe.root,children:[S.jsxs("div",{style:Pe.headerBar,children:[S.jsxs("div",{style:Pe.headerLeft,children:[S.jsx("div",{style:Pe.title,children:"Skills Store"}),S.jsxs("div",{style:Pe.headerTabs,children:[S.jsx("button",{onClick:()=>p("browse"),style:{...Pe.headerTab,color:O==="browse"?"var(--text-bright)":"var(--text-dim)",borderBottom:O==="browse"?"2px solid var(--accent)":"2px solid transparent"},children:"Browse"}),S.jsxs("button",{onClick:()=>p("installed"),style:{...Pe.headerTab,color:O==="installed"?"var(--text-bright)":"var(--text-dim)",borderBottom:O==="installed"?"2px solid var(--green)":"2px solid transparent"},children:["My Skills (",V.length,")"]})]})]}),S.jsx("div",{style:Pe.headerRight,children:S.jsxs("span",{style:Pe.headerCount,children:[t.length," skills"]})})]}),S.jsxs("div",{style:Pe.toolbar,children:[S.jsxs("div",{style:Pe.searchRow,children:[S.jsxs("div",{style:Pe.searchWrap,children:[S.jsx("span",{style:Pe.searchIcon,children:"⌕"}),S.jsx("input",{style:Pe.search,placeholder:"Search skills...",value:r,onChange:H=>l(H.target.value)})]}),S.jsx("div",{style:Pe.sortWrap,children:P4.map(H=>S.jsx("button",{onClick:()=>h(H.id),style:{...Pe.sortBtn,color:f===H.id?"var(--text-bright)":"var(--text-muted)",background:f===H.id?"var(--bg-active)":"transparent"},children:H.label},H.id))})]}),O==="browse"&&S.jsxs("div",{style:Pe.catRow,children:[S.jsx("button",{onClick:()=>c("all"),style:{...Pe.catBtn,...a==="all"?Pe.catBtnActive:{}},children:"All"}),n.map(H=>S.jsxs("button",{onClick:()=>c(H.id),style:{...Pe.catBtn,...a===H.id?Pe.catBtnActive:{}},children:[Dy[H.id]||""," ",qy[H.id]||H.id," (",H.count,")"]},H.id))]})]}),S.jsxs("div",{style:Pe.scrollArea,children:[O==="browse"&&!r&&a==="all"&&S.jsx(z4,{skills:t,onSelect:ne}),m&&t.length===0&&S.jsx("div",{style:Pe.empty,children:"Loading skills..."}),!m&&Y.length===0&&S.jsx("div",{style:Pe.empty,children:O==="installed"?"No skills installed yet. Browse the store to find skills.":"No skills match your search."}),S.jsx("div",{style:Pe.grid,children:Y.map(H=>S.jsx(E4,{skill:H,onSelect:ne,hovered:$===H.id,onHover:_},H.id))})]}),S.jsx(R4,{skill:k,content:P,installing:b,onInstall:E,onUninstall:N,onRate:G,onClose:()=>{Q(null),T(null)}})]})}const Pe={root:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},headerBar:{padding:"12px 20px 0",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},headerLeft:{display:"flex",alignItems:"center",gap:20},title:{fontSize:15,fontWeight:700,color:"var(--text-bright)",letterSpacing:.3},headerTabs:{display:"flex",gap:0},headerTab:{padding:"6px 14px",background:"none",border:"none",fontSize:12,fontWeight:500,fontFamily:"var(--font)",cursor:"pointer",transition:"color 0.1s"},headerRight:{display:"flex",alignItems:"center",gap:10},headerCount:{fontSize:11,color:"var(--text-muted)"},toolbar:{padding:"10px 20px",flexShrink:0},searchRow:{display:"flex",gap:10,alignItems:"center"},searchWrap:{flex:1,position:"relative"},searchIcon:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)",fontSize:13,pointerEvents:"none"},search:{width:"100%",padding:"7px 12px 7px 30px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:6,color:"var(--text-primary)",fontSize:12,fontFamily:"var(--font)",outline:"none"},sortWrap:{display:"flex",gap:2},sortBtn:{padding:"5px 10px",background:"transparent",border:"1px solid transparent",borderRadius:4,fontSize:10,fontWeight:500,fontFamily:"var(--font)",cursor:"pointer",transition:"all 0.1s"},catRow:{display:"flex",gap:4,marginTop:8,flexWrap:"wrap"},catBtn:{padding:"4px 12px",background:"transparent",border:"1px solid var(--border)",borderRadius:14,color:"var(--text-dim)",fontSize:10,fontFamily:"var(--font)",cursor:"pointer",transition:"all 0.1s"},catBtnActive:{borderColor:"var(--accent)",color:"var(--accent)",background:"rgba(51, 175, 188, 0.08)"},scrollArea:{flex:1,overflowY:"auto",padding:"4px 20px 20px"},featuredSection:{marginBottom:16},featuredLabel:{fontSize:11,fontWeight:700,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:1,marginBottom:8},featuredRow:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:8},featuredCard:{padding:"14px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",transition:"border-color 0.15s, transform 0.15s",position:"relative",overflow:"hidden"},featuredGradient:{display:"flex",alignItems:"center",marginBottom:10},featuredIcon:{width:40,height:40,borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",fontSize:16,fontWeight:700,color:"var(--bg-base)"},featuredInfo:{flex:1},featuredName:{fontSize:13,fontWeight:700,color:"var(--text-bright)"},featuredAuthorRow:{display:"flex",alignItems:"center",gap:6,marginTop:2},featuredAuthor:{fontSize:10,color:"var(--text-muted)"},featuredDesc:{fontSize:10,color:"var(--text-dim)",marginTop:6,lineHeight:1.45,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},featuredMeta:{display:"flex",gap:10,marginTop:8},featuredBadge:{position:"absolute",top:8,right:8,fontSize:8,fontWeight:600,color:"var(--green)",border:"1px solid var(--green)",borderRadius:3,padding:"1px 5px",textTransform:"uppercase",letterSpacing:.5},grid:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:8},empty:{padding:"60px 0",textAlign:"center",color:"var(--text-dim)",fontSize:12,gridColumn:"1 / -1"},card:{padding:"14px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",transition:"border-color 0.12s, background 0.12s, transform 0.12s",display:"flex",flexDirection:"column"},cardTop:{display:"flex",alignItems:"center",gap:10},cardIcon:{width:36,height:36,borderRadius:8,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:700,color:"var(--bg-base)",flexShrink:0},cardInfo:{flex:1,minWidth:0},cardName:{fontSize:12,fontWeight:600,color:"var(--text-bright)"},cardAuthorRow:{display:"flex",alignItems:"center",gap:6,marginTop:2},cardAuthor:{fontSize:10,color:"var(--text-muted)"},installedBadge:{fontSize:8,fontWeight:600,color:"var(--green)",border:"1px solid var(--green)",borderRadius:3,padding:"1px 6px",textTransform:"uppercase",letterSpacing:.5,flexShrink:0},priceBadge:{fontSize:10,fontWeight:700,color:"var(--purple)",border:"1px solid var(--purple)",borderRadius:4,padding:"2px 8px",flexShrink:0},freeBadge:{fontSize:9,fontWeight:500,color:"var(--text-muted)",flexShrink:0},cardDesc:{fontSize:11,color:"var(--text-dim)",marginTop:10,lineHeight:1.5,flex:1,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},cardBottom:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:10,paddingTop:8,borderTop:"1px solid var(--border)"},cardStats:{display:"flex",gap:10},cardRating:{fontSize:10,color:"var(--text-dim)"},cardDownloads:{fontSize:10,color:"var(--text-muted)"},catTag:{fontSize:9,padding:"2px 8px",borderRadius:4,background:"var(--bg-active)",color:"var(--text-dim)",fontWeight:500}},Ee={overlay:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,backdropFilter:"blur(2px)"},container:{width:"90%",maxWidth:560,maxHeight:"85vh",background:"var(--bg-chrome)",border:"1px solid var(--border)",borderRadius:10,overflowY:"auto",padding:"0 24px 24px",position:"relative"},topBar:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 0 10px",position:"sticky",top:0,zIndex:1,background:"var(--bg-chrome)"},closeBtn:{background:"none",border:"1px solid var(--border)",borderRadius:4,color:"var(--text-dim)",fontSize:16,cursor:"pointer",fontFamily:"var(--font)",lineHeight:1,padding:"2px 8px",transition:"border-color 0.1s"},header:{display:"flex",gap:14,alignItems:"flex-start",marginBottom:14},actionBar:{display:"flex",alignItems:"center",gap:10,marginBottom:18,paddingBottom:16,borderBottom:"1px solid var(--border)"},icon:{width:52,height:52,borderRadius:12,display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"var(--bg-base)",flexShrink:0},headerInfo:{flex:1,minWidth:0},name:{fontSize:16,fontWeight:700,color:"var(--text-bright)"},author:{fontSize:11,color:"var(--text-dim)",marginTop:2},meta:{display:"flex",gap:12,marginTop:6,fontSize:11,color:"var(--text-dim)"},metaItem:{display:"flex",alignItems:"center",gap:3},installBtn:{padding:"8px 28px",background:"var(--accent)",border:"none",borderRadius:6,color:"var(--bg-base)",fontSize:12,fontWeight:700,fontFamily:"var(--font)",cursor:"pointer",transition:"opacity 0.1s"},buyBtn:{padding:"8px 28px",background:"var(--purple)",border:"none",borderRadius:6,color:"#fff",fontSize:12,fontWeight:700,fontFamily:"var(--font)",cursor:"pointer",transition:"opacity 0.1s"},uninstallBtn:{padding:"8px 20px",background:"transparent",border:"1px solid var(--red)",borderRadius:6,color:"var(--red)",fontSize:12,fontWeight:600,fontFamily:"var(--font)",cursor:"pointer"},freeLabel:{fontSize:9,color:"var(--text-muted)",fontWeight:500},section:{marginBottom:16},ratingRow:{display:"flex",gap:20,alignItems:"center",padding:"12px 14px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:6},ratingLeft:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,minWidth:70},ratingBig:{fontSize:24,fontWeight:700,color:"var(--text-bright)",lineHeight:1},ratingCount:{fontSize:9,color:"var(--text-muted)",marginTop:2},ratingRight:{flex:1},rateLabel:{fontSize:11,color:"var(--text-dim)",marginBottom:6},sectionTitle:{fontSize:10,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:.8,marginBottom:8},description:{fontSize:12,color:"var(--text-primary)",lineHeight:1.6},tagRow:{display:"flex",gap:5,flexWrap:"wrap"},tag:{fontSize:10,padding:"2px 8px",borderRadius:4,background:"var(--bg-active)",color:"var(--text-dim)"},roleTag:{fontSize:10,padding:"2px 8px",borderRadius:4,background:"rgba(51, 175, 188, 0.1)",color:"var(--accent)"},authorCard:{display:"flex",gap:12,alignItems:"center",padding:"10px 12px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:6},authorAvatar:{width:36,height:36,borderRadius:6,background:"var(--accent)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:700,color:"var(--bg-base)",flexShrink:0},authorDetails:{flex:1},authorName:{fontSize:12,fontWeight:600,color:"var(--text-bright)"},authorLinks:{display:"flex",gap:10,marginTop:4},authorLink:{fontSize:10,color:"var(--accent)",textDecoration:"none"},contentPre:{fontSize:10,color:"var(--text-dim)",lineHeight:1.6,fontFamily:"var(--font)",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:300,overflowY:"auto",padding:"10px 12px",background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:6}},UQ={javascript:"#e5c07b",typescript:"#61afef",css:"#c678dd",html:"#e06c75",json:"#4ae168",markdown:"#c678dd",python:"#61afef",rust:"#e06c75",go:"#33afbc",shell:"#4ae168",yaml:"#e06c75",text:"#abb2bf"};function p2({entry:t,depth:e,activeFile:n,expandedDirs:i,onToggleDir:r,onFileClick:l}){const a=t.type==="dir",c=i.has(t.path),f=!a&&t.path===n,O=Qe(p=>p.editorTreeCache)[t.path]||[];return S.jsxs(S.Fragment,{children:[S.jsxs("div",{onClick:()=>a?r(t.path,t.hasChildren):l(t.path),style:{...Bi.row,paddingLeft:12+e*16,background:f?"var(--bg-active)":"transparent",borderLeft:f?"2px solid var(--accent)":"2px solid transparent"},children:[a?S.jsx("span",{style:Bi.arrow,children:c?"▾":"▸"}):S.jsx("span",{style:{...Bi.fileDot,background:UQ[t.language]||UQ.text}}),S.jsx("span",{style:{...Bi.name,color:a?"var(--text-primary)":f?"var(--text-bright)":"var(--text-primary)",fontWeight:a?600:400},children:t.name}),!a&&t.size>0&&S.jsx("span",{style:Bi.size,children:j4(t.size)})]}),a&&c&&O.map(p=>S.jsx(p2,{entry:p,depth:e+1,activeFile:n,expandedDirs:i,onToggleDir:r,onFileClick:l},p.path))]})}function j4(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(0)}K`:`${(t/(1024*1024)).toFixed(1)}M`}function M4(){const t=Qe(p=>p.editorTreeCache),e=Qe(p=>p.editorActiveFile),n=Qe(p=>p.fetchTreeDir),i=Qe(p=>p.openFile),[r,l]=D.useState(new Set([""])),[a,c]=D.useState("");D.useEffect(()=>{n("")},[n]);const f=D.useCallback((p,m)=>{l(y=>{const b=new Set(y);return b.has(p)?b.delete(p):(b.add(p),(m||!t[p])&&n(p)),b})},[n,t]),h=t[""]||[],O=a?h.filter(p=>p.name.toLowerCase().includes(a.toLowerCase())):h;return S.jsxs("div",{style:Bi.container,children:[S.jsx("div",{style:Bi.searchWrap,children:S.jsx("input",{type:"text",placeholder:"Filter...",value:a,onChange:p=>c(p.target.value),style:Bi.searchInput})}),S.jsxs("div",{style:Bi.tree,children:[O.length===0&&S.jsx("div",{style:Bi.empty,children:h.length===0?"Loading...":"No matches"}),O.map(p=>S.jsx(p2,{entry:p,depth:0,activeFile:e,expandedDirs:r,onToggleDir:f,onFileClick:i},p.path))]})]})}const Bi={container:{display:"flex",flexDirection:"column",height:"100%",background:"var(--bg-chrome)"},searchWrap:{padding:"8px 8px 6px",borderBottom:"1px solid var(--border)"},searchInput:{width:"100%",padding:"5px 8px",background:"var(--bg-base)",border:"1px solid var(--border)",borderRadius:3,color:"var(--text-primary)",fontSize:11,fontFamily:"var(--font)",outline:"none"},tree:{flex:1,overflowY:"auto",overflowX:"hidden"},row:{display:"flex",alignItems:"center",gap:6,padding:"4px 12px",cursor:"pointer",transition:"background 0.08s",whiteSpace:"nowrap"},arrow:{fontSize:10,color:"var(--text-muted)",width:10,flexShrink:0,textAlign:"center"},fileDot:{width:6,height:6,borderRadius:"50%",flexShrink:0},name:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",flex:1,minWidth:0},size:{fontSize:9,color:"var(--text-muted)",flexShrink:0},empty:{padding:16,textAlign:"center",fontSize:11,color:"var(--text-dim)"}};function X4(){const t=Qe(l=>l.editorOpenTabs),e=Qe(l=>l.editorActiveFile),n=Qe(l=>l.editorFiles),i=Qe(l=>l.setActiveFile),r=Qe(l=>l.closeFile);return t.length===0?null:S.jsx("div",{style:xc.container,children:t.map(l=>{const a=n[l],c=l===e,f=a&&a.content!==a.originalContent,h=l.split("/").pop();return S.jsxs("div",{onClick:()=>i(l),title:l,style:{...xc.tab,color:c?"var(--text-bright)":"var(--text-primary)",borderBottom:c?"2px solid var(--accent)":"2px solid transparent",background:c?"var(--bg-active)":"transparent"},children:[f&&S.jsx("span",{style:xc.dirtyDot}),S.jsx("span",{style:xc.tabName,children:h}),S.jsx("button",{onClick:O=>{O.stopPropagation(),r(l)},style:xc.closeBtn,children:"x"})]},l)})})}const xc={container:{display:"flex",alignItems:"center",height:32,flexShrink:0,background:"var(--bg-chrome)",borderBottom:"1px solid var(--border)",overflowX:"auto",overflowY:"hidden"},tab:{display:"flex",alignItems:"center",gap:5,padding:"0 12px",height:"100%",cursor:"pointer",whiteSpace:"nowrap",fontSize:11,fontFamily:"var(--font)",transition:"background 0.08s",borderRight:"1px solid var(--border)",flexShrink:0},tabName:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:140},dirtyDot:{width:6,height:6,borderRadius:"50%",background:"var(--amber)",flexShrink:0},closeBtn:{background:"none",border:"none",color:"var(--text-muted)",fontSize:10,cursor:"pointer",fontFamily:"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,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?g2:y0).push(n=n+t[e])})();function Z4(t){if(t<768)return!1;for(let e=0,n=y0.length;;){let i=e+n>>1;if(t<y0[i])n=i;else if(t>=g2[i])e=i+1;else return!0;if(e==n)return!1}}function GQ(t){return t>=127462&&t<=127487}const HQ=8205;function q4(t,e,n=!0,i=!0){return(n?m2:D4)(t,e,i)}function m2(t,e,n){if(e==t.length)return e;e&&y2(t.charCodeAt(e))&&x2(t.charCodeAt(e-1))&&e--;let i=cm(t,e);for(e+=IQ(i);e<t.length;){let r=cm(t,e);if(i==HQ||r==HQ||n&&Z4(r))e+=IQ(r),i=r;else if(GQ(r)){let l=0,a=e-2;for(;a>=0&&GQ(cm(t,a));)l++,a-=2;if(l%2==0)break;e+=2}else break}return e}function D4(t,e,n){for(;e>0;){let i=m2(t,e-2,n);if(i<e)return i;e--}return 0}function cm(t,e){let n=t.charCodeAt(e);if(!x2(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return y2(i)?(n-55296<<10)+(i-56320)+65536:n}function y2(t){return t>=56320&&t<57344}function x2(t){return t>=55296&&t<56320}function IQ(t){return t<65536?1:2}class Ie{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=so(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Ni.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=so(this,e,n);let i=[];return this.decompose(e,n,i,0),Ni.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Mc(this),l=new Mc(e);for(let a=n,c=n;;){if(r.next(a),l.next(a),a=0,r.lineBreak!=l.lineBreak||r.done!=l.done||r.value!=l.value)return!1;if(c+=r.value.length,r.done||c>=i)return!0}}iter(e=1){return new Mc(this,e)}iterRange(e,n=this.length){return new S2(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new b2(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ie.empty:e.length<=32?new At(e):Ni.from(At.split(e,[]))}}class At extends Ie{constructor(e,n=L4(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let l=0;;l++){let a=this.text[l],c=r+a.length;if((n?i:c)>=e)return new B4(r,c,i,a);r=c+1,i++}}decompose(e,n,i,r){let l=e<=0&&n>=this.length?this:new At(FQ(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let a=i.pop(),c=Uh(l.text,a.text.slice(),0,l.length);if(c.length<=32)i.push(new At(c,a.length+l.length));else{let f=c.length>>1;i.push(new At(c.slice(0,f)),new At(c.slice(f)))}}else i.push(l)}replace(e,n,i){if(!(i instanceof At))return super.replace(e,n,i);[e,n]=so(this,e,n);let r=Uh(this.text,Uh(i.text,FQ(this.text,0,e)),n),l=this.length+i.length-(n-e);return r.length<=32?new At(r,l):Ni.from(At.split(r,[]),l)}sliceString(e,n=this.length,i=`
|
|
75
|
+
`){[e,n]=so(this,e,n);let r="";for(let l=0,a=0;l<=n&&a<this.text.length;a++){let c=this.text[a],f=l+c.length;l>e&&a&&(r+=i),e<f&&n>l&&(r+=c.slice(Math.max(0,e-l),n-l)),l=f+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let l of e)i.push(l),r+=l.length+1,i.length==32&&(n.push(new At(i,r)),i=[],r=-1);return r>-1&&n.push(new At(i,r)),n}}class Ni extends Ie{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let l=0;;l++){let a=this.children[l],c=r+a.length,f=i+a.lines-1;if((n?f:c)>=e)return a.lineInner(e,n,i,r);r=c+1,i=f+1}}decompose(e,n,i,r){for(let l=0,a=0;a<=n&&l<this.children.length;l++){let c=this.children[l],f=a+c.length;if(e<=f&&n>=a){let h=r&((a<=e?1:0)|(f>=n?2:0));a>=e&&f<=n&&!h?i.push(c):c.decompose(e-a,n-a,i,h)}a=f+1}}replace(e,n,i){if([e,n]=so(this,e,n),i.lines<this.lines)for(let r=0,l=0;r<this.children.length;r++){let a=this.children[r],c=l+a.length;if(e>=l&&n<=c){let f=a.replace(e-l,n-l,i),h=this.lines-a.lines+f.lines;if(f.lines<h>>4&&f.lines>h>>6){let O=this.children.slice();return O[r]=f,new Ni(O,this.length-(n-e)+i.length)}return super.replace(l,c,f)}l=c+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=`
|
|
76
|
+
`){[e,n]=so(this,e,n);let r="";for(let l=0,a=0;l<this.children.length&&a<=n;l++){let c=this.children[l],f=a+c.length;a>e&&l&&(r+=i),e<f&&n>a&&(r+=c.sliceString(e-a,n-a,i)),a=f+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ni))return 0;let i=0,[r,l,a,c]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,l+=n){if(r==a||l==c)return i;let f=this.children[r],h=e.children[l];if(f!=h)return i+f.scanIdentical(h,n);i+=f.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let y of e)i+=y.lines;if(i<32){let y=[];for(let b of e)b.flatten(y);return new At(y,n)}let r=Math.max(32,i>>5),l=r<<1,a=r>>1,c=[],f=0,h=-1,O=[];function p(y){let b;if(y.lines>l&&y instanceof Ni)for(let v of y.children)p(v);else y.lines>a&&(f>a||!f)?(m(),c.push(y)):y instanceof At&&f&&(b=O[O.length-1])instanceof At&&y.lines+b.lines<=32?(f+=y.lines,h+=y.length+1,O[O.length-1]=new At(b.text.concat(y.text),b.length+1+y.length)):(f+y.lines>r&&m(),f+=y.lines,h+=y.length+1,O.push(y))}function m(){f!=0&&(c.push(O.length==1?O[0]:Ni.from(O,h)),h=-1,f=O.length=0)}for(let y of e)p(y);return m(),c.length==1?c[0]:new Ni(c,n)}}Ie.empty=new At([""],0);function L4(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Uh(t,e,n=0,i=1e9){for(let r=0,l=0,a=!0;l<t.length&&r<=i;l++){let c=t[l],f=r+c.length;f>=n&&(f>i&&(c=c.slice(0,i-r)),r<n&&(c=c.slice(n-r)),a?(e[e.length-1]+=c,a=!1):e.push(c)),r=f+1}return e}function FQ(t,e,n){return Uh(t,[""],e,n)}class Mc{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof At?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],l=this.offsets[i],a=l>>1,c=r instanceof At?r.text.length:r.children.length;if(a==(n>0?c:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
77
|
+
`,this;e--}else if(r instanceof At){let f=r.text[a+(n<0?-1:0)];if(this.offsets[i]+=n,f.length>Math.max(0,e))return this.value=e==0?f:n>0?f.slice(e):f.slice(0,f.length-e),this;e-=f.length}else{let f=r.children[a+(n<0?-1:0)];e>f.length?(e-=f.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(f),this.offsets.push(n>0?1:(f instanceof At?f.text.length:f.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class S2{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Mc(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class b2{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ie.prototype[Symbol.iterator]=function(){return this.iter()},Mc.prototype[Symbol.iterator]=S2.prototype[Symbol.iterator]=b2.prototype[Symbol.iterator]=function(){return this});let B4=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function so(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Ht(t,e,n=!0,i=!0){return q4(t,e,n,i)}function N4(t){return t>=56320&&t<57344}function V4(t){return t>=55296&&t<56320}function vs(t,e){let n=t.charCodeAt(e);if(!V4(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return N4(i)?(n-55296<<10)+(i-56320)+65536:n}function v2(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function ml(t){return t<65536?1:2}const x0=/\r\n?|\n/;var Sn=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(Sn||(Sn={}));class Ii{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n+1];e+=i<0?this.sections[n]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,i=0,r=0;n<this.sections.length;){let l=this.sections[n++],a=this.sections[n++];a<0?(e(i,r,l),r+=l):r+=a,i+=l}}iterChangedRanges(e,n=!1){S0(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];r<0?e.push(i,r):e.push(r,i)}return new Ii(e)}composeDesc(e){return this.empty?e:e.empty?this:Q2(this,e)}mapDesc(e,n=!1){return e.empty?this:b0(this,e,n)}mapPos(e,n=-1,i=Sn.Simple){let r=0,l=0;for(let a=0;a<this.sections.length;){let c=this.sections[a++],f=this.sections[a++],h=r+c;if(f<0){if(h>e)return l+(e-r);l+=c}else{if(i!=Sn.Simple&&h>=e&&(i==Sn.TrackDel&&r<e&&h>e||i==Sn.TrackBefore&&r<e||i==Sn.TrackAfter&&h>e))return null;if(h>e||h==e&&n<0&&!c)return e==r||n<0?l:l+f;l+=f}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return l}touchesRange(e,n=e){for(let i=0,r=0;i<this.sections.length&&r<=n;){let l=this.sections[i++],a=this.sections[i++],c=r+l;if(a>=0&&r<=n&&c>=e)return r<e&&c>n?"cover":!0;r=c}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ii(e)}static create(e){return new Ii(e)}}class Nt extends Ii{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return S0(this,(n,i,r,l,a)=>e=e.replace(r,r+(i-n),a),!1),e}mapDesc(e,n=!1){return b0(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,l=0;r<n.length;r+=2){let a=n[r],c=n[r+1];if(c>=0){n[r]=c,n[r+1]=a;let f=r>>1;for(;i.length<f;)i.push(Ie.empty);i.push(a?e.slice(l,l+a):Ie.empty)}l+=a}return new Nt(n,i)}compose(e){return this.empty?e:e.empty?this:Q2(this,e,!0)}map(e,n=!1){return e.empty?this:b0(this,e,n,!0)}iterChanges(e,n=!1){S0(this,e,n)}get desc(){return Ii.create(this.sections)}filter(e){let n=[],i=[],r=[],l=new Jc(this);e:for(let a=0,c=0;;){let f=a==e.length?1e9:e[a++];for(;c<f||c==f&&l.len==0;){if(l.done)break e;let O=Math.min(l.len,f-c);hn(r,O,-1);let p=l.ins==-1?-1:l.off==0?l.ins:0;hn(n,O,p),p>0&&$s(i,n,l.text),l.forward(O),c+=O}let h=e[a++];for(;c<h;){if(l.done)break e;let O=Math.min(l.len,h-c);hn(n,O,-1),hn(r,O,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(O),c+=O}}return{changes:new Nt(n,i),filtered:Ii.create(r)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n],r=this.sections[n+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,i){let r=[],l=[],a=0,c=null;function f(O=!1){if(!O&&!r.length)return;a<n&&hn(r,n-a,-1);let p=new Nt(r,l);c=c?c.compose(p.map(c)):p,r=[],l=[],a=0}function h(O){if(Array.isArray(O))for(let p of O)h(p);else if(O instanceof Nt){if(O.length!=n)throw new RangeError(`Mismatched change set length (got ${O.length}, expected ${n})`);f(),c=c?c.compose(O.map(c)):O}else{let{from:p,to:m=p,insert:y}=O;if(p>m||p<0||m>n)throw new RangeError(`Invalid change range ${p} to ${m} (in doc of length ${n})`);let b=y?typeof y=="string"?Ie.of(y.split(i||x0)):y:Ie.empty,v=b.length;if(p==m&&v==0)return;p<a&&f(),p>a&&hn(r,p-a,-1),hn(r,m-p,v),$s(l,r,b),a=m}}return h(e),f(!c),c}static empty(e){return new Nt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;r<e.length;r++){let l=e[r];if(typeof l=="number")n.push(l,-1);else{if(!Array.isArray(l)||typeof l[0]!="number"||l.some((a,c)=>c&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)n.push(l[0],0);else{for(;i.length<r;)i.push(Ie.empty);i[r]=Ie.of(l.slice(1)),n.push(l[0],i[r].length)}}}return new Nt(n,i)}static createSet(e,n){return new Nt(e,n)}}function hn(t,e,n,i=!1){if(e==0&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function $s(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<i;)t.push(Ie.empty);t.push(n)}}function S0(t,e,n){let i=t.inserted;for(let r=0,l=0,a=0;a<t.sections.length;){let c=t.sections[a++],f=t.sections[a++];if(f<0)r+=c,l+=c;else{let h=r,O=l,p=Ie.empty;for(;h+=c,O+=f,f&&i&&(p=p.append(i[a-2>>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)c=t.sections[a++],f=t.sections[a++];e(r,h,l,O,p),r=h,l=O}}}function b0(t,e,n,i=!1){let r=[],l=i?[]:null,a=new Jc(t),c=new Jc(e);for(let f=-1;;){if(a.done&&c.len||c.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&c.ins==-1){let h=Math.min(a.len,c.len);hn(r,h,-1),a.forward(h),c.forward(h)}else if(c.ins>=0&&(a.ins<0||f==a.i||a.off==0&&(c.len<a.len||c.len==a.len&&!n))){let h=c.len;for(hn(r,c.ins,-1);h;){let O=Math.min(a.len,h);a.ins>=0&&f<a.i&&a.len<=O&&(hn(r,0,a.ins),l&&$s(l,r,a.text),f=a.i),a.forward(O),h-=O}c.next()}else if(a.ins>=0){let h=0,O=a.len;for(;O;)if(c.ins==-1){let p=Math.min(O,c.len);h+=p,O-=p,c.forward(p)}else if(c.ins==0&&c.len<O)O-=c.len,c.next();else break;hn(r,h,f<a.i?a.ins:0),l&&f<a.i&&$s(l,r,a.text),f=a.i,a.forward(a.len-O)}else{if(a.done&&c.done)return l?Nt.createSet(r,l):Ii.create(r);throw new Error("Mismatched change set lengths")}}}function Q2(t,e,n=!1){let i=[],r=n?[]:null,l=new Jc(t),a=new Jc(e);for(let c=!1;;){if(l.done&&a.done)return r?Nt.createSet(i,r):Ii.create(i);if(l.ins==0)hn(i,l.len,0,c),l.next();else if(a.len==0&&!a.done)hn(i,0,a.ins,c),r&&$s(r,i,a.text),a.next();else{if(l.done||a.done)throw new Error("Mismatched change set lengths");{let f=Math.min(l.len2,a.len),h=i.length;if(l.ins==-1){let O=a.ins==-1?-1:a.off?0:a.ins;hn(i,f,O,c),r&&O&&$s(r,i,a.text)}else a.ins==-1?(hn(i,l.off?0:l.len,f,c),r&&$s(r,i,l.textBit(f))):(hn(i,l.off?0:l.len,a.off?0:a.ins,c),r&&!a.off&&$s(r,i,a.text));c=(l.ins>f||a.ins>=0&&a.len>f)&&(c||i.length>h),l.forward2(f),a.forward(f)}}}}class Jc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ie.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Ie.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class bl{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new bl(i,r,this.flags)}extend(e,n=e,i=0){if(e<=this.anchor&&n>=this.anchor)return oe.range(e,n,void 0,void 0,i);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return oe.range(this.anchor,r,void 0,void 0,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return oe.range(e.anchor,e.head)}static create(e,n,i){return new bl(e,n,i)}}class oe{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:oe.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new oe([this.main],0)}addRange(e,n=!0){return oe.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let i=this.ranges.slice();return i[n]=e,oe.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new oe(e.ranges.map(n=>bl.fromJSON(n)),e.main)}static single(e,n=e){return new oe([oe.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let l=e[r];if(l.empty?l.from<=i:l.from<i)return oe.normalized(e.slice(),n);i=l.to}return new oe(e,n)}static cursor(e,n=0,i,r){return bl.create(e,e,(n==0?0:n<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,n,i,r,l){let a=(i??16777215)<<6|(r==null?7:Math.min(6,r));return!l&&e!=n&&(l=n<e?1:-1),n<e?bl.create(n,e,48|a):bl.create(e,n,(l?l<0?8:16:0)|a)}static normalized(e,n=0){let i=e[n];e.sort((r,l)=>r.from-l.from),n=e.indexOf(i);for(let r=1;r<e.length;r++){let l=e[r],a=e[r-1];if(l.empty?l.from<=a.to:l.from<a.to){let c=a.from,f=Math.max(l.to,a.to);r<=n&&n--,e.splice(--r,2,l.anchor>l.head?oe.range(f,c):oe.range(c,f))}}return new oe(e,n)}}function w2(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Ny=0;class xe{constructor(e,n,i,r,l){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=Ny++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new xe(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:Vy),!!e.static,e.enables)}of(e){return new Gh([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Gh(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Gh(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function Vy(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class Gh{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=Ny++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,l=this.id,a=e[l]>>1,c=this.type==2,f=!1,h=!1,O=[];for(let p of this.dependencies)p=="doc"?f=!0:p=="selection"?h=!0:(((n=e[p.id])!==null&&n!==void 0?n:1)&1)==0&&O.push(e[p.id]);return{create(p){return p.values[a]=i(p),1},update(p,m){if(f&&m.docChanged||h&&(m.docChanged||m.selection)||v0(p,O)){let y=i(p);if(c?!KQ(y,p.values[a],r):!r(y,p.values[a]))return p.values[a]=y,1}return 0},reconfigure:(p,m)=>{let y,b=m.config.address[l];if(b!=null){let v=xd(m,b);if(this.dependencies.every(k=>k instanceof xe?m.facet(k)===p.facet(k):k instanceof Kn?m.field(k,!1)==p.field(k,!1):!0)||(c?KQ(y=i(p),v,r):r(y=i(p),v)))return p.values[a]=v,0}else y=i(p);return p.values[a]=y,1}}}}function KQ(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function v0(t,e){let n=!1;for(let i of e)Xc(t,i)&1&&(n=!0);return n}function Y4(t,e,n){let i=n.map(f=>t[f.id]),r=n.map(f=>f.type),l=i.filter(f=>!(f&1)),a=t[e.id]>>1;function c(f){let h=[];for(let O=0;O<i.length;O++){let p=xd(f,i[O]);if(r[O]==2)for(let m of p)h.push(m);else h.push(p)}return e.combine(h)}return{create(f){for(let h of i)Xc(f,h);return f.values[a]=c(f),1},update(f,h){if(!v0(f,l))return 0;let O=c(f);return e.compare(O,f.values[a])?0:(f.values[a]=O,1)},reconfigure(f,h){let O=v0(f,i),p=h.config.facets[e.id],m=h.facet(e);if(p&&!O&&Vy(n,p))return f.values[a]=m,0;let y=c(f);return e.compare(y,m)?(f.values[a]=m,0):(f.values[a]=y,1)}}}const yh=xe.define({static:!0});class Kn{constructor(e,n,i,r,l){this.id=e,this.createF=n,this.updateF=i,this.compareF=r,this.spec=l,this.provides=void 0}static define(e){let n=new Kn(Ny++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(yh).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let l=i.values[n],a=this.updateF(l,r);return this.compareF(l,a)?0:(i.values[n]=a,1)},reconfigure:(i,r)=>{let l=i.facet(yh),a=r.facet(yh),c;return(c=l.find(f=>f.field==this))&&c!=a.find(f=>f.field==this)?(i.values[n]=c.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,yh.of({field:this,create:e})]}get extension(){return this}}const yl={lowest:4,low:3,default:2,high:1,highest:0};function Sc(t){return e=>new k2(e,t)}const Zr={highest:Sc(yl.highest),high:Sc(yl.high),default:Sc(yl.default),low:Sc(yl.low),lowest:Sc(yl.lowest)};class k2{constructor(e,n){this.inner=e,this.prec=n}}class wu{of(e){return new Q0(this,e)}reconfigure(e){return wu.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Q0{constructor(e,n){this.compartment=e,this.inner=n}}class yd{constructor(e,n,i,r,l,a){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=l,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,i){let r=[],l=Object.create(null),a=new Map;for(let m of W4(e,n,a))m instanceof Kn?r.push(m):(l[m.facet.id]||(l[m.facet.id]=[])).push(m);let c=Object.create(null),f=[],h=[];for(let m of r)c[m.id]=h.length<<1,h.push(y=>m.slot(y));let O=i==null?void 0:i.config.facets;for(let m in l){let y=l[m],b=y[0].facet,v=O&&O[m]||[];if(y.every(k=>k.type==0))if(c[b.id]=f.length<<1|1,Vy(v,y))f.push(i.facet(b));else{let k=b.combine(y.map(Q=>Q.value));f.push(i&&b.compare(k,i.facet(b))?i.facet(b):k)}else{for(let k of y)k.type==0?(c[k.id]=f.length<<1|1,f.push(k.value)):(c[k.id]=h.length<<1,h.push(Q=>k.dynamicSlot(Q)));c[b.id]=h.length<<1,h.push(k=>Y4(k,b,y))}}let p=h.map(m=>m(c));return new yd(e,a,p,c,f,l)}}function W4(t,e,n){let i=[[],[],[],[],[]],r=new Map;function l(a,c){let f=r.get(a);if(f!=null){if(f<=c)return;let h=i[f].indexOf(a);h>-1&&i[f].splice(h,1),a instanceof Q0&&n.delete(a.compartment)}if(r.set(a,c),Array.isArray(a))for(let h of a)l(h,c);else if(a instanceof Q0){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(a.compartment)||a.inner;n.set(a.compartment,h),l(h,c)}else if(a instanceof k2)l(a.inner,a.prec);else if(a instanceof Kn)i[c].push(a),a.provides&&l(a.provides,c);else if(a instanceof Gh)i[c].push(a),a.facet.extensions&&l(a.facet.extensions,yl.default);else{let h=a.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(h,c)}}return l(t,yl.default),i.reduce((a,c)=>a.concat(c))}function Xc(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function xd(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const T2=xe.define(),w0=xe.define({combine:t=>t.some(e=>e),static:!0}),$2=xe.define({combine:t=>t.length?t[0]:void 0,static:!0}),P2=xe.define(),C2=xe.define(),A2=xe.define(),R2=xe.define({combine:t=>t.length?t[0]:!1});class qr{constructor(e,n){this.type=e,this.value=n}static define(){return new U4}}class U4{of(e){return new qr(this,e)}}class G4{constructor(e){this.map=e}of(e){return new Ne(this,e)}}class Ne{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ne(this.type,n)}is(e){return this.type==e}static define(e={}){return new G4(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let l=r.map(n);l&&i.push(l)}return i}}Ne.reconfigure=Ne.define();Ne.appendConfig=Ne.define();class Zt{constructor(e,n,i,r,l,a){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=l,this.scrollIntoView=a,this._doc=null,this._state=null,i&&w2(i,n.newLength),l.some(c=>c.type==Zt.time)||(this.annotations=l.concat(Zt.time.of(Date.now())))}static create(e,n,i,r,l,a){return new Zt(e,n,i,r,l,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Zt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Zt.time=qr.define();Zt.userEvent=qr.define();Zt.addToHistory=qr.define();Zt.remote=qr.define();function H4(t,e){let n=[];for(let i=0,r=0;;){let l,a;if(i<t.length&&(r==e.length||e[r]>=t[i]))l=t[i++],a=t[i++];else if(r<e.length)l=e[r++],a=e[r++];else return n;!n.length||n[n.length-1]<l?n.push(l,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function z2(t,e,n){var i;let r,l,a;return n?(r=e.changes,l=Nt.empty(e.changes.length),a=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),l=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(r)),{changes:a,selection:e.selection?e.selection.map(l):(i=t.selection)===null||i===void 0?void 0:i.map(r),effects:Ne.mapEffects(t.effects,r).concat(Ne.mapEffects(e.effects,l)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function k0(t,e,n){let i=e.selection,r=Ba(e.annotations);return e.userEvent&&(r=r.concat(Zt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Nt?e.changes:Nt.of(e.changes||[],n,t.facet($2)),selection:i&&(i instanceof oe?i:oe.single(i.anchor,i.head)),effects:Ba(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function E2(t,e,n){let i=k0(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let l=1;l<e.length;l++){e[l].filter===!1&&(n=!1);let a=!!e[l].sequential;i=z2(i,k0(t,e[l],a?i.changes.newLength:t.doc.length),a)}let r=Zt.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return F4(n?I4(r):r)}function I4(t){let e=t.startState,n=!0;for(let r of e.facet(P2)){let l=r(t);if(l===!1){n=!1;break}Array.isArray(l)&&(n=n===!0?l:H4(n,l))}if(n!==!0){let r,l;if(n===!1)l=t.changes.invertedDesc,r=Nt.empty(e.doc.length);else{let a=t.changes.filter(n);r=a.changes,l=a.filtered.mapDesc(a.changes).invertedDesc}t=Zt.create(e,r,t.selection&&t.selection.map(l),Ne.mapEffects(t.effects,l),t.annotations,t.scrollIntoView)}let i=e.facet(C2);for(let r=i.length-1;r>=0;r--){let l=i[r](t);l instanceof Zt?t=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Zt?t=l[0]:t=E2(e,Ba(l),!1)}return t}function F4(t){let e=t.startState,n=e.facet(A2),i=t;for(let r=n.length-1;r>=0;r--){let l=n[r](t);l&&Object.keys(l).length&&(i=z2(i,k0(e,l,t.changes.newLength),!0))}return i==t?t:Zt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const K4=[];function Ba(t){return t==null?K4:Array.isArray(t)?t:[t]}var Rt=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(Rt||(Rt={}));const J4=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let T0;try{T0=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function eq(t){if(T0)return T0.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||J4.test(n)))return!0}return!1}function tq(t){return e=>{if(!/\S/.test(e))return Rt.Space;if(eq(e))return Rt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Rt.Word;return Rt.Other}}class Ke{constructor(e,n,i,r,l,a){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=l,a&&(a._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)Xc(this,c<<1);this.computeSlot=null}field(e,n=!0){let i=this.config.address[e.id];if(i==null){if(n)throw new RangeError("Field is not present in this state");return}return Xc(this,i),xd(this,i)}update(...e){return E2(this,e,!0)}applyTransaction(e){let n=this.config,{base:i,compartments:r}=n;for(let c of e.effects)c.is(wu.reconfigure)?(n&&(r=new Map,n.compartments.forEach((f,h)=>r.set(h,f)),n=null),r.set(c.value.compartment,c.value.extension)):c.is(Ne.reconfigure)?(n=null,i=c.value):c.is(Ne.appendConfig)&&(n=null,i=Ba(i).concat(c.value));let l;n?l=e.startState.values.slice():(n=yd.resolve(i,r,this),l=new Ke(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(f,h)=>h.reconfigure(f,this),null).values);let a=e.startState.facet(w0)?e.newSelection:e.newSelection.asSingle();new Ke(n,e.newDoc,a,l,(c,f)=>f.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:oe.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),l=[i.range],a=Ba(i.effects);for(let c=1;c<n.ranges.length;c++){let f=e(n.ranges[c]),h=this.changes(f.changes),O=h.map(r);for(let m=0;m<c;m++)l[m]=l[m].map(O);let p=r.mapDesc(h,!0);l.push(f.range.map(p)),r=r.compose(O),a=Ne.mapEffects(a,O).concat(Ne.mapEffects(Ba(f.effects),p))}return{changes:r,selection:oe.create(l,n.mainIndex),effects:a}}changes(e=[]){return e instanceof Nt?e:Nt.of(e,this.doc.length,this.facet(Ke.lineSeparator))}toText(e){return Ie.of(e.split(this.facet(Ke.lineSeparator)||x0))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Xc(this,n),xd(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof Kn&&this.config.address[r.id]!=null&&(n[i]=r.spec.toJSON(this.field(e[i]),this))}return n}static fromJSON(e,n={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let l in i)if(Object.prototype.hasOwnProperty.call(e,l)){let a=i[l],c=e[l];r.push(a.init(f=>a.spec.fromJSON(c,f)))}}return Ke.create({doc:e.doc,selection:oe.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=yd.resolve(e.extensions||[],new Map),i=e.doc instanceof Ie?e.doc:Ie.of((e.doc||"").split(n.staticFacet(Ke.lineSeparator)||x0)),r=e.selection?e.selection instanceof oe?e.selection:oe.single(e.selection.anchor,e.selection.head):oe.single(0);return w2(r,i.length),n.staticFacet(w0)||(r=r.asSingle()),new Ke(n,i,r,n.dynamicSlots.map(()=>null),(l,a)=>a.create(l),null)}get tabSize(){return this.facet(Ke.tabSize)}get lineBreak(){return this.facet(Ke.lineSeparator)||`
|
|
78
|
+
`}get readOnly(){return this.facet(R2)}phrase(e,...n){for(let i of this.facet(Ke.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let l=+(r||1);return!l||l>n.length?i:n[l-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let l of this.facet(T2))for(let a of l(this,n,i))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return tq(n.length?n[0]:"")}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),l=this.charCategorizer(e),a=e-i,c=e-i;for(;a>0;){let f=Ht(n,a,!1);if(l(n.slice(f,a))!=Rt.Word)break;a=f}for(;c<r;){let f=Ht(n,c);if(l(n.slice(c,f))!=Rt.Word)break;c=f}return a==c?null:oe.range(a+i,c+i)}}Ke.allowMultipleSelections=w0;Ke.tabSize=xe.define({combine:t=>t.length?t[0]:4});Ke.lineSeparator=$2;Ke.readOnly=R2;Ke.phrases=xe.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});Ke.languageData=T2;Ke.changeFilter=P2;Ke.transactionFilter=C2;Ke.transactionExtender=A2;wu.reconfigure=Ne.define();function Zs(t,e,n={}){let i={};for(let r of t)for(let l of Object.keys(r)){let a=r[l],c=i[l];if(c===void 0)i[l]=a;else if(!(c===a||a===void 0))if(Object.hasOwnProperty.call(n,l))i[l]=n[l](c,a);else throw new Error("Config merge conflict for field "+l)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class As{eq(e){return this==e}range(e,n=e){return $0.create(e,n,this)}}As.prototype.startSide=As.prototype.endSide=0;As.prototype.point=!1;As.prototype.mapMode=Sn.TrackDel;function Yy(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let $0=class _2{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new _2(e,n,i)}};function P0(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Wy{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let l=i?this.to:this.from;for(let a=r,c=l.length;;){if(a==c)return a;let f=a+c>>1,h=l[f]-e||(i?this.value[f].endSide:this.value[f].startSide)-n;if(f==a)return h>=0?a:c;h>=0?c=f:a=f+1}}between(e,n,i,r){for(let l=this.findIndex(n,-1e9,!0),a=this.findIndex(i,1e9,!1,l);l<a;l++)if(r(this.from[l]+e,this.to[l]+e,this.value[l])===!1)return!1}map(e,n){let i=[],r=[],l=[],a=-1,c=-1;for(let f=0;f<this.value.length;f++){let h=this.value[f],O=this.from[f]+e,p=this.to[f]+e,m,y;if(O==p){let b=n.mapPos(O,h.startSide,h.mapMode);if(b==null||(m=y=b,h.startSide!=h.endSide&&(y=n.mapPos(O,h.endSide),y<m)))continue}else if(m=n.mapPos(O,h.startSide),y=n.mapPos(p,h.endSide),m>y||m==y&&h.startSide>0&&h.endSide<=0)continue;(y-m||h.endSide-h.startSide)<0||(a<0&&(a=m),h.point&&(c=Math.max(c,y-m)),i.push(h),r.push(m-a),l.push(y-a))}return{mapped:i.length?new Wy(r,l,i,c):null,pos:a}}}class Ue{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new Ue(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:l=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(i&&(n=n.slice().sort(P0)),this.isEmpty)return n.length?Ue.of(n):this;let c=new j2(this,null,-1).goto(0),f=0,h=[],O=new zl;for(;c.value||f<n.length;)if(f<n.length&&(c.from-n[f].from||c.startSide-n[f].value.startSide)>=0){let p=n[f++];O.addInner(p.from,p.to,p.value)||h.push(p)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(f==n.length||this.chunkEnd(c.chunkIndex)<n[f].from)&&(!a||r>this.chunkEnd(c.chunkIndex)||l<this.chunkPos[c.chunkIndex])&&O.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!a||r>c.to||l<c.from||a(c.from,c.to,c.value))&&(O.addInner(c.from,c.to,c.value)||h.push($0.create(c.from,c.to,c.value))),c.next());return O.finishInner(this.nextLayer.isEmpty&&!h.length?Ue.empty:this.nextLayer.update({add:h,filter:a,filterFrom:r,filterTo:l}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],i=[],r=-1;for(let a=0;a<this.chunk.length;a++){let c=this.chunkPos[a],f=this.chunk[a],h=e.touchesRange(c,c+f.length);if(h===!1)r=Math.max(r,f.maxPoint),n.push(f),i.push(e.mapPos(c));else if(h===!0){let{mapped:O,pos:p}=f.map(c,e);O&&(r=Math.max(r,O.maxPoint),n.push(O),i.push(p))}}let l=this.nextLayer.map(e);return n.length==0?l:new Ue(i,n,l||Ue.empty,r)}between(e,n,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let l=this.chunkPos[r],a=this.chunk[r];if(n>=l&&e<=l+a.length&&a.between(l,e-l,n-l,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return eu.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return eu.from(e).goto(n)}static compare(e,n,i,r,l=-1){let a=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=l),c=n.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=l),f=JQ(a,c,i),h=new bc(a,f,l),O=new bc(c,f,l);i.iterGaps((p,m,y)=>ew(h,p,O,m,y,r)),i.empty&&i.length==0&&ew(h,0,O,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let l=e.filter(O=>!O.isEmpty&&n.indexOf(O)<0),a=n.filter(O=>!O.isEmpty&&e.indexOf(O)<0);if(l.length!=a.length)return!1;if(!l.length)return!0;let c=JQ(l,a),f=new bc(l,c,0).goto(i),h=new bc(a,c,0).goto(i);for(;;){if(f.to!=h.to||!C0(f.active,h.active)||f.point&&(!h.point||!Yy(f.point,h.point)))return!1;if(f.to>r)return!0;f.next(),h.next()}}static spans(e,n,i,r,l=-1){let a=new bc(e,null,l).goto(n),c=n,f=a.openStart;for(;;){let h=Math.min(a.to,i);if(a.point){let O=a.activeForPoint(a.to),p=a.pointFrom<n?O.length+1:a.point.startSide<0?O.length:Math.min(O.length,f);r.point(c,h,a.point,O,p,a.pointRank),f=Math.min(a.openEnd(h),O.length)}else h>c&&(r.span(c,h,a.active,f),f=a.openEnd(h));if(a.to>i)return f+(a.point&&a.to>i?1:0);c=a.to,a.next()}}static of(e,n=!1){let i=new zl;for(let r of e instanceof $0?[e]:n?nq(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return Ue.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=Ue.empty;r=r.nextLayer)n=new Ue(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}Ue.empty=new Ue([],[],null,-1);function nq(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(P0(e,i)>0)return t.slice().sort(P0);e=i}return t}Ue.empty.nextLayer=Ue.empty;class zl{finishChunk(e){this.chunks.push(new Wy(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new zl)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(Ue.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ue.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function JQ(t,e,n){let i=new Map;for(let l of t)for(let a=0;a<l.chunk.length;a++)l.chunk[a].maxPoint<=0&&i.set(l.chunk[a],l.chunkPos[a]);let r=new Set;for(let l of e)for(let a=0;a<l.chunk.length;a++){let c=i.get(l.chunk[a]);c!=null&&(n?n.mapPos(c):c)==l.chunkPos[a]&&!(n!=null&&n.touchesRange(c,c+l.chunk[a].length))&&r.add(l.chunk[a])}return r}class j2{constructor(e,n,i,r=0){this.layer=e,this.skip=n,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,i){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],i=e+n.from[this.rangeIndex];if(this.from=i,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class eu{constructor(e){this.heap=e}static from(e,n=null,i=-1){let r=[];for(let l=0;l<e.length;l++)for(let a=e[l];!a.isEmpty;a=a.nextLayer)a.maxPoint>=i&&r.push(new j2(a,n,i,l));return r.length==1?r[0]:new eu(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)um(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)um(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),um(this.heap,0)}}}function um(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1<t.length&&r.compare(t[i+1])>=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class bc{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=eu.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){xh(this.active,e),xh(this.activeTo,e),xh(this.activeRank,e),this.minActive=tw(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:l}=this.cursor;for(;n<this.activeRank.length&&(l-this.activeRank[n]||r-this.activeTo[n])>0;)n++;Sh(this.active,n,i),Sh(this.activeTo,n,r),Sh(this.activeRank,n,l),e&&Sh(e,n,this.cursor.from),this.minActive=tw(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&xh(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=l,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=l.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let r=i.length-1;r>=0&&i[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function ew(t,e,n,i,r,l){t.goto(e),n.goto(i);let a=i+r,c=i,f=i-e,h=!!l.boundChange;for(let O=!1;;){let p=t.to+f-n.to,m=p||t.endSide-n.endSide,y=m<0?t.to+f:n.to,b=Math.min(y,a);if(t.point||n.point?(t.point&&n.point&&Yy(t.point,n.point)&&C0(t.activeForPoint(t.to),n.activeForPoint(n.to))||l.comparePoint(c,b,t.point,n.point),O=!1):(O&&l.boundChange(c),b>c&&!C0(t.active,n.active)&&l.compareRange(c,b,t.active,n.active),h&&b<a&&(p||t.openEnd(y)!=n.openEnd(y))&&(O=!0)),y>a)break;c=y,m<=0&&t.next(),m>=0&&n.next()}}function C0(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!Yy(t[n],e[n]))return!1;return!0}function xh(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function Sh(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function tw(t,e){let n=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||t[r].endSide-t[n].endSide)<0&&(n=r,i=e[r]);return n}function _r(t,e,n=t.length){let i=0;for(let r=0;r<n&&r<t.length;)t.charCodeAt(r)==9?(i+=e-i%e,r++):(i++,r=Ht(t,r));return i}function iq(t,e,n,i){for(let r=0,l=0;;){if(l>=e)return r;if(r==t.length)break;l+=t.charCodeAt(r)==9?n-l%n:1,r=Ht(t,r)}return t.length}const A0="ͼ",nw=typeof Symbol>"u"?"__"+A0:Symbol.for(A0),R0=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),iw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Rs{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function l(a,c,f,h){let O=[],p=/^@(\w+)\b/.exec(a[0]),m=p&&p[1]=="keyframes";if(p&&c==null)return f.push(a[0]+";");for(let y in c){let b=c[y];if(/&/.test(y))l(y.split(/,\s*/).map(v=>a.map(k=>v.replace(/&/,k))).reduce((v,k)=>v.concat(k)),b,f);else if(b&&typeof b=="object"){if(!p)throw new RangeError("The value of a property ("+y+") should be a primitive value.");l(r(y),b,O,m)}else b!=null&&O.push(y.replace(/_.*/,"").replace(/[A-Z]/g,v=>"-"+v.toLowerCase())+": "+b+";")}(O.length||m)&&f.push((i&&!p&&!h?a.map(i):a).join(", ")+" {"+O.join(" ")+"}")}for(let a in e)l(r(a),e[a],this.rules)}getRules(){return this.rules.join(`
|
|
79
|
+
`)}static newName(){let e=iw[nw]||1;return iw[nw]=e+1,A0+e.toString(36)}static mount(e,n,i){let r=e[R0],l=i&&i.nonce;r?l&&r.setNonce(l):r=new rq(e,l),r.mount(Array.isArray(n)?n:[n],e)}}let rw=new Map;class rq{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let l=rw.get(i);if(l)return e[R0]=l;this.sheet=new r.CSSStyleSheet,rw.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[R0]=this}mount(e,n){let i=this.sheet,r=0,l=0;for(let a=0;a<e.length;a++){let c=e[a],f=this.modules.indexOf(c);if(f<l&&f>-1&&(this.modules.splice(f,1),l--,f=-1),f==-1){if(this.modules.splice(l++,0,c),i)for(let h=0;h<c.rules.length;h++)i.insertRule(c.rules[h],r++)}else{for(;l<f;)r+=this.modules[l++].rules.length;r+=c.rules.length,l++}}if(i)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let a="";for(let f=0;f<this.modules.length;f++)a+=this.modules[f].getRules()+`
|
|
80
|
+
`;this.styleTag.textContent=a;let c=n.head||n;this.styleTag.parentNode!=c&&c.insertBefore(this.styleTag,c.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var zs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},tu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},sq=typeof navigator<"u"&&/Mac/.test(navigator.platform),lq=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var nn=0;nn<10;nn++)zs[48+nn]=zs[96+nn]=String(nn);for(var nn=1;nn<=24;nn++)zs[nn+111]="F"+nn;for(var nn=65;nn<=90;nn++)zs[nn]=String.fromCharCode(nn+32),tu[nn]=String.fromCharCode(nn);for(var fm in zs)tu.hasOwnProperty(fm)||(tu[fm]=zs[fm]);function aq(t){var e=sq&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||lq&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?tu:zs)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Ut(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e<arguments.length;e++)M2(t,arguments[e]);return t}function M2(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)M2(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let xn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},z0=typeof document<"u"?document:{documentElement:{style:{}}};const E0=/Edge\/(\d+)/.exec(xn.userAgent),X2=/MSIE \d/.test(xn.userAgent),_0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xn.userAgent),fO=!!(X2||_0||E0),sw=!fO&&/gecko\/(\d+)/i.test(xn.userAgent),hm=!fO&&/Chrome\/(\d+)/.exec(xn.userAgent),lw="webkitFontSmoothing"in z0.documentElement.style,j0=!fO&&/Apple Computer/.test(xn.vendor),aw=j0&&(/Mobile\/\w+/.test(xn.userAgent)||xn.maxTouchPoints>2);var me={mac:aw||/Mac/.test(xn.platform),windows:/Win/.test(xn.platform),linux:/Linux|X11/.test(xn.platform),ie:fO,ie_version:X2?z0.documentMode||6:_0?+_0[1]:E0?+E0[1]:0,gecko:sw,gecko_version:sw?+(/Firefox\/(\d+)/.exec(xn.userAgent)||[0,0])[1]:0,chrome:!!hm,chrome_version:hm?+hm[1]:0,ios:aw,android:/Android\b/.test(xn.userAgent),webkit:lw,webkit_version:lw?+(/\bAppleWebKit\/(\d+)/.exec(xn.userAgent)||[0,0])[1]:0,safari:j0,safari_version:j0?+(/\bVersion\/(\d+(\.\d+)?)/.exec(xn.userAgent)||[0,0])[1]:0,tabSize:z0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Uy(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const Sd=Object.create(null);function Gy(t,e,n){if(t==e)return!0;t||(t=Sd),e||(e=Sd);let i=Object.keys(t),r=Object.keys(e);if(i.length-0!=r.length-0)return!1;for(let l of i)if(l!=n&&(r.indexOf(l)==-1||t[l]!==e[l]))return!1;return!0}function oq(t,e){for(let n=t.attributes.length-1;n>=0;n--){let i=t.attributes[n].name;e[i]==null&&t.removeAttribute(i)}for(let n in e){let i=e[n];n=="style"?t.style.cssText=i:t.getAttribute(n)!=i&&t.setAttribute(n,i)}}function ow(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function cq(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=i.value}return e}class ql{eq(e){return!1}updateDOM(e,n,i){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var rn=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(rn||(rn={}));class Me extends As{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new ku(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new El(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:l,end:a}=Z2(e,n);i=(l?n?-3e8:-1:5e8)-1,r=(a?n?2e8:1:-6e8)+1}return new El(e,i,r,n,e.widget||null,!0)}static line(e){return new Tu(e)}static set(e,n=!1){return Ue.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Me.none=Ue.empty;class ku extends Me{constructor(e){let{start:n,end:i}=Z2(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?Uy(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Sd}eq(e){return this==e||e instanceof ku&&this.tagName==e.tagName&&Gy(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}ku.prototype.point=!1;class Tu extends Me{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Tu&&this.spec.class==e.spec.class&&Gy(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Tu.prototype.mapMode=Sn.TrackBefore;Tu.prototype.point=!0;class El extends Me{constructor(e,n,i,r,l,a){super(n,i,l,e),this.block=r,this.isReplace=a,this.mapMode=r?n<=0?Sn.TrackBefore:Sn.TrackAfter:Sn.TrackDel}get type(){return this.startSide!=this.endSide?rn.WidgetRange:this.startSide<=0?rn.WidgetBefore:rn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof El&&uq(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}El.prototype.point=!0;function Z2(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function uq(t,e){return t==e||!!(t&&e&&t.compare(e))}function Na(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class nu extends As{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof nu&&this.tagName==e.tagName&&Gy(this.attributes,e.attributes)}static create(e){return new nu(e.tagName,e.attributes||Sd)}static set(e,n=!1){return Ue.of(e,n)}}nu.prototype.startSide=nu.prototype.endSide=-1;function iu(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function M0(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Zc(t,e){if(!e.anchorNode)return!1;try{return M0(t,e.anchorNode)}catch{return!1}}function Hh(t){return t.nodeType==3?ru(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function qc(t,e,n,i){return n?cw(t,e,n,i,-1)||cw(t,e,n,i,1):!1}function Es(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function bd(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function cw(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:jr(t))){if(t.nodeName=="DIV")return!1;let l=t.parentNode;if(!l||l.nodeType!=1)return!1;e=Es(t)+(r<0?0:1),t=l}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?jr(t):0}else return!1}}function jr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function vd(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function fq(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function q2(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function hq(t,e,n,i,r,l,a,c){let f=t.ownerDocument,h=f.defaultView||window;for(let O=t,p=!1;O&&!p;)if(O.nodeType==1){let m,y=O==f.body,b=1,v=1;if(y)m=fq(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(O).position)&&(p=!0),O.scrollHeight<=O.clientHeight&&O.scrollWidth<=O.clientWidth){O=O.assignedSlot||O.parentNode;continue}let P=O.getBoundingClientRect();({scaleX:b,scaleY:v}=q2(O,P)),m={left:P.left,right:P.left+O.clientWidth*b,top:P.top,bottom:P.top+O.clientHeight*v}}let k=0,Q=0;if(r=="nearest")e.top<m.top+a?(Q=e.top-(m.top+a),n>0&&e.bottom>m.bottom+Q&&(Q=e.bottom-m.bottom+a)):e.bottom>m.bottom-a&&(Q=e.bottom-m.bottom+a,n<0&&e.top-Q<m.top&&(Q=e.top-(m.top+a)));else{let P=e.bottom-e.top,T=m.bottom-m.top;Q=(r=="center"&&P<=T?e.top+P/2-T/2:r=="start"||r=="center"&&n<0?e.top-a:e.bottom-T+a)-m.top}if(i=="nearest"?e.left<m.left+l?(k=e.left-(m.left+l),n>0&&e.right>m.right+k&&(k=e.right-m.right+l)):e.right>m.right-l&&(k=e.right-m.right+l,n<0&&e.left<m.left+k&&(k=e.left-(m.left+l))):k=(i=="center"?e.left+(e.right-e.left)/2-(m.right-m.left)/2:i=="start"==c?e.left-l:e.right-(m.right-m.left)+l)-m.left,k||Q)if(y)h.scrollBy(k,Q);else{let P=0,T=0;if(Q){let $=O.scrollTop;O.scrollTop+=Q/v,T=(O.scrollTop-$)*v}if(k){let $=O.scrollLeft;O.scrollLeft+=k/b,P=(O.scrollLeft-$)*b}e={left:e.left-P,top:e.top-T,right:e.right-P,bottom:e.bottom-T},P&&Math.abs(P-k)<1&&(i="nearest"),T&&Math.abs(T-Q)<1&&(r="nearest")}if(y)break;(e.top<m.top||e.bottom>m.bottom||e.left<m.left||e.right>m.right)&&(e={left:Math.max(e.left,m.left),right:Math.min(e.right,m.right),top:Math.max(e.top,m.top),bottom:Math.min(e.bottom,m.bottom)}),O=O.assignedSlot||O.parentNode}else if(O.nodeType==11)O=O.host;else break}function D2(t,e=!0){let n=t.ownerDocument,i=null,r=null;for(let l=t.parentNode;l&&!(l==n.body||(!e||i)&&r);)if(l.nodeType==1)!r&&l.scrollHeight>l.clientHeight&&(r=l),e&&!i&&l.scrollWidth>l.clientWidth&&(i=l),l=l.assignedSlot||l.parentNode;else if(l.nodeType==11)l=l.host;else break;return{x:i,y:r}}class dq{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?jr(n):0),i,Math.min(e.focusOffset,i?jr(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let pl=null;me.safari&&me.safari_version>=26&&(pl=!1);function L2(t){if(t.setActive)return t.setActive();if(pl)return t.focus(pl);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(pl==null?{get preventScroll(){return pl={preventScroll:!0},!0}}:void 0),!pl){pl=!1;for(let n=0;n<e.length;){let i=e[n++],r=e[n++],l=e[n++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=l&&(i.scrollLeft=l)}}}let uw;function ru(t,e,n=e){let i=uw||(uw=document.createRange());return i.setEnd(t,n),i.setStart(t,e),i}function Va(t,e,n,i){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let l=new KeyboardEvent("keydown",r);l.synthetic=!0,t.dispatchEvent(l);let a=new KeyboardEvent("keyup",r);return a.synthetic=!0,t.dispatchEvent(a),l.defaultPrevented||a.defaultPrevented}function Oq(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function pq(t,e){let n=e.focusNode,i=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=i)return!1;for(i=Math.min(i,jr(n));;)if(i){if(n.nodeType!=1)return!1;let r=n.childNodes[i-1];r.contentEditable=="false"?i--:(n=r,i=jr(n))}else{if(n==t)return!0;i=Es(n),n=n.parentNode}}function B2(t){return t instanceof Window?t.pageYOffset>Math.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4):t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function N2(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=jr(n)}else if(n.parentNode&&!bd(n))i=Es(n),n=n.parentNode;else return null}}function V2(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i<n.nodeValue.length)return{node:n,offset:i};if(n.nodeType==1&&i<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[i],i=0}else if(n.parentNode&&!bd(n))i=Es(n)+1,n=n.parentNode;else return null}}class Ti{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new Ti(e.parentNode,Es(e),n)}static after(e,n){return new Ti(e.parentNode,Es(e)+1,n)}}var gt=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(gt||(gt={}));const _l=gt.LTR,Hy=gt.RTL;function Y2(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const gq=Y2("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),mq=Y2("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),X0=Object.create(null),Xi=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);X0[e]=n,X0[n]=-e}function W2(t){return t<=247?gq[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?mq[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const yq=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Yi{get dir(){return this.level%2?Hy:_l}constructor(e,n,i){this.from=e,this.to=n,this.level=i}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,i,r){let l=-1;for(let a=0;a<e.length;a++){let c=e[a];if(c.from<=n&&c.to>=n){if(c.level==i)return a;(l<0||(r!=0?r<0?c.from<n:c.to>n:e[l].level>c.level))&&(l=a)}}if(l<0)throw new RangeError("Index out of range");return l}}function U2(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!U2(i.inner,r.inner))return!1}return!0}const Ot=[];function xq(t,e,n,i,r){for(let l=0;l<=i.length;l++){let a=l?i[l-1].to:e,c=l<i.length?i[l].from:n,f=l?256:r;for(let h=a,O=f,p=f;h<c;h++){let m=W2(t.charCodeAt(h));m==512?m=O:m==8&&p==4&&(m=16),Ot[h]=m==4?2:m,m&7&&(p=m),O=m}for(let h=a,O=f,p=f;h<c;h++){let m=Ot[h];if(m==128)h<c-1&&O==Ot[h+1]&&O&24?m=Ot[h]=O:Ot[h]=256;else if(m==64){let y=h+1;for(;y<c&&Ot[y]==64;)y++;let b=h&&O==8||y<n&&Ot[y]==8?p==1?1:8:256;for(let v=h;v<y;v++)Ot[v]=b;h=y-1}else m==8&&p==1&&(Ot[h]=1);O=m,m&7&&(p=m)}}}function Sq(t,e,n,i,r){let l=r==1?2:1;for(let a=0,c=0,f=0;a<=i.length;a++){let h=a?i[a-1].to:e,O=a<i.length?i[a].from:n;for(let p=h,m,y,b;p<O;p++)if(y=X0[m=t.charCodeAt(p)])if(y<0){for(let v=c-3;v>=0;v-=3)if(Xi[v+1]==-y){let k=Xi[v+2],Q=k&2?r:k&4?k&1?l:r:0;Q&&(Ot[p]=Ot[Xi[v]]=Q),c=v;break}}else{if(Xi.length==189)break;Xi[c++]=p,Xi[c++]=m,Xi[c++]=f}else if((b=Ot[p])==2||b==1){let v=b==r;f=v?0:1;for(let k=c-3;k>=0;k-=3){let Q=Xi[k+2];if(Q&2)break;if(v)Xi[k+2]|=2;else{if(Q&4)break;Xi[k+2]|=4}}}}}function bq(t,e,n,i){for(let r=0,l=i;r<=n.length;r++){let a=r?n[r-1].to:t,c=r<n.length?n[r].from:e;for(let f=a;f<c;){let h=Ot[f];if(h==256){let O=f+1;for(;;)if(O==c){if(r==n.length)break;O=n[r++].to,c=r<n.length?n[r].from:e}else if(Ot[O]==256)O++;else break;let p=l==1,m=(O<e?Ot[O]:i)==1,y=p==m?p?1:2:i;for(let b=O,v=r,k=v?n[v-1].to:t;b>f;)b==k&&(b=n[--v].from,k=v?n[v-1].to:t),Ot[--b]=y;f=O}else l=h,f++}}}function Z0(t,e,n,i,r,l,a){let c=i%2?2:1;if(i%2==r%2)for(let f=e,h=0;f<n;){let O=!0,p=!1;if(h==l.length||f<l[h].from){let v=Ot[f];v!=c&&(O=!1,p=v==16)}let m=!O&&c==1?[]:null,y=O?i:i+1,b=f;e:for(;;)if(h<l.length&&b==l[h].from){if(p)break e;let v=l[h];if(!O)for(let k=v.to,Q=h+1;;){if(k==n)break e;if(Q<l.length&&l[Q].from==k)k=l[Q++].to;else{if(Ot[k]==c)break e;break}}if(h++,m)m.push(v);else{v.from>f&&a.push(new Yi(f,v.from,y));let k=v.direction==_l!=!(y%2);q0(t,k?i+1:i,r,v.inner,v.from,v.to,a),f=v.to}b=v.to}else{if(b==n||(O?Ot[b]!=c:Ot[b]==c))break;b++}m?Z0(t,f,b,i+1,r,m,a):f<b&&a.push(new Yi(f,b,y)),f=b}else for(let f=n,h=l.length;f>e;){let O=!0,p=!1;if(!h||f>l[h-1].to){let v=Ot[f-1];v!=c&&(O=!1,p=v==16)}let m=!O&&c==1?[]:null,y=O?i:i+1,b=f;e:for(;;)if(h&&b==l[h-1].to){if(p)break e;let v=l[--h];if(!O)for(let k=v.from,Q=h;;){if(k==e)break e;if(Q&&l[Q-1].to==k)k=l[--Q].from;else{if(Ot[k-1]==c)break e;break}}if(m)m.push(v);else{v.to<f&&a.push(new Yi(v.to,f,y));let k=v.direction==_l!=!(y%2);q0(t,k?i+1:i,r,v.inner,v.from,v.to,a),f=v.from}b=v.from}else{if(b==e||(O?Ot[b-1]!=c:Ot[b-1]==c))break;b--}m?Z0(t,b,f,i+1,r,m,a):b<f&&a.push(new Yi(b,f,y)),f=b}}function q0(t,e,n,i,r,l,a){let c=e%2?2:1;xq(t,r,l,i,c),Sq(t,r,l,i,c),bq(r,l,i,c),Z0(t,r,l,e,n,i,a)}function vq(t,e,n){if(!t)return[new Yi(0,0,e==Hy?1:0)];if(e==_l&&!n.length&&!yq.test(t))return G2(t.length);if(n.length)for(;t.length>Ot.length;)Ot[Ot.length]=256;let i=[],r=e==_l?0:1;return q0(t,r,r,n,0,t.length,i),i}function G2(t){return[new Yi(0,t,0)]}let H2="";function Qq(t,e,n,i,r){var l;let a=i.head-t.from,c=Yi.find(e,a,(l=i.bidiLevel)!==null&&l!==void 0?l:-1,i.assoc),f=e[c],h=f.side(r,n);if(a==h){let m=c+=r?1:-1;if(m<0||m>=e.length)return null;f=e[c=m],a=f.side(!r,n),h=f.side(r,n)}let O=Ht(t.text,a,f.forward(r,n));(O<f.from||O>f.to)&&(O=h),H2=t.text.slice(Math.min(a,O),Math.max(a,O));let p=c==(r?e.length-1:0)?null:e[c+(r?1:-1)];return p&&O==h&&p.level+(r?0:1)<f.level?oe.cursor(p.side(!r,n)+t.from,p.forward(r,n)?1:-1,p.level):oe.cursor(O+t.from,f.forward(r,n)?-1:1,f.level)}function wq(t,e,n){for(let i=e;i<n;i++){let r=W2(t.charCodeAt(i));if(r==1)return _l;if(r==2||r==4)return Hy}return _l}const I2=xe.define(),F2=xe.define(),K2=xe.define(),J2=xe.define(),D0=xe.define(),eP=xe.define(),tP=xe.define(),Iy=xe.define(),Fy=xe.define(),nP=xe.define({combine:t=>t.some(e=>e)}),iP=xe.define({combine:t=>t.some(e=>e)}),rP=xe.define();class Ya{constructor(e,n,i,r,l,a=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=l,this.isSnapshot=a}map(e){return e.empty?this:new Ya(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ya(oe.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const bh=Ne.define({map:(t,e)=>t.map(e)}),sP=Ne.define();function In(t,e,n){let i=t.facet(J2);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Cr=xe.define({combine:t=>t.length?t[0]:!0});let kq=0;const Xa=xe.define({combine(t){return t.filter((e,n)=>{for(let i=0;i<n;i++)if(t[i].plugin==e.plugin)return!1;return!0})}});class sn{constructor(e,n,i,r,l){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.baseExtensions=l(this),this.extension=this.baseExtensions.concat(Xa.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Xa.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:l,decorations:a}=n||{};return new sn(kq++,e,i,r,c=>{let f=[];return a&&f.push(hO.of(h=>{let O=h.plugin(c);return O?a(O):Me.none})),l&&f.push(l(c)),f})}static fromClass(e,n){return sn.define((i,r)=>new e(i,r),n)}}class dm{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(In(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){In(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){In(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const lP=xe.define(),Ky=xe.define(),hO=xe.define(),aP=xe.define(),Jy=xe.define(),$u=xe.define(),oP=xe.define();function fw(t,e){let n=t.state.facet(oP);if(!n.length)return n;let i=n.map(l=>l instanceof Function?l(t):l),r=[];return Ue.spans(i,e.from,e.to,{point(){},span(l,a,c,f){let h=l-e.from,O=a-e.from,p=r;for(let m=c.length-1;m>=0;m--,f--){let y=c[m].spec.bidiIsolate,b;if(y==null&&(y=wq(e.text,h,O)),f>0&&p.length&&(b=p[p.length-1]).to==h&&b.direction==y)b.to=O,p=b.inner;else{let v={from:h,to:O,direction:y,inner:[]};p.push(v),p=v.inner}}}}),r}const cP=xe.define();function e1(t){let e=0,n=0,i=0,r=0;for(let l of t.state.facet(cP)){let a=l(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(r=Math.max(r,a.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Rc=xe.define();class oi{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new oi(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),e.splice(n-1,1)}}return e.splice(n,0,i),e}static extendWithRanges(e,n){if(n.length==0)return e;let i=[];for(let r=0,l=0,a=0;;){let c=r<e.length?e[r].fromB:1e9,f=l<n.length?n[l]:1e9,h=Math.min(c,f);if(h==1e9)break;let O=h+a,p=h,m=O;for(;;)if(l<n.length&&n[l]<=p){let y=n[l+1];l+=2,p=Math.max(p,y);for(let b=r;b<e.length&&e[b].fromB<=p;b++)a=e[b].toA-e[b].toB;m=Math.max(m,y+a)}else if(r<e.length&&e[r].fromB<=p){let y=e[r++];p=Math.max(p,y.toB),m=Math.max(m,y.toA),a=y.toA-y.toB}else break;i.push(new oi(O,m,h,p))}return i}}class Qd{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Nt.empty(this.startState.doc.length);for(let l of i)this.changes=this.changes.compose(l.changes);let r=[];this.changes.iterChangedRanges((l,a,c,f)=>r.push(new oi(l,a,c,f))),this.changedRanges=r}static create(e,n,i){return new Qd(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const Tq=[];class $t{constructor(e,n,i=0){this.dom=e,this.length=n,this.flags=i,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Tq}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&oq(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let i=n;for(let r of this.children){if(r==e)return i;i+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let i=Es(this.dom),r=this.length?e>0:n>0;return new Ti(this.parent.dom,i+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof OO)return e;return null}static get(e){return e.cmTile}}class dO extends $t{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,i=null,r,l=(e==null?void 0:e.node)==n?e:null,a=0;for(let c of this.children){if(c.sync(e),a+=c.length+c.breakAfter,r=i?i.nextSibling:n.firstChild,l&&r!=c.dom&&(l.written=!0),c.dom.parentNode==n)for(;r&&r!=c.dom;)r=hw(r);else n.insertBefore(c.dom,r);i=c.dom}for(r=i?i.nextSibling:n.firstChild,l&&r&&(l.written=!0);r;)r=hw(r);this.length=a}}function hw(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class OO extends dO{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=$t.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],i=this,r=0,l=0;;)if(r==i.children.length){if(!n.length)return;i=i.parent,i.breakAfter&&l++,r=n.pop()}else{let a=i.children[r++];if(a instanceof Rr)n.push(r),i=a,r=0;else{let c=l+a.length,f=e(a,l);if(f!==void 0)return f;l=c+a.breakAfter}}}resolveBlock(e,n){let i,r=-1,l,a=-1;if(this.blockTiles((c,f)=>{let h=f+c.length;if(e>=f&&e<=h){if(c.isWidget()&&n>=-1&&n<=1){if(c.flags&32)return!0;c.flags&16&&(i=void 0)}(f<e||e==h&&(n<-1?c.length:c.covers(1)))&&(!i||!c.isWidget()&&i.isWidget())&&(i=c,r=e-f),(h>e||e==f&&(n>1?c.length:c.covers(-1)))&&(!l||!c.isWidget()&&l.isWidget())&&(l=c,a=e-f)}}),!i&&!l)throw new Error("No tile at position "+e);return i&&n<0||!l?{tile:i,offset:r}:{tile:l,offset:a}}}class Rr extends dO{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let i=new Rr(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class lo extends dO{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,i){let r=new lo(n||document.createElement("div"),e);return(!n||!i)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,n,i){let r=null,l=-1,a=null,c=-1;function f(O,p){for(let m=0,y=0;m<O.children.length&&y<=p;m++){let b=O.children[m],v=y+b.length;v>=p&&(b.isComposite()?f(b,p-y):(!a||a.isHidden&&(n>0||i&&Pq(a,b)))&&(v>p||b.flags&32)?(a=b,c=p-y):(y<p||b.flags&16&&!b.isHidden)&&(r=b,l=p-y)),y=v}}f(this,e);let h=(n<0?r:a)||r||a;return h?{tile:h,offset:h==r?l:c}:null}coordsIn(e,n){let i=this.resolveInline(e,n,!0);return i?i.tile.coordsIn(Math.max(0,i.offset),n):$q(this)}domIn(e,n){let i=this.resolveInline(e,n);if(i){let{tile:r,offset:l}=i;if(this.dom.contains(r.dom))return r.isText()?new Ti(r.dom,Math.min(r.dom.nodeValue.length,l)):r.domPosFor(l,r.flags&16?1:r.flags&32?-1:n);let a=i.tile.parent,c=!1;for(let f of a.children){if(c)return new Ti(f.dom,0);f==i.tile&&(c=!0)}}return new Ti(this.dom,0)}}function $q(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Hh(e);return n[n.length-1]||null}function Pq(t,e){let n=t.coordsIn(0,1),i=e.coordsIn(0,1);return n&&i&&i.top<n.bottom}class zn extends dO{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let i=new zn(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class vl extends $t{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let i=this.dom.nodeValue.length;e>i&&(e=i);let r=e,l=e,a=0;e==0&&n<0||e==i&&n>=0?me.chrome||me.gecko||(e?(r--,a=1):l<i&&(l++,a=-1)):n<0?r--:l<i&&l++;let c=ru(this.dom,r,l).getClientRects();if(!c.length)return null;let f=c[(a?a<0:n>=0)?0:c.length-1];return me.safari&&!a&&f.width==0&&(f=Array.prototype.find.call(c,h=>h.width)||f),a?vd(f,a<0):f||null}static of(e,n){let i=new vl(n||document.createTextNode(e),e);return n||(i.flags|=2),i}}class jl extends $t{constructor(e,n,i,r){super(e,n,r),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,i){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;if(i)return vd(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let l=this.dom.getClientRects(),a=null;if(!l.length)return null;let c=this.flags&16?!0:this.flags&32?!1:e>0;for(let f=c?l.length-1:0;a=l[f],!(e>0?f==0:f==l.length-1||a.top<a.bottom);f+=c?-1:1);return vd(a,!c)}}get overrideDOMText(){if(!this.length)return Ie.empty;let{root:e}=this;if(!e)return Ie.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,i,r,l){return l||(l=e.toDOM(n),e.editable||(l.contentEditable="false")),new jl(l,i,e,r)}}class wd extends $t{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return Ie.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class Cq{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,i){let{tile:r,index:l,beforeBreak:a,parents:c}=this;for(;e||n>0;)if(r.isComposite())if(a){if(!e)break;i&&i.break(),e--,a=!1}else if(l==r.children.length){if(!e&&!c.length)break;i&&i.leave(r),a=!!r.breakAfter,{tile:r,index:l}=c.pop(),l++}else{let f=r.children[l],h=f.breakAfter;(n>0?f.length<=e:f.length<e)&&(!i||i.skip(f,0,f.length)!==!1||!f.isComposite)?(a=!!h,l++,e-=f.length):(c.push({tile:r,index:l}),r=f,l=0,i&&f.isComposite()&&i.enter(f))}else if(l==r.length)a=!!r.breakAfter,{tile:r,index:l}=c.pop(),l++;else if(e){let f=Math.min(e,r.length-l);i&&i.skip(r,l,l+f),e-=f,l+=f}else break;return this.tile=r,this.index=l,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class Aq{constructor(e,n,i,r){this.from=e,this.to=n,this.wrapper=i,this.rank=r}}class Rq{constructor(e,n,i){this.cache=e,this.root=n,this.blockWrappers=i,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,i,r){var l;this.flushBuffer();let a=this.ensureMarks(n,i),c=a.lastChild;if(c&&c.isText()&&!(c.flags&8)&&c.length+e.length<512){this.cache.reused.set(c,2);let f=a.children[a.children.length-1]=new vl(c.dom,c.text+e);f.parent=a}else a.append(r||vl.of(e,(l=this.cache.find(vl))===null||l===void 0?void 0:l.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let i=this.curLine;i.dom!=n.line.dom&&(i.setDOM(this.cache.reused.has(n.line)?Om(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let r=i;for(let c=n.marks.length-1;c>=0;c--){let f=n.marks[c],h=r.lastChild;if(h instanceof zn&&h.mark.eq(f.mark))h.dom!=f.dom&&h.setDOM(Om(f.dom)),r=h;else{if(this.cache.reused.get(f)){let p=$t.get(f.dom);p&&p.setDOM(Om(f.dom))}let O=zn.of(f.mark,f.dom);r.append(O),r=O}this.cache.reused.set(f,2)}let l=$t.get(e.text);l&&this.cache.reused.set(l,2);let a=new vl(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,n,i){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let l=this.ensureMarks(n,i);!r&&!(e.flags&16)&&l.append(this.getBuffer(1)),l.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,i){this.flushBuffer(),this.ensureMarks(n,i).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var i;e||(e=uP);let r=lo.start(e,n||((i=this.cache.find(lo))===null||i===void 0?void 0:i.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var i;let r=this.curLine;for(let l=e.length-1;l>=0;l--){let a=e[l],c;if(n>0&&(c=r.lastChild)&&c instanceof zn&&c.mark.eq(a))r=c,n--;else{let f=zn.of(a,(i=this.cache.find(zn,h=>h.mark.eq(a)))===null||i===void 0?void 0:i.dom);r.append(f),r=f,n=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!dw(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(me.ios&&dw(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(pm,0,32)||new jl(pm.toDOM(),0,pm,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new Aq(e.from,e.to,e.value,e.rank),i=this.wrappers.length;for(;i>0&&(this.wrappers[i-1].rank-n.rank||this.wrappers[i-1].to-n.to)<0;)i--;this.wrappers.splice(i,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let i of this.wrappers){let r=n.lastChild;if(i.from<this.pos&&r instanceof Rr&&r.wrapper.eq(i.wrapper))n=r;else{let l=Rr.of(i.wrapper,(e=this.cache.find(Rr,a=>a.wrapper.eq(i.wrapper)))===null||e===void 0?void 0:e.dom);n.append(l),n=l}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),i=this.cache.find(wd,void 0,1);return i&&(i.flags=n),i||new wd(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class zq{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:l,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let c=this.textOff=Math.min(e,r.length);return l?null:r.slice(0,c)}let n=Math.min(this.text.length,this.textOff+e),i=this.text.slice(this.textOff,n);return this.textOff=n,i}}const kd=[jl,lo,vl,zn,wd,Rr,OO];for(let t=0;t<kd.length;t++)kd[t].bucket=t;class Eq{constructor(e){this.view=e,this.buckets=kd.map(()=>[]),this.index=kd.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,i=this.buckets[n];i.length<6?i.push(e):i[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,i=2){let r=e.bucket,l=this.buckets[r],a=this.index[r];for(let c=l.length-1;c>=0;c--){let f=(c+a)%l.length,h=l[f];if((!n||n(h))&&!this.reused.has(h))return l.splice(f,1),f<a&&this.index[r]--,this.reused.set(h,i),h}return null}findWidget(e,n,i){let r=this.buckets[0];if(r.length)for(let l=0,a=0;;l++){if(l==r.length){if(a)return null;a=1,l=0}let c=r[l];if(!this.reused.has(c)&&(a==0?c.widget.compare(e):c.widget.constructor==e.constructor&&e.updateDOM(c.dom,this.view,c.widget)))return r.splice(l,1),l<this.index[0]&&this.index[0]--,c.widget==e&&c.length==n&&(c.flags&497)==i?(this.reused.set(c,1),c):(this.reused.set(c,2),new jl(c.dom,n,e,c.flags&-498|i))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class _q{constructor(e,n,i,r,l){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=l,this.openWidget=!1,this.openMarks=0,this.cache=new Eq(e),this.text=new zq(e.state.doc),this.builder=new Rq(this.cache,new OO(e,e.contentDOM),Ue.iter(i)),this.cache.reused.set(n,2),this.old=new Cq(n),this.reuseWalker={skip:(a,c,f)=>{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(e,n){let i=n&&this.getCompositionContext(n.text);for(let r=0,l=0,a=0;;){let c=a<e.length?e[a++]:null,f=c?c.fromA:this.old.root.length;if(f>r){let h=f-r;this.preserve(h,!a,!c),r=f,l+=h}if(!c)break;n&&c.fromA<=n.range.fromA&&c.toA>=n.range.toA?(this.forward(c.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(l,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,i),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,c.toA),this.emit(n.range.toB,c.toB)):(this.forward(c.fromA,c.toA),this.emit(l,c.toB)),l=c.toB,r=c.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,i){let r=Xq(this.old),l=this.openMarks;this.old.advance(e,i?1:-1,{skip:(a,c,f)=>{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(f-c);else{let h=f>0||c<a.length?jl.of(a.widget,this.view,f-c,a.flags&496,this.cache.maybeReuse(a)):this.cache.reuse(a);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,r,l),l=r.length)}else if(a.isText())this.builder.ensureLine(null),!c&&f==a.length&&!this.cache.reused.has(a)?this.builder.addText(a.text,r,l,this.cache.reuse(a)):(this.cache.add(a),this.builder.addText(a.text.slice(c,f),r,l)),l=r.length;else if(a.isLine())a.flags&=-2,this.cache.reused.set(a,1),this.builder.addLine(a);else if(a instanceof wd)this.cache.add(a);else if(a instanceof zn)this.builder.ensureLine(null),this.builder.addMark(a,r,l),this.cache.reused.set(a,1),l=r.length;else return!1;this.openWidget=!1},enter:a=>{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof zn&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=l=0):a instanceof zn&&(r.shift(),l=Math.min(l,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let i=null,r=this.builder,l=0,a=Ue.spans(this.decorations,e,n,{point:(c,f,h,O,p,m)=>{if(h instanceof El){if(this.disallowBlockEffectsFor[m]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(f>this.view.state.doc.lineAt(c).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(l=O.length,p>O.length)r.continueWidget(f-c);else{let y=h.widget||(h.block?ao.block:ao.inline),b=jq(h),v=this.cache.findWidget(y,f-c,b)||jl.of(y,this.view,f-c,b);h.block?(h.startSide>0&&r.addLineStartIfNotCovered(i),r.addBlockWidget(v)):(r.ensureLine(i),r.addInlineWidget(v,O,p))}i=null}else i=Mq(i,h);f>c&&this.text.skip(f-c)},span:(c,f,h,O)=>{for(let p=c;p<f;){let m=this.text.next(Math.min(512,f-p));m==null?(r.addLineStartIfNotCovered(i),r.addBreak(),p++):(r.ensureLine(i),r.addText(m,h,p==c?O:h.length),p+=m.length),i=null}}});r.addLineStartIfNotCovered(i),this.openWidget=a>l,this.openMarks=a}forward(e,n,i=1){n-e<=10?this.old.advance(n-e,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(e){let n=[],i=null;for(let r=e.parentNode;;r=r.parentNode){let l=$t.get(r);if(r==this.view.contentDOM)break;l instanceof zn?n.push(l):l!=null&&l.isLine()?i=l:l instanceof Rr||(r.nodeName=="DIV"&&!i&&r!=this.view.contentDOM?i=new lo(r,uP):i||n.push(zn.of(new ku({tagName:r.nodeName.toLowerCase(),attributes:cq(r)}),r)))}return{line:i,marks:n}}}function dw(t,e){let n=i=>{for(let r of i.children)if((e?r.isText():r.length)||n(r))return!0;return!1};return n(t)}function jq(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const uP={class:"cm-line"};function Mq(t,e){let n=e.spec.attributes,i=e.spec.class;return!n&&!i||(t||(t={class:"cm-line"}),n&&Uy(n,t),i&&(t.class+=" "+i)),t}function Xq(t){let e=[];for(let n=t.parents.length;n>1;n--){let i=n==t.parents.length?t.tile:t.parents[n].tile;i instanceof zn&&e.push(i.mark)}return e}function Om(t){let e=$t.get(t);return e&&e.setDOM(t.cloneNode()),t}class ao extends ql{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ao.inline=new ao("span");ao.block=new ao("div");const pm=new class extends ql{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Ow{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Me.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new OO(e,e.contentDOM),this.updateInner([new oi(0,0,0,e.state.doc.length)],null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:O,toA:p})=>p<this.minWidthFrom||O>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!Wq(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let l=r>-1?qq(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:O,to:p}=this.hasComposition;i=new oi(O,p,e.changes.mapPos(O,-1),e.changes.mapPos(p,1)).addToSet(i.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(me.ie||me.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,c=this.blockWrappers;this.updateDeco();let f=Bq(a,this.decorations,e.changes);f.length&&(i=oi.extendWithRanges(i,f));let h=Vq(c,this.blockWrappers,e.changes);return h.length&&(i=oi.extendWithRanges(i,h)),l&&!i.some(O=>O.fromA<=l.range.fromA&&O.toA>=l.range.toA)&&(i=l.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(n||e.length){let a=this.tile,c=new _q(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&$t.get(n.text)&&c.cache.reused.set($t.get(n.text),2),this.tile=c.run(e,n),L0(a,c.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let l=me.chrome||me.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(l),l&&(l.written||i.selectionRange.focusNode!=l.node||!this.tile.dom.contains(l.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let l of this.tile.children)l.isWidget()&&l.widget instanceof gm&&r.push(l.dom);i.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(sP)&&(this.editContextFormatting=i.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:i}=this.tile,r=this.view.root.activeElement,l=r==i,a=!l&&!(this.view.state.facet(Cr)||i.tabIndex>-1)&&Zc(i,this.view.observer.selectionRange)&&!(r&&i.contains(r));if(!(l||n||a))return;let c=this.forceSelection;this.forceSelection=!1;let f=this.view.state.selection.main,h,O;if(f.empty?O=h=this.inlineDOMNearPos(f.anchor,f.assoc||1):(O=this.inlineDOMNearPos(f.head,f.head==f.from?1:-1),h=this.inlineDOMNearPos(f.anchor,f.anchor==f.from?1:-1)),me.gecko&&f.empty&&!this.hasComposition&&Zq(h)){let m=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(m,h.node.childNodes[h.offset]||null)),h=O=new Ti(m,0),c=!0}let p=this.view.observer.selectionRange;(c||!p.focusNode||(!qc(h.node,h.offset,p.anchorNode,p.anchorOffset)||!qc(O.node,O.offset,p.focusNode,p.focusOffset))&&!this.suppressWidgetCursorChange(p,f))&&(this.view.observer.ignore(()=>{me.android&&me.chrome&&i.contains(p.focusNode)&&Yq(p.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let m=iu(this.view.root);if(m)if(f.empty){if(me.gecko){let y=Dq(h.node,h.offset);if(y&&y!=3){let b=(y==1?N2:V2)(h.node,h.offset);b&&(h=new Ti(b.node,b.offset))}}m.collapse(h.node,h.offset),f.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=f.bidiLevel)}else if(m.extend){m.collapse(h.node,h.offset);try{m.extend(O.node,O.offset)}catch{}}else{let y=document.createRange();f.anchor>f.head&&([h,O]=[O,h]),y.setEnd(O.node,O.offset),y.setStart(h.node,h.offset),m.removeAllRanges(),m.addRange(y)}a&&this.view.root.activeElement==i&&(i.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(h,O)),this.impreciseAnchor=h.precise?null:new Ti(p.anchorNode,p.anchorOffset),this.impreciseHead=O.precise?null:new Ti(p.focusNode,p.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&qc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=iu(e.root),{anchorNode:r,anchorOffset:l}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let a=this.lineAt(n.head,n.assoc);if(!a)return;let c=a.posAtStart;if(n.head==c||n.head==c+a.length)return;let f=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!f||!h||f.bottom>h.top)return;let O=this.domAtPos(n.head+n.assoc,n.assoc);i.collapse(O.node,O.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=n.from&&i.collapse(r,l)}posFromDOM(e,n){let i=this.tile.nearest(e);if(!i)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=i.posAtStart;if(i.isComposite()){let l;if(e==i.dom)l=i.dom.childNodes[n];else{let a=jr(e)==0?0:n==0?-1:1;for(;;){let c=e.parentNode;if(c==i.dom)break;a==0&&c.firstChild!=c.lastChild&&(e==c.firstChild?a=-1:a=1),e=c}a<0?l=e:l=e.nextSibling}if(l==i.dom.firstChild)return r;for(;l&&!$t.get(l);)l=l.nextSibling;if(!l)return r+i.length;for(let a=0,c=r;;a++){let f=i.children[a];if(f.dom==l)return c;c+=f.length+f.breakAfter}}else return i.isText()?e==i.dom?r+n:r+(n?i.length:0):r}domAtPos(e,n){let{tile:i,offset:r}=this.tile.resolveBlock(e,n);return i.isWidget()?i.domPosFor(e,n):i.domIn(r,n)}inlineDOMNearPos(e,n){let i,r=-1,l=!1,a,c=-1,f=!1;return this.tile.blockTiles((h,O)=>{if(h.isWidget()){if(h.flags&32&&O>=e)return!0;h.flags&16&&(l=!0)}else{let p=O+h.length;if(O<=e&&(i=h,r=e-O,l=p<e),p>=e&&!a&&(a=h,c=e-O,f=O>e),O>e&&a)return!0}}),!i&&!a?this.domAtPos(e,n):(l&&a?i=null:f&&i&&(a=null),i&&n<0||!a?i.domIn(r,n):a.domIn(c,n))}coordsAt(e,n){let{tile:i,offset:r}=this.tile.resolveBlock(e,n);return i.isWidget()?i.widget instanceof gm?null:i.coordsInWidget(r,n,!0):i.coordsIn(r,n)}lineAt(e,n){let{tile:i}=this.tile.resolveBlock(e,n);return i.isLine()?i:null}coordsForChar(e){let{tile:n,offset:i}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function r(l,a){if(l.isComposite())for(let c of l.children){if(c.length>=a){let f=r(c,a);if(f)return f}if(a-=c.length,a<0)break}else if(l.isText()&&a<l.length){let c=Ht(l.text,a);if(c==a)return null;let f=ru(l.dom,a,c).getClientRects();for(let h=0;h<f.length;h++){let O=f[h];if(h==f.length-1||O.top<O.bottom&&O.left<O.right)return O}}return null}return r(n,i)}measureVisibleLineHeights(e){let n=[],{from:i,to:r}=e,l=this.view.contentDOM.clientWidth,a=l>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,f=this.view.textDirection==gt.LTR,h=0,O=(p,m,y)=>{for(let b=0;b<p.children.length&&!(m>r);b++){let v=p.children[b],k=m+v.length,Q=v.dom.getBoundingClientRect(),{height:P}=Q;if(y&&!b&&(h+=Q.top-y.top),v instanceof Rr)k>i&&O(v,m,Q);else if(m>=i&&(h>0&&n.push(-h),n.push(P+h),h=0,a)){let T=v.dom.lastChild,$=T?Hh(T):[];if($.length){let _=$[$.length-1],A=f?_.right-Q.left:Q.right-_.left;A>c&&(c=A,this.minWidth=l,this.minWidthFrom=m,this.minWidthTo=k)}}y&&b==p.children.length-1&&(h+=y.bottom-Q.bottom),m=k+v.breakAfter}};return O(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?gt.RTL:gt.LTR}measureTextSize(){let e=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let c=0,f;for(let h of a.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let O=Hh(h.dom);if(O.length!=1)return;c+=O[0].width,f=O[0].height}if(c)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:c/a.length,textHeight:f}}});if(e)return e;let n=document.createElement("div"),i,r,l;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let a=Hh(n.firstChild)[0];i=n.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,l=a&&a.height?a.height:i,n.remove()}),{lineHeight:i,charWidth:r,textHeight:l}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let l=r==n.viewports.length?null:n.viewports[r],a=l?l.from-1:this.view.state.doc.length;if(a>i){let c=(n.lineBlockAt(a).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(Me.replace({widget:new gm(c),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!l)break;i=l.to+1}return Me.set(e)}updateDeco(){let e=1,n=this.view.state.facet(hO).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),i=!1,r=this.view.state.facet(Jy).map((l,a)=>{let c=typeof l=="function";return c&&(i=!0),c?l(this.view):l});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(Ue.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(aP).map(l=>typeof l=="function"?l(this.view):l)}scrollIntoView(e){var n;if(e.isSnapshot){let O=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=O.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let O of this.view.state.facet(rP))try{if(O(this.view,e.range,e))return!0}catch(p){In(this.view.state,p,"scroll handler")}let{range:i}=e,r=this.coordsAt(i.head,(n=i.assoc)!==null&&n!==void 0?n:i.empty?0:i.head>i.anchor?-1:1),l;if(!r)return;!i.empty&&(l=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(r={left:Math.min(r.left,l.left),top:Math.min(r.top,l.top),right:Math.max(r.right,l.right),bottom:Math.max(r.bottom,l.bottom)});let a=e1(this.view),c={left:r.left-a.left,top:r.top-a.top,right:r.right+a.right,bottom:r.bottom+a.bottom},{offsetWidth:f,offsetHeight:h}=this.view.scrollDOM;if(hq(this.view.scrollDOM,c,i.head<i.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,f),-f),Math.max(Math.min(e.yMargin,h),-h),this.view.textDirection==gt.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let O=this.view.docView.lineAt(i.head,1);O&&O.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let n=i=>i.isWidget()||i.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){L0(this.tile)}}function L0(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let i of t.children)L0(i,e)}}function Zq(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function fP(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=N2(n.focusNode,n.focusOffset),r=V2(n.focusNode,n.focusOffset),l=i||r;if(r&&i&&r.node!=i.node){let c=$t.get(r.node);if(!c||c.isText()&&c.text!=r.node.nodeValue)l=r;else if(t.docView.lastCompositionAfterCursor){let f=$t.get(i.node);!f||f.isText()&&f.text!=i.node.nodeValue||(l=r)}}if(t.docView.lastCompositionAfterCursor=l!=i,!l)return null;let a=e-l.offset;return{from:a,to:a+l.node.nodeValue.length,node:l.node}}function qq(t,e,n){let i=fP(t,n);if(!i)return null;let{node:r,from:l,to:a}=i,c=r.nodeValue;if(/[\n\r]/.test(c)||t.state.doc.sliceString(i.from,i.to)!=c)return null;let f=e.invertedDesc;return{range:new oi(f.mapPos(l),f.mapPos(a),l,a),text:r}}function Dq(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let Lq=class{constructor(){this.changes=[]}compareRange(e,n){Na(e,n,this.changes)}comparePoint(e,n){Na(e,n,this.changes)}boundChange(e){Na(e,e,this.changes)}};function Bq(t,e,n){let i=new Lq;return Ue.compare(t,e,n,i),i.changes}class Nq{constructor(){this.changes=[]}compareRange(e,n){Na(e,n,this.changes)}comparePoint(){}boundChange(e){Na(e,e,this.changes)}}function Vq(t,e,n){let i=new Nq;return Ue.compare(t,e,n,i),i.changes}function Yq(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function Wq(t,e){let n=!1;return e&&t.iterChangedRanges((i,r)=>{i<e.to&&r>e.from&&(n=!0)}),n}class gm extends ql{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Uq(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),l=e-r.from;if(r.length==0)return oe.cursor(e);l==0?n=1:l==r.length&&(n=-1);let a=l,c=l;n<0?a=Ht(r.text,l,!1):c=Ht(r.text,l);let f=i(r.text.slice(a,c));for(;a>0;){let h=Ht(r.text,a,!1);if(i(r.text.slice(h,a))!=f)break;a=h}for(;c<r.length;){let h=Ht(r.text,c);if(i(r.text.slice(c,h))!=f)break;c=h}return oe.range(a+r.from,c+r.from)}function Gq(t,e,n,i,r){let l=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let c=t.viewState.heightOracle.textHeight,f=Math.floor((r-n.top-(t.defaultLineHeight-c)*.5)/c);l+=f*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+iq(a,l,t.state.tabSize)}function B0(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let l of i.type){if(l.from>e)break;if(!(l.to<e)){if(l.from<e&&l.to>e)return l;(!r||l.type==rn.Text&&(r.type!=l.type||(n<0?l.from<e:l.to>e)))&&(r=l)}}return r||i}return i}function Hq(t,e,n,i){let r=B0(t,e.head,e.assoc||-1),l=!i||r.type!=rn.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(l){let a=t.dom.getBoundingClientRect(),c=t.textDirectionAt(r.from),f=t.posAtCoords({x:n==(c==gt.LTR)?a.right-1:a.left+1,y:(l.top+l.bottom)/2});if(f!=null)return oe.cursor(f,n?-1:1)}return oe.cursor(n?r.to:r.from,n?-1:1)}function pw(t,e,n,i){let r=t.state.doc.lineAt(e.head),l=t.bidiSpans(r),a=t.textDirectionAt(r.from);for(let c=e,f=null;;){let h=Qq(r,l,a,c,n),O=H2;if(!h){if(r.number==(n?t.state.doc.lines:1))return c;O=`
|
|
81
|
+
`,r=t.state.doc.line(r.number+(n?1:-1)),l=t.bidiSpans(r),h=t.visualLineSide(r,!n)}if(f){if(!f(O))return c}else{if(!i)return h;f=i(O)}c=h}}function Iq(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return l=>{let a=i(l);return r==Rt.Space&&(r=a),r==a}}function Fq(t,e,n,i){let r=e.head,l=n?1:-1;if(r==(n?t.state.doc.length:0))return oe.cursor(r,e.assoc);let a=e.goalColumn,c,f=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(r,e.assoc||((e.empty?n:e.head==e.from)?1:-1)),O=t.documentTop;if(h)a==null&&(a=h.left-f.left),c=l<0?h.top:h.bottom;else{let b=t.viewState.lineBlockAt(r);a==null&&(a=Math.min(f.right-f.left,t.defaultCharacterWidth*(r-b.from))),c=(l<0?b.top:b.bottom)+O}let p=f.left+a,m=t.viewState.heightOracle.textHeight>>1,y=i??m;for(let b=0;;b+=m){let v=c+(y+b)*l,k=N0(t,{x:p,y:v},!1,l);if(n?v>f.bottom:v<f.top)return oe.cursor(k.pos,k.assoc);let Q=t.coordsAtPos(k.pos,k.assoc),P=Q?(Q.top+Q.bottom)/2:0;if(!Q||(n?P>c:P<c))return oe.cursor(k.pos,k.assoc,void 0,a)}}function Dc(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(l,a,c)=>{if(e>l&&e<a){let f=i||n||(e-l<a-e?-1:1);e=f<0?l:a,i=f}});if(!i)return e}}function hP(t,e){let n=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],l=null;if(r.empty){let a=Dc(t,r.from,0);a!=r.from&&(l=oe.cursor(a,-1))}else{let a=Dc(t,r.from,-1),c=Dc(t,r.to,1);(a!=r.from||c!=r.to)&&(l=oe.range(r.from==r.anchor?a:c,r.from==r.head?a:c))}l&&(n||(n=e.ranges.slice()),n[i]=l)}return n?oe.create(n,e.mainIndex):e}function mm(t,e,n){let i=Dc(t.state.facet($u).map(r=>r(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:oe.cursor(i,i<n.from?1:-1)}class Vi{constructor(e,n){this.pos=e,this.assoc=n}}function N0(t,e,n,i){let r=t.contentDOM.getBoundingClientRect(),l=r.top+t.viewState.paddingTop,{x:a,y:c}=e,f=c-l,h;for(;;){if(f<0)return new Vi(0,1);if(f>t.viewState.docHeight)return new Vi(t.state.doc.length,-1);if(h=t.elementAtHeight(f),i==null)break;if(h.type==rn.Text){if(i<0?h.to<t.viewport.from:h.from>t.viewport.to)break;let m=t.docView.coordsAt(i<0?h.from:h.to,i>0?-1:1);if(m&&(i<0?m.top<=f+l:m.bottom>=f+l))break}let p=t.viewState.heightOracle.textHeight/2;f=i>0?h.bottom+p:h.top-p}if(t.viewport.from>=h.to||t.viewport.to<=h.from){if(n)return null;if(h.type==rn.Text){let p=Gq(t,r,h,a,c);return new Vi(p,p==h.from?1:-1)}}if(h.type!=rn.Text)return f<(h.top+h.bottom)/2?new Vi(h.from,1):new Vi(h.to,-1);let O=t.docView.lineAt(h.from,2);return(!O||O.length!=h.length)&&(O=t.docView.lineAt(h.from,-2)),new Kq(t,a,c,t.textDirectionAt(h.from)).scanTile(O,h.from)}class Kq{constructor(e,n,i,r){this.view=e,this.x=n,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:i,spans:r}=this.bidiSpansAt(e);return r[Yi.find(r,e-i.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:i,spans:r}=this.bidiSpansAt(e);return r[Yi.find(r,e-i.from,-1,n)].dir}bidiIn(e,n){let{spans:i,line:r}=this.bidiSpansAt(e);return i.length>1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from<n)}scan(e,n){let i=0,r=e.length-1,l=new Set,a=this.bidiIn(e[0],e[r]),c,f,h=-1,O=1e9,p;e:for(;i<r;){let y=r-i,b=i+r>>1;t:if(l.has(b)){let k=i+Math.floor(Math.random()*y);for(let Q=0;Q<y;Q++){if(!l.has(k)){b=k;break t}k++,k==r&&(k=i)}break e}l.add(b);let v=n(b);if(v)for(let k=0;k<v.length;k++){let Q=v[k],P=0;if(!(Q.width==0&&v.length>1)){if(Q.bottom<this.y)(!c||c.bottom<Q.bottom)&&(c=Q),P=1;else if(Q.top>this.y)(!f||f.top>Q.top)&&(f=Q),P=-1;else{let T=Q.left>this.x?this.x-Q.left:Q.right<this.x?this.x-Q.right:0,$=Math.abs(T);$<O&&(h=b,O=$,p=Q),T&&(P=T<0==(this.baseDir==gt.LTR)?-1:1)}P==-1&&(!a||this.baseDirAt(e[b],1))?r=b:P==1&&(!a||this.baseDirAt(e[b+1],-1))&&(i=b+1)}}}if(!p){let y=c&&(!f||this.y-c.bottom<f.top-this.y)?c:f;return this.y=(y.top+y.bottom)/2,this.scan(e,n)}if(O){if(c&&c.bottom>p.top)return this.y=c.bottom-1,this.scan(e,n);if(f&&f.top<p.bottom)return this.y=f.top+1,this.scan(e,n)}let m=(a?this.dirAt(e[h],1):this.baseDir)==gt.LTR;return{i:h,after:this.x>(p.left+p.right)/2==m}}scanText(e,n){let i=[];for(let l=0;l<e.length;l=Ht(e.text,l))i.push(n+l);i.push(n+e.length);let r=this.scan(i,l=>{let a=i[l]-n,c=i[l+1]-n;return ru(e.dom,a,c).getClientRects()});return r.after?new Vi(i[r.i+1],-1):new Vi(i[r.i],1)}scanTile(e,n){if(!e.length)return new Vi(n,1);if(e.children.length==1){let c=e.children[0];if(c.isText())return this.scanText(c,n);if(c.isComposite())return this.scanTile(c,n)}let i=[n];for(let c=0,f=n;c<e.children.length;c++)i.push(f+=e.children[c].length);let r=this.scan(i,c=>{let f=e.children[c];return f.flags&48?null:(f.dom.nodeType==1?f.dom:ru(f.dom,0,f.length)).getClientRects()}),l=e.children[r.i],a=i[r.i];return l.isText()?this.scanText(l,a):l.isComposite()?this.scanTile(l,a):r.after?new Vi(i[r.i+1],-1):new Vi(a,1)}}const Ra="";class Jq{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(Ke.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Ra}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let l=this.text.length;this.readNode(r);let a=$t.get(r),c=r.nextSibling;if(c==n){a!=null&&a.breakAfter&&!c&&i!=this.view.contentDOM&&this.lineBreak();break}let f=$t.get(c);(a&&f?a.breakAfter:(a?a.breakAfter:bd(r))||bd(c)&&(r.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>l)&&!tD(c,n)&&this.lineBreak(),r=c}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,a=1,c;if(this.lineSeparator?(l=n.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(c=r.exec(n))&&(l=c.index,a=c[0].length),this.append(n.slice(i,l<0?n.length:l)),l<0)break;if(this.lineBreak(),a>1)for(let f of this.points)f.node==e&&f.pos>this.text.length&&(f.pos-=a-1);i=l+a}}readNode(e){let n=$t.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(eD(e,i.node,i.offset)?n:0))}}function eD(t,e,n){for(;;){if(!e||n<jr(e))return!1;if(e==t)return!0;n=Es(e)+1,e=e.parentNode}}function tD(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let i=$t.get(t);if(!(i!=null&&i.isWidget()))return!1;i&&(n||(n=[])).push(i)}if(n)for(let i of n){let r=i.overrideDOMText;if(r!=null&&r.length)return!1}return!0}class gw{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class nD{constructor(e,n,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:l,impreciseAnchor:a}=e.docView,c=e.state.selection;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=dP(e.docView.tile,n,i,0))){let f=l||a?[]:rD(e),h=new Jq(f,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=sD(f,this.bounds.from)}else{let f=e.observer.selectionRange,h=l&&l.node==f.focusNode&&l.offset==f.focusOffset||!M0(e.contentDOM,f.focusNode)?c.main.head:e.docView.posFromDOM(f.focusNode,f.focusOffset),O=a&&a.node==f.anchorNode&&a.offset==f.anchorOffset||!M0(e.contentDOM,f.anchorNode)?c.main.anchor:e.docView.posFromDOM(f.anchorNode,f.anchorOffset),p=e.viewport;if((me.ios||me.chrome)&&c.main.empty&&h!=O&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(h,O),y=Math.max(h,O),b=p.from-m,v=p.to-y;(b==0||b==1||m==0)&&(v==0||v==-1||y==e.state.doc.length)&&(h=0,O=e.state.doc.length)}if(e.inputState.composing>-1&&c.ranges.length>1)this.newSel=c.replaceRange(oe.range(O,h));else if(e.lineWrapping&&O==h&&!(c.main.empty&&c.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(h,-1),y=0;m&&(y=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=oe.create([oe.cursor(h,y)])}else this.newSel=oe.single(O,h)}}}function dP(t,e,n,i){if(t.isComposite()){let r=-1,l=-1,a=-1,c=-1;for(let f=0,h=i,O=i;f<t.children.length;f++){let p=t.children[f],m=h+p.length;if(h<e&&m>n)return dP(p,e,n,h);if(m>=e&&r==-1&&(r=f,l=h),h>n&&p.dom.parentNode==t.dom){a=f,c=O;break}O=m,h=m+p.breakAfter}return{from:l,to:c<0?i+t.length:c,startDOM:(r?t.children[r-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:a<t.children.length&&a>=0?t.children[a].dom:null}}else return t.isText()?{from:i,to:i+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function OP(t,e){let n,{newSel:i}=e,{state:r}=t,l=r.selection.main,a=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:c,to:f}=e.bounds,h=l.from,O=null;(a===8||me.android&&e.text.length<f-c)&&(h=l.to,O="end");let p=r.doc.sliceString(c,f,Ra),m,y;!l.empty&&l.from>=c&&l.to<=f&&(e.typeOver||p!=e.text)&&p.slice(0,l.from-c)==e.text.slice(0,l.from-c)&&p.slice(l.to-c)==e.text.slice(m=e.text.length-(p.length-(l.to-c)))?n={from:l.from,to:l.to,insert:Ie.of(e.text.slice(l.from-c,m).split(Ra))}:(y=pP(p,e.text,h-c,O))&&(me.chrome&&a==13&&y.toB==y.from+2&&e.text.slice(y.from,y.toB)==Ra+Ra&&y.toB--,n={from:c+y.from,to:c+y.toA,insert:Ie.of(e.text.slice(y.from,y.toB).split(Ra))})}else i&&(!t.hasFocus&&r.facet(Cr)||Td(i,l))&&(i=null);if(!n&&!i)return!1;if((me.mac||me.android)&&n&&n.from==n.to&&n.from==l.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=oe.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:Ie.of([n.insert.toString().replace("."," ")])}):r.doc.lineAt(l.from).to<l.to&&t.docView.lineHasWidget(l.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:l.from,to:l.to,insert:r.toText(t.inputState.insertingText)}:me.chrome&&n&&n.from==n.to&&n.from==l.head&&n.insert.toString()==`
|
|
82
|
+
`&&t.lineWrapping&&(i&&(i=oe.single(i.main.anchor-1,i.main.head-1)),n={from:l.from,to:l.to,insert:Ie.of([" "])}),n)return t1(t,n,i,a);if(i&&!Td(i,l)){let c=!1,f="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(c=!0),f=t.inputState.lastSelectionOrigin,f=="select.pointer"&&(i=hP(r.facet($u).map(h=>h(t)),i))),t.dispatch({selection:i,scrollIntoView:c,userEvent:f}),!0}else return!1}function t1(t,e,n,i=-1){if(me.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(me.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Va(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&Va(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&Va(t.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,c=()=>a||(a=iD(t,e,n));return t.state.facet(eP).some(f=>f(t,e.from,e.to,l,c))||t.dispatch(c()),!0}function iD(t,e,n){let i,r=t.state,l=r.selection.main,a=-1;if(e.from==e.to&&e.from<l.from||e.from>l.to){let f=e.from<l.from?-1:1,h=f<0?l.from:l.to,O=Dc(r.facet($u).map(p=>p(t)),h,f);e.from==O&&(a=O)}if(a>-1)i={changes:e,selection:oe.cursor(e.from+e.insert.length,-1)};else if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let f=l.from<e.from?r.sliceDoc(l.from,e.from):"",h=l.to>e.to?r.sliceDoc(e.to,l.to):"";i=r.replaceSelection(t.state.toText(f+e.insert.sliceString(0,void 0,t.state.lineBreak)+h))}else{let f=r.changes(e),h=n&&n.main.to<=f.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=l.to+10&&e.to>=l.to-10){let O=t.state.sliceDoc(e.from,e.to),p,m=n&&fP(t,n.main.head);if(m){let b=e.insert.length-(e.to-e.from);p={from:m.from,to:m.to-b}}else p=t.state.doc.lineAt(l.head);let y=l.to-e.to;i=r.changeByRange(b=>{if(b.from==l.from&&b.to==l.to)return{changes:f,range:h||b.map(f)};let v=b.to-y,k=v-O.length;if(t.state.sliceDoc(k,v)!=O||v>=p.from&&k<=p.to)return{range:b};let Q=r.changes({from:k,to:v,insert:e.insert}),P=b.to-l.to;return{changes:Q,range:h?oe.range(Math.max(0,h.anchor+P),Math.max(0,h.head+P)):b.map(Q)}})}else i={changes:f,selection:h&&r.selection.replaceRange(h)}}let c="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,c+=".compose",t.inputState.compositionFirstChange&&(c+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:c,scrollIntoView:!0})}function pP(t,e,n,i){let r=Math.min(t.length,e.length),l=0;for(;l<r&&t.charCodeAt(l)==e.charCodeAt(l);)l++;if(l==r&&t.length==e.length)return null;let a=t.length,c=e.length;for(;a>0&&c>0&&t.charCodeAt(a-1)==e.charCodeAt(c-1);)a--,c--;if(i=="end"){let f=Math.max(0,l-Math.min(a,c));n-=a+f-l}if(a<l&&t.length<e.length){let f=n<=l&&n>=a?l-n:0;l-=f,c=l+(c-a),a=l}else if(c<l){let f=n<=l&&n>=c?l-n:0;l-=f,a=l+(a-c),c=l}return{from:l,toA:a,toB:c}}function rD(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:l}=t.observer.selectionRange;return n&&(e.push(new gw(n,i)),(r!=n||l!=i)&&e.push(new gw(r,l))),e}function sD(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?oe.single(n+e,i+e):null}function Td(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class lD{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,me.safari&&e.contentDOM.addEventListener("input",()=>null),me.gecko&&bD(e.contentDOM.ownerDocument)}handleEvent(e){!OD(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=aD(e),i=this.handlers,r=this.view.contentDOM;for(let l in n)if(l!="scroll"){let a=!n[l].handlers.length,c=i[l];c&&a!=!c.handlers.length&&(r.removeEventListener(l,this.handleEvent),c=null),c||r.addEventListener(l,this.handleEvent,{passive:a})}for(let l in i)l!="scroll"&&!n[l]&&r.removeEventListener(l,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&mP.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),me.android&&me.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return me.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((n=gP.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||oD.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Va(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:me.safari&&!me.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function mw(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){In(n.state,r)}}}function aD(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,l=r&&r.plugin.domEventHandlers,a=r&&r.plugin.domEventObservers;if(l)for(let c in l){let f=l[c];f&&n(c).handlers.push(mw(i.value,f))}if(a)for(let c in a){let f=a[c];f&&n(c).observers.push(mw(i.value,f))}}for(let i in $i)n(i).handlers.push($i[i]);for(let i in jn)n(i).observers.push(jn[i]);return e}const gP=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],oD="dthko",mP=[16,17,18,20,91,92,224,225],vh=6;function Qh(t){return Math.max(0,t)*.7+8}function cD(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class uD{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=D2(e.contentDOM),this.atoms=e.state.facet($u).map(a=>a(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ke.allowMultipleSelections)&&fD(e,n),this.dragging=dD(e,n)&&SP(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&cD(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,l=0,a=this.view.win.innerWidth,c=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:c}=this.scrollParents.y.getBoundingClientRect());let f=e1(this.view);e.clientX-f.left<=r+vh?n=-Qh(r-e.clientX):e.clientX+f.right>=a-vh&&(n=Qh(e.clientX-a)),e.clientY-f.top<=l+vh?i=-Qh(l-e.clientY):e.clientY+f.bottom>=c-vh&&(i=Qh(e.clientY-c)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,i=hP(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function fD(t,e){let n=t.state.facet(I2);return n.length?n[0](e):me.mac?e.metaKey:e.ctrlKey}function hD(t,e){let n=t.state.facet(F2);return n.length?n[0](e):me.mac?!e.altKey:!e.ctrlKey}function dD(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=iu(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let l=0;l<r.length;l++){let a=r[l];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function OD(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=$t.get(n))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(e))return!1;return!0}const $i=Object.create(null),jn=Object.create(null),yP=me.ie&&me.ie_version<15||me.ios&&me.webkit_version<604;function pD(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),xP(t,n.value)},50)}function pO(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function xP(t,e){e=pO(t.state,Iy,e);let{state:n}=t,i,r=1,l=n.toText(e),a=l.lines==n.selection.ranges.length;if(V0!=null&&n.selection.ranges.every(f=>f.empty)&&V0==l.toString()){let f=-1;i=n.changeByRange(h=>{let O=n.doc.lineAt(h.from);if(O.from==f)return{range:h};f=O.from;let p=n.toText((a?l.line(r++).text:e)+n.lineBreak);return{changes:{from:O.from,insert:p},range:oe.cursor(h.from+p.length)}})}else a?i=n.changeByRange(f=>{let h=l.line(r++);return{changes:{from:f.from,to:f.to,insert:h.text},range:oe.cursor(f.from+h.length)}}):i=n.replaceSelection(l);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}jn.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};jn.wheel=jn.mousewheel=t=>{t.inputState.lastWheelEvent=Date.now()};$i.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);jn.touchstart=(t,e)=>{let n=t.inputState,i=e.targetTouches[0];n.lastTouchTime=Date.now(),i&&(n.lastTouchX=i.clientX,n.lastTouchY=i.clientY),n.setSelectionOrigin("select.pointer")};jn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};$i.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(K2))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=mD(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new uD(t,e,n,i)),i&&t.observer.ignore(()=>{L2(t.contentDOM);let l=t.root.activeElement;l&&!l.contains(t.contentDOM)&&l.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function yw(t,e,n,i){if(i==1)return oe.cursor(e,n);if(i==2)return Uq(t.state,e,n);{let r=t.docView.lineAt(e,n),l=t.state.doc.lineAt(r?r.posAtEnd:e),a=r?r.posAtStart:l.from,c=r?r.posAtEnd:l.to;return c<t.state.doc.length&&c==l.to&&c++,oe.range(a,c)}}const gD=me.ie&&me.ie_version<=11;let xw=null,Sw=0,bw=0;function SP(t){if(!gD)return t.detail;let e=xw,n=bw;return xw=t,bw=Date.now(),Sw=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Sw+1)%3:1}function mD(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),i=SP(e),r=t.state.selection;return{update(l){l.docChanged&&(n.pos=l.changes.mapPos(n.pos),r=r.map(l.changes))},get(l,a,c){let f=t.posAndSideAtCoords({x:l.clientX,y:l.clientY},!1),h,O=yw(t,f.pos,f.assoc,i);if(n.pos!=f.pos&&!a){let p=yw(t,n.pos,n.assoc,i),m=Math.min(p.from,O.from),y=Math.max(p.to,O.to);O=m<O.from?oe.range(m,y,O.assoc):oe.range(y,m,O.assoc)}return a?r.replaceRange(r.main.extend(O.from,O.to,O.assoc)):c&&i==1&&r.ranges.length>1&&(h=yD(r,f.pos))?h:c?r.addRange(O):oe.create([O])}}}function yD(t,e){for(let n=0;n<t.ranges.length;n++){let{from:i,to:r}=t.ranges[n];if(i<=e&&r>=e)return oe.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}$i.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.tile.nearest(e.target);if(r&&r.isWidget()){let l=r.posAtStart,a=l+r.length;(l>=n.to||a<=n.from)&&(n=oe.range(l,a))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",pO(t.state,Fy,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};$i.dragend=t=>(t.inputState.draggedContent=null,!1);function vw(t,e,n,i){if(n=pO(t.state,Iy,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=t.inputState,a=i&&l&&hD(t,e)?{from:l.from,to:l.to}:null,c={from:r,insert:n},f=t.state.changes(a?[a,c]:c);t.focus(),t.dispatch({changes:f,selection:{anchor:f.mapPos(r,-1),head:f.mapPos(r,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}$i.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,l=()=>{++r==n.length&&vw(t,e,i.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a<n.length;a++){let c=new FileReader;c.onerror=l,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[a]=c.result),l()},c.readAsText(n[a])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return vw(t,e,i,!0),!0}return!1};$i.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=yP?null:e.clipboardData;return n?(xP(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(pD(t),!1)};function xD(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function SD(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:l}of t.selection.ranges){let a=t.doc.lineAt(l);a.number>r&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),r=a.number}i=!0}return{text:pO(t,Fy,e.join(t.lineBreak)),ranges:n,linewise:i}}let V0=null;$i.copy=$i.cut=(t,e)=>{if(!Zc(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:i,linewise:r}=SD(t.state);if(!n&&!r)return!1;V0=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let l=yP?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",n),!0):(xD(t,n),!1)};const bP=qr.define();function vP(t,e){let n=[];for(let i of t.facet(tP)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:bP.of(!0)}):null}function QP(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=vP(t.state,e);n?t.dispatch(n):t.update([])}},10)}jn.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),QP(t)};jn.blur=t=>{t.observer.clearSelectionRange(),QP(t)};jn.compositionstart=jn.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};jn.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,me.chrome&&me.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};jn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};$i.beforeinput=(t,e)=>{var n,i;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let l=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(l&&a.length){let c=a[0],f=t.posAtDOM(c.startContainer,c.startOffset),h=t.posAtDOM(c.endContainer,c.endOffset);return t1(t,{from:f,to:h,insert:t.state.toText(l)},null),!0}}let r;if(me.chrome&&me.android&&(r=gP.find(l=>l.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let l=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>l+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return me.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),me.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>jn.compositionend(t,e),20),!1};const Qw=new Set;function bD(t){Qw.has(t)||(Qw.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const ww=["pre-wrap","normal","pre-line","break-spaces"];let oo=!1;function kw(){oo=!1}class vD{constructor(e){this.lineWrapping=e,this.doc=Ie.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return ww.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i<e.length;i++){let r=e[i];r<0?i++:this.heightSamples[Math.floor(r*10)]||(n=!0,this.heightSamples[Math.floor(r*10)]=!0)}return n}refresh(e,n,i,r,l,a){let c=ww.indexOf(e)>-1,f=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=c||Math.abs(i-this.charWidth)>.1;if(this.lineWrapping=c,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=l,f){this.heightSamples={};for(let h=0;h<a.length;h++){let O=a[h];O<0?h++:this.heightSamples[Math.floor(O*10)]=!0}}return f}}class QD{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Qi{constructor(e,n,i,r,l){this.from=e,this.length=n,this.top=i,this.height=r,this._content=l}get type(){return typeof this._content=="number"?rn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof El?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Qi(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var pt=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(pt||(pt={}));const Ih=.001;class bn{constructor(e,n,i=2){this.length=e,this.height=n,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Ih&&(oo=!0),this.height=e)}replace(e,n,i){return bn.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let l=this,a=i.doc;for(let c=r.length-1;c>=0;c--){let{fromA:f,toA:h,fromB:O,toB:p}=r[c],m=l.lineAt(f,pt.ByPosNoHeight,i.setDoc(n),0,0),y=m.to>=h?m:l.lineAt(h,pt.ByPosNoHeight,i,0,0);for(p+=y.to-h,h=y.to;c>0&&m.from<=r[c-1].toA;)f=r[c-1].fromA,O=r[c-1].fromB,c--,f<m.from&&(m=l.lineAt(f,pt.ByPosNoHeight,i,0,0));O+=m.from-f,f=m.from;let b=n1.build(i.setDoc(a),e,O,p);l=$d(l,l.replace(f,h,b))}return l.updateHeight(i,0)}static empty(){return new Wn(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,i=e.length,r=0,l=0;for(;;)if(n==i)if(r>l*2){let c=e[n-1];c.break?e.splice(--n,1,c.left,null,c.right):e.splice(--n,1,c.left,c.right),i+=1+c.break,r-=c.size}else if(l>r*2){let c=e[i];c.break?e.splice(i,1,c.left,null,c.right):e.splice(i,1,c.left,c.right),i+=2+c.break,l-=c.size}else break;else if(r<l){let c=e[n++];c&&(r+=c.size)}else{let c=e[--i];c&&(l+=c.size)}let a=0;return e[n-1]==null?(a=1,n--):e[n]==null&&(a=1,i++),new kD(bn.of(e.slice(0,n)),a,bn.of(e.slice(i)))}}function $d(t,e){return t==e?t:(t.constructor!=e.constructor&&(oo=!0),e)}bn.prototype.size=1;const wD=Me.replace({});class wP extends bn{constructor(e,n,i){super(e,n),this.deco=i,this.spaceAbove=0}mainBlock(e,n){return new Qi(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,i,r){return this.spaceAbove&&e<i+this.spaceAbove?new Qi(r,0,i,this.spaceAbove,wD):this.mainBlock(i,r)}lineAt(e,n,i,r,l){let a=this.mainBlock(r,l);return this.spaceAbove?this.blockAt(0,i,r,l).join(a):a}forEachLine(e,n,i,r,l,a){e<=l+this.length&&n>=l&&a(this.lineAt(0,pt.ByPos,i,r,l))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Wn extends wP{constructor(e,n,i){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(e,n){return new Qi(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Wn||r instanceof tn&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof tn?r=new Wn(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):bn.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setMeasuredHeight(r):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class tn extends bn{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,l=r-i+1,a,c=0;if(e.lineWrapping){let f=Math.min(this.height,e.lineHeight*l);a=f/l,this.length>l+1&&(c=(this.height-f)/(this.length-l-1))}else a=this.height/l;return{firstLine:i,lastLine:r,perLine:a,perChar:c}}blockAt(e,n,i,r){let{firstLine:l,lastLine:a,perLine:c,perChar:f}=this.heightMetrics(n,r);if(n.lineWrapping){let h=r+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),O=n.doc.lineAt(h),p=c+O.length*f,m=Math.max(i,e-p/2);return new Qi(O.from,O.length,m,p,0)}else{let h=Math.max(0,Math.min(a-l,Math.floor((e-i)/c))),{from:O,length:p}=n.doc.line(l+h);return new Qi(O,p,i+c*h,c,0)}}lineAt(e,n,i,r,l){if(n==pt.ByHeight)return this.blockAt(e,i,r,l);if(n==pt.ByPosNoHeight){let{from:y,to:b}=i.doc.lineAt(e);return new Qi(y,b-y,0,0,0)}let{firstLine:a,perLine:c,perChar:f}=this.heightMetrics(i,l),h=i.doc.lineAt(e),O=c+h.length*f,p=h.number-a,m=r+c*p+f*(h.from-l-p);return new Qi(h.from,h.length,Math.max(r,Math.min(m,r+this.height-O)),O,0)}forEachLine(e,n,i,r,l,a){e=Math.max(e,l),n=Math.min(n,l+this.length);let{firstLine:c,perLine:f,perChar:h}=this.heightMetrics(i,l);for(let O=e,p=r;O<=n;){let m=i.doc.lineAt(O);if(O==e){let b=m.number-c;p+=f*b+h*(e-l-b)}let y=f+h*m.length;a(new Qi(m.from,m.length,p,y,0)),p+=y,O=m.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let l=i[i.length-1];l instanceof tn?i[i.length-1]=new tn(l.length+r):i.push(null,new tn(r-1))}if(e>0){let l=i[0];l instanceof tn?i[0]=new tn(e+l.length):i.unshift(new tn(e-1),null)}return bn.of(i)}decomposeLeft(e,n){n.push(new tn(e-1),null)}decomposeRight(e,n){n.push(null,new tn(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let l=n+this.length;if(r&&r.from<=n+this.length&&r.more){let a=[],c=Math.max(n,r.from),f=-1;for(r.from>n&&a.push(new tn(r.from-n-1).updateHeight(e,n));c<=l&&r.more;){let O=e.doc.lineAt(c).length;a.length&&a.push(null);let p=r.heights[r.index++],m=0;p<0&&(m=-p,p=r.heights[r.index++]),f==-1?f=p:Math.abs(p-f)>=Ih&&(f=-2);let y=new Wn(O,p,m);y.outdated=!1,a.push(y),c+=O+1}c<=l&&a.push(null,new tn(l-c).updateHeight(e,c));let h=bn.of(a);return(f<0||Math.abs(h.height-this.height)>=Ih||Math.abs(f-this.heightMetrics(e,n).perLine)>=Ih)&&(oo=!0),$d(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class kD extends bn{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let l=i+this.left.height;return e<l?this.left.blockAt(e,n,i,r):this.right.blockAt(e,n,l,r+this.left.length+this.break)}lineAt(e,n,i,r,l){let a=r+this.left.height,c=l+this.left.length+this.break,f=n==pt.ByHeight?e<a:e<c,h=f?this.left.lineAt(e,n,i,r,l):this.right.lineAt(e,n,i,a,c);if(this.break||(f?h.to<c:h.from>c))return h;let O=n==pt.ByPosNoHeight?pt.ByPosNoHeight:pt.ByPos;return f?h.join(this.right.lineAt(c,O,i,a,c)):this.left.lineAt(c,O,i,r,l).join(h)}forEachLine(e,n,i,r,l,a){let c=r+this.left.height,f=l+this.left.length+this.break;if(this.break)e<f&&this.left.forEachLine(e,n,i,r,l,a),n>=f&&this.right.forEachLine(e,n,i,c,f,a);else{let h=this.lineAt(f,pt.ByPos,i,r,l);e<h.from&&this.left.forEachLine(e,h.from-1,i,r,l,a),h.to>=e&&h.from<=n&&a(h),n>h.to&&this.right.forEachLine(h.to+1,n,i,c,f,a)}}replace(e,n,i){let r=this.left.length+this.break;if(n<r)return this.balanced(this.left.replace(e,n,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let l=[];e>0&&this.decomposeLeft(e,l);let a=l.length;for(let c of i)l.push(c);if(e>0&&Tw(l,a-1),n<this.length){let c=l.length;this.decomposeRight(n,l),Tw(l,c)}return bn.of(l)}decomposeLeft(e,n){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(i++,e>=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e<i&&this.left.decomposeRight(e,n),this.break&&e<r&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?bn.of(this.break?[e,null,n]:[e,n]):(this.left=$d(this.left,e),this.right=$d(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:l,right:a}=this,c=n+l.length+this.break,f=null;return r&&r.from<=n+l.length&&r.more?f=l=l.updateHeight(e,n,i,r):l.updateHeight(e,n,i),r&&r.from<=c+a.length&&r.more?f=a=a.updateHeight(e,c,i,r):a.updateHeight(e,c,i),f?this.balanced(l,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Tw(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof tn&&(i=t[e+1])instanceof tn&&t.splice(e-1,3,new tn(n.length+1+i.length))}const TD=5;class n1{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Wn?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Wn(i-this.pos,-1,0)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e<n||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,l=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=n-e;i.block?this.addBlock(new wP(a,r,i)):(a||l||r>=TD)&&this.addLineDeco(r,l,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Wn(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let i=new tn(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Wn)return e;let n=new Wn(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Wn)&&!this.isCovered?this.nodes.push(new Wn(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let r of this.nodes)r instanceof Wn&&r.updateHeight(this.oracle,i),i+=r?r.length:1;return this.nodes}static build(e,n,i,r){let l=new n1(i,e);return Ue.spans(n,i,r,l,0),l.finish(i)}}function $D(t,e,n){let i=new PD;return Ue.compare(t,e,n,i,0),i.changes}class PD{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,i,r){(e<n||i&&i.heightRelevant||r&&r.heightRelevant)&&Na(e,n,this.changes,5)}}function CD(t,e){let n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.defaultView||window,l=Math.max(0,n.left),a=Math.min(r.innerWidth,n.right),c=Math.max(0,n.top),f=Math.min(r.innerHeight,n.bottom);for(let h=t.parentNode;h&&h!=i.body;)if(h.nodeType==1){let O=h,p=window.getComputedStyle(O);if((O.scrollHeight>O.clientHeight||O.scrollWidth>O.clientWidth)&&p.overflow!="visible"){let m=O.getBoundingClientRect();l=Math.max(l,m.left),a=Math.min(a,m.right),c=Math.max(c,m.top),f=Math.min(h==t.parentNode?r.innerHeight:f,m.bottom)}h=p.position=="absolute"||p.position=="fixed"?O.offsetParent:O.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:l-n.left,right:Math.max(l,a)-n.left,top:c-(n.top+e),bottom:Math.max(c,f)-(n.top+e)}}function AD(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function RD(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class ym{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],l=n[i];if(r.from!=l.from||r.to!=l.to||r.size!=l.size)return!1}return!0}draw(e,n){return Me.replace({widget:new zD(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class zD extends ql{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class $w{constructor(e,n){this.view=e,this.state=n,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Pw,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=gt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let i=n.facet(Ky).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new vD(i),this.stateDeco=Cw(n),this.heightMap=bn.empty().applyChanges(this.stateDeco,Ie.empty,this.heightOracle.setDoc(n.doc),[new oi(0,0,0,n.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Me.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:l,to:a})=>r>=l&&r<=a)){let{from:l,to:a}=this.lineBlockAt(r);e.push(new wh(l,a))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Pw:new i1(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(zc(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=Cw(this.state);let r=e.changedRanges,l=oi.extendWithRanges(r,$D(i,this.stateDeco,e?e.changes:Nt.empty(this.state.doc.length))),a=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);kw(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=a||oo)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let f=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<f.from||n.range.head>f.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,n));let h=f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(iP)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,l=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?gt.RTL:gt.LTR;let a=this.heightOracle.mustRefreshForWrapping(l)||this.mustMeasureContent==="refresh",c=n.getBoundingClientRect(),f=a||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let h=0,O=0;if(c.width&&c.height){let{scaleX:_,scaleY:A}=q2(n,c);(_>.005&&Math.abs(this.scaleX-_)>.005||A>.005&&Math.abs(this.scaleY-A)>.005)&&(this.scaleX=_,this.scaleY=A,h|=16,a=f=!0)}let p=(parseInt(i.paddingTop)||0)*this.scaleY,m=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=m)&&(this.paddingTop=p,this.paddingBottom=m,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(f=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let y=D2(this.view.contentDOM,!1).y;y!=this.scrollParent&&(this.scrollParent=y,this.scrollAnchorHeight=-1,this.scrollOffset=0);let b=this.getScrollOffset();this.scrollOffset!=b&&(this.scrollAnchorHeight=-1,this.scrollOffset=b),this.scrolledToBottom=B2(this.scrollParent||e.win);let v=(this.printing?RD:CD)(n,this.paddingTop),k=v.top-this.pixelViewport.top,Q=v.bottom-this.pixelViewport.bottom;this.pixelViewport=v;let P=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(P!=this.inView&&(this.inView=P,P&&(f=!0)),!this.inView&&!this.scrollTarget&&!AD(e.dom))return 0;let T=c.width;if((this.contentDOMWidth!=T||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),f){let _=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(_)&&(a=!0),a||r.lineWrapping&&Math.abs(T-this.contentDOMWidth)>r.charWidth){let{lineHeight:A,charWidth:E,textHeight:N}=e.docView.measureTextSize();a=A>0&&r.refresh(l,A,E,N,Math.max(5,T/E),_),a&&(e.docView.minWidth=0,h|=16)}k>0&&Q>0?O=Math.max(k,Q):k<0&&Q<0&&(O=Math.min(k,Q)),kw();for(let A of this.viewports){let E=A.from==this.viewport.from?_:e.docView.measureVisibleLineHeights(A);this.heightMap=(a?bn.empty().applyChanges(this.stateDeco,Ie.empty,this.heightOracle,[new oi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new QD(A.from,E))}oo&&(h|=2)}let $=!this.viewportIsAppropriate(this.viewport,O)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return $&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(O,this.scrollTarget),h|=this.updateForViewport()),(h&2||$)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,l=this.heightOracle,{visibleTop:a,visibleBottom:c}=this,f=new wh(r.lineAt(a-i*1e3,pt.ByHeight,l,0,0).from,r.lineAt(c+(1-i)*1e3,pt.ByHeight,l,0,0).to);if(n){let{head:h}=n.range;if(h<f.from||h>f.to){let O=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=r.lineAt(h,pt.ByPos,l,0,0),m;n.y=="center"?m=(p.top+p.bottom)/2-O/2:n.y=="start"||n.y=="nearest"&&h<f.from?m=p.top:m=p.bottom-O,f=new wh(r.lineAt(m-1e3/2,pt.ByHeight,l,0,0).from,r.lineAt(m+O+1e3/2,pt.ByHeight,l,0,0).to)}}return f}mapViewport(e,n){let i=n.mapPos(e.from,-1),r=n.mapPos(e.to,1);return new wh(this.heightMap.lineAt(i,pt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,pt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,pt.ByPos,this.heightOracle,0,0),{bottom:l}=this.heightMap.lineAt(n,pt.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:c}=this;return(e==0||r<=a-Math.max(10,Math.min(-i,250)))&&(n==this.state.doc.length||l>=c+Math.max(10,Math.min(i,250)))&&r>a-2*1e3&&l<c+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let i=[];for(let r of e)n.touchesRange(r.from,r.to)||i.push(new ym(n.mapPos(r.from),n.mapPos(r.to),r.size,r.displaySize));return i}ensureLineGaps(e,n){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,l=r>>1,a=r<<1;if(this.defaultTextDirection!=gt.LTR&&!i)return[];let c=[],f=(O,p,m,y)=>{if(p-O<l)return;let b=this.state.selection.main,v=[b.from];b.empty||v.push(b.to);for(let Q of v)if(Q>O&&Q<p){f(O,Q-10,m,y),f(Q+10,p,m,y);return}let k=_D(e,Q=>Q.from>=m.from&&Q.to<=m.to&&Math.abs(Q.from-O)<l&&Math.abs(Q.to-p)<l&&!v.some(P=>Q.from<P&&Q.to>P));if(!k){if(p<m.to&&n&&i&&n.visibleRanges.some(T=>T.from<=p&&T.to>=p)){let T=n.moveToLineBoundary(oe.cursor(p),!1,!0).head;T>O&&(p=T)}let Q=this.gapSize(m,O,p,y),P=i||Q<2e6?Q:2e6;k=new ym(O,p,Q,P)}c.push(k)},h=O=>{if(O.length<a||O.type!=rn.Text)return;let p=ED(O.from,O.to,this.stateDeco);if(p.total<a)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,y,b;if(i){let v=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,k,Q;if(m!=null){let P=Th(p,m),T=((this.visibleBottom-this.visibleTop)/2+v)/O.height;k=P-T,Q=P+T}else k=(this.visibleTop-O.top-v)/O.height,Q=(this.visibleBottom-O.top+v)/O.height;y=kh(p,k),b=kh(p,Q)}else{let v=p.total*this.heightOracle.charWidth,k=r*this.heightOracle.charWidth,Q=0;if(v>2e6)for(let A of e)A.from>=O.from&&A.from<O.to&&A.size!=A.displaySize&&A.from*this.heightOracle.charWidth+Q<this.pixelViewport.left&&(Q=A.size-A.displaySize);let P=this.pixelViewport.left+Q,T=this.pixelViewport.right+Q,$,_;if(m!=null){let A=Th(p,m),E=((T-P)/2+k)/v;$=A-E,_=A+E}else $=(P-k)/v,_=(T+k)/v;y=kh(p,$),b=kh(p,_)}y>O.from&&f(O.from,y,O,p),b<O.to&&f(b,O.to,O,p)};for(let O of this.viewportLines)Array.isArray(O.type)?O.type.forEach(h):h(O);return c}gapSize(e,n,i,r){let l=Th(r,i)-Th(r,n);return this.heightOracle.lineWrapping?e.height*l:r.total*this.heightOracle.charWidth*l}updateLineGaps(e){ym.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Me.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];Ue.spans(n,this.viewport.from,this.viewport.to,{span(l,a){i.push({from:l,to:a})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let l=0;l<i.length&&!(r&8);l++){let a=this.visibleRanges[l],c=i[l];(a.from!=c.from||a.to!=c.to)&&(r|=4,e&&e.mapPos(a.from,-1)==c.from&&e.mapPos(a.to,1)==c.to||(r|=8))}return this.visibleRanges=i,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||zc(this.heightMap.lineAt(e,pt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||zc(this.heightMap.lineAt(this.scaler.fromDOM(e),pt.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return zc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class wh{constructor(e,n){this.from=e,this.to=n}}function ED(t,e,n){let i=[],r=t,l=0;return Ue.spans(n,t,e,{span(){},point(a,c){a>r&&(i.push({from:r,to:a}),l+=a-r),r=c}},20),r<e&&(i.push({from:r,to:e}),l+=e-r),{total:l,ranges:i}}function kh({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:l,to:a}=e[r],c=a-l;if(i<=c)return l+i;i-=c}}function Th(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function _D(t,e){for(let n of t)if(e(n))return n}const Pw={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function Cw(t){let e=t.facet(hO).filter(i=>typeof i!="function"),n=t.facet(Jy).filter(i=>typeof i!="function");return n.length&&e.push(Ue.join(n)),e}class i1{constructor(e,n,i){let r=0,l=0,a=0;this.viewports=i.map(({from:c,to:f})=>{let h=n.lineAt(c,pt.ByPos,e,0,0).top,O=n.lineAt(f,pt.ByPos,e,0,0).bottom;return r+=O-h,{from:c,to:f,top:h,bottom:O,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let c of this.viewports)c.domTop=a+(c.top-l)*this.scale,a=c.domBottom=c.domTop+(c.bottom-c.top),l=c.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let l=n<this.viewports.length?this.viewports[n]:null;if(!l||e<l.top)return r+(e-i)*this.scale;if(e<=l.bottom)return l.domTop+(e-l.top);i=l.bottom,r=l.domBottom}}fromDOM(e){for(let n=0,i=0,r=0;;n++){let l=n<this.viewports.length?this.viewports[n]:null;if(!l||e<l.domTop)return i+(e-r)/this.scale;if(e<=l.domBottom)return l.top+(e-l.domTop);i=l.bottom,r=l.domBottom}}eq(e){return e instanceof i1?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,i)=>n.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function zc(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Qi(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>zc(r,e)):t._content)}const $h=xe.define({combine:t=>t.join(" ")}),Y0=xe.define({combine:t=>t.indexOf(!0)>-1}),W0=Rs.newName(),kP=Rs.newName(),TP=Rs.newName(),$P={"&light":"."+kP,"&dark":"."+TP};function U0(t,e,n){return new Rs(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const jD=U0("."+W0,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},$P),MD={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},xm=me.ie&&me.ie_version<=11;class XD{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new dq,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(me.ie&&me.ie_version<=11||me.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&me.android&&e.constructor.EDIT_CONTEXT!==!1&&!(me.chrome&&me.chrome_version<126)&&(this.editContext=new qD(e),e.state.facet(Cr)&&(e.contentDOM.editContext=this.editContext.editContext)),xm&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Cr)?i.root.activeElement!=this.dom:!Zc(this.dom,r))return;let l=r.anchorNode&&i.docView.tile.nearest(r.anchorNode);if(l&&l.isWidget()&&l.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(me.ie&&me.ie_version<=11||me.android&&me.chrome)&&!i.state.selection.main.empty&&r.focusNode&&qc(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=iu(e.root);if(!n)return!1;let i=me.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&ZD(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=Zc(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&pq(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let i=this.dom;i;)if(i.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=n)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,MD),xm&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),xm&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var i;if(!this.delayedAndroidKey){let r=()=>{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Va(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let l of e){let a=this.readMutation(l);a&&(a.typeOver&&(r=!0),n==-1?{from:n,to:i}=a:(n=Math.min(a.from,n),i=Math.max(a.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Zc(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new nD(this.view,e,n,i);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=OP(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!Td(this.view.state.selection,n.newSel.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let i=Aw(n,e.previousSibling||e.target.previousSibling,-1),r=Aw(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Cr)!=e.state.facet(Cr)&&(e.view.contentDOM.editContext=e.state.facet(Cr)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Aw(t,e,n){for(;e;){let i=$t.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function Rw(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,l=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor,1);return qc(a.node,a.offset,r,l)&&([n,i,r,l]=[r,l,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:l}}function ZD(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return Rw(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?Rw(t,n):null}class qD{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:l,head:a}=r,c=this.toEditorPos(i.updateRangeStart),f=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:c,drifted:!1});let h=f-c>i.text.length;c==this.from&&l<this.from?c=l:f==this.to&&l>this.to&&(f=l);let O=pP(e.state.sliceDoc(c,f),i.text,(h?r.from:r.to)-c,h?"end":null);if(!O){let m=oe.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));Td(m,r)||e.dispatch({selection:m,userEvent:"select"});return}let p={from:O.from+c,to:O.toA+c,insert:Ie.of(i.text.slice(O.from,O.toB).split(`
|
|
83
|
+
`))};if((me.mac||me.android)&&p.from==a-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(p={from:c,to:f,insert:Ie.of([i.text.replace("."," ")])}),this.pendingContextChange=p,!e.state.readOnly){let m=this.to-this.from+(p.to-p.from+p.insert.length);t1(e,p,oe.single(this.toEditorPos(i.selectionStart,m),this.toEditorPos(i.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),p.from<p.to&&!p.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],l=null;for(let a=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);a<c;a++){let f=e.coordsForChar(a);l=f&&new DOMRect(f.left,f.top,f.right-f.left,f.bottom-f.top)||l||new DOMRect,r.push(l)}n.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let l of i.getTextFormats()){let a=l.underlineStyle,c=l.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(c)){let f=this.toEditorPos(l.rangeStart),h=this.toEditorPos(l.rangeEnd);if(f<h){let O=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(c)?1:2}px`;r.push(Me.mark({attributes:{style:O}}).range(f,h))}}}e.dispatch({effects:sP.of(Me.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=iu(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((l,a,c,f,h)=>{if(i)return;let O=h.length-(a-l);if(r&&a>=r.to)if(r.from==l&&r.to==a&&r.insert.eq(h)){r=this.pendingContextChange=null,n+=O,this.to+=O;return}else r=null,this.revertPending(e.state);if(l+=n,a+=n,a<=this.from)this.from+=O,this.to+=O;else if(l<this.to){if(l<this.from||a>this.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(a),h.toString()),this.to+=O}n+=O}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ye{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(l=>i(l,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Oq(e.parent)||document,this.viewState=new $w(this,e.state||Ke.create(e)),e.scrollTo&&e.scrollTo.is(bh)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Xa).map(r=>new dm(r));for(let r of this.plugins)r.update(this);this.observer=new XD(this),this.inputState=new lD(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Ow(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Zt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,l=this.state;for(let m of e){if(m.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=m.state}if(this.destroyed){this.viewState.state=l;return}let a=this.hasFocus,c=0,f=null;e.some(m=>m.annotation(bP))?(this.inputState.notifiedFocused=a,c=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,f=vP(l,a),f||(c=1));let h=this.observer.delayedAndroidKey,O=null;if(h?(this.observer.clearDelayedAndroidKey(),O=this.observer.readChange(),(O&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(O=null)):this.observer.clear(),l.facet(Ke.phrases)!=this.state.facet(Ke.phrases))return this.setState(l);r=Qd.create(this,l,e),r.flags|=c;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let m of e){if(p&&(p=p.map(m.changes)),m.scrollIntoView){let{main:y}=m.state.selection,{x:b,y:v}=this.state.facet(ye.cursorScrollMargin);p=new Ya(y.empty?y:oe.cursor(y.head,y.head>y.anchor?-1:1),"nearest","nearest",v,b)}for(let y of m.effects)y.is(bh)&&(p=y.value.clip(this.state))}this.viewState.update(r,p),this.bidiCache=Pd.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Rc)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(m=>m.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet($h)!=r.state.facet($h)&&(this.viewState.mustMeasureContent=!0),(n||i||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let m of this.state.facet(D0))try{m(r)}catch(y){In(this.state,y,"update listener")}(f||O)&&Promise.resolve().then(()=>{f&&this.state==f.startState&&this.dispatch(f),O&&!OP(this,O)&&h.force&&Va(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new $w(this,e),this.plugins=e.facet(Xa).map(i=>new dm(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new Ow(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Xa),i=e.state.facet(Xa);if(n!=i){let r=[];for(let l of i){let a=n.indexOf(l);if(a<0)r.push(new dm(l));else{let c=this.plugins[a];c.mustUpdate=e,r.push(c)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);n!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(i){In(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:l,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let c=0;;c++){if(a<0)if(B2(i||this.win))l=-1,a=this.viewState.heightMap.height;else{let y=this.viewState.scrollAnchorAt(r);l=y.from,a=y.top}this.updateState=1;let f=this.viewState.measure();if(!f&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];f&4||([this.measureRequests,h]=[h,this.measureRequests]);let O=h.map(y=>{try{return y.read(this)}catch(b){return In(this.state,b),zw}}),p=Qd.create(this,this.state,[]),m=!1;p.flags|=f,n?n.flags|=f:n=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),m=this.docView.update(p),m&&this.docViewUpdate());for(let y=0;y<h.length;y++)if(O[y]!=zw)try{let b=h[y];b.write&&b.write(O[y],this)}catch(b){In(this.state,b)}if(m&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let b=((l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-a)/this.scaleY;if((b>1||b<-1)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r=r+b,i?i.scrollTop+=b:this.win.scrollBy(0,b),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let c of this.state.facet(D0))c(n)}get themeClasses(){return W0+" "+(this.state.facet(Y0)?TP:kP)+" "+this.state.facet($h)}updateAttrs(){let e=Ew(this,lP,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Cr)?"true":"false",class:"cm-content",style:`${me.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Ew(this,Ky,n);let i=this.observer.ignore(()=>{let r=ow(this.contentDOM,this.contentAttrs,n),l=ow(this.dom,this.editorAttrs,e);return r||l});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(ye.announce)){n&&(this.announceDOM.textContent=""),n=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Rc);let e=this.state.facet(ye.cspNonce);Rs.mount(this.root,this.styleModules.concat(jD).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(i=>i.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return mm(this,e,pw(this,e,n,i))}moveByGroup(e,n){return mm(this,e,pw(this,e,n,i=>Iq(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),l=i[n?i.length-1:0];return oe.cursor(l.side(n,r)+e.from,l.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return Hq(this,e,n,i)}moveVertically(e,n,i){return mm(this,e,Fq(this,e,n,i))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let i=N0(this,e,n);return i&&i.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),N0(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),l=this.bidiSpans(r),a=l[Yi.find(l,e-r.from,-1,n)];return vd(i,a.dir==gt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(nP)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>DD)return G2(e.length);let n=this.textDirectionAt(e.from),i;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==n&&(l.fresh||U2(l.isolates,i=fw(this,e))))return l.order;i||(i=fw(this,e));let r=vq(e.text,n,i);return this.bidiCache.push(new Pd(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||me.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{L2(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){var i,r,l,a;return bh.of(new Ya(typeof e=="number"?oe.cursor(e):e,(i=n.y)!==null&&i!==void 0?i:"nearest",(r=n.x)!==null&&r!==void 0?r:"nearest",(l=n.yMargin)!==null&&l!==void 0?l:5,(a=n.xMargin)!==null&&a!==void 0?a:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return bh.of(new Ya(oe.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return sn.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return sn.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=Rs.newName(),r=[$h.of(i),Rc.of(U0(`.${i}`,e))];return n&&n.dark&&r.push(Y0.of(!0)),r}static baseTheme(e){return Zr.lowest(Rc.of(U0("."+W0,e,$P)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&$t.get(i)||$t.get(e);return((n=r==null?void 0:r.root)===null||n===void 0?void 0:n.view)||null}}ye.styleModule=Rc;ye.inputHandler=eP;ye.clipboardInputFilter=Iy;ye.clipboardOutputFilter=Fy;ye.scrollHandler=rP;ye.focusChangeEffect=tP;ye.perLineTextDirection=nP;ye.exceptionSink=J2;ye.updateListener=D0;ye.editable=Cr;ye.mouseSelectionStyle=K2;ye.dragMovesSelection=F2;ye.clickAddsSelectionRange=I2;ye.decorations=hO;ye.blockWrappers=aP;ye.outerDecorations=Jy;ye.atomicRanges=$u;ye.bidiIsolatedRanges=oP;ye.cursorScrollMargin=xe.define({combine:t=>{let e=5,n=5;for(let i of t)typeof i=="number"?e=n=i:{x:e,y:n}=i;return{x:e,y:n}}});ye.scrollMargins=cP;ye.darkTheme=Y0;ye.cspNonce=xe.define({combine:t=>t.length?t[0]:""});ye.contentAttributes=Ky;ye.editorAttributes=lP;ye.lineWrapping=ye.contentAttributes.of({class:"cm-lineWrapping"});ye.announce=Ne.define();const DD=4096,zw={};class Pd{constructor(e,n,i,r,l,a){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=l,this.order=a}static update(e,n){if(n.empty&&!e.some(l=>l.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:gt.LTR;for(let l=Math.max(0,e.length-10);l<e.length;l++){let a=e[l];a.dir==r&&!n.touchesRange(a.from,a.to)&&i.push(new Pd(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return i}}function Ew(t,e,n){for(let i=t.state.facet(e),r=i.length-1;r>=0;r--){let l=i[r],a=typeof l=="function"?l(t):l;a&&Uy(a,n)}return n}const LD=me.mac?"mac":me.windows?"win":me.linux?"linux":"key";function BD(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,l,a,c;for(let f=0;f<n.length-1;++f){const h=n[f];if(/^(cmd|meta|m)$/i.test(h))c=!0;else if(/^a(lt)?$/i.test(h))r=!0;else if(/^(c|ctrl|control)$/i.test(h))l=!0;else if(/^s(hift)?$/i.test(h))a=!0;else if(/^mod$/i.test(h))e=="mac"?c=!0:l=!0;else throw new Error("Unrecognized modifier name: "+h)}return r&&(i="Alt-"+i),l&&(i="Ctrl-"+i),c&&(i="Meta-"+i),a&&(i="Shift-"+i),i}function Ph(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const ND=Zr.default(ye.domEventHandlers({keydown(t,e){return CP(PP(e.state),t,e,"editor")}})),co=xe.define({enables:ND}),_w=new WeakMap;function PP(t){let e=t.facet(co),n=_w.get(e);return n||_w.set(e,n=WD(e.reduce((i,r)=>i.concat(r),[]))),n}function VD(t,e,n){return CP(PP(t.state),e,t,n)}let Ts=null;const YD=4e3;function WD(t,e=LD){let n=Object.create(null),i=Object.create(null),r=(a,c)=>{let f=i[a];if(f==null)i[a]=c;else if(f!=c)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},l=(a,c,f,h,O)=>{var p,m;let y=n[a]||(n[a]=Object.create(null)),b=c.split(/ (?!$)/).map(Q=>BD(Q,e));for(let Q=1;Q<b.length;Q++){let P=b.slice(0,Q).join(" ");r(P,!0),y[P]||(y[P]={preventDefault:!0,stopPropagation:!1,run:[T=>{let $=Ts={view:T,prefix:P,scope:a};return setTimeout(()=>{Ts==$&&(Ts=null)},YD),!0}]})}let v=b.join(" ");r(v,!1);let k=y[v]||(y[v]={preventDefault:!1,stopPropagation:!1,run:((m=(p=y._any)===null||p===void 0?void 0:p.run)===null||m===void 0?void 0:m.slice())||[]});f&&k.run.push(f),h&&(k.preventDefault=!0),O&&(k.stopPropagation=!0)};for(let a of t){let c=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let h of c){let O=n[h]||(n[h]=Object.create(null));O._any||(O._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=a;for(let m in O)O[m].run.push(y=>p(y,G0))}let f=a[e]||a.key;if(f)for(let h of c)l(h,f,a.run,a.preventDefault,a.stopPropagation),a.shift&&l(h,"Shift-"+f,a.shift,a.preventDefault,a.stopPropagation)}return n}let G0=null;function CP(t,e,n,i){G0=e;let r=aq(e),l=vs(r,0),a=ml(l)==r.length&&r!=" ",c="",f=!1,h=!1,O=!1;Ts&&Ts.view==n&&Ts.scope==i&&(c=Ts.prefix+" ",mP.indexOf(e.keyCode)<0&&(h=!0,Ts=null));let p=new Set,m=k=>{if(k){for(let Q of k.run)if(!p.has(Q)&&(p.add(Q),Q(n)))return k.stopPropagation&&(O=!0),!0;k.preventDefault&&(k.stopPropagation&&(O=!0),h=!0)}return!1},y=t[i],b,v;return y&&(m(y[c+Ph(r,e,!a)])?f=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(me.windows&&e.ctrlKey&&e.altKey)&&!(me.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(b=zs[e.keyCode])&&b!=r?(m(y[c+Ph(b,e,!0)])||e.shiftKey&&(v=tu[e.keyCode])!=r&&v!=b&&m(y[c+Ph(v,e,!1)]))&&(f=!0):a&&e.shiftKey&&m(y[c+Ph(r,e,!0)])&&(f=!0),!f&&m(y._any)&&(f=!0)),h&&(f=!0),f&&O&&e.stopPropagation(),G0=null,f}class Tl{constructor(e,n,i,r,l){this.className=e,this.left=n,this.top=i,this.width=r,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let l=AP(e);return[new Tl(n,r.left-l.left,r.top-l.top,null,r.bottom-r.top)]}else return UD(e,n,i)}}function AP(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==gt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function jw(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let l=t.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,c=t.posAtCoords({x:l.left+1,y:a}),f=t.posAtCoords({x:l.right-1,y:a});return c==null||f==null?i:{from:Math.max(i.from,Math.min(c,f)),to:Math.min(i.to,Math.max(c,f))}}function UD(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),l=t.textDirection==gt.LTR,a=t.contentDOM,c=a.getBoundingClientRect(),f=AP(t),h=a.querySelector(".cm-line"),O=h&&window.getComputedStyle(h),p=c.left+(O?parseInt(O.paddingLeft)+Math.min(0,parseInt(O.textIndent)):0),m=c.right-(O?parseInt(O.paddingRight):0),y=B0(t,i,1),b=B0(t,r,-1),v=y.type==rn.Text?y:null,k=b.type==rn.Text?b:null;if(v&&(t.lineWrapping||y.widgetLineBreaks)&&(v=jw(t,i,1,v)),k&&(t.lineWrapping||b.widgetLineBreaks)&&(k=jw(t,r,-1,k)),v&&k&&v.from==k.from&&v.to==k.to)return P(T(n.from,n.to,v));{let _=v?T(n.from,null,v):$(y,!1),A=k?T(null,n.to,k):$(b,!0),E=[];return(v||y).to<(k||b).from-(v&&k?1:0)||y.widgetLineBreaks>1&&_.bottom+t.defaultLineHeight/2<A.top?E.push(Q(p,_.bottom,m,A.top)):_.bottom<A.top&&t.elementAtHeight((_.bottom+A.top)/2).type==rn.Text&&(_.bottom=A.top=(_.bottom+A.top)/2),P(_).concat(E).concat(P(A))}function Q(_,A,E,N){return new Tl(e,_-f.left,A-f.top,Math.max(0,E-_),N-A)}function P({top:_,bottom:A,horizontal:E}){let N=[];for(let G=0;G<E.length;G+=2)N.push(Q(E[G],_,E[G+1],A));return N}function T(_,A,E){let N=1e9,G=-1e9,ne=[];function V(X,W,R,q,B){let M=t.coordsAtPos(X,X==E.to?-2:2),F=t.coordsAtPos(R,R==E.from?2:-2);!M||!F||(N=Math.min(M.top,F.top,N),G=Math.max(M.bottom,F.bottom,G),B==gt.LTR?ne.push(l&&W?p:M.left,l&&q?m:F.right):ne.push(!l&&q?p:F.left,!l&&W?m:M.right))}let Y=_??E.from,H=A??E.to;for(let X of t.visibleRanges)if(X.to>Y&&X.from<H)for(let W=Math.max(X.from,Y),R=Math.min(X.to,H);;){let q=t.state.doc.lineAt(W);for(let B of t.bidiSpans(q)){let M=B.from+q.from,F=B.to+q.from;if(M>=R)break;F>W&&V(Math.max(M,W),_==null&&M<=Y,Math.min(F,R),A==null&&F>=H,B.dir)}if(W=q.to+1,W>=R)break}return ne.length==0&&V(Y,_==null,H,A==null,t.textDirection),{top:N,bottom:G,horizontal:ne}}function $(_,A){let E=c.top+(A?_.top:_.bottom);return{top:E,bottom:E,horizontal:[]}}}function GD(t,e){return t.constructor==e.constructor&&t.eq(e)}class HD{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Fh)!=e.state.facet(Fh)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(Fh);for(;n<i.length&&i[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,i)=>!GD(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e,me.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Fh=xe.define();function RP(t){return[sn.define(e=>new HD(e,t)),Fh.of(t)]}const uo=xe.define({combine(t){return Zs(t,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function ID(t={}){return[uo.of(t),FD,KD,JD,iP.of(!0)]}function zP(t){return t.startState.facet(uo)!=t.state.facet(uo)}const FD=RP({above:!0,markers(t){let{state:e}=t,n=e.facet(uo),i=[];for(let r of e.selection.ranges){let l=r==e.selection.main;if(r.empty||n.drawRangeCursor&&!(l&&me.ios&&n.iosSelectionHandles)){let a=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",c=r.empty?r:oe.cursor(r.head,r.assoc);for(let f of Tl.forRange(t,a,c))i.push(f)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=zP(t);return n&&Mw(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Mw(e.state,t)},class:"cm-cursorLayer"});function Mw(t,e){e.style.animationDuration=t.facet(uo).cursorBlinkRate+"ms"}const KD=RP({above:!1,markers(t){let e=[],{main:n,ranges:i}=t.state.selection;for(let r of i)if(!r.empty)for(let l of Tl.forRange(t,"cm-selectionBackground",r))e.push(l);if(me.ios&&!n.empty&&t.state.facet(uo).iosSelectionHandles){for(let r of Tl.forRange(t,"cm-selectionHandle cm-selectionHandle-start",oe.cursor(n.from,1)))e.push(r);for(let r of Tl.forRange(t,"cm-selectionHandle cm-selectionHandle-end",oe.cursor(n.to,1)))e.push(r)}return e},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||zP(t)},class:"cm-selectionLayer"}),JD=Zr.highest(ye.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}}));function eL(){return nL}const tL=Me.line({class:"cm-activeLine"}),nL=sn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(tL.range(r.from)),e=r.from)}return Me.set(n)}},{decorations:t=>t.decorations}),Ch="-10000px";class iL{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let l=null;this.tooltipViews=this.tooltips.map(a=>l=i(a,l))}update(e,n){var i;let r=e.state.facet(this.facet),l=r.filter(f=>f);if(r===this.input){for(let f of this.tooltipViews)f.update&&f.update(e);return!1}let a=[],c=n?[]:null;for(let f=0;f<l.length;f++){let h=l[f],O=-1;if(h){for(let p=0;p<this.tooltips.length;p++){let m=this.tooltips[p];m&&m.create==h.create&&(O=p)}if(O<0)a[f]=this.createTooltipView(h,f?a[f-1]:null),c&&(c[f]=!!h.above);else{let p=a[f]=this.tooltipViews[O];c&&(c[f]=n[O]),p.update&&p.update(e)}}}for(let f of this.tooltipViews)a.indexOf(f)<0&&(this.removeTooltipView(f),(i=f.destroy)===null||i===void 0||i.call(f));return n&&(c.forEach((f,h)=>n[h]=f),n.length=c.length),this.input=r,this.tooltips=l,this.tooltipViews=a,!0}}function rL(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Sm=xe.define({combine:t=>{var e,n,i;return{position:me.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||rL}}}),Xw=new WeakMap,EP=sn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Sm);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new iL(t,_P,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(Sm);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=Ch,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:l}=this.manager.tooltipViews[0];if(me.safari){let a=l.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}else n=!!l.offsetParent&&l.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let l=this.parent.getBoundingClientRect();l.width&&l.height&&(t=l.width/this.parent.offsetWidth,e=l.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=e1(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((l,a)=>{let c=this.manager.tooltipViews[a];return c.getCoords?c.getCoords(l.pos):this.view.coordsAtPos(l.pos)}),size:this.manager.tooltipViews.map(({dom:l})=>l.getBoundingClientRect()),space:this.view.state.facet(Sm).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let c of this.manager.tooltipViews)c.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:l}=t,a=[];for(let c=0;c<this.manager.tooltips.length;c++){let f=this.manager.tooltips[c],h=this.manager.tooltipViews[c],{dom:O}=h,p=t.pos[c],m=t.size[c];if(!p||f.clip!==!1&&(p.bottom<=Math.max(n.top,i.top)||p.top>=Math.min(n.bottom,i.bottom)||p.right<Math.max(n.left,i.left)-.1||p.left>Math.min(n.right,i.right)+.1)){O.style.top=Ch;continue}let y=f.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,b=y?7:0,v=m.right-m.left,k=(e=Xw.get(h))!==null&&e!==void 0?e:m.bottom-m.top,Q=h.offset||lL,P=this.view.textDirection==gt.LTR,T=m.width>i.right-i.left?P?i.left:i.right-m.width:P?Math.max(i.left,Math.min(p.left-(y?14:0)+Q.x,i.right-v)):Math.min(Math.max(i.left,p.left-v+(y?14:0)-Q.x),i.right-v),$=this.above[c];!f.strictSide&&($?p.top-k-b-Q.y<i.top:p.bottom+k+b+Q.y>i.bottom)&&$==i.bottom-p.bottom>p.top-i.top&&($=this.above[c]=!$);let _=($?p.top-i.top:i.bottom-p.bottom)-b;if(_<k&&h.resize!==!1){if(_<this.view.defaultLineHeight){O.style.top=Ch;continue}Xw.set(h,k),O.style.height=(k=_)/l+"px"}else O.style.height&&(O.style.height="");let A=$?p.top-k-b-Q.y:p.bottom+b+Q.y,E=T+v;if(h.overlap!==!0)for(let N of a)N.left<E&&N.right>T&&N.top<A+k&&N.bottom>A&&(A=$?N.top-k-2-b:N.bottom+b+2);if(this.position=="absolute"?(O.style.top=(A-t.parent.top)/l+"px",Zw(O,(T-t.parent.left)/r)):(O.style.top=A/l+"px",Zw(O,T/r)),y){let N=p.left+(P?Q.x:-Q.x)-(T+14-7);y.style.left=N/r+"px"}h.overlap!==!0&&a.push({left:T,top:A,right:E,bottom:A+k}),O.classList.toggle("cm-tooltip-above",$),O.classList.toggle("cm-tooltip-below",!$),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ch}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Zw(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const sL=ye.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),lL={x:0,y:0},_P=xe.define({enables:[EP,sL]});function jP(t,e){let n=t.plugin(EP);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const qw=xe.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function MP(t,e){let n=t.plugin(XP),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const XP=sn.fromClass(class{constructor(t){this.input=t.state.facet(Cd),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(qw);this.top=new Ah(t,!0,e.topContainer),this.bottom=new Ah(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(qw);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ah(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ah(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Cd);if(n!=this.input){let i=n.filter(f=>f),r=[],l=[],a=[],c=[];for(let f of i){let h=this.specs.indexOf(f),O;h<0?(O=f(t.view),c.push(O)):(O=this.panels[h],O.update&&O.update(t)),r.push(O),(O.top?l:a).push(O)}this.specs=i,this.panels=r,this.top.sync(l),this.bottom.sync(a);for(let f of c)f.dom.classList.add("cm-panel"),f.mount&&f.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ye.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Ah{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Dw(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Dw(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Dw(t){let e=t.nextSibling;return t.remove(),e}const Cd=xe.define({enables:XP});function aL(t,e){let n,i=new Promise(a=>n=a),r=a=>oL(a,e,n);t.state.field(bm,!1)?t.dispatch({effects:ZP.of(r)}):t.dispatch({effects:Ne.appendConfig.of(bm.init(()=>[r]))});let l=qP.of(r);return{close:l,result:i.then(a=>((t.win.queueMicrotask||(f=>t.win.setTimeout(f,10)))(()=>{t.state.field(bm).indexOf(r)>-1&&t.dispatch({effects:l})}),a))}}const bm=Kn.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(ZP)?t=[n.value].concat(t):n.is(qP)&&(t=t.filter(i=>i!=n.value));return t},provide:t=>Cd.computeN([t],e=>e.field(t))}),ZP=Ne.define(),qP=Ne.define();function oL(t,e,n){let i=e.content?e.content(t,()=>a(null)):null;if(!i){if(i=Ut("form"),e.input){let c=Ut("input",e.input);/^(text|password|number|email|tel|url)$/.test(c.type)&&c.classList.add("cm-textfield"),c.name||(c.name="input"),i.appendChild(Ut("label",(e.label||"")+": ",c))}else i.appendChild(document.createTextNode(e.label||""));i.appendChild(document.createTextNode(" ")),i.appendChild(Ut("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let r=i.nodeName=="FORM"?[i]:i.querySelectorAll("form");for(let c=0;c<r.length;c++){let f=r[c];f.addEventListener("keydown",h=>{h.keyCode==27?(h.preventDefault(),a(null)):h.keyCode==13&&(h.preventDefault(),a(f))}),f.addEventListener("submit",h=>{h.preventDefault(),a(f)})}let l=Ut("div",i,Ut("button",{onclick:()=>a(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(l.className=e.class),l.classList.add("cm-dialog");function a(c){l.contains(l.ownerDocument.activeElement)&&t.focus(),n(c)}return{dom:l,top:e.top,mount:()=>{if(e.focus){let c;typeof e.focus=="string"?c=i.querySelector(e.focus):c=i.querySelector("input")||i.querySelector("button"),c&&"select"in c?c.select():c&&"focus"in c&&c.focus()}}}}class Mr extends As{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Mr.prototype.elementClass="";Mr.prototype.toDOM=void 0;Mr.prototype.mapMode=Sn.TrackBefore;Mr.prototype.startSide=Mr.prototype.endSide=-1;Mr.prototype.point=!0;const Kh=xe.define(),cL=xe.define(),uL={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ue.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Lc=xe.define();function fL(t){return[DP(),Lc.of({...uL,...t})]}const Lw=xe.define({combine:t=>t.some(e=>e)});function DP(t){return[hL]}const hL=sn.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Lc).map(e=>new Nw(t,e)),this.fixed=!t.state.facet(Lw);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Lw)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ue.iter(this.view.state.facet(Kh),this.view.viewport.from),i=[],r=this.gutters.map(l=>new dL(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(l.type)){let a=!0;for(let c of l.type)if(c.type==rn.Text&&a){H0(n,i,c.from);for(let f of r)f.line(this.view,c,i);a=!1}else if(c.widget)for(let f of r)f.widget(this.view,c)}else if(l.type==rn.Text){H0(n,i,l.from);for(let a of r)a.line(this.view,l,i)}else if(l.widget)for(let a of r)a.widget(this.view,l);for(let l of r)l.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Lc),n=t.state.facet(Lc),i=t.docChanged||t.heightChanged||t.viewportChanged||!Ue.eq(t.startState.facet(Kh),t.state.facet(Kh),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let l of n){let a=e.indexOf(l);a<0?r.push(new Nw(this.view,l)):(this.gutters[a].update(t),r.push(this.gutters[a]))}for(let l of this.gutters)l.dom.remove(),r.indexOf(l)<0&&l.destroy();for(let l of r)l.config.side=="after"?this.getDOMAfter().appendChild(l.dom):this.dom.appendChild(l.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>ye.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==gt.LTR?{left:i,right:r}:{right:i,left:r}})});function Bw(t){return Array.isArray(t)?t:[t]}function H0(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class dL{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Ue.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,l=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==r.elements.length){let c=new LP(e,a,l,i);r.elements.push(c),r.dom.appendChild(c.dom)}else r.elements[this.i].update(e,a,l,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];H0(this.cursor,r,n.from),i.length&&(r=r.concat(i));let l=this.gutter.config.lineMarker(e,n,r);l&&r.unshift(l);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let l of e.state.facet(cL)){let a=l(e,n.widget,n);a&&(r||(r=[])).push(a)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Nw{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let l=r.target,a;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let f=l.getBoundingClientRect();a=(f.top+f.bottom)/2}else a=r.clientY;let c=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[i](e,c,r)&&r.preventDefault()});this.markers=Bw(n.markers(e)),n.initialSpacer&&(this.spacer=new LP(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Bw(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!Ue.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class LP{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),OL(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let l=0,a=0;;){let c=a,f=l<n.length?n[l++]:null,h=!1;if(f){let O=f.elementClass;O&&(i+=" "+O);for(let p=a;p<this.markers.length;p++)if(this.markers[p].compare(f)){c=p,h=!0;break}}else c=this.markers.length;for(;a<c;){let O=this.markers[a++];if(O.toDOM){O.destroy(r);let p=r.nextSibling;r.remove(),r=p}}if(!f)break;f.toDOM&&(h?r=r.nextSibling:this.dom.insertBefore(f.toDOM(e),r)),h&&a++}this.dom.className=i,this.markers=n}destroy(){this.setMarkers(null,[])}}function OL(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const pL=xe.define(),gL=xe.define(),Za=xe.define({combine(t){return Zs(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let i=Object.assign({},e);for(let r in n){let l=i[r],a=n[r];i[r]=l?(c,f,h)=>l(c,f,h)||a(c,f,h):a}return i}})}});class vm extends Mr{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Qm(t,e){return t.state.facet(Za).formatNumber(e,t.state)}const mL=Lc.compute([Za],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(pL)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new vm(Qm(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet(gL)){let l=r(e,n,i);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Za)!=e.state.facet(Za),initialSpacer(e){return new vm(Qm(e,Vw(e.state.doc.lines)))},updateSpacer(e,n){let i=Qm(n.view,Vw(n.view.state.doc.lines));return i==e.number?e:new vm(i)},domEventHandlers:t.facet(Za).domEventHandlers,side:"before"}));function yL(t={}){return[Za.of(t),DP(),mL]}function Vw(t){let e=9;for(;e<t;)e=e*10+9;return e}const xL=new class extends Mr{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},SL=Kh.compute(["selection"],t=>{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(xL.range(r)))}return Ue.of(e)});function bL(){return SL}const BP=1024;let vL=0;class ci{constructor(e,n){this.from=e,this.to=n}}class _e{constructor(e={}){this.id=vL++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Vt.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}_e.closedBy=new _e({deserialize:t=>t.split(" ")});_e.openedBy=new _e({deserialize:t=>t.split(" ")});_e.group=new _e({deserialize:t=>t.split(" ")});_e.isolate=new _e({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});_e.contextHash=new _e({perNode:!0});_e.lookAhead=new _e({perNode:!0});_e.mounted=new _e({perNode:!0});class Wa{constructor(e,n,i,r=!1){this.tree=e,this.overlay=n,this.parser=i,this.bracketed=r}static get(e){return e&&e.props&&e.props[_e.mounted.id]}}const QL=Object.create(null);class Vt{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):QL,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Vt(e.name||"",n,e.id,i);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(r)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[l[0].id]=l[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(_e.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(_e.group),l=-1;l<(r?r.length:0);l++){let a=n[l<0?i.name:r[l]];if(a)return a}}}}Vt.none=new Vt("",Object.create(null),0,8);class Pu{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let i of this.types){let r=null;for(let l of e){let a=l(i);if(a){r||(r=Object.assign({},i.props));let c=a[1],f=a[0];f.combine&&f.id in r&&(c=f.combine(r[f.id],c)),r[f.id]=c}}n.push(r?new Vt(i.name,r,i.id,i.flags):i)}return new Pu(n)}}const Rh=new WeakMap,Yw=new WeakMap;var rt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(rt||(rt={}));class st{constructor(e,n,i,r,l){if(this.type=e,this.children=n,this.positions=i,this.length=r,this.props=null,l&&l.length){this.props=Object.create(null);for(let[a,c]of l)this.props[typeof a=="number"?a:a.id]=c}}toString(){let e=Wa.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let i of this.children){let r=i.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Ad(this.topNode,e)}cursorAt(e,n=0,i=0){let r=Rh.get(this)||this.topNode,l=new Ad(r);return l.moveTo(e,n),Rh.set(this,l._tree),l}get topNode(){return new dn(this,0,0,null)}resolve(e,n=0){let i=su(Rh.get(this)||this.topNode,e,n,!1);return Rh.set(this,i),i}resolveInner(e,n=0){let i=su(Yw.get(this)||this.topNode,e,n,!0);return Yw.set(this,i),i}resolveStack(e,n=0){return TL(this,e,n)}iterate(e){let{enter:n,leave:i,from:r=0,to:l=this.length}=e,a=e.mode||0,c=(a&rt.IncludeAnonymous)>0;for(let f=this.cursor(a|rt.IncludeAnonymous);;){let h=!1;if(f.from<=l&&f.to>=r&&(!c&&f.type.isAnonymous||n(f)!==!1)){if(f.firstChild())continue;h=!0}for(;h&&i&&(c||!f.type.isAnonymous)&&i(f),!f.nextSibling();){if(!f.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:l1(Vt.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new st(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new st(Vt.none,n,i,r)))}static build(e){return $L(e)}}st.empty=new st(Vt.none,[],[],0);class r1{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new r1(this.buffer,this.index)}}class _s{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Vt.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],i=this.buffer[e+3],r=this.set.types[n],l=r.name;if(/\W/.test(l)&&!r.isError&&(l=JSON.stringify(l)),e+=4,i==e)return l;let a=[];for(;e<i;)a.push(this.childString(e)),e=this.buffer[e+3];return l+"("+a.join(",")+")"}findChild(e,n,i,r,l){let{buffer:a}=this,c=-1;for(let f=e;f!=n&&!(NP(l,r,a[f+1],a[f+2])&&(c=f,i>0));f=a[f+3]);return c}slice(e,n,i){let r=this.buffer,l=new Uint16Array(n-e),a=0;for(let c=e,f=0;c<n;){l[f++]=r[c++],l[f++]=r[c++]-i;let h=l[f++]=r[c++]-i;l[f++]=r[c++]-e,a=Math.max(a,h)}return new _s(l,a,this.set)}}function NP(t,e,n,i){switch(t){case-2:return n<e;case-1:return i>=e&&n<e;case 0:return n<e&&i>e;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function su(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let a=!i&&t instanceof dn&&t.index<0?null:t.parent;if(!a)return t;t=a}let l=i?0:rt.IgnoreOverlays;if(i)for(let a=t,c=a.parent;c;a=c,c=a.parent)a instanceof dn&&a.index<0&&((r=c.enter(e,n,l))===null||r===void 0?void 0:r.from)!=a.from&&(t=c);for(;;){let a=t.enter(e,n,l);if(!a)return t;t=a}}class VP{cursor(e=0){return new Ad(this,e)}getChild(e,n=null,i=null){let r=Ww(this,e,n,i);return r.length?r[0]:null}getChildren(e,n=null,i=null){return Ww(this,e,n,i)}resolve(e,n=0){return su(this,e,n,!1)}resolveInner(e,n=0){return su(this,e,n,!0)}matchContext(e){return I0(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),i=this;for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(i=n,n=r.prevSibling):n=r}return i}get node(){return this}get next(){return this.parent}}class dn extends VP{constructor(e,n,i,r){super(),this._tree=e,this.from=n,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,i,r,l=0){for(let a=this;;){for(let{children:c,positions:f}=a._tree,h=n>0?c.length:-1;e!=h;e+=n){let O=c[e],p=f[e]+a.from,m;if(!(!(l&rt.EnterBracketed&&O instanceof st&&(m=Wa.get(O))&&!m.overlay&&m.bracketed&&i>=p&&i<=p+O.length)&&!NP(r,i,p,p+O.length))){if(O instanceof _s){if(l&rt.ExcludeBuffers)continue;let y=O.findChild(0,O.buffer.length,n,i-p,r);if(y>-1)return new Wi(new wL(a,O,e,p),null,y)}else if(l&rt.IncludeAnonymous||!O.type.isAnonymous||s1(O)){let y;if(!(l&rt.IgnoreMounts)&&(y=Wa.get(O))&&!y.overlay)return new dn(y.tree,p,e,a);let b=new dn(O,p,e,a);return l&rt.IncludeAnonymous||!b.type.isAnonymous?b:b.nextChild(n<0?O.children.length-1:0,n,i,r,l)}}}if(l&rt.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,i=0){let r;if(!(i&rt.IgnoreOverlays)&&(r=Wa.get(this._tree))&&r.overlay){let l=e-this.from,a=i&rt.EnterBracketed&&r.bracketed;for(let{from:c,to:f}of r.overlay)if((n>0||a?c<=l:c<l)&&(n<0||a?f>=l:f>l))return new dn(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Ww(t,e,n,i){let r=t.cursor(),l=[];if(!r.firstChild())return l;if(n!=null){for(let a=!1;!a;)if(a=r.type.is(n),!r.nextSibling())return l}for(;;){if(i!=null&&r.type.is(i))return l;if(r.type.is(e)&&l.push(r.node),!r.nextSibling())return i==null?l:[]}}function I0(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class wL{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Wi extends VP{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,l=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return l<0?null:new Wi(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,i=0){if(i&rt.ExcludeBuffers)return null;let{buffer:r}=this.context,l=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return l<0?null:new Wi(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Wi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Wi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,l=i.buffer[this.index+3];if(l>r){let a=i.buffer[this.index+1];e.push(i.slice(r,l,a)),n.push(0)}return new st(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function YP(t){if(!t.length)return null;let e=0,n=t[0];for(let l=1;l<t.length;l++){let a=t[l];(a.from>n.from||a.to<n.to)&&(n=a,e=l)}let i=n instanceof dn&&n.index<0?null:n.parent,r=t.slice();return i?r[e]=i:r.splice(e,1),new kL(r,n)}class kL{constructor(e,n){this.heads=e,this.node=n}get next(){return YP(this.heads)}}function TL(t,e,n){let i=t.resolveInner(e,n),r=null;for(let l=i instanceof dn?i:i.context.parent;l;l=l.parent)if(l.index<0){let a=l.parent;(r||(r=[i])).push(a.resolve(e,n)),l=a}else{let a=Wa.get(l.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let c=new dn(a.tree,a.overlay[0].from+l.from,-1,l);(r||(r=[i])).push(su(c,e,n,!1))}}return r?YP(r):i}class Ad{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~rt.EnterBracketed,e instanceof dn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof dn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,l=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&rt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let l=0;l<this.index;l++)if(r.buffer.buffer[l+3]<this.index)return!1;({index:n,parent:i}=r)}else({index:n,_parent:i}=this._tree);for(;i;{index:n,_parent:i}=i)if(n>-1)for(let l=n+e,a=e<0?-1:i._tree.children.length;l!=a;l+=e){let c=i._tree.children[l];if(this.mode&rt.IncludeAnonymous||c instanceof _s||!c.type.isAnonymous||s1(c))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,l=this.stack.length;l>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;n=a,i=l+1;break e}r=this.stack[--l]}for(let r=i;r<this.stack.length;r++)n=new Wi(this.buffer,n,this.stack[r]);return this.bufferNode=new Wi(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&n&&n(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return I0(this.node.parent,e);let{buffer:n}=this.buffer,{types:i}=n.set;for(let r=e.length-1,l=this.stack.length-1;r>=0;l--){if(l<0)return I0(this._tree,e,r);let a=i[n.buffer[this.stack[l]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}}function s1(t){return t.children.some(e=>e instanceof _s||!e.type.isAnonymous||s1(e))}function $L(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=BP,reused:l=[],minRepeatType:a=i.types.length}=t,c=Array.isArray(n)?new r1(n,n.length):n,f=i.types,h=0,O=0;function p(_,A,E,N,G,ne){let{id:V,start:Y,end:H,size:X}=c,W=O,R=h;if(X<0)if(c.next(),X==-1){let z=l[V];E.push(z),N.push(Y-_);return}else if(X==-3){h=V;return}else if(X==-4){O=V;return}else throw new RangeError(`Unrecognized record size: ${X}`);let q=f[V],B,M,F=Y-_;if(H-Y<=r&&(M=k(c.pos-A,G))){let z=new Uint16Array(M.size-M.skip),Z=c.pos-M.size,te=z.length;for(;c.pos>Z;)te=Q(M.start,z,te);B=new _s(z,H-M.start,i),F=M.start-_}else{let z=c.pos-X;c.next();let Z=[],te=[],re=V>=a?V:-1,ue=0,he=H;for(;c.pos>z;)re>=0&&c.id==re&&c.size>=0?(c.end<=he-r&&(b(Z,te,Y,ue,c.end,he,re,W,R),ue=Z.length,he=c.end),c.next()):ne>2500?m(Y,z,Z,te):p(Y,z,Z,te,re,ne+1);if(re>=0&&ue>0&&ue<Z.length&&b(Z,te,Y,ue,Y,he,re,W,R),Z.reverse(),te.reverse(),re>-1&&ue>0){let Oe=y(q,R);B=l1(q,Z,te,0,Z.length,0,H-Y,Oe,Oe)}else B=v(q,Z,te,H-Y,W-H,R)}E.push(B),N.push(F)}function m(_,A,E,N){let G=[],ne=0,V=-1;for(;c.pos>A;){let{id:Y,start:H,end:X,size:W}=c;if(W>4)c.next();else{if(V>-1&&H<V)break;V<0&&(V=X-r),G.push(Y,H,X),ne++,c.next()}}if(ne){let Y=new Uint16Array(ne*4),H=G[G.length-2];for(let X=G.length-3,W=0;X>=0;X-=3)Y[W++]=G[X],Y[W++]=G[X+1]-H,Y[W++]=G[X+2]-H,Y[W++]=W;E.push(new _s(Y,G[2]-H,i)),N.push(H-_)}}function y(_,A){return(E,N,G)=>{let ne=0,V=E.length-1,Y,H;if(V>=0&&(Y=E[V])instanceof st){if(!V&&Y.type==_&&Y.length==G)return Y;(H=Y.prop(_e.lookAhead))&&(ne=N[V]+Y.length+H)}return v(_,E,N,G,ne,A)}}function b(_,A,E,N,G,ne,V,Y,H){let X=[],W=[];for(;_.length>N;)X.push(_.pop()),W.push(A.pop()+E-G);_.push(v(i.types[V],X,W,ne-G,Y-ne,H)),A.push(G-E)}function v(_,A,E,N,G,ne,V){if(ne){let Y=[_e.contextHash,ne];V=V?[Y].concat(V):[Y]}if(G>25){let Y=[_e.lookAhead,G];V=V?[Y].concat(V):[Y]}return new st(_,A,E,N,V)}function k(_,A){let E=c.fork(),N=0,G=0,ne=0,V=E.end-r,Y={size:0,start:0,skip:0};e:for(let H=E.pos-_;E.pos>H;){let X=E.size;if(E.id==A&&X>=0){Y.size=N,Y.start=G,Y.skip=ne,ne+=4,N+=4,E.next();continue}let W=E.pos-X;if(X<0||W<H||E.start<V)break;let R=E.id>=a?4:0,q=E.start;for(E.next();E.pos>W;){if(E.size<0)if(E.size==-3||E.size==-4)R+=4;else break e;else E.id>=a&&(R+=4);E.next()}G=q,N+=X,ne+=R}return(A<0||N==_)&&(Y.size=N,Y.start=G,Y.skip=ne),Y.size>4?Y:void 0}function Q(_,A,E){let{id:N,start:G,end:ne,size:V}=c;if(c.next(),V>=0&&N<a){let Y=E;if(V>4){let H=c.pos-(V-4);for(;c.pos>H;)E=Q(_,A,E)}A[--E]=Y,A[--E]=ne-_,A[--E]=G-_,A[--E]=N}else V==-3?h=N:V==-4&&(O=N);return E}let P=[],T=[];for(;c.pos>0;)p(t.start||0,t.bufferStart||0,P,T,-1,0);let $=(e=t.length)!==null&&e!==void 0?e:P.length?T[0]+P[0].length:0;return new st(f[t.topID],P.reverse(),T.reverse(),$)}const Uw=new WeakMap;function Jh(t,e){if(!t.isAnonymous||e instanceof _s||e.type!=t)return 1;let n=Uw.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof st)){n=1;break}n+=Jh(t,i)}Uw.set(e,n)}return n}function l1(t,e,n,i,r,l,a,c,f){let h=0;for(let b=i;b<r;b++)h+=Jh(t,e[b]);let O=Math.ceil(h*1.5/8),p=[],m=[];function y(b,v,k,Q,P){for(let T=k;T<Q;){let $=T,_=v[T],A=Jh(t,b[T]);for(T++;T<Q;T++){let E=Jh(t,b[T]);if(A+E>=O)break;A+=E}if(T==$+1){if(A>O){let E=b[$];y(E.children,E.positions,0,E.children.length,v[$]+P);continue}p.push(b[$])}else{let E=v[T-1]+b[T-1].length-_;p.push(l1(t,b,v,$,T,_,E,null,f))}m.push(_+P-l)}}return y(e,n,i,r,0),(c||f)(p,m,a)}class a1{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Wi?this.setBuffer(e.context.buffer,e.index,n):e instanceof dn&&this.map.set(e.tree,n)}get(e){return e instanceof Wi?this.getBuffer(e.context.buffer,e.index):e instanceof dn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class zr{constructor(e,n,i,r,l=!1,a=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(l?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new zr(0,e.length,e,0,!1,i)];for(let l of n)l.to>e.length&&r.push(l);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],l=1,a=e.length?e[0]:null;for(let c=0,f=0,h=0;;c++){let O=c<n.length?n[c]:null,p=O?O.fromA:1e9;if(p-f>=i)for(;a&&a.from<p;){let m=a;if(f>=m.from||p<=m.to||h){let y=Math.max(m.from,f)-h,b=Math.min(m.to,p)-h;m=y>=b?null:new zr(y,b,m.tree,m.offset+h,c>0,!!O)}if(m&&r.push(m),a.to>p)break;a=l<e.length?e[l++]:null}if(!O)break;f=O.toA,h=O.toA-O.toB}return r}}class o1{startParse(e,n,i){return typeof e=="string"&&(e=new PL(e)),i=i?i.length?i.map(r=>new ci(r.from,r.to)):[new ci(0,0)]:[new ci(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let l=r.advance();if(l)return l}}}class PL{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function WP(t){return(e,n,i,r)=>new AL(e,t,n,i,r)}class Gw{constructor(e,n,i,r,l,a){this.parser=e,this.parse=n,this.overlay=i,this.bracketed=r,this.target=l,this.from=a}}function Hw(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class CL{constructor(e,n,i,r,l,a,c,f){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=l,this.bracketed=a,this.target=c,this.prev=f,this.depth=0,this.ranges=[]}}const F0=new _e({perNode:!0});class AL{constructor(e,n,i,r,l){this.nest=n,this.input=i,this.fragments=r,this.ranges=l,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new st(i.type,i.children,i.positions,i.length,i.propValues.concat([[F0,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[_e.mounted.id]=new Wa(n,e.overlay,e.parser,e.bracketed),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new EL(this.fragments),n=null,i=null,r=new Ad(new dn(this.baseTree,this.ranges[0].from,0,null),rt.IncludeAnonymous|rt.IgnoreMounts);e:for(let l,a;;){let c=!0,f;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)c=!1;else if(e.hasNode(r)){if(n){let h=n.mounts.find(O=>O.frag.from<=r.from&&O.frag.to>=r.to&&O.mount.overlay);if(h)for(let O of h.mount.overlay){let p=O.from+h.pos,m=O.to+h.pos;p>=r.from&&m<=r.to&&!n.ranges.some(y=>y.from<m&&y.to>p)&&n.ranges.push({from:p,to:m})}}c=!1}else if(i&&(a=RL(i.ranges,r.from,r.to)))c=a!=2;else if(!r.type.isAnonymous&&(l=this.nest(r,this.input))&&(r.from<r.to||!l.overlay)){r.tree||(zL(r),n&&n.depth++,i&&i.depth++);let h=e.findMounts(r.from,l.parser);if(typeof l.overlay=="function")n=new CL(l.parser,l.overlay,h,this.inner.length,r.from,!!l.bracketed,r.tree,n);else{let O=Kw(this.ranges,l.overlay||(r.from<r.to?[new ci(r.from,r.to)]:[]));O.length&&Hw(O),(O.length||!l.overlay)&&this.inner.push(new Gw(l.parser,O.length?l.parser.startParse(this.input,Jw(h,O),O):l.parser.startParse(""),l.overlay?l.overlay.map(p=>new ci(p.from-r.from,p.to-r.from)):null,!!l.bracketed,r.tree,O.length?O[0].from:r.from)),l.overlay?O.length&&(i={ranges:O,depth:0,prev:i}):c=!1}}else if(n&&(f=n.predicate(r))&&(f===!0&&(f=new ci(r.from,r.to)),f.from<f.to)){let h=n.ranges.length-1;h>=0&&n.ranges[h].to==f.from?n.ranges[h]={from:n.ranges[h].from,to:f.to}:n.ranges.push(f)}if(c&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let h=Kw(this.ranges,n.ranges);h.length&&(Hw(h),this.inner.splice(n.index,0,new Gw(n.parser,n.parser.startParse(this.input,Jw(n.mounts,h),h),n.ranges.map(O=>new ci(O.from-n.start,O.to-n.start)),n.bracketed,n.target,h[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function RL(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function Iw(t,e,n,i,r,l){if(e<n){let a=t.buffer[e+1];i.push(t.slice(e,n,a)),r.push(a-l)}}function zL(t){let{node:e}=t,n=[],i=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let r=t.tree,l=r.children.indexOf(i),a=r.children[l],c=a.buffer,f=[l];function h(O,p,m,y,b,v){let k=n[v],Q=[],P=[];Iw(a,O,k,Q,P,y);let T=c[k+1],$=c[k+2];f.push(Q.length);let _=v?h(k+4,c[k+3],a.set.types[c[k]],T,$-T,v-1):e.toTree();return Q.push(_),P.push(T-y),Iw(a,c[k+3],p,Q,P,y),new st(m,Q,P,b)}r.children[l]=h(0,c.length,Vt.none,0,a.length,n.length-1);for(let O of f){let p=t.tree.children[O],m=t.tree.positions[O];t.yield(new dn(p,m+t.from,O,t._tree))}}class Fw{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(rt.IncludeAnonymous|rt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,i=e-this.offset;for(;!this.done&&n.from<i;)n.to>=e&&n.enter(i,1,rt.IgnoreOverlays|rt.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof st)n=n.children[0];else break}return!1}}let EL=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(F0))!==null&&n!==void 0?n:i.to,this.inner=new Fw(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(F0))!==null&&e!==void 0?e:n.to,this.inner=new Fw(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let l=this.inner.cursor.node;l;l=l.parent){let a=(i=l.tree)===null||i===void 0?void 0:i.prop(_e.mounted);if(a&&a.parser==n)for(let c=this.fragI;c<this.fragments.length;c++){let f=this.fragments[c];if(f.from>=l.to)break;f.tree==this.curFrag.tree&&r.push({frag:f,pos:l.from-f.offset,mount:a})}}}return r}};function Kw(t,e){let n=null,i=e;for(let r=1,l=0;r<t.length;r++){let a=t[r-1].to,c=t[r].from;for(;l<i.length;l++){let f=i[l];if(f.from>=c)break;f.to<=a||(n||(i=n=e.slice()),f.from<a?(n[l]=new ci(f.from,a),f.to>c&&n.splice(l+1,0,new ci(c,f.to))):f.to>c?n[l--]=new ci(c,f.to):n.splice(l--,1))}}return i}function _L(t,e,n,i){let r=0,l=0,a=!1,c=!1,f=-1e9,h=[];for(;;){let O=r==t.length?1e9:a?t[r].to:t[r].from,p=l==e.length?1e9:c?e[l].to:e[l].from;if(a!=c){let m=Math.max(f,n),y=Math.min(O,p,i);m<y&&h.push(new ci(m,y))}if(f=Math.min(O,p),f==1e9)break;O==f&&(a?(a=!1,r++):a=!0),p==f&&(c?(c=!1,l++):c=!0)}return h}function Jw(t,e){let n=[];for(let{pos:i,mount:r,frag:l}of t){let a=i+(r.overlay?r.overlay[0].from:0),c=a+r.tree.length,f=Math.max(l.from,a),h=Math.min(l.to,c);if(r.overlay){let O=r.overlay.map(m=>new ci(m.from+i,m.to+i)),p=_L(e,O,f,h);for(let m=0,y=f;;m++){let b=m==p.length,v=b?h:p[m].from;if(v>y&&n.push(new zr(y,v,r.tree,-a,l.from>=y||l.openStart,l.to<=v||l.openEnd)),b)break;y=p[m].to}}else n.push(new zr(f,h,r.tree,-a,l.from>=a||l.openStart,l.to<=c||l.openEnd))}return n}let jL=0;class Gn{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=jL++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof Gn&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new Gn(i,[],null,[]);if(r.set.push(r),n)for(let l of n.set)r.set.push(l);return r}static defineModifier(e){let n=new Rd(e);return i=>i.modified.indexOf(n)>-1?i:Rd.get(i.base||i,i.modified.concat(n).sort((r,l)=>r.id-l.id))}}let ML=0;class Rd{constructor(e){this.name=e,this.instances=[],this.id=ML++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(c=>c.base==e&&XL(n,c.modified));if(i)return i;let r=[],l=new Gn(e.name,r,e,n);for(let c of n)c.instances.push(l);let a=ZL(n);for(let c of e.set)if(!c.modified.length)for(let f of a)r.push(Rd.get(c,f));return l}}function XL(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function ZL(t){let e=[[]];for(let n=0;n<t.length;n++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(t[n]));return e.sort((n,i)=>i.length-n.length)}function qs(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let l=[],a=2,c=r;for(let p=0;;){if(c=="..."&&p>0&&p+3==r.length){a=1;break}let m=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!m)throw new RangeError("Invalid path: "+r);if(l.push(m[0]=="*"?"":m[0][0]=='"'?JSON.parse(m[0]):m[0]),p+=m[0].length,p==r.length)break;let y=r[p++];if(p==r.length&&y=="!"){a=0;break}if(y!="/")throw new RangeError("Invalid path: "+r);c=r.slice(p)}let f=l.length-1,h=l[f];if(!h)throw new RangeError("Invalid path: "+r);let O=new lu(i,a,f>0?l.slice(0,f):null);e[h]=O.sort(e[h])}}return UP.add(e)}const UP=new _e({combine(t,e){let n,i,r;for(;t||e;){if(!t||e&&t.depth>=e.depth?(r=e,e=e.next):(r=t,t=t.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let l=new lu(r.tags,r.mode,r.context);n?n.next=l:i=l,n=l}return i}});class lu{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}lu.empty=new lu([],2,null);function GP(t,e){let n=Object.create(null);for(let l of t)if(!Array.isArray(l.tag))n[l.tag.id]=l.class;else for(let a of l.tag)n[a.id]=l.class;let{scope:i,all:r=null}=e||{};return{style:l=>{let a=r;for(let c of l)for(let f of c.set){let h=n[f.id];if(h){a=a?a+" "+h:h;break}}return a},scope:i}}function qL(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function DL(t,e,n,i=0,r=t.length){let l=new LL(i,Array.isArray(e)?e:[e],n);l.highlightRange(t.cursor(),i,r,"",l.highlighters),l.flush(r)}class LL{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,l){let{type:a,from:c,to:f}=e;if(c>=i||f<=n)return;a.isTop&&(l=this.highlighters.filter(y=>!y.scope||y.scope(a)));let h=r,O=BL(e)||lu.empty,p=qL(l,O.tags);if(p&&(h&&(h+=" "),h+=p,O.mode==1&&(r+=(r?" ":"")+p)),this.startSpan(Math.max(n,c),h),O.opaque)return;let m=e.tree&&e.tree.prop(_e.mounted);if(m&&m.overlay){let y=e.node.enter(m.overlay[0].from+c,1),b=this.highlighters.filter(k=>!k.scope||k.scope(m.tree.type)),v=e.firstChild();for(let k=0,Q=c;;k++){let P=k<m.overlay.length?m.overlay[k]:null,T=P?P.from+c:f,$=Math.max(n,Q),_=Math.min(i,T);if($<_&&v)for(;e.from<_&&(this.highlightRange(e,$,_,r,l),this.startSpan(Math.min(_,e.to),h),!(e.to>=T||!e.nextSibling())););if(!P||T>i)break;Q=P.to+c,Q>n&&(this.highlightRange(y.cursor(),Math.max(n,P.from+c),Math.min(i,Q),"",b),this.startSpan(Math.min(i,Q),h))}v&&e.parent()}else if(e.firstChild()){m&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,l),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function BL(t){let e=t.type.prop(UP);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const pe=Gn.define,zh=pe(),Qs=pe(),ek=pe(Qs),tk=pe(Qs),ws=pe(),Eh=pe(ws),wm=pe(ws),Di=pe(),dl=pe(Di),Zi=pe(),qi=pe(),K0=pe(),vc=pe(K0),_h=pe(),j={comment:zh,lineComment:pe(zh),blockComment:pe(zh),docComment:pe(zh),name:Qs,variableName:pe(Qs),typeName:ek,tagName:pe(ek),propertyName:tk,attributeName:pe(tk),className:pe(Qs),labelName:pe(Qs),namespace:pe(Qs),macroName:pe(Qs),literal:ws,string:Eh,docString:pe(Eh),character:pe(Eh),attributeValue:pe(Eh),number:wm,integer:pe(wm),float:pe(wm),bool:pe(ws),regexp:pe(ws),escape:pe(ws),color:pe(ws),url:pe(ws),keyword:Zi,self:pe(Zi),null:pe(Zi),atom:pe(Zi),unit:pe(Zi),modifier:pe(Zi),operatorKeyword:pe(Zi),controlKeyword:pe(Zi),definitionKeyword:pe(Zi),moduleKeyword:pe(Zi),operator:qi,derefOperator:pe(qi),arithmeticOperator:pe(qi),logicOperator:pe(qi),bitwiseOperator:pe(qi),compareOperator:pe(qi),updateOperator:pe(qi),definitionOperator:pe(qi),typeOperator:pe(qi),controlOperator:pe(qi),punctuation:K0,separator:pe(K0),bracket:vc,angleBracket:pe(vc),squareBracket:pe(vc),paren:pe(vc),brace:pe(vc),content:Di,heading:dl,heading1:pe(dl),heading2:pe(dl),heading3:pe(dl),heading4:pe(dl),heading5:pe(dl),heading6:pe(dl),contentSeparator:pe(Di),list:pe(Di),quote:pe(Di),emphasis:pe(Di),strong:pe(Di),link:pe(Di),monospace:pe(Di),strikethrough:pe(Di),inserted:pe(),deleted:pe(),changed:pe(),invalid:pe(),meta:_h,documentMeta:pe(_h),annotation:pe(_h),processingInstruction:pe(_h),definition:Gn.defineModifier("definition"),constant:Gn.defineModifier("constant"),function:Gn.defineModifier("function"),standard:Gn.defineModifier("standard"),local:Gn.defineModifier("local"),special:Gn.defineModifier("special")};for(let t in j){let e=j[t];e instanceof Gn&&(e.name=t)}GP([{tag:j.link,class:"tok-link"},{tag:j.heading,class:"tok-heading"},{tag:j.emphasis,class:"tok-emphasis"},{tag:j.strong,class:"tok-strong"},{tag:j.keyword,class:"tok-keyword"},{tag:j.atom,class:"tok-atom"},{tag:j.bool,class:"tok-bool"},{tag:j.url,class:"tok-url"},{tag:j.labelName,class:"tok-labelName"},{tag:j.inserted,class:"tok-inserted"},{tag:j.deleted,class:"tok-deleted"},{tag:j.literal,class:"tok-literal"},{tag:j.string,class:"tok-string"},{tag:j.number,class:"tok-number"},{tag:[j.regexp,j.escape,j.special(j.string)],class:"tok-string2"},{tag:j.variableName,class:"tok-variableName"},{tag:j.local(j.variableName),class:"tok-variableName tok-local"},{tag:j.definition(j.variableName),class:"tok-variableName tok-definition"},{tag:j.special(j.variableName),class:"tok-variableName2"},{tag:j.definition(j.propertyName),class:"tok-propertyName tok-definition"},{tag:j.typeName,class:"tok-typeName"},{tag:j.namespace,class:"tok-namespace"},{tag:j.className,class:"tok-className"},{tag:j.macroName,class:"tok-macroName"},{tag:j.propertyName,class:"tok-propertyName"},{tag:j.operator,class:"tok-operator"},{tag:j.comment,class:"tok-comment"},{tag:j.meta,class:"tok-meta"},{tag:j.invalid,class:"tok-invalid"},{tag:j.punctuation,class:"tok-punctuation"}]);var km;const Ql=new _e;function c1(t){return xe.define({combine:t?e=>e.concat(t):void 0})}const u1=new _e;class ui{constructor(e,n,i=[],r=""){this.data=e,this.name=r,Ke.prototype.hasOwnProperty("tree")||Object.defineProperty(Ke.prototype,"tree",{get(){return mt(this)}}),this.parser=n,this.extension=[Ms.of(this),Ke.languageData.of((l,a,c)=>{let f=nk(l,a,c),h=f.type.prop(Ql);if(!h)return[];let O=l.facet(h),p=f.type.prop(u1);if(p){let m=f.resolve(a-f.from,c);for(let y of p)if(y.test(m,l)){let b=l.facet(y.facet);return y.type=="replace"?b:b.concat(O)}}return O})].concat(i)}isActiveAt(e,n,i=-1){return nk(e,n,i).type.prop(Ql)==this.data}findRegions(e){let n=e.facet(Ms);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(l,a)=>{if(l.prop(Ql)==this.data){i.push({from:a,to:a+l.length});return}let c=l.prop(_e.mounted);if(c){if(c.tree.prop(Ql)==this.data){if(c.overlay)for(let f of c.overlay)i.push({from:f.from+a,to:f.to+a});else i.push({from:a,to:a+l.length});return}else if(c.overlay){let f=i.length;if(r(c.tree,c.overlay[0].from+a),i.length>f)return}}for(let f=0;f<l.children.length;f++){let h=l.children[f];h instanceof st&&r(h,l.positions[f]+a)}};return r(mt(e),0),i}get allowsNesting(){return!0}}ui.setState=Ne.define();function nk(t,e,n){let i=t.facet(Ms),r=mt(t).topNode;if(!i||i.allowsNesting)for(let l=r;l;l=l.enter(e,n,rt.ExcludeBuffers|rt.EnterBracketed))l.type.isTop&&(r=l);return r}class js extends ui{constructor(e,n,i){super(e,n,[],i),this.parser=n}static define(e){let n=c1(e.languageData);return new js(n,e.parser.configure({props:[Ql.add(i=>i.isTop?n:void 0)]}),e.name)}configure(e,n){return new js(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function mt(t){let e=t.field(ui.state,!1);return e?e.tree:st.empty}class NL{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e<i||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Qc=null;class au{constructor(e,n,i=[],r,l,a,c,f){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=l,this.viewport=a,this.skipped=c,this.scheduleOn=f,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new au(e,n,[],st.empty,0,i,[],null)}startParse(){return this.parser.startParse(new NL(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=st.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(zr.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(zr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Qc;Qc=this;try{return e()}finally{Qc=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=ik(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:l,viewport:a,skipped:c}=this;if(this.takeTree(),!e.empty){let f=[];if(e.iterChangedRanges((h,O,p,m)=>f.push({fromA:h,toA:O,fromB:p,toB:m})),i=zr.applyChanges(i,f),r=st.empty,l=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){c=[];for(let h of this.skipped){let O=e.mapPos(h.from,1),p=e.mapPos(h.to,-1);O<p&&c.push({from:O,to:p})}}}return new au(this.parser,n,i,r,l,a,c,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:r,to:l}=this.skipped[i];r<e.to&&l>e.from&&(this.fragments=ik(this.fragments,r,l),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends o1{createParse(n,i,r){let l=r[0].from,a=r[r.length-1].to;return{parsedPos:l,advance(){let f=Qc;if(f){for(let h of r)f.tempSkipped.push(h);e&&(f.scheduleOn=f.scheduleOn?Promise.all([f.scheduleOn,e]):e)}return this.parsedPos=a,new st(Vt.none,[],[],a-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Qc}}function ik(t,e,n){return zr.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class fo{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new fo(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=au.create(e.facet(Ms).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new fo(i)}}ui.state=Kn.define({create:fo.init,update(t,e){for(let n of e.effects)if(n.is(ui.setState))return n.value;return e.startState.facet(Ms)!=e.state.facet(Ms)?fo.init(e.state):t.apply(e)}});let HP=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(HP=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Tm=typeof navigator<"u"&&(!((km=navigator.scheduling)===null||km===void 0)&&km.isInputPending)?()=>navigator.scheduling.isInputPending():null,VL=sn.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(ui.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(ui.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=HP(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,l=i.field(ui.state);if(l.tree==l.context.tree&&l.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Tm?Math.max(25,e.timeRemaining()-5):1e9),c=l.context.treeLen<r&&i.doc.length>r+1e3,f=l.context.work(()=>Tm&&Tm()||Date.now()>a,r+(c?0:1e5));this.chunkBudget-=Date.now()-n,(f||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:ui.setState.of(new fo(l.context))})),this.chunkBudget>0&&!(f&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>In(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ms=xe.define({combine(t){return t.length?t[0]:null},enables:t=>[ui.state,VL,ye.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Ml{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class zd{constructor(e,n,i,r,l,a=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=l,this.support=a,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new zd(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(l=>l==n))return r;if(i)for(let r of e)for(let l of r.alias){let a=n.indexOf(l);if(a>-1&&(l.length>2||!/\w/.test(n[a-1])&&!/\w/.test(n[a+l.length])))return r}return null}}const YL=xe.define(),Cu=xe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ed(t){let e=t.facet(Cu);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function ou(t,e){let n="",i=t.tabSize,r=t.facet(Cu)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let l=0;l<e;l++)n+=r;return n}function f1(t,e){t instanceof Ke&&(t=new gO(t));for(let i of t.state.facet(YL)){let r=i(t,e);if(r!==void 0)return r}let n=mt(t.state);return n.length>=e?WL(t,n,e):null}class gO{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ed(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:l}=this.options;return r!=null&&r>=i.from&&r<=i.to?l&&r==e?{text:"",from:e}:(n<0?r<e:r<=e)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(e,n);return i.slice(e-r,Math.min(i.length,e+100-r))}column(e,n=1){let{text:i,from:r}=this.lineAt(e,n),l=this.countColumn(i,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(l+=a-this.countColumn(i,i.search(/\S|$/))),l}countColumn(e,n=e.length){return _r(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),l=this.options.overrideIndentation;if(l){let a=l(r);if(a>-1)return a}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Dl=new _e;function WL(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let l=[];for(let a=r;a&&!(a.from<i.node.from||a.to>i.node.to||a.from==i.node.from&&a.type==i.node.type);a=a.parent)l.push(a);for(let a=l.length-1;a>=0;a--)i={node:l[a],next:i}}return IP(i,t,n)}function IP(t,e,n){for(let i=t;i;i=i.next){let r=GL(i.node);if(r)return r(h1.create(e,n,i))}return 0}function UL(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function GL(t){let e=t.type.prop(Dl);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(_e.closedBy))){let r=t.lastChild,l=r&&i.indexOf(r.name)>-1;return a=>FP(a,!0,1,void 0,l&&!UL(a)?r.from:void 0)}return t.parent==null?HL:null}function HL(){return 0}class h1 extends gO{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new h1(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(IL(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return IP(this.context.next,this.base,this.pos)}}function IL(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function FL(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,l=t.state.doc.lineAt(n.from),a=r==null||r<=l.from?l.to:Math.min(l.to,r);for(let c=n.to;;){let f=e.childAfter(c);if(!f||f==i)return null;if(!f.type.isSkipped){if(f.from>=a)return null;let h=/^ */.exec(l.text.slice(n.to-l.from))[0].length;return{from:n.from,to:n.to+h}}c=f.to}}function ed({closing:t,align:e=!0,units:n=1}){return i=>FP(i,e,n,t)}function FP(t,e,n,i,r){let l=t.textAfter,a=l.match(/^\s*/)[0].length,c=i&&l.slice(a,a+i.length)==i||r==t.pos+a,f=e?FL(t):null;return f?c?t.column(f.from):t.column(f.to):t.baseIndent+(c?0:t.unit*n)}const KL=t=>t.baseIndent;function Ua({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const JL=200;function eB(){return Ke.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+JL)return t;let l=n.sliceString(r.from,i);if(!e.some(h=>h.test(l)))return t;let{state:a}=t,c=-1,f=[];for(let{head:h}of a.selection.ranges){let O=a.doc.lineAt(h);if(O.from==c)continue;c=O.from;let p=f1(a,O.from);if(p==null)continue;let m=/^\s*/.exec(O.text)[0],y=ou(a,p);m!=y&&f.push({from:O.from,to:O.from+m.length,insert:y})}return f.length?[t,{changes:f,sequential:!0}]:t})}const KP=xe.define(),Ds=new _e;function mO(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function tB(t,e,n){let i=mt(t);if(i.length<n)return null;let r=i.resolveStack(n,1),l=null;for(let a=r;a;a=a.next){let c=a.node;if(c.to<=n||c.from>n)continue;if(l&&c.from<e)break;let f=c.type.prop(Ds);if(f&&(c.to<i.length-50||i.length==t.doc.length||!nB(c))){let h=f(c,t);h&&h.from<=n&&h.from>=e&&h.to>n&&(l=h)}}return l}function nB(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function _d(t,e,n){for(let i of t.facet(KP)){let r=i(t,e,n);if(r)return r}return tB(t,e,n)}function JP(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const yO=Ne.define({map:JP}),Au=Ne.define({map:JP});function eC(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Xl=Kn.define({create(){return Me.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>t=rk(t,n,i)),t=t.map(e.changes);for(let n of e.effects)if(n.is(yO)&&!iB(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(iC),r=i?Me.replace({widget:new uB(i(e.state,n.value))}):sk;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(Au)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=rk(t,e.selection.main.head)),t},provide:t=>ye.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let i=t[n++],r=t[n++];if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(sk.range(i,r))}return Me.set(e,!0)}});function rk(t,e,n=e){let i=!1;return t.between(e,n,(r,l)=>{r<n&&l>e&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,l)=>r>=n||l<=e}):t}function jd(t,e,n){var i;let r=null;return(i=t.field(Xl,!1))===null||i===void 0||i.between(e,n,(l,a)=>{(!r||r.from>l)&&(r={from:l,to:a})}),r}function iB(t,e,n){let i=!1;return t.between(e,e,(r,l)=>{r==e&&l==n&&(i=!0)}),i}function tC(t,e){return t.field(Xl,!1)?e:e.concat(Ne.appendConfig.of(rC()))}const rB=t=>{for(let e of eC(t)){let n=_d(t.state,e.from,e.to);if(n)return t.dispatch({effects:tC(t.state,[yO.of(n),nC(t,n)])}),!0}return!1},sB=t=>{if(!t.state.field(Xl,!1))return!1;let e=[];for(let n of eC(t)){let i=jd(t.state,n.from,n.to);i&&e.push(Au.of(i),nC(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function nC(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return ye.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const lB=t=>{let{state:e}=t,n=[];for(let i=0;i<e.doc.length;){let r=t.lineBlockAt(i),l=_d(e,r.from,r.to);l&&n.push(yO.of(l)),i=(l?t.lineBlockAt(l.to):r).to+1}return n.length&&t.dispatch({effects:tC(t.state,n)}),!!n.length},aB=t=>{let e=t.state.field(Xl,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(Au.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},oB=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:rB},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:sB},{key:"Ctrl-Alt-[",run:lB},{key:"Ctrl-Alt-]",run:aB}],cB={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},iC=xe.define({combine(t){return Zs(t,cB)}});function rC(t){return[Xl,dB]}function sC(t,e){let{state:n}=t,i=n.facet(iC),r=a=>{let c=t.lineBlockAt(t.posAtDOM(a.target)),f=jd(t.state,c.from,c.to);f&&t.dispatch({effects:Au.of(f)}),a.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let l=document.createElement("span");return l.textContent=i.placeholderText,l.setAttribute("aria-label",n.phrase("folded code")),l.title=n.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=r,l}const sk=Me.replace({widget:new class extends ql{toDOM(t){return sC(t,null)}}});class uB extends ql{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return sC(e,this.value)}}const fB={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class $m extends Mr{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function hB(t={}){let e={...fB,...t},n=new $m(e,!0),i=new $m(e,!1),r=sn.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Ms)!=a.state.facet(Ms)||a.startState.field(Xl,!1)!=a.state.field(Xl,!1)||mt(a.startState)!=mt(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let c=new zl;for(let f of a.viewportLineBlocks){let h=jd(a.state,f.from,f.to)?i:_d(a.state,f.from,f.to)?n:null;h&&c.add(f.from,f.from,h)}return c.finish()}}),{domEventHandlers:l}=e;return[r,fL({class:"cm-foldGutter",markers(a){var c;return((c=a.plugin(r))===null||c===void 0?void 0:c.markers)||Ue.empty},initialSpacer(){return new $m(e,!1)},domEventHandlers:{...l,click:(a,c,f)=>{if(l.click&&l.click(a,c,f))return!0;let h=jd(a.state,c.from,c.to);if(h)return a.dispatch({effects:Au.of(h)}),!0;let O=_d(a.state,c.from,c.to);return O?(a.dispatch({effects:yO.of(O)}),!0):!1}}}),rC()]}const dB=ye.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class xO{constructor(e,n){this.specs=e;let i;function r(c){let f=Rs.newName();return(i||(i=Object.create(null)))["."+f]=c,f}const l=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,a=n.scope;this.scope=a instanceof ui?c=>c.prop(Ql)==a.data:a?c=>c==a:void 0,this.style=GP(e.map(c=>({tag:c.tag,class:c.class||r(Object.assign({},c,{tag:null}))})),{all:l}).style,this.module=i?new Rs(i):null,this.themeType=n.themeType}static define(e,n){return new xO(e,n||{})}}const J0=xe.define(),OB=xe.define({combine(t){return t.length?[t[0]]:null}});function Pm(t){let e=t.facet(J0);return e.length?e:t.facet(OB)}function pB(t,e){let n=[mB],i;return t instanceof xO&&(t.module&&n.push(ye.styleModule.of(t.module)),i=t.themeType),i?n.push(J0.computeN([ye.darkTheme],r=>r.facet(ye.darkTheme)==(i=="dark")?[t]:[])):n.push(J0.of(t)),n}class gB{constructor(e){this.markCache=Object.create(null),this.tree=mt(e.state),this.decorations=this.buildDeco(e,Pm(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=mt(e.state),i=Pm(e.state),r=i!=Pm(e.startState),{viewport:l}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length<l.to&&!r&&n.type==this.tree.type&&a>=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=l.to)}buildDeco(e,n){if(!n||!this.tree.length)return Me.none;let i=new zl;for(let{from:r,to:l}of e.visibleRanges)DL(this.tree,n,(a,c,f)=>{i.add(a,c,this.markCache[f]||(this.markCache[f]=Me.mark({class:f})))},r,l);return i.finish()}}const mB=Zr.high(sn.fromClass(gB,{decorations:t=>t.decorations})),yB=ye.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),lC=1e4,aC="()[]{}",oC=xe.define({combine(t){return Zs(t,{afterCursor:!0,brackets:aC,maxScanDistance:lC,renderMatch:bB})}}),xB=Me.mark({class:"cm-matchingBracket"}),SB=Me.mark({class:"cm-nonmatchingBracket"});function bB(t){let e=[],n=t.matched?xB:SB;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}function lk(t){let e=[],n=t.facet(oC);for(let i of t.selection.ranges){if(!i.empty)continue;let r=Ui(t,i.head,-1,n)||i.head>0&&Ui(t,i.head-1,1,n)||n.afterCursor&&(Ui(t,i.head,1,n)||i.head<t.doc.length&&Ui(t,i.head+1,-1,n));r&&(e=e.concat(n.renderMatch(r,t)))}return Me.set(e,!0)}const vB=sn.fromClass(class{constructor(t){this.paused=!1,this.decorations=lk(t.state)}update(t){(t.docChanged||t.selectionSet||this.paused)&&(t.view.composing?(this.decorations=this.decorations.map(t.changes),this.paused=!0):(this.decorations=lk(t.state),this.paused=!1))}},{decorations:t=>t.decorations}),QB=[vB,yB];function wB(t={}){return[oC.of(t),QB]}const cC=new _e;function ey(t,e,n){let i=t.prop(e<0?_e.openedBy:_e.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function ty(t){let e=t.type.prop(cC);return e?e(t.node):t}function Ui(t,e,n,i={}){let r=i.maxScanDistance||lC,l=i.brackets||aC,a=mt(t),c=a.resolveInner(e,n);for(let f=c;f;f=f.parent){let h=ey(f.type,n,l);if(h&&f.from<f.to){let O=ty(f);if(O&&(n>0?e>=O.from&&e<O.to:e>O.from&&e<=O.to))return kB(t,e,n,f,O,h,l)}}return TB(t,e,n,a,c.type,r,l)}function kB(t,e,n,i,r,l,a){let c=i.parent,f={from:r.from,to:r.to},h=0,O=c==null?void 0:c.cursor();if(O&&(n<0?O.childBefore(i.from):O.childAfter(i.to)))do if(n<0?O.to<=i.from:O.from>=i.to){if(h==0&&l.indexOf(O.type.name)>-1&&O.from<O.to){let p=ty(O);return{start:f,end:p?{from:p.from,to:p.to}:void 0,matched:!0}}else if(ey(O.type,n,a))h++;else if(ey(O.type,-n,a)){if(h==0){let p=ty(O);return{start:f,end:p&&p.from<p.to?{from:p.from,to:p.to}:void 0,matched:!1}}h--}}while(n<0?O.prevSibling():O.nextSibling());return{start:f,matched:!1}}function TB(t,e,n,i,r,l,a){if(n<0?!e:e==t.doc.length)return null;let c=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),f=a.indexOf(c);if(f<0||f%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},O=t.doc.iterRange(e,n>0?t.doc.length:0),p=0;for(let m=0;!O.next().done&&m<=l;){let y=O.value;n<0&&(m+=y.length);let b=e+m*n;for(let v=n>0?0:y.length-1,k=n>0?y.length:-1;v!=k;v+=n){let Q=a.indexOf(y[v]);if(!(Q<0||i.resolveInner(b+v,1).type!=r))if(Q%2==0==n>0)p++;else{if(p==1)return{start:h,end:{from:b+v,to:b+v+1},matched:Q>>1==f>>1};p--}}n>0&&(m+=y.length)}return O.done?{start:h,matched:!1}:null}const $B=Object.create(null),ak=[Vt.none],ok=[],ck=Object.create(null),PB=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])PB[t]=CB($B,e);function Cm(t,e){ok.indexOf(t)>-1||(ok.push(t),console.warn(e))}function CB(t,e){let n=[];for(let c of e.split(" ")){let f=[];for(let h of c.split(".")){let O=t[h]||j[h];O?typeof O=="function"?f.length?f=f.map(O):Cm(h,`Modifier ${h} used at start of tag`):f.length?Cm(h,`Tag ${h} used as modifier`):f=Array.isArray(O)?O:[O]:Cm(h,`Unknown highlighting tag ${h}`)}for(let h of f)n.push(h)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(c=>c.id),l=ck[r];if(l)return l.id;let a=ck[r]=Vt.define({id:ak.length,name:i,props:[qs({[i]:n})]});return ak.push(a),a.id}gt.RTL,gt.LTR;const AB=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=O1(t.state,n.from);return i.line?RB(t):i.block?EB(t):!1};function d1(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const RB=d1(MB,0),zB=d1(uC,0),EB=d1((t,e)=>uC(t,e,jB(e)),0);function O1(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const wc=50;function _B(t,{open:e,close:n},i,r){let l=t.sliceDoc(i-wc,i),a=t.sliceDoc(r,r+wc),c=/\s*$/.exec(l)[0].length,f=/^\s*/.exec(a)[0].length,h=l.length-c;if(l.slice(h-e.length,h)==e&&a.slice(f,f+n.length)==n)return{open:{pos:i-c,margin:c&&1},close:{pos:r+f,margin:f&&1}};let O,p;r-i<=2*wc?O=p=t.sliceDoc(i,r):(O=t.sliceDoc(i,i+wc),p=t.sliceDoc(r-wc,r));let m=/^\s*/.exec(O)[0].length,y=/\s*$/.exec(p)[0].length,b=p.length-y-n.length;return O.slice(m,m+e.length)==e&&p.slice(b,b+n.length)==n?{open:{pos:i+m+e.length,margin:/\s/.test(O.charAt(m+e.length))?1:0},close:{pos:r-y-n.length,margin:/\s/.test(p.charAt(b-1))?1:0}}:null}function jB(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let l=e.length-1;l>=0&&e[l].to>i.from?e[l].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function uC(t,e,n=e.selection.ranges){let i=n.map(l=>O1(e,l.from).block);if(!i.every(l=>l))return null;let r=n.map((l,a)=>_B(e,i[a],l.from,l.to));if(t!=2&&!r.every(l=>l))return{changes:e.changes(n.map((l,a)=>r[a]?[]:[{from:l.from,insert:i[a].open+" "},{from:l.to,insert:" "+i[a].close}]))};if(t!=1&&r.some(l=>l)){let l=[];for(let a=0,c;a<r.length;a++)if(c=r[a]){let f=i[a],{open:h,close:O}=c;l.push({from:h.pos-f.open.length,to:h.pos+h.margin},{from:O.pos-O.margin,to:O.pos+f.close.length})}return{changes:l}}return null}function MB(t,e,n=e.selection.ranges){let i=[],r=-1;e:for(let{from:l,to:a}of n){let c=i.length,f=1e9,h;for(let O=l;O<=a;){let p=e.doc.lineAt(O);if(h==null&&(h=O1(e,p.from).line,!h))continue e;if(p.from>r&&(l==a||a>p.from)){r=p.from;let m=/^\s*/.exec(p.text)[0].length,y=m==p.length,b=p.text.slice(m,m+h.length)==h?m:-1;m<p.text.length&&m<f&&(f=m),i.push({line:p,comment:b,token:h,indent:m,empty:y,single:!1})}O=p.to+1}if(f<1e9)for(let O=c;O<i.length;O++)i[O].indent<i[O].line.text.length&&(i[O].indent=f);i.length==c+1&&(i[c].single=!0)}if(t!=2&&i.some(l=>l.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:c,token:f,indent:h,empty:O,single:p}of i)(p||!O)&&l.push({from:c.from+h,insert:f+" "});let a=e.changes(l);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&i.some(l=>l.comment>=0)){let l=[];for(let{line:a,comment:c,token:f}of i)if(c>=0){let h=a.from+c,O=h+f.length;a.text[O-a.from]==" "&&O++,l.push({from:h,to:O})}return{changes:l}}return null}const ny=qr.define(),XB=qr.define(),ZB=xe.define(),fC=xe.define({combine(t){return Zs(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),hC=Kn.define({create(){return Gi.empty},update(t,e){let n=e.state.facet(fC),i=e.annotation(ny);if(i){let f=_n.fromTransaction(e,i.selection),h=i.side,O=h==0?t.undone:t.done;return f?O=Md(O,O.length,n.minDepth,f):O=pC(O,e.startState.selection),new Gi(h==0?i.rest:O,h==0?O:i.rest)}let r=e.annotation(XB);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Zt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let l=_n.fromTransaction(e),a=e.annotation(Zt.time),c=e.annotation(Zt.userEvent);return l?t=t.addChanges(l,a,c,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,c,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Gi(t.done.map(_n.fromJSON),t.undone.map(_n.fromJSON))}});function qB(t={}){return[hC,fC.of(t),ye.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?dC:e.inputType=="historyRedo"?iy:null;return i?(e.preventDefault(),i(n)):!1}})]}function SO(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(hC,!1);if(!r)return!1;let l=r.pop(t,n,e);return l?(i(l),!0):!1}}const dC=SO(0,!1),iy=SO(1,!1),DB=SO(0,!0),LB=SO(1,!0);class _n{constructor(e,n,i,r,l){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=l}setSelAfter(e){return new _n(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new _n(e.changes&&Nt.fromJSON(e.changes),[],e.mapped&&Ii.fromJSON(e.mapped),e.startSelection&&oe.fromJSON(e.startSelection),e.selectionsAfter.map(oe.fromJSON))}static fromTransaction(e,n){let i=fi;for(let r of e.startState.facet(ZB)){let l=r(e);l.length&&(i=i.concat(l))}return!i.length&&e.changes.empty?null:new _n(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,fi)}static selection(e){return new _n(void 0,fi,void 0,void 0,e)}}function Md(t,e,n,i){let r=e+1>n+20?e-n-1:0,l=t.slice(r,e);return l.push(i),l}function BB(t,e){let n=[],i=!1;return t.iterChangedRanges((r,l)=>n.push(r,l)),e.iterChangedRanges((r,l,a,c)=>{for(let f=0;f<n.length;){let h=n[f++],O=n[f++];c>=h&&a<=O&&(i=!0)}}),i}function NB(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function OC(t,e){return t.length?e.length?t.concat(e):t:e}const fi=[],VB=200;function pC(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-VB));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),Md(t,t.length-1,1e9,n.setSelAfter(i)))}else return[_n.selection([e])]}function YB(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Am(t,e){if(!t.length)return t;let n=t.length,i=fi;for(;n;){let r=WB(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let l=t.slice(0,n);return l[n-1]=r,l}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[_n.selection(i)]:fi}function WB(t,e,n){let i=OC(t.selectionsAfter.length?t.selectionsAfter.map(c=>c.map(e)):fi,n);if(!t.changes)return _n.selection(i);let r=t.changes.map(e),l=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(l):l;return new _n(r,Ne.mapEffects(t.effects,e),a,t.startSelection.map(l),i)}const UB=/^(input\.type|delete)($|\.)/;class Gi{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Gi(this.done,this.undone):this}addChanges(e,n,i,r,l){let a=this.done,c=a[a.length-1];return c&&c.changes&&!c.changes.empty&&e.changes&&(!i||UB.test(i))&&(!c.selectionsAfter.length&&n-this.prevTime<r.newGroupDelay&&r.joinToEvent(l,BB(c.changes,e.changes))||i=="input.type.compose")?a=Md(a,a.length-1,r.minDepth,new _n(e.changes.compose(c.changes),OC(Ne.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,fi)):a=Md(a,a.length,r.minDepth,e),new Gi(a,fi,n,i)}addSelection(e,n,i,r){let l=this.done.length?this.done[this.done.length-1].selectionsAfter:fi;return l.length>0&&n-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&NB(l[l.length-1],e)?this:new Gi(pC(this.done,e),this.undone,n,i)}addMapping(e){return new Gi(Am(this.done,e),Am(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,i){let r=e==0?this.done:this.undone;if(r.length==0)return null;let l=r[r.length-1],a=l.selectionsAfter[0]||(l.startSelection?l.startSelection.map(l.changes.invertedDesc,1):n.selection);if(i&&l.selectionsAfter.length)return n.update({selection:l.selectionsAfter[l.selectionsAfter.length-1],annotations:ny.of({side:e,rest:YB(r),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(l.changes){let c=r.length==1?fi:r.slice(0,r.length-1);return l.mapped&&(c=Am(c,l.mapped)),n.update({changes:l.changes,selection:l.startSelection,effects:l.effects,annotations:ny.of({side:e,rest:c,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Gi.empty=new Gi(fi,fi);const GB=[{key:"Mod-z",run:dC,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:iy,preventDefault:!0},{linux:"Ctrl-Shift-z",run:iy,preventDefault:!0},{key:"Mod-u",run:DB,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:LB,preventDefault:!0}];function mo(t,e){return oe.create(t.ranges.map(e),t.mainIndex)}function Ci(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ai({state:t,dispatch:e},n){let i=mo(t.selection,n);return i.eq(t.selection,!0)?!1:(e(Ci(t,i)),!0)}function bO(t,e){return oe.cursor(e?t.to:t.from)}function gC(t,e){return Ai(t,n=>n.empty?t.moveByChar(n,e):bO(n,e))}function On(t){return t.textDirectionAt(t.state.selection.main.head)==gt.LTR}const mC=t=>gC(t,!On(t)),yC=t=>gC(t,On(t));function xC(t,e){return Ai(t,n=>n.empty?t.moveByGroup(n,e):bO(n,e))}const HB=t=>xC(t,!On(t)),IB=t=>xC(t,On(t));function FB(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function vO(t,e,n){let i=mt(t).resolveInner(e.head),r=n?_e.closedBy:_e.openedBy;for(let f=e.head;;){let h=n?i.childAfter(f):i.childBefore(f);if(!h)break;FB(t,h,r)?i=h:f=n?h.to:h.from}let l=i.type.prop(r),a,c;return l&&(a=n?Ui(t,i.from,1):Ui(t,i.to,-1))&&a.matched?c=n?a.end.to:a.end.from:c=n?i.to:i.from,oe.cursor(c,n?-1:1)}const KB=t=>Ai(t,e=>vO(t.state,e,!On(t))),JB=t=>Ai(t,e=>vO(t.state,e,On(t)));function SC(t,e){return Ai(t,n=>{if(!n.empty)return bO(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const bC=t=>SC(t,!1),vC=t=>SC(t,!0);function QC(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,i=0,r;if(e){for(let l of t.state.facet(ye.scrollMargins)){let a=l(t);a!=null&&a.top&&(n=Math.max(a==null?void 0:a.top,n)),a!=null&&a.bottom&&(i=Math.max(a==null?void 0:a.bottom,i))}r=t.scrollDOM.clientHeight-n-i}else r=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:e,height:Math.max(t.defaultLineHeight,r-5)}}function wC(t,e){let n=QC(t),{state:i}=t,r=mo(i.selection,a=>a.empty?t.moveVertically(a,e,n.height):bO(a,e));if(r.eq(i.selection))return!1;let l;if(n.selfScroll){let a=t.coordsAtPos(i.selection.main.head),c=t.scrollDOM.getBoundingClientRect(),f=c.top+n.marginTop,h=c.bottom-n.marginBottom;a&&a.top>f&&a.bottom<h&&(l=ye.scrollIntoView(r.main.head,{y:"start",yMargin:a.top-f}))}return t.dispatch(Ci(i,r),{effects:l}),!0}const uk=t=>wC(t,!1),ry=t=>wC(t,!0);function Ls(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let l=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;l&&e.head!=i.from+l&&(r=oe.cursor(i.from+l))}return r}const eN=t=>Ai(t,e=>Ls(t,e,!0)),tN=t=>Ai(t,e=>Ls(t,e,!1)),nN=t=>Ai(t,e=>Ls(t,e,!On(t))),iN=t=>Ai(t,e=>Ls(t,e,On(t))),rN=t=>Ai(t,e=>oe.cursor(t.lineBlockAt(e.head).from,1)),sN=t=>Ai(t,e=>oe.cursor(t.lineBlockAt(e.head).to,-1));function lN(t,e,n){let i=!1,r=mo(t.selection,l=>{let a=Ui(t,l.head,-1)||Ui(t,l.head,1)||l.head>0&&Ui(t,l.head-1,1)||l.head<t.doc.length&&Ui(t,l.head+1,-1);if(!a||!a.end)return l;i=!0;let c=a.start.from==l.head?a.end.to:a.end.from;return oe.cursor(c)});return i?(e(Ci(t,r)),!0):!1}const aN=({state:t,dispatch:e})=>lN(t,e);function di(t,e){let n=mo(t.state.selection,i=>{let r=e(i);return oe.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return n.eq(t.state.selection)?!1:(t.dispatch(Ci(t.state,n)),!0)}function kC(t,e){return di(t,n=>t.moveByChar(n,e))}const TC=t=>kC(t,!On(t)),$C=t=>kC(t,On(t));function PC(t,e){return di(t,n=>t.moveByGroup(n,e))}const oN=t=>PC(t,!On(t)),cN=t=>PC(t,On(t)),uN=t=>di(t,e=>vO(t.state,e,!On(t))),fN=t=>di(t,e=>vO(t.state,e,On(t)));function CC(t,e){return di(t,n=>t.moveVertically(n,e))}const AC=t=>CC(t,!1),RC=t=>CC(t,!0);function zC(t,e){return di(t,n=>t.moveVertically(n,e,QC(t).height))}const fk=t=>zC(t,!1),hk=t=>zC(t,!0),hN=t=>di(t,e=>Ls(t,e,!0)),dN=t=>di(t,e=>Ls(t,e,!1)),ON=t=>di(t,e=>Ls(t,e,!On(t))),pN=t=>di(t,e=>Ls(t,e,On(t))),gN=t=>di(t,e=>oe.cursor(t.lineBlockAt(e.head).from)),mN=t=>di(t,e=>oe.cursor(t.lineBlockAt(e.head).to)),dk=({state:t,dispatch:e})=>(e(Ci(t,{anchor:0})),!0),Ok=({state:t,dispatch:e})=>(e(Ci(t,{anchor:t.doc.length})),!0),pk=({state:t,dispatch:e})=>(e(Ci(t,{anchor:t.selection.main.anchor,head:0})),!0),gk=({state:t,dispatch:e})=>(e(Ci(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),yN=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),xN=({state:t,dispatch:e})=>{let n=QO(t).map(({from:i,to:r})=>oe.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:oe.create(n),userEvent:"select"})),!0},SN=({state:t,dispatch:e})=>{let n=mo(t.selection,i=>{let r=mt(t),l=r.resolveStack(i.from,1);if(i.empty){let a=r.resolveStack(i.from,-1);a.node.from>=l.node.from&&a.node.to<=l.node.to&&(l=a)}for(let a=l;a;a=a.next){let{node:c}=a;if((c.from<i.from&&c.to>=i.to||c.to>i.to&&c.from<=i.from)&&a.next)return oe.range(c.to,c.from)}return i});return n.eq(t.selection)?!1:(e(Ci(t,n)),!0)};function EC(t,e){let{state:n}=t,i=n.selection,r=n.selection.ranges.slice();for(let l of n.selection.ranges){let a=n.doc.lineAt(l.head);if(e?a.to<t.state.doc.length:a.from>0)for(let c=l;;){let f=t.moveVertically(c,e);if(f.head<a.from||f.head>a.to){r.some(h=>h.head==f.head)||r.push(f);break}else{if(f.head==c.head)break;c=f}}}return r.length==i.ranges.length?!1:(t.dispatch(Ci(n,oe.create(r,r.length-1))),!0)}const bN=t=>EC(t,!1),vN=t=>EC(t,!0),QN=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=oe.create([n.main]):n.main.empty||(i=oe.create([oe.cursor(n.main.head)])),i?(e(Ci(t,i)),!0):!1};function Ru(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(l=>{let{from:a,to:c}=l;if(a==c){let f=e(l);f<a?(n="delete.backward",f=jh(t,f,!1)):f>a&&(n="delete.forward",f=jh(t,f,!0)),a=Math.min(a,f),c=Math.max(c,f)}else a=jh(t,a,!1),c=jh(t,c,!0);return a==c?{range:l}:{changes:{from:a,to:c},range:oe.cursor(a,a<l.head?-1:1)}});return r.changes.empty?!1:(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ye.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function jh(t,e,n){if(t instanceof ye)for(let i of t.state.facet(ye.atomicRanges).map(r=>r(t)))i.between(e,e,(r,l)=>{r<e&&l>e&&(e=n?l:r)});return e}const _C=(t,e,n)=>Ru(t,i=>{let r=i.from,{state:l}=t,a=l.doc.lineAt(r),c,f;if(n&&!e&&r>a.from&&r<a.from+200&&!/[^ \t]/.test(c=a.text.slice(0,r-a.from))){if(c[c.length-1]==" ")return r-1;let h=_r(c,l.tabSize),O=h%Ed(l)||Ed(l);for(let p=0;p<O&&c[c.length-1-p]==" ";p++)r--;f=r}else f=Ht(a.text,r-a.from,e,e)+a.from,f==r&&a.number!=(e?l.doc.lines:1)?f+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(f-a.from,r-a.from))&&(f=Ht(a.text,f-a.from,!1,!1)+a.from);return f}),sy=t=>_C(t,!1,!0),jC=t=>_C(t,!0,!1),MC=(t,e)=>Ru(t,n=>{let i=n.head,{state:r}=t,l=r.doc.lineAt(i),a=r.charCategorizer(i);for(let c=null;;){if(i==(e?l.to:l.from)){i==n.head&&l.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let f=Ht(l.text,i-l.from,e)+l.from,h=l.text.slice(Math.min(i,f)-l.from,Math.max(i,f)-l.from),O=a(h);if(c!=null&&O!=c)break;(h!=" "||i!=n.head)&&(c=O),i=f}return i}),XC=t=>MC(t,!1),wN=t=>MC(t,!0),kN=t=>Ru(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),TN=t=>Ru(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),$N=t=>Ru(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),PN=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Ie.of(["",""])},range:oe.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},CN=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,l=t.doc.lineAt(r),a=r==l.from?r-1:Ht(l.text,r-l.from,!1)+l.from,c=r==l.to?r+1:Ht(l.text,r-l.from,!0)+l.from;return{changes:{from:a,to:c,insert:t.doc.slice(r,c).append(t.doc.slice(a,r))},range:oe.cursor(c)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function QO(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),l=t.doc.lineAt(i.to);if(!i.empty&&i.to==l.from&&(l=t.doc.lineAt(i.to-1)),n>=r.number){let a=e[e.length-1];a.to=l.to,a.ranges.push(i)}else e.push({from:r.from,to:l.to,ranges:[i]});n=l.number+1}return e}function ZC(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let l of QO(t)){if(n?l.to==t.doc.length:l.from==0)continue;let a=t.doc.lineAt(n?l.to+1:l.from-1),c=a.length+1;if(n){i.push({from:l.to,to:a.to},{from:l.from,insert:a.text+t.lineBreak});for(let f of l.ranges)r.push(oe.range(Math.min(t.doc.length,f.anchor+c),Math.min(t.doc.length,f.head+c)))}else{i.push({from:a.from,to:l.from},{from:l.to,insert:t.lineBreak+a.text});for(let f of l.ranges)r.push(oe.range(f.anchor-c,f.head-c))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:oe.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const AN=({state:t,dispatch:e})=>ZC(t,e,!1),RN=({state:t,dispatch:e})=>ZC(t,e,!0);function qC(t,e,n){if(t.readOnly)return!1;let i=[];for(let l of QO(t))n?i.push({from:l.from,insert:t.doc.slice(l.from,l.to)+t.lineBreak}):i.push({from:l.to,insert:t.lineBreak+t.doc.slice(l.from,l.to)});let r=t.changes(i);return e(t.update({changes:r,selection:t.selection.map(r,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const zN=({state:t,dispatch:e})=>qC(t,e,!1),EN=({state:t,dispatch:e})=>qC(t,e,!0),_N=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(QO(e).map(({from:r,to:l})=>(r>0?r--:l<e.doc.length&&l++,{from:r,to:l}))),i=mo(e.selection,r=>{let l;if(t.lineWrapping){let a=t.lineBlockAt(r.head),c=t.coordsAtPos(r.head,r.assoc||1);c&&(l=a.bottom+t.documentTop-c.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,l)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function jN(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=mt(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),l;return i&&r&&i.to<=e&&r.from>=e&&(l=i.type.prop(_e.closedBy))&&l.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const mk=DC(!1),MN=DC(!0);function DC(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:l,to:a}=r,c=e.doc.lineAt(l),f=!t&&l==a&&jN(e,l);t&&(l=a=(a<=c.to?c:e.doc.lineAt(a)).to);let h=new gO(e,{simulateBreak:l,simulateDoubleBreak:!!f}),O=f1(h,l);for(O==null&&(O=_r(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));a<c.to&&/\s/.test(c.text[a-c.from]);)a++;f?{from:l,to:a}=f:l>c.from&&l<c.from+100&&!/\S/.test(c.text.slice(0,l))&&(l=c.from);let p=["",ou(e,O)];return f&&p.push(ou(e,h.lineIndent(c.from,-1))),{changes:{from:l,to:a,insert:Ie.of(p)},range:oe.cursor(l+1+p[1].length)}});return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function p1(t,e){let n=-1;return t.changeByRange(i=>{let r=[];for(let a=i.from;a<=i.to;){let c=t.doc.lineAt(a);c.number>n&&(i.empty||i.to>c.from)&&(e(c,r,i),n=c.number),a=c.to+1}let l=t.changes(r);return{changes:r,range:oe.range(l.mapPos(i.anchor,1),l.mapPos(i.head,1))}})}const XN=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new gO(t,{overrideIndentation:l=>{let a=n[l];return a??-1}}),r=p1(t,(l,a,c)=>{let f=f1(i,l.from);if(f==null)return;/\S/.test(l.text)||(f=0);let h=/^\s*/.exec(l.text)[0],O=ou(t,f);(h!=O||c.from<l.from+h.length)&&(n[l.from]=f,a.push({from:l.from,to:l.from+h.length,insert:O}))});return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0},LC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(p1(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Cu)})}),{userEvent:"input.indent"})),!0),BC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(p1(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let l=_r(r,t.tabSize),a=0,c=ou(t,Math.max(0,l-Ed(t)));for(;a<r.length&&a<c.length&&r.charCodeAt(a)==c.charCodeAt(a);)a++;i.push({from:n.from+a,to:n.from+r.length,insert:c.slice(a)})}),{userEvent:"delete.dedent"})),!0),ZN=t=>(t.setTabFocusMode(),!0),qN=[{key:"Ctrl-b",run:mC,shift:TC,preventDefault:!0},{key:"Ctrl-f",run:yC,shift:$C},{key:"Ctrl-p",run:bC,shift:AC},{key:"Ctrl-n",run:vC,shift:RC},{key:"Ctrl-a",run:rN,shift:gN},{key:"Ctrl-e",run:sN,shift:mN},{key:"Ctrl-d",run:jC},{key:"Ctrl-h",run:sy},{key:"Ctrl-k",run:kN},{key:"Ctrl-Alt-h",run:XC},{key:"Ctrl-o",run:PN},{key:"Ctrl-t",run:CN},{key:"Ctrl-v",run:ry}],DN=[{key:"ArrowLeft",run:mC,shift:TC,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:HB,shift:oN,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:nN,shift:ON,preventDefault:!0},{key:"ArrowRight",run:yC,shift:$C,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:IB,shift:cN,preventDefault:!0},{mac:"Cmd-ArrowRight",run:iN,shift:pN,preventDefault:!0},{key:"ArrowUp",run:bC,shift:AC,preventDefault:!0},{mac:"Cmd-ArrowUp",run:dk,shift:pk},{mac:"Ctrl-ArrowUp",run:uk,shift:fk},{key:"ArrowDown",run:vC,shift:RC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Ok,shift:gk},{mac:"Ctrl-ArrowDown",run:ry,shift:hk},{key:"PageUp",run:uk,shift:fk},{key:"PageDown",run:ry,shift:hk},{key:"Home",run:tN,shift:dN,preventDefault:!0},{key:"Mod-Home",run:dk,shift:pk},{key:"End",run:eN,shift:hN,preventDefault:!0},{key:"Mod-End",run:Ok,shift:gk},{key:"Enter",run:mk,shift:mk},{key:"Mod-a",run:yN},{key:"Backspace",run:sy,shift:sy,preventDefault:!0},{key:"Delete",run:jC,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:XC,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:wN,preventDefault:!0},{mac:"Mod-Backspace",run:TN,preventDefault:!0},{mac:"Mod-Delete",run:$N,preventDefault:!0}].concat(qN.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),LN=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:KB,shift:uN},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:JB,shift:fN},{key:"Alt-ArrowUp",run:AN},{key:"Shift-Alt-ArrowUp",run:zN},{key:"Alt-ArrowDown",run:RN},{key:"Shift-Alt-ArrowDown",run:EN},{key:"Mod-Alt-ArrowUp",run:bN},{key:"Mod-Alt-ArrowDown",run:vN},{key:"Escape",run:QN},{key:"Mod-Enter",run:MN},{key:"Alt-l",mac:"Ctrl-l",run:xN},{key:"Mod-i",run:SN,preventDefault:!0},{key:"Mod-[",run:BC},{key:"Mod-]",run:LC},{key:"Mod-Alt-\\",run:XN},{key:"Shift-Mod-k",run:_N},{key:"Shift-Mod-\\",run:aN},{key:"Mod-/",run:AB},{key:"Alt-A",run:zB},{key:"Ctrl-m",mac:"Shift-Alt-m",run:ZN}].concat(DN),BN={key:"Tab",run:LC,shift:BC},yk=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ho{constructor(e,n,i=0,r=e.length,l,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=l?c=>l(yk(c)):yk,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return vs(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=v2(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=ml(e);let r=this.normalize(n);if(r.length)for(let l=0,a=i;;l++){let c=r.charCodeAt(l),f=this.match(c,a,this.bufferPos+this.bufferStart);if(l==r.length-1){if(f)return this.value=f,this;break}a==i&&l<n.length&&n.charCodeAt(l)==c&&a++}}}match(e,n,i){let r=null;for(let l=0;l<this.matches.length;l+=2){let a=this.matches[l],c=!1;this.query.charCodeAt(a)==e&&(a==this.query.length-1?r={from:this.matches[l+1],to:i}:(this.matches[l]++,c=!0)),c||(this.matches.splice(l,2),l-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:n,to:i}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}typeof Symbol<"u"&&(ho.prototype[Symbol.iterator]=function(){return this});const NC={from:-1,to:-1,match:/.*/.exec("")},g1="gm"+(/x/.unicode==null?"":"u");class VC{constructor(e,n,i,r=0,l=e.length){if(this.text=e,this.to=l,this.curLine="",this.done=!1,this.value=NC,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new YC(e,n,i,r,l);this.re=new RegExp(n,g1+(i!=null&&i.ignoreCase?"i":"")),this.test=i==null?void 0:i.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=Xd(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=Xd(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Rm=new WeakMap;class Ga{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,i){let r=Rm.get(e);if(!r||r.from>=i||r.to<=n){let c=new Ga(n,e.sliceString(n,i));return Rm.set(e,c),c}if(r.from==n&&r.to==i)return r;let{text:l,from:a}=r;return a>n&&(l=e.sliceString(n,a)+l,a=n),r.to<i&&(l+=e.sliceString(r.to,i)),Rm.set(e,new Ga(a,l)),new Ga(n,l.slice(n-a,i-a))}}class YC{constructor(e,n,i,r,l){this.text=e,this.to=l,this.done=!1,this.value=NC,this.matchPos=Xd(e,r),this.re=new RegExp(n,g1+(i!=null&&i.ignoreCase?"i":"")),this.test=i==null?void 0:i.test,this.flat=Ga.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=Xd(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ga.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(VC.prototype[Symbol.iterator]=YC.prototype[Symbol.iterator]=function(){return this});function NN(t){try{return new RegExp(t,g1),!0}catch{return!1}}function Xd(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e<n.to&&(i=n.text.charCodeAt(e-n.from))>=56320&&i<57344;)e++;return e}const VN=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:i,result:r}=aL(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return r.then(l=>{let a=l&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(l.elements.line.value);if(!a){t.dispatch({effects:i});return}let c=e.doc.lineAt(e.selection.main.head),[,f,h,O,p]=a,m=O?+O.slice(1):0,y=h?+h:c.number;if(h&&p){let k=y/100;f&&(k=k*(f=="-"?-1:1)+c.number/e.doc.lines),y=Math.round(e.doc.lines*k)}else h&&f&&(y=y*(f=="-"?-1:1)+c.number);let b=e.doc.line(Math.max(1,Math.min(e.doc.lines,y))),v=oe.cursor(b.from+Math.max(0,Math.min(m,b.length)));t.dispatch({effects:[i,ye.scrollIntoView(v.from,{y:"center"})],selection:v})}),!0},YN={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},WN=xe.define({combine(t){return Zs(t,YN,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function UN(t){return[KN,FN]}const GN=Me.mark({class:"cm-selectionMatch"}),HN=Me.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function xk(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Rt.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Rt.Word)}function IN(t,e,n,i){return t(e.sliceDoc(n,n+1))==Rt.Word&&t(e.sliceDoc(i-1,i))==Rt.Word}const FN=sn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(WN),{state:n}=t,i=n.selection;if(i.ranges.length>1)return Me.none;let r=i.main,l,a=null;if(r.empty){if(!e.highlightWordAroundCursor)return Me.none;let f=n.wordAt(r.head);if(!f)return Me.none;a=n.charCategorizer(r.head),l=n.sliceDoc(f.from,f.to)}else{let f=r.to-r.from;if(f<e.minSelectionLength||f>200)return Me.none;if(e.wholeWords){if(l=n.sliceDoc(r.from,r.to),a=n.charCategorizer(r.head),!(xk(a,n,r.from,r.to)&&IN(a,n,r.from,r.to)))return Me.none}else if(l=n.sliceDoc(r.from,r.to),!l)return Me.none}let c=[];for(let f of t.visibleRanges){let h=new ho(n.doc,l,f.from,f.to);for(;!h.next().done;){let{from:O,to:p}=h.value;if((!a||xk(a,n,O,p))&&(r.empty&&O<=r.from&&p>=r.to?c.push(HN.range(O,p)):(O>=r.to||p<=r.from)&&c.push(GN.range(O,p)),c.length>e.maxMatches))return Me.none}}return Me.set(c)}},{decorations:t=>t.decorations}),KN=ye.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),JN=({state:t,dispatch:e})=>{let{selection:n}=t,i=oe.create(n.ranges.map(r=>t.wordAt(r.head)||oe.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function e6(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),l=r&&r.from==n.from&&r.to==n.to;for(let a=!1,c=new ho(t.doc,e,i[i.length-1].to);;)if(c.next(),c.done){if(a)return null;c=new ho(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),a=!0}else{if(a&&i.some(f=>f.from==c.value.from))continue;if(l){let f=t.wordAt(c.value.from);if(!f||f.from!=c.value.from||f.to!=c.value.to)continue}return c.value}}const t6=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(l=>l.from===l.to))return JN({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(l=>t.sliceDoc(l.from,l.to)!=i))return!1;let r=e6(t,i);return r?(e(t.update({selection:t.selection.addRange(oe.range(r.from,r.to),!1),effects:ye.scrollIntoView(r.to)})),!0):!1},yo=xe.define({combine(t){return Zs(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new p6(e),scrollToMatch:e=>ye.scrollIntoView(e)})}});class WC{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||NN(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?`
|
|
84
|
+
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new a6(this):new r6(this)}getCursor(e,n=0,i){let r=e.doc?e:Ke.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?Ea(this,r,n,i):za(this,r,n,i)}}class UC{constructor(e){this.spec=e}}function n6(t,e,n){return(i,r,l,a)=>{if(n&&!n(i,r,l,a))return!1;let c=i>=a&&r<=a+l.length?l.slice(i-a,r-a):e.doc.sliceString(i,r);return t(c,e,i,r)}}function za(t,e,n,i){let r;return t.wholeWord&&(r=i6(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(r=n6(t.test,e,r)),new ho(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:l=>l.toLowerCase(),r)}function i6(t,e){return(n,i,r,l)=>((l>n||l+r.length<i)&&(l=Math.max(0,n-2),r=t.sliceString(l,Math.min(t.length,i+2))),(e(Zd(r,n-l))!=Rt.Word||e(qd(r,n-l))!=Rt.Word)&&(e(qd(r,i-l))!=Rt.Word||e(Zd(r,i-l))!=Rt.Word))}class r6 extends UC{constructor(e){super(e)}nextMatch(e,n,i){let r=za(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let l=Math.min(e.doc.length,n+this.spec.unquoted.length);r=za(this.spec,e,0,l).nextOverlapping()}return r.done||r.value.from==n&&r.value.to==i?null:r.value}prevMatchInRange(e,n,i){for(let r=i;;){let l=Math.max(n,r-1e4-this.spec.unquoted.length),a=za(this.spec,e,l,r),c=null;for(;!a.nextOverlapping().done;)c=a.value;if(c)return c;if(l==n)return null;r-=1e4}}prevMatch(e,n,i){let r=this.prevMatchInRange(e,0,n);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=n||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let i=za(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let l=za(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)r(l.value.from,l.value.to)}}function s6(t,e,n){return(i,r,l)=>(!n||n(i,r,l))&&t(l[0],e,i,r)}function Ea(t,e,n,i){let r;return t.wholeWord&&(r=l6(e.charCategorizer(e.selection.main.head))),t.test&&(r=s6(t.test,e,r)),new VC(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:r},n,i)}function Zd(t,e){return t.slice(Ht(t,e,!1),e)}function qd(t,e){return t.slice(e,Ht(t,e))}function l6(t){return(e,n,i)=>!i[0].length||(t(Zd(i.input,i.index))!=Rt.Word||t(qd(i.input,i.index))!=Rt.Word)&&(t(qd(i.input,i.index+i[0].length))!=Rt.Word||t(Zd(i.input,i.index+i[0].length))!=Rt.Word)}class a6 extends UC{nextMatch(e,n,i){let r=Ea(this.spec,e,i,e.doc.length).next();return r.done&&(r=Ea(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let l=Math.max(n,i-r*1e4),a=Ea(this.spec,e,l,i),c=null;for(;!a.next().done;)c=a.value;if(c&&(l==n||c.from>l+10))return c;if(l==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let l=+i.slice(0,r);if(l>0&&l<e.match.length)return e.match[l]+i.slice(r)}return n})}matchAll(e,n){let i=Ea(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let l=Ea(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!l.next().done;)r(l.value.from,l.value.to)}}const cu=Ne.define(),m1=Ne.define(),Cs=Kn.define({create(t){return new zm(ly(t).create(),null)},update(t,e){for(let n of e.effects)n.is(cu)?t=new zm(n.value.create(),t.panel):n.is(m1)&&(t=new zm(t.query,n.value?y1:null));return t},provide:t=>Cd.from(t,e=>e.panel)});class zm{constructor(e,n){this.query=e,this.panel=n}}const o6=Me.mark({class:"cm-searchMatch"}),c6=Me.mark({class:"cm-searchMatch cm-searchMatch-selected"}),u6=sn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Cs))}update(t){let e=t.state.field(Cs);(e!=t.startState.field(Cs)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Me.none;let{view:n}=this,i=new zl;for(let r=0,l=n.visibleRanges,a=l.length;r<a;r++){let{from:c,to:f}=l[r];for(;r<a-1&&f>l[r+1].from-500;)f=l[++r].to;t.highlight(n.state,c,f,(h,O)=>{let p=n.state.selection.ranges.some(m=>m.from==h&&m.to==O);i.add(h,O,p?c6:o6)})}return i.finish()}},{decorations:t=>t.decorations});function zu(t){return e=>{let n=e.state.field(Cs,!1);return n&&n.query.spec.valid?t(e,n):IC(e)}}const Dd=zu((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=oe.single(i.from,i.to),l=t.state.facet(yo);return t.dispatch({selection:r,effects:[x1(t,i),l.scrollToMatch(r.main,t)],userEvent:"select.search"}),HC(t),!0}),Ld=zu((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let l=oe.single(r.from,r.to),a=t.state.facet(yo);return t.dispatch({selection:l,effects:[x1(t,r),a.scrollToMatch(l.main,t)],userEvent:"select.search"}),HC(t),!0}),f6=zu((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:oe.create(n.map(i=>oe.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),h6=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,l=[],a=0;for(let c=new ho(t.doc,t.sliceDoc(i,r));!c.next().done;){if(l.length>1e3)return!1;c.value.from==i&&(a=l.length),l.push(oe.range(c.value.from,c.value.to))}return e(t.update({selection:oe.create(l,a),userEvent:"select.search.matches"})),!0},Sk=zu((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let l=e.nextMatch(n,i,i);if(!l)return!1;let a=l,c=[],f,h,O=[];a.from==i&&a.to==r&&(h=n.toText(e.getReplacement(a)),c.push({from:a.from,to:a.to,insert:h}),a=e.nextMatch(n,a.from,a.to),O.push(ye.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+".")));let p=t.state.changes(c);return a&&(f=oe.single(a.from,a.to).map(p),O.push(x1(t,a)),O.push(n.facet(yo).scrollToMatch(f.main,t))),t.dispatch({changes:p,selection:f,effects:O,userEvent:"input.replace"}),!0}),d6=zu((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:l,to:a}=r;return{from:l,to:a,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ye.announce.of(i),userEvent:"input.replace.all"}),!0});function y1(t){return t.state.facet(yo).createPanel(t)}function ly(t,e){var n,i,r,l,a;let c=t.selection.main,f=c.empty||c.to>c.from+100?"":t.sliceDoc(c.from,c.to);if(e&&!f)return e;let h=t.facet(yo);return new WC({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:h.literal)?f:f.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:h.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:h.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:h.wholeWord})}function GC(t){let e=MP(t,y1);return e&&e.dom.querySelector("[main-field]")}function HC(t){let e=GC(t);e&&e==t.root.activeElement&&e.select()}const IC=t=>{let e=t.state.field(Cs,!1);if(e&&e.panel){let n=GC(t);if(n&&n!=t.root.activeElement){let i=ly(t.state,e.query.spec);i.valid&&t.dispatch({effects:cu.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[m1.of(!0),e?cu.of(ly(t.state,e.query.spec)):Ne.appendConfig.of(m6)]});return!0},FC=t=>{let e=t.state.field(Cs,!1);if(!e||!e.panel)return!1;let n=MP(t,y1);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:m1.of(!1)}),!0},O6=[{key:"Mod-f",run:IC,scope:"editor search-panel"},{key:"F3",run:Dd,shift:Ld,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Dd,shift:Ld,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:FC,scope:"editor search-panel"},{key:"Mod-Shift-l",run:h6},{key:"Mod-Alt-g",run:VN},{key:"Mod-d",run:t6,preventDefault:!0}];class p6{constructor(e){this.view=e;let n=this.query=e.state.field(Cs).query.spec;this.commit=this.commit.bind(this),this.searchField=Ut("input",{value:n.search,placeholder:Nn(e,"Find"),"aria-label":Nn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ut("input",{value:n.replace,placeholder:Nn(e,"Replace"),"aria-label":Nn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ut("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Ut("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Ut("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,l,a){return Ut("button",{class:"cm-button",name:r,onclick:l,type:"button"},a)}this.dom=Ut("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>Dd(e),[Nn(e,"next")]),i("prev",()=>Ld(e),[Nn(e,"previous")]),i("select",()=>f6(e),[Nn(e,"all")]),Ut("label",null,[this.caseField,Nn(e,"match case")]),Ut("label",null,[this.reField,Nn(e,"regexp")]),Ut("label",null,[this.wordField,Nn(e,"by word")]),...e.state.readOnly?[]:[Ut("br"),this.replaceField,i("replace",()=>Sk(e),[Nn(e,"replace")]),i("replaceAll",()=>d6(e),[Nn(e,"replace all")])],Ut("button",{name:"close",onclick:()=>FC(e),"aria-label":Nn(e,"close"),type:"button"},["×"])])}commit(){let e=new WC({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:cu.of(e)}))}keydown(e){VD(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ld:Dd)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Sk(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(cu)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(yo).top}}function Nn(t,e){return t.state.phrase(e)}const Mh=30,Xh=/[\s\.,:;?!]/;function x1(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,l=Math.max(i.from,e-Mh),a=Math.min(r,n+Mh),c=t.state.sliceDoc(l,a);if(l!=i.from){for(let f=0;f<Mh;f++)if(!Xh.test(c[f+1])&&Xh.test(c[f])){c=c.slice(f);break}}if(a!=r){for(let f=c.length-1;f>c.length-Mh;f--)if(!Xh.test(c[f-1])&&Xh.test(c[f])){c=c.slice(0,f);break}}return ye.announce.of(`${t.state.phrase("current match")}. ${c} ${t.state.phrase("on line")} ${i.number}.`)}const g6=ye.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),m6=[Cs,Zr.low(u6),g6];class S1{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=mt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),l=r.search(JC(e,!1));return l<0?null:{from:i+l,to:this.pos,text:r.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function bk(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function y6(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let l=1;l<r.length;l++)n[r[l]]=!0}let i=bk(e)+bk(n)+"*$";return[new RegExp("^"+i),new RegExp(i)]}function b1(t){let e=t.map(r=>typeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:y6(e);return r=>{let l=r.matchBefore(i);return l||r.explicit?{from:l?l.from:r.pos,options:e,validFor:n}:null}}function KC(t,e){return n=>{for(let i=mt(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class vk{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function $l(t){return t.selection.main.from}function JC(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",l=i[i.length-1]!="$";return!r&&!l?t:new RegExp(`${r?"^":""}(?:${i})${l?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const v1=qr.define();function x6(t,e,n,i){let{main:r}=t.selection,l=n-r.from,a=i-r.from;return{...t.changeByRange(c=>{if(c!=r&&n!=i&&t.sliceDoc(c.from+l,c.from+a)!=t.sliceDoc(n,i))return{range:c};let f=t.toText(e);return{changes:{from:c.from+l,to:i==r.from?c.to:c.from+a,insert:f},range:oe.cursor(c.from+l+f.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const Qk=new WeakMap;function S6(t){if(!Array.isArray(t))return t;let e=Qk.get(t);return e||Qk.set(t,e=b1(t)),e}const Bd=Ne.define(),uu=Ne.define();class b6{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let i=vs(e,n),r=ml(i);this.chars.push(i);let l=e.slice(n,n+r),a=l.toUpperCase();this.folded.push(vs(a==l?l.toLowerCase():a,0)),n+=r}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:i,any:r,precise:l,byWord:a}=this;if(n.length==1){let P=vs(e,0),T=ml(P),$=T==e.length?0:-100;if(P!=n[0])if(P==i[0])$+=-200;else return null;return this.ret($,[0,T])}let c=e.indexOf(this.pattern);if(c==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let f=n.length,h=0;if(c<0){for(let P=0,T=Math.min(e.length,200);P<T&&h<f;){let $=vs(e,P);($==n[h]||$==i[h])&&(r[h++]=P),P+=ml($)}if(h<f)return null}let O=0,p=0,m=!1,y=0,b=-1,v=-1,k=/[a-z]/.test(e),Q=!0;for(let P=0,T=Math.min(e.length,200),$=0;P<T&&p<f;){let _=vs(e,P);c<0&&(O<f&&_==n[O]&&(l[O++]=P),y<f&&(_==n[y]||_==i[y]?(y==0&&(b=P),v=P+1,y++):y=0));let A,E=_<255?_>=48&&_<=57||_>=97&&_<=122?2:_>=65&&_<=90?1:0:(A=v2(_))!=A.toLowerCase()?1:A!=A.toUpperCase()?2:0;(!P||E==1&&k||$==0&&E!=0)&&(n[p]==_||i[p]==_&&(m=!0)?a[p++]=P:a.length&&(Q=!1)),$=E,P+=ml(_)}return p==f&&a[0]==0&&Q?this.result(-100+(m?-200:0),a,e):y==f&&b==0?this.ret(-200-e.length+(v==e.length?0:-100),[0,v]):c>-1?this.ret(-700-e.length,[c,c+this.pattern.length]):y==f?this.ret(-900-e.length,[b,v]):p==f?this.result(-100+(m?-200:0)+-700+(Q?0:-1100),a,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],l=0;for(let a of n){let c=a+(this.astral?ml(vs(i,a)):1);l&&r[l-1]==a?r[l-1]=c:(r[l++]=a,r[l++]=c)}return this.ret(e-i.length,r)}}class v6{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),i=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return i==null?null:(this.matched=[0,n.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}const Gt=xe.define({combine(t){return Zs(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Q6,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>wk(e(i),n(i)),optionClass:(e,n)=>i=>wk(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function wk(t,e){return t?e?t+" "+e:t:e}function Q6(t,e,n,i,r,l){let a=t.textDirection==gt.RTL,c=a,f=!1,h="top",O,p,m=e.left-r.left,y=r.right-e.right,b=i.right-i.left,v=i.bottom-i.top;if(c&&m<Math.min(b,y)?c=!1:!c&&y<Math.min(b,m)&&(c=!0),b<=(c?m:y))O=Math.max(r.top,Math.min(n.top,r.bottom-v))-e.top,p=Math.min(400,c?m:y);else{f=!0,p=Math.min(400,(a?e.right:r.right-e.left)-30);let P=r.bottom-e.bottom;P>=v||P>e.top?O=n.bottom-e.top:(h="bottom",O=e.bottom-n.top)}let k=(e.bottom-e.top)/l.offsetHeight,Q=(e.right-e.left)/l.offsetWidth;return{style:`${h}: ${O/k}px; max-width: ${p/Q}px`,class:"cm-completionInfo-"+(f?a?"left-narrow":"right-narrow":c?"left":"right")}}const Q1=Ne.define();function w6(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,l){let a=document.createElement("span");a.className="cm-completionLabel";let c=n.displayLabel||n.label,f=0;for(let h=0;h<l.length;){let O=l[h++],p=l[h++];O>f&&a.appendChild(document.createTextNode(c.slice(f,O)));let m=a.appendChild(document.createElement("span"));m.appendChild(document.createTextNode(c.slice(O,p))),m.className="cm-completionMatchedText",f=p}return f<c.length&&a.appendChild(document.createTextNode(c.slice(f))),a},position:50},{render(n){if(!n.detail)return null;let i=document.createElement("span");return i.className="cm-completionDetail",i.textContent=n.detail,i},position:80}),e.sort((n,i)=>n.position-i.position).map(n=>n.render)}function Em(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class k6{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:f=>this.placeInfo(f),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:l,selected:a}=r.open,c=e.state.facet(Gt);this.optionContent=w6(c),this.optionClass=c.optionClass,this.tooltipClass=c.tooltipClass,this.range=Em(l.length,a,c.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",f=>{let{options:h}=e.state.field(n).open;for(let O=f.target,p;O&&O!=this.dom;O=O.parentNode)if(O.nodeName=="LI"&&(p=/-(\d+)$/.exec(O.id))&&+p[1]<h.length){this.applyCompletion(e,h[+p[1]]),f.preventDefault();return}if(f.target==this.list){let O=this.list.classList.contains("cm-completionListIncompleteTop")&&f.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&f.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;O!=null&&(e.dispatch({effects:Q1.of(O)}),f.preventDefault())}}),this.dom.addEventListener("focusout",f=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(Gt).closeOnBlur&&f.relatedTarget!=e.contentDOM&&e.dispatch({effects:uu.of(null)})}),this.showOptions(l,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:l,selected:a,disabled:c}=i.open;(!r.open||r.open.options!=l)&&(this.range=Em(l.length,a,e.state.facet(Gt).maxRenderedOptions),this.showOptions(l,i.id)),this.updateSel(),c!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!c)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Em(n.options.length,n.selected,this.view.state.facet(Gt).maxRenderedOptions),this.showOptions(n.options,e.id));let i=this.updateSelectedOption(n.selected);if(i){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:l}=r;if(!l)return;let a=typeof l=="string"?document.createTextNode(l):l(r);if(!a)return;"then"in a?a.then(c=>{c&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(c,r)}).catch(c=>In(this.view.state,c,"completion info")):(this.addInfoPane(a,r),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:l}=e;i.appendChild(r),this.infoDestroy=l||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby"));return n&&$6(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),l=this.space;if(!l){let a=this.dom.ownerDocument.documentElement;l={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return r.top>Math.min(l.bottom,n.bottom)-10||r.bottom<Math.max(l.top,n.top)+10?null:this.view.state.facet(Gt).positionInfo(this.view,n,r,i,l,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,i){const r=document.createElement("ul");r.id=n,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",a=>{a.target==r&&a.preventDefault()});let l=null;for(let a=i.from;a<i.to;a++){let{completion:c,match:f}=e[a],{section:h}=c;if(h){let m=typeof h=="string"?h:h.name;if(m!=l&&(a>i.from||i.from==0))if(l=m,typeof h!="string"&&h.header)r.appendChild(h.header(h));else{let y=r.appendChild(document.createElement("completion-section"));y.textContent=m}}const O=r.appendChild(document.createElement("li"));O.id=n+"-"+a,O.setAttribute("role","option");let p=this.optionClass(c);p&&(O.className=p);for(let m of this.optionContent){let y=m(c,this.view.state,this.view,f);y&&O.appendChild(y)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function T6(t,e){return n=>new k6(n,t,e)}function $6(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.top<n.top?t.scrollTop-=(n.top-i.top)/r:i.bottom>n.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function kk(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function P6(t,e){let n=[],i=null,r=null,l=O=>{n.push(O);let{section:p}=O.completion;if(p){i||(i=[]);let m=typeof p=="string"?p:p.name;i.some(y=>y.name==m)||i.push(typeof p=="string"?{name:m}:p)}},a=e.facet(Gt);for(let O of t)if(O.hasResult()){let p=O.result.getMatch;if(O.result.filter===!1)for(let m of O.result.options)l(new vk(m,O.source,p?p(m):[],1e9-n.length));else{let m=e.sliceDoc(O.from,O.to),y,b=a.filterStrict?new v6(m):new b6(m);for(let v of O.result.options)if(y=b.match(v.label)){let k=v.displayLabel?p?p(v,y.matched):[]:y.matched,Q=y.score+(v.boost||0);if(l(new vk(v,O.source,k,Q)),typeof v.section=="object"&&v.section.rank==="dynamic"){let{name:P}=v.section;r||(r=Object.create(null)),r[P]=Math.max(Q,r[P]||-1e9)}}}}if(i){let O=Object.create(null),p=0,m=(y,b)=>(y.rank==="dynamic"&&b.rank==="dynamic"?r[b.name]-r[y.name]:0)||(typeof y.rank=="number"?y.rank:1e9)-(typeof b.rank=="number"?b.rank:1e9)||(y.name<b.name?-1:1);for(let y of i.sort(m))p-=1e5,O[y.name]=p;for(let y of n){let{section:b}=y.completion;b&&(y.score+=O[typeof b=="string"?b:b.name])}}let c=[],f=null,h=a.compareCompletions;for(let O of n.sort((p,m)=>m.score-p.score||h(p.completion,m.completion))){let p=O.completion;!f||f.label!=p.label||f.detail!=p.detail||f.type!=null&&p.type!=null&&f.type!=p.type||f.apply!=p.apply||f.boost!=p.boost?c.push(O):kk(O.completion)>kk(f)&&(c[c.length-1]=O),f=O.completion}return c}class qa{constructor(e,n,i,r,l,a){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=l,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new qa(this.options,Tk(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,l,a){if(r&&!a&&e.some(h=>h.isPending))return r.setDisabled();let c=P6(e,n);if(!c.length)return r&&e.some(h=>h.isPending)?r.setDisabled():null;let f=n.facet(Gt).selectOnOpen?0:-1;if(r&&r.selected!=f&&r.selected!=-1){let h=r.options[r.selected].completion;for(let O=0;O<c.length;O++)if(c[O].completion==h){f=O;break}}return new qa(c,Tk(i,f),{pos:e.reduce((h,O)=>O.hasResult()?Math.min(h,O.from):h,1e8),create:_6,above:l.aboveCursor},r?r.timestamp:Date.now(),f,!1)}map(e){return new qa(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new qa(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Nd{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new Nd(z6,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Gt),l=(i.override||n.languageDataAt("autocomplete",$l(n)).map(S6)).map(f=>(this.active.find(O=>O.source==f)||new hi(f,this.active.some(O=>O.state!=0)?1:0)).update(e,i));l.length==this.active.length&&l.every((f,h)=>f==this.active[h])&&(l=this.active);let a=this.open,c=e.effects.some(f=>f.is(w1));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||l.some(f=>f.hasResult()&&e.changes.touchesRange(f.from,f.to))||!C6(l,this.active)||c?a=qa.build(l,n,this.id,a,i,c):a&&a.disabled&&!l.some(f=>f.isPending)&&(a=null),!a&&l.every(f=>!f.isPending)&&l.some(f=>f.hasResult())&&(l=l.map(f=>f.hasResult()?new hi(f.source,0):f));for(let f of e.effects)f.is(Q1)&&(a=a&&a.setSelected(f.value,this.id));return l==this.active&&a==this.open?this:new Nd(l,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?A6:R6}}function C6(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;i<e.length&&!e[i].hasResult();)i++;let r=n==t.length,l=i==e.length;if(r||l)return r==l;if(t[n++].result!=e[i++].result)return!1}}const A6={"aria-autocomplete":"list"},R6={};function Tk(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const z6=[];function eA(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(v1);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class hi{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=eA(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new hi(r.source,0)),i&4&&r.state==0&&(r=new hi(this.source,1)),r=r.updateFor(e,i);for(let l of e.effects)if(l.is(Bd))r=new hi(r.source,1,l.value);else if(l.is(uu))r=new hi(r.source,0);else if(l.is(w1))for(let a of l.value)a.source==r.source&&(r=a);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange($l(e.state))}}class Ha extends hi{constructor(e,n,i,r,l,a){super(e,3,n),this.limit=i,this.result=r,this.from=l,this.to=a}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let l=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),c=$l(e.state);if(c>a||!r||n&2&&($l(e.startState)==this.from||c<this.limit))return new hi(this.source,n&4?1:0);let f=e.changes.mapPos(this.limit);return E6(r.validFor,e.state,l,a)?new Ha(this.source,this.explicit,f,r,l,a):r.update&&(r=r.update(r,l,a,new S1(e.state,c,!1)))?new Ha(this.source,this.explicit,f,r,r.from,(i=r.to)!==null&&i!==void 0?i:$l(e.state)):new hi(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ha(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new hi(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function E6(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):JC(t,!0).test(r)}const w1=Ne.define({map(t,e){return t.map(n=>n.map(e))}}),Rn=Kn.define({create(){return Nd.start()},update(t,e){return t.update(e)},provide:t=>[_P.from(t,e=>e.tooltip),ye.contentAttributes.from(t,e=>e.attrs)]});function k1(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Rn).active.find(r=>r.source==e.source);return i instanceof Ha?(typeof n=="string"?t.dispatch({...x6(t.state,n,i.from,i.to),annotations:v1.of(e.completion)}):n(t,e.completion,i.from,i.to),!0):!1}const _6=T6(Rn,k1);function Zh(t,e="option"){return n=>{let i=n.state.field(Rn,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(Gt).interactionDelay)return!1;let r=1,l;e=="page"&&(l=jP(n,i.open.tooltip))&&(r=Math.max(2,Math.floor(l.dom.offsetHeight/l.dom.querySelector("li").offsetHeight)-1));let{length:a}=i.open.options,c=i.open.selected>-1?i.open.selected+r*(t?1:-1):t?0:a-1;return c<0?c=e=="page"?0:a-1:c>=a&&(c=e=="page"?a-1:0),n.dispatch({effects:Q1.of(c)}),!0}}const j6=t=>{let e=t.state.field(Rn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Gt).interactionDelay?!1:k1(t,e.open.options[e.open.selected])},_m=t=>t.state.field(Rn,!1)?(t.dispatch({effects:Bd.of(!0)}),!0):!1,M6=t=>{let e=t.state.field(Rn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:uu.of(null)}),!0)};class X6{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Z6=50,q6=1e3,D6=sn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Rn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Rn),n=t.state.facet(Gt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Rn)==e)return;let i=t.transactions.some(l=>{let a=eA(l,n);return a&8||(l.selection||l.docChanged)&&!(a&3)});for(let l=0;l<this.running.length;l++){let a=this.running[l];if(i||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>Z6&&Date.now()-a.time>q6){for(let c of a.context.abortListeners)try{c()}catch(f){In(this.view.state,f)}a.context.abortListeners=null,this.running.splice(l--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(l=>l.effects.some(a=>a.is(Bd)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.isPending&&!this.running.some(a=>a.active.source==l.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let l of t.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Rn);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Gt).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=$l(e),i=new S1(e,n,t.explicit,this.view),r=new X6(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(l=>{r.context.aborted||(r.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:uu.of(null)}),In(this.view.state,l)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Gt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Gt),i=this.view.state.field(Rn);for(let r=0;r<this.running.length;r++){let l=this.running[r];if(l.done===void 0)continue;if(this.running.splice(r--,1),l.done){let c=$l(l.updates.length?l.updates[0].startState:this.view.state),f=Math.min(c,l.done.from+(l.active.explicit?0:1)),h=new Ha(l.active.source,l.active.explicit,f,l.done,l.done.from,(t=l.done.to)!==null&&t!==void 0?t:c);for(let O of l.updates)h=h.update(O,n);if(h.hasResult()){e.push(h);continue}}let a=i.active.find(c=>c.source==l.active.source);if(a&&a.isPending)if(l.done==null){let c=new hi(l.active.source,0);for(let f of l.updates)c=c.update(f,n);c.isPending||e.push(c)}else this.startQuery(a)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:w1.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Rn,!1);if(e&&e.tooltip&&this.view.state.facet(Gt).closeOnBlur){let n=e.open&&jP(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:uu.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Bd.of(!1)}),20),this.composing=0}}}),L6=typeof navigator=="object"&&/Win/.test(navigator.platform),B6=Zr.highest(ye.domEventHandlers({keydown(t,e){let n=e.state.field(Rn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(L6&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(a=>a.source==i.source),l=i.completion.commitCharacters||r.result.commitCharacters;return l&&l.indexOf(t.key)>-1&&k1(e,i),!1}})),tA=ye.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class N6{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class T1{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Sn.TrackDel),i=e.mapPos(this.to,1,Sn.TrackDel);return n==null||i==null?null:new T1(this.field,n,i)}}class $1{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],l=e.doc.lineAt(n),a=/^\s*/.exec(l.text)[0];for(let f of this.lines){if(i.length){let h=a,O=/^\t*/.exec(f)[0].length;for(let p=0;p<O;p++)h+=e.facet(Cu);r.push(n+h.length-O),f=h+f.slice(O)}i.push(f),n+=f.length+1}let c=this.fieldPositions.map(f=>new T1(f.field,r[f.line]+f.from,r[f.line]+f.to));return{text:i,ranges:c}}static parse(e){let n=[],i=[],r=[],l;for(let a of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let c=l[1]?+l[1]:null,f=l[2]||l[3]||"",h=-1,O=f.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p<n.length;p++)(c!=null?n[p].seq==c:O&&n[p].name==O)&&(h=p);if(h<0){let p=0;for(;p<n.length&&(c==null||n[p].seq!=null&&n[p].seq<c);)p++;n.splice(p,0,{seq:c,name:O}),h=p;for(let m of r)m.field>=h&&m.field++}for(let p of r)if(p.line==i.length&&p.from>l.index){let m=l[2]?3+(l[1]||"").length:2;p.from-=m,p.to-=m}r.push(new N6(h,i.length,l.index,l.index+O.length)),a=a.slice(0,l.index)+f+a.slice(l.index+l[0].length)}a=a.replace(/\\([{}])/g,(c,f,h)=>{for(let O of r)O.line==i.length&&O.from>h&&(O.from--,O.to--);return f}),i.push(a)}return new $1(i,r)}}let V6=Me.widget({widget:new class extends ql{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Y6=Me.mark({class:"cm-snippetField"});class xo{constructor(e,n){this.ranges=e,this.active=n,this.deco=Me.set(e.map(i=>(i.from==i.to?V6:Y6).range(i.from,i.to)),!0)}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new xo(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const Eu=Ne.define({map(t,e){return t&&t.map(e)}}),W6=Ne.define(),fu=Kn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Eu))return n.value;if(n.is(W6)&&t)return new xo(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ye.decorations.from(t,e=>e?e.deco:Me.none)});function P1(t,e){return oe.create(t.filter(n=>n.field==e).map(n=>oe.range(n.from,n.to)))}function U6(t){let e=$1.parse(t);return(n,i,r,l)=>{let{text:a,ranges:c}=e.instantiate(n.state,r),{main:f}=n.state.selection,h={changes:{from:r,to:l==f.from?f.to:l,insert:Ie.of(a)},scrollIntoView:!0,annotations:i?[v1.of(i),Zt.userEvent.of("input.complete")]:void 0};if(c.length&&(h.selection=P1(c,0)),c.some(O=>O.field>0)){let O=new xo(c,0),p=h.effects=[Eu.of(O)];n.state.field(fu,!1)===void 0&&p.push(Ne.appendConfig.of([fu,K6,J6,tA]))}n.dispatch(n.state.update(h))}}function nA(t){return({state:e,dispatch:n})=>{let i=e.field(fu,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,l=t>0&&!i.ranges.some(a=>a.field==r+t);return n(e.update({selection:P1(i.ranges,r),effects:Eu.of(l?null:new xo(i.ranges,r)),scrollIntoView:!0})),!0}}const G6=({state:t,dispatch:e})=>t.field(fu,!1)?(e(t.update({effects:Eu.of(null)})),!0):!1,H6=nA(1),I6=nA(-1),F6=[{key:"Tab",run:H6,shift:I6},{key:"Escape",run:G6}],$k=xe.define({combine(t){return t.length?t[0]:F6}}),K6=Zr.highest(co.compute([$k],t=>t.facet($k)));function wt(t,e){return{...e,apply:U6(t)}}const J6=ye.domEventHandlers({mousedown(t,e){let n=e.state.field(fu,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(l=>l.from<=i&&l.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:P1(n.ranges,r.field),effects:Eu.of(n.ranges.some(l=>l.field>r.field)?new xo(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),iA=new class extends As{};iA.startSide=1;iA.endSide=-1;function eV(t={}){return[B6,Rn,Gt.of(t),D6,tV,tA]}const rA=[{key:"Ctrl-Space",run:_m},{mac:"Alt-`",run:_m},{mac:"Alt-i",run:_m},{key:"Escape",run:M6},{key:"ArrowDown",run:Zh(!0)},{key:"ArrowUp",run:Zh(!1)},{key:"PageDown",run:Zh(!0,"page")},{key:"PageUp",run:Zh(!1,"page")},{key:"Enter",run:j6}],tV=Zr.highest(co.computeN([Gt],t=>t.facet(Gt).defaultKeymap?[rA]:[])),nV="#e5c07b",Pk="#e06c75",iV="#56b6c2",rV="#ffffff",td="#abb2bf",ay="#7d8799",sV="#61afef",lV="#98c379",Ck="#d19a66",aV="#c678dd",oV="#21252b",Ak="#2c313a",Rk="#282c34",jm="#353a42",cV="#3E4451",zk="#528bff",uV=ye.theme({"&":{color:td,backgroundColor:Rk},".cm-content":{caretColor:zk},".cm-cursor, .cm-dropCursor":{borderLeftColor:zk},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:cV},".cm-panels":{backgroundColor:oV,color:td},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Rk,color:ay,border:"none"},".cm-activeLineGutter":{backgroundColor:Ak},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:jm},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:jm,borderBottomColor:jm},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Ak,color:td}}},{dark:!0}),fV=xO.define([{tag:j.keyword,color:aV},{tag:[j.name,j.deleted,j.character,j.propertyName,j.macroName],color:Pk},{tag:[j.function(j.variableName),j.labelName],color:sV},{tag:[j.color,j.constant(j.name),j.standard(j.name)],color:Ck},{tag:[j.definition(j.name),j.separator],color:td},{tag:[j.typeName,j.className,j.number,j.changed,j.annotation,j.modifier,j.self,j.namespace],color:nV},{tag:[j.operator,j.operatorKeyword,j.url,j.escape,j.regexp,j.link,j.special(j.string)],color:iV},{tag:[j.meta,j.comment],color:ay},{tag:j.strong,fontWeight:"bold"},{tag:j.emphasis,fontStyle:"italic"},{tag:j.strikethrough,textDecoration:"line-through"},{tag:j.link,color:ay,textDecoration:"underline"},{tag:j.heading,fontWeight:"bold",color:Pk},{tag:[j.atom,j.bool,j.special(j.variableName)],color:Ck},{tag:[j.processingInstruction,j.string,j.inserted],color:lV},{tag:j.invalid,color:rV}]),hV=[uV,pB(fV)];var Ek={};class Vd{constructor(e,n,i,r,l,a,c,f,h,O=0,p){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=l,this.score=a,this.buffer=c,this.bufferBase=f,this.curContext=h,this.lookAhead=O,this.parent=p}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new Vd(e,[],n,i,i,0,[],0,r?new _k(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:l}=this.p,a=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),c=l.dynamicPrecedence(r);if(c&&(this.score+=c),i==0){this.pushState(l.getGoto(this.state,r,!0),this.reducePos),r<l.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(r,this.reducePos);return}let f=this.stack.length-(i-1)*3-(e&262144?6:0),h=f?this.stack[f-2]:this.p.ranges[0].from,O=this.reducePos-h;O>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=O):this.p.lastBigReductionSize<O&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=O));let p=f?this.stack[f-1]:0,m=this.bufferBase+this.buffer.length-p;if(r<l.minRepeatTerm||e&131072){let y=l.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,h,y,m+4,!0)}if(e&262144)this.state=this.stack[f];else{let y=this.stack[f-3];this.state=l.getGoto(y,r,!0)}for(;this.stack.length>f;)this.stack.pop();this.reduceContext(r,h)}storeNode(e,n,i,r=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,c=this.buffer.length;if(c==0&&a.parent&&(c=a.bufferBase-a.parent.bufferBase,a=a.parent),c>0&&a.buffer[c-4]==0&&a.buffer[c-1]>-1){if(n==i)return;if(a.buffer[c-2]>=n){a.buffer[c-2]=i;return}}}if(!l||this.pos==i)this.buffer.push(e,n,i,r);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let c=!1;for(let f=a;f>0&&this.buffer[f-2]>i;f-=4)if(this.buffer[f-1]>=0){c=!0;break}if(c)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let l=e,{parser:a}=this.p;this.pos=r;let c=a.stateFlag(l,1);!c&&(r>i||n<=a.maxNode)&&(this.reducePos=r),this.pushState(l,c?i:Math.min(i,this.reducePos)),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new Vd(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new dV(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let l=0,a;l<n.length;l+=2)(a=n[l+1])!=this.state&&this.p.parser.hasAction(a,e)&&r.push(n[l],a);if(this.stack.length<120)for(let l=0;r.length<8&&l<n.length;l+=2){let a=n[l+1];r.some((c,f)=>f&1&&c==a)||r.push(n[l],a)}n=r}let i=[];for(let r=0;r<n.length&&i.length<4;r+=2){let l=n[r+1];if(l==this.state)continue;let a=this.split();a.pushState(l,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[r],this.pos),a.reducePos=this.pos,a.score-=200,i.push(a)}return i}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let i=n>>19,r=n&65535,l=this.stack.length-i*3;if(l<0||e.getGoto(this.stack[l],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,l)=>{if(!n.includes(r))return n.push(r),e.allActions(r,a=>{if(!(a&393216))if(a&65536){let c=(a>>19)-l;if(c>1){let f=a&65535,h=this.stack.length-c*3;if(h>=0&&e.getGoto(this.stack[h],f,!1)>=0)return c<<19|65536|f}}else{let c=i(a,l+1);if(c!=null)return c}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new _k(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class _k{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class dV{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class Yd{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Yd(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Yd(this.stack,this.pos,this.index)}}function Ec(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i<t.length;){let l=0;for(;;){let a=t.charCodeAt(i++),c=!1;if(a==126){l=65535;break}a>=92&&a--,a>=34&&a--;let f=a-32;if(f>=46&&(f-=46,c=!0),l+=f,c)break;l*=46}n?n[r++]=l:n=new e(l)}return n}class nd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const jk=new nd;class OV{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=jk,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,l=this.pos+e;for(;l<i.from;){if(!r)return null;let a=this.ranges[--r];l-=i.from-a.to,i=a}for(;n<0?l>i.to:l>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];l+=a.from-i.to,i=a}return l}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(n);else{let l=this.resolveOffset(e,1);if(l==null)return-1;if(i=l,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let a=this.rangeIndex,c=this.range;for(;c.to<=i;)c=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>c.to&&(this.chunk2=this.chunk2.slice(0,c.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=jk,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class Ia{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;sA(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Ia.prototype.contextual=Ia.prototype.fallback=Ia.prototype.extend=!1;class Wd{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Ec(e):e}token(e,n){let i=e.pos,r=0;for(;;){let l=e.next<0,a=e.resolveOffset(1,1);if(sA(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||r++,a==null)break;e.reset(a,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}Wd.prototype.contextual=Ia.prototype.fallback=Ia.prototype.extend=!1;class ln{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function sA(t,e,n,i,r,l){let a=0,c=1<<i,{dialect:f}=n.p.parser;e:for(;(c&t[a])!=0;){let h=t[a+1];for(let y=a+3;y<h;y+=2)if((t[y+1]&c)>0){let b=t[y];if(f.allows(b)&&(e.token.value==-1||e.token.value==b||pV(b,e.token.value,r,l))){e.acceptToken(b);break}}let O=e.next,p=0,m=t[a+2];if(e.next<0&&m>p&&t[h+m*3-3]==65535){a=t[h+m*3-1];continue e}for(;p<m;){let y=p+m>>1,b=h+y+(y<<1),v=t[b],k=t[b+1]||65536;if(O<v)m=y;else if(O>=k)p=y+1;else{a=t[b+2],e.advance();continue e}}break}}function Mk(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function pV(t,e,n,i){let r=Mk(n,i,e);return r<0||Mk(n,i,t)<r}const Vn=typeof process<"u"&&Ek&&/\bparse\b/.test(Ek.LOG);let Mm=null;function Xk(t,e,n){let i=t.cursor(rt.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.to<e:i.from>e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}let gV=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Xk(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Xk(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let i=this.trees[n],r=this.index[n];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let l=i.children[r],a=this.start[n]+i.positions[r];if(a>e)return this.nextStart=a,null;if(l instanceof st){if(a==e){if(a<this.safeFrom)return null;let c=a+l.length;if(c<=this.safeTo){let f=l.prop(_e.lookAhead);if(!f||c+f<this.fragment.to)return l}}this.index[n]++,a+l.length>=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+l.length}}};class mV{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new nd)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:l}=r,a=r.stateSlot(e.state,3),c=e.curContext?e.curContext.hash:0,f=0;for(let h=0;h<l.length;h++){if((1<<h&a)==0)continue;let O=l[h],p=this.tokens[h];if(!(i&&!O.fallback)&&((O.contextual||p.start!=e.pos||p.mask!=a||p.context!=c)&&(this.updateCachedToken(p,O,e),p.mask=a,p.context=c),p.lookAhead>p.end+25&&(f=Math.max(p.lookAhead,f)),p.value!=0)){let m=n;if(p.extended>-1&&(n=this.addActions(e,p.extended,p.end,n)),n=this.addActions(e,p.value,p.end,n),!O.extend&&(i=p,n>m))break}}for(;this.actions.length>n;)this.actions.pop();return f&&e.setLookAhead(f),!i&&e.pos==this.stream.end&&(i=new nd,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new nd,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:l}=i.p;for(let a=0;a<l.specialized.length;a++)if(l.specialized[a]==e.value){let c=l.specializers[a](this.stream.read(e.start,e.end),i);if(c>=0&&i.p.parser.dialect.allows(c>>1)){(c&1)==0?e.value=c>>1:e.extended=c>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let l=0;l<r;l+=3)if(this.actions[l]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=i,r}addActions(e,n,i,r){let{state:l}=e,{parser:a}=e.p,{data:c}=a;for(let f=0;f<2;f++)for(let h=a.stateSlot(l,f?2:1);;h+=3){if(c[h]==65535)if(c[h+1]==1)h=Pr(c,h+2);else{r==0&&c[h+1]==2&&(r=this.putAction(Pr(c,h+2),n,i,r));break}c[h]==n&&(r=this.putAction(Pr(c,h+1),n,i,r))}return r}}class yV{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new OV(n,r),this.tokens=new mV(e,this.stream),this.topTerm=e.top[1];let{from:l}=r[0];this.stacks=[Vd.start(this,e.top[0],l)],this.fragments=i.length&&this.stream.end-l>e.bufferLength*4?new gV(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,l;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let c=e[a];for(;;){if(this.tokens.mainToken=null,c.pos>n)i.push(c);else{if(this.advanceStack(c,i,e))continue;{r||(r=[],l=[]),r.push(c);let f=this.tokens.getMainToken(c);l.push(f.value,f.end)}}break}}if(!i.length){let a=r&&SV(r);if(a)return Vn&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Vn&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,l,i);if(a)return Vn&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((c,f)=>f.score-c.score);i.length>a;)i.pop();i.some(c=>c.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a<i.length-1;a++){let c=i[a];for(let f=a+1;f<i.length;f++){let h=i[f];if(c.sameState(h)||c.buffer.length>500&&h.buffer.length>500)if((c.score-h.score||c.buffer.length-h.buffer.length)>0)i.splice(f--,1);else{i.splice(a--,1);continue e}}}i.length>12&&(i.sort((a,c)=>c.score-a.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let a=1;a<i.length;a++)i[a].pos<this.minStackPos&&(this.minStackPos=i[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,i){let r=e.pos,{parser:l}=this,a=Vn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,O=h?e.curContext.hash:0;for(let p=this.fragments.nodeAt(r);p;){let m=this.parser.nodeSet.types[p.type.id]==p.type?l.getGoto(e.state,p.type.id):-1;if(m>-1&&p.length&&(!h||(p.prop(_e.contextHash)||0)==O))return e.useNode(p,m),Vn&&console.log(a+this.stackID(e)+` (via reuse of ${l.getName(p.type.id)})`),!0;if(!(p instanceof st)||p.children.length==0||p.positions[0]>0)break;let y=p.children[0];if(y instanceof st&&p.positions[0]==0)p=y;else break}}let c=l.stateSlot(e.state,4);if(c>0)return e.reduce(c),Vn&&console.log(a+this.stackID(e)+` (via always-reduce ${l.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let f=this.tokens.getActions(e);for(let h=0;h<f.length;){let O=f[h++],p=f[h++],m=f[h++],y=h==f.length||!i,b=y?e:e.split(),v=this.tokens.mainToken;if(b.apply(O,p,v?v.start:b.pos,m),Vn&&console.log(a+this.stackID(b)+` (via ${(O&65536)==0?"shift":`reduce of ${l.getName(O&65535)}`} for ${l.getName(p)} @ ${r}${b==e?"":", split"})`),y)return!0;b.pos>r?n.push(b):i.push(b)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Zk(e,n),!0}}runRecovery(e,n,i){let r=null,l=!1;for(let a=0;a<e.length;a++){let c=e[a],f=n[a<<1],h=n[(a<<1)+1],O=Vn?this.stackID(c)+" -> ":"";if(c.deadEnd&&(l||(l=!0,c.restart(),Vn&&console.log(O+this.stackID(c)+" (restarted)"),this.advanceFully(c,i))))continue;let p=c.split(),m=O;for(let y=0;y<10&&p.forceReduce()&&(Vn&&console.log(m+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,i));y++)Vn&&(m=this.stackID(p)+" -> ");for(let y of c.recoverByInsert(f))Vn&&console.log(O+this.stackID(y)+" (via recover-insert)"),this.advanceFully(y,i);this.stream.end>c.pos?(h==c.pos&&(h++,f=0),c.recoverByDelete(f,h),Vn&&console.log(O+this.stackID(c)+` (via recover-delete ${this.parser.getName(f)})`),Zk(c,i)):(!r||r.score<p.score)&&(r=p)}return r}stackToTree(e){return e.close(),st.build({buffer:Yd.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Mm||(Mm=new WeakMap)).get(e);return n||Mm.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function Zk(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class xV{constructor(e,n,i){this.source=e,this.flags=n,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}const Xm=t=>t;class C1{constructor(e){this.start=e.start,this.shift=e.shift||Xm,this.reduce=e.reduce||Xm,this.reuse=e.reuse||Xm,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Xs extends o1{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let c=0;c<e.repeatNodeCount;c++)n.push("");let i=Object.keys(e.topRules).map(c=>e.topRules[c][1]),r=[];for(let c=0;c<n.length;c++)r.push([]);function l(c,f,h){r[c].push([f,f.deserialize(String(h))])}if(e.nodeProps)for(let c of e.nodeProps){let f=c[0];typeof f=="string"&&(f=_e[f]);for(let h=1;h<c.length;){let O=c[h++];if(O>=0)l(O,f,c[h++]);else{let p=c[h+-O];for(let m=-O;m>0;m--)l(c[h++],f,p);h++}}}this.nodeSet=new Pu(n.map((c,f)=>Vt.define({name:f>=this.minRepeatTerm?void 0:c,id:f,props:r[f],top:i.indexOf(f)>-1,error:f==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(f)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=BP;let a=Ec(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let c=0;c<this.specializerSpecs.length;c++)this.specialized[c]=this.specializerSpecs[c].term;this.specializers=this.specializerSpecs.map(qk),this.states=Ec(e.states,Uint32Array),this.data=Ec(e.stateData),this.goto=Ec(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(c=>typeof c=="number"?new Ia(a,c):c),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new yV(this,e,n,i);for(let l of this.wrappers)r=l(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let l=r[n+1];;){let a=r[l++],c=a&1,f=r[l++];if(c&&i)return f;for(let h=l+(a>>1);l<h;l++)if(r[l]==e)return f;if(c)return-1}}hasAction(e,n){let i=this.data;for(let r=0;r<2;r++)for(let l=this.stateSlot(e,r?2:1),a;;l+=3){if((a=i[l])==65535)if(i[l+1]==1)a=i[l=Pr(i,l+2)];else{if(i[l+1]==2)return Pr(i,l+2);break}if(a==n||a==0)return Pr(i,l+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let l=this.stateSlot(e,1);r==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Pr(this.data,l+2);else break;r=n(Pr(this.data,l+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Pr(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((l,a)=>a&1&&l==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(Xs.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(l=>l.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let l=e.specializers.find(c=>c.from==i.external);if(!l)return i;let a=Object.assign(Object.assign({},i),{external:l.to});return n.specializers[r]=qk(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let l of e.split(" ")){let a=n.indexOf(l);a>=0&&(i[a]=!0)}let r=null;for(let l=0;l<n.length;l++)if(!i[l])for(let a=this.dialects[n[l]],c;(c=this.data[a++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[c]=1;return new xV(e,i,r)}static deserialize(e){return new Xs(e)}}function Pr(t,e){return t[e]|t[e+1]<<16}function SV(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||i!=null&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function qk(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}const bV=316,vV=317,Dk=1,QV=2,wV=3,kV=4,TV=318,$V=320,PV=321,CV=5,AV=6,RV=0,oy=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],lA=125,zV=59,cy=47,EV=42,_V=43,jV=45,MV=60,XV=44,ZV=63,qV=46,DV=91,LV=new C1({start:!1,shift(t,e){return e==CV||e==AV||e==$V?t:e==PV},strict:!1}),BV=new ln((t,e)=>{let{next:n}=t;(n==lA||n==-1||e.context)&&t.acceptToken(TV)},{contextual:!0,fallback:!0}),NV=new ln((t,e)=>{let{next:n}=t,i;oy.indexOf(n)>-1||n==cy&&((i=t.peek(1))==cy||i==EV)||n!=lA&&n!=zV&&n!=-1&&!e.context&&t.acceptToken(bV)},{contextual:!0}),VV=new ln((t,e)=>{t.next==DV&&!e.context&&t.acceptToken(vV)},{contextual:!0}),YV=new ln((t,e)=>{let{next:n}=t;if(n==_V||n==jV){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(Dk);t.acceptToken(i?Dk:QV)}}else n==ZV&&t.peek(1)==qV&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(wV))},{contextual:!0});function Zm(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const WV=new ln((t,e)=>{if(t.next!=MV||!e.dialectEnabled(RV)||(t.advance(),t.next==cy))return;let n=0;for(;oy.indexOf(t.next)>-1;)t.advance(),n++;if(Zm(t.next,!0)){for(t.advance(),n++;Zm(t.next,!1);)t.advance(),n++;for(;oy.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==XV)return;for(let i=0;;i++){if(i==7){if(!Zm(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(kV,-n)}),UV=qs({"get set async static":j.modifier,"for while do if else switch try catch finally return throw break continue default case defer":j.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":j.operatorKeyword,"let var const using function class extends":j.definitionKeyword,"import export from":j.moduleKeyword,"with debugger new":j.keyword,TemplateString:j.special(j.string),super:j.atom,BooleanLiteral:j.bool,this:j.self,null:j.null,Star:j.modifier,VariableName:j.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":j.function(j.variableName),VariableDefinition:j.definition(j.variableName),Label:j.labelName,PropertyName:j.propertyName,PrivatePropertyName:j.special(j.propertyName),"CallExpression/MemberExpression/PropertyName":j.function(j.propertyName),"FunctionDeclaration/VariableDefinition":j.function(j.definition(j.variableName)),"ClassDeclaration/VariableDefinition":j.definition(j.className),"NewExpression/VariableName":j.className,PropertyDefinition:j.definition(j.propertyName),PrivatePropertyDefinition:j.definition(j.special(j.propertyName)),UpdateOp:j.updateOperator,"LineComment Hashbang":j.lineComment,BlockComment:j.blockComment,Number:j.number,String:j.string,Escape:j.escape,ArithOp:j.arithmeticOperator,LogicOp:j.logicOperator,BitOp:j.bitwiseOperator,CompareOp:j.compareOperator,RegExp:j.regexp,Equals:j.definitionOperator,Arrow:j.function(j.punctuation),": Spread":j.punctuation,"( )":j.paren,"[ ]":j.squareBracket,"{ }":j.brace,"InterpolationStart InterpolationEnd":j.special(j.brace),".":j.derefOperator,", ;":j.separator,"@":j.meta,TypeName:j.typeName,TypeDefinition:j.definition(j.typeName),"type enum interface implements namespace module declare":j.definitionKeyword,"abstract global Privacy readonly override":j.modifier,"is keyof unique infer asserts":j.operatorKeyword,JSXAttributeValue:j.attributeValue,JSXText:j.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":j.angleBracket,"JSXIdentifier JSXNameSpacedName":j.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":j.attributeName,"JSXBuiltin/JSXIdentifier":j.standard(j.tagName)}),GV={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},HV={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},IV={__proto__:null,"<":193},FV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ration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:LV,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[UV],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$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$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[NV,VV,YV,WV,2,3,4,5,6,7,8,9,10,11,12,13,14,BV,new Wd("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Wd("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>GV[t]||-1},{term:343,get:t=>HV[t]||-1},{term:95,get:t=>IV[t]||-1}],tokenPrec:15201}),aA=[wt("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),wt("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),wt("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),wt("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),wt("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),wt(`try {
|
|
85
|
+
\${}
|
|
86
|
+
} catch (\${error}) {
|
|
87
|
+
\${}
|
|
88
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),wt("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),wt(`if (\${}) {
|
|
89
|
+
\${}
|
|
90
|
+
} else {
|
|
91
|
+
\${}
|
|
92
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),wt(`class \${name} {
|
|
93
|
+
constructor(\${params}) {
|
|
94
|
+
\${}
|
|
95
|
+
}
|
|
96
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),wt('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),wt('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],KV=aA.concat([wt("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),wt("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),wt("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Lk=new a1,oA=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function kc(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const JV=["FunctionDeclaration"],e8={FunctionDeclaration:kc("function"),ClassDeclaration:kc("class"),ClassExpression:()=>!0,EnumDeclaration:kc("constant"),TypeAliasDeclaration:kc("type"),NamespaceDeclaration:kc("namespace"),VariableDefinition(t,e){t.matchContext(JV)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function cA(t,e){let n=Lk.get(e);if(n)return n;let i=[],r=!0;function l(a,c){let f=t.sliceString(a.from,a.to);i.push({label:f,type:c})}return e.cursor(rt.IncludeAnonymous).iterate(a=>{if(r)r=!1;else if(a.name){let c=e8[a.name];if(c&&c(a,l)||oA.has(a.name))return!1}else if(a.to-a.from>8192){for(let c of cA(t,a.node))i.push(c);return!1}}),Lk.set(e,i),i}const Bk=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,uA=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function t8(t){let e=mt(t.state).resolveInner(t.pos,-1);if(uA.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Bk.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)oA.has(r.name)&&(i=i.concat(cA(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:Bk}}const Fi=js.define({name:"javascript",parser:FV.configure({props:[Dl.add({IfStatement:Ua({except:/^\s*({|else\b)/}),TryStatement:Ua({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:KL,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:ed({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Ua({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Ds.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":mO,BlockComment(t){return{from:t.from+2,to:t.to-2}},JSXElement(t){let e=t.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let n=t.lastChild;return{from:e.to,to:n.type.isError?t.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(t){var e;let n=(e=t.firstChild)===null||e===void 0?void 0:e.nextSibling,i=t.lastChild;return!n||n.type.isError?null:{from:n.to,to:i.type.isError?t.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),fA={test:t=>/^JSX/.test(t.name),facet:c1({commentTokens:{block:{open:"{/*",close:"*/}"}}})},hA=Fi.configure({dialect:"ts"},"typescript"),dA=Fi.configure({dialect:"jsx",props:[u1.add(t=>t.isTop?[fA]:void 0)]}),OA=Fi.configure({dialect:"jsx ts",props:[u1.add(t=>t.isTop?[fA]:void 0)]},"typescript");let pA=t=>({label:t,type:"keyword"});const gA="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(pA),n8=gA.concat(["declare","implements","private","protected","public"].map(pA));function uy(t={}){let e=t.jsx?t.typescript?OA:dA:t.typescript?hA:Fi,n=t.typescript?KV.concat(n8):aA.concat(gA);return new Ml(e,[Fi.data.of({autocomplete:KC(uA,b1(n))}),Fi.data.of({autocomplete:t8}),t.jsx?s8:[]])}function i8(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Nk(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const r8=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),s8=ye.inputHandler.of((t,e,n,i,r)=>{if((r8?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Fi.isActiveAt(t.state,e,-1))return!1;let l=r(),{state:a}=l,c=a.changeByRange(f=>{var h;let{head:O}=f,p=mt(a).resolveInner(O-1,-1),m;if(p.name=="JSXStartTag"&&(p=p.parent),!(a.doc.sliceString(O-1,O)!=i||p.name=="JSXAttributeValue"&&p.to>O)){if(i==">"&&p.name=="JSXFragmentTag")return{range:f,changes:{from:O,insert:"</>"}};if(i=="/"&&p.name=="JSXStartCloseTag"){let y=p.parent,b=y.parent;if(b&&y.from==O-2&&((m=Nk(a.doc,b.firstChild,O))||((h=b.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let v=`${m}>`;return{range:oe.cursor(O+v.length,-1),changes:{from:O,insert:v}}}}else if(i==">"){let y=i8(p);if(y&&y.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(O,O+2))&&(m=Nk(a.doc,y,O)))return{range:f,changes:{from:O,insert:`</${m}>`}}}}return{range:f}});return c.changes.empty?!1:(t.dispatch([l,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),l8=135,Vk=1,a8=136,o8=137,mA=2,c8=138,u8=3,f8=4,yA=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],h8=58,d8=40,xA=95,O8=91,id=45,p8=46,g8=35,m8=37,y8=38,x8=92,S8=10,b8=42;function hu(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function A1(t){return t>=48&&t<=57}function Yk(t){return A1(t)||t>=97&&t<=102||t>=65&&t<=70}const SA=(t,e,n)=>(i,r)=>{for(let l=!1,a=0,c=0;;c++){let{next:f}=i;if(hu(f)||f==id||f==xA||l&&A1(f))!l&&(f!=id||c>0)&&(l=!0),a===c&&f==id&&a++,i.advance();else if(f==x8&&i.peek(1)!=S8){if(i.advance(),Yk(i.next)){do i.advance();while(Yk(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();l=!0}else{l&&i.acceptToken(a==2&&r.canShift(mA)?e:f==d8?n:t);break}}},v8=new ln(SA(a8,mA,o8),{contextual:!0}),Q8=new ln(SA(c8,u8,f8),{contextual:!0}),w8=new ln(t=>{if(yA.includes(t.peek(-1))){let{next:e}=t;(hu(e)||e==xA||e==g8||e==p8||e==b8||e==O8||e==h8&&hu(t.peek(1))||e==id||e==y8)&&t.acceptToken(l8)}}),k8=new ln(t=>{if(!yA.includes(t.peek(-1))){let{next:e}=t;if(e==m8&&(t.advance(),t.acceptToken(Vk)),hu(e)){do t.advance();while(hu(t.next)||A1(t.next));t.acceptToken(Vk)}}}),T8=qs({"AtKeyword import charset namespace keyframes media supports font-feature-values":j.definitionKeyword,"from to selector scope MatchFlag":j.keyword,NamespaceName:j.namespace,KeyframeName:j.labelName,KeyframeRangeName:j.operatorKeyword,TagName:j.tagName,ClassName:j.className,PseudoClassName:j.constant(j.className),IdName:j.labelName,"FeatureName PropertyName":j.propertyName,AttributeName:j.attributeName,NumberLiteral:j.number,KeywordQuery:j.keyword,UnaryQueryOp:j.operatorKeyword,"CallTag ValueName FontName":j.atom,VariableName:j.variableName,Callee:j.operatorKeyword,Unit:j.unit,"UniversalSelector NestingSelector":j.definitionOperator,"MatchOp CompareOp":j.compareOperator,"ChildOp SiblingOp, LogicOp":j.logicOperator,BinOp:j.arithmeticOperator,Important:j.modifier,Comment:j.blockComment,ColorLiteral:j.color,"ParenthesizedContent StringLiteral":j.string,":":j.punctuation,"PseudoOp #":j.derefOperator,"; , |":j.separator,"( )":j.paren,"[ ]":j.squareBracket,"{ }":j.brace}),$8={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:132,"url-prefix":132,domain:132,regexp:132},P8={__proto__:null,or:104,and:104,not:112,only:112,layer:186},C8={__proto__:null,selector:118,layer:182},A8={__proto__:null,"@import":178,"@media":190,"@charset":194,"@namespace":198,"@keyframes":204,"@supports":216,"@scope":220,"@font-feature-values":226},R8={__proto__:null,to:223},z8=Xs.deserialize({version:14,states:"IpQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FdO&XQdO'#CkO&xQaO'#CcO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List ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:159,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[T8],skippedNodes:[0,5,117],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!e`O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e`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$cQ!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[w8,k8,v8,Q8,1,2,3,4,new Wd("m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~",28,142)],topRules:{StyleSheet:[0,6],Styles:[1,116]},dynamicPrecedences:{84:1},specialized:[{term:137,get:t=>$8[t]||-1},{term:138,get:t=>P8[t]||-1},{term:4,get:t=>C8[t]||-1},{term:28,get:t=>A8[t]||-1},{term:136,get:t=>R8[t]||-1}],tokenPrec:2256});let qm=null;function Dm(){if(!qm&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));qm=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return qm||[]}const Wk=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),Uk=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),E8=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),_8=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),Qr=/^(\w[\w-]*|-\w[\w-]*|)$/,j8=/^-(-[\w-]*)?$/;function M8(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const Gk=new a1,X8=["Declaration"];function Z8(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function bA(t,e,n){if(e.to-e.from>4096){let i=Gk.get(e);if(i)return i;let r=[],l=new Set,a=e.cursor(rt.IncludeAnonymous);if(a.firstChild())do for(let c of bA(t,a.node,n))l.has(c.label)||(l.add(c.label),r.push(c));while(a.nextSibling());return Gk.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(l=>{var a;if(n(l)&&l.matchContext(X8)&&((a=l.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let c=t.sliceString(l.from,l.to);r.has(c)||(r.add(c),i.push({label:c,type:"variable"}))}}),i}}const q8=t=>e=>{let{state:n,pos:i}=e,r=mt(n).resolveInner(i,-1),l=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(l||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:Dm(),validFor:Qr};if(r.name=="ValueName")return{from:r.from,options:Uk,validFor:Qr};if(r.name=="PseudoClassName")return{from:r.from,options:Wk,validFor:Qr};if(t(r)||(e.explicit||l)&&M8(r,n.doc))return{from:t(r)||l?r.from:i,options:bA(n.doc,Z8(r),t),validFor:j8};if(r.name=="TagName"){for(let{parent:f}=r;f;f=f.parent)if(f.name=="Block")return{from:r.from,options:Dm(),validFor:Qr};return{from:r.from,options:E8,validFor:Qr}}if(r.name=="AtKeyword")return{from:r.from,options:_8,validFor:Qr};if(!e.explicit)return null;let a=r.resolve(i),c=a.childBefore(i);return c&&c.name==":"&&a.name=="PseudoClassSelector"?{from:i,options:Wk,validFor:Qr}:c&&c.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:i,options:Uk,validFor:Qr}:a.name=="Block"||a.name=="Styles"?{from:i,options:Dm(),validFor:Qr}:null},D8=q8(t=>t.name=="VariableName"),Ud=js.define({name:"css",parser:z8.configure({props:[Dl.add({Declaration:Ua()}),Ds.add({"Block KeyframeList":mO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function vA(){return new Ml(Ud,Ud.data.of({autocomplete:D8}))}const L8=55,B8=1,N8=56,V8=2,Y8=57,W8=3,Hk=4,U8=5,R1=6,QA=7,wA=8,kA=9,TA=10,G8=11,H8=12,I8=13,Lm=58,F8=14,K8=15,Ik=59,$A=21,J8=23,PA=24,eY=25,fy=27,CA=28,tY=29,nY=32,iY=35,rY=37,sY=38,lY=0,aY=1,oY={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},cY={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Fk={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function uY(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let Kk=null,Jk=null,eT=0;function hy(t,e){let n=t.pos+e;if(eT==n&&Jk==t)return Kk;let i=t.peek(e),r="";for(;uY(i);)r+=String.fromCharCode(i),i=t.peek(++e);return Jk=t,eT=n,Kk=r?r.toLowerCase():i==fY||i==hY?void 0:null}const AA=60,Gd=62,z1=47,fY=63,hY=33,dY=45;function tT(t,e){this.name=t,this.parent=e}const OY=[R1,TA,QA,wA,kA],pY=new C1({start:null,shift(t,e,n,i){return OY.indexOf(e)>-1?new tT(hy(i,1)||"",t):t},reduce(t,e){return e==$A&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==R1||r==rY?new tT(hy(i,1)||"",t):t},strict:!1}),gY=new ln((t,e)=>{if(t.next!=AA){t.next<0&&e.context&&t.acceptToken(Lm);return}t.advance();let n=t.next==z1;n&&t.advance();let i=hy(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?K8:F8);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(G8);if(r&&cY[r])return t.acceptToken(Lm,-2);if(e.dialectEnabled(lY))return t.acceptToken(H8);for(let l=e.context;l;l=l.parent)if(l.name==i)return;t.acceptToken(I8)}else{if(i=="script")return t.acceptToken(QA);if(i=="style")return t.acceptToken(wA);if(i=="textarea")return t.acceptToken(kA);if(oY.hasOwnProperty(i))return t.acceptToken(TA);r&&Fk[r]&&Fk[r][i]?t.acceptToken(Lm,-1):t.acceptToken(R1)}},{contextual:!0}),mY=new ln(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(Ik);break}if(t.next==dY)e++;else if(t.next==Gd&&e>=2){n>=3&&t.acceptToken(Ik,-2);break}else e=0;t.advance()}});function yY(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const xY=new ln((t,e)=>{if(t.next==z1&&t.peek(1)==Gd){let n=e.dialectEnabled(aY)||yY(e.context);t.acceptToken(n?U8:Hk,2)}else t.next==Gd&&t.acceptToken(Hk,1)});function E1(t,e,n){let i=2+t.length;return new ln(r=>{for(let l=0,a=0,c=0;;c++){if(r.next<0){c&&r.acceptToken(e);break}if(l==0&&r.next==AA||l==1&&r.next==z1||l>=2&&l<i&&r.next==t.charCodeAt(l-2))l++,a++;else if(l==i&&r.next==Gd){c>a?r.acceptToken(e,-a):r.acceptToken(n,-(a-2));break}else if((r.next==10||r.next==13)&&c){r.acceptToken(e,1);break}else l=a=0;r.advance()}})}const SY=E1("script",L8,B8),bY=E1("style",N8,V8),vY=E1("textarea",Y8,W8),QY=qs({"Text RawText IncompleteTag IncompleteCloseTag":j.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":j.angleBracket,TagName:j.tagName,"MismatchedCloseTag/TagName":[j.tagName,j.invalid],AttributeName:j.attributeName,"AttributeValue UnquotedAttributeValue":j.attributeValue,Is:j.definitionOperator,"EntityReference CharacterReference":j.character,Comment:j.blockComment,ProcessingInst:j.processingInstruction,DoctypeDecl:j.documentMeta}),wY=Xs.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)q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xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:pY,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[QY],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz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w!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[SY,bY,vY,xY,gY,mY,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function RA(t,e){let n=Object.create(null);for(let i of t.getChildren(PA)){let r=i.getChild(eY),l=i.getChild(fy)||i.getChild(CA);r&&(n[e.read(r.from,r.to)]=l?l.type.id==fy?e.read(l.from+1,l.to-1):e.read(l.from,l.to):"")}return n}function nT(t,e){let n=t.getChild(J8);return n?e.read(n.from,n.to):" "}function Bm(t,e,n){let i;for(let r of n)if(!r.attrs||r.attrs(i||(i=RA(t.node.parent.firstChild,e))))return{parser:r.parser,bracketed:!0};return null}function zA(t=[],e=[]){let n=[],i=[],r=[],l=[];for(let c of t)(c.tag=="script"?n:c.tag=="style"?i:c.tag=="textarea"?r:l).push(c);let a=e.length?Object.create(null):null;for(let c of e)(a[c.name]||(a[c.name]=[])).push(c);return WP((c,f)=>{let h=c.type.id;if(h==tY)return Bm(c,f,n);if(h==nY)return Bm(c,f,i);if(h==iY)return Bm(c,f,r);if(h==$A&&l.length){let O=c.node,p=O.firstChild,m=p&&nT(p,f),y;if(m){for(let b of l)if(b.tag==m&&(!b.attrs||b.attrs(y||(y=RA(p,f))))){let v=O.lastChild,k=v.type.id==sY?v.from:O.to;if(k>p.to)return{parser:b.parser,overlay:[{from:p.to,to:k}]}}}}if(a&&h==PA){let O=c.node,p;if(p=O.firstChild){let m=a[f.read(p.from,p.to)];if(m)for(let y of m){if(y.tagName&&y.tagName!=nT(O.parent,f))continue;let b=O.lastChild;if(b.type.id==fy){let v=b.from+1,k=b.lastChild,Q=b.to-(k&&k.isError?0:1);if(Q>v)return{parser:y.parser,overlay:[{from:v,to:Q}],bracketed:!0}}else if(b.type.id==CA)return{parser:y.parser,overlay:[{from:b.from,to:b.to}]}}}}return null})}const Tc=["_blank","_self","_top","_parent"],Nm=["ascii","utf-8","utf-16","latin1","latin1"],Vm=["get","post","put","delete"],Ym=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Yn=["true","false"],ve={},kY={a:{attrs:{href:null,ping:null,type:null,media:null,target:Tc,hreflang:null}},abbr:ve,address:ve,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ve,aside:ve,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ve,base:{attrs:{href:null,target:Tc}},bdi:ve,bdo:ve,blockquote:{attrs:{cite:null}},body:ve,br:ve,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Ym,formmethod:Vm,formnovalidate:["novalidate"],formtarget:Tc,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ve,center:ve,cite:ve,code:ve,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:ve,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ve,div:ve,dl:ve,dt:ve,em:ve,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ve,figure:ve,footer:ve,form:{attrs:{action:null,name:null,"accept-charset":Nm,autocomplete:["on","off"],enctype:Ym,method:Vm,novalidate:["novalidate"],target:Tc}},h1:ve,h2:ve,h3:ve,h4:ve,h5:ve,h6:ve,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ve,hgroup:ve,hr:ve,html:{attrs:{manifest:null}},i:ve,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Ym,formmethod:Vm,formnovalidate:["novalidate"],formtarget:Tc,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:ve,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ve,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:ve,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Nm,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:ve,noscript:ve,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:ve,param:{attrs:{name:null,value:null}},pre:ve,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ve,rt:ve,ruby:ve,samp:ve,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Nm}},section:ve,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ve,source:{attrs:{src:null,type:null,media:null}},span:ve,strong:ve,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ve,summary:ve,sup:ve,table:ve,tbody:ve,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ve,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:ve,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ve,time:{attrs:{datetime:null}},title:ve,tr:ve,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ve,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:ve},EA={accesskey:null,class:null,contenteditable:Yn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Yn,autocorrect:Yn,autocapitalize:Yn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Yn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Yn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Yn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Yn,"aria-hidden":Yn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Yn,"aria-multiselectable":Yn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Yn,"aria-relevant":null,"aria-required":Yn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},_A="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of _A)EA[t]=null;class du{constructor(e,n){this.tags={...kY,...e},this.globalAttrs={...EA,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}du.default=new du;function Oo(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function po(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function jA(t,e,n){let i=n.tags[Oo(t,po(e))];return(i==null?void 0:i.children)||n.allTags}function _1(t,e){let n=[];for(let i=po(e);i&&!i.type.isTop;i=po(i.parent)){let r=Oo(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const MA=/^[:\-\.\w\u00b7-\uffff]*$/;function iT(t,e,n,i,r){let l=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",a=po(n,n.name=="StartTag"||n.name=="TagName");return{from:i,to:r,options:jA(t.doc,a,e).map(c=>({label:c,type:"type"})).concat(_1(t.doc,n).map((c,f)=>({label:"/"+c,apply:"/"+c+l,type:"type",boost:99-f}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function rT(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:_1(t.doc,e).map((l,a)=>({label:l,apply:l+r,type:"type",boost:99-a})),validFor:MA}}function TY(t,e,n,i){let r=[],l=0;for(let a of jA(t.doc,n,e))r.push({label:"<"+a,type:"type"});for(let a of _1(t.doc,n))r.push({label:"</"+a+">",type:"type",boost:99-l++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function $Y(t,e,n,i,r){let l=po(n),a=l?e.tags[Oo(t.doc,l)]:null,c=a&&a.attrs?Object.keys(a.attrs):[],f=a&&a.globalAttrs===!1?c:c.length?c.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:f.map(h=>({label:h,type:"property"})),validFor:MA}}function PY(t,e,n,i,r){var l;let a=(l=n.parent)===null||l===void 0?void 0:l.getChild("AttributeName"),c=[],f;if(a){let h=t.sliceDoc(a.from,a.to),O=e.globalAttrs[h];if(!O){let p=po(n),m=p?e.tags[Oo(t.doc,p)]:null;O=(m==null?void 0:m.attrs)&&m.attrs[h]}if(O){let p=t.sliceDoc(i,r).toLowerCase(),m='"',y='"';/^['"]/.test(p)?(f=p[0]=='"'?/^[^"]*$/:/^[^']*$/,m="",y=t.sliceDoc(r,r+1)==p[0]?"":p[0],p=p.slice(1),i++):f=/^[^\s<>='"]*$/;for(let b of O)c.push({label:b,apply:m+b+y,type:"constant"})}}return{from:i,to:r,options:c,validFor:f}}function XA(t,e){let{state:n,pos:i}=e,r=mt(n).resolveInner(i,-1),l=r.resolve(i);for(let a=i,c;l==r&&(c=r.childBefore(a));){let f=c.lastChild;if(!f||!f.type.isError||f.from<f.to)break;l=r=c,a=f.from}return r.name=="TagName"?r.parent&&/CloseTag$/.test(r.parent.name)?rT(n,r,r.from,i):iT(n,t,r,r.from,i):r.name=="StartTag"||r.name=="IncompleteTag"?iT(n,t,r,i,i):r.name=="StartCloseTag"||r.name=="IncompleteCloseTag"?rT(n,r,i,i):r.name=="OpenTag"||r.name=="SelfClosingTag"||r.name=="AttributeName"?$Y(n,t,r,r.name=="AttributeName"?r.from:i,i):r.name=="Is"||r.name=="AttributeValue"||r.name=="UnquotedAttributeValue"?PY(n,t,r,r.name=="Is"?i:r.from,i):e.explicit&&(l.name=="Element"||l.name=="Text"||l.name=="Document")?TY(n,t,r,i):null}function CY(t){return XA(du.default,t)}function AY(t){let{extraTags:e,extraGlobalAttributes:n}=t,i=n||e?new du(e,n):du.default;return r=>XA(i,r)}const RY=Fi.parser.configure({top:"SingleExpression"}),ZA=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:hA.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:dA.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:OA.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:RY},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Fi.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:Ud.parser}],qA=[{name:"style",parser:Ud.parser.configure({top:"Styles"})}].concat(_A.map(t=>({name:t,parser:Fi.parser}))),DA=js.define({name:"html",parser:wY.configure({props:[Dl.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let i=t.node;;){let r=i.lastChild;if(!r||r.name!="Element"||r.to!=i.to)break;e=i=r}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),Ds.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),cC.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),rd=DA.configure({wrap:zA(ZA,qA)});function LA(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=zA((t.nestedLanguages||[]).concat(ZA),(t.nestedAttributes||[]).concat(qA)));let i=n?DA.configure({wrap:n,dialect:e}):e?rd.configure({dialect:e}):rd;return new Ml(i,[rd.data.of({autocomplete:AY(t)}),t.autoCloseTags!==!1?zY:[],uy().support,vA().support])}const sT=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),zY=ye.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!rd.isActiveAt(t.state,e,-1))return!1;let l=r(),{state:a}=l,c=a.changeByRange(f=>{var h,O,p;let m=a.doc.sliceString(f.from-1,f.to)==i,{head:y}=f,b=mt(a).resolveInner(y,-1),v;if(m&&i==">"&&b.name=="EndTag"){let k=b.parent;if(((O=(h=k.parent)===null||h===void 0?void 0:h.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(v=Oo(a.doc,k.parent,y))&&!sT.has(v)){let Q=y+(a.doc.sliceString(y,y+1)===">"?1:0),P=`</${v}>`;return{range:f,changes:{from:y,to:Q,insert:P}}}}else if(m&&i=="/"&&b.name=="IncompleteCloseTag"){let k=b.parent;if(b.from==y-2&&((p=k.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(v=Oo(a.doc,k,y))&&!sT.has(v)){let Q=y+(a.doc.sliceString(y,y+1)===">"?1:0),P=`${v}>`;return{range:oe.cursor(y+P.length,-1),changes:{from:y,to:Q,insert:P}}}}return{range:f}});return c.changes.empty?!1:(t.dispatch([l,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),EY=qs({String:j.string,Number:j.number,"True False":j.bool,PropertyName:j.propertyName,Null:j.null,", :":j.separator,"[ ]":j.squareBracket,"{ }":j.brace}),_Y=Xs.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[EY],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),jY=js.define({name:"json",parser:_Y.configure({props:[Dl.add({Object:Ua({except:/^\s*\}/}),Array:Ua({except:/^\s*\]/})}),Ds.add({"Object Array":mO})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function MY(){return new Ml(jY)}class Hd{static create(e,n,i,r,l){let a=r+(r<<8)+e+(n<<4)|0;return new Hd(e,n,i,a,l,[],[])}constructor(e,n,i,r,l,a,c){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=l,this.children=a,this.positions=c,this.hashProp=[[_e.contextHash,r]]}addChild(e,n){e.prop(_e.contextHash)!=this.hash&&(e=new st(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new st(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,l,a)=>new st(Vt.none,r,l,a,this.hashProp)})}}var de;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(de||(de={}));class XY{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class ZY{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Bc(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r<e;r++)i+=this.text.charCodeAt(r)==9?4-i%4:1;return i}findColumn(e){let n=0;for(let i=0;n<this.text.length&&i<e;n++)i+=this.text.charCodeAt(n)==9?4-i%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function lT(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==de.OrderedList?X1:M1)(n,e,!1);return i>0&&(t.type!=de.BulletList||j1(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const BA={[de.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(He(de.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Oi(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[de.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[de.OrderedList]:lT,[de.BulletList]:lT,[de.Document](){return!0}};function Oi(t){return t==32||t==9||t==10||t==13}function Bc(t,e=0){for(;e<t.length&&Oi(t.charCodeAt(e));)e++;return e}function aT(t,e,n){for(;e>n&&Oi(t.charCodeAt(e-1));)e--;return e}function NA(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function VA(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function j1(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let i=1;for(let r=t.pos+1;r<t.text.length;r++){let l=t.text.charCodeAt(r);if(l==t.next)i++;else if(!Oi(l))return-1}return n&&t.next==45&&UA(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(FA.SetextHeading)>-1||i<3?-1:1}function YA(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function M1(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Oi(t.text.charCodeAt(t.pos+1)))&&(!n||YA(e,de.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function X1(t,e,n){let i=t.pos,r=t.next;for(;r>=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||i<t.text.length-1&&!Oi(t.text.charCodeAt(i+1))||n&&!YA(e,de.OrderedList)&&(t.skipSpace(i+1)==t.text.length||i>t.pos+1||t.next!=49)?-1:i+1-t.pos}function WA(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function UA(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&Oi(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const dy=/^[ \t]*$/,GA=/-->/,HA=/\?>/,Oy=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,GA],[/^\s*<\?/,HA],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,dy],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,dy]];function IA(t,e,n){if(t.next!=60)return-1;let i=t.text.slice(t.pos);for(let r=0,l=Oy.length-(n?1:0);r<l;r++)if(Oy[r][0].test(i))return r;return-1}function oT(t,e){let n=t.countIndent(e,t.pos,t.indent),i=t.countIndent(t.skipSpace(e),e,n);return i>=n+5?n+1:i}function Ss(t,e,n){let i=t.length-1;i>=0&&t[i].to==e&&t[i].type==de.CodeText?t[i].to=n:t.push(He(de.CodeText,e,n))}const qh={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let i=e.findColumn(n),r=t.lineStart+i,l=t.lineStart+e.text.length,a=[],c=[];for(Ss(a,r,l);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Ss(c,t.lineStart-1,t.lineStart);for(let f of e.markers)c.push(f)}else{if(e.indent<n)break;{if(c.length){for(let h of c)h.type==de.CodeText?Ss(a,h.from,h.to):a.push(h);c=[]}Ss(a,t.lineStart-1,t.lineStart);for(let h of e.markers)a.push(h);l=t.lineStart+e.text.length;let f=t.lineStart+e.findColumn(e.baseIndent+4);f<l&&Ss(a,f,l)}}return c.length&&(c=c.filter(f=>f.type!=de.CodeText),c.length&&(e.markers=c.concat(e.markers))),t.addNode(t.buffer.writeElements(a,-r).finish(de.CodeBlock,l-r),r),!0},FencedCode(t,e){let n=NA(e);if(n<0)return!1;let i=t.lineStart+e.pos,r=e.next,l=n-e.pos,a=e.skipSpace(n),c=aT(e.text,e.text.length,a),f=[He(de.CodeMark,i,i+l)];a<c&&f.push(He(de.CodeInfo,t.lineStart+a,t.lineStart+c));for(let h=!0,O=!0,p=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let m=e.pos;if(e.indent-e.baseIndent<4)for(;m<e.text.length&&e.text.charCodeAt(m)==r;)m++;if(m-e.pos>=l&&e.skipSpace(m)==e.text.length){for(let y of e.markers)f.push(y);O&&p&&Ss(f,t.lineStart-1,t.lineStart),f.push(He(de.CodeMark,t.lineStart+e.pos,t.lineStart+m)),t.nextLine();break}else{p=!0,h||(Ss(f,t.lineStart-1,t.lineStart),O=!1);for(let v of e.markers)f.push(v);let y=t.lineStart+e.basePos,b=t.lineStart+e.text.length;y<b&&(Ss(f,y,b),O=!1)}}return t.addNode(t.buffer.writeElements(f,-i).finish(de.FencedCode,t.prevLineEnd()-i),i),!0},Blockquote(t,e){let n=VA(e);return n<0?!1:(t.startContext(de.Blockquote,e.pos),t.addNode(de.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(j1(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(de.HorizontalRule,n),!0},BulletList(t,e){let n=M1(e,t,!1);if(n<0)return!1;t.block.type!=de.BulletList&&t.startContext(de.BulletList,e.basePos,e.next);let i=oT(e,e.pos+1);return t.startContext(de.ListItem,e.basePos,i-e.baseIndent),t.addNode(de.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(i),null},OrderedList(t,e){let n=X1(e,t,!1);if(n<0)return!1;t.block.type!=de.OrderedList&&t.startContext(de.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let i=oT(e,e.pos+n);return t.startContext(de.ListItem,e.basePos,i-e.baseIndent),t.addNode(de.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(i),null},ATXHeading(t,e){let n=WA(e);if(n<0)return!1;let i=e.pos,r=t.lineStart+i,l=aT(e.text,e.text.length,i),a=l;for(;a>i&&e.text.charCodeAt(a-1)==e.next;)a--;(a==l||a==i||!Oi(e.text.charCodeAt(a-1)))&&(a=e.text.length);let c=t.buffer.write(de.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(i+n+1,a),r+n+1),-r);a<e.text.length&&c.write(de.HeaderMark,a-i,l-i);let f=c.finish(de.ATXHeading1-1+n,e.text.length-i);return t.nextLine(),t.addNode(f,r),!0},HTMLBlock(t,e){let n=IA(e,t,!1);if(n<0)return!1;let i=t.lineStart+e.pos,r=Oy[n][1],l=[],a=r!=dy;for(;!r.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){a=!1;break}for(let h of e.markers)l.push(h)}a&&t.nextLine();let c=r==GA?de.CommentBlock:r==HA?de.ProcessingInstructionBlock:de.HTMLBlock,f=t.prevLineEnd();return t.addNode(t.buffer.writeElements(l,-i).finish(c,f-i),i),!0},SetextHeading:void 0};class qY{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,i){if(this.stage==-1)return!1;let r=i.content+`
|
|
97
|
+
`+n.scrub(),l=this.advance(r);return l>-1&&l<r.length?this.complete(e,i,l):!1}finish(e,n){return(this.stage==2||this.stage==3)&&Bc(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,i){return e.addLeafElement(n,He(de.LinkReference,this.start,this.start+i,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(l5(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(He(de.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(r5(e,Bc(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=Bc(e,this.pos),i=0;if(n>this.pos){let r=s5(e,n,this.start);if(r){let l=Wm(e,r.to-this.start);l>0&&(this.nextStage(r),i=l)}}return i||(i=Wm(e,this.pos)),i>0&&i<e.length?i:-1}else return Wm(e,this.pos)}}}function Wm(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!Oi(n))return-1}return e}class DY{nextLine(e,n,i){let r=n.depth<e.stack.length?-1:UA(n),l=n.next;if(r<0)return!1;let a=He(de.HeaderMark,e.lineStart+n.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(i,He(l==61?de.SetextHeading1:de.SetextHeading2,i.start,e.prevLineEnd(),[...e.parser.parseInline(i.content,i.start),a])),!0}finish(){return!1}}const FA={LinkReference(t,e){return e.content.charCodeAt(0)==91?new qY(e):null},SetextHeading(){return new DY}},LY=[(t,e)=>WA(e)>=0,(t,e)=>NA(e)>=0,(t,e)=>VA(e)>=0,(t,e)=>M1(e,t,!0)>=0,(t,e)=>X1(e,t,!0)>=0,(t,e)=>j1(e,t,!0)>=0,(t,e)=>IA(e,t,!0)>=0],BY={text:"",end:0};class NY{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.line=new ZY,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=Hd.create(de.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=i.length?new WY(i,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let i=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;i<e.markers.length&&(!r||e.markers[i].from<r.end);){let l=e.markers[i++];this.addNode(l.type,l.from,l.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let i of this.parser.blockParsers)if(i){let r=i(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let n=new XY(this.lineStart+e.pos,e.text.slice(e.pos));for(let i of this.parser.leafBlockParsers)if(i){let r=i(this,n);r&&n.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let i of this.parser.endLeafBlock)if(i(this,e,n))break e}for(let i of n.parsers)if(i.nextLine(this,e,n))return null;n.content+=`
|
|
98
|
+
`+e.scrub();for(let i of e.markers)n.marks.push(i)}return this.finishLeaf(n),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=a5(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let n=BY;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let i=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<n.end;){r++;let l=this.ranges[r].from,a=this.lineChunkAt(l);n.end=l+a.length,n.text=n.text.slice(0,this.ranges[r-1].to-i)+a,i=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:i}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=i,e.reset(n);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],l=this.parser.skipContextMarkup[r.type];if(!l)throw new Error("Unhandled block context "+de[r.type]);let a=this.line.markers.length;if(!l(r,this,e)){this.line.markers.length>a&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),i;if(this.input.lineChunks)i=n==`
|
|
99
|
+
`?"":n;else{let r=n.indexOf(`
|
|
100
|
+
`);i=r<0?n:n.slice(0,r)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,i=0){this.block=Hd.create(e,i,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,i=0){this.startContext(this.parser.getNodeType(e),n,i)}addNode(e,n,i){typeof e=="number"&&(e=new st(this.parser.nodeSet.types[e],go,go,(i??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(gy(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?KA(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let n=gy(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(de.Paragraph,e.content.length),e.start)}elt(e,n,i,r){return typeof e=="string"?He(this.parser.getNodeType(e),n,i,r):new t5(e,n)}get buffer(){return new e5(this.parser.nodeSet)}}function KA(t,e,n,i,r){let l=t[e].to,a=[],c=[],f=n.from+i;function h(O,p){for(;p?O>=l:O>l;){let m=t[e+1].from-l;i+=m,O+=m,e++,l=t[e].to}}for(let O=n.firstChild;O;O=O.nextSibling){h(O.from+i,!0);let p=O.from+i,m,y=r.get(O.tree);y?m=y:O.to+i>l?(m=KA(t,e,O,i,r),h(O.to+i,!1)):m=O.toTree(),a.push(m),c.push(p-f)}return h(n.to+i,!1),new st(n.type,a,c,n.to+i-f,n.tree?n.tree.propValues:void 0)}class wO extends o1{constructor(e,n,i,r,l,a,c,f,h){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=l,this.skipContextMarkup=a,this.inlineParsers=c,this.inlineNames=f,this.wrappers=h,this.nodeTypes=Object.create(null);for(let O of e.types)this.nodeTypes[O.name]=O.id}createParse(e,n,i){let r=new NY(this,e,n,i);for(let l of this.wrappers)r=l(r,e,n,i);return r}configure(e){let n=py(e);if(!n)return this;let{nodeSet:i,skipContextMarkup:r}=this,l=this.blockParsers.slice(),a=this.leafBlockParsers.slice(),c=this.blockNames.slice(),f=this.inlineParsers.slice(),h=this.inlineNames.slice(),O=this.endLeafBlock.slice(),p=this.wrappers;if($c(n.defineNodes)){r=Object.assign({},r);let m=i.types.slice(),y;for(let b of n.defineNodes){let{name:v,block:k,composite:Q,style:P}=typeof b=="string"?{name:b}:b;if(m.some(_=>_.name==v))continue;Q&&(r[m.length]=(_,A,E)=>Q(A,E,_.value));let T=m.length,$=Q?["Block","BlockContext"]:k?T>=de.ATXHeading1&&T<=de.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;m.push(Vt.define({id:T,name:v,props:$&&[[_e.group,$]]})),P&&(y||(y={}),Array.isArray(P)||P instanceof Gn?y[v]=P:Object.assign(y,P))}i=new Pu(m),y&&(i=i.extend(qs(y)))}if($c(n.props)&&(i=i.extend(...n.props)),$c(n.remove))for(let m of n.remove){let y=this.blockNames.indexOf(m),b=this.inlineNames.indexOf(m);y>-1&&(l[y]=a[y]=void 0),b>-1&&(f[b]=void 0)}if($c(n.parseBlock))for(let m of n.parseBlock){let y=c.indexOf(m.name);if(y>-1)l[y]=m.parse,a[y]=m.leaf;else{let b=m.before?Dh(c,m.before):m.after?Dh(c,m.after)+1:c.length-1;l.splice(b,0,m.parse),a.splice(b,0,m.leaf),c.splice(b,0,m.name)}m.endLeaf&&O.push(m.endLeaf)}if($c(n.parseInline))for(let m of n.parseInline){let y=h.indexOf(m.name);if(y>-1)f[y]=m.parse;else{let b=m.before?Dh(h,m.before):m.after?Dh(h,m.after)+1:h.length-1;f.splice(b,0,m.parse),h.splice(b,0,m.name)}}return n.wrap&&(p=p.concat(n.wrap)),new wO(i,l,a,c,O,r,f,h,p)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let i=new Z1(this,e,n);e:for(let r=n;r<i.end;){let l=i.char(r);for(let a of this.inlineParsers)if(a){let c=a(i,l,r);if(c>=0){r=c;continue e}}r++}return i.resolveMarkers(0)}}function $c(t){return t!=null&&t.length>0}function py(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=py(t[0]);if(t.length==1)return e;let n=py(t.slice(1));if(!n||!e)return e||n;let i=(a,c)=>(a||go).concat(c||go),r=e.wrap,l=n.wrap;return{props:i(e.props,n.props),defineNodes:i(e.defineNodes,n.defineNodes),parseBlock:i(e.parseBlock,n.parseBlock),parseInline:i(e.parseInline,n.parseInline),remove:i(e.remove,n.remove),wrap:r?l?(a,c,f,h)=>r(l(a,c,f,h),c,f,h):r:l}}function Dh(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let JA=[Vt.none];for(let t=1,e;e=de[t];t++)JA[t]=Vt.define({id:t,name:e,props:t>=de.Escape?[]:[[_e.group,t in BA?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const go=[];class e5{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,i,r=0){return this.content.push(e,n,i,4+r*4),this}writeElements(e,n=0){for(let i of e)i.writeTo(this,n);return this}finish(e,n){return st.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}class Ou{constructor(e,n,i,r=go){this.type=e,this.from=n,this.to=i,this.children=r}writeTo(e,n){let i=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-i)}toTree(e){return new e5(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class t5{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return go}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function He(t,e,n,i){return new Ou(t,e,n,i)}const n5={resolve:"Emphasis",mark:"EmphasisMark"},i5={resolve:"Emphasis",mark:"EmphasisMark"},xl={},Id={};class Un{constructor(e,n,i,r){this.type=e,this.from=n,this.to=i,this.side=r}}const cT="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let pu=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{pu=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const Um={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let i=t.char(n+1);for(let r=0;r<cT.length;r++)if(cT.charCodeAt(r)==i)return t.append(He(de.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let i=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return i?t.append(He(de.Entity,n,n+1+i[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let i=n+1;for(;i<t.end&&t.char(i)==96;)i++;let r=i-n,l=0;for(;i<t.end;i++)if(t.char(i)==96){if(l++,l==r&&t.char(i+1)!=96)return t.append(He(de.InlineCode,n,i+1,[He(de.CodeMark,n,n+r),He(de.CodeMark,i+1-r,i+1)]))}else l=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let i=t.slice(n+1,t.end),r=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(i);if(r)return t.append(He(de.Autolink,n,n+1+r[0].length,[He(de.LinkMark,n,n+1),He(de.URL,n+1,n+r[0].length),He(de.LinkMark,n+r[0].length,n+1+r[0].length)]));let l=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(i);if(l)return t.append(He(de.Comment,n,n+1+l[0].length));let a=/^\?[^]*?\?>/.exec(i);if(a)return t.append(He(de.ProcessingInstruction,n,n+1+a[0].length));let c=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return c?t.append(He(de.HTMLTag,n,n+1+c[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),l=t.slice(i,i+1),a=pu.test(r),c=pu.test(l),f=/\s|^$/.test(r),h=/\s|^$/.test(l),O=!h&&(!c||f||a),p=!f&&(!a||h||c),m=O&&(e==42||!p||a),y=p&&(e==42||!O||c);return t.append(new Un(e==95?n5:i5,n,i,(m?1:0)|(y?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(He(de.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(He(de.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new Un(xl,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Un(Id,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof Un&&(r.type==xl||r.type==Id)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let l=t.takeContent(i),a=t.parts[i]=VY(t,l,r.type==xl?de.Link:de.Image,r.from,n+1);if(r.type==xl)for(let c=0;c<i;c++){let f=t.parts[c];f instanceof Un&&f.type==xl&&(f.side=0)}return a.to}}return-1}};function VY(t,e,n,i,r){let{text:l}=t,a=t.char(r),c=r;if(e.unshift(He(de.LinkMark,i,i+(n==de.Image?2:1))),e.push(He(de.LinkMark,r-1,r)),a==40){let f=t.skipSpace(r+1),h=r5(l,f-t.offset,t.offset),O;h&&(f=t.skipSpace(h.to),f!=h.to&&(O=s5(l,f-t.offset,t.offset),O&&(f=t.skipSpace(O.to)))),t.char(f)==41&&(e.push(He(de.LinkMark,r,r+1)),c=f+1,h&&e.push(h),O&&e.push(O),e.push(He(de.LinkMark,f,c)))}else if(a==91){let f=l5(l,r-t.offset,t.offset,!1);f&&(e.push(f),c=f.to)}return He(n,i,c,e)}function r5(t,e,n){if(t.charCodeAt(e)==60){for(let r=e+1;r<t.length;r++){let l=t.charCodeAt(r);if(l==62)return He(de.URL,e+n,r+1+n);if(l==60||l==10)return!1}return null}else{let r=0,l=e;for(let a=!1;l<t.length;l++){let c=t.charCodeAt(l);if(Oi(c))break;if(a)a=!1;else if(c==40)r++;else if(c==41){if(!r)break;r--}else c==92&&(a=!0)}return l>e?He(de.URL,e+n,l+n):l==t.length?null:!1}}function s5(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let l=e+1,a=!1;l<t.length;l++){let c=t.charCodeAt(l);if(a)a=!1;else{if(c==r)return He(de.LinkTitle,e+n,l+1+n);c==92&&(a=!0)}}return null}function l5(t,e,n,i){for(let r=!1,l=e+1,a=Math.min(t.length,l+999);l<a;l++){let c=t.charCodeAt(l);if(r)r=!1;else{if(c==93)return i?!1:He(de.LinkLabel,e+n,l+1+n);if(i&&!Oi(c)&&(i=!1),c==91)return!1;c==92&&(r=!0)}}return null}class Z1{constructor(e,n,i){this.parser=e,this.text=n,this.offset=i,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,l){return this.append(new Un(e,n,i,(r?1:0)|(l?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Un&&(n.type==xl||n.type==Id))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i<this.parts.length;i++){let r=this.parts[i];if(!(r instanceof Un&&r.type.resolve&&r.side&2))continue;let l=r.type==n5||r.type==i5,a=r.to-r.from,c,f=i-1;for(;f>=e;f--){let v=this.parts[f];if(v instanceof Un&&v.side&1&&v.type==r.type&&!(l&&(r.side&1||v.side&2)&&(v.to-v.from+a)%3==0&&((v.to-v.from)%3||a%3))){c=v;break}}if(!c)continue;let h=r.type.resolve,O=[],p=c.from,m=r.to;if(l){let v=Math.min(2,c.to-c.from,a);p=c.to-v,m=r.from+v,h=v==1?"Emphasis":"StrongEmphasis"}c.type.mark&&O.push(this.elt(c.type.mark,p,c.to));for(let v=f+1;v<i;v++)this.parts[v]instanceof Ou&&O.push(this.parts[v]),this.parts[v]=null;r.type.mark&&O.push(this.elt(r.type.mark,r.from,m));let y=this.elt(h,p,m,O);this.parts[f]=l&&c.from!=p?new Un(c.type,c.from,p,c.side):null,(this.parts[i]=l&&r.to!=m?new Un(r.type,m,r.to,r.side):null)?this.parts.splice(i,0,y):this.parts[i]=y}let n=[];for(let i=e;i<this.parts.length;i++){let r=this.parts[i];r instanceof Ou&&n.push(r)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let i=this.parts[n];if(i instanceof Un&&i.type==e&&i.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof Un?n:null}skipSpace(e){return Bc(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?He(this.parser.getNodeType(e),n,i,r):new t5(e,n)}}Z1.linkStart=xl;Z1.imageStart=Id;function gy(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i<n.length&&n[i].to<r.to;)i++;if(i<n.length&&n[i].from<r.from){let l=n[i];l instanceof Ou&&(n[i]=new Ou(l.type,l.from,l.to,gy(l.children,[r])))}else n.splice(i++,0,r)}return n}const YY=[de.CodeBlock,de.ListItem,de.OrderedList,de.BulletList];class WY{constructor(e,n){this.fragments=e,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,n){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let l=this.fragment.to;for(;l>0&&this.input.read(l-1,l)!=`
|
|
101
|
+
`;)l--;this.fragmentEnd=l?l-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(_e.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),l=e.absoluteLineStart,a=l,c=e.block.children.length,f=a,h=c;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let O=a5(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,O);else{let p=new st(e.parser.nodeSet.types[de.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,n.tree),e.addNode(p,O)}if(n.type.is("Block")&&(YY.indexOf(n.type.id)<0?(a=n.to-i,c=e.block.children.length):(a=f,c=h),f=n.to-i,h=e.block.children.length),!n.nextSibling())break}for(;e.block.children.length>c;)e.block.children.pop(),e.block.positions.pop();return a-l}}function a5(t,e){let n=t;for(let i=1;i<e.length;i++){let r=e[i-1].to,l=e[i].from;r<t&&(n-=l-r)}return n}const UY=qs({"Blockquote/...":j.quote,HorizontalRule:j.contentSeparator,"ATXHeading1/... SetextHeading1/...":j.heading1,"ATXHeading2/... SetextHeading2/...":j.heading2,"ATXHeading3/...":j.heading3,"ATXHeading4/...":j.heading4,"ATXHeading5/...":j.heading5,"ATXHeading6/...":j.heading6,"Comment CommentBlock":j.comment,Escape:j.escape,Entity:j.character,"Emphasis/...":j.emphasis,"StrongEmphasis/...":j.strong,"Link/... Image/...":j.link,"OrderedList/... BulletList/...":j.list,"BlockQuote/...":j.quote,"InlineCode CodeText":j.monospace,"URL Autolink":j.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":j.processingInstruction,"CodeInfo LinkLabel":j.labelName,LinkTitle:j.string,Paragraph:j.content}),GY=new wO(new Pu(JA).extend(UY),Object.keys(qh).map(t=>qh[t]),Object.keys(qh).map(t=>FA[t]),Object.keys(qh),LY,BA,Object.keys(Um).map(t=>Um[t]),Object.keys(Um),[]);function HY(t,e,n){let i=[];for(let r=t.firstChild,l=e;;r=r.nextSibling){let a=r?r.from:n;if(a>l&&i.push({from:l,to:a}),!r)break;l=r.to}return i}function IY(t){let{codeParser:e,htmlParser:n}=t;return{wrap:WP((r,l)=>{let a=r.type.id;if(e&&(a==de.CodeBlock||a==de.FencedCode)){let c="";if(a==de.FencedCode){let h=r.node.getChild(de.CodeInfo);h&&(c=l.read(h.from,h.to))}let f=e(c);if(f)return{parser:f,overlay:h=>h.type.id==de.CodeText,bracketed:a==de.FencedCode}}else if(n&&(a==de.HTMLBlock||a==de.HTMLTag||a==de.CommentBlock))return{parser:n,overlay:HY(r.node,r.from,r.to)};return null})}}const FY={resolve:"Strikethrough",mark:"StrikethroughMark"},KY={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":j.strikethrough}},{name:"StrikethroughMark",style:j.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),l=/\s|^$/.test(i),a=/\s|^$/.test(r),c=pu.test(i),f=pu.test(r);return t.addDelimiter(FY,n,n+2,!a&&(!f||l||c),!l&&(!c||a||f))},after:"Emphasis"}]};function Nc(t,e,n=0,i,r=0){let l=0,a=!0,c=-1,f=-1,h=!1,O=()=>{i.push(t.elt("TableCell",r+c,r+f,t.parser.parseInline(e.slice(c,f),r+c)))};for(let p=n;p<e.length;p++){let m=e.charCodeAt(p);m==124&&!h?((!a||c>-1)&&l++,a=!1,i&&(c>-1&&O(),i.push(t.elt("TableDelimiter",p+r,p+r+1))),c=f=-1):(h||m!=32&&m!=9)&&(c<0&&(c=p),f=p+1),h=!h&&m==92}return c>-1&&(l++,i&&O()),l}function uT(t,e){for(let n=e;n<t.length;n++){let i=t.charCodeAt(n);if(i==124)return!0;i==92&&n++}return!1}const o5=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class fT{constructor(){this.rows=null}nextLine(e,n,i){if(this.rows==null){this.rows=!1;let r;if((n.next==45||n.next==58||n.next==124)&&o5.test(r=n.text.slice(n.pos))){let l=[];Nc(e,i.content,0,l,i.start)==Nc(e,r,n.pos)&&(this.rows=[e.elt("TableHeader",i.start,i.start+i.content.length,l),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let r=[];Nc(e,n.text,n.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,r))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const JY={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":j.heading}},"TableRow",{name:"TableCell",style:j.content},{name:"TableDelimiter",style:j.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return uT(e.content,0)?new fT:null},endLeaf(t,e,n){if(n.parsers.some(r=>r instanceof fT)||!uT(e.text,e.basePos))return!1;let i=t.peekLine();return o5.test(i)&&Nc(t,e.text,e.basePos)==Nc(t,i,e.basePos)},before:"SetextHeading"}]};class e7{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const t7={defineNodes:[{name:"Task",block:!0,style:j.list},{name:"TaskMarker",style:j.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new e7:null},after:"SetextHeading"}]},hT=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,dT=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,n7=/[\w-]+\.[\w-]+($|\/)/,OT=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,pT=/\/[a-zA-Z\d@.]+/gy;function gT(t,e,n,i){let r=0;for(let l=e;l<n;l++)t[l]==i&&r++;return r}function i7(t,e){dT.lastIndex=e;let n=dT.exec(t);if(!n||n7.exec(n[0])[0].indexOf("_")>-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],l;if(/[?!.,:*_~]/.test(r)||r==")"&&gT(t,e,i,")")>gT(t,e,i,"("))i--;else if(r==";"&&(l=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+l.index;else break}return i}function mT(t,e){OT.lastIndex=e;let n=OT.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const r7={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;if(i&&/\w/.test(t.text[i-1]))return-1;hT.lastIndex=i;let r=hT.exec(t.text),l=-1;if(!r)return-1;if(r[1]||r[2]){if(l=i7(t.text,i+r[0].length),l>-1&&t.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,l));l=i+a[0].length}}else r[3]?l=mT(t.text,i):(l=mT(t.text,i+r[0].length),l>-1&&r[0]=="xmpp:"&&(pT.lastIndex=l,r=pT.exec(t.text),r&&(l=r.index+r[0].length)));return l<0?-1:(t.addElement(t.elt("URL",n,l+t.offset)),l+t.offset)}}]},s7=[JY,t7,KY,r7];function c5(t,e,n){return(i,r,l)=>{if(r!=t||i.char(l+1)==t)return-1;let a=[i.elt(n,l,l+1)];for(let c=l+1;c<i.end;c++){let f=i.char(c);if(f==t)return i.addElement(i.elt(e,l,c+1,a.concat(i.elt(n,c,c+1))));if(f==92&&a.push(i.elt("Escape",c,c+++2)),Oi(f))break}return-1}}const l7={defineNodes:[{name:"Superscript",style:j.special(j.content)},{name:"SuperscriptMark",style:j.processingInstruction}],parseInline:[{name:"Superscript",parse:c5(94,"Superscript","SuperscriptMark")}]},a7={defineNodes:[{name:"Subscript",style:j.special(j.content)},{name:"SubscriptMark",style:j.processingInstruction}],parseInline:[{name:"Subscript",parse:c5(126,"Subscript","SubscriptMark")}]},o7={defineNodes:[{name:"Emoji",style:j.character}],parseInline:[{name:"Emoji",parse(t,e,n){let i;return e!=58||!(i=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+i[0].length))}}]},u5=c1({commentTokens:{block:{open:"<!--",close:"-->"}}}),f5=new _e,h5=GY.configure({props:[Ds.add(t=>!t.is("Block")||t.is("Document")||my(t)!=null||c7(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),f5.add(my),Dl.add({Document:()=>null}),Ql.add({Document:u5})]});function my(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function c7(t){return t.name=="OrderedList"||t.name=="BulletList"}function u7(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=my(i.type))!=null&&r<=e)break;n=i}return n.to}const f7=KP.of((t,e,n)=>{for(let i=mt(t).resolveInner(n,-1);i&&!(i.from<e);i=i.parent){let r=i.type.prop(f5);if(r==null)continue;let l=u7(i,r);if(l>n)return{from:n,to:l}}return null});function q1(t){return new ui(u5,t,[],"markdown")}const h7=q1(h5),d7=h5.configure([s7,a7,l7,o7,{props:[Ds.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Fd=q1(d7);function O7(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=zd.matchLanguageName(t,n,!0),i instanceof zd)return i.support?i.support.language.parser:au.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}let Gm=class{constructor(e,n,i,r,l,a,c){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=l,this.type=a,this.item=c}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length<e;)i+=" ";return i}else{for(let r=this.to-this.from-i.length-this.spaceAfter.length;r>0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+O5(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}};function d5(t,e){let n=[],i=[];for(let r=t;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&n.push(r)}for(let r=n.length-1;r>=0;r--){let l=n[r],a,c=e.lineAt(l.from),f=l.from-c.from;if(l.name=="Blockquote"&&(a=/^ *>( ?)/.exec(c.text.slice(f))))i.push(new Gm(l,f,f+a[0].length,"",a[1],">",null));else if(l.name=="ListItem"&&l.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(c.text.slice(f)))){let h=a[3],O=a[0].length;h.length>=4&&(h=h.slice(0,h.length-4),O-=4),i.push(new Gm(l.parent,f,f+O,a[1],h,a[2],l))}else if(l.name=="ListItem"&&l.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(c.text.slice(f)))){let h=a[4],O=a[0].length;h.length>4&&(h=h.slice(0,h.length-4),O-=4);let p=a[2];a[3]&&(p+=a[3].replace(/[xX]/," ")),i.push(new Gm(l.parent,f,f+O,a[1],h,p,l))}}return i}function O5(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Hm(t,e,n,i=0){for(let r=-1,l=t;;){if(l.name=="ListItem"){let c=O5(l,e),f=+c[2];if(r>=0){if(f!=r+1)return;n.push({from:l.from+c[1].length,to:l.from+c[0].length,insert:String(r+2+i)})}r=f}let a=l.nextSibling;if(!a)break;l=a}}function D1(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(Cu)!=" ")return t;let i=_r(t,4,n),r="";for(let l=i;l>0;)l>=4?(r+=" ",l-=4):(r+=" ",l--);return r+t.slice(n)}const p7=(t={})=>({state:e,dispatch:n})=>{let i=mt(e),{doc:r}=e,l=null,a=e.changeByRange(c=>{if(!c.empty||!Fd.isActiveAt(e,c.from,-1)&&!Fd.isActiveAt(e,c.from,1))return l={range:c};let f=c.from,h=r.lineAt(f),O=d5(i.resolveInner(f,-1),r);for(;O.length&&O[O.length-1].from>f-h.from;)O.pop();if(!O.length)return l={range:c};let p=O[O.length-1];if(p.to-p.spaceAfter.length>f-h.from)return l={range:c};let m=f>=p.to-p.spaceAfter.length&&!/\S/.test(h.text.slice(p.to));if(p.item&&m){let Q=p.node.firstChild,P=p.node.getChild("ListItem","ListItem");if(Q.to>=f||P&&P.to<f||h.from>0&&!/[^\s>]/.test(r.lineAt(h.from-1).text)||t.nonTightLists===!1){let T=O.length>1?O[O.length-2]:null,$,_="";T&&T.item?($=h.from+T.from,_=T.marker(r,1)):$=h.from+(T?T.to:0);let A=[{from:$,to:f,insert:_}];return p.node.name=="OrderedList"&&Hm(p.item,r,A,-2),T&&T.node.name=="OrderedList"&&Hm(T.item,r,A),{range:oe.cursor($+_.length),changes:A}}else{let T=xT(O,e,h);return{range:oe.cursor(f+T.length+1),changes:{from:h.from,insert:T+e.lineBreak}}}}if(p.node.name=="Blockquote"&&m&&h.from){let Q=r.lineAt(h.from-1),P=/>\s*$/.exec(Q.text);if(P&&P.index==p.from){let T=e.changes([{from:Q.from+P.index,to:Q.to},{from:h.from+p.from,to:h.to}]);return{range:c.map(T),changes:T}}}let y=[];p.node.name=="OrderedList"&&Hm(p.item,r,y);let b=p.item&&p.item.from<h.from,v="";if(!b||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=p.to)for(let Q=0,P=O.length-1;Q<=P;Q++)v+=Q==P&&!b?O[Q].marker(r,1):O[Q].blank(Q<P?_r(h.text,4,O[Q+1].from)-v.length:null);let k=f;for(;k>h.from&&/\s/.test(h.text.charAt(k-h.from-1));)k--;return v=D1(v,e),m7(p.node,e.doc)&&(v=xT(O,e,h)+e.lineBreak+v),y.push({from:k,to:f,insert:e.lineBreak+v}),{range:oe.cursor(k+v.length+1),changes:y}});return l?!1:(n(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)},g7=p7();function yT(t){return t.name=="QuoteMark"||t.name=="ListMark"}function m7(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),l=e.lineAt(i.from),a=/^[\s>]*$/.test(r.text);return r.number+(a?0:1)<l.number}function xT(t,e,n){let i="";for(let r=0,l=t.length-2;r<=l;r++)i+=t[r].blank(r<l?_r(n.text,4,t[r+1].from)-i.length:null,r<l);return D1(i,e)}function y7(t,e){let n=t.resolveInner(e,-1),i=e;yT(n)&&(i=n.from,n=n.parent);for(let r;r=n.childBefore(i);)if(yT(r))i=r.from;else if(r.name=="OrderedList"||r.name=="BulletList")n=r.lastChild,i=n.to;else break;return n}const x7=({state:t,dispatch:e})=>{let n=mt(t),i=null,r=t.changeByRange(l=>{let a=l.from,{doc:c}=t;if(l.empty&&Fd.isActiveAt(t,l.from)){let f=c.lineAt(a),h=d5(y7(n,a),c);if(h.length){let O=h[h.length-1],p=O.to-O.spaceAfter.length+(O.spaceAfter?1:0);if(a-f.from>p&&!/\S/.test(f.text.slice(p,a-f.from)))return{range:oe.cursor(f.from+p),changes:{from:f.from+p,to:a}};if(a-f.from==p&&(!O.item||f.from<=O.item.from||!/\S/.test(f.text.slice(0,O.to)))){let m=f.from+O.from;if(O.item&&O.node.from<O.item.from&&/\S/.test(f.text.slice(O.from,O.to))){let y=O.blank(_r(f.text,4,O.to)-_r(f.text,4,O.from));return m==f.from&&(y=D1(y,t)),{range:oe.cursor(m+y.length),changes:{from:m,to:f.from+O.to,insert:y}}}if(m<a)return{range:oe.cursor(m),changes:{from:m,to:a}}}}}return i={range:l}});return i?!1:(e(t.update(r,{scrollIntoView:!0,userEvent:"delete"})),!0)},S7=[{key:"Enter",run:g7},{key:"Backspace",run:x7}],p5=LA({matchClosingTags:!1});function b7(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:r}=h7,completeHTMLTags:l=!0,pasteURLAsLink:a=!0,htmlTagLanguage:c=p5}=t;if(!(r instanceof wO))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let f=t.extensions?[t.extensions]:[],h=[c.support,f7],O;a&&h.push(k7),n instanceof Ml?(h.push(n.support),O=n.language):n&&(O=n);let p=e||O?O7(e,O):void 0;f.push(IY({codeParser:p,htmlParser:c.language.parser})),i&&h.push(Zr.high(co.of(S7)));let m=q1(r.configure(f));return l&&h.push(m.data.of({autocomplete:v7})),new Ml(m,h)}function v7(t){let{state:e,pos:n}=t,i=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!i)return null;let r=mt(e).resolveInner(n,-1);for(;r&&!r.type.isTop;){if(r.name=="CodeBlock"||r.name=="FencedCode"||r.name=="ProcessingInstructionBlock"||r.name=="CommentBlock"||r.name=="Link"||r.name=="Image")return null;r=r.parent}return{from:n-i[0].length,to:n,options:Q7(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Im=null;function Q7(){if(Im)return Im;let t=CY(new S1(Ke.create({extensions:p5}),0,!0));return Im=t?t.options:[]}const w7=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,k7=ye.domEventHandlers({paste:(t,e)=>{var n;let{main:i}=e.state.selection;if(i.empty)return!1;let r=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!Fd.isActiveAt(e.state,i.from,1)))return!1;let l=mt(e.state),a=!1;return l.iterate({from:i.from,to:i.to,enter:c=>{(c.from>i.from||w7.test(c.name))&&(a=!0)},leave:c=>{c.to<i.to&&(a=!0)}}),a?!1:(e.dispatch({changes:[{from:i.from,insert:"["},{from:i.to,insert:`](${r})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),T7=1,g5=194,m5=195,$7=196,ST=197,P7=198,C7=199,A7=200,R7=2,y5=3,bT=201,z7=24,E7=25,_7=49,j7=50,M7=55,X7=56,Z7=57,q7=59,D7=60,L7=61,B7=62,N7=63,V7=65,Y7=238,W7=71,U7=241,G7=242,H7=243,I7=244,F7=245,K7=246,J7=247,eW=248,x5=72,tW=249,nW=250,iW=251,rW=252,sW=253,lW=254,aW=255,oW=256,cW=73,uW=77,fW=263,hW=112,dW=130,OW=151,pW=152,gW=155,Zl=10,gu=13,L1=32,kO=9,B1=35,mW=40,yW=46,yy=123,vT=125,S5=39,b5=34,QT=92,xW=111,SW=120,bW=78,vW=117,QW=85,wW=new Set([E7,_7,j7,fW,V7,dW,X7,Z7,Y7,B7,N7,x5,cW,uW,D7,L7,OW,pW,gW,hW]);function Fm(t){return t==Zl||t==gu}function Km(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}const kW=new ln((t,e)=>{let n;if(t.next<0)t.acceptToken(C7);else if(e.context.flags&sd)Fm(t.next)&&t.acceptToken(P7,1);else if(((n=t.peek(-1))<0||Fm(n))&&e.canShift(ST)){let i=0;for(;t.next==L1||t.next==kO;)t.advance(),i++;(t.next==Zl||t.next==gu||t.next==B1)&&t.acceptToken(ST,-i)}else Fm(t.next)&&t.acceptToken($7,1)},{contextual:!0}),TW=new ln((t,e)=>{let n=e.context;if(n.flags)return;let i=t.peek(-1);if(i==Zl||i==gu){let r=0,l=0;for(;;){if(t.next==L1)r++;else if(t.next==kO)r+=8-r%8;else break;t.advance(),l++}r!=n.indent&&t.next!=Zl&&t.next!=gu&&t.next!=B1&&(r<n.indent?t.acceptToken(m5,-l):t.acceptToken(g5))}}),sd=1,v5=2,wr=4,kr=8,Tr=16,$r=32;function ld(t,e,n){this.parent=t,this.indent=e,this.flags=n,this.hash=(t?t.hash+t.hash<<8:0)+e+(e<<4)+n+(n<<6)}const $W=new ld(null,0,0);function PW(t){let e=0;for(let n=0;n<t.length;n++)e+=t.charCodeAt(n)==kO?8-e%8:1;return e}const wT=new Map([[U7,0],[G7,wr],[H7,kr],[I7,kr|wr],[F7,Tr],[K7,Tr|wr],[J7,Tr|kr],[eW,Tr|kr|wr],[tW,$r],[nW,$r|wr],[iW,$r|kr],[rW,$r|kr|wr],[sW,$r|Tr],[lW,$r|Tr|wr],[aW,$r|Tr|kr],[oW,$r|Tr|kr|wr]].map(([t,e])=>[t,e|v5])),CW=new C1({start:$W,reduce(t,e,n,i){return t.flags&sd&&wW.has(e)||(e==W7||e==x5)&&t.flags&v5?t.parent:t},shift(t,e,n,i){return e==g5?new ld(t,PW(i.read(i.pos,n.pos)),0):e==m5?t.parent:e==z7||e==M7||e==q7||e==y5?new ld(t,0,sd):wT.has(e)?new ld(t,0,wT.get(e)|t.flags&sd):t},hash(t){return t.hash}}),AW=new ln(t=>{for(let e=0;e<5;e++){if(t.next!="print".charCodeAt(e))return;t.advance()}if(!/\w/.test(String.fromCharCode(t.next)))for(let e=0;;e++){let n=t.peek(e);if(!(n==L1||n==kO)){n!=mW&&n!=yW&&n!=Zl&&n!=gu&&n!=B1&&t.acceptToken(T7);return}}}),RW=new ln((t,e)=>{let{flags:n}=e.context,i=n&wr?b5:S5,r=(n&kr)>0,l=!(n&Tr),a=(n&$r)>0,c=t.pos;for(;!(t.next<0);)if(a&&t.next==yy)if(t.peek(1)==yy)t.advance(2);else{if(t.pos==c){t.acceptToken(y5,1);return}break}else if(l&&t.next==QT){if(t.pos==c){t.advance();let f=t.next;f>=0&&(t.advance(),zW(t,f)),t.acceptToken(R7);return}break}else if(t.next==QT&&!l&&t.peek(1)>-1)t.advance(2);else if(t.next==i&&(!r||t.peek(1)==i&&t.peek(2)==i)){if(t.pos==c){t.acceptToken(bT,r?3:1);return}break}else if(t.next==Zl){if(r)t.advance();else if(t.pos==c){t.acceptToken(bT);return}break}else t.advance();t.pos>c&&t.acceptToken(A7)});function zW(t,e){if(e==xW)for(let n=0;n<2&&t.next>=48&&t.next<=55;n++)t.advance();else if(e==SW)for(let n=0;n<2&&Km(t.next);n++)t.advance();else if(e==vW)for(let n=0;n<4&&Km(t.next);n++)t.advance();else if(e==QW)for(let n=0;n<8&&Km(t.next);n++)t.advance();else if(e==bW&&t.next==yy){for(t.advance();t.next>=0&&t.next!=vT&&t.next!=S5&&t.next!=b5&&t.next!=Zl;)t.advance();t.next==vT&&t.advance()}}const EW=qs({'async "*" "**" FormatConversion FormatSpec':j.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":j.controlKeyword,"in not and or is del":j.operatorKeyword,"from def class global nonlocal lambda":j.definitionKeyword,import:j.moduleKeyword,"with as print":j.keyword,Boolean:j.bool,None:j.null,VariableName:j.variableName,"CallExpression/VariableName":j.function(j.variableName),"FunctionDefinition/VariableName":j.function(j.definition(j.variableName)),"ClassDefinition/VariableName":j.definition(j.className),PropertyName:j.propertyName,"CallExpression/MemberExpression/PropertyName":j.function(j.propertyName),Comment:j.lineComment,Number:j.number,String:j.string,FormatString:j.special(j.string),Escape:j.escape,UpdateOp:j.updateOperator,"ArithOp!":j.arithmeticOperator,BitOp:j.bitwiseOperator,CompareOp:j.compareOperator,AssignOp:j.definitionOperator,Ellipsis:j.punctuation,At:j.meta,"( )":j.paren,"[ ]":j.squareBracket,"{ }":j.brace,".":j.derefOperator,", ;":j.separator}),_W={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},jW=Xs.deserialize({version:14,states:"##jO`QeOO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d.t",nodeNames:"⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:277,context:CW,nodeProps:[["isolate",-5,4,71,72,73,77,""],["group",-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,"Statement Statement",-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,"Expression",-10,114,116,119,121,122,126,128,133,135,138,"Statement",-9,143,144,147,148,150,151,152,153,154,"Pattern"],["openedBy",23,"(",54,"[",58,"{"],["closedBy",24,")",55,"]",59,"}"]],propSources:[EW],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu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i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[AW,TW,kW,RW,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:t=>_W[t]||-1}],tokenPrec:7668}),kT=new a1,Q5=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function Lh(t){return(e,n,i)=>{if(i)return!1;let r=e.node.getChild("VariableName");return r&&n(r,t),!0}}const MW={FunctionDefinition:Lh("function"),ClassDefinition:Lh("class"),ForStatement(t,e,n){if(n){for(let i=t.node.firstChild;i;i=i.nextSibling)if(i.name=="VariableName")e(i,"variable");else if(i.name=="in")break}},ImportStatement(t,e){var n,i;let{node:r}=t,l=((n=r.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let a=r.getChild("import");a;a=a.nextSibling)a.name=="VariableName"&&((i=a.nextSibling)===null||i===void 0?void 0:i.name)!="as"&&e(a,l?"variable":"namespace")},AssignStatement(t,e){for(let n=t.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")e(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(t,e){for(let n=null,i=t.node.firstChild;i;i=i.nextSibling)i.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&e(i,"variable"),n=i},CapturePattern:Lh("variable"),AsPattern:Lh("variable"),__proto__:null};function w5(t,e){let n=kT.get(e);if(n)return n;let i=[],r=!0;function l(a,c){let f=t.sliceString(a.from,a.to);i.push({label:f,type:c})}return e.cursor(rt.IncludeAnonymous).iterate(a=>{if(a.name){let c=MW[a.name];if(c&&c(a,l,r)||!r&&Q5.has(a.name))return!1;r=!1}else if(a.to-a.from>8192){for(let c of w5(t,a.node))i.push(c);return!1}}),kT.set(e,i),i}const TT=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,k5=["String","FormatString","Comment","PropertyName"];function XW(t){let e=mt(t.state).resolveInner(t.pos,-1);if(k5.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&TT.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)Q5.has(r.name)&&(i=i.concat(w5(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:TT}}const ZW=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(t=>({label:t,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(t=>({label:t,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(t=>({label:t,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(t=>({label:t,type:"function"}))),qW=[wt("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),wt("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),wt("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),wt("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),wt(`if \${}:
|
|
102
|
+
|
|
103
|
+
`,{label:"if",detail:"block",type:"keyword"}),wt("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),wt("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),wt("import ${module}",{label:"import",detail:"statement",type:"keyword"}),wt("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],DW=KC(k5,b1(ZW.concat(qW)));function Jm(t){let{node:e,pos:n}=t,i=t.lineIndent(n,-1),r=null;for(;;){let l=e.childBefore(n);if(l)if(l.name=="Comment")n=l.from;else if(l.name=="Body"||l.name=="MatchBody")t.baseIndentFor(l)+t.unit<=i&&(r=l),e=l;else if(l.name=="MatchClause")e=l;else if(l.type.is("Statement"))e=l;else break;else break}return r}function e0(t,e){let n=t.baseIndentFor(e),i=t.lineAt(t.pos,-1),r=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&t.node.to<r+100&&!/\S/.test(t.state.sliceDoc(r,t.node.to))&&t.lineIndent(t.pos,-1)<=n||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(t.textAfter)&&t.lineIndent(t.pos,-1)>n?null:n+t.unit}const t0=js.define({name:"python",parser:jW.configure({props:[Dl.add({Body:t=>{var e;let n=/^\s*(#|$)/.test(t.textAfter)&&Jm(t)||t.node;return(e=e0(t,n))!==null&&e!==void 0?e:t.continue()},MatchBody:t=>{var e;let n=Jm(t);return(e=e0(t,n||t.node))!==null&&e!==void 0?e:t.continue()},IfStatement:t=>/^\s*(else:|elif )/.test(t.textAfter)?t.baseIndent:t.continue(),"ForStatement WhileStatement":t=>/^\s*else:/.test(t.textAfter)?t.baseIndent:t.continue(),TryStatement:t=>/^\s*(except[ :]|finally:|else:)/.test(t.textAfter)?t.baseIndent:t.continue(),MatchStatement:t=>/^\s*case /.test(t.textAfter)?t.baseIndent+t.unit:t.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":ed({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":ed({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":ed({closing:"]"}),MemberExpression:t=>t.baseIndent+t.unit,"String FormatString":()=>null,Script:t=>{var e;let n=Jm(t);return(e=n&&e0(t,n))!==null&&e!==void 0?e:t.continue()}}),Ds.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":mO,Body:(t,e)=>({from:t.from+1,to:t.to-(t.to==e.doc.length?0:1)}),"String FormatString":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function LW(){return new Ml(t0,[t0.data.of({autocomplete:XW}),t0.data.of({autocomplete:DW})])}const BW={javascript:()=>uy({jsx:!0,typescript:!1}),typescript:()=>uy({jsx:!0,typescript:!0}),css:()=>vA(),html:()=>LA(),json:()=>MY(),markdown:()=>b7(),python:()=>LW()},NW=ye.theme({"&":{background:"#24282f",fontSize:"12px",fontFamily:"'JetBrains Mono', 'SF Mono', 'Fira Code', monospace"},".cm-content":{caretColor:"#33afbc"},".cm-cursor":{borderLeftColor:"#33afbc"},".cm-gutters":{background:"#24282f",borderRight:"1px solid #4b5263",color:"#5c6370"},".cm-activeLineGutter":{background:"#2c313a"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground":{background:"rgba(51, 175, 188, 0.2) !important"},".cm-activeLine":{background:"rgba(44, 49, 58, 0.5)"}},{dark:!0});function VW({content:t,language:e,onContentChange:n,onSave:i}){const r=D.useRef(null),l=D.useRef(null),a=D.useRef(new wu),c=D.useRef(n),f=D.useRef(i);c.current=n,f.current=i;const h=D.useCallback(O=>{const p=BW[O];return p?p():[]},[]);return D.useEffect(()=>{if(!r.current)return;const O=co.of([{key:"Mod-s",run:()=>{var b;return(b=f.current)==null||b.call(f),!0}}]),p=ye.updateListener.of(b=>{var v;b.docChanged&&((v=c.current)==null||v.call(c,b.state.doc.toString()))}),m=Ke.create({doc:t||"",extensions:[yL(),eL(),bL(),ID(),wB(),eB(),hB(),qB(),eV(),UN(),a.current.of(h(e)),co.of([...LN,...GB,...O6,...oB,...rA,BN]),O,hV,NW,p,ye.lineWrapping]}),y=new ye({state:m,parent:r.current});return l.current=y,()=>{y.destroy(),l.current=null}},[]),D.useEffect(()=>{const O=l.current;if(!O)return;const p=O.state.doc.toString();t!==p&&O.dispatch({changes:{from:0,to:O.state.doc.length,insert:t||""}})},[t]),D.useEffect(()=>{const O=l.current;O&&O.dispatch({effects:a.current.reconfigure(h(e))})},[e,h]),S.jsx("div",{ref:r,style:YW.container})}const YW={container:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"}};function WW(){const t=Qe(p=>p.editorActiveFile),e=Qe(p=>p.editorFiles),n=Qe(p=>p.editorChangedFiles),i=Qe(p=>p.updateFileContent),r=Qe(p=>p.saveFile),l=Qe(p=>p.reloadFile),a=Qe(p=>p.dismissFileChange),c=t?e[t]:null,f=t&&n[t],h=D.useCallback(p=>{t&&i(t,p)},[t,i]),O=D.useCallback(()=>{t&&r(t)},[t,r]);return S.jsxs("div",{style:ai.container,children:[S.jsx(X4,{}),S.jsxs("div",{style:ai.contentRow,children:[S.jsx("div",{style:ai.sidebar,children:S.jsx(M4,{})}),S.jsxs("div",{style:ai.editorArea,children:[f&&S.jsxs("div",{style:ai.changeBanner,children:[S.jsx("span",{style:ai.bannerText,children:"File modified externally"}),S.jsx("button",{onClick:()=>l(t),style:ai.bannerBtn,children:"Reload"}),S.jsx("button",{onClick:()=>a(t),style:ai.bannerDismiss,children:"Dismiss"})]}),c?S.jsx(VW,{content:c.content,language:c.language,onContentChange:h,onSave:O},t):S.jsxs("div",{style:ai.emptyState,children:[S.jsx("div",{style:ai.emptyIcon,children:"←"}),S.jsx("div",{style:ai.emptyText,children:"Select a file from the tree"}),S.jsx("div",{style:ai.emptyHint,children:"Cmd+S to save, changes detected live"})]})]})]})]})}const ai={container:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},contentRow:{flex:1,display:"flex",overflow:"hidden"},sidebar:{width:240,flexShrink:0,borderRight:"1px solid var(--border)",overflow:"hidden"},editorArea:{flex:1,display:"flex",flexDirection:"column",position:"relative",overflow:"hidden",background:"var(--bg-base)"},changeBanner:{position:"absolute",top:0,left:0,right:0,zIndex:10,display:"flex",alignItems:"center",gap:8,padding:"6px 12px",background:"rgba(229, 192, 123, 0.15)",borderBottom:"1px solid var(--amber)"},bannerText:{fontSize:11,color:"var(--amber)",fontWeight:500,fontFamily:"var(--font)",flex:1},bannerBtn:{padding:"3px 10px",background:"var(--amber)",border:"none",borderRadius:2,color:"var(--bg-base)",fontSize:10,fontWeight:700,fontFamily:"var(--font)",cursor:"pointer"},bannerDismiss:{padding:"3px 10px",background:"transparent",border:"1px solid var(--amber)",borderRadius:2,color:"var(--amber)",fontSize:10,fontWeight:500,fontFamily:"var(--font)",cursor:"pointer"},emptyState:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:8},emptyIcon:{fontSize:28,color:"var(--text-muted)",opacity:.5},emptyText:{fontSize:13,color:"var(--text-dim)",fontWeight:500},emptyHint:{fontSize:10,color:"var(--text-muted)"}},UW=[{id:"agents",label:"Agents"},{id:"editor",label:"Editor"},{id:"skills",label:"Skills"},{id:"stats",label:"Stats"},{id:"teams",label:"Teams"},{id:"approvals",label:"Approvals"}];function GW(){const t=Qe(y=>y.agents),e=Qe(y=>y.connected),n=Qe(y=>y.activeTab),i=Qe(y=>y.detailPanel),r=Qe(y=>y.statusMessage),l=Qe(y=>y.daemonHost),a=Qe(y=>y.tunneled),c=Qe(y=>y.connect),f=Qe(y=>y.setActiveTab),h=Qe(y=>y.openDetail),O=Qe(y=>y.closeDetail);D.useEffect(()=>{c()},[c]);const p=t.filter(y=>y.status==="running").length,m=t.length>0;return S.jsxs("div",{style:yn.root,children:[S.jsxs("header",{style:yn.header,children:[S.jsxs("div",{style:yn.headerLeft,children:[S.jsx("img",{src:"/groove-logo-short.png",alt:"GROOVE",style:{height:18,marginTop:3,opacity:.85}}),l&&S.jsx("span",{style:yn.hostBadge,children:l})]}),S.jsx("div",{style:yn.headerCenter,children:e&&UW.map(y=>S.jsx("button",{onClick:()=>f(y.id),style:{...yn.tabBtn,color:n===y.id?"var(--text-bright)":"var(--text-primary)",borderBottom:n===y.id?"2px solid var(--accent)":"2px solid transparent",background:n===y.id?"var(--bg-active)":"transparent"},children:y.label},y.id))}),S.jsxs("div",{style:yn.headerRight,children:[r&&S.jsx("span",{style:yn.statusText,children:r}),S.jsx("span",{style:yn.agentCount,children:p>0?`${p} running`:t.length>0?`${t.length} agent${t.length!==1?"s":""}`:""}),e&&S.jsxs(S.Fragment,{children:[S.jsx("button",{onClick:()=>(i==null?void 0:i.type)==="journalist"?O():h({type:"journalist"}),style:{...yn.tabBtn,color:(i==null?void 0:i.type)==="journalist"?"var(--text-bright)":"var(--text-primary)",borderBottom:(i==null?void 0:i.type)==="journalist"?"2px solid var(--purple)":"2px solid transparent"},children:"Journalist"}),S.jsx("button",{onClick:()=>h({type:"spawn"}),style:yn.spawnBtn,children:"+ Spawn"})]})]})]}),S.jsxs("div",{style:{position:"fixed",bottom:10,left:12,zIndex:50,display:"flex",alignItems:"center",gap:5},children:[S.jsx("div",{style:{width:5,height:5,borderRadius:"50%",background:e?"var(--green)":"var(--red)",animation:"pulse 2s infinite"}}),S.jsx("span",{style:{fontSize:9,fontWeight:600,letterSpacing:.8,color:e?"var(--green)":"var(--red)",textTransform:"uppercase",fontFamily:"var(--font)",animation:"pulse 3s infinite"},children:e?a?"tunneled":l?"remote":"connected":"offline"}),e&&a&&S.jsx("span",{title:"Connected via SSH tunnel. Run 'groove disconnect' in your terminal to close.",style:{fontSize:9,color:"var(--text-dim)",fontFamily:"var(--font)",cursor:"help",marginLeft:2},children:"(via ssh)"})]}),S.jsxs("div",{style:yn.mainRow,children:[S.jsxs("main",{style:yn.content,children:[n==="agents"&&(m?S.jsx(K3,{}):S.jsx(h4,{})),n==="editor"&&S.jsx(WW,{}),n==="skills"&&S.jsx(_4,{}),n==="stats"&&S.jsx(b4,{}),n==="teams"&&S.jsx(m4,{}),n==="approvals"&&S.jsx(T4,{})]}),i&&S.jsxs("aside",{style:{...yn.detailPanel,width:i.type==="agent"?"45%":320},children:[S.jsx("button",{onClick:O,style:yn.closeBtn,children:"x"}),i.type==="agent"&&S.jsx(f4,{}),i.type==="spawn"&&S.jsx(p4,{}),i.type==="journalist"&&S.jsx(g4,{})]})]})]})}const yn={root:{width:"100%",height:"100%",display:"flex",flexDirection:"column",background:"var(--bg-base)",color:"var(--text-primary)"},header:{height:40,padding:"0 16px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",background:"var(--bg-chrome)",flexShrink:0,position:"relative"},headerLeft:{display:"flex",alignItems:"center",gap:8},hostBadge:{fontSize:9,fontWeight:600,letterSpacing:.5,color:"var(--text-dim)",background:"var(--bg-active)",padding:"2px 6px",borderRadius:3,border:"1px solid var(--border)",fontFamily:"var(--font)"},headerCenter:{display:"flex",alignItems:"center",gap:0},headerRight:{display:"flex",alignItems:"center",gap:10},tabBtn:{padding:"10px 14px",background:"transparent",border:"none",borderBottom:"2px solid transparent",fontSize:12,fontWeight:500,fontFamily:"var(--font)",cursor:"pointer",transition:"color 0.1s"},spawnBtn:{padding:"4px 12px",background:"transparent",border:"1px solid var(--accent)",borderRadius:2,color:"var(--accent)",fontSize:12,fontWeight:600,fontFamily:"var(--font)",cursor:"pointer"},agentCount:{fontSize:11,color:"var(--text-dim)"},statusText:{fontSize:11,color:"var(--text-dim)",fontStyle:"italic"},mainRow:{flex:1,display:"flex",overflow:"hidden"},content:{flex:1,overflow:"hidden",position:"relative"},detailPanel:{width:320,flexShrink:0,background:"var(--bg-chrome)",borderLeft:"1px solid var(--border)",padding:16,overflowY:"auto",position:"relative"},closeBtn:{position:"absolute",top:8,right:10,background:"none",border:"none",color:"var(--text-dim)",fontSize:14,cursor:"pointer",fontFamily:"var(--font)",padding:"2px 6px"}};qz.createRoot(document.getElementById("root")).render(S.jsx(GW,{}));
|