@surething/cockpit 1.0.205 → 1.0.206
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/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +25 -25
- package/.next-prod/build-manifest.json +3 -3
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/react-loadable-manifest.json +3 -3
- package/.next-prod/required-server-files.js +12 -0
- package/.next-prod/required-server-files.json +12 -0
- package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page.js +2 -2
- package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- package/.next-prod/server/app/_not-found.rsc +4 -3
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +4 -3
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +4 -3
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +3 -2
- package/.next-prod/server/app/api/bash/route.js +1 -1
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +3 -3
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js +6 -6
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +3 -3
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +7 -7
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route.js +3 -3
- package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/columns/route.js +4 -4
- package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/connect/route.js +1 -1
- package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/export/route.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/query/route.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js +2 -2
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/diff/route.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/discard/route.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/stage/route.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/status/route.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/global-state/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js +4 -4
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
- package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-state/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/command/route.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/get/route.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/set/route.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/identify/route.js +1 -1
- package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/order/route.js +1 -1
- package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/route.js +1 -1
- package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/users/route.js +1 -1
- package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/content/route.js +1 -1
- package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/route.js +1 -1
- package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/version/route.js +1 -1
- package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next-prod/server/app/page.js +2 -99
- package/.next-prod/server/app/page.js.nft.json +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +2 -30
- package/.next-prod/server/app/project/page.js.nft.json +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js +2 -2
- package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +25 -25
- package/.next-prod/server/chunks/240.js +1 -0
- package/.next-prod/server/chunks/{4098.js → 5466.js} +1 -1
- package/.next-prod/server/chunks/554.js +101 -0
- package/.next-prod/server/chunks/{4272.js → 6007.js} +2 -2
- package/.next-prod/server/chunks/7264.js +5 -0
- package/.next-prod/server/chunks/8750.js +1 -0
- package/.next-prod/server/chunks/{4490.js → 8764.js} +1 -1
- package/.next-prod/server/chunks/900.js +1 -0
- package/.next-prod/server/chunks/9255.js +1 -0
- package/.next-prod/server/chunks/9658.js +59 -0
- package/.next-prod/server/chunks/987.js +139 -0
- package/.next-prod/server/functions-config-manifest.json +1 -26
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/middleware-react-loadable-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/{700.8d53bb1a328c3f97.js → 1959.b9473117faf354bf.js} +1 -1
- package/.next-prod/static/chunks/5204-c8293184aa55cdd5.js +23 -0
- package/.next-prod/static/chunks/5660-9ffe0abe675caac1.js +29 -0
- package/.next-prod/static/chunks/6028-1d6ced1439a3f01f.js +1 -0
- package/.next-prod/static/chunks/6345-6b34b0528ff833a1.js +14 -0
- package/.next-prod/static/chunks/app/layout-421143dba2c69478.js +1 -0
- package/.next-prod/static/chunks/app/page-db32ebfdf1ac9174.js +1 -0
- package/.next-prod/static/chunks/app/project/page-db32ebfdf1ac9174.js +1 -0
- package/.next-prod/static/chunks/app/review/[id]/page-05cd4cb51babd64c.js +1 -0
- package/.next-prod/static/chunks/webpack-bb0c02e3a9602d78.js +1 -0
- package/.next-prod/static/css/a7974d62fe853925.css +1 -0
- package/.next-prod/trace +12 -12
- package/.next-prod/trace-build +1 -1
- package/dist/{chunk-5NL2LMKP.mjs → chunk-HIRLDMCH.mjs} +24 -140
- package/dist/chunk-RSHKDWJM.mjs +136 -0
- package/dist/chunk-VCZEGP64.mjs +984 -0
- package/dist/scheduledTasks.mjs +6 -4
- package/dist/server-K6XWP7DX.mjs +69 -0
- package/dist/wsServer.mjs +60 -482
- package/next.config.mjs +15 -0
- package/package.json +15 -17
- package/server.mjs +1 -1
- package/.next-prod/server/chunks/2338.js +0 -1
- package/.next-prod/server/chunks/3353.js +0 -1
- package/.next-prod/server/chunks/3863.js +0 -1
- package/.next-prod/server/chunks/4732.js +0 -1
- package/.next-prod/server/chunks/4793.js +0 -1
- package/.next-prod/server/chunks/5147.js +0 -1
- package/.next-prod/server/chunks/5394.js +0 -1
- package/.next-prod/server/chunks/6043.js +0 -4
- package/.next-prod/server/chunks/7051.js +0 -1
- package/.next-prod/server/chunks/7514.js +0 -31
- package/.next-prod/server/chunks/8491.js +0 -5
- package/.next-prod/server/chunks/9298.js +0 -139
- package/.next-prod/static/chunks/1705-906aa28943dbc391.js +0 -4
- package/.next-prod/static/chunks/3530-42727255f967251e.js +0 -14
- package/.next-prod/static/chunks/3579-51f0ad7204c67e22.js +0 -1
- package/.next-prod/static/chunks/3643-fe2ac2f1accd0649.js +0 -1
- package/.next-prod/static/chunks/3743-1f5d8cfd9d92ad97.js +0 -4
- package/.next-prod/static/chunks/4186-2bbbcdf03b3c15f5.js +0 -17
- package/.next-prod/static/chunks/9062-8d92cbc176f388a0.js +0 -1
- package/.next-prod/static/chunks/9114-0d2717c9c2752d0f.js +0 -1
- package/.next-prod/static/chunks/app/layout-e091cf70aaec617b.js +0 -1
- package/.next-prod/static/chunks/app/page-c9a30c88afc0a0c5.js +0 -1
- package/.next-prod/static/chunks/app/project/page-bd8c46d229676a01.js +0 -29
- package/.next-prod/static/chunks/app/review/[id]/page-f8bb4748e9a94a0f.js +0 -1
- package/.next-prod/static/chunks/webpack-c6cffb10a569677a.js +0 -1
- package/.next-prod/static/css/23784ace5d9f83d5.css +0 -1
- package/dist/JupyterKernelManager-VBKKSRVJ.mjs +0 -269
- /package/.next-prod/static/{T6-Nq3sO9DxU5E0rsM6aX → VAwjvIwxO_lfKwd6A4ptI}/_buildManifest.js +0 -0
- /package/.next-prod/static/{T6-Nq3sO9DxU5E0rsM6aX → VAwjvIwxO_lfKwd6A4ptI}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5204],{5989:(e,t,n)=>{"use strict";let r,i;n.d(t,{XI:()=>tr,nA:()=>eQ,A0:()=>eY,Hj:()=>e0});var s=n(82159),o=n(76865),a=n(27050),l=n(63197),h=n(12894),c=n(8242);if("u">typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),i=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},i=(r,i)=>(n==t&&(n=0),e[n++]=r,e[n++]=i)}var u=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,s=r+1,o=i+1;for(let e=1;s<this.width&&this.map[t+e]==n;e++)s++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:s,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:s,bottom:o}=this.findCell(e);return"horiz"==t?(n<0?0==r:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?0==s:o==this.height)?null:this.map[r+this.width*(n<0?s-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:s}=this.findCell(e),{left:o,right:a,top:l,bottom:h}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(s,h)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let s=r*this.width+i,o=this.map[s];!n[o]&&(n[o]=!0,i==e.left&&i&&this.map[s-1]==o||r==e.top&&r&&this.map[s-this.width]==o||t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let s=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?s-1:this.map[n]}i=s}}static get(e){return r(e)||i(e,d(e))}};function d(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.name);let t=p(e),n=e.childCount,r=[],i=0,s=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let a=0,l=0;a<n;a++){let h=e.child(a);l++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==h.childCount)break;let c=h.child(e),{colspan:u,rowspan:d,colwidth:p}=c.attrs;for(let e=0;e<d;e++){if(e+a>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:l,n:d-e});break}let h=i+e*t;for(let e=0;e<u;e++){0==r[h+e]?r[h+e]=l:(s||(s=[])).push({type:"collision",row:a,pos:l,n:u-e});let n=p&&p[e];if(n){let r=(h+e)%t*2,i=o[r];null==i||i!=n&&1==o[r+1]?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=u,l+=c.nodeSize}let c=(a+1)*t,u=0;for(;i<c;)0==r[i++]&&u++;u&&(s||(s=[])).push({type:"missing",row:a,n:u}),l++}(0===t||0===n)&&(s||(s=[])).push({type:"zero_sized"});let a=new u(t,n,r,s),l=!1;for(let e=0;!l&&e<o.length;e+=2)null!=o[e]&&o[e+1]<n&&(l=!0);return l&&f(a,o,e),a}function p(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),s=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(s+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);s+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=s:t!=s&&(t=Math.max(t,s))}return t}function f(e,t,n){e.problems||(e.problems=[]);let r={};for(let i=0;i<e.map.length;i++){let s=e.map[i];if(r[s])continue;r[s]=!0;let o=n.nodeAt(s);if(!o)throw RangeError(`No cell with offset ${s} found`);let a=null,l=o.attrs;for(let n=0;n<l.colspan;n++){let r=t[(i+n)%e.width*2];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=m(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:a})}}function m(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function g(e){let t=e.cached.tableNodeTypes;if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}return t}let _=new o.hs("selectingCells");function y(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function b(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}function k(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function w(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let n=y(t.$head)||v(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function v(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}function C(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function x(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function S(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function A(e,t,n){let r=e.node(-1),i=u.get(r),s=e.start(-1),o=i.nextCell(e.pos-s,t,n);return null==o?null:e.node(0).resolve(s+o)}function E(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function M(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function T(e,t,n){let r=g(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var N=class e extends o.LN{constructor(e,t=e){const n=e.node(-1),r=u.get(n),i=e.start(-1),s=r.rectBetween(e.pos-i,t.pos-i),a=e.node(0),l=r.cellsInRect(s).filter(e=>e!=t.pos-i);l.unshift(t.pos-i);const h=l.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new o.yn(a.resolve(r),a.resolve(r+t.content.size))});super(h[0].$from,h[0].$to,h),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(C(r)&&C(i)&&S(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return o.U3.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=u.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},s=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let s=n*t.width+r.left,a=r.left;a<r.right;a++,s++){let n=t.map[s];if(i[n])continue;i[n]=!0;let a=t.findCell(n),l=e.nodeAt(n);if(!l)throw RangeError(`No cell with offset ${n} found`);let h=r.left-a.left,c=a.right-r.right;if(h>0||c>0){let e=l.attrs;if(h>0&&(e=E(e,0,h)),c>0&&(e=E(e,e.colspan-c,c)),a.left<r.left){if(!(l=l.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<r.top||a.bottom>r.bottom){let e={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top<r.top?l.type.createAndFill(e):l.type.create(e,l.content)}o.push(l)}s.push(e.child(n).copy(a.FK.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:s;return new a.Ji(a.FK.from(o),1,1)}replace(e,t=a.Ji.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],l=e.mapping.slice(n);e.replace(l.map(s.pos),l.map(o.pos),i?a.Ji.empty:t)}let i=o.LN.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new a.Ji(a.FK.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=u.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);return!(Math.min(e,t)>0)&&Math.max(e+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=u.get(r),s=t.start(-1),o=i.findCell(t.pos-s),a=i.findCell(n.pos-s),l=t.node(0);return o.top<=a.top?(o.top>0&&(t=l.resolve(s+i.map[o.left])),a.bottom<i.height&&(n=l.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(s+i.map[a.left])),o.bottom<i.height&&(t=l.resolve(s+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=u.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);return!(Math.min(r,i)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,i+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=u.get(r),s=t.start(-1),o=i.findCell(t.pos-s),a=i.findCell(n.pos-s),l=t.node(0);return o.left<=a.left?(o.left>0&&(t=l.resolve(s+i.map[o.top*i.width])),a.right<i.width&&(n=l.resolve(s+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(s+i.map[a.top*i.width])),o.right<i.width&&(t=l.resolve(s+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new I(this.$anchorCell.pos,this.$headCell.pos)}};N.prototype.visible=!1,o.LN.jsonID("cell",N);var I=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&S(t,n)?new N(t,n):o.LN.near(n,1)}};function D(e){if(!(e.selection instanceof N))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(l.NZ.node(n,n+e.nodeSize,{class:"selectedCell"}))}),l.zF.create(e.doc,t)}function L({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function R({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}function F(e,t,n){let r,i,s=(t||e).selection,a=(t||e).doc;if(s instanceof o.nh&&(i=s.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=N.create(a,s.from);else if("row"==i){let e=a.resolve(s.from+1);r=N.rowSelection(e,e)}else if(!n){let e=u.get(s.node),t=s.from+1,n=t+e.map[e.width*e.height-1];r=N.create(a,t+1,n)}}else s instanceof o.U3&&L(s)?r=o.U3.create(a,s.from):s instanceof o.U3&&R(s)&&(r=o.U3.create(a,s.$from.start(),s.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}let P=new o.hs("fix-tables");function O(e,t,n,r){let i=e.childCount,s=t.childCount;e:for(let o=0,a=0;o<s;o++){let s=t.child(o);for(let t=a,r=Math.min(i,o+3);t<r;t++)if(e.child(t)==s){a=t+1,n+=s.nodeSize;continue e}r(s,n),a<i&&e.child(a).sameMarkup(s)?O(e.child(a),s,n+1,r):s.nodesBetween(0,s.content.size,r,n+1),n+=s.nodeSize}}function z(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=B(e,t,r,n))};return t?t.doc!=e.doc&&O(t.doc,e.doc,0,r):e.doc.descendants(r),n}function B(e,t,n,r){let i,s,o=u.get(t);if(!o.problems)return r;r||(r=e.tr);let a=[];for(let e=0;e<o.height;e++)a.push(0);for(let e=0;e<o.problems.length;e++){let i=o.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;let s=e.attrs;for(let e=0;e<s.rowspan;e++)a[i.row+e]+=i.n;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,E(s,s.colspan-i.n,i.n))}else if("missing"==i.type)a[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-i.n})}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,colwidth:i.colwidth})}else if("zero_sized"==i.type){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}for(let e=0;e<a.length;e++)a[e]&&(null==i&&(i=e),s=e);for(let l=0,h=n+1;l<o.height;l++){let n=t.child(l),o=h+n.nodeSize,c=a[l];if(c>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<c;n++){let n=g(e.schema)[t].createAndFill();n&&a.push(n)}let u=(0==l||i==l-1)&&s==l?h+1:o-1;r.insert(r.mapping.map(u),a)}h=o}return r.setMeta(P,{fixTables:!0})}function $(e){let t=e.selection,n=w(e),r=n.node(-1),i=n.start(-1),s=u.get(r);return{...t instanceof N?s.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function j(e,{map:t,tableStart:n,table:r},i){let s=i>0?-1:0;T(t,r,i+s)&&(s=0==i||i==t.width?null:0);for(let o=0;o<t.height;o++){let a=o*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){let s=t.map[a],l=r.nodeAt(s);e.setNodeMarkup(e.mapping.map(n+s),null,M(l.attrs,i-t.colCount(s))),o+=l.attrs.rowspan-1}else{let l=null==s?g(r.type.schema).cell:r.nodeAt(t.map[a+s]).type,h=t.positionAt(o,i,r);e.insert(e.mapping.map(n+h),l.createAndFill())}}return e}function q(e,t){if(!k(e))return!1;if(t){let n=$(e);t(j(e.tr,n,n.left))}return!0}function H(e,t){if(!k(e))return!1;if(t){let n=$(e);t(j(e.tr,n,n.right))}return!0}function U(e,{map:t,table:n,tableStart:r},i){let s=e.mapping.maps.length;for(let o=0;o<t.height;){let a=o*t.width+i,l=t.map[a],h=n.nodeAt(l),c=h.attrs;if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(s).map(r+l),null,E(c,i-t.colCount(l)));else{let t=e.mapping.slice(s).map(r+l);e.delete(t,t+h.nodeSize)}o+=c.rowspan}}function W(e,t){if(!k(e))return!1;if(t){let n=$(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;U(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=u.get(e)}t(r)}return!0}function V(e,t,n){var r;let i=g(t.type.schema).header_cell;for(let s=0;s<e.width;s++)if((null==(r=t.nodeAt(e.map[s+n*e.width]))?void 0:r.type)!=i)return!1;return!0}function G(e,{map:t,tableStart:n,table:r},i){let s=n;for(let e=0;e<i;e++)s+=r.child(e).nodeSize;let o=[],a=i>0?-1:0;V(t,r,i+a)&&(a=0==i||i==t.height?null:0);for(let s=0,h=t.width*i;s<t.width;s++,h++)if(i>0&&i<t.height&&t.map[h]==t.map[h-t.width]){let i=t.map[h],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),s+=o.colspan-1}else{var l;let e=null==a?g(r.type.schema).cell:null==(l=r.nodeAt(t.map[h+a*t.width]))?void 0:l.type,n=null==e?void 0:e.createAndFill();n&&o.push(n)}return e.insert(s,g(r.type.schema).row.create(null,o)),e}function J(e,t){if(!k(e))return!1;if(t){let n=$(e);t(G(e.tr,n,n.top))}return!0}function K(e,t){if(!k(e))return!1;if(t){let n=$(e);t(G(e.tr,n,n.bottom))}return!0}function Z(e,{map:t,table:n,tableStart:r},i){let s=0;for(let e=0;e<i;e++)s+=n.child(e).nodeSize;let o=s+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(s+r,o+r);let l=new Set;for(let s=0,o=i*t.width;s<t.width;s++,o++){let h=t.map[o];if(!l.has(h)){if(l.add(h),i>0&&h==t.map[o-t.width]){let t=n.nodeAt(h).attrs;e.setNodeMarkup(e.mapping.slice(a).map(h+r),null,{...t,rowspan:t.rowspan-1}),s+=t.colspan-1}else if(i<t.height&&h==t.map[o+t.width]){let o=n.nodeAt(h),l=o.attrs,c=o.type.create({...l,rowspan:o.attrs.rowspan-1},o.content),u=t.positionAt(i+1,s,n);e.insert(e.mapping.slice(a).map(r+u),c),s+=l.colspan-1}}}}function X(e,t){if(!k(e))return!1;if(t){let n=$(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;Z(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=u.get(n.table)}t(r)}return!0}function Q(e){let t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function Y({width:e,height:t,map:n},r){let i=r.top*e+r.left,s=i,o=(r.bottom-1)*e+r.left,a=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[s]==n[s-1]||r.right<e&&n[a]==n[a+1])return!0;s+=e,a+=e}for(let s=r.left;s<r.right;s++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[o]==n[o+e])return!0;i++,o++}return!1}function ee(e,t){let n=e.selection;if(!(n instanceof N)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=$(e),{map:i}=r;if(Y(i,r))return!1;if(t){let n,s,o=e.tr,l={},h=a.FK.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let a=i.map[e*i.width+t],c=r.table.nodeAt(a);if(!l[a]&&c)if(l[a]=!0,null==n)n=a,s=c;else{Q(c)||(h=h.append(c.content));let e=o.mapping.map(a+r.tableStart);o.delete(e,e+c.nodeSize)}}if(null==n||null==s)return!0;if(o.setNodeMarkup(n+r.tableStart,null,{...M(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),rowspan:r.bottom-r.top}),h.size>0){let e=n+1+s.content.size,t=Q(s)?n+1:e;o.replaceWith(t+r.tableStart,e+r.tableStart,h)}o.setSelection(new N(o.doc.resolve(n+r.tableStart))),t(o)}return!0}function et(e,t){let n=g(e.schema);return en(({node:e})=>n[e.type.spec.tableRole])(e,t)}function en(e){return(t,n)=>{let r,i,s=t.selection;if(s instanceof N){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;r=s.$anchorCell.nodeAfter,i=s.$anchorCell.pos}else{var o;if(!(r=b(s.$from)))return!1;i=null==(o=y(s.$from))?void 0:o.pos}if(null==r||null==i||1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){let o,a=r.attrs,l=[],h=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});let c=$(t),u=t.tr;for(let e=0;e<c.right-c.left;e++)l.push(h?{...a,colwidth:h&&h[e]?[h[e]]:null}:a);for(let t=c.top;t<c.bottom;t++){let n=c.map.positionAt(t,c.left,c.table);t==c.top&&(n+=r.nodeSize);for(let i=c.left,s=0;i<c.right;i++,s++)(i!=c.left||t!=c.top)&&u.insert(o=u.mapping.map(n+c.tableStart,1),e({node:r,row:t,col:i}).createAndFill(l[s]))}u.setNodeMarkup(i,e({node:r,row:c.top,col:c.left}),l[0]),s instanceof N&&u.setSelection(new N(u.doc.resolve(s.$anchorCell.pos),o?u.doc.resolve(o):void 0)),n(u)}return!0}}function er(e,t){return function(n,r){if(!k(n))return!1;let i=w(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let s=n.tr;n.selection instanceof N?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&s.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(s)}return!0}}function ei(e){return function(t,n){if(!k(t))return!1;if(n){let r=g(t.schema),i=$(t),s=t.tr,o=i.map.cellsInRect("column"==e?{left:i.left,top:0,right:i.right,bottom:i.map.height}:"row"==e?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)a[e].type==r.header_cell&&s.setNodeMarkup(i.tableStart+o[e],r.cell,a[e].attrs);if(0===s.steps.length)for(let e=0;e<o.length;e++)s.setNodeMarkup(i.tableStart+o[e],r.header_cell,a[e].attrs);n(s)}return!0}}function es(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function eo(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?ei(e):function(t,n){if(!k(t))return!1;if(n){let r=g(t.schema),i=$(t),s=t.tr,o=es("row",i,r),a=es("column",i,r),l=+("column"===e?!!o:"row"===e&&!!a),h="column"==e?{left:0,top:l,right:1,bottom:i.map.height}:"row"==e?{left:l,top:0,right:i.map.width,bottom:1}:i,c="column"==e?a?r.cell:r.header_cell:"row"==e?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(h).forEach(e=>{let t=e+i.tableStart,n=s.doc.nodeAt(t);n&&s.setNodeMarkup(t,c,n.attrs)}),n(s)}return!0}}eo("row",{useDeprecatedLogic:!0}),eo("column",{useDeprecatedLogic:!0});let ea=eo("cell",{useDeprecatedLogic:!0});function el(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}function eh(e){return function(t,n){if(!k(t))return!1;let r=el(w(t),e);if(null==r)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(o.U3.between(e,x(e))).scrollIntoView())}return!0}}function ec(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function eu(e,t){let n=e.selection;if(!(n instanceof N))return!1;if(t){let r=e.tr,i=g(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new a.Ji(i,0,0))}),r.docChanged&&t(r)}return!0}function ed(e){if(0===e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;let i=t.child(0),s=i.type.spec.tableRole,o=i.type.schema,l=[];if("row"==s)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,s=e?0:Math.max(0,n-1),h=e<t.childCount-1?0:Math.max(0,r-1);(s||h)&&(i=ef(g(o).row,new a.Ji(i,s,h)).content),l.push(i)}else{if("cell"!=s&&"header_cell"!=s)return null;l.push(n||r?ef(g(o).row,new a.Ji(t,n,r)).content:t)}return ep(o,l)}function ep(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:s}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+s}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(a.FK.empty),n[i]<r){let s=g(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(s);t[i]=t[i].append(a.FK.from(o))}return{height:t.length,width:r,rows:t}}function ef(e,t){let n=e.createAndFill();return new c.dL(n).replace(0,n.content.size,t).doc}function em({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let s=n[e],o=[];for(let n=t[e]||0,i=0;n<r;i++){let a=s.child(i%s.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(E(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),o.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}i.push(a.FK.from(o))}n=i,e=r}if(t!=i){let e=[];for(let r=0,s=0;r<i;r++,s++){let o=[],l=n[s%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),o.push(t)}e.push(a.FK.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function eg(e,t,n,r,i,s,o){let l,h,c=g(e.doc.type.schema);if(i>t.width)for(let s=0,a=0;s<t.height;s++){let u,d=n.child(s);a+=d.nodeSize;let p=[];u=null==d.lastChild||d.lastChild.type==c.cell?l||(l=c.cell.createAndFill()):h||(h=c.header_cell.createAndFill());for(let e=t.width;e<i;e++)p.push(u);e.insert(e.mapping.slice(o).map(a-1+r),p)}if(s>t.height){let u=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==c.header_cell;u.push(i?h||(h=c.header_cell.createAndFill()):l||(l=c.cell.createAndFill()))}let d=c.row.create(null,a.FK.from(u)),p=[];for(let e=t.height;e<s;e++)p.push(d);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),p)}return!!(l||h)}function e_(e,t,n,r,i,s,o,a){if(0==o||o==t.height)return!1;let l=!1;for(let h=i;h<s;h++){let i=o*t.width+h,s=t.map[i];if(t.map[i-t.width]==s){l=!0;let i=n.nodeAt(s),{top:c,left:u}=t.findCell(s);e.setNodeMarkup(e.mapping.slice(a).map(s+r),null,{...i.attrs,rowspan:o-c}),e.insert(e.mapping.slice(a).map(t.positionAt(o,u,n)),i.type.createAndFill({...i.attrs,rowspan:c+i.attrs.rowspan-o})),h+=i.attrs.colspan-1}}return l}function ey(e,t,n,r,i,s,o,a){if(0==o||o==t.width)return!1;let l=!1;for(let h=i;h<s;h++){let i=h*t.width+o,s=t.map[i];if(t.map[i-1]==s){l=!0;let i=n.nodeAt(s),c=t.colCount(s),u=e.mapping.slice(a).map(s+r);e.setNodeMarkup(u,null,E(i.attrs,o-c,i.attrs.colspan-(o-c))),e.insert(u+i.nodeSize,i.type.createAndFill(E(i.attrs,0,o-c))),h+=i.attrs.rowspan-1}}return l}function eb(e,t,n,r,i){let s=n?e.doc.nodeAt(n-1):e.doc;if(!s)throw Error("No table found");let o=u.get(s),{top:l,left:h}=r,c=h+i.width,d=l+i.height,p=e.tr,f=0;function m(){if(!(s=n?p.doc.nodeAt(n-1):p.doc))throw Error("No table found");o=u.get(s),f=p.mapping.maps.length}eg(p,o,s,n,c,d,0)&&m(),e_(p,o,s,n,h,c,l,f)&&m(),e_(p,o,s,n,h,c,d,f)&&m(),ey(p,o,s,n,l,d,h,f)&&m(),ey(p,o,s,n,l,d,c,f)&&m();for(let e=l;e<d;e++){let t=o.positionAt(e,h,s),r=o.positionAt(e,c,s);p.replace(p.mapping.slice(f).map(t+n),p.mapping.slice(f).map(r+n),new a.Ji(i.rows[e-l],0,0))}m(),p.setSelection(new N(p.doc.resolve(n+o.positionAt(l,h,s)),p.doc.resolve(n+o.positionAt(d-1,c-1,s)))),t(p)}let ek=(0,h.K)({ArrowLeft:ev("horiz",-1),ArrowRight:ev("horiz",1),ArrowUp:ev("vert",-1),ArrowDown:ev("vert",1),"Shift-ArrowLeft":eC("horiz",-1),"Shift-ArrowRight":eC("horiz",1),"Shift-ArrowUp":eC("vert",-1),"Shift-ArrowDown":eC("vert",1),Backspace:eu,"Mod-Backspace":eu,Delete:eu,"Mod-Delete":eu});function ew(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ev(e,t){return(n,r,i)=>{if(!i)return!1;let s=n.selection;if(s instanceof N)return ew(n,r,o.LN.near(s.$headCell,t));if("horiz"!=e&&!s.empty)return!1;let a=eE(i,e,t);if(null==a)return!1;if("horiz"==e)return ew(n,r,o.LN.near(n.doc.resolve(s.head+t),t));{let i,s=n.doc.resolve(a),l=A(s,e,t);return i=l?o.LN.near(l,1):t<0?o.LN.near(n.doc.resolve(s.before(-1)),-1):o.LN.near(n.doc.resolve(s.after(-1)),1),ew(n,r,i)}}}function eC(e,t){return(n,r,i)=>{let s;if(!i)return!1;let o=n.selection;if(o instanceof N)s=o;else{let r=eE(i,e,t);if(null==r)return!1;s=new N(n.doc.resolve(r))}let a=A(s.$headCell,e,t);return!!a&&ew(n,r,new N(s.$anchorCell,a))}}function ex(e,t){let n=y(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new N(n))),!0)}function eS(e,t,n){if(!k(e.state))return!1;let r=ed(n),i=e.state.selection;if(i instanceof N){r||(r={width:1,height:1,rows:[a.FK.from(ef(g(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),o=u.get(t).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=em(r,o.right-o.left,o.bottom-o.top),eb(e.state,e.dispatch,s,o,r),!0}if(!r)return!1;{let t=w(e.state),n=t.start(-1);return eb(e.state,e.dispatch,n,u.get(t.node(-1)).findCell(t.pos-n),r),!0}}function eA(e,t){var n;let r;if(0!=t.button||t.ctrlKey||t.metaKey)return;let i=eM(e,t.target);if(t.shiftKey&&e.state.selection instanceof N)s(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=y(e.state.selection.$anchor))&&(null==(n=eT(e,t))?void 0:n.pos)!=r.pos)s(r,t),t.preventDefault();else if(!i)return;function s(t,n){let r=eT(e,n),i=null==_.getState(e.state);if(!r||!S(t,r))if(!i)return;else r=t;let s=new N(t,r);if(i||!e.state.selection.eq(s)){let n=e.state.tr.setSelection(s);i&&n.setMeta(_,t.pos),e.dispatch(n)}}function o(){e.root.removeEventListener("mouseup",o),e.root.removeEventListener("dragstart",o),e.root.removeEventListener("mousemove",a),null!=_.getState(e.state)&&e.dispatch(e.state.tr.setMeta(_,-1))}function a(n){let r,a=n,l=_.getState(e.state);if(null!=l)r=e.state.doc.resolve(l);else if(eM(e,a.target)!=i&&!(r=eT(e,t)))return o();r&&s(r,a)}e.root.addEventListener("mouseup",o),e.root.addEventListener("dragstart",o),e.root.addEventListener("mousemove",a)}function eE(e,t,n){if(!(e.state.selection instanceof o.U3))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))break;if("cell"==s.type.spec.tableRole||"header_cell"==s.type.spec.tableRole){let s=r.before(i),o="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(o)?s:null}}return null}function eM(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function eT(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&y(e.state.doc.resolve(r))||y(e.state.doc.resolve(i))}var eN=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),eI(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,eI(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function eI(e,t,n,r,i,s){let o=0,a=!0,l=t.firstChild,h=e.firstChild;if(h){for(let e=0,n=0;e<h.childCount;e++){let{colspan:c,colwidth:u}=h.child(e).attrs;for(let e=0;e<c;e++,n++){let h=i==n?s:u&&u[e],c=h?h+"px":"";if(o+=h||r,h||(a=!1),l)l.style.width!=c&&(l.style.width=c),l=l.nextSibling;else{let e=document.createElement("col");e.style.width=c,t.appendChild(e)}}}for(;l;){var c;let e=l.nextSibling;null==(c=l.parentNode)||c.removeChild(l),l=e}a?(n.style.width=o+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=o+"px")}}let eD=new o.hs("tableColumnResizing");function eL({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=eN,lastColumnResizable:i=!0}={}){let s=new o.k_({key:eD,state:{init(e,t){var i;let o=null==(i=s.spec)||null==(i=i.props)?void 0:i.nodeViews,a=g(t.schema).table.name;return r&&o&&(o[a]=(e,t)=>new r(e,n,t)),new eR(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=eD.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{eF(t,n,e,i)},mouseleave:e=>{eP(e)},mousedown:(e,r)=>{eO(e,r,t,n)}},decorations:e=>{let t=eD.getState(e);if(t&&t.activeHandle>-1)return eV(e,t.activeHandle)},nodeViews:{}}});return s}var eR=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(eD);if(r&&null!=r.setHandle)return new e(r.setHandle,!1);if(r&&void 0!==r.setDragging)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return C(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function eF(e,t,n,r){if(!e.editable)return;let i=eD.getState(e.state);if(i&&!i.dragging){let s=eB(t.target),o=-1;if(s){let{left:r,right:i}=s.getBoundingClientRect();t.clientX-r<=n?o=e$(e,t,"left",n):i-t.clientX<=n&&(o=e$(e,t,"right",n))}if(o!=i.activeHandle){if(!r&&-1!==o){let t=e.state.doc.resolve(o),n=t.node(-1),r=u.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}eq(e,o)}}}function eP(e){if(!e.editable)return;let t=eD.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&eq(e,-1)}function eO(e,t,n,r){var i;if(!e.editable)return!1;let s=null!=(i=e.dom.ownerDocument.defaultView)?i:window,o=eD.getState(e.state);if(!o||-1==o.activeHandle||o.dragging)return!1;let a=e.state.doc.nodeAt(o.activeHandle),l=ez(e,o.activeHandle,a.attrs);function h(t){s.removeEventListener("mouseup",h),s.removeEventListener("mousemove",c);let r=eD.getState(e.state);(null==r?void 0:r.dragging)&&(eH(e,r.activeHandle,ej(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(eD,{setDragging:null})))}function c(t){if(!t.which)return h(t);let i=eD.getState(e.state);if(i&&i.dragging){let s=ej(i.dragging,t,n);eU(e,i.activeHandle,s,r)}}return e.dispatch(e.state.tr.setMeta(eD,{setDragging:{startX:t.clientX,startWidth:l}})),eU(e,o.activeHandle,l,r),s.addEventListener("mouseup",h),s.addEventListener("mousemove",c),t.preventDefault(),!0}function ez(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let s=e.domAtPos(t),o=s.node.childNodes[s.offset].offsetWidth,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(o-=r[e],a--);return o/a}function eB(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function e$(e,t,n,r){let i="right"==n?-r:r,s=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!s)return -1;let{pos:o}=s,a=y(e.state.doc.resolve(o));if(!a)return -1;if("right"==n)return a.pos;let l=u.get(a.node(-1)),h=a.start(-1),c=l.map.indexOf(a.pos-h);return c%l.width==0?-1:h+l.map[c-1]}function ej(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function eq(e,t){e.dispatch(e.state.tr.setMeta(eD,{setHandle:t}))}function eH(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),s=u.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<s.height;e++){let t=e*s.width+a;if(e&&s.map[t]==s.map[t-s.width])continue;let r=s.map[t],h=i.nodeAt(r).attrs,c=1==h.colspan?0:a-s.colCount(r);if(h.colwidth&&h.colwidth[c]==n)continue;let u=h.colwidth?h.colwidth.slice():eW(h.colspan);u[c]=n,l.setNodeMarkup(o+r,null,{...h,colwidth:u})}l.docChanged&&e.dispatch(l)}function eU(e,t,n,r){let i=e.state.doc.resolve(t),s=i.node(-1),o=i.start(-1),a=u.get(s).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1,l=e.domAtPos(i.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&eI(s,l.firstChild,l,r,a,n)}function eW(e){return Array(e).fill(0)}function eV(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return l.zF.empty;let s=u.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<s.height;t++){let r=a+t*s.width;if((a==s.width-1||s.map[r]!=s.map[r+1])&&(0==t||s.map[r]!=s.map[r-s.width])){var h;let t=s.map[r],a=o+t+i.nodeAt(t).nodeSize-1,c=document.createElement("div");c.className="column-resize-handle",(null==(h=eD.getState(e))?void 0:h.dragging)&&n.push(l.NZ.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),n.push(l.NZ.widget(a,c))}}return l.zF.create(e.doc,n)}function eG({allowTableNodeSelection:e=!1}={}){return new o.k_({key:_,state:{init:()=>null,apply(e,t){let n=e.getMeta(_);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:D,handleDOMEvents:{mousedown:eA},createSelectionBetween:e=>null!=_.getState(e.state)?e.state.selection:null,handleTripleClick:ex,handleKeyDown:ek,handlePaste:eS},appendTransaction:(t,n,r)=>F(r,z(r,n),e)})}function eJ(e){return"left"===e||"right"===e||"center"===e?e:null}function eK(e){let t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return eJ(t||n)}function eZ(e){return eJ(null==e?void 0:e.align)}function eX(){return{default:null,parseHTML:e=>eK(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var eQ=s.bP.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{var t,n;let r=e.getAttribute("colwidth"),i=r?r.split(",").map(e=>parseInt(e,10)):null;if(!i){let r=null==(t=e.closest("table"))?void 0:t.querySelectorAll("colgroup > col"),i=Array.from((null==(n=e.parentElement)?void 0:n.children)||[]).indexOf(e);if(i&&i>-1&&r&&r[i]){let e=r[i].getAttribute("width");return e?[parseInt(e,10)]:null}}return i}},align:eX()}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,s.KV)(this.options.HTMLAttributes,e),0]}}),eY=s.bP.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}},align:eX()}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",(0,s.KV)(this.options.HTMLAttributes,e),0]}}),e0=s.bP.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,s.KV)(this.options.HTMLAttributes,e),0]}});function e1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function e2(e,t,n,r,i,s){var o;let a=0,l=!0,h=t.firstChild,c=e.firstChild;if(null!==c)for(let e=0,n=0;e<c.childCount;e+=1){let{colspan:o,colwidth:u}=c.child(e).attrs;for(let e=0;e<o;e+=1,n+=1){let o=i===n?s:u&&u[e],c=o?`${o}px`:"";if(a+=o||r,o||(l=!1),h){if(h.style.width!==c){let[e,t]=e1(r,o);h.style.setProperty(e,t)}h=h.nextSibling}else{let e=document.createElement("col"),[n,i]=e1(r,o);e.style.setProperty(n,i),t.appendChild(e)}}}for(;h;){let e=h.nextSibling;null==(o=h.parentNode)||o.removeChild(h),h=e}let u=e.attrs.style&&"string"==typeof e.attrs.style&&/\bwidth\s*:/i.test(e.attrs.style);l&&!u?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var e3=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),e2(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,e2(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!n&&!r&&("attributes"===e.type||"childList"===e.type||"characterData"===e.type)}};function e5(e,t,n,r){let i=0,s=!0,o=[],a=e.firstChild;if(!a)return{};for(let e=0,l=0;e<a.childCount;e+=1){let{colspan:h,colwidth:c}=a.child(e).attrs;for(let e=0;e<h;e+=1,l+=1){let a=n===l?r:c&&c[e];i+=a||t,a||(s=!1);let[h,u]=e1(t,a);o.push(["col",{style:`${h}: ${u}`}])}}return{colgroup:["colgroup",{},...o],tableWidth:s?`${i}px`:"",tableMinWidth:s?"":`${i}px`}}function e4(e,t){return t?e.createChecked(null,t):e.createAndFill()}function e6(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function e8(e,t,n,r,i){let s=e6(e),o=[],a=[];for(let e=0;e<n;e+=1){let e=e4(s.cell,i);if(e&&a.push(e),r){let e=e4(s.header_cell,i);e&&o.push(e)}}let l=[];for(let e=0;e<t;e+=1)l.push(s.row.createChecked(null,r&&0===e?o:a));return s.table.createChecked(null,l)}function e9(e){return e instanceof N}var e7=({editor:e})=>{let{selection:t}=e.state;if(!e9(t))return!1;let n=0,r=(0,s.eL)(t.ranges[0].$from,e=>"table"===e.type.name);return null==r||r.node.descendants(e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}),n===t.ranges.length&&(e.commands.deleteTable(),!0)},te="\x1f";function tt(e){return(e||"").replace(/\s+/g," ").trim()}var tn=function(e,t,n={}){var r;let i=null!=(r=n.cellLineSeparator)?r:te;if(!e||!e.content||0===e.content.length)return"";let s=[];e.content.forEach(e=>{let n=[];e.content&&e.content.forEach(e=>{let r="",s=tt(r=e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>t.renderChildren(e)).join(i):e.content?t.renderChildren(e.content):""),o="tableHeader"===e.type,a=eZ(e.attrs);n.push({text:s,isHeader:o,align:a})}),s.push(n)});let o=s.reduce((e,t)=>Math.max(e,t.length),0);if(0===o)return"";let a=Array(o).fill(0);s.forEach(e=>{var t;for(let n=0;n<o;n+=1){let r=((null==(t=e[n])?void 0:t.text)||"").length;r>a[n]&&(a[n]=r),a[n]<3&&(a[n]=3)}});let l=(e,t)=>e+" ".repeat(Math.max(0,t-e.length)),h=s[0],c=h.some(e=>e.isHeader),u=Array(o).fill(null);s.forEach(e=>{var t;for(let n=0;n<o;n+=1)!u[n]&&(null==(t=e[n])?void 0:t.align)&&(u[n]=e[n].align)});let d="\n",p=Array(o).fill(0).map((e,t)=>c&&h[t]&&h[t].text||"");return d+=`| ${p.map((e,t)=>l(e,a[t])).join(" | ")} |
|
|
2
|
+
| ${a.map((e,t)=>{let n=Math.max(3,e),r=u[t];return"left"===r?`:${"-".repeat(n)}`:"right"===r?`${"-".repeat(n)}:`:"center"===r?`:${"-".repeat(n)}:`:"-".repeat(n)}).join(" | ")} |
|
|
3
|
+
`,(c?s.slice(1):s).forEach(e=>{d+=`| ${Array(o).fill(0).map((t,n)=>l(e[n]&&e[n].text||"",a[n])).join(" | ")} |
|
|
4
|
+
`}),d},tr=s.bP.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:e3,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=e5(e,this.options.cellMinWidth),o=t.style;function a(){return o||(r?`width: ${r}`:`min-width: ${i}`)}let l=["table",(0,s.KV)(this.options.HTMLAttributes,t,{style:a()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(e,t)=>{let n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){let i=[];e.header.forEach((e,n)=>{var s;let o=eJ(null!=(s=r[n])?s:e.align),a=o?{align:o}:{};i.push(t.createNode("tableHeader",a,[{type:"paragraph",content:t.parseInline(e.tokens)}]))}),n.push(t.createNode("tableRow",{},i))}return e.rows&&e.rows.forEach(e=>{let i=[];e.forEach((e,n)=>{var s;let o=eJ(null!=(s=r[n])?s:e.align),a=o?{align:o}:{};i.push(t.createNode("tableCell",a,[{type:"paragraph",content:t.parseInline(e.tokens)}]))}),n.push(t.createNode("tableRow",{},i))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>tn(e,t),addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:s})=>{let a=e8(s.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(o.U3.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>q(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>H(e,t),deleteColumn:()=>({state:e,dispatch:t})=>W(e,t),addRowBefore:()=>({state:e,dispatch:t})=>J(e,t),addRowAfter:()=>({state:e,dispatch:t})=>K(e,t),deleteRow:()=>({state:e,dispatch:t})=>X(e,t),deleteTable:()=>({state:e,dispatch:t})=>ec(e,t),mergeCells:()=>({state:e,dispatch:t})=>ee(e,t),splitCell:()=>({state:e,dispatch:t})=>et(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>eo("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>eo("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>ea(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!ee(e,t)||et(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>er(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>eh(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>eh(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&z(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=N.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:e7,"Mod-Backspace":e7,Delete:e7,"Mod-Delete":e7}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[eL({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],eG({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:(0,s.gk)((0,s.iI)(e,"tableRole",t))}}});s.YY.create({name:"tableKit",addExtensions(){let e=[];return!1!==this.options.table&&e.push(tr.configure(this.options.table)),!1!==this.options.tableCell&&e.push(eQ.configure(this.options.tableCell)),!1!==this.options.tableHeader&&e.push(eY.configure(this.options.tableHeader)),!1!==this.options.tableRow&&e.push(e0.configure(this.options.tableRow)),e}})},6268:(e,t,n)=>{"use strict";n.d(t,{A:()=>r.A0});var r=n(5989)},8242:(e,t,n)=>{"use strict";n.d(t,{$L:()=>Q,Ln:()=>x,N0:()=>J,Um:()=>X,Wg:()=>S,X9:()=>m,Ys:()=>w,dL:()=>eg,jP:()=>I,n9:()=>W,oM:()=>L,zy:()=>H});var r=n(27050);let i=65535,s=65536;function o(e,t){return e+t*s}function a(e){return e&i}function l(e){return(e-(e&i))/s}let h=1,c=2,u=4,d=8;class p{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&d)>0}get deletedBefore(){return(this.delInfo&(h|u))>0}get deletedAfter(){return(this.delInfo&(c|u))>0}get deletedAcross(){return(this.delInfo&u)>0}}class f{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&f.empty)return f.empty}recover(e){let t=0,n=a(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+l(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let f=this.ranges[a+i],m=this.ranges[a+s],g=l+f;if(e<=g){let i=f?e==l?-1:e==g?1:t:t,s=l+r+(i<0?0:m);if(n)return s;let _=e==(t<0?l:g)?null:o(a/3,e-l),y=e==l?c:e==g?h:u;return(t<0?e!=l:e!=g)&&(y|=d),new p(s,y,_)}r+=m-f}return n?e+r:new p(e+r,0,null)}touches(e,t){let n=0,r=a(t),i=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let a=this.ranges[t+i];if(e<=o+a&&t==3*r)return!0;n+=this.ranges[t+s]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let s=this.ranges[r],o=s-(this.inverted?i:0),a=s+(this.inverted?0:i),l=this.ranges[r+t],h=this.ranges[r+n];e(o,o+l,a,a+h),i+=h-l}}invert(){return new f(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?f.empty:new f(e<0?[0,-e,0]:[0,0,e])}}f.empty=new f([]);class m{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new m(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new m;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new p(e,r,null)}}let g=Object.create(null);class _{getMap(){return f.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=g[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in g)throw RangeError("Duplicate use of step JSON ID "+e);return g[e]=t,t.prototype.jsonID=e,t}}class y{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new y(e,null)}static fail(e){return new y(null,e)}static fromReplace(e,t,n,i){try{return y.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.vI)return y.fail(e.message);throw e}}}function b(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(b(s.content,t,s))),s.isInline&&(s=t(s,n,r)),i.push(s)}return r.FK.fromArray(i)}class k extends _{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),s=new r.Ji(b(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return y.fromReplace(e,this.from,this.to,s)}invert(){return new w(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new k(t.pos,n.pos,this.mark)}merge(e){return e instanceof k&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new k(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new k(t.from,t.to,e.markFromJSON(t.mark))}}_.jsonID("addMark",k);class w extends _{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new r.Ji(b(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return y.fromReplace(e,this.from,this.to,n)}invert(){return new k(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new w(t.pos,n.pos,this.mark)}merge(e){return e instanceof w&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new w(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new w(t.from,t.to,e.markFromJSON(t.mark))}}_.jsonID("removeMark",w);class v extends _{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return y.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new v(this.pos,t.marks[n]);return new v(this.pos,this.mark)}}return new C(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new v(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new v(t.pos,e.markFromJSON(t.mark))}}_.jsonID("addNodeMark",v);class C extends _{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return y.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new v(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new C(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new C(t.pos,e.markFromJSON(t.mark))}}_.jsonID("removeNodeMark",C);class x extends _{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&A(e,this.from,this.to)?y.fail("Structure replace would overwrite content"):y.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new f([this.from,this.to-this.from,this.slice.size])}invert(e){return new x(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&x.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new x(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof x)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new x(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new x(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new x(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}x.MAP_BIAS=1,_.jsonID("replace",x);class S extends _{constructor(e,t,n,r,i,s,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(A(e,this.from,this.gapFrom)||A(e,this.gapTo,this.to)))return y.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return y.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?y.fromReplace(e,this.from,this.to,n):y.fail("Content does not fit in gap")}getMap(){return new f([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new S(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new S(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new S(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function A(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let e=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function E(e,t,n,r){let i,s,o=[],a=[];e.doc.nodesBetween(t,n,(e,l,h)=>{if(!e.isInline)return;let c=e.marks;if(!r.isInSet(c)&&h.type.allowsMarkType(r.type)){let h=Math.max(l,t),u=Math.min(l+e.nodeSize,n),d=r.addToSet(c);for(let e=0;e<c.length;e++)c[e].isInSet(d)||(i&&i.to==h&&i.mark.eq(c[e])?i.to=u:o.push(i=new w(h,u,c[e])));s&&s.to==h?s.to=u:a.push(s=new k(h,u,r))}}),o.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function M(e,t,n,i){let s=[],o=0;e.doc.nodesBetween(t,n,(e,a)=>{if(!e.isInline)return;o++;let l=null;if(i instanceof r.sX){let t=e.marks,n;for(;n=i.isInSet(t);)(l||(l=[])).push(n),t=n.removeFromSet(t)}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length){let r=Math.min(a+e.nodeSize,n);for(let e=0;e<l.length;e++){let n=l[e],i;for(let e=0;e<s.length;e++){let t=s[e];t.step==o-1&&n.eq(s[e].style)&&(i=t)}i?(i.to=r,i.step=o):s.push({style:n,from:Math.max(a,t),to:r,step:o})}}}),s.forEach(t=>e.step(new w(t.from,t.to,t.style)))}function T(e,t,n,i=n.contentMatch,s=!0){let o=e.doc.nodeAt(t),a=[],l=t+1;for(let t=0;t<o.childCount;t++){let h=o.child(t),c=l+h.nodeSize,u=i.matchType(h.type);if(u){i=u;for(let t=0;t<h.marks.length;t++)n.allowsMarkType(h.marks[t].type)||e.step(new w(l,c,h.marks[t]));if(s&&h.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(h.text);)i||(i=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0)),a.push(new x(l+e.index,l+e.index+e[0].length,i))}}else a.push(new x(l,c,r.Ji.empty));l=c}if(!i.validEnd){let t=i.fillBefore(r.FK.empty,!0);e.replace(l,l,new r.Ji(t,0,0))}for(let t=a.length-1;t>=0;t--)e.step(a[t])}function N(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function I(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let s=e.$from.node(n),o=e.$from.index(n)+r,a=e.$to.indexAfter(n)-i;if(n<e.depth&&s.canReplace(o,a,t))return n;if(0==n||s.type.spec.isolating||!N(s,o,a))break;o&&(r=1),a<s.childCount&&(i=1)}return null}function D(e,t,n){let{$from:i,$to:s,depth:o}=t,a=i.before(o+1),l=s.after(o+1),h=a,c=l,u=r.FK.empty,d=0;for(let e=o,t=!1;e>n;e--)t||i.index(e)>0?(t=!0,u=r.FK.from(i.node(e).copy(u)),d++):h--;let p=r.FK.empty,f=0;for(let e=o,t=!1;e>n;e--)t||s.after(e+1)<s.end(e)?(t=!0,p=r.FK.from(s.node(e).copy(p)),f++):c++;e.step(new S(h,c,a,l,new r.Ji(u.append(p),d,f),u.size-d,!0))}function L(e,t,n=null,r=e){let i=F(e,t),s=i&&P(r,t);return s?i.map(R).concat({type:t,attrs:n}).concat(s.map(R)):null}function R(e){return{type:e,attrs:null}}function F(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let o=s.length?s[0]:t;return n.canReplaceWith(r,i,o)?s:null}function P(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.child(r),o=t.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;a&&e<i;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?o:null}function O(e,t,n){let i=r.FK.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.FK.from(n[e].type.create(n[e].attrs,i))}let s=t.start,o=t.end;e.step(new S(s,o,s,o,new r.Ji(i,0,0),n.length,!0))}function z(e,t,n,i,s){if(!i.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let a="function"==typeof s?s(t):s;if(t.isTextblock&&!t.hasMarkup(i,a)&&j(e.doc,e.mapping.slice(o).map(n),i)){let s=null;if(i.schema.linebreakReplacement){let e="pre"==i.whitespace,t=!!i.contentMatch.matchType(i.schema.linebreakReplacement);e&&!t?s=!1:!e&&t&&(s=!0)}!1===s&&$(e,t,n,o),T(e,e.mapping.slice(o).map(n,1),i,void 0,null===s);let l=e.mapping.slice(o),h=l.map(n,1),c=l.map(n+t.nodeSize,1);return e.step(new S(h,c,h+1,c-1,new r.Ji(r.FK.from(i.create(a,null,t.marks)),0,0),1,!0)),!0===s&&B(e,t,n,o),!1}})}function B(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let i=e.mapping.slice(r).map(n+1+s+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function $(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+s);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function j(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function q(e,t,n,i,s){let o=e.doc.nodeAt(t);if(!o)throw RangeError("No node at given position");n||(n=o.type);let a=n.create(i,null,s||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,a);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);e.step(new S(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new r.Ji(r.FK.from(a),0,0),1,!0))}function H(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>s;e--,t--){let n=i.node(e),s=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(s,n.childCount),a=r&&r[t+1];a&&(o=o.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[t]||n;if(!n.canReplace(s+1,n.childCount)||!l.type.validContent(o))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function U(e,t,n=1,i){let s=e.doc.resolve(t),o=r.FK.empty,a=r.FK.empty;for(let e=s.depth,t=s.depth-n,l=n-1;e>t;e--,l--){o=r.FK.from(s.node(e).copy(o));let t=i&&i[l];a=r.FK.from(t?t.type.create(t.attrs,a):s.node(e).copy(a))}e.step(new x(t,t,new r.Ji(o.append(a),n,n),!0))}function W(e,t){let n=e.resolve(t),r=n.index();return G(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function V(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let s=t.child(i),o=s.type==r?e.type.schema.nodes.text:s.type;if(!(n=n.matchType(o))||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}function G(e,t){return!!(e&&t&&!e.isLeaf&&V(e,t))}function J(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,s,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(e+1),o++,s=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),s=r.node(e+1)),i&&!i.isTextblock&&G(i,s)&&r.node(e).canReplace(o,o+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function K(e,t,n){let i=null,{linebreakReplacement:s}=e.doc.type.schema,o=e.doc.resolve(t-n),a=o.node().type;if(s&&a.inlineContent){let e="pre"==a.whitespace,t=!!a.contentMatch.matchType(s);e&&!t?i=!1:!e&&t&&(i=!0)}let l=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);$(e,r.node(),r.before(),l)}a.inlineContent&&T(e,t+n-1,a,o.node().contentMatchAt(o.index()),null==i);let h=e.mapping.slice(l),c=h.map(t-n);if(e.step(new x(c,h.map(t+n,-1),r.Ji.empty,!0)),!0===i){let t=e.doc.resolve(c);B(e,t.node(),t.before(),e.steps.length)}return e}function Z(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}function X(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,s=r.index(t)+ +(n>0),o=r.node(t),a=!1;if(1==e)a=o.canReplace(s,s,i);else{let e=o.contentMatchAt(s).findWrapping(i.firstChild.type);a=e&&o.canReplaceWith(s,s,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function Q(e,t,n=t,i=r.Ji.empty){if(t==n&&!i.size)return null;let s=e.resolve(t),o=e.resolve(n);return Y(s,o,i)?new x(t,n,i):new ee(s,o,i).fit()}function Y(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}_.jsonID("replaceAround",S);class ee{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.FK.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&1==s.childCount;)s=s.firstChild.content,o--,a--;let l=new r.Ji(s,o,a);return e>-1?new S(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new x(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,i=null,s=(e=n?(i=er(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let e=this.depth;e>=0;e--){let{type:o,match:a}=this.frontier[e],l,h=null;if(1==t&&(s?a.matchType(s.type)||(h=a.fillBefore(r.FK.from(s),!1)):i&&o.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:e,parent:i,inject:h};if(2==t&&s&&(l=a.findWrapping(s.type)))return{sliceDepth:n,frontierDepth:e,parent:i,wrap:l};if(i&&a.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=er(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.Ji(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=er(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new r.Ji(et(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new r.Ji(et(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let e=0;e<s.length;e++)this.openFrontierNode(s[e]);let o=this.unplaced,a=n?n.content:o.content,l=o.openStart-e,h=0,c=[],{match:u,type:d}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)c.push(i.child(e));u=u.matchFragment(i)}let p=a.size+e-(o.content.size-o.openEnd);for(;h<a.childCount;){let e=a.child(h),t=u.matchType(e.type);if(!t)break;(++h>1||0==l||e.content.size)&&(u=t,c.push(ei(e.mark(d.allowedMarks(e.marks)),1==h?l:0,h==a.childCount?p:-1)))}let f=h==a.childCount;f||(p=-1),this.placed=en(this.placed,t,r.FK.from(c)),this.frontier[t].match=u,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.Ji.empty:new r.Ji(et(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new r.Ji(et(o.content,e,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!es(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){t:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=es(e,t,r,n,i);if(s){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=es(e,n,r,t,!0);if(!i||i.childCount)continue t}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=en(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=en(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=en(this.placed,this.frontier.length,e))}}function et(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(et(e.firstChild.content,t-1,n)))}function en(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(en(e.lastChild.content,t-1,n)))}function er(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function ei(e,t,n){if(t<=0)return e;let i=e.content;return t>1&&(i=i.replaceChild(0,ei(i.firstChild,t-1,1==i.childCount?n-1:0))),t>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(r.FK.empty,!0)))),e.copy(i)}function es(e,t,n,r,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!eo(n,s.content,o)?a:null}function eo(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function ea(e){return e.spec.defining||e.spec.definingForContent}function el(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let s=e.doc.resolve(t),o=e.doc.resolve(n);if(Y(s,o,i))return e.step(new x(t,n,i));let a=ed(s,o);0==a[a.length-1]&&a.pop();let l=-(s.depth+1);a.unshift(l);for(let e=s.depth,t=s.pos-1;e>0;e--,t--){let n=s.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(e)>-1?l=e:s.before(e)==t&&a.splice(1,0,-e)}let h=a.indexOf(l),c=[],u=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==i.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=c[e],n=ea(t.type);if(n&&!t.sameMarkup(s.node(Math.abs(l)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let l=(t+u+1)%(i.openStart+1),d=c[l];if(d)for(let t=0;t<a.length;t++){let c=a[(t+h)%a.length],u=!0;c<0&&(u=!1,c=-c);let p=s.node(c-1),f=s.index(c-1);if(p.canReplaceWith(f,f,d.type,d.marks))return e.replace(s.before(c),u?o.after(c):n,new r.Ji(eh(i.content,0,i.openStart,l),l,i.openEnd))}}let d=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>d));r--){let e=a[r];e<0||(t=s.before(e),n=o.after(e))}}function eh(e,t,n,i,s){if(t<n){let r=e.firstChild;e=e.replaceChild(0,r.copy(eh(r.content,t+1,n,i,r)))}if(t>i){let t=s.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.FK.empty,!0))}return e}function ec(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=Z(e.doc,t,i.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.Ji(r.FK.from(i),0,0))}function eu(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let s=r.sharedDepth(n),o=!1;for(let e=r.depth;e>s;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>s;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let s=ed(r,i);for(let t=0;t<s.length;t++){let n=s[t],o=t==s.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function ed(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class ep extends _{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return y.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(i),0,+!t.isLeaf))}getMap(){return f.empty}invert(e){return new ep(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ep(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new ep(t.pos,t.attr,t.value)}}_.jsonID("attr",ep);class ef extends _{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return y.ok(n)}getMap(){return f.empty}invert(e){return new ef(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new ef(t.attr,t.value)}}_.jsonID("docAttr",ef);let em=class extends Error{};(em=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),em.prototype.constructor=em,em.prototype.name="TransformError";class eg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new m}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new em(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,s)=>{e=Math.min(e,i),t=Math.max(t,s)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.Ji.empty){let i=Q(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return el(this,e,t,n),this}replaceRangeWith(e,t,n){return ec(this,e,t,n),this}deleteRange(e,t){return eu(this,e,t),this}lift(e,t){return D(this,e,t),this}join(e,t=1){return K(this,e,t),this}wrap(e,t){return O(this,e,t),this}setBlockType(e,t=e,n,r=null){return z(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return q(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new ep(e,t,n)),this}setDocAttribute(e,t){return this.step(new ef(e,t)),this}addNodeMark(e,t){return this.step(new v(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.CU)t.isInSet(n.marks)&&this.step(new C(e,t));else{let r=n.marks,i,s=[];for(;i=t.isInSet(r);)s.push(new C(e,i)),r=i.removeFromSet(r);for(let e=s.length-1;e>=0;e--)this.step(s[e])}return this}split(e,t=1,n){return U(this,e,t,n),this}addMark(e,t,n){return E(this,e,t,n),this}removeMark(e,t,n){return M(this,e,t,n),this}clearIncompatible(e,t,n){return T(this,e,t,n),this}}},9921:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],s=(0,r.A)("chevron-up",i)},10762:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],s=(0,r.A)("terminal",i)},11019:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],s=(0,r.A)("message-circle-question-mark",i)},12612:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],s=(0,r.A)("file-diff",i)},12651:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],s=(0,r.A)("circle-check",i)},12894:(e,t,n)=>{"use strict";n.d(t,{K:()=>_,w:()=>g});for(var r={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:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="u">typeof navigator&&/Mac/.test(navigator.platform),o="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)r[48+a]=r[96+a]=String(a);for(var a=1;a<=24;a++)r[a+111]="F"+a;for(var a=65;a<=90;a++)r[a]=String.fromCharCode(a+32),i[a]=String.fromCharCode(a);for(var l in r)i.hasOwnProperty(l)||(i[l]=r[l]);function h(e){var t=!(s&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||o&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?i:r)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}var c=n(76865);let u="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="u">typeof navigator&&/Win/.test(navigator.platform);function p(e){let t,n,r,i,s=e.split(/-(?!$)/),o=s[s.length-1];"Space"==o&&(o=" ");for(let e=0;e<s.length-1;e++){let o=s[e];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))t=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))u?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return t&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}function f(e){let t=Object.create(null);for(let n in e)t[p(n)]=e[n];return t}function m(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function g(e){return new c.k_({props:{handleKeyDown:_(e)}})}function _(e){let t=f(e);return function(e,n){let i=h(n),s,o=t[m(i,n)];if(o&&o(e.state,e.dispatch,e))return!0;if(1==i.length&&" "!=i){if(n.shiftKey){let r=t[m(i,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(d&&n.ctrlKey&&n.altKey)&&(s=r[n.keyCode])&&s!=i){let r=t[m(s,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},13439:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>eu,hG:()=>eb});var r=n(12115),i=n(47650),s=n(8039),o=n(95155),a=n(82159);let{getOwnPropertyNames:l,getOwnPropertySymbols:h}=Object,{hasOwnProperty:c}=Object.prototype;function u(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function d(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);let{cache:i}=r,s=i.get(t),o=i.get(n);if(s&&o)return s===n&&o===t;i.set(t,n),i.set(n,t);let a=e(t,n,r);return i.delete(t),i.delete(n),a}}function p(e){return null!=e?e[Symbol.toStringTag]:void 0}function f(e){return l(e).concat(h(e))}let m=Object.hasOwn||((e,t)=>c.call(e,t));function g(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let _="__v",y="__o",b="_owner",{getOwnPropertyDescriptor:k,keys:w}=Object;function v(e,t){return e.byteLength===t.byteLength&&F(new Uint8Array(e),new Uint8Array(t))}function C(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function x(e,t){return e.byteLength===t.byteLength&&F(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function S(e,t){return g(e.getTime(),t.getTime())}function A(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function E(e,t){return e===t}function M(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),a=e.entries(),l=0;for(;(r=a.next())&&!r.done;){let s=t.entries(),a=!1,h=0;for(;(i=s.next())&&!i.done;){if(o[h]){h++;continue}let s=r.value,c=i.value;if(n.equals(s[0],c[0],l,h,e,t,n)&&n.equals(s[1],c[1],s[0],c[0],e,t,n)){a=o[h]=!0;break}h++}if(!a)return!1;l++}return!0}let T=g;function N(e,t,n){let r=w(e),i=r.length;if(w(t).length!==i)return!1;for(;i-- >0;)if(!O(e,t,n,r[i]))return!1;return!0}function I(e,t,n){let r,i,s,o=f(e),a=o.length;if(f(t).length!==a)return!1;for(;a-- >0;)if(!O(e,t,n,r=o[a])||(i=k(e,r),s=k(t,r),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function D(e,t){return g(e.valueOf(),t.valueOf())}function L(e,t){return e.source===t.source&&e.flags===t.flags}function R(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),a=e.values();for(;(r=a.next())&&!r.done;){let s=t.values(),a=!1,l=0;for(;(i=s.next())&&!i.done;){if(!o[l]&&n.equals(r.value,i.value,r.value,i.value,e,t,n)){a=o[l]=!0;break}l++}if(!a)return!1}return!0}function F(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function P(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function O(e,t,n,r){return(r===b||r===y||r===_)&&(!!e.$$typeof||!!t.$$typeof)||m(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}let z="[object ArrayBuffer]",B="[object Arguments]",$="[object Boolean]",j="[object DataView]",q="[object Date]",H="[object Error]",U="[object Map]",W="[object Number]",V="[object Object]",G="[object RegExp]",J="[object Set]",K="[object String]",Z={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},X="[object URL]",Q=Object.prototype.toString;function Y({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:h,areRegExpsEqual:c,areSetsEqual:u,areTypedArraysEqual:d,areUrlsEqual:f,unknownTagComparators:m}){return function(g,_,y){if(g===_)return!0;if(null==g||null==_)return!1;let b=typeof g;if(b!==typeof _)return!1;if("object"!==b)return"number"===b?a(g,_,y):"function"===b&&s(g,_,y);let k=g.constructor;if(k!==_.constructor)return!1;if(k===Object)return l(g,_,y);if(Array.isArray(g))return t(g,_,y);if(k===Date)return r(g,_,y);if(k===RegExp)return c(g,_,y);if(k===Map)return o(g,_,y);if(k===Set)return u(g,_,y);let w=Q.call(g);if(w===q)return r(g,_,y);if(w===G)return c(g,_,y);if(w===U)return o(g,_,y);if(w===J)return u(g,_,y);if(w===V)return"function"!=typeof g.then&&"function"!=typeof _.then&&l(g,_,y);if(w===X)return f(g,_,y);if(w===H)return i(g,_,y);if(w===B)return l(g,_,y);if(Z[w])return d(g,_,y);if(w===z)return e(g,_,y);if(w===j)return n(g,_,y);if(w===$||w===W||w===K)return h(g,_,y);if(m){let e=m[w];if(!e){let t=p(g);t&&(e=m[t])}if(e)return e(g,_,y)}return!1}}function ee({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:v,areArraysEqual:n?I:C,areDataViewsEqual:x,areDatesEqual:S,areErrorsEqual:A,areFunctionsEqual:E,areMapsEqual:n?u(M,I):M,areNumbersEqual:T,areObjectsEqual:n?I:N,arePrimitiveWrappersEqual:D,areRegExpsEqual:L,areSetsEqual:n?u(R,I):R,areTypedArraysEqual:n?u(F,I):F,areUrlsEqual:P,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=d(r.areArraysEqual),t=d(r.areMapsEqual),n=d(r.areObjectsEqual),i=d(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function et(e){return function(t,n,r,i,s,o,a){return e(t,n,a)}}function en({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,o){let{cache:a=e?new WeakMap:void 0,meta:l}=n();return t(s,o,{cache:a,equals:r,meta:l,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let s={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,s)}}let er=ei();function ei(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=Y(ee(e)),o=n?n(s):et(s);return en({circular:t,comparator:s,createState:r,equals:o,strict:i})}ei({strict:!0}),ei({circular:!0}),ei({circular:!0,strict:!0}),ei({createInternalComparator:()=>g}),ei({strict:!0,createInternalComparator:()=>g}),ei({circular:!0,createInternalComparator:()=>g}),ei({circular:!0,createInternalComparator:()=>g,strict:!0});var es=n(94577),eo=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},ea=({contentComponent:e})=>{let t=(0,s.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,o.jsx)(o.Fragment,{children:Object.values(t)})};function el(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,r){t={...t,[n]:i.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var eh=class extends r.Component{constructor(e){super(e),this.editorContentRef=r.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:e}),t.contentComponent=el(),t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;let t=this.props.editor;if(t){t.isEditorContentInitialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:eo(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&(0,o.jsx)(ea,{contentComponent:e.contentComponent})]})}},ec=(0,r.forwardRef)((e,t)=>{let n=r.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return r.createElement(eh,{key:n,innerRef:t,...e})}),eu=r.memo(ec),ed="u">typeof window?r.useLayoutEffect:r.useEffect,ep=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}};function ef(e){var t;let[n]=(0,r.useState)(()=>new ep(e.editor)),i=(0,es.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:er);return ed(()=>n.watch(e.editor),[e.editor,n]),(0,r.useDebugValue)(i),i}var em=!1,eg="u"<typeof window,e_=eg||!!("u">typeof window&&window.next),ey=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(void 0===this.options.current.immediatelyRender){if(eg||e_){if(em)throw Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&eg&&em)throw Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBeforeCreate)?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBlur)?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onCreate)?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDestroy)?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null==(n=(t=this.options.current).onFocus)?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onSelectionUpdate)?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null==(n=(t=this.options.current).onTransaction)?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onUpdate)?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null==(n=(t=this.options.current).onContentError)?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDrop)?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null==(n=(t=this.options.current).onPaste)?void 0:n.call(t,...e)},onDelete:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDelete)?void 0:n.call(t,...e)}};return new a.KE(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null==(r=t.extensions)?void 0:r[n])}):e[n]===t[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function eb(e={},t=[]){let n=(0,r.useRef)(e);n.current=e;let[i]=(0,r.useState)(()=>new ey(n)),o=(0,s.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,r.useDebugValue)(o),(0,r.useEffect)(i.onRender(t)),ef({editor:o,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),o}var ek=(0,r.createContext)({editor:null});ek.Consumer;var ew=(0,r.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),ev=()=>(0,r.useContext)(ew);r.forwardRef((e,t)=>{let{onDragStart:n}=ev(),r=e.as||"div";return(0,o.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}),r.createContext({markViewContentRef:()=>{}}),a.Db,a.Yv;var eC=(0,r.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});eC.displayName="TiptapContext";var ex=()=>(0,r.useContext)(eC);function eS({editor:e,instance:t,children:n}){let i=null!=e?e:t;if(!i)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let s=(0,r.useMemo)(()=>({editor:i}),[i]),a=(0,r.useMemo)(()=>({editor:i}),[i]);return(0,o.jsx)(ek.Provider,{value:a,children:(0,o.jsx)(eC.Provider,{value:s,children:n})})}function eA({...e}){let{editor:t}=ex();return(0,o.jsx)(eu,{editor:t,...e})}eS.displayName="Tiptap",eA.displayName="Tiptap.Content",Object.assign(eS,{Content:eA})},14066:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{TM:()=>Language,iX:()=>Parser});var C,TRANSFER_BUFFER,LANGUAGE_VERSION,MIN_COMPATIBLE_VERSION,process=__webpack_require__(41463),__defProp=Object.defineProperty,__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),Edit=class{static{__name(this,"Edit")}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:e,oldEndIndex:t,newEndIndex:n,startPosition:r,oldEndPosition:i,newEndPosition:s}){this.startIndex=e>>>0,this.oldEndIndex=t>>>0,this.newEndIndex=n>>>0,this.startPosition=r,this.oldEndPosition=i,this.newEndPosition=s}editPoint(e,t){let n=t,r={...e};if(t>=this.oldEndIndex){n=this.newEndIndex+(t-this.oldEndIndex);let i=e.row;r.row=this.newEndPosition.row+(e.row-this.oldEndPosition.row),r.column=i===this.oldEndPosition.row?this.newEndPosition.column+(e.column-this.oldEndPosition.column):e.column}else t>this.startIndex&&(n=this.newEndIndex,r.row=this.newEndPosition.row,r.column=this.newEndPosition.column);return{point:r,index:n}}editRange(e){let t={startIndex:e.startIndex,startPosition:{...e.startPosition},endIndex:e.endIndex,endPosition:{...e.endPosition}};return e.endIndex>=this.oldEndIndex?e.endIndex!==Number.MAX_SAFE_INTEGER&&(t.endIndex=this.newEndIndex+(e.endIndex-this.oldEndIndex),t.endPosition={row:this.newEndPosition.row+(e.endPosition.row-this.oldEndPosition.row),column:e.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(e.endPosition.column-this.oldEndPosition.column):e.endPosition.column},t.endIndex<this.newEndIndex&&(t.endIndex=Number.MAX_SAFE_INTEGER,t.endPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):e.endIndex>this.startIndex&&(t.endIndex=this.startIndex,t.endPosition={...this.startPosition}),e.startIndex>=this.oldEndIndex?(t.startIndex=this.newEndIndex+(e.startIndex-this.oldEndIndex),t.startPosition={row:this.newEndPosition.row+(e.startPosition.row-this.oldEndPosition.row),column:e.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(e.startPosition.column-this.oldEndPosition.column):e.startPosition.column},t.startIndex<this.newEndIndex&&(t.startIndex=Number.MAX_SAFE_INTEGER,t.startPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):e.startIndex>this.startIndex&&(t.startIndex=this.startIndex,t.startPosition={...this.startPosition}),t}},SIZE_OF_SHORT=2,SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},INTERNAL=Symbol("INTERNAL");function assertInternal(e){if(e!==INTERNAL)throw Error("Illegal constructor")}function isPoint(e){return!!e&&"number"==typeof e.row&&"number"==typeof e.column}function setModule(e){C=e}__name(assertInternal,"assertInternal"),__name(isPoint,"isPoint"),__name(setModule,"setModule");var LookaheadIterator=class{static{__name(this,"LookaheadIterator")}0=0;language;constructor(e,t,n){assertInternal(e),this[0]=t,this.language=n}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(e,t){return!!C._ts_lookahead_iterator_reset(this[0],e[0],t)&&(this.language=e,!0)}resetState(e){return!!C._ts_lookahead_iterator_reset_state(this[0],e)}[Symbol.iterator](){return{next:__name(()=>C._ts_lookahead_iterator_next(this[0])?{done:!1,value:this.currentType}:{done:!0,value:""},"next")}}};function getText(e,t,n,r){let i=n-t,s=e.textCallback(t,r);if(s){for(t+=s.length;t<n;){let n=e.textCallback(t,r);if(n&&n.length>0)t+=n.length,s+=n;else break}t>n&&(s=s.slice(0,i))}return s??""}__name(getText,"getText");var Tree=class _Tree{static{__name(this,"Tree")}0=0;textCallback;language;constructor(e,t,n,r){assertInternal(e),this[0]=t,this.language=n,this.textCallback=r}copy(){return new _Tree(INTERNAL,C._ts_tree_copy(this[0]),this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}rootNodeWithOffset(e,t){let n=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(n,e,"i32"),marshalPoint(n+SIZE_OF_INT,t),C._ts_tree_root_node_with_offset_wasm(this[0]),unmarshalNode(this)}edit(e){marshalEdit(e),C._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(e){if(!(e instanceof _Tree))throw TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],e[0]);let t=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=Array(t);if(t>0){let e=n;for(let n=0;n<t;n++)r[n]=unmarshalRange(e),e+=SIZE_OF_RANGE;C._free(n)}return r}getIncludedRanges(){C._ts_tree_included_ranges_wasm(this[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=Array(e);if(e>0){let r=t;for(let t=0;t<e;t++)n[t]=unmarshalRange(r),r+=SIZE_OF_RANGE;C._free(t)}return n}},TreeCursor=class _TreeCursor{static{__name(this,"TreeCursor")}0=0;1=0;2=0;3=0;tree;constructor(e,t){assertInternal(e),this.tree=t,unmarshalTreeCursor(this)}copy(){let e=new _TreeCursor(INTERNAL,this.tree);return C._ts_tree_cursor_copy_wasm(this.tree[0]),unmarshalTreeCursor(e),e}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}get currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}get currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return marshalTreeCursor(this),C._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){marshalTreeCursor(this);let e=C._ts_tree_cursor_start_index_wasm(this.tree[0]),t=C._ts_tree_cursor_end_index_wasm(this.tree[0]);C._ts_tree_cursor_start_position_wasm(this.tree[0]);let n=unmarshalPoint(TRANSFER_BUFFER);return getText(this.tree,e,t,n)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoLastChild(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoParent(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoNextSibling(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoPreviousSibling(){marshalTreeCursor(this);let e=C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoDescendant(e){marshalTreeCursor(this),C._ts_tree_cursor_goto_descendant_wasm(this.tree[0],e),unmarshalTreeCursor(this)}gotoFirstChildForIndex(e){marshalTreeCursor(this),C.setValue(TRANSFER_BUFFER+SIZE_OF_CURSOR,e,"i32");let t=C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===t}gotoFirstChildForPosition(e){marshalTreeCursor(this),marshalPoint(TRANSFER_BUFFER+SIZE_OF_CURSOR,e);let t=C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===t}reset(e){marshalNode(e),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}resetTo(e){marshalTreeCursor(this,TRANSFER_BUFFER),marshalTreeCursor(e,TRANSFER_BUFFER+SIZE_OF_CURSOR),C._ts_tree_cursor_reset_to_wasm(this.tree[0],e.tree[0]),unmarshalTreeCursor(this)}},Node=class{static{__name(this,"Node")}0=0;_children;_namedChildren;constructor(e,{id:t,tree:n,startIndex:r,startPosition:i,other:s}){assertInternal(e),this[0]=s,this.id=t,this.tree=n,this.startIndex=r,this.startPosition=i}id;startIndex;startPosition;tree;get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return marshalNode(this),C._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return marshalNode(this),1===C._ts_node_is_named_wasm(this.tree[0])}get isExtra(){return marshalNode(this),1===C._ts_node_is_extra_wasm(this.tree[0])}get isError(){return marshalNode(this),1===C._ts_node_is_error_wasm(this.tree[0])}get isMissing(){return marshalNode(this),1===C._ts_node_is_missing_wasm(this.tree[0])}get hasChanges(){return marshalNode(this),1===C._ts_node_has_changes_wasm(this.tree[0])}get hasError(){return marshalNode(this),1===C._ts_node_has_error_wasm(this.tree[0])}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get text(){return getText(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return marshalNode(this),C._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return marshalNode(this),C._ts_node_next_parse_state_wasm(this.tree[0])}equals(e){return this.tree===e.tree&&this.id===e.id}child(e){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],e),unmarshalNode(this.tree)}namedChild(e){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],e),unmarshalNode(this.tree)}childForFieldId(e){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],e),unmarshalNode(this.tree)}childForFieldName(e){let t=this.tree.language.fields.indexOf(e);return -1!==t?this.childForFieldId(t):null}fieldNameForChild(e){marshalNode(this);let t=C._ts_node_field_name_for_child_wasm(this.tree[0],e);return t?C.AsciiToString(t):null}fieldNameForNamedChild(e){marshalNode(this);let t=C._ts_node_field_name_for_named_child_wasm(this.tree[0],e);return t?C.AsciiToString(t):null}childrenForFieldName(e){let t=this.tree.language.fields.indexOf(e);return -1!==t&&0!==t?this.childrenForFieldId(t):[]}childrenForFieldId(e){marshalNode(this),C._ts_node_children_by_field_id_wasm(this.tree[0],e);let t=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=Array(t);if(t>0){let e=n;for(let n=0;n<t;n++)r[n]=unmarshalNode(this.tree,e),e+=SIZE_OF_NODE;C._free(n)}return r}firstChildForIndex(e){marshalNode(this);let t=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(t,e,"i32"),C._ts_node_first_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}firstNamedChildForIndex(e){marshalNode(this);let t=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(t,e,"i32"),C._ts_node_first_named_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._children=Array(e),e>0){let n=t;for(let t=0;t<e;t++)this._children[t]=unmarshalNode(this.tree,n),n+=SIZE_OF_NODE;C._free(t)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._namedChildren=Array(e),e>0){let n=t;for(let t=0;t<e;t++)this._namedChildren[t]=unmarshalNode(this.tree,n),n+=SIZE_OF_NODE;C._free(t)}}return this._namedChildren}descendantsOfType(e,t=ZERO_POINT,n=ZERO_POINT){Array.isArray(e)||(e=[e]);let r=[],i=this.tree.language.types;for(let t of e)"ERROR"==t&&r.push(65535);for(let t=0,n=i.length;t<n;t++)e.includes(i[t])&&r.push(t);let s=C._malloc(SIZE_OF_INT*r.length);for(let e=0,t=r.length;e<t;e++)C.setValue(s+e*SIZE_OF_INT,r[e],"i32");marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],s,r.length,t.row,t.column,n.row,n.column);let o=C.getValue(TRANSFER_BUFFER,"i32"),a=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),l=Array(o);if(o>0){let e=a;for(let t=0;t<o;t++)l[t]=unmarshalNode(this.tree,e),e+=SIZE_OF_NODE}return C._free(a),C._free(s),l}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get descendantCount(){return marshalNode(this),C._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}childWithDescendant(e){return marshalNode(this),marshalNode(e,1),C._ts_node_child_with_descendant_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw Error("Arguments must be numbers");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(n,e,"i32"),C.setValue(n+SIZE_OF_INT,t,"i32"),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw Error("Arguments must be numbers");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(n,e,"i32"),C.setValue(n+SIZE_OF_INT,t,"i32"),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(e,t=e){if(!isPoint(e)||!isPoint(t))throw Error("Arguments must be {row, column} objects");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(n,e),marshalPoint(n+SIZE_OF_POINT,t),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(e,t=e){if(!isPoint(e)||!isPoint(t))throw Error("Arguments must be {row, column} objects");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(n,e),marshalPoint(n+SIZE_OF_POINT,t),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}edit(e){if(this.startIndex>=e.oldEndIndex){let t,n;this.startIndex=e.newEndIndex+(this.startIndex-e.oldEndIndex),this.startPosition.row>e.oldEndPosition.row?(t=this.startPosition.row-e.oldEndPosition.row,n=this.startPosition.column):(t=0,n=this.startPosition.column,this.startPosition.column>=e.oldEndPosition.column&&(n=this.startPosition.column-e.oldEndPosition.column)),t>0?(this.startPosition.row+=t,this.startPosition.column=n):this.startPosition.column+=n}else this.startIndex>e.startIndex&&(this.startIndex=e.newEndIndex,this.startPosition.row=e.newEndPosition.row,this.startPosition.column=e.newEndPosition.column)}toString(){marshalNode(this);let e=C._ts_node_to_string_wasm(this.tree[0]),t=C.AsciiToString(e);return C._free(e),t}};function unmarshalCaptures(e,t,n,r,i){for(let s=0,o=i.length;s<o;s++){let o=C.getValue(n,"i32"),a=unmarshalNode(t,n+=SIZE_OF_INT);n+=SIZE_OF_NODE,i[s]={patternIndex:r,name:e.captureNames[o],node:a}}return n}function marshalNode(e,t=0){let n=TRANSFER_BUFFER+t*SIZE_OF_NODE;C.setValue(n,e.id,"i32"),n+=SIZE_OF_INT,C.setValue(n,e.startIndex,"i32"),n+=SIZE_OF_INT,C.setValue(n,e.startPosition.row,"i32"),n+=SIZE_OF_INT,C.setValue(n,e.startPosition.column,"i32"),n+=SIZE_OF_INT,C.setValue(n,e[0],"i32")}function unmarshalNode(e,t=TRANSFER_BUFFER){let n=C.getValue(t,"i32");if(t+=SIZE_OF_INT,0===n)return null;let r=C.getValue(t,"i32");t+=SIZE_OF_INT;let i=C.getValue(t,"i32");t+=SIZE_OF_INT;let s=C.getValue(t,"i32");return t+=SIZE_OF_INT,new Node(INTERNAL,{id:n,tree:e,startIndex:r,startPosition:{row:i,column:s},other:C.getValue(t,"i32")})}function marshalTreeCursor(e,t=TRANSFER_BUFFER){C.setValue(t+0*SIZE_OF_INT,e[0],"i32"),C.setValue(t+ +SIZE_OF_INT,e[1],"i32"),C.setValue(t+2*SIZE_OF_INT,e[2],"i32"),C.setValue(t+3*SIZE_OF_INT,e[3],"i32")}function unmarshalTreeCursor(e){e[0]=C.getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),e[1]=C.getValue(TRANSFER_BUFFER+ +SIZE_OF_INT,"i32"),e[2]=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),e[3]=C.getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,"i32")}function marshalPoint(e,t){C.setValue(e,t.row,"i32"),C.setValue(e+SIZE_OF_INT,t.column,"i32")}function unmarshalPoint(e){return{row:C.getValue(e,"i32")>>>0,column:C.getValue(e+SIZE_OF_INT,"i32")>>>0}}function marshalRange(e,t){marshalPoint(e,t.startPosition),marshalPoint(e+=SIZE_OF_POINT,t.endPosition),e+=SIZE_OF_POINT,C.setValue(e,t.startIndex,"i32"),e+=SIZE_OF_INT,C.setValue(e,t.endIndex,"i32")}function unmarshalRange(e){let t={};return t.startPosition=unmarshalPoint(e),t.endPosition=unmarshalPoint(e+=SIZE_OF_POINT),e+=SIZE_OF_POINT,t.startIndex=C.getValue(e,"i32")>>>0,e+=SIZE_OF_INT,t.endIndex=C.getValue(e,"i32")>>>0,t}function marshalEdit(e,t=TRANSFER_BUFFER){marshalPoint(t,e.startPosition),marshalPoint(t+=SIZE_OF_POINT,e.oldEndPosition),marshalPoint(t+=SIZE_OF_POINT,e.newEndPosition),t+=SIZE_OF_POINT,C.setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,C.setValue(t,e.oldEndIndex,"i32"),t+=SIZE_OF_INT,C.setValue(t,e.newEndIndex,"i32")}function unmarshalLanguageMetadata(e){let t=C.getValue(e,"i32");return{major_version:t,minor_version:C.getValue(e+=SIZE_OF_INT,"i32"),patch_version:C.getValue(e+=SIZE_OF_INT,"i32")}}__name(unmarshalCaptures,"unmarshalCaptures"),__name(marshalNode,"marshalNode"),__name(unmarshalNode,"unmarshalNode"),__name(marshalTreeCursor,"marshalTreeCursor"),__name(unmarshalTreeCursor,"unmarshalTreeCursor"),__name(marshalPoint,"marshalPoint"),__name(unmarshalPoint,"unmarshalPoint"),__name(marshalRange,"marshalRange"),__name(unmarshalRange,"unmarshalRange"),__name(marshalEdit,"marshalEdit"),__name(unmarshalLanguageMetadata,"unmarshalLanguageMetadata");var LANGUAGE_FUNCTION_REGEX=/^tree_sitter_\w+$/,Language=class _Language{static{__name(this,"Language")}0=0;types;fields;constructor(e,t){assertInternal(e),this[0]=t,this.types=Array(C._ts_language_symbol_count(this[0]));for(let e=0,t=this.types.length;e<t;e++)2>C._ts_language_symbol_type(this[0],e)&&(this.types[e]=C.UTF8ToString(C._ts_language_symbol_name(this[0],e)));this.fields=Array(C._ts_language_field_count(this[0])+1);for(let e=0,t=this.fields.length;e<t;e++){const t=C._ts_language_field_name_for_id(this[0],e);0!==t?this.fields[e]=C.UTF8ToString(t):this.fields[e]=null}}get name(){let e=C._ts_language_name(this[0]);return 0===e?null:C.UTF8ToString(e)}get abiVersion(){return C._ts_language_abi_version(this[0])}get metadata(){return(C._ts_language_metadata_wasm(this[0]),0===C.getValue(TRANSFER_BUFFER,"i32"))?null:unmarshalLanguageMetadata(TRANSFER_BUFFER+SIZE_OF_INT)}get fieldCount(){return this.fields.length-1}get stateCount(){return C._ts_language_state_count(this[0])}fieldIdForName(e){let t=this.fields.indexOf(e);return -1!==t?t:null}fieldNameForId(e){return this.fields[e]??null}idForNodeType(e,t){let n=C.lengthBytesUTF8(e),r=C._malloc(n+1);C.stringToUTF8(e,r,n+1);let i=C._ts_language_symbol_for_name(this[0],r,n,+!!t);return C._free(r),i||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(e){let t=C._ts_language_symbol_name(this[0],e);return t?C.UTF8ToString(t):null}nodeTypeIsNamed(e){return!!C._ts_language_type_is_named_wasm(this[0],e)}nodeTypeIsVisible(e){return!!C._ts_language_type_is_visible_wasm(this[0],e)}get supertypes(){C._ts_language_supertypes_wasm(this[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=Array(e);if(e>0){let r=t;for(let t=0;t<e;t++)n[t]=C.getValue(r,"i16"),r+=SIZE_OF_SHORT}return n}subtypes(e){C._ts_language_subtypes_wasm(this[0],e);let t=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=Array(t);if(t>0){let e=n;for(let n=0;n<t;n++)r[n]=C.getValue(e,"i16"),e+=SIZE_OF_SHORT}return r}nextState(e,t){return C._ts_language_next_state(this[0],e,t)}lookaheadIterator(e){let t=C._ts_lookahead_iterator_new(this[0],e);return t?new LookaheadIterator(INTERNAL,t,this):null}static async load(e){let t;if(e instanceof Uint8Array)t=e;else if(globalThis.process?.versions.node){let n=await __webpack_require__.e(480).then(__webpack_require__.t.bind(__webpack_require__,80480,19));t=await n.readFile(e)}else{let n=await fetch(e);if(!n.ok){let e=await n.text();throw Error(`Language.load failed with status ${n.status}.
|
|
5
|
+
|
|
6
|
+
${e}`)}let r=n.clone();try{t=await WebAssembly.compileStreaming(n)}catch(e){console.error("wasm streaming compile failed:",e),console.error("falling back to ArrayBuffer instantiation"),t=new Uint8Array(await r.arrayBuffer())}}let n=await C.loadWebAssemblyModule(t,{loadAsync:!0}),r=Object.keys(n),i=r.find(e=>LANGUAGE_FUNCTION_REGEX.test(e)&&!e.includes("external_scanner_"));if(!i)throw console.log(`Couldn't find language function in Wasm file. Symbols:
|
|
7
|
+
${JSON.stringify(r,null,2)}`),Error("Language.load failed: no language function found in Wasm file");return new _Language(INTERNAL,n[i]())}};async function Module2(moduleArg={}){var moduleRtn,readAsync,readBinary,wasmBinary,EXITSTATUS,readyPromiseResolve,readyPromiseReject,wasmMemory,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,HEAP_DATA_VIEW,wasmBinaryFile,functionsInTableMap,_malloc,_calloc,_realloc,_free,_ts_range_edit,_memcmp,_ts_language_symbol_count,_ts_language_state_count,_ts_language_abi_version,_ts_language_name,_ts_language_field_count,_ts_language_next_state,_ts_language_symbol_name,_ts_language_symbol_for_name,_strncmp,_ts_language_symbol_type,_ts_language_field_name_for_id,_ts_lookahead_iterator_new,_ts_lookahead_iterator_delete,_ts_lookahead_iterator_reset_state,_ts_lookahead_iterator_reset,_ts_lookahead_iterator_next,_ts_lookahead_iterator_current_symbol,_ts_point_edit,_ts_parser_delete,_ts_parser_reset,_ts_parser_set_language,_ts_parser_set_included_ranges,_ts_query_new,_ts_query_delete,_iswspace,_iswalnum,_ts_query_pattern_count,_ts_query_capture_count,_ts_query_string_count,_ts_query_capture_name_for_id,_ts_query_capture_quantifier_for_id,_ts_query_string_value_for_id,_ts_query_predicates_for_pattern,_ts_query_start_byte_for_pattern,_ts_query_end_byte_for_pattern,_ts_query_is_pattern_rooted,_ts_query_is_pattern_non_local,_ts_query_is_pattern_guaranteed_at_step,_ts_query_disable_capture,_ts_query_disable_pattern,_ts_tree_copy,_ts_tree_delete,_ts_init,_ts_parser_new_wasm,_ts_parser_enable_logger_wasm,_ts_parser_parse_wasm,_ts_parser_included_ranges_wasm,_ts_language_type_is_named_wasm,_ts_language_type_is_visible_wasm,_ts_language_metadata_wasm,_ts_language_supertypes_wasm,_ts_language_subtypes_wasm,_ts_tree_root_node_wasm,_ts_tree_root_node_with_offset_wasm,_ts_tree_edit_wasm,_ts_tree_included_ranges_wasm,_ts_tree_get_changed_ranges_wasm,_ts_tree_cursor_new_wasm,_ts_tree_cursor_copy_wasm,_ts_tree_cursor_delete_wasm,_ts_tree_cursor_reset_wasm,_ts_tree_cursor_reset_to_wasm,_ts_tree_cursor_goto_first_child_wasm,_ts_tree_cursor_goto_last_child_wasm,_ts_tree_cursor_goto_first_child_for_index_wasm,_ts_tree_cursor_goto_first_child_for_position_wasm,_ts_tree_cursor_goto_next_sibling_wasm,_ts_tree_cursor_goto_previous_sibling_wasm,_ts_tree_cursor_goto_descendant_wasm,_ts_tree_cursor_goto_parent_wasm,_ts_tree_cursor_current_node_type_id_wasm,_ts_tree_cursor_current_node_state_id_wasm,_ts_tree_cursor_current_node_is_named_wasm,_ts_tree_cursor_current_node_is_missing_wasm,_ts_tree_cursor_current_node_id_wasm,_ts_tree_cursor_start_position_wasm,_ts_tree_cursor_end_position_wasm,_ts_tree_cursor_start_index_wasm,_ts_tree_cursor_end_index_wasm,_ts_tree_cursor_current_field_id_wasm,_ts_tree_cursor_current_depth_wasm,_ts_tree_cursor_current_descendant_index_wasm,_ts_tree_cursor_current_node_wasm,_ts_node_symbol_wasm,_ts_node_field_name_for_child_wasm,_ts_node_field_name_for_named_child_wasm,_ts_node_children_by_field_id_wasm,_ts_node_first_child_for_byte_wasm,_ts_node_first_named_child_for_byte_wasm,_ts_node_grammar_symbol_wasm,_ts_node_child_count_wasm,_ts_node_named_child_count_wasm,_ts_node_child_wasm,_ts_node_named_child_wasm,_ts_node_child_by_field_id_wasm,_ts_node_next_sibling_wasm,_ts_node_prev_sibling_wasm,_ts_node_next_named_sibling_wasm,_ts_node_prev_named_sibling_wasm,_ts_node_descendant_count_wasm,_ts_node_parent_wasm,_ts_node_child_with_descendant_wasm,_ts_node_descendant_for_index_wasm,_ts_node_named_descendant_for_index_wasm,_ts_node_descendant_for_position_wasm,_ts_node_named_descendant_for_position_wasm,_ts_node_start_point_wasm,_ts_node_end_point_wasm,_ts_node_start_index_wasm,_ts_node_end_index_wasm,_ts_node_to_string_wasm,_ts_node_children_wasm,_ts_node_named_children_wasm,_ts_node_descendants_of_type_wasm,_ts_node_is_named_wasm,_ts_node_has_changes_wasm,_ts_node_has_error_wasm,_ts_node_is_error_wasm,_ts_node_is_missing_wasm,_ts_node_is_extra_wasm,_ts_node_parse_state_wasm,_ts_node_next_parse_state_wasm,_ts_query_matches_wasm,_ts_query_captures_wasm,_memset,_memcpy,_memmove,_iswalpha,_iswblank,_iswdigit,_iswlower,_iswupper,_iswxdigit,_memchr,_strlen,_strcmp,_strncat,_strncpy,_towlower,_towupper,_setThrew,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___wasm_apply_data_relocs,wasmExports,Module=moduleArg,ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="u">typeof WorkerGlobalScope,ENVIRONMENT_IS_NODE="object"==typeof process&&void 0;if(ENVIRONMENT_IS_NODE){let{createRequire}=await __webpack_require__.e(6358).then(__webpack_require__.t.bind(__webpack_require__,86358,19));var require=createRequire("file:///home/runner/work/cockpit/cockpit/node_modules/web-tree-sitter/web-tree-sitter.js")}Module.currentQueryProgressCallback=null,Module.currentProgressCallback=null,Module.currentLogCallback=null,Module.currentParseCallback=null;var arguments_=[],thisProgram="./this.program",quit_=__name((e,t)=>{throw t},"quit_"),_scriptName="file:///home/runner/work/cockpit/cockpit/node_modules/web-tree-sitter/web-tree-sitter.js",scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}if(__name(locateFile,"locateFile"),ENVIRONMENT_IS_NODE){var fs=require("fs");_scriptName.startsWith("file:")&&(scriptDirectory=require("path").dirname(require("url").fileURLToPath(_scriptName))+"/"),readBinary=__name(e=>(e=isFileURI(e)?new URL(e):e,fs.readFileSync(e)),"readBinary"),readAsync=__name(async(e,t=!0)=>(e=isFileURI(e)?new URL(e):e,fs.readFileSync(e,t?void 0:"utf8")),"readAsync"),process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=__name((e,t)=>{throw process.exitCode=e,t},"quit_")}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}ENVIRONMENT_IS_WORKER&&(readBinary=__name(e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},"readBinary")),readAsync=__name(async e=>{if(isFileURI(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw Error(t.status+" : "+t.url)},"readAsync")}var out=console.log.bind(console),err=console.error.bind(console),dynamicLibraries=[],ABORT=!1,isFileURI=__name(e=>e.startsWith("file://"),"isFileURI"),runtimeInitialized=!1;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e),Module.HEAP64=HEAP64=new BigInt64Array(e),Module.HEAPU64=HEAPU64=new BigUint64Array(e),Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(e),LE_HEAP_UPDATE()}function initMemory(){if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var e=Module.INITIAL_MEMORY||0x2000000;wasmMemory=new WebAssembly.Memory({initial:e/65536,maximum:32768})}updateMemoryViews()}__name(updateMemoryViews,"updateMemoryViews"),__name(initMemory,"initMemory");var __RELOC_FUNCS__=[];function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),wasmExports.__wasm_call_ctors(),callRuntimeCallbacks(onPostCtors)}function preMain(){}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}function abort(e){Module.onAbort?.(e),err(e="Aborted("+e+")"),ABORT=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw readyPromiseReject?.(t),t}function findWasmBinary(){return Module.locateFile?locateFile("web-tree-sitter.wasm"):new __webpack_require__.U(__webpack_require__(76022)).href}function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(e){if(!wasmBinary)try{var t=await readAsync(e);return new Uint8Array(t)}catch{}return getBinarySync(e)}async function instantiateArrayBuffer(e,t){try{var n=await getWasmBinary(e);return await WebAssembly.instantiate(n,t)}catch(e){err(`failed to asynchronously prepare wasm: ${e}`),abort(e)}}async function instantiateAsync(e,t,n){if(!e&&!isFileURI(t)&&!ENVIRONMENT_IS_NODE)try{var r=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,n)}catch(e){err(`wasm streaming compile failed: ${e}`),err("falling back to ArrayBuffer instantiation")}return instantiateArrayBuffer(t,n)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}async function createWasm(){function e(e,t){wasmExports=relocateExports(wasmExports=e.exports,1024);var n=getDylinkMetadata(t);return n.neededDynlibs&&(dynamicLibraries=n.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),assignWasmExports(wasmExports),wasmExports}function t(t){return e(t.instance,t.module)}__name(e,"receiveInstance"),__name(t,"receiveInstantiationResult");var n=getWasmImports();return Module.instantiateWasm?new Promise((t,r)=>{Module.instantiateWasm(n,(n,r)=>{t(e(n,r))})}):(wasmBinaryFile??=findWasmBinary(),t(await instantiateAsync(wasmBinary,wasmBinaryFile,n)))}__name(preRun,"preRun"),__name(initRuntime,"initRuntime"),__name(preMain,"preMain"),__name(postRun,"postRun"),__name(abort,"abort"),__name(findWasmBinary,"findWasmBinary"),__name(getBinarySync,"getBinarySync"),__name(getWasmBinary,"getWasmBinary"),__name(instantiateArrayBuffer,"instantiateArrayBuffer"),__name(instantiateAsync,"instantiateAsync"),__name(getWasmImports,"getWasmImports"),__name(createWasm,"createWasm");class ExitStatus{static{__name(this,"ExitStatus")}name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,t){var n=GOT[t];return n||(n=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(n.required=!0),n}},LE_ATOMICS_NATIVE_BYTE_ORDER=[],LE_HEAP_LOAD_F32=__name(e=>HEAP_DATA_VIEW.getFloat32(e,!0),"LE_HEAP_LOAD_F32"),LE_HEAP_LOAD_F64=__name(e=>HEAP_DATA_VIEW.getFloat64(e,!0),"LE_HEAP_LOAD_F64"),LE_HEAP_LOAD_I16=__name(e=>HEAP_DATA_VIEW.getInt16(e,!0),"LE_HEAP_LOAD_I16"),LE_HEAP_LOAD_I32=__name(e=>HEAP_DATA_VIEW.getInt32(e,!0),"LE_HEAP_LOAD_I32"),LE_HEAP_LOAD_I64=__name(e=>HEAP_DATA_VIEW.getBigInt64(e,!0),"LE_HEAP_LOAD_I64"),LE_HEAP_LOAD_U32=__name(e=>HEAP_DATA_VIEW.getUint32(e,!0),"LE_HEAP_LOAD_U32"),LE_HEAP_STORE_F32=__name((e,t)=>HEAP_DATA_VIEW.setFloat32(e,t,!0),"LE_HEAP_STORE_F32"),LE_HEAP_STORE_F64=__name((e,t)=>HEAP_DATA_VIEW.setFloat64(e,t,!0),"LE_HEAP_STORE_F64"),LE_HEAP_STORE_I16=__name((e,t)=>HEAP_DATA_VIEW.setInt16(e,t,!0),"LE_HEAP_STORE_I16"),LE_HEAP_STORE_I32=__name((e,t)=>HEAP_DATA_VIEW.setInt32(e,t,!0),"LE_HEAP_STORE_I32"),LE_HEAP_STORE_I64=__name((e,t)=>HEAP_DATA_VIEW.setBigInt64(e,t,!0),"LE_HEAP_STORE_I64"),LE_HEAP_STORE_U32=__name((e,t)=>HEAP_DATA_VIEW.setUint32(e,t,!0),"LE_HEAP_STORE_U32"),callRuntimeCallbacks=__name(e=>{for(;e.length>0;)e.shift()(Module)},"callRuntimeCallbacks"),onPostRuns=[],addOnPostRun=__name(e=>onPostRuns.push(e),"addOnPostRun"),onPreRuns=[],addOnPreRun=__name(e=>onPreRuns.push(e),"addOnPreRun"),UTF8Decoder="u">typeof TextDecoder?new TextDecoder:void 0,findStringEnd=__name((e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},"findStringEnd"),UTF8ArrayToString=__name((e,t=0,n,r)=>{var i=findStringEnd(e,t,n,r);if(i-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,i));for(var s="";t<i;){var o=e[t++];if(!(128&o)){s+=String.fromCharCode(o);continue}var a=63&e[t++];if((224&o)==192){s+=String.fromCharCode((31&o)<<6|a);continue}var l=63&e[t++];if((o=(240&o)==224?(15&o)<<12|a<<6|l:(7&o)<<18|a<<12|l<<6|63&e[t++])<65536)s+=String.fromCharCode(o);else{var h=o-65536;s+=String.fromCharCode(55296|h>>10,56320|1023&h)}}return s},"UTF8ArrayToString"),getDylinkMetadata=__name(e=>{var t=0,n=0;function r(){return e[t++]}function i(){for(var n=0,r=1;;){var i=e[t++];if(n+=(127&i)*r,r*=128,!(128&i))break}return n}function s(){var n=i();return t+=n,UTF8ArrayToString(e,t-n,n)}function o(){for(var e=i(),t=[];e--;)t.push(s());return t}function a(e,t){if(e)throw Error(t)}if(__name(r,"getU8"),__name(i,"getLEB"),__name(s,"getString"),__name(o,"getStringList"),__name(a,"failIf"),e instanceof WebAssembly.Module){var l=WebAssembly.Module.customSections(e,"dylink.0");a(0===l.length,"need dylink section"),n=(e=new Uint8Array(l[0])).length}else{var h=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer);a(0x6d736100!=h[0]&&6386541!=h[0],"need to see wasm magic number"),a(0!==e[8],"need the dylink section to be first"),t=9;var c=i();n=t+c,a("dylink.0"!==s())}for(var u={neededDynlibs:[],tlsExports:new Set,weakImports:new Set,runtimePaths:[]},d=1,p=2,f=3,m=4,g=5,_=256,y=3,b=1;t<n;){var k=r(),w=i();if(k===d)u.memorySize=i(),u.memoryAlign=i(),u.tableSize=i(),u.tableAlign=i();else if(k===p)u.neededDynlibs=o();else if(k===f)for(var v=i();v--;){var C=s(),x=i();x&_&&u.tlsExports.add(C)}else if(k===m)for(var v=i();v--;){s();var C=s(),x=i();(x&y)==b&&u.weakImports.add(C)}else k===g?u.runtimePaths=o():t+=w}return u},"getDylinkMetadata");function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return HEAP8[e];case"i16":return LE_HEAP_LOAD_I16((e>>1)*2);case"i32":return LE_HEAP_LOAD_I32((e>>2)*4);case"i64":return LE_HEAP_LOAD_I64((e>>3)*8);case"float":return LE_HEAP_LOAD_F32((e>>2)*4);case"double":return LE_HEAP_LOAD_F64((e>>3)*8);case"*":return LE_HEAP_LOAD_U32((e>>2)*4);default:abort(`invalid type for getValue: ${t}`)}}__name(getValue,"getValue");var newDSO=__name((e,t,n)=>{var r={refcount:1/0,name:e,exports:n,global:!0};return LDSO.loadedLibsByName[e]=r,void 0!=t&&(LDSO.loadedLibsByHandle[t]=r),r},"newDSO"),LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=78240,alignMemory=__name((e,t)=>Math.ceil(e/t)*t,"alignMemory"),getMemory=__name(e=>{if(runtimeInitialized)return _calloc(e,1);var t=___heap_base,n=t+alignMemory(e,16);return ___heap_base=n,GOT.__heap_base.value=n,t},"getMemory"),isInternalSym=__name(e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),"isInternalSym"),uleb128EncodeWithLen=__name(e=>{let t=e.length;return[t%128|128,t>>7,...e]},"uleb128EncodeWithLen"),wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111},generateTypePack=__name(e=>uleb128EncodeWithLen(Array.from(e,e=>wasmTypeCodes[e])),"generateTypePack"),convertJsFunctionToWasm=__name((e,t)=>{var n=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(t.slice(1)),...generateTypePack("v"===t[0]?"":t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),r=new WebAssembly.Module(n);return new WebAssembly.Instance(r,{e:{f:e}}).exports.f},"convertJsFunctionToWasm"),wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:31,element:"anyfunc"}),getWasmTableEntry=__name(e=>{var t=wasmTableMirror[e];return t||(wasmTableMirror[e]=t=wasmTable.get(e)),t},"getWasmTableEntry"),updateTableMap=__name((e,t)=>{if(functionsInTableMap)for(var n=e;n<e+t;n++){var r=getWasmTableEntry(n);r&&functionsInTableMap.set(r,n)}},"updateTableMap"),getFunctionAddress=__name(e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),"getFunctionAddress"),freeTableIndexes=[],getEmptyTableSlot=__name(()=>freeTableIndexes.length?freeTableIndexes.pop():wasmTable.grow(1),"getEmptyTableSlot"),setWasmTableEntry=__name((e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},"setWasmTableEntry"),addFunction=__name((e,t)=>{var n=getFunctionAddress(e);if(n)return n;var r=getEmptyTableSlot();try{setWasmTableEntry(r,e)}catch(n){if(!(n instanceof TypeError))throw n;setWasmTableEntry(r,convertJsFunctionToWasm(e,t))}return functionsInTableMap.set(e,r),r},"addFunction"),updateGOT=__name((e,t)=>{for(var n in e)if(!isInternalSym(n)){var r=e[n];GOT[n]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||0==GOT[n].value)&&("function"==typeof r?GOT[n].value=addFunction(r):"number"==typeof r?GOT[n].value=r:err(`unhandled export type for '${n}': ${typeof r}`))}},"updateGOT"),relocateExports=__name((e,t,n)=>{var r={};for(var i in e){var s=e[i];"object"==typeof s&&(s=s.value),"number"==typeof s&&(s+=t),r[i]=s}return updateGOT(r,n),r},"relocateExports"),isSymbolDefined=__name(e=>{var t=wasmImports[e];return!!t&&!t.stub},"isSymbolDefined"),dynCall=__name((e,t,n=[],r=!1)=>{var i=getWasmTableEntry(t)(...n);function s(e){return e}return __name(s,"convert"),s(i)},"dynCall"),stackSave=__name(()=>_emscripten_stack_get_current(),"stackSave"),stackRestore=__name(e=>__emscripten_stack_restore(e),"stackRestore"),createInvokeFunction=__name(e=>(t,...n)=>{var r=stackSave();try{return dynCall(e,t,n)}catch(t){if(stackRestore(r),t!==t+0)throw t;if(_setThrew(1,0),"j"==e[0])return 0n}},"createInvokeFunction"),resolveGlobalSymbol=__name((e,t=!1)=>{var n;return isSymbolDefined(e)?n=wasmImports[e]:e.startsWith("invoke_")&&(n=wasmImports[e]=createInvokeFunction(e.split("_")[1])),{sym:n,name:e}},"resolveGlobalSymbol"),onPostCtors=[],addOnPostCtor=__name(e=>onPostCtors.push(e),"addOnPostCtor"),UTF8ToString=__name((e,t,n)=>e?UTF8ArrayToString(HEAPU8,e,t,n):"","UTF8ToString"),loadWebAssemblyModule=__name((binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);function loadModule(){var moduleExports,memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}handle&&(HEAP8[handle+8]=1,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,metadata.tableSize)),metadata.tableSize&&wasmTable.grow(metadata.tableSize),__name(resolveSymbol,"resolveSymbol");var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub){var n;return wasmImports[t]}return t in e||(e[t]=(...e)=>(n||=resolveSymbol(t))(...e)),e[t]}},proxy=new Proxy({},proxyHandler);currentModuleWeakSymbols=metadata.weakImports;var info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){function addEmAsm(addr,body){for(var args=[],arity=0;arity<16;arity++)if(-1!=body.indexOf("$"+arity))args.push("$"+arity);else break;args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if(updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols(),__name(addEmAsm,"addEmAsm"),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),"void"!=cSig)for(var i in cSig=cSig.split(",")){var jsArg=cSig[i].split(" ").pop();jsArgs.push(jsArg.replace("*",""))}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}for(var name in __name(addEmJs,"addEmJs"),moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():addOnPostCtor(init)),moduleExports}if(__name(postInstantiation,"postInstantiation"),flags.loadAsync)return(async()=>{var e;return binary instanceof WebAssembly.Module?e=new WebAssembly.Instance(binary,info):{module:binary,instance:e}=await WebAssembly.instantiate(binary,info),postInstantiation(binary,e)})();var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return(__name(loadModule,"loadModule"),flags={...flags,rpath:{parentLibPath:libName,paths:metadata.runtimePaths}},flags.loadAsync)?metadata.neededDynlibs.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},"loadWebAssemblyModule"),mergeLibSymbols=__name((e,t)=>{for(var[n,r]of Object.entries(e)){let e=__name(e=>{isSymbolDefined(e)||(wasmImports[e]=r)},"setImport");e(n);let t="__main_argc_argv";"main"==n&&e(t),n==t&&e("main")}},"mergeLibSymbols"),asyncLoad=__name(async e=>new Uint8Array(await readAsync(e)),"asyncLoad");function loadDynamicLibrary(e,t={global:!0,nodelete:!0},n,r){var i=LDSO.loadedLibsByName[e];if(i)return t.global?i.global||(i.global=!0,mergeLibSymbols(i.exports,e)):n&&Object.assign(n,i.exports),t.nodelete&&i.refcount!==1/0&&(i.refcount=1/0),i.refcount++,r&&(LDSO.loadedLibsByHandle[r]=i),!t.loadAsync||Promise.resolve(!0);function s(){if(r){var n=LE_HEAP_LOAD_U32((r+28>>2)*4),i=LE_HEAP_LOAD_U32((r+32>>2)*4);if(n&&i){var s=HEAP8.slice(n,n+i);return t.loadAsync?Promise.resolve(s):s}}var o=locateFile(e);if(t.loadAsync)return asyncLoad(o);if(!readBinary)throw Error(`${o}: file not found, and synchronous loading of external files is not available`);return readBinary(o)}function o(){return t.loadAsync?s().then(i=>loadWebAssemblyModule(i,t,e,n,r)):loadWebAssemblyModule(s(),t,e,n,r)}function a(t){i.global?mergeLibSymbols(t,e):n&&Object.assign(n,t),i.exports=t}return((i=newDSO(e,r,"loading")).refcount=t.nodelete?1/0:1,i.global=t.global,__name(s,"loadLibData"),__name(o,"getExports"),__name(a,"moduleLoaded"),t.loadAsync)?o().then(e=>(a(e),!0)):(a(o()),!0)}__name(loadDynamicLibrary,"loadDynamicLibrary");var reportUndefinedSymbols=__name(()=>{for(var[e,t]of Object.entries(GOT))if(0==t.value){var n=resolveGlobalSymbol(e,!0).sym;if(!n&&!t.required)continue;if("function"==typeof n)t.value=addFunction(n,n.sig);else if("number"==typeof n)t.value=n;else throw Error(`bad export type for '${e}': ${typeof n}`)}},"reportUndefinedSymbols"),runDependencies=0,dependenciesFulfilled=null,removeRunDependency=__name(e=>{if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}},"removeRunDependency"),addRunDependency=__name(e=>{runDependencies++,Module.monitorRunDependencies?.(runDependencies)},"addRunDependency"),loadDylibs=__name(async()=>{if(!dynamicLibraries.length)return void reportUndefinedSymbols();for(var e of(addRunDependency("loadDylibs"),dynamicLibraries))await loadDynamicLibrary(e,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0});reportUndefinedSymbols(),removeRunDependency("loadDylibs")},"loadDylibs"),noExitRuntime=!0;function setValue(e,t,n="i8"){switch(n.endsWith("*")&&(n="*"),n){case"i1":case"i8":HEAP8[e]=t;break;case"i16":LE_HEAP_STORE_I16((e>>1)*2,t);break;case"i32":LE_HEAP_STORE_I32((e>>2)*4,t);break;case"i64":LE_HEAP_STORE_I64((e>>3)*8,BigInt(t));break;case"float":LE_HEAP_STORE_F32((e>>2)*4,t);break;case"double":LE_HEAP_STORE_F64((e>>3)*8,t);break;case"*":LE_HEAP_STORE_U32((e>>2)*4,t);break;default:abort(`invalid type for setValue: ${n}`)}}__name(setValue,"setValue");var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=78240,___stack_low=12704,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78240),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=__name(()=>abort(""),"__abort_js");__abort_js.sig="v";var getHeapMax=__name(()=>0x80000000,"getHeapMax"),growMemory=__name(e=>{var t=(e-wasmMemory.buffer.byteLength+65535)/65536|0;try{return wasmMemory.grow(t),updateMemoryViews(),1}catch(e){}},"growMemory"),_emscripten_resize_heap=__name(e=>{var t=HEAPU8.length;e>>>=0;var n=getHeapMax();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+0x6000000),growMemory(Math.min(n,alignMemory(Math.max(e,i),65536))))return!0}return!1},"_emscripten_resize_heap");_emscripten_resize_heap.sig="ip";var _fd_close=__name(e=>52,"_fd_close");_fd_close.sig="ii";var INT53_MAX=0x20000000000000,INT53_MIN=-0x20000000000000,bigintToI53Checked=__name(e=>e<INT53_MIN||e>INT53_MAX?NaN:Number(e),"bigintToI53Checked");function _fd_seek(e,t,n,r){return t=bigintToI53Checked(t),70}__name(_fd_seek,"_fd_seek"),_fd_seek.sig="iijip";var printCharBuffers=[null,[],[]],printChar=__name((e,t)=>{var n=printCharBuffers[e];0===t||10===t?((1===e?out:err)(UTF8ArrayToString(n)),n.length=0):n.push(t)},"printChar"),_fd_write=__name((e,t,n,r)=>{for(var i=0,s=0;s<n;s++){var o=LE_HEAP_LOAD_U32((t>>2)*4),a=LE_HEAP_LOAD_U32((t+4>>2)*4);t+=8;for(var l=0;l<a;l++)printChar(e,HEAPU8[o+l]);i+=a}return LE_HEAP_STORE_U32((r>>2)*4,i),0},"_fd_write");function _tree_sitter_log_callback(e,t){if(Module.currentLogCallback){let n=UTF8ToString(t);Module.currentLogCallback(n,0!==e)}}function _tree_sitter_parse_callback(e,t,n,r,i){let s=10240,o=Module.currentParseCallback(t,{row:n,column:r});"string"==typeof o?(setValue(i,o.length,"i32"),stringToUTF16(o,e,s)):setValue(i,0,"i32")}function _tree_sitter_progress_callback(e,t){return!!Module.currentProgressCallback&&Module.currentProgressCallback({currentOffset:e,hasError:t})}function _tree_sitter_query_progress_callback(e){return!!Module.currentQueryProgressCallback&&Module.currentQueryProgressCallback({currentOffset:e})}_fd_write.sig="iippp",__name(_tree_sitter_log_callback,"_tree_sitter_log_callback"),__name(_tree_sitter_parse_callback,"_tree_sitter_parse_callback"),__name(_tree_sitter_progress_callback,"_tree_sitter_progress_callback"),__name(_tree_sitter_query_progress_callback,"_tree_sitter_query_progress_callback");var runtimeKeepaliveCounter=0,keepRuntimeAlive=__name(()=>noExitRuntime||runtimeKeepaliveCounter>0,"keepRuntimeAlive"),_proc_exit=__name(e=>{EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit?.(e),ABORT=!0),quit_(e,new ExitStatus(e))},"_proc_exit");_proc_exit.sig="vi";var exitJS=__name((e,t)=>{EXITSTATUS=e,_proc_exit(e)},"exitJS"),handleException=__name(e=>{if(e instanceof ExitStatus||"unwind"==e)return EXITSTATUS;quit_(1,e)},"handleException"),lengthBytesUTF8=__name(e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},"lengthBytesUTF8"),stringToUTF8Array=__name((e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,s=n+r-1,o=0;o<e.length;++o){var a=e.codePointAt(o);if(a<=127){if(n>=s)break;t[n++]=a}else if(a<=2047){if(n+1>=s)break;t[n++]=192|a>>6,t[n++]=128|63&a}else if(a<=65535){if(n+2>=s)break;t[n++]=224|a>>12,t[n++]=128|a>>6&63,t[n++]=128|63&a}else{if(n+3>=s)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63,t[n++]=128|a>>6&63,t[n++]=128|63&a,o++}}return t[n]=0,n-i},"stringToUTF8Array"),stringToUTF8=__name((e,t,n)=>stringToUTF8Array(e,HEAPU8,t,n),"stringToUTF8"),stackAlloc=__name(e=>__emscripten_stack_alloc(e),"stackAlloc"),stringToUTF8OnStack=__name(e=>{var t=lengthBytesUTF8(e)+1,n=stackAlloc(t);return stringToUTF8(e,n,t),n},"stringToUTF8OnStack"),AsciiToString=__name(e=>{for(var t="";;){var n=HEAPU8[e++];if(!n)return t;t+=String.fromCharCode(n)}},"AsciiToString"),stringToUTF16=__name((e,t,n)=>{if((n??=0x7fffffff)<2)return 0;for(var r=t,i=(n-=2)<2*e.length?n/2:e.length,s=0;s<i;++s)LE_HEAP_STORE_I16((t>>1)*2,e.charCodeAt(s)),t+=2;return LE_HEAP_STORE_I16((t>>1)*2,0),t-r},"stringToUTF16");function LE_HEAP_UPDATE(){HEAPU16.unsigned=e=>65535&e,HEAPU32.unsigned=e=>e>>>0}if(LE_ATOMICS_NATIVE_BYTE_ORDER=1===new Int8Array(new Int16Array([1]).buffer)[0]?[e=>e,e=>e,void 0,e=>e]:[e=>e,e=>((65280&e)<<8|(255&e)<<24)>>16,void 0,e=>e>>24&255|e>>8&65280|(65280&e)<<8|(255&e)<<24],__name(LE_HEAP_UPDATE,"LE_HEAP_UPDATE"),initMemory(),Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),Module.print&&(out=Module.print),Module.printErr&&(err=Module.printErr),Module.dynamicLibraries&&(dynamicLibraries=Module.dynamicLibraries),Module.wasmBinary&&(wasmBinary=Module.wasmBinary),Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.shift()();Module.setValue=setValue,Module.getValue=getValue,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,Module.loadWebAssemblyModule=loadWebAssemblyModule,Module.LE_HEAP_STORE_I64=LE_HEAP_STORE_I64;var ASM_CONSTS={};function assignWasmExports(e){Module._malloc=_malloc=e.malloc,Module._calloc=_calloc=e.calloc,Module._realloc=_realloc=e.realloc,Module._free=_free=e.free,Module._ts_range_edit=_ts_range_edit=e.ts_range_edit,Module._memcmp=_memcmp=e.memcmp,Module._ts_language_symbol_count=_ts_language_symbol_count=e.ts_language_symbol_count,Module._ts_language_state_count=_ts_language_state_count=e.ts_language_state_count,Module._ts_language_abi_version=_ts_language_abi_version=e.ts_language_abi_version,Module._ts_language_name=_ts_language_name=e.ts_language_name,Module._ts_language_field_count=_ts_language_field_count=e.ts_language_field_count,Module._ts_language_next_state=_ts_language_next_state=e.ts_language_next_state,Module._ts_language_symbol_name=_ts_language_symbol_name=e.ts_language_symbol_name,Module._ts_language_symbol_for_name=_ts_language_symbol_for_name=e.ts_language_symbol_for_name,Module._strncmp=_strncmp=e.strncmp,Module._ts_language_symbol_type=_ts_language_symbol_type=e.ts_language_symbol_type,Module._ts_language_field_name_for_id=_ts_language_field_name_for_id=e.ts_language_field_name_for_id,Module._ts_lookahead_iterator_new=_ts_lookahead_iterator_new=e.ts_lookahead_iterator_new,Module._ts_lookahead_iterator_delete=_ts_lookahead_iterator_delete=e.ts_lookahead_iterator_delete,Module._ts_lookahead_iterator_reset_state=_ts_lookahead_iterator_reset_state=e.ts_lookahead_iterator_reset_state,Module._ts_lookahead_iterator_reset=_ts_lookahead_iterator_reset=e.ts_lookahead_iterator_reset,Module._ts_lookahead_iterator_next=_ts_lookahead_iterator_next=e.ts_lookahead_iterator_next,Module._ts_lookahead_iterator_current_symbol=_ts_lookahead_iterator_current_symbol=e.ts_lookahead_iterator_current_symbol,Module._ts_point_edit=_ts_point_edit=e.ts_point_edit,Module._ts_parser_delete=_ts_parser_delete=e.ts_parser_delete,Module._ts_parser_reset=_ts_parser_reset=e.ts_parser_reset,Module._ts_parser_set_language=_ts_parser_set_language=e.ts_parser_set_language,Module._ts_parser_set_included_ranges=_ts_parser_set_included_ranges=e.ts_parser_set_included_ranges,Module._ts_query_new=_ts_query_new=e.ts_query_new,Module._ts_query_delete=_ts_query_delete=e.ts_query_delete,Module._iswspace=_iswspace=e.iswspace,Module._iswalnum=_iswalnum=e.iswalnum,Module._ts_query_pattern_count=_ts_query_pattern_count=e.ts_query_pattern_count,Module._ts_query_capture_count=_ts_query_capture_count=e.ts_query_capture_count,Module._ts_query_string_count=_ts_query_string_count=e.ts_query_string_count,Module._ts_query_capture_name_for_id=_ts_query_capture_name_for_id=e.ts_query_capture_name_for_id,Module._ts_query_capture_quantifier_for_id=_ts_query_capture_quantifier_for_id=e.ts_query_capture_quantifier_for_id,Module._ts_query_string_value_for_id=_ts_query_string_value_for_id=e.ts_query_string_value_for_id,Module._ts_query_predicates_for_pattern=_ts_query_predicates_for_pattern=e.ts_query_predicates_for_pattern,Module._ts_query_start_byte_for_pattern=_ts_query_start_byte_for_pattern=e.ts_query_start_byte_for_pattern,Module._ts_query_end_byte_for_pattern=_ts_query_end_byte_for_pattern=e.ts_query_end_byte_for_pattern,Module._ts_query_is_pattern_rooted=_ts_query_is_pattern_rooted=e.ts_query_is_pattern_rooted,Module._ts_query_is_pattern_non_local=_ts_query_is_pattern_non_local=e.ts_query_is_pattern_non_local,Module._ts_query_is_pattern_guaranteed_at_step=_ts_query_is_pattern_guaranteed_at_step=e.ts_query_is_pattern_guaranteed_at_step,Module._ts_query_disable_capture=_ts_query_disable_capture=e.ts_query_disable_capture,Module._ts_query_disable_pattern=_ts_query_disable_pattern=e.ts_query_disable_pattern,Module._ts_tree_copy=_ts_tree_copy=e.ts_tree_copy,Module._ts_tree_delete=_ts_tree_delete=e.ts_tree_delete,Module._ts_init=_ts_init=e.ts_init,Module._ts_parser_new_wasm=_ts_parser_new_wasm=e.ts_parser_new_wasm,Module._ts_parser_enable_logger_wasm=_ts_parser_enable_logger_wasm=e.ts_parser_enable_logger_wasm,Module._ts_parser_parse_wasm=_ts_parser_parse_wasm=e.ts_parser_parse_wasm,Module._ts_parser_included_ranges_wasm=_ts_parser_included_ranges_wasm=e.ts_parser_included_ranges_wasm,Module._ts_language_type_is_named_wasm=_ts_language_type_is_named_wasm=e.ts_language_type_is_named_wasm,Module._ts_language_type_is_visible_wasm=_ts_language_type_is_visible_wasm=e.ts_language_type_is_visible_wasm,Module._ts_language_metadata_wasm=_ts_language_metadata_wasm=e.ts_language_metadata_wasm,Module._ts_language_supertypes_wasm=_ts_language_supertypes_wasm=e.ts_language_supertypes_wasm,Module._ts_language_subtypes_wasm=_ts_language_subtypes_wasm=e.ts_language_subtypes_wasm,Module._ts_tree_root_node_wasm=_ts_tree_root_node_wasm=e.ts_tree_root_node_wasm,Module._ts_tree_root_node_with_offset_wasm=_ts_tree_root_node_with_offset_wasm=e.ts_tree_root_node_with_offset_wasm,Module._ts_tree_edit_wasm=_ts_tree_edit_wasm=e.ts_tree_edit_wasm,Module._ts_tree_included_ranges_wasm=_ts_tree_included_ranges_wasm=e.ts_tree_included_ranges_wasm,Module._ts_tree_get_changed_ranges_wasm=_ts_tree_get_changed_ranges_wasm=e.ts_tree_get_changed_ranges_wasm,Module._ts_tree_cursor_new_wasm=_ts_tree_cursor_new_wasm=e.ts_tree_cursor_new_wasm,Module._ts_tree_cursor_copy_wasm=_ts_tree_cursor_copy_wasm=e.ts_tree_cursor_copy_wasm,Module._ts_tree_cursor_delete_wasm=_ts_tree_cursor_delete_wasm=e.ts_tree_cursor_delete_wasm,Module._ts_tree_cursor_reset_wasm=_ts_tree_cursor_reset_wasm=e.ts_tree_cursor_reset_wasm,Module._ts_tree_cursor_reset_to_wasm=_ts_tree_cursor_reset_to_wasm=e.ts_tree_cursor_reset_to_wasm,Module._ts_tree_cursor_goto_first_child_wasm=_ts_tree_cursor_goto_first_child_wasm=e.ts_tree_cursor_goto_first_child_wasm,Module._ts_tree_cursor_goto_last_child_wasm=_ts_tree_cursor_goto_last_child_wasm=e.ts_tree_cursor_goto_last_child_wasm,Module._ts_tree_cursor_goto_first_child_for_index_wasm=_ts_tree_cursor_goto_first_child_for_index_wasm=e.ts_tree_cursor_goto_first_child_for_index_wasm,Module._ts_tree_cursor_goto_first_child_for_position_wasm=_ts_tree_cursor_goto_first_child_for_position_wasm=e.ts_tree_cursor_goto_first_child_for_position_wasm,Module._ts_tree_cursor_goto_next_sibling_wasm=_ts_tree_cursor_goto_next_sibling_wasm=e.ts_tree_cursor_goto_next_sibling_wasm,Module._ts_tree_cursor_goto_previous_sibling_wasm=_ts_tree_cursor_goto_previous_sibling_wasm=e.ts_tree_cursor_goto_previous_sibling_wasm,Module._ts_tree_cursor_goto_descendant_wasm=_ts_tree_cursor_goto_descendant_wasm=e.ts_tree_cursor_goto_descendant_wasm,Module._ts_tree_cursor_goto_parent_wasm=_ts_tree_cursor_goto_parent_wasm=e.ts_tree_cursor_goto_parent_wasm,Module._ts_tree_cursor_current_node_type_id_wasm=_ts_tree_cursor_current_node_type_id_wasm=e.ts_tree_cursor_current_node_type_id_wasm,Module._ts_tree_cursor_current_node_state_id_wasm=_ts_tree_cursor_current_node_state_id_wasm=e.ts_tree_cursor_current_node_state_id_wasm,Module._ts_tree_cursor_current_node_is_named_wasm=_ts_tree_cursor_current_node_is_named_wasm=e.ts_tree_cursor_current_node_is_named_wasm,Module._ts_tree_cursor_current_node_is_missing_wasm=_ts_tree_cursor_current_node_is_missing_wasm=e.ts_tree_cursor_current_node_is_missing_wasm,Module._ts_tree_cursor_current_node_id_wasm=_ts_tree_cursor_current_node_id_wasm=e.ts_tree_cursor_current_node_id_wasm,Module._ts_tree_cursor_start_position_wasm=_ts_tree_cursor_start_position_wasm=e.ts_tree_cursor_start_position_wasm,Module._ts_tree_cursor_end_position_wasm=_ts_tree_cursor_end_position_wasm=e.ts_tree_cursor_end_position_wasm,Module._ts_tree_cursor_start_index_wasm=_ts_tree_cursor_start_index_wasm=e.ts_tree_cursor_start_index_wasm,Module._ts_tree_cursor_end_index_wasm=_ts_tree_cursor_end_index_wasm=e.ts_tree_cursor_end_index_wasm,Module._ts_tree_cursor_current_field_id_wasm=_ts_tree_cursor_current_field_id_wasm=e.ts_tree_cursor_current_field_id_wasm,Module._ts_tree_cursor_current_depth_wasm=_ts_tree_cursor_current_depth_wasm=e.ts_tree_cursor_current_depth_wasm,Module._ts_tree_cursor_current_descendant_index_wasm=_ts_tree_cursor_current_descendant_index_wasm=e.ts_tree_cursor_current_descendant_index_wasm,Module._ts_tree_cursor_current_node_wasm=_ts_tree_cursor_current_node_wasm=e.ts_tree_cursor_current_node_wasm,Module._ts_node_symbol_wasm=_ts_node_symbol_wasm=e.ts_node_symbol_wasm,Module._ts_node_field_name_for_child_wasm=_ts_node_field_name_for_child_wasm=e.ts_node_field_name_for_child_wasm,Module._ts_node_field_name_for_named_child_wasm=_ts_node_field_name_for_named_child_wasm=e.ts_node_field_name_for_named_child_wasm,Module._ts_node_children_by_field_id_wasm=_ts_node_children_by_field_id_wasm=e.ts_node_children_by_field_id_wasm,Module._ts_node_first_child_for_byte_wasm=_ts_node_first_child_for_byte_wasm=e.ts_node_first_child_for_byte_wasm,Module._ts_node_first_named_child_for_byte_wasm=_ts_node_first_named_child_for_byte_wasm=e.ts_node_first_named_child_for_byte_wasm,Module._ts_node_grammar_symbol_wasm=_ts_node_grammar_symbol_wasm=e.ts_node_grammar_symbol_wasm,Module._ts_node_child_count_wasm=_ts_node_child_count_wasm=e.ts_node_child_count_wasm,Module._ts_node_named_child_count_wasm=_ts_node_named_child_count_wasm=e.ts_node_named_child_count_wasm,Module._ts_node_child_wasm=_ts_node_child_wasm=e.ts_node_child_wasm,Module._ts_node_named_child_wasm=_ts_node_named_child_wasm=e.ts_node_named_child_wasm,Module._ts_node_child_by_field_id_wasm=_ts_node_child_by_field_id_wasm=e.ts_node_child_by_field_id_wasm,Module._ts_node_next_sibling_wasm=_ts_node_next_sibling_wasm=e.ts_node_next_sibling_wasm,Module._ts_node_prev_sibling_wasm=_ts_node_prev_sibling_wasm=e.ts_node_prev_sibling_wasm,Module._ts_node_next_named_sibling_wasm=_ts_node_next_named_sibling_wasm=e.ts_node_next_named_sibling_wasm,Module._ts_node_prev_named_sibling_wasm=_ts_node_prev_named_sibling_wasm=e.ts_node_prev_named_sibling_wasm,Module._ts_node_descendant_count_wasm=_ts_node_descendant_count_wasm=e.ts_node_descendant_count_wasm,Module._ts_node_parent_wasm=_ts_node_parent_wasm=e.ts_node_parent_wasm,Module._ts_node_child_with_descendant_wasm=_ts_node_child_with_descendant_wasm=e.ts_node_child_with_descendant_wasm,Module._ts_node_descendant_for_index_wasm=_ts_node_descendant_for_index_wasm=e.ts_node_descendant_for_index_wasm,Module._ts_node_named_descendant_for_index_wasm=_ts_node_named_descendant_for_index_wasm=e.ts_node_named_descendant_for_index_wasm,Module._ts_node_descendant_for_position_wasm=_ts_node_descendant_for_position_wasm=e.ts_node_descendant_for_position_wasm,Module._ts_node_named_descendant_for_position_wasm=_ts_node_named_descendant_for_position_wasm=e.ts_node_named_descendant_for_position_wasm,Module._ts_node_start_point_wasm=_ts_node_start_point_wasm=e.ts_node_start_point_wasm,Module._ts_node_end_point_wasm=_ts_node_end_point_wasm=e.ts_node_end_point_wasm,Module._ts_node_start_index_wasm=_ts_node_start_index_wasm=e.ts_node_start_index_wasm,Module._ts_node_end_index_wasm=_ts_node_end_index_wasm=e.ts_node_end_index_wasm,Module._ts_node_to_string_wasm=_ts_node_to_string_wasm=e.ts_node_to_string_wasm,Module._ts_node_children_wasm=_ts_node_children_wasm=e.ts_node_children_wasm,Module._ts_node_named_children_wasm=_ts_node_named_children_wasm=e.ts_node_named_children_wasm,Module._ts_node_descendants_of_type_wasm=_ts_node_descendants_of_type_wasm=e.ts_node_descendants_of_type_wasm,Module._ts_node_is_named_wasm=_ts_node_is_named_wasm=e.ts_node_is_named_wasm,Module._ts_node_has_changes_wasm=_ts_node_has_changes_wasm=e.ts_node_has_changes_wasm,Module._ts_node_has_error_wasm=_ts_node_has_error_wasm=e.ts_node_has_error_wasm,Module._ts_node_is_error_wasm=_ts_node_is_error_wasm=e.ts_node_is_error_wasm,Module._ts_node_is_missing_wasm=_ts_node_is_missing_wasm=e.ts_node_is_missing_wasm,Module._ts_node_is_extra_wasm=_ts_node_is_extra_wasm=e.ts_node_is_extra_wasm,Module._ts_node_parse_state_wasm=_ts_node_parse_state_wasm=e.ts_node_parse_state_wasm,Module._ts_node_next_parse_state_wasm=_ts_node_next_parse_state_wasm=e.ts_node_next_parse_state_wasm,Module._ts_query_matches_wasm=_ts_query_matches_wasm=e.ts_query_matches_wasm,Module._ts_query_captures_wasm=_ts_query_captures_wasm=e.ts_query_captures_wasm,Module._memset=_memset=e.memset,Module._memcpy=_memcpy=e.memcpy,Module._memmove=_memmove=e.memmove,Module._iswalpha=_iswalpha=e.iswalpha,Module._iswblank=_iswblank=e.iswblank,Module._iswdigit=_iswdigit=e.iswdigit,Module._iswlower=_iswlower=e.iswlower,Module._iswupper=_iswupper=e.iswupper,Module._iswxdigit=_iswxdigit=e.iswxdigit,Module._memchr=_memchr=e.memchr,Module._strlen=_strlen=e.strlen,Module._strcmp=_strcmp=e.strcmp,Module._strncat=_strncat=e.strncat,Module._strncpy=_strncpy=e.strncpy,Module._towlower=_towlower=e.towlower,Module._towupper=_towupper=e.towupper,_setThrew=e.setThrew,__emscripten_stack_restore=e._emscripten_stack_restore,__emscripten_stack_alloc=e._emscripten_stack_alloc,_emscripten_stack_get_current=e.emscripten_stack_get_current,___wasm_apply_data_relocs=e.__wasm_apply_data_relocs}__name(assignWasmExports,"assignWasmExports");var wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback,tree_sitter_progress_callback:_tree_sitter_progress_callback,tree_sitter_query_progress_callback:_tree_sitter_query_progress_callback};function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var n=e.length,r=stackAlloc((n+1)*4),i=r;e.forEach(e=>{LE_HEAP_STORE_U32((i>>2)*4,stringToUTF8OnStack(e)),i+=4}),LE_HEAP_STORE_U32((i>>2)*4,0);try{var s=t(n,r);return exitJS(s,!0),s}catch(e){return handleException(e)}}}function run(e=arguments_){if(runDependencies>0||(preRun(),runDependencies>0)){dependenciesFulfilled=run;return}function t(){if(Module.calledRun=!0,!ABORT){initRuntime(),readyPromiseResolve?.(Module),Module.onRuntimeInitialized?.();var t=Module.noInitialRun||!1;t||callMain(e),postRun()}}__name(t,"doRun"),Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}return __name(callMain,"callMain"),__name(run,"run"),wasmExports=await createWasm(),run(),moduleRtn=runtimeInitialized?Module:new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t})}__name(Module2,"Module");var web_tree_sitter_default=Module2,Module3=null;async function initializeBinding(e){return Module3??=await web_tree_sitter_default(e)}function checkModule(){return!!Module3}__name(initializeBinding,"initializeBinding"),__name(checkModule,"checkModule");var Parser=class{static{__name(this,"Parser")}0=0;1=0;logCallback=null;language=null;static async init(e){setModule(await initializeBinding(e)),TRANSFER_BUFFER=C._ts_init(),LANGUAGE_VERSION=C.getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}constructor(){this.initialize()}initialize(){if(!checkModule())throw Error("cannot construct a Parser before calling `init()`");C._ts_parser_new_wasm(),this[0]=C.getValue(TRANSFER_BUFFER,"i32"),this[1]=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e)if(e.constructor===Language){t=e[0];let n=C._ts_language_abi_version(t);if(n<MIN_COMPATIBLE_VERSION||LANGUAGE_VERSION<n)throw Error(`Incompatible language version ${n}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${LANGUAGE_VERSION}.`);this.language=e}else throw Error("Argument must be a Language");else t=0,this.language=null;return C._ts_parser_set_language(this[0],t),this}parse(e,t,n){if("string"==typeof e)C.currentParseCallback=t=>e.slice(t);else if("function"==typeof e)C.currentParseCallback=e;else throw Error("Argument must be a string or a function");n?.progressCallback?C.currentProgressCallback=n.progressCallback:C.currentProgressCallback=null,this.logCallback?(C.currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(C.currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let r=0,i=0;if(n?.includedRanges){r=n.includedRanges.length;let e=i=C._calloc(r,SIZE_OF_RANGE);for(let t=0;t<r;t++)marshalRange(e,n.includedRanges[t]),e+=SIZE_OF_RANGE}let s=C._ts_parser_parse_wasm(this[0],this[1],t?t[0]:0,i,r);if(!s)return C.currentParseCallback=null,C.currentLogCallback=null,C.currentProgressCallback=null,null;if(!this.language)throw Error("Parser must have a language to parse");let o=new Tree(INTERNAL,s,this.language,C.currentParseCallback);return C.currentParseCallback=null,C.currentLogCallback=null,C.currentProgressCallback=null,o}reset(){C._ts_parser_reset(this[0])}getIncludedRanges(){C._ts_parser_included_ranges_wasm(this[0]);let e=C.getValue(TRANSFER_BUFFER,"i32"),t=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=Array(e);if(e>0){let r=t;for(let t=0;t<e;t++)n[t]=unmarshalRange(r),r+=SIZE_OF_RANGE;C._free(t)}return n}setLogger(e){if(e)if("function"!=typeof e)throw Error("Logger callback must be a function");else this.logCallback=e;else this.logCallback=null;return this}getLogger(){return this.logCallback}},PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,QUERY_WORD_REGEX=/[\w-]+/g,CaptureQuantifier={},isCaptureStep=__name(e=>"capture"===e.type,"isCaptureStep"),isStringStep=__name(e=>"string"===e.type,"isStringStep"),QueryErrorKind={Syntax:1,NodeName:2,FieldName:3,CaptureName:4,PatternStructure:5},QueryError=class _QueryError extends Error{constructor(e,t,n,r){super(_QueryError.formatMessage(e,t)),this.kind=e,this.info=t,this.index=n,this.length=r,this.name="QueryError"}static{__name(this,"QueryError")}static formatMessage(e,t){switch(e){case QueryErrorKind.NodeName:return`Bad node name '${t.word}'`;case QueryErrorKind.FieldName:return`Bad field name '${t.word}'`;case QueryErrorKind.CaptureName:return`Bad capture name @${t.word}`;case QueryErrorKind.PatternStructure:return`Bad pattern structure at offset ${t.suffix}`;case QueryErrorKind.Syntax:return`Bad syntax at offset ${t.suffix}`}}};function parseAnyPredicate(e,t,n,r){if(3!==e.length)throw Error(`Wrong number of arguments to \`#${n}\` predicate. Expected 2, got ${e.length-1}`);if(!isCaptureStep(e[1]))throw Error(`First argument of \`#${n}\` predicate must be a capture. Got "${e[1].value}"`);let i="eq?"===n||"any-eq?"===n,s=!n.startsWith("any-");if(isCaptureStep(e[2])){let n=e[1].name,o=e[2].name;r[t].push(e=>{let t=[],r=[];for(let i of e)i.name===n&&t.push(i.node),i.name===o&&r.push(i.node);let a=__name((e,t,n)=>n?e.text===t.text:e.text!==t.text,"compare");return s?t.every(e=>r.some(t=>a(e,t,i))):t.some(e=>r.some(t=>a(e,t,i)))})}else{let n=e[1].name,o=e[2].value,a=__name(e=>e.text===o,"matches"),l=__name(e=>e.text!==o,"doesNotMatch");r[t].push(e=>{let t=[];for(let r of e)r.name===n&&t.push(r.node);let r=i?a:l;return s?t.every(r):t.some(r)})}}function parseMatchPredicate(e,t,n,r){if(3!==e.length)throw Error(`Wrong number of arguments to \`#${n}\` predicate. Expected 2, got ${e.length-1}.`);if("capture"!==e[1].type)throw Error(`First argument of \`#${n}\` predicate must be a capture. Got "${e[1].value}".`);if("string"!==e[2].type)throw Error(`Second argument of \`#${n}\` predicate must be a string. Got @${e[2].name}.`);let i="match?"===n||"any-match?"===n,s=!n.startsWith("any-"),o=e[1].name,a=new RegExp(e[2].value);r[t].push(e=>{let t=[];for(let n of e)n.name===o&&t.push(n.node.text);let n=__name((e,t)=>t?a.test(e):!a.test(e),"test");return 0===t.length?!i:s?t.every(e=>n(e,i)):t.some(e=>n(e,i))})}function parseAnyOfPredicate(e,t,n,r){if(e.length<2)throw Error(`Wrong number of arguments to \`#${n}\` predicate. Expected at least 1. Got ${e.length-1}.`);if("capture"!==e[1].type)throw Error(`First argument of \`#${n}\` predicate must be a capture. Got "${e[1].value}".`);let i="any-of?"===n,s=e[1].name,o=e.slice(2);if(!o.every(isStringStep))throw Error(`Arguments to \`#${n}\` predicate must be strings.".`);let a=o.map(e=>e.value);r[t].push(e=>{let t=[];for(let n of e)n.name===s&&t.push(n.node.text);return 0===t.length?!i:t.every(e=>a.includes(e))===i})}function parseIsPredicate(e,t,n,r,i){if(e.length<2||e.length>3)throw Error(`Wrong number of arguments to \`#${n}\` predicate. Expected 1 or 2. Got ${e.length-1}.`);if(!e.every(isStringStep))throw Error(`Arguments to \`#${n}\` predicate must be strings.".`);let s="is?"===n?r:i;s[t]||(s[t]={}),s[t][e[1].value]=e[2]?.value??null}function parseSetDirective(e,t,n){if(e.length<2||e.length>3)throw Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${e.length-1}.`);if(!e.every(isStringStep))throw Error('Arguments to `#set!` predicate must be strings.".');n[t]||(n[t]={}),n[t][e[1].value]=e[2]?.value??null}function parsePattern(e,t,n,r,i,s,o,a,l,h,c){if(t===PREDICATE_STEP_TYPE_CAPTURE){let e=r[n];s.push({type:"capture",name:e})}else if(t===PREDICATE_STEP_TYPE_STRING)s.push({type:"string",value:i[n]});else if(s.length>0){if("string"!==s[0].type)throw Error("Predicates must begin with a literal value");let t=s[0].value;switch(t){case"any-not-eq?":case"not-eq?":case"any-eq?":case"eq?":parseAnyPredicate(s,e,t,o);break;case"any-not-match?":case"not-match?":case"any-match?":case"match?":parseMatchPredicate(s,e,t,o);break;case"not-any-of?":case"any-of?":parseAnyOfPredicate(s,e,t,o);break;case"is?":case"is-not?":parseIsPredicate(s,e,t,h,c);break;case"set!":parseSetDirective(s,e,l);break;default:a[e].push({operator:t,operands:s.slice(1)})}s.length=0}}__name(parseAnyPredicate,"parseAnyPredicate"),__name(parseMatchPredicate,"parseMatchPredicate"),__name(parseAnyOfPredicate,"parseAnyOfPredicate"),__name(parseIsPredicate,"parseIsPredicate"),__name(parseSetDirective,"parseSetDirective"),__name(parsePattern,"parsePattern");var Query=class{static{__name(this,"Query")}0=0;exceededMatchLimit;textPredicates;captureNames;captureQuantifiers;predicates;setProperties;assertedProperties;refutedProperties;matchLimit;constructor(e,t){const n=C.lengthBytesUTF8(t),r=C._malloc(n+1);C.stringToUTF8(t,r,n+1);const i=C._ts_query_new(e[0],r,n,TRANSFER_BUFFER,TRANSFER_BUFFER+SIZE_OF_INT);if(!i){const e=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=C.getValue(TRANSFER_BUFFER,"i32"),i=C.UTF8ToString(r,n).length,s=t.slice(i,i+100).split("\n")[0],o=s.match(QUERY_WORD_REGEX)?.[0]??"";switch(C._free(r),e){case QueryErrorKind.Syntax:throw new QueryError(QueryErrorKind.Syntax,{suffix:`${i}: '${s}'...`},i,0);case QueryErrorKind.NodeName:case QueryErrorKind.FieldName:case QueryErrorKind.CaptureName:throw new QueryError(e,{word:o},i,o.length);case QueryErrorKind.PatternStructure:throw new QueryError(e,{suffix:`${i}: '${s}'...`},i,0)}}const s=C._ts_query_string_count(i),o=C._ts_query_capture_count(i),a=C._ts_query_pattern_count(i),l=Array(o),h=Array(a),c=Array(s);for(let e=0;e<o;e++){const t=C._ts_query_capture_name_for_id(i,e,TRANSFER_BUFFER),n=C.getValue(TRANSFER_BUFFER,"i32");l[e]=C.UTF8ToString(t,n)}for(let e=0;e<a;e++){const t=Array(o);for(let n=0;n<o;n++){const r=C._ts_query_capture_quantifier_for_id(i,e,n);t[n]=r}h[e]=t}for(let e=0;e<s;e++){const t=C._ts_query_string_value_for_id(i,e,TRANSFER_BUFFER),n=C.getValue(TRANSFER_BUFFER,"i32");c[e]=C.UTF8ToString(t,n)}const u=Array(a),d=Array(a),p=Array(a),f=Array(a),m=Array(a);for(let e=0;e<a;e++){const t=C._ts_query_predicates_for_pattern(i,e,TRANSFER_BUFFER),n=C.getValue(TRANSFER_BUFFER,"i32");f[e]=[],m[e]=[];const r=[];let s=t;for(let t=0;t<n;t++){const t=C.getValue(s,"i32");s+=SIZE_OF_INT;const n=C.getValue(s,"i32");s+=SIZE_OF_INT,parsePattern(e,t,n,l,c,r,m,f,u,d,p)}Object.freeze(m[e]),Object.freeze(f[e]),Object.freeze(u[e]),Object.freeze(d[e]),Object.freeze(p[e])}C._free(r),this[0]=i,this.captureNames=l,this.captureQuantifiers=h,this.textPredicates=m,this.predicates=f,this.setProperties=u,this.assertedProperties=d,this.refutedProperties=p,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(e,t={}){let n=t.startPosition??ZERO_POINT,r=t.endPosition??ZERO_POINT,i=t.startIndex??0,s=t.endIndex??0,o=t.startContainingPosition??ZERO_POINT,a=t.endContainingPosition??ZERO_POINT,l=t.startContainingIndex??0,h=t.endContainingIndex??0,c=t.matchLimit??0xffffffff,u=t.maxStartDepth??0xffffffff,d=t.progressCallback;if("number"!=typeof c)throw Error("Arguments must be numbers");if(this.matchLimit=c,0!==s&&i>s)throw Error("`startIndex` cannot be greater than `endIndex`");if(r!==ZERO_POINT&&(n.row>r.row||n.row===r.row&&n.column>r.column))throw Error("`startPosition` cannot be greater than `endPosition`");if(0!==h&&l>h)throw Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(a!==ZERO_POINT&&(o.row>a.row||o.row===a.row&&o.column>a.column))throw Error("`startContainingPosition` cannot be greater than `endContainingPosition`");d&&(C.currentQueryProgressCallback=d),marshalNode(e),C._ts_query_matches_wasm(this[0],e.tree[0],n.row,n.column,r.row,r.column,i,s,o.row,o.column,a.row,a.column,l,h,c,u);let p=C.getValue(TRANSFER_BUFFER,"i32"),f=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),m=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),g=Array(p);this.exceededMatchLimit=!!m;let _=0,y=f;for(let t=0;t<p;t++){let t=C.getValue(y,"i32");y+=SIZE_OF_INT;let n=C.getValue(y,"i32");y+=SIZE_OF_INT;let r=Array(n);if(y=unmarshalCaptures(this,e.tree,y,t,r),this.textPredicates[t].every(e=>e(r))){g[_]={patternIndex:t,captures:r};let e=this.setProperties[t];g[_].setProperties=e;let n=this.assertedProperties[t];g[_].assertedProperties=n;let i=this.refutedProperties[t];g[_].refutedProperties=i,_++}}return g.length=_,C._free(f),C.currentQueryProgressCallback=null,g}captures(e,t={}){let n=t.startPosition??ZERO_POINT,r=t.endPosition??ZERO_POINT,i=t.startIndex??0,s=t.endIndex??0,o=t.startContainingPosition??ZERO_POINT,a=t.endContainingPosition??ZERO_POINT,l=t.startContainingIndex??0,h=t.endContainingIndex??0,c=t.matchLimit??0xffffffff,u=t.maxStartDepth??0xffffffff,d=t.progressCallback;if("number"!=typeof c)throw Error("Arguments must be numbers");if(this.matchLimit=c,0!==s&&i>s)throw Error("`startIndex` cannot be greater than `endIndex`");if(r!==ZERO_POINT&&(n.row>r.row||n.row===r.row&&n.column>r.column))throw Error("`startPosition` cannot be greater than `endPosition`");if(0!==h&&l>h)throw Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(a!==ZERO_POINT&&(o.row>a.row||o.row===a.row&&o.column>a.column))throw Error("`startContainingPosition` cannot be greater than `endContainingPosition`");d&&(C.currentQueryProgressCallback=d),marshalNode(e),C._ts_query_captures_wasm(this[0],e.tree[0],n.row,n.column,r.row,r.column,i,s,o.row,o.column,a.row,a.column,l,h,c,u);let p=C.getValue(TRANSFER_BUFFER,"i32"),f=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),m=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),g=[];this.exceededMatchLimit=!!m;let _=[],y=f;for(let t=0;t<p;t++){let t=C.getValue(y,"i32");y+=SIZE_OF_INT;let n=C.getValue(y,"i32");y+=SIZE_OF_INT;let r=C.getValue(y,"i32");if(y+=SIZE_OF_INT,_.length=n,y=unmarshalCaptures(this,e.tree,y,t,_),this.textPredicates[t].every(e=>e(_))){let e=_[r];e.setProperties=this.setProperties[t],e.assertedProperties=this.assertedProperties[t],e.refutedProperties=this.refutedProperties[t],g.push(e)}}return C._free(f),C.currentQueryProgressCallback=null,g}predicatesForPattern(e){return this.predicates[e]}disableCapture(e){let t=C.lengthBytesUTF8(e),n=C._malloc(t+1);C.stringToUTF8(e,n,t+1),C._ts_query_disable_capture(this[0],n,t),C._free(n)}disablePattern(e){if(e>=this.predicates.length)throw Error(`Pattern index is ${e} but the pattern count is ${this.predicates.length}`);C._ts_query_disable_pattern(this[0],e)}didExceedMatchLimit(){return this.exceededMatchLimit}startIndexForPattern(e){if(e>=this.predicates.length)throw Error(`Pattern index is ${e} but the pattern count is ${this.predicates.length}`);return C._ts_query_start_byte_for_pattern(this[0],e)}endIndexForPattern(e){if(e>=this.predicates.length)throw Error(`Pattern index is ${e} but the pattern count is ${this.predicates.length}`);return C._ts_query_end_byte_for_pattern(this[0],e)}patternCount(){return C._ts_query_pattern_count(this[0])}captureIndexForName(e){return this.captureNames.indexOf(e)}isPatternRooted(e){return 1===C._ts_query_is_pattern_rooted(this[0],e)}isPatternNonLocal(e){return 1===C._ts_query_is_pattern_non_local(this[0],e)}isPatternGuaranteedAtStep(e){return 1===C._ts_query_is_pattern_guaranteed_at_step(this[0],e)}}},15813:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],s=(0,r.A)("list",i)},16950:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],s=(0,r.A)("circle",i)},20232:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],s=(0,r.A)("play",i)},20986:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],s=(0,r.A)("rotate-cw",i)},21362:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],s=(0,r.A)("chevron-right",i)},26932:(e,t,n)=>{"use strict";n.d(t,{o:()=>rO});var r,i,s,o,a,l,h,c={};n.r(c),n.d(c,{decode:()=>b,encode:()=>C,format:()=>x,parse:()=>O});var u={};n.r(u),n.d(u,{Any:()=>$,Cc:()=>j,Cf:()=>q,P:()=>z,S:()=>B,Z:()=>H});var d={};n.r(d),n.d(d,{arrayReplaceAt:()=>ed,assign:()=>eu,escapeHtml:()=>eA,escapeRE:()=>eM,fromCodePoint:()=>ef,has:()=>ec,isMdAsciiPunct:()=>eD,isPunctChar:()=>eI,isSpace:()=>eT,isString:()=>el,isValidEntityCode:()=>ep,isWhiteSpace:()=>eN,lib:()=>eR,normalizeReference:()=>eL,unescapeAll:()=>ew,unescapeMd:()=>ek});var p={};n.r(p),n.d(p,{parseLinkDestination:()=>eP,parseLinkLabel:()=>eF,parseLinkTitle:()=>eO});var f=n(82159),m=n(27050);let g={};function _(e){let t=g[e];if(t)return t;t=g[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function y(e,t){"string"!=typeof t&&(t=y.defaultChars);let n=_(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t="";for(let r=0,i=e.length;r<i;r+=3){let s=parseInt(e.slice(r+1,r+3),16);if(s<128){t+=n[s];continue}if((224&s)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((192&n)==128){let e=s<<6&1984|63&n;e<128?t+="��":t+=String.fromCharCode(e),r+=3;continue}}if((240&s)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((192&n)==128&&(192&i)==128){let e=s<<12&61440|n<<6&4032|63&i;e<2048||e>=55296&&e<=57343?t+="���":t+=String.fromCharCode(e),r+=6;continue}}if((248&s)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),o=parseInt(e.slice(r+10,r+12),16);if((192&n)==128&&(192&i)==128&&(192&o)==128){let e=s<<18&1835008|n<<12&258048|i<<6&4032|63&o;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),r+=9;continue}}t+="�"}return t})}y.defaultChars=";/?:@&=+$,#",y.componentChars="";let b=y,k={};function w(e){let t=k[e];if(t)return t;t=k[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function v(e,t,n){"string"!=typeof t&&(n=t,t=v.defaultChars),void 0===n&&(n=!0);let r=w(t),i="";for(let t=0,s=e.length;t<s;t++){let o=e.charCodeAt(t);if(n&&37===o&&t+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<s){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[t])}return i}v.defaultChars=";/?:@&=+$,-_.!~*'()#",v.componentChars="-_.!~*'()";let C=v;function x(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}function S(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}let A=/^([a-z0-9.+-]+:)/i,E=/:[0-9]*$/,M=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,T=["%","/","?",";","#"].concat(["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n"," "]))),N=["/","?","#"],I=255,D=/^[+a-z0-9A-Z_-]{0,63}$/,L=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,R={javascript:!0,"javascript:":!0},F={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function P(e,t){if(e&&e instanceof S)return e;let n=new S;return n.parse(e,t),n}S.prototype.parse=function(e,t){let n,r,i,s=e;if(s=s.trim(),!t&&1===e.split("#").length){let e=M.exec(s);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=A.exec(s);if(o&&(n=(o=o[0]).toLowerCase(),this.protocol=o,s=s.substr(o.length)),(t||o||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===s.substr(0,2))&&!(o&&R[o])&&(s=s.substr(2),this.slashes=!0),!R[o]&&(i||o&&!F[o])){let e,t,n=-1;for(let e=0;e<N.length;e++)-1!==(r=s.indexOf(N[e]))&&(-1===n||r<n)&&(n=r);-1!==(t=-1===n?s.lastIndexOf("@"):s.lastIndexOf("@",n))&&(e=s.slice(0,t),s=s.slice(t+1),this.auth=e),n=-1;for(let e=0;e<T.length;e++)-1!==(r=s.indexOf(T[e]))&&(-1===n||r<n)&&(n=r);-1===n&&(n=s.length),":"===s[n-1]&&n--;let i=s.slice(0,n);s=s.slice(n),this.parseHost(i),this.hostname=this.hostname||"";let o="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!o){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(D)){let r="";for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+="x":r+=n[e];if(!r.match(D)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(L);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(s=i.join(".")+s),this.hostname=r.join(".");break}}}}this.hostname.length>I&&(this.hostname=""),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let a=s.indexOf("#");-1!==a&&(this.hash=s.substr(a),s=s.slice(0,a));let l=s.indexOf("?");return -1!==l&&(this.search=s.substr(l),s=s.slice(0,l)),s&&(this.pathname=s),F[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},S.prototype.parseHost=function(e){let t=E.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};let O=P,z=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,B=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,$=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,j=/[\0-\x1F\x7F-\x9F]/,q=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,H=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,U=new Uint16Array('ᵁ<\xd5ıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig耻\xc6䃆P耻&䀦cute耻\xc1䃁reve;䄂Āiyx}rc耻\xc2䃂;䐐r;쀀\uD835\uDD04rave耻\xc0䃀pha;䎑acr;䄀d;橓Āgp\x9d\xa1on;䄄f;쀀\uD835\uDD38plyFunction;恡ing耻\xc5䃅Ācs\xbe\xc3r;쀀\uD835\uDC9Cign;扔ilde耻\xc3䃃ml耻\xc4䃄Ѐaceforsu\xe5\xfb\xfeėĜĢħĪĀcr\xea\xf2kslash;或Ŷ\xf6\xf8;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\uD835\uDD05pf;쀀\uD835\uDD39eve;䋘c\xf2ēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻\xa9䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻\xc7䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷\xf2ſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\uD835\uDC9EpĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\uD835\uDD07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀\uD835\uDD3Bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegra\xecȹoɴ\0\0ͻ\xbb͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔e\xe5ˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\uD835\uDC9Frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻\xd0䃐cute耻\xc9䃉ƀaiyӒӗӜron;䄚rc耻\xca䃊;䐭ot;䄖r;쀀\uD835\uDD08rave耻\xc8䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\uD835\uDD3Csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻\xcb䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀\uD835\uDD09lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀\uD835\uDD3DAll;戀riertrf;愱c\xf2JTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\uD835\uDD0A;拙pf;쀀\uD835\uDD3Eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\uD835\uDCA2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅ\xf2کrok;䄦mpńېۘownHum\xf0įqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻\xcd䃍Āiyܓܘrc耻\xce䃎;䐘ot;䄰r;愑rave耻\xcc䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lie\xf3ϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\uD835\uDD40a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻\xcf䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀\uD835\uDD0Dpf;쀀\uD835\uDD41ǣ߇\0ߌr;쀀\uD835\uDCA5rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀\uD835\uDD0Epf;쀀\uD835\uDD42cr;쀀\uD835\uDCA6րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ight\xe1Μs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\uD835\uDD0FĀ;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊight\xe1οight\xe1ϊf;쀀\uD835\uDD43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂ\xf2ࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀\uD835\uDD10nusPlus;戓pf;쀀\uD835\uDD44c\xf2੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦\xeberyThi\xeetedĀGLଆreaterGreate\xf2ٳessLes\xf3ੈLine;䀊r;쀀\uD835\uDD11ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\uD835\uDCA9ilde耻\xd1䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻\xd3䃓Āiyීrc耻\xd4䃔;䐞blac;䅐r;쀀\uD835\uDD12rave耻\xd2䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀\uD835\uDD46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\uD835\uDCAAash耻\xd8䃘iŬืde耻\xd5䃕es;樷ml耻\xd6䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀\uD835\uDD13i;䎦;䎠usMinus;䂱Āipຢອncareplan\xe5ڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀\uD835\uDCAB;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀\uD835\uDD14pf;愚cr;쀀\uD835\uDCACBEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻\xae䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r\xbbཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\uD835\uDD16ortȀDLRUᄪᄴᄾᅉownArrow\xbbОeftArrow\xbb࢚ightArrow\xbbpArrow;憑gma;䎣allCircle;战pf;쀀\uD835\uDD4Aɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\uD835\uDCAEar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Th\xe1ྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et\xbbሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻\xde䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\uD835\uDD17ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\uD835\uDD4BipleDot;惛Āctዖዛr;쀀\uD835\uDCAFrok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻\xda䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻\xdb䃛;䐣blac;䅰r;쀀\uD835\uDD18rave耻\xd9䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀\uD835\uDD4CЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥own\xe1ϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\uD835\uDCB0ilde;䅨ml耻\xdc䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\uD835\uDD19pf;쀀\uD835\uDD4Dcr;쀀\uD835\uDCB1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\uD835\uDD1Apf;쀀\uD835\uDD4Ecr;쀀\uD835\uDCB2Ȁfiosᓋᓐᓒᓘr;쀀\uD835\uDD1B;䎞pf;쀀\uD835\uDD4Fcr;쀀\uD835\uDCB3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻\xdd䃝Āiyᔉᔍrc;䅶;䐫r;쀀\uD835\uDD1Cpf;쀀\uD835\uDD50cr;쀀\uD835\uDCB4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidt\xe8a;䎖r;愨pf;愤cr;쀀\uD835\uDCB5ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻\xe1䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻\xe2䃢te肻\xb4̆;䐰lig耻\xe6䃦Ā;r\xb2ᖺ;쀀\uD835\uDD1Erave耻\xe0䃠ĀepᗊᗖĀfpᗏᗔsym;愵\xe8ᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e\xbbᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢\xbb\xb9arr;捼Āgpᙣᙧon;䄅f;쀀\uD835\uDD52;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒ\xf1ᚃing耻\xe5䃥ƀctyᚡᚦᚨr;쀀\uD835\uDCB6;䀪mpĀ;eᚯ\xf1ʈilde耻\xe3䃣ml耻\xe4䃤Āciᛂᛈonin\xf4ɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e\xbbᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰s\xe9ᜌno\xf5ēƀahwᝯᝳ;䎲;愶een;扬r;쀀\uD835\uDD1Fgcostuvwឍឝឳេ៕៛ƀaiuបពរ\xf0ݠrc;旯p\xbb፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄e\xe5ᑄ\xe5ᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\uD835\uDD53Ā;tᏋᡣom\xbbᏌtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻\xa6䂦Ȁceioᥑᥖᥚᥠr;쀀\uD835\uDCB7mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t\xbbpƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁\xeeړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻\xe7䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻\xb8ƭptyv;榲t脀\xa2;eᨭᨮ䂢r\xe4Ʋr;쀀\uD835\uDD20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark\xbbᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖\xbbཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it\xbb᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;q\xc7\xc6ɭ\0\0aĀ;t䀬;䁀ƀ;fl戁\xeeᅠeĀmxent\xbbe\xf3ɍǧ\0ᬇĀ;dኻᬂot;橭n\xf4Ɇƀfryᬐᬔᬗ;쀀\uD835\uDD54o\xe4ɔ脀\xa9;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\uD835\uDCB8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒre\xe3᭳u\xe3᭵ee;拎edge;拏en耻\xa4䂤earrowĀlrᯮ᯳eft\xbbᮀight\xbbᮽe\xe4ᯝĀciᰁᰇonin\xf4Ƿnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍r\xf2ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸\xf2ᄳhĀ;vᱚᱛ怐\xbbऊūᱡᱧarow;椏a\xe3̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻\xb0䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\uD835\uDD21arĀlrᲳᲵ\xbbࣜ\xbbသʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀\xf7;o᳧ᳰntimes;拇n\xf8᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\uD835\uDD55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedg\xe5\xfanƀadhᄮᵝᵧownarrow\xf3ᲃarpoonĀlrᵲᵶef\xf4Ჴigh\xf4ᲶŢᵿᶅkaro\xf7གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\uD835\uDCB9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃r\xf2Щa\xf2ྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴo\xf4ĀcsḎḔute耻\xe9䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻\xea䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\uD835\uDD22ƀ;rsṐṑṗ檚ave耻\xe8䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et\xbbẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\uD835\uDD56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on\xbbớ;䏵ȀcsuvỪỳἋἣĀioữḱrc\xbbḮɩỹ\0\0ỻ\xedՈantĀglἂἆtr\xbbṝess\xbbṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯o\xf4͒ĀahὉὋ;䎷耻\xf0䃰Āmrὓὗl耻\xeb䃫o;悬ƀcipὡὤὧl;䀡s\xf4ծĀeoὬὴctatio\xeeՙnential\xe5չৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotse\xf1Ṅy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀\uD835\uDD23lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀\uD835\uDD57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻\xbd䂽;慓耻\xbc䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻\xbe䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀\uD835\uDCBBࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlan\xf4٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\uD835\uDD24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox\xbbℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\uD835\uDD58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0pro\xf8r;楸qĀlqؿ↖les\xf3₈i\xed٫Āen↣↭rtneqq;쀀≩︀\xc5↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽r\xf2ΠȀilmr⇐⇔⇗⇛rs\xf0ᒄf\xbb․il\xf4کĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it\xbb∊lip;怦con;抹r;쀀\uD835\uDD25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\uD835\uDD59bar;怕ƀclt≯≴≸r;쀀\uD835\uDCBDas\xe8⇴rok;䄧Ābp⊂⊇ull;恃hen\xbbᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻\xed䃭ƀ;iyݱ⊰⊵rc耻\xee䃮;䐸Ācx⊼⊿y;䐵cl耻\xa1䂡ĀfrΟ⋉;쀀\uD835\uDD26rave耻\xec䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓in\xe5ގar\xf4ܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝do\xf4⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙er\xf3ᕣ\xe3⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\uD835\uDD5Aa;䎹uest耻\xbf䂿Āci⎊⎏r;쀀\uD835\uDCBEnʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻\xef䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\uD835\uDD27ath;䈷pf;쀀\uD835\uDD5Bǣ⏬\0⏱r;쀀\uD835\uDCBFrcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\uD835\uDD28reen;䄸cy;䑅cy;䑜pf;쀀\uD835\uDD5Ccr;쀀\uD835\uDCC0ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼r\xf2\xf2Εail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴ra\xeeࡌbda;䎻gƀ;dlࢎⓁⓃ;榑\xe5ࢎ;檅uo耻\xab䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝\xeb≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼\xecࢰ\xe2┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□a\xe9⓶arpoonĀdu▯▴own\xbbњp\xbb०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoon\xf3quigarro\xf7⇰hreetimes;拋ƀ;qs▋ও◺lan\xf4বʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋ppro\xf8Ⓠot;拖qĀgq♃♅\xf4উgt\xf2⒌\xf4ছi\xedলƀilr♕࣡♚sht;楼;쀀\uD835\uDD29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖r\xf2◁orne\xf2ᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che\xbb⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox\xbb⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽r\xebࣁgƀlmr⛿✍✔eftĀar০✇ight\xe1৲apsto;柼ight\xe1৽parrowĀlr✥✩ef\xf4⓭ight;憬ƀafl✶✹✽r;榅;쀀\uD835\uDD5Dus;樭imes;樴š❋❏st;戗\xe1ፎƀ;ef❗❘᠀旊nge\xbb❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇r\xf2ࢨorne\xf2ᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\uD835\uDCC1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹re\xe5◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀\xc5⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻\xaf䂯Āet⡗⡙;時Ā;e⡞⡟朠se\xbb⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻ow\xeeҌef\xf4ए\xf0Ꮡker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle\xbbᘦr;쀀\uD835\uDD2Ao;愧ƀcdn⢯⢴⣉ro耻\xb5䂵Ȁ;acdᑤ⢽⣀⣄s\xf4ᚧir;櫰ot肻\xb7Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛\xf2−\xf0ઁĀdp⣩⣮els;抧f;쀀\uD835\uDD5EĀct⣸⣽r;쀀\uD835\uDCC2pos\xbbᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la\xbb˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉ro\xf8urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xa0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸ui\xf6ୣĀei⩊⩎ar;椨\xedistĀ;sடr;쀀\uD835\uDD2BȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lan\xf4i\xed௪Ā;rஶ⪁\xbbஷƀAap⪊⪍⪑r\xf2⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹r\xf2⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro\xf7⫁ightarro\xf7⪐ƀ;qs⪺⫪lan\xf4ౕĀ;sౕ⫴\xbbశi\xedౝĀ;rవ⫾iĀ;eచథi\xe4ඐĀpt⬌⬑f;쀀\uD835\uDD5F膀\xac;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lle\xecl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳u\xe5ಥĀ;cಘ⭸Ā;eಒ⭽\xf1ಘȀAait⮈⮋⮝⮧r\xf2⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow\xbb⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉u\xe5;쀀\uD835\uDCC3ortɭ⬅\0\0⯖ar\xe1⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭\xe5\xe5ഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗ\xf1സȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇ\xecௗlde耻\xf1䃱\xe7ృiangleĀlrⱒⱜeftĀ;eచⱚ\xf1దightĀ;eೋⱥ\xf1Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻\xf3䃳ĀiyⴼⵅrĀ;cⵂ耻\xf4䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀\uD835\uDD2Cͯ\0\0\0ⶂn;䋛ave耻\xf2䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨr\xf2᪀Āirⶠr;榾oss;榻n\xe5๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\uD835\uDD60ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨r\xf2᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f\xbbⷿ耻\xaa䂪耻\xba䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧\xf2⸁ash耻\xf8䃸l;折iŬⸯ⸴de耻\xf5䃵esĀ;aǛ⸺s;樶ml耻\xf6䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀\xb6;l䂶le\xecЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\uD835\uDD2Dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕ma\xf4੶ne;明ƀ;tv⺿⻀⻈䏀chfork\xbb´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎\xf6⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻\xb1ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\uD835\uDD61nd耻\xa3䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷u\xe5໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾ppro\xf8⽃urlye\xf1໙\xf1໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨i\xedໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺\xf0⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴\xefrel;抰Āci⿀⿅r;쀀\uD835\uDCC5;䏈ncsp;怈̀fiopsu⋢⿱r;쀀\uD835\uDD2Epf;쀀\uD835\uDD62rime;恗cr;쀀\uD835\uDCC6ƀaeo⿸〉〓tĀei々rnion\xf3ڰnt;樖stĀ;e【】䀿\xf1Ἑ\xf4༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがr\xf2Ⴓ\xf2ϝail;検ar\xf2ᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕i\xe3ᅮmptyv;榳gȀ;del࿑らるろ;榒;榥\xe5࿑uo耻\xbb䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞\xeb≝\xf0✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶al\xf3༞ƀabrョリヮr\xf2៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗\xec\xe2ヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜn\xe5Ⴛar\xf4ྩt;断ƀilrㅩဣㅮsht;楽;쀀\uD835\uDD2FĀaoㅷㆆrĀduㅽㅿ\xbbѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭa\xe9トarpoonĀduㆻㆿow\xeeㅾp\xbb႒eftĀah㇊㇐rrow\xf3arpoon\xf3Ցightarrows;應quigarro\xf7ニhreetimes;拌g;䋚ingdotse\xf1ἲƀahm㈍㈐㈓r\xf2a\xf2Ց;怏oustĀ;a㈞掱che\xbbmid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾r\xebဃƀafl㉇㉊㉎r;榆;쀀\uD835\uDD63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒ar\xf2㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\uD835\uDCC7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠re\xe5ㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛qu\xef➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡u\xe5ᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓i\xedሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒\xeb∨Ā;oਸ਼t耻\xa7䂧i;䀻war;椩mĀin㍩\xf0nu\xf3\xf1t;朶rĀ;o㍶⁕쀀\uD835\uDD30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜i\xe4ᑤara\xec耻\xad䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲ar\xf2ᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetm\xe9㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\uD835\uDD64aĀdr㑍ЂesĀ;u㑔㑕晠it\xbb㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍\xf1ᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝\xf1ᆮƀ;afᅻ㒦ְrť㒫ֱ\xbbᅼar\xf2ᅈȀcemt㒹㒾㓂㓅r;쀀\uD835\uDCC8tm\xee\xf1i\xec㐕ar\xe6ᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psilo\xeeỠh\xe9⺯s\xbb⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦ppro\xf8㋺urlye\xf1ᇾ\xf1ᇳƀaes㖂㖈㌛ppro\xf8㌚q\xf1㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻\xb9䂹耻\xb2䂲耻\xb3䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨\xeb∮Ā;oਫwar;椪lig耻\xdf䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄r\xebƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\uD835\uDD31Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮ppro\xf8im\xbbኬs\xf0ኞĀas㚺㚮\xf0rn耻\xfe䃾Ǭ̟㛆⋧es膀\xd7;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀\xe1⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\uD835\uDD65rk;櫚\xe1㍢rime;怴ƀaip㜏㜒㝤d\xe5ቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own\xbbᶻeftĀ;e⠀㜾\xf1म;扜ightĀ;e㊪㝋\xf1ၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\uD835\uDCC9;䑆cy;䑛rok;䅧Āio㞋㞎x\xf4headĀlr㞗㞠eftarro\xf7ࡏightarrow\xbbཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶r\xf2ϭar;楣Ācr㟜㟢ute耻\xfa䃺\xf2ᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻\xfb䃻;䑃ƀabh㠃㠆㠋r\xf2Ꭽlac;䅱a\xf2ᏃĀir㠓㠘sht;楾;쀀\uD835\uDD32rave耻\xf9䃹š㠧㠱rĀlr㠬㠮\xbbॗ\xbbႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r\xbb㡆op;挏ri;旸Āal㡖㡚cr;䅫肻\xa8͉Āgp㡢㡦on;䅳f;쀀\uD835\uDD66̀adhlsuᅋ㡸㡽፲㢑㢠own\xe1ᎳarpoonĀlr㢈㢌ef\xf4㠭igh\xf4㠯iƀ;hl㢙㢚㢜䏅\xbbᏺon\xbb㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r\xbb㢽op;挎ng;䅯ri;旹cr;쀀\uD835\uDCCAƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨\xbb᠓Āam㣯㣲r\xf2㢨l耻\xfc䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠r\xf2ϷarĀ;v㤦㤧櫨;櫩as\xe8ϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖app\xe1␕othin\xe7ẖƀhir㓫⻈㥙op\xf4⾵Ā;hᎷ㥢\xefㆍĀiu㥩㥭gm\xe1㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟et\xe1㚜iangleĀlr㦪㦯eft\xbbथight\xbbၑy;䐲ash\xbbံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨa\xf2ᑩr;쀀\uD835\uDD33tr\xe9㦮suĀbp㧯㧱\xbbജ\xbb൙pf;쀀\uD835\uDD67ro\xf0tr\xe9㦴Ācu㨆㨋r;쀀\uD835\uDCCBĀbp㨐㨘nĀEe㦀㨖\xbb㥾nĀEe㦒㨞\xbb㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\uD835\uDD34pf;쀀\uD835\uDD68Ā;eᑹ㩦at\xe8ᑹcr;쀀\uD835\uDCCCૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtr\xe9៑r;쀀\uD835\uDD35ĀAa㪔㪗r\xf2σr\xf2৶;䎾ĀAa㪡㪤r\xf2θr\xf2৫a\xf0✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\uD835\uDD69im\xe5ឲĀAa㫇㫊r\xf2ώr\xf2ਁĀcq㫒ីr;쀀\uD835\uDCCDĀpt៖㫜r\xe9។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻\xfd䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻\xa5䂥r;쀀\uD835\uDD36cy;䑗pf;쀀\uD835\uDD6Acr;쀀\uD835\uDCCEĀcm㬦㬩y;䑎l耻\xff䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡tr\xe6ᕟa;䎶r;쀀\uD835\uDD37cy;䐶grarr;懝pf;쀀\uD835\uDD6Bcr;쀀\uD835\uDCCFĀjn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),W=new Uint16Array("Ȁaglq \x15\x18\x1bɭ\x0f\0\0\x12p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),V=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),G=null!=(r=String.fromCodePoint)?r:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};function J(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!=(t=V.get(e))?t:e}!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(i||(i={}));let K=32;function Z(e){return e>=i.ZERO&&e<=i.NINE}function X(e){return e>=i.UPPER_A&&e<=i.UPPER_F||e>=i.LOWER_A&&e<=i.LOWER_F}function Q(e){return e>=i.UPPER_A&&e<=i.UPPER_Z||e>=i.LOWER_A&&e<=i.LOWER_Z||Z(e)}function Y(e){return e===i.EQUALS||Q(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(s||(s={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(o||(o={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(a||(a={}));class ee{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=o.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=a.Strict}startEntity(e){this.decodeMode=e,this.state=o.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case o.EntityStart:if(e.charCodeAt(t)===i.NUM)return this.state=o.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=o.NamedEntity,this.stateNamedEntity(e,t);case o.NumericStart:return this.stateNumericStart(e,t);case o.NumericDecimal:return this.stateNumericDecimal(e,t);case o.NumericHex:return this.stateNumericHex(e,t);case o.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|K)===i.LOWER_X?(this.state=o.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=o.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(!(Z(r)||X(r)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(!Z(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null==(n=this.errors)||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===i.SEMI)this.consumed+=1;else if(this.decodeMode===a.Strict)return 0;return this.emitCodePoint(J(this.result),this.consumed),this.errors&&(e!==i.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],o=(r&s.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let l=e.charCodeAt(t);if(this.treeIndex=en(n,r,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return 0===this.result||this.decodeMode===a.Attribute&&(0===o||Y(l))?0:this.emitNotTerminatedNamedEntity();if(0!=(o=((r=n[this.treeIndex])&s.VALUE_LENGTH)>>14)){if(l===i.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==a.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&s.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null==(e=this.errors)||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~s.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case o.NamedEntity:return 0!==this.result&&(this.decodeMode!==a.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case o.NumericDecimal:return this.emitNumericEntity(0,2);case o.NumericHex:return this.emitNumericEntity(0,3);case o.NumericStart:return null==(e=this.errors)||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case o.EntityStart:return 0}}}function et(e){let t="",n=new ee(e,e=>t+=G(e));return function(e,r){let i=0,s=0;for(;(s=e.indexOf("&",s))>=0;){t+=e.slice(i,s),n.startEntity(r);let o=n.write(e,s+1);if(o<0){i=s+n.end();break}i=s+o,s=0===o?i+1:i}let o=t+e.slice(i);return t="",o}}function en(e,t,n,r){let i=(t&s.BRANCH_LENGTH)>>7,o=t&s.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){let t=r-o;return t<0||t>=i?-1:e[n+t]-1}let a=n,l=a+i-1;for(;a<=l;){let t=a+l>>>1,n=e[t];if(n<r)a=t+1;else{if(!(n>r))return e[t+i];l=t-1}}return -1}let er=et(U);function ei(e,t=a.Legacy){return er(e,t)}et(W);let es=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function eo(e,t){return function(n){let r,i=0,s="";for(;r=e.exec(n);)i!==r.index&&(s+=n.substring(i,r.index)),s+=t.get(r[0].charCodeAt(0)),i=r.index+1;return s+n.substring(i)}}function ea(e){return Object.prototype.toString.call(e)}function el(e){return"[object String]"===ea(e)}String.prototype.codePointAt,eo(/[&<>'"]/g,es),eo(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),eo(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(l||(l={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(h||(h={}));let eh=Object.prototype.hasOwnProperty;function ec(e,t){return eh.call(e,t)}function eu(e){let t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if("object"!=typeof t)throw TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function ed(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function ep(e){return(!(e>=55296)||!(e<=57343))&&(!(e>=64976)||!(e<=65007))&&(65535&e)!=65535&&(65535&e)!=65534&&(!(e>=0)||!(e<=8))&&11!==e&&(!(e>=14)||!(e<=31))&&(!(e>=127)||!(e<=159))&&!(e>1114111)&&!0}function ef(e){return e>65535?String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e)):String.fromCharCode(e)}let em=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,eg=/&([a-z#][a-z0-9]{1,31});/gi,e_=RegExp(em.source+"|"+eg.source,"gi"),ey=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function eb(e,t){if(35===t.charCodeAt(0)&&ey.test(t)){let n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return ep(n)?ef(n):e}let n=ei(e);return n!==e?n:e}function ek(e){return 0>e.indexOf("\\")?e:e.replace(em,"$1")}function ew(e){return 0>e.indexOf("\\")&&0>e.indexOf("&")?e:e.replace(e_,function(e,t,n){return t||eb(e,n)})}let ev=/[&<>"]/,eC=/[&<>"]/g,ex={"&":"&","<":"<",">":">",'"':"""};function eS(e){return ex[e]}function eA(e){return ev.test(e)?e.replace(eC,eS):e}let eE=/[.?*+^$[\]\\(){}|-]/g;function eM(e){return e.replace(eE,"\\$&")}function eT(e){switch(e){case 9:case 32:return!0}return!1}function eN(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function eI(e){return z.test(e)||B.test(e)}function eD(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function eL(e){return(e=e.trim().replace(/\s+/g," ")).toLowerCase().toUpperCase()}let eR={mdurl:c,ucmicro:u};function eF(e,t,n){let r,i,s,o,a=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(93===(s=e.src.charCodeAt(e.pos))&&0==--r){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===s){if(o===e.pos-1)r++;else if(n)return e.pos=l,-1}}let h=-1;return i&&(h=e.pos),e.pos=l,h}function eP(e,t,n){let r,i=t,s={ok:!1,pos:0,str:""};if(60===e.charCodeAt(i)){for(i++;i<n&&10!==(r=e.charCodeAt(i))&&60!==r;){if(62===r){s.pos=i+1,s.str=ew(e.slice(t+1,i)),s.ok=!0;break}if(92===r&&i+1<n){i+=2;continue}i++}return s}let o=0;for(;i<n&&32!==(r=e.charCodeAt(i))&&!(r<32)&&127!==r;){if(92===r&&i+1<n){if(32===e.charCodeAt(i+1))break;i+=2;continue}if(40===r&&++o>32)return s;if(41===r){if(0===o)break;o--}i++}return t===i||0!==o||(s.str=ew(e.slice(t,i)),s.pos=i,s.ok=!0),s}function eO(e,t,n,r){let i,s=t,o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(s>=n)return o;let r=e.charCodeAt(s);if(34!==r&&39!==r&&40!==r)return o;t++,s++,40===r&&(r=41),o.marker=r}for(;s<n;){if((i=e.charCodeAt(s))===o.marker)return o.pos=s+1,o.str+=ew(e.slice(t,s)),o.ok=!0,o;if(40===i&&41===o.marker)return o;92===i&&s+1<n&&s++,s++}return o.can_continue=!0,o.str+=ew(e.slice(t,s)),o}let ez={};function eB(){this.rules=eu({},ez)}ez.code_inline=function(e,t,n,r,i){let s=e[t];return"<code"+i.renderAttrs(s)+">"+eA(s.content)+"</code>"},ez.code_block=function(e,t,n,r,i){let s=e[t];return"<pre"+i.renderAttrs(s)+"><code>"+eA(e[t].content)+"</code></pre>\n"},ez.fence=function(e,t,n,r,i){let s,o=e[t],a=o.info?ew(o.info).trim():"",l="",h="";if(a){let e=a.split(/(\s+)/g);l=e[0],h=e.slice(2).join("")}if(0===(s=n.highlight&&n.highlight(o.content,l,h)||eA(o.content)).indexOf("<pre"))return s+"\n";if(a){let e=o.attrIndex("class"),t=o.attrs?o.attrs.slice():[];e<0?t.push(["class",n.langPrefix+l]):(t[e]=t[e].slice(),t[e][1]+=" "+n.langPrefix+l);let r={attrs:t};return`<pre><code${i.renderAttrs(r)}>${s}</code></pre>
|
|
8
|
+
`}return`<pre><code${i.renderAttrs(o)}>${s}</code></pre>
|
|
9
|
+
`},ez.image=function(e,t,n,r,i){let s=e[t];return s.attrs[s.attrIndex("alt")][1]=i.renderInlineAsText(s.children,n,r),i.renderToken(e,t,n)},ez.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},ez.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},ez.text=function(e,t){return eA(e[t].content)},ez.html_block=function(e,t){return e[t].content},ez.html_inline=function(e,t){return e[t].content},eB.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(t=0,r="",n=e.attrs.length;t<n;t++)r+=" "+eA(e.attrs[t][0])+'="'+eA(e.attrs[t][1])+'"';return r},eB.prototype.renderToken=function(e,t,n){let r=e[t],i="";if(r.hidden)return"";r.block&&-1!==r.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===r.nesting?"</":"<")+r.tag,i+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(i+=" /");let s=!1;if(r.block&&(s=!0,1===r.nesting&&t+1<e.length)){let n=e[t+1];"inline"===n.type||n.hidden?s=!1:-1===n.nesting&&n.tag===r.tag&&(s=!1)}return i+(s?">\n":">")},eB.prototype.renderInline=function(e,t,n){let r="",i=this.rules;for(let s=0,o=e.length;s<o;s++){let o=e[s].type;void 0!==i[o]?r+=i[o](e,s,t,n,this):r+=this.renderToken(e,s,t)}return r},eB.prototype.renderInlineAsText=function(e,t,n){let r="";for(let i=0,s=e.length;i<s;i++)switch(e[i].type){case"text":case"html_inline":case"html_block":r+=e[i].content;break;case"image":r+=this.renderInlineAsText(e[i].children,t,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},eB.prototype.render=function(e,t,n){let r="",i=this.rules;for(let s=0,o=e.length;s<o;s++){let o=e[s].type;"inline"===o?r+=this.renderInline(e[s].children,t,n):void 0!==i[o]?r+=i[o](e,s,t,n,this):r+=this.renderToken(e,s,t,n)}return r};let e$=eB;function ej(){this.__rules__=[],this.__cache__=null}ej.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return -1},ej.prototype.__compile__=function(){let e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){0>t.indexOf(e)&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){!n.enabled||t&&0>n.alt.indexOf(t)||e.__cache__[t].push(n.fn)})})},ej.prototype.at=function(e,t,n){let r=this.__find__(e),i=n||{};if(-1===r)throw Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null},ej.prototype.before=function(e,t,n,r){let i=this.__find__(e),s=r||{};if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null},ej.prototype.after=function(e,t,n,r){let i=this.__find__(e),s=r||{};if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null},ej.prototype.push=function(e,t,n){let r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},ej.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},ej.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},ej.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},ej.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]};let eq=ej;function eH(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}eH.prototype.attrIndex=function(e){if(!this.attrs)return -1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return -1},eH.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},eH.prototype.attrSet=function(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},eH.prototype.attrGet=function(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},eH.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};let eU=eH;function eW(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}eW.prototype.Token=eU;let eV=eW,eG=/\r\n?|\n/g,eJ=/\0/g;function eK(e){return/^<a[>\s]/i.test(e)}function eZ(e){return/^<\/a\s*>/i.test(e)}let eX=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,eQ=/\((c|tm|r)\)/i,eY=/\((c|tm|r)\)/ig,e0={c:"\xa9",r:"\xae",tm:"™"};function e1(e,t){return e0[t.toLowerCase()]}function e2(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];"text"!==r.type||t||(r.content=r.content.replace(eY,e1)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}function e3(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];"text"===r.type&&!t&&eX.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}let e5=/['"]/,e4=/['"]/g,e6="’";function e8(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function e9(e,t){let n,r=[];for(let i=0;i<e.length;i++){let s=e[i],o=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=o);n--);if(r.length=n+1,"text"!==s.type)continue;let a=s.content,l=0,h=a.length;n:for(;l<h;){e4.lastIndex=l;let c=e4.exec(a);if(!c)break;let u=!0,d=!0;l=c.index+1;let p="'"===c[0],f=32;if(c.index-1>=0)f=a.charCodeAt(c.index-1);else for(n=i-1;n>=0&&"softbreak"!==e[n].type&&"hardbreak"!==e[n].type;n--)if(e[n].content){f=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l<h)m=a.charCodeAt(l);else for(n=i+1;n<e.length&&"softbreak"!==e[n].type&&"hardbreak"!==e[n].type;n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}let g=eD(f)||eI(String.fromCharCode(f)),_=eD(m)||eI(String.fromCharCode(m)),y=eN(f),b=eN(m);if(b?u=!1:_&&!(y||g)&&(u=!1),y?d=!1:g&&!(b||_)&&(d=!1),34===m&&'"'===c[0]&&f>=48&&f<=57&&(d=u=!1),u&&d&&(u=g,d=_),!u&&!d){p&&(s.content=e8(s.content,c.index,e6));continue}if(d)for(n=r.length-1;n>=0;n--){let u=r[n];if(r[n].level<o)break;if(u.single===p&&r[n].level===o){let o,d;u=r[n],p?(o=t.md.options.quotes[2],d=t.md.options.quotes[3]):(o=t.md.options.quotes[0],d=t.md.options.quotes[1]),s.content=e8(s.content,c.index,d),e[u.token].content=e8(e[u.token].content,u.pos,o),l+=d.length-1,u.token===i&&(l+=o.length-1),h=(a=s.content).length,r.length=n;continue n}}u?r.push({token:i,pos:c.index,single:p,level:o}):d&&p&&(s.content=e8(s.content,c.index,e6))}}}let e7=[["normalize",function(e){let t;t=(t=e.src.replace(eG,"\n")).replace(eJ,"�"),e.src=t}],["block",function(e){let t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}],["linkify",function(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if("inline"!==t[n].type||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,i=0;for(let s=r.length-1;s>=0;s--){let o=r[s];if("link_close"===o.type){for(s--;r[s].level!==o.level&&"link_open"!==r[s].type;)s--;continue}if("html_inline"===o.type&&(eK(o.content)&&i>0&&i--,eZ(o.content)&&i++),!(i>0)&&"text"===o.type&&e.md.linkify.test(o.content)){let i=o.content,a=e.md.linkify.match(i),l=[],h=o.level,c=0;a.length>0&&0===a[0].index&&s>0&&"text_special"===r[s-1].type&&(a=a.slice(1));for(let t=0;t<a.length;t++){let n=a[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let s=a[t].text;s=a[t].schema?"mailto:"!==a[t].schema||/^mailto:/i.test(s)?e.md.normalizeLinkText(s):e.md.normalizeLinkText("mailto:"+s).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+s).replace(/^http:\/\//,"");let o=a[t].index;if(o>c){let t=new e.Token("text","",0);t.content=i.slice(c,o),t.level=h,l.push(t)}let u=new e.Token("link_open","a",1);u.attrs=[["href",r]],u.level=h++,u.markup="linkify",u.info="auto",l.push(u);let d=new e.Token("text","",0);d.content=s,d.level=h,l.push(d);let p=new e.Token("link_close","a",-1);p.level=--h,p.markup="linkify",p.info="auto",l.push(p),c=a[t].lastIndex}if(c<i.length){let t=new e.Token("text","",0);t.content=i.slice(c),t.level=h,l.push(t)}t[n].children=r=ed(r,s,l)}}}}],["replacements",function(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(eQ.test(e.tokens[t].content)&&e2(e.tokens[t].children),eX.test(e.tokens[t].content)&&e3(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&e5.test(e.tokens[t].content)&&e9(e.tokens[t].children,e)}],["text_join",function(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if("inline"!==r[e].type)continue;let i=r[e].children,s=i.length;for(t=0;t<s;t++)"text_special"===i[t].type&&(i[t].type="text");for(t=n=0;t<s;t++)"text"===i[t].type&&t+1<s&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}]];function te(){this.ruler=new eq;for(let e=0;e<e7.length;e++)this.ruler.push(e7[e][0],e7[e][1])}te.prototype.process=function(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},te.prototype.State=eV;let tt=te;function tn(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;let i=this.src;for(let e=0,t=0,n=0,r=0,s=i.length,o=!1;t<s;t++){let a=i.charCodeAt(t);if(!o)if(eT(a)){n++,9===a?r+=4-r%4:r++;continue}else o=!0;(10===a||t===s-1)&&(10!==a&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),o=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}tn.prototype.push=function(e,t,n){let r=new eU(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},tn.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},tn.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},tn.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t&&eT(this.src.charCodeAt(e));e++);return e},tn.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!eT(this.src.charCodeAt(--e)))return e+1;return e},tn.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},tn.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},tn.prototype.getLines=function(e,t,n,r){if(e>=t)return"";let i=Array(t-e);for(let s=0,o=e;o<t;o++,s++){let e,a=0,l=this.bMarks[o],h=l;for(e=o+1<t||r?this.eMarks[o]+1:this.eMarks[o];h<e&&a<n;){let e=this.src.charCodeAt(h);if(eT(e))9===e?a+=4-(a+this.bsCount[o])%4:a++;else if(h-l<this.tShift[o])a++;else break;h++}a>n?i[s]=Array(a-n+1).join(" ")+this.src.slice(h,e):i[s]=this.src.slice(h,e)}return i.join("")},tn.prototype.Token=eU;let tr=tn,ti=65536;function ts(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function to(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),s=!1,o=0,a="";for(;r<n;)124===i&&(s?(a+=e.substring(o,r-1),o=r):(t.push(a+e.substring(o,r)),a="",o=r+1)),s=92===i,r++,i=e.charCodeAt(r);return t.push(a+e.substring(o)),t}function ta(e,t,n,r){let i;if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;let a=e.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a||o>=e.eMarks[s])return!1;let l=e.src.charCodeAt(o++);if(124!==l&&45!==l&&58!==l&&!eT(l)||45===a&&eT(l))return!1;for(;o<e.eMarks[s];){let t=e.src.charCodeAt(o);if(124!==t&&45!==t&&58!==t&&!eT(t))return!1;o++}let h=ts(e,t+1),c=h.split("|"),u=[];for(let e=0;e<c.length;e++){let t=c[e].trim();if(!t)if(0===e||e===c.length-1)continue;else return!1;if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?u.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?u.push("left"):u.push("")}if(-1===(h=ts(e,t).trim()).indexOf("|")||e.sCount[t]-e.blkIndent>=4)return!1;(c=to(h)).length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();let d=c.length;if(0===d||d!==u.length)return!1;if(r)return!0;let p=e.parentType;e.parentType="table";let f=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t<c.length;t++){let n=e.push("th_open","th",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);let r=e.push("inline","",0);r.content=c[t].trim(),r.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let _=0;for(s=t+2;s<n&&!(e.sCount[s]<e.blkIndent);s++){let r=!1;for(let t=0,i=f.length;t<i;t++)if(f[t](e,s,n,!0)){r=!0;break}if(r||!(h=ts(e,s).trim())||e.sCount[s]-e.blkIndent>=4||((c=to(h)).length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),(_+=d-c.length)>ti))break;s===t+2&&(e.push("tbody_open","tbody",1).map=i=[t+2,0]),e.push("tr_open","tr",1).map=[s,s+1];for(let t=0;t<d;t++){let n=e.push("td_open","td",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);let r=e.push("inline","",0);r.content=c[t]?c[t].trim():"",r.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return i&&(e.push("tbody_close","tbody",-1),i[1]=s),e.push("table_close","table",-1),g[1]=s,e.parentType=p,e.line=s,!0}function tl(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){i=++r;continue}break}e.line=i;let s=e.push("code_block","code",0);return s.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",s.map=[t,e.line],!0}function th(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>s)return!1;let o=e.src.charCodeAt(i);if(126!==o&&96!==o)return!1;let a=i,l=(i=e.skipChars(i,o))-a;if(l<3)return!1;let h=e.src.slice(a,i),c=e.src.slice(i,s);if(96===o&&c.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let u=t,d=!1;for(;!(++u>=n)&&(!((i=a=e.bMarks[u]+e.tShift[u])<(s=e.eMarks[u]))||!(e.sCount[u]<e.blkIndent));){;if(!(e.src.charCodeAt(i)!==o||e.sCount[u]-e.blkIndent>=4||(i=e.skipChars(i,o))-a<l)&&!((i=e.skipSpaces(i))<s)){d=!0;break}}l=e.sCount[t],e.line=u+ +!!d;let p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,u,l,!0),p.markup=h,p.map=[t,e.line],!0}function tc(e,t,n,r){let i,s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||62!==e.src.charCodeAt(s))return!1;if(r)return!0;let l=[],h=[],c=[],u=[],d=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let f=!1;for(i=t;i<n;i++){let t=e.sCount[i]<e.blkIndent;if((s=e.bMarks[i]+e.tShift[i])>=(o=e.eMarks[i]))break;if(62===e.src.charCodeAt(s++)&&!t){let t,n,r=e.sCount[i]+1;32===e.src.charCodeAt(s)?(s++,r++,n=!1,t=!0):9===e.src.charCodeAt(s)?(t=!0,(e.bsCount[i]+r)%4==3?(s++,r++,n=!1):n=!0):t=!1;let a=r;for(l.push(e.bMarks[i]),e.bMarks[i]=s;s<o;){let t=e.src.charCodeAt(s);if(eT(t))9===t?a+=4-(a+e.bsCount[i]+ +!!n)%4:a++;else break;s++}f=s>=o,h.push(e.bsCount[i]),e.bsCount[i]=e.sCount[i]+1+ +!!t,c.push(e.sCount[i]),e.sCount[i]=a-r,u.push(e.tShift[i]),e.tShift[i]=s-e.bMarks[i];continue}if(f)break;let r=!1;for(let t=0,s=d.length;t<s;t++)if(d[t](e,i,n,!0)){r=!0;break}if(r){e.lineMax=i,0!==e.blkIndent&&(l.push(e.bMarks[i]),h.push(e.bsCount[i]),u.push(e.tShift[i]),c.push(e.sCount[i]),e.sCount[i]-=e.blkIndent);break}l.push(e.bMarks[i]),h.push(e.bsCount[i]),u.push(e.tShift[i]),c.push(e.sCount[i]),e.sCount[i]=-1}let m=e.blkIndent;e.blkIndent=0;let g=e.push("blockquote_open","blockquote",1);g.markup=">";let _=[t,0];g.map=_,e.md.block.tokenize(e,t,i),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=a,e.parentType=p,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=l[n],e.tShift[n+t]=u[n],e.sCount[n+t]=c[n],e.bsCount[n+t]=h[n];return e.blkIndent=m,!0}function tu(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(s++);if(42!==o&&45!==o&&95!==o)return!1;let a=1;for(;s<i;){let t=e.src.charCodeAt(s++);if(t!==o&&!eT(t))return!1;t===o&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;let l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(o)),!0}function td(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return 42!==i&&45!==i&&43!==i||r<n&&!eT(e.src.charCodeAt(r))?-1:r}function tp(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return -1;let s=e.src.charCodeAt(i++);if(s<48||s>57)return -1;for(;;){if(i>=r)return -1;if((s=e.src.charCodeAt(i++))>=48&&s<=57){if(i-n>=10)return -1;continue}if(41===s||46===s)break;return -1}return i<r&&!eT(s=e.src.charCodeAt(i))?-1:i}function tf(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function tm(e,t,n,r){let i,s,o,a,l,h,c,u=t,d=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let p=!1;if(r&&"paragraph"===e.parentType&&e.sCount[u]>=e.blkIndent&&(p=!0),(c=tp(e,u))>=0){if(l=!0,o=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(o,c-1)),p&&1!==h)return!1}else{if(!((c=td(e,u))>=0))return!1;l=!1}if(p&&e.skipSpaces(c)>=e.eMarks[u])return!1;if(r)return!0;let f=e.src.charCodeAt(c-1),m=e.tokens.length;l?(a=e.push("ordered_list_open","ol",1),1!==h&&(a.attrs=[["start",h]])):a=e.push("bullet_list_open","ul",1);let g=[u,0];a.map=g,a.markup=String.fromCharCode(f);let _=!1,y=e.md.block.ruler.getRules("list"),b=e.parentType;for(e.parentType="list";u<n;){let t;s=c,i=e.eMarks[u];let r=e.sCount[u]+c-(e.bMarks[u]+e.tShift[u]),h=r;for(;s<i;){let t=e.src.charCodeAt(s);if(9===t)h+=4-(h+e.bsCount[u])%4;else if(32===t)h++;else break;s++}let p=s;(t=p>=i?1:h-r)>4&&(t=1);let m=r+t;(a=e.push("list_item_open","li",1)).markup=String.fromCharCode(f);let g=[u,0];a.map=g,l&&(a.info=e.src.slice(o,c-1));let b=e.tight,k=e.tShift[u],w=e.sCount[u],v=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=m,e.tight=!0,e.tShift[u]=p-e.bMarks[u],e.sCount[u]=h,p>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||_)&&(d=!1),_=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=v,e.tShift[u]=k,e.sCount[u]=w,e.tight=b,(a=e.push("list_item_close","li",-1)).markup=String.fromCharCode(f),u=e.line,g[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=y.length;t<r;t++)if(y[t](e,u,n,!0)){C=!0;break}if(C)break;if(l){if((c=tp(e,u))<0)break;o=e.bMarks[u]+e.tShift[u]}else if((c=td(e,u))<0)break;if(f!==e.src.charCodeAt(c-1))break}return(a=l?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(f),g[1]=u,e.line=u,e.parentType=b,d&&tf(e,m),!0}function tg(e,t,n,r){let i,s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||91!==e.src.charCodeAt(s))return!1;function l(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let s=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){s=!0;break}if(e.parentType=i,s)return null}let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];return e.src.slice(i,s+1)}let h=e.src.slice(s,o+1);o=h.length;let c=-1;for(s=1;s<o;s++){let e=h.charCodeAt(s);if(91===e)return!1;if(93===e){c=s;break}if(10===e){let e=l(a);null!==e&&(h+=e,o=h.length,a++)}else if(92===e&&++s<o&&10===h.charCodeAt(s)){let e=l(a);null!==e&&(h+=e,o=h.length,a++)}}if(c<0||58!==h.charCodeAt(c+1))return!1;for(s=c+2;s<o;s++){let e=h.charCodeAt(s);if(10===e){let e=l(a);null!==e&&(h+=e,o=h.length,a++)}else if(eT(e));else break}let u=e.md.helpers.parseLinkDestination(h,s,o);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;let p=s=u.pos,f=a,m=s;for(;s<o;s++){let e=h.charCodeAt(s);if(10===e){let e=l(a);null!==e&&(h+=e,o=h.length,a++)}else if(eT(e));else break}let g=e.md.helpers.parseLinkTitle(h,s,o);for(;g.can_continue;){let t=l(a);if(null===t)break;h+=t,s=o,o=h.length,a++,g=e.md.helpers.parseLinkTitle(h,s,o,g)}for(s<o&&m!==s&&g.ok?(i=g.str,s=g.pos):(i="",s=p,a=f);s<o&&eT(h.charCodeAt(s));)s++;if(s<o&&10!==h.charCodeAt(s)&&i)for(i="",s=p,a=f;s<o&&eT(h.charCodeAt(s));)s++;if(s<o&&10!==h.charCodeAt(s))return!1;let _=eL(h.slice(1,c));return!!_&&(!!r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[_]&&(e.env.references[_]={title:i,href:d}),e.line=a,!0))}let t_=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ty="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",tb="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",tk=RegExp("^(?:"+ty+"|"+tb+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),tw=RegExp("^(?:"+ty+"|"+tb+")"),tv=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp("^</?("+t_.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[RegExp(tw.source+"\\s*$"),/^$/,!1]],tC=[["table",ta,["paragraph","reference"]],["code",tl],["fence",th,["paragraph","reference","blockquote","list"]],["blockquote",tc,["paragraph","reference","blockquote","list"]],["hr",tu,["paragraph","reference","blockquote","list"]],["list",tm,["paragraph","reference","blockquote"]],["reference",tg],["html_block",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||60!==e.src.charCodeAt(i))return!1;let o=e.src.slice(i,s),a=0;for(;a<tv.length&&!tv[a][0].test(o);a++);if(a===tv.length)return!1;if(r)return tv[a][2];let l=t+1;if(!tv[a][1].test(o)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(i=e.bMarks[l]+e.tShift[l],s=e.eMarks[l],o=e.src.slice(i,s),tv[a][1].test(o)){0!==o.length&&l++;break}}e.line=l;let h=e.push("html_block","",0);return h.map=[t,l],h.content=e.getLines(t,l,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(35!==o||i>=s)return!1;let a=1;for(o=e.src.charCodeAt(++i);35===o&&i<s&&a<=6;)a++,o=e.src.charCodeAt(++i);if(a>6||i<s&&!eT(o))return!1;if(r)return!0;s=e.skipSpacesBack(s,i);let l=e.skipCharsBack(s,35,i);l>i&&eT(e.src.charCodeAt(l-1))&&(s=l),e.line=t+1;let h=e.push("heading_open","h"+String(a),1);h.markup="########".slice(0,a),h.map=[t,e.line];let c=e.push("inline","",0);return c.content=e.src.slice(i,s).trim(),c.map=[t,e.line],c.children=[],e.push("heading_close","h"+String(a),-1).markup="########".slice(0,a),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){let r,i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.parentType;e.parentType="paragraph";let o=0,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let t=e.bMarks[a]+e.tShift[a],n=e.eMarks[a];if(t<n&&(45===(r=e.src.charCodeAt(t))||61===r)&&(t=e.skipChars(t,r),(t=e.skipSpaces(t))>=n)){o=61===r?1:2;break}}if(e.sCount[a]<0)continue;let t=!1;for(let r=0,s=i.length;r<s;r++)if(i[r](e,a,n,!0)){t=!0;break}if(t)break}if(!o)return!1;let l=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a+1;let h=e.push("heading_open","h"+String(o),1);h.markup=String.fromCharCode(r),h.map=[t,e.line];let c=e.push("inline","",0);return c.content=l,c.map=[t,e.line-1],c.children=[],e.push("heading_close","h"+String(o),-1).markup=String.fromCharCode(r),e.parentType=s,!0}],["paragraph",function(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),i=e.parentType,s=t+1;for(e.parentType="paragraph";s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3||e.sCount[s]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}let o=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s,e.push("paragraph_open","p",1).map=[t,e.line];let a=e.push("inline","",0);return a.content=o,a.map=[t,e.line],a.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}]];function tx(){this.ruler=new eq;for(let e=0;e<tC.length;e++)this.ruler.push(tC[e][0],tC[e][1],{alt:(tC[e][2]||[]).slice()})}tx.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(""),i=r.length,s=e.md.options.maxNesting,o=t,a=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n)&&!(e.sCount[o]<e.blkIndent));){if(e.level>=s){e.line=n;break}let t=e.line,l=!1;for(let s=0;s<i;s++)if(l=r[s](e,o,n,!1)){if(t>=e.line)throw Error("block rule didn't increment state.line");break}if(!l)throw Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),(o=e.line)<n&&e.isEmpty(o)&&(a=!0,e.line=++o)}},tx.prototype.parse=function(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},tx.prototype.State=tr;let tS=tx;function tA(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}tA.prototype.pushPending=function(){let e=new eU("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},tA.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new eU(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},tA.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32,s=e;for(;s<n&&this.src.charCodeAt(s)===r;)s++;let o=s-e,a=s<n?this.src.charCodeAt(s):32,l=eD(i)||eI(String.fromCharCode(i)),h=eD(a)||eI(String.fromCharCode(a)),c=eN(i),u=eN(a),d=!u&&(!h||c||l),p=!c&&(!l||u||h);return{can_open:d&&(t||!p||l),can_close:p&&(t||!d||h),length:o}},tA.prototype.Token=eU;let tE=tA;function tM(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function tT(e,t){let n=e.pos;for(;n<e.posMax&&!tM(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}let tN=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function tI(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos;if(n+3>e.posMax||58!==e.src.charCodeAt(n)||47!==e.src.charCodeAt(n+1)||47!==e.src.charCodeAt(n+2))return!1;let r=e.pending.match(tN);if(!r)return!1;let i=r[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let o=s.url;if(o.length<=i.length)return!1;let a=o.length;for(;a>0&&42===o.charCodeAt(a-1);)a--;a!==o.length&&(o=o.slice(0,a));let l=e.md.normalizeLink(o);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let t=e.push("link_open","a",1);t.attrs=[["href",l]],t.markup="linkify",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);let n=e.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return e.pos+=o.length-i.length,!0}function tD(e,t){let n=e.pos;if(10!==e.src.charCodeAt(n))return!1;let r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){let t=r-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<i&&eT(e.src.charCodeAt(n));)n++;return e.pos=n,!0}let tL=[];for(let e=0;e<256;e++)tL.push(0);function tR(e,t){let n,r=[],i=t.length;for(let s=0;s<i;s++){let i=t[s];if(126!==i.marker||-1===i.end)continue;let o=t[i.end];(n=e.tokens[i.token]).type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",(n=e.tokens[o.token]).type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&"s_close"===e.tokens[i].type;)i++;t!==--i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function tF(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(95!==n.marker&&42!==n.marker||-1===n.end)continue;let i=t[n.end],s=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),a=e.tokens[n.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?o+o:o,a.content="";let l=e.tokens[i.token];l.type=s?"strong_close":"em_close",l.tag=s?"strong":"em",l.nesting=-1,l.markup=s?o+o:o,l.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){tL[e.charCodeAt(0)]=1});let tP=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,tO=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function tz(e){return/^<a[>\s]/i.test(e)}function tB(e){return/^<\/a\s*>/i.test(e)}function t$(e){let t=32|e;return t>=97&&t<=122}let tj=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,tq=/^&([a-z][a-z0-9]{1,31});/i;function tH(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,s=[];for(let o=0;o<n;o++){let n=e[o];if(s.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let a=t[n.marker][3*!!n.open+n.length%3],l=r-s[r]-1,h=l;for(;l>a;l-=s[l]+1){let t=e[l];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=l>0&&!e[l-1].open?s[l-1]+1:0;s[o]=o-l+r,s[l]=r,n.open=!1,t.end=o,t.close=!1,h=-1,i=-2;break}}}-1!==h&&(t[n.marker][3*!!n.open+(n.length||0)%3]=h)}}let tU=[["text",tT],["linkify",tI],["newline",tD],["escape",function(e,t){let n=e.pos,r=e.posMax;if(92!==e.src.charCodeAt(n)||++n>=r)return!1;let i=e.src.charCodeAt(n);if(10===i){for(t||e.push("hardbreak","br",0),n++;n<r&&eT(i=e.src.charCodeAt(n));)n++;return e.pos=n,!0}let s=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(s+=e.src[n+1],n++)}let o="\\"+s;if(!t){let t=e.push("text_special","",0);i<256&&0!==tL[i]?t.content=s:t.content=o,t.markup=o,t.info="escape"}return e.pos=n+1,!0}],["backticks",function(e,t){let n,r=e.pos;if(96!==e.src.charCodeAt(r))return!1;let i=r;r++;let s=e.posMax;for(;r<s&&96===e.src.charCodeAt(r);)r++;let o=e.src.slice(i,r),a=o.length;if(e.backticksScanned&&(e.backticks[a]||0)<=i)return t||(e.pending+=o),e.pos+=a,!0;let l=r;for(;-1!==(n=e.src.indexOf("`",l));){for(l=n+1;l<s&&96===e.src.charCodeAt(l);)l++;let i=l-n;if(i===a){if(!t){let t=e.push("code_inline","code",0);t.markup=o,t.content=e.src.slice(r,n).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[i]=n}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=a,!0}],["strikethrough",function(e,t){let n,r=e.pos,i=e.src.charCodeAt(r);if(t||126!==i)return!1;let s=e.scanDelims(e.pos,!0),o=s.length,a=String.fromCharCode(i);if(o<2)return!1;o%2&&((n=e.push("text","",0)).content=a,o--);for(let t=0;t<o;t+=2)(n=e.push("text","",0)).content=a+a,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}],["emphasis",function(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||95!==r&&42!==r)return!1;let i=e.scanDelims(e.pos,42===r);for(let t=0;t<i.length;t++)e.push("text","",0).content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}],["link",function e(e,t){let n,r,i,s,o="",a="",l=e.pos,h=!0;if(91!==e.src.charCodeAt(e.pos))return!1;let c=e.pos,u=e.posMax,d=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let f=p+1;if(f<u&&40===e.src.charCodeAt(f)){for(h=!1,f++;f<u&&(eT(n=e.src.charCodeAt(f))||10===n);f++);if(f>=u)return!1;if(l=f,(i=e.md.helpers.parseLinkDestination(e.src,f,e.posMax)).ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?f=i.pos:o="",l=f;f<u&&(eT(n=e.src.charCodeAt(f))||10===n);f++);if(i=e.md.helpers.parseLinkTitle(e.src,f,e.posMax),f<u&&l!==f&&i.ok)for(a=i.str,f=i.pos;f<u&&(eT(n=e.src.charCodeAt(f))||10===n);f++);}(f>=u||41!==e.src.charCodeAt(f))&&(h=!0),f++}if(h){if(void 0===e.env.references)return!1;if(f<u&&91===e.src.charCodeAt(f)?(l=f+1,(f=e.md.helpers.parseLinkLabel(e,f))>=0?r=e.src.slice(l,f++):f=p+1):f=p+1,r||(r=e.src.slice(d,p)),!(s=e.env.references[eL(r)]))return e.pos=c,!1;o=s.href,a=s.title}if(!t){e.pos=d,e.posMax=p;let t=e.push("link_open","a",1),n=[["href",o]];t.attrs=n,a&&n.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=f,e.posMax=u,!0}],["image",function e(e,t){let n,r,i,s,o,a,l,h,c="",u=e.pos,d=e.posMax;if(33!==e.src.charCodeAt(e.pos)||91!==e.src.charCodeAt(e.pos+1))return!1;let p=e.pos+2,f=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(f<0)return!1;if((s=f+1)<d&&40===e.src.charCodeAt(s)){for(s++;s<d&&(eT(n=e.src.charCodeAt(s))||10===n);s++);if(s>=d)return!1;for(h=s,(a=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok&&(c=e.md.normalizeLink(a.str),e.md.validateLink(c)?s=a.pos:c=""),h=s;s<d&&(eT(n=e.src.charCodeAt(s))||10===n);s++);if(a=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<d&&h!==s&&a.ok)for(l=a.str,s=a.pos;s<d&&(eT(n=e.src.charCodeAt(s))||10===n);s++);else l="";if(s>=d||41!==e.src.charCodeAt(s))return e.pos=u,!1;s++}else{if(void 0===e.env.references)return!1;if(s<d&&91===e.src.charCodeAt(s)?(h=s+1,(s=e.md.helpers.parseLinkLabel(e,s))>=0?i=e.src.slice(h,s++):s=f+1):s=f+1,i||(i=e.src.slice(p,f)),!(o=e.env.references[eL(i)]))return e.pos=u,!1;c=o.href,l=o.title}if(!t){r=e.src.slice(p,f);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push("image","img",0),i=[["src",c],["alt",""]];n.attrs=i,n.children=t,n.content=r,l&&i.push(["title",l])}return e.pos=s,e.posMax=d,!0}],["autolink",function e(e,t){let n=e.pos;if(60!==e.src.charCodeAt(n))return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(60===t)return!1;if(62===t)break}let s=e.src.slice(r+1,n);if(tO.test(s)){let n=e.md.normalizeLink(s);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(s);let r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=s.length+2,!0}if(tP.test(s)){let n=e.md.normalizeLink("mailto:"+s);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(s);let r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=s.length+2,!0}return!1}],["html_inline",function e(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(60!==e.src.charCodeAt(r)||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(33!==i&&63!==i&&47!==i&&!t$(i))return!1;let s=e.src.slice(r).match(tk);if(!s)return!1;if(!t){let t=e.push("html_inline","",0);t.content=s[0],tz(t.content)&&e.linkLevel++,tB(t.content)&&e.linkLevel--}return e.pos+=s[0].length,!0}],["entity",function e(e,t){let n=e.pos,r=e.posMax;if(38!==e.src.charCodeAt(n)||n+1>=r)return!1;if(35===e.src.charCodeAt(n+1)){let r=e.src.slice(n).match(tj);if(r){if(!t){let t="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push("text_special","",0);n.content=ep(t)?ef(t):ef(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(tq);if(r){let n=ei(r[0]);if(n!==r[0]){if(!t){let t=e.push("text_special","",0);t.content=n,t.markup=r[0],t.info="entity"}return e.pos+=r[0].length,!0}}}return!1}]],tW=[["balance_pairs",function e(e){let t=e.tokens_meta,n=e.tokens_meta.length;tH(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&tH(t[e].delimiters)}],["strikethrough",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;tR(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&tR(e,t[r].delimiters)}],["emphasis",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;tF(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&tF(e,t[r].delimiters)}],["fragments_join",function e(e){let t,n,r=0,i=e.tokens,s=e.tokens.length;for(t=n=0;t<s;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,"text"===i[t].type&&t+1<s&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}]];function tV(){this.ruler=new eq;for(let e=0;e<tU.length;e++)this.ruler.push(tU[e][0],tU[e][1]);this.ruler2=new eq;for(let e=0;e<tW.length;e++)this.ruler2.push(tW[e][0],tW[e][1])}tV.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,i=e.md.options.maxNesting,s=e.cache;if(void 0!==s[t]){e.pos=s[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;!o&&e.pos++,s[t]=e.pos},tV.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let s=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1)){if(s>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},tV.prototype.parse=function(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let s=this.ruler2.getRules(""),o=s.length;for(let e=0;e<o;e++)s[e](i)},tV.prototype.State=tE;let tG=tV;function tJ(e){let t={};e=e||{},t.src_Any=$.source,t.src_Cc=j.source,t.src_Z=H.source,t.src_P=z.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");let n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function tK(e){let t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function tZ(e){return Object.prototype.toString.call(e)}function tX(e){return"[object String]"===tZ(e)}function tQ(e){return"[object Object]"===tZ(e)}function tY(e){return"[object RegExp]"===tZ(e)}function t0(e){return"[object Function]"===tZ(e)}function t1(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}let t2={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function t3(e){return Object.keys(e||{}).reduce(function(e,t){return e||t2.hasOwnProperty(t)},!1)}let t5={"http:":{validate:function(e,t,n){let r=e.slice(t);return(n.re.http||(n.re.http=RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r))?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return(n.re.no_http||(n.re.no_http=RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r))?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return(n.re.mailto||(n.re.mailto=RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r))?r.match(n.re.mailto)[0].length:0}}},t4="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",t6="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function t8(e){e.__index__=-1,e.__text_cache__=""}function t9(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function t7(){return function(e,t){t.normalize(e)}}function ne(e){let t=e.re=tJ(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(t4),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let i=[];function s(e,t){throw Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(null===n)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,tQ(n)){tY(n.validate)?r.validate=t9(n.validate):t0(n.validate)?r.validate=n.validate:s(t,n),t0(n.normalize)?r.normalize=n.normalize:n.normalize?s(t,n):r.normalize=t7();return}tX(n)?i.push(t):s(t,n)}),i.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:t7()};let o=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(t1).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),t8(e)}function nt(e,t){let n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function nn(e,t){let n=new nt(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function nr(e,t){if(!(this instanceof nr))return new nr(e,t);!t&&t3(e)&&(t=e,e={}),this.__opts__=tK({},t2,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=tK({},t5,e),this.__compiled__={},this.__tlds__=t6,this.__tlds_replaced__=!1,this.re={},ne(this)}nr.prototype.add=function(e,t){return this.__schemas__[e]=t,ne(this),this},nr.prototype.set=function(e){return this.__opts__=tK(this.__opts__,e),this},nr.prototype.test=function(e){let t,n,r,i,s,o,a,l;if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;if(this.re.schema_test.test(e)){for((a=this.re.schema_search).lastIndex=0;null!==(t=a.exec(e));)if(i=this.testSchemaAt(e,t[2],a.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(s=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=o)),this.__index__>=0},nr.prototype.pretest=function(e){return this.re.pretest.test(e)},nr.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},nr.prototype.match=function(e){let t=[],n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(nn(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(nn(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},nr.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,nn(this,0)):null},nr.prototype.tlds=function(e,t){return(e=Array.isArray(e)?e:[e],t)?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),ne(this),this},nr.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},nr.prototype.onCompile=function(){};let ni=nr,ns=0x7fffffff,no=36,na=1,nl=26,nh=38,nc=700,nu=72,nd=128,np="-",nf=/^xn--/,nm=/[^\0-\x7F]/,ng=/[\x2E\u3002\uFF0E\uFF61]/g,n_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ny=35,nb=Math.floor,nk=String.fromCharCode;function nw(e){throw RangeError(n_[e])}function nv(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function nC(e,t){let n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+nv((e=e.replace(ng,".")).split("."),t).join(".")}function nx(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(64512&r)==56320?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}let nS=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:no},nA=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},nE=function(e,t,n){let r=0;for(e=n?nb(e/nc):e>>1,e+=nb(e/t);e>ny*nl>>1;r+=no)e=nb(e/ny);return nb(r+(ny+1)*e/(e+nh))},nM=function(e){let t=[],n=e.length,r=0,i=nd,s=nu,o=e.lastIndexOf(np);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&nw("not-basic"),t.push(e.charCodeAt(n));for(let a=o>0?o+1:0;a<n;){let o=r;for(let t=1,i=no;;i+=no){a>=n&&nw("invalid-input");let o=nS(e.charCodeAt(a++));o>=no&&nw("invalid-input"),o>nb((ns-r)/t)&&nw("overflow"),r+=o*t;let l=i<=s?na:i>=s+nl?nl:i-s;if(o<l)break;let h=no-l;t>nb(ns/h)&&nw("overflow"),t*=h}let l=t.length+1;s=nE(r-o,l,0==o),nb(r/l)>ns-i&&nw("overflow"),i+=nb(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},nT=function(e){let t=[],n=(e=nx(e)).length,r=nd,i=0,s=nu;for(let n of e)n<128&&t.push(nk(n));let o=t.length,a=o;for(o&&t.push(np);a<n;){let n=ns;for(let t of e)t>=r&&t<n&&(n=t);let l=a+1;for(let h of(n-r>nb((ns-i)/l)&&nw("overflow"),i+=(n-r)*l,r=n,e))if(h<r&&++i>ns&&nw("overflow"),h===r){let e=i;for(let n=no;;n+=no){let r=n<=s?na:n>=s+nl?nl:n-s;if(e<r)break;let i=e-r,o=no-r;t.push(nk(nA(r+i%o,0))),e=nb(i/o)}t.push(nk(nA(e,0))),s=nE(i,l,a===o),i=0,++a}++i,++r}return t.join("")},nN=function(e){return nC(e,function(e){return nm.test(e)?"xn--"+nT(e):e})},nI=function(e){return nC(e,function(e){return nf.test(e)?nM(e.slice(4).toLowerCase()):e})},nD={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},nL=/^(vbscript|javascript|file|data):/,nR=/^data:image\/(gif|png|jpeg|webp);/;function nF(e){let t=e.trim().toLowerCase();return!nL.test(t)||nR.test(t)}let nP=["http:","https:","mailto:"];function nO(e){let t=O(e,!0);if(t.hostname&&(!t.protocol||nP.indexOf(t.protocol)>=0))try{t.hostname=nN(t.hostname)}catch(e){}return C(x(t))}function nz(e){let t=O(e,!0);if(t.hostname&&(!t.protocol||nP.indexOf(t.protocol)>=0))try{t.hostname=nI(t.hostname)}catch(e){}return b(x(t),b.defaultChars+"%")}function nB(e,t){if(!(this instanceof nB))return new nB(e,t);t||el(e)||(t=e||{},e="default"),this.inline=new tG,this.block=new tS,this.core=new tt,this.renderer=new e$,this.linkify=new ni,this.validateLink=nF,this.normalizeLink=nO,this.normalizeLinkText=nz,this.utils=d,this.helpers=eu({},p),this.options={},this.configure(e),t&&this.set(t)}nB.prototype.set=function(e){return eu(this.options,e),this},nB.prototype.configure=function(e){let t=this;if(el(e)){let t=e;if(!(e=nD[t]))throw Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},nB.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(e){return 0>n.indexOf(e)});if(r.length&&!t)throw Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},nB.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(e){return 0>n.indexOf(e)});if(r.length&&!t)throw Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},nB.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},nB.prototype.parse=function(e,t){if("string"!=typeof e)throw Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},nB.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},nB.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},nB.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};let n$=nB,nj=new m.Sj({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["div",["hr"]]},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:e=>["h"+e.attrs.level,0]},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM:e=>["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ol",{start:1==e.attrs.order?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ul",{"data-tight":e.attrs.tight?"true":null},0]},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")})}],toDOM:e=>["img",e.attrs]},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>"em"==e.type.name}],toDOM:()=>["em"]},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!=e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>"strong"==e.type.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong"]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),title:e.getAttribute("title")})}],toDOM:e=>["a",e.attrs]},code:{code:!0,parseDOM:[{tag:"code"}],toDOM:()=>["code"]}}});function nq(e,t){if(e.isText&&t.isText&&m.CU.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}class nH{constructor(e,t){this.schema=e,this.tokenHandlers=t,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:m.CU.none}]}top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return;let t=this.top(),n=t.content,r=n[n.length-1],i=this.schema.text(e,t.marks),s;r&&(s=nq(r,i))?n[n.length-1]=s:n.push(i)}openMark(e){let t=this.top();t.marks=e.addToSet(t.marks)}closeMark(e){let t=this.top();t.marks=e.removeFromSet(t.marks)}parseTokens(e){for(let t=0;t<e.length;t++){let n=e[t],r=this.tokenHandlers[n.type];if(!r)throw Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n,e,t)}}addNode(e,t,n){let r=this.top(),i=e.createAndFill(t,n,r?r.marks:[]);return i?(this.push(i),i):null}openNode(e,t){this.stack.push({type:e,attrs:t,content:[],marks:m.CU.none})}closeNode(){let e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}}function nU(e,t,n,r){return e.getAttrs?e.getAttrs(t,n,r):e.attrs instanceof Function?e.attrs(t):e.attrs}function nW(e,t){return e.noCloseToken||"code_inline"==t||"code_block"==t||"fence"==t}function nV(e){return"\n"==e[e.length-1]?e.slice(0,e.length-1):e}function nG(){}function nJ(e,t){let n=Object.create(null);for(let r in t){let i=t[r];if(i.block){let t=e.nodeType(i.block);nW(i,r)?n[r]=(e,n,r,s)=>{e.openNode(t,nU(i,n,r,s)),e.addText(nV(n.content)),e.closeNode()}:(n[r+"_open"]=(e,n,r,s)=>e.openNode(t,nU(i,n,r,s)),n[r+"_close"]=e=>e.closeNode())}else if(i.node){let t=e.nodeType(i.node);n[r]=(e,n,r,s)=>e.addNode(t,nU(i,n,r,s))}else if(i.mark){let t=e.marks[i.mark];nW(i,r)?n[r]=(e,n,r,s)=>{e.openMark(t.create(nU(i,n,r,s))),e.addText(nV(n.content)),e.closeMark(t)}:(n[r+"_open"]=(e,n,r,s)=>e.openMark(t.create(nU(i,n,r,s))),n[r+"_close"]=e=>e.closeMark(t))}else if(i.ignore)nW(i,r)?n[r]=nG:(n[r+"_open"]=nG,n[r+"_close"]=nG);else throw RangeError("Unrecognized parsing spec "+JSON.stringify(i))}return n.text=(e,t)=>e.addText(t.content),n.inline=(e,t)=>e.parseTokens(t.children),n.softbreak=n.softbreak||(e=>e.addText(" ")),n}class nK{constructor(e,t,n){this.schema=e,this.tokenizer=t,this.tokens=n,this.tokenHandlers=nJ(e,n)}parse(e,t={}){let n=new nH(this.schema,this.tokenHandlers),r;n.parseTokens(this.tokenizer.parse(e,t));do r=n.closeNode();while(n.stack.length);return r||this.schema.topNodeType.createAndFill()}}function nZ(e,t){for(;++t<e.length;)if("list_item_open"!=e[t].type)return e[t].hidden;return!1}new nK(nj,n$("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,t,n)=>({tight:nZ(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:nZ(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});let nX={open:"",close:"",mixable:!0};class nQ{constructor(e,t,n={}){this.nodes=e,this.marks=t,this.options=n}serialize(e,t={}){t=Object.assign({},this.options,t);let n=new n2(this.nodes,this.marks,t);return n.renderContent(e),n.out}}let nY=new nQ({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+"\n"),e.text(t.textContent,!1),e.write("\n"),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,i=e.repeat(" ",r+2);e.renderList(t,i,t=>{let i=String(n+t);return e.repeat(" ",r-i.length)+i+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type)return void e.write("\\\n")},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open:(e,t,n,r)=>(e.inAutolink=n1(t,n,r),e.inAutolink?"<":"["),close(e,t,n,r){let{inAutolink:i}=e;return e.inAutolink=void 0,i?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open:(e,t,n,r)=>n0(n.child(r),-1),close:(e,t,n,r)=>n0(n.child(r-1),1),escape:!1}});function n0(e,t){let n=/`+/g,r,i=0;if(e.isText)for(;r=n.exec(e.text);)i=Math.max(i,r[0].length);let s=i>0&&t>0?" `":"`";for(let e=0;e<i;e++)s+="`";return i>0&&t<0&&(s+=" "),s}function n1(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!!r.isText&&r.text==e.attrs.href&&r.marks[r.marks.length-1]==e&&(n==t.childCount-1||!e.isInSet(t.child(n+1).marks))}class n2{constructor(e,t,n){this.nodes=e,this.marks=t,this.options=n,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,void 0===this.options.tightLists&&(this.options.tightLists=!1),void 0===this.options.hardBreakNodeName&&(this.options.hardBreakNodeName="hard_break")}flushClose(e=2){if(this.closed){if(this.atBlank()||(this.out+="\n"),e>1){let t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(let n=1;n<e;n++)this.out+=t+"\n"}this.closed=null}}getMark(e){let t=this.marks[e];if(!t){if(!1!==this.options.strict)throw Error(`Mark type \`${e}\` not supported by Markdown renderer`);t=nX}return t}wrapBlock(e,t,n,r){let i=this.delim;this.write(null!=t?t:e),this.delim+=e,r(),this.delim=i,this.closeBlock(n)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+="\n")}write(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}closeBlock(e){this.closed=e}text(e,t=!0){let n=e.split("\n");for(let e=0;e<n.length;e++)this.write(),!t&&"["==n[e][0]&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=t?this.esc(n[e],this.atBlockStart):n[e],e!=n.length-1&&(this.out+="\n")}render(e,t,n){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,t,n);else if(!1!==this.options.strict)throw Error("Token type `"+e.type.name+"` not supported by Markdown renderer");else!e.type.isLeaf&&(e.type.inlineContent?this.renderInline(e):this.renderContent(e),e.isBlock&&this.closeBlock(e))}renderContent(e){e.forEach((t,n,r)=>this.render(t,e,r))}renderInline(e,t=!0){this.atBlockStart=t;let n=[],r="",i=(t,i,s)=>{let o=t?t.marks:[];t&&t.type.name===this.options.hardBreakNodeName&&(o=o.filter(t=>{if(s+1==e.childCount)return!1;let n=e.child(s+1);return t.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))}));let a=r;if(r="",t&&t.isText&&o.some(e=>{let t=this.getMark(e.type.name);return t&&t.expelEnclosingWhitespace&&!e.isInSet(n)})){let[e,r,i]=/^(\s*)(.*)$/m.exec(t.text);r&&(a+=r,(t=i?t.withText(i):null)||(o=n))}if(t&&t.isText&&o.some(t=>{let n=this.getMark(t.type.name);return n&&n.expelEnclosingWhitespace&&!this.isMarkAhead(e,s+1,t)})){let[e,i,s]=/^(.*?)(\s*)$/m.exec(t.text);s&&(r=s,(t=i?t.withText(i):null)||(o=n))}let l=o.length?o[o.length-1]:null,h=l&&!1===this.getMark(l.type.name).escape,c=o.length-!!h;e:for(let e=0;e<c;e++){let t=o[e];if(!this.getMark(t.type.name).mixable)break;for(let r=0;r<n.length;r++){let i=n[r];if(!this.getMark(i.type.name).mixable)break;if(t.eq(i)){e>r?o=o.slice(0,r).concat(t).concat(o.slice(r,e)).concat(o.slice(e+1,c)):r>e&&(o=o.slice(0,e).concat(o.slice(e+1,r)).concat(t).concat(o.slice(r,c)));continue e}}}let u=0;for(;u<Math.min(n.length,c)&&o[u].eq(n[u]);)++u;for(;u<n.length;)this.text(this.markString(n.pop(),!1,e,s),!1);if(a&&this.text(a),t){for(;n.length<c;){let t=o[n.length];n.push(t),this.text(this.markString(t,!0,e,s),!1),this.atBlockStart=!1}h&&t.isText?this.text(this.markString(l,!0,e,s)+t.text+this.markString(l,!1,e,s+1),!1):this.render(t,e,s),this.atBlockStart=!1}(null==t?void 0:t.isText)&&t.nodeSize>0&&(this.atBlockStart=!1)};e.forEach(i),i(null,0,e.childCount),this.atBlockStart=!1}renderList(e,t,n){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let r=void 0!==e.attrs.tight?e.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=r,e.forEach((i,s,o)=>{o&&r&&this.flushClose(1),this.wrapBlock(t,n(o),e,()=>this.render(i,e,o))}),this.inTightList=i}esc(e,t=!1){return e=e.replace(/[`*\\~\[\]_]/g,(t,n)=>"_"==t&&n>0&&n+1<e.length&&e[n-1].match(/\w/)&&e[n+1].match(/\w/)?t:"\\"+t),t&&(e=e.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,"\\$&")),e}quote(e){let t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()";return t[0]+e+t[1]}repeat(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}markString(e,t,n,r){let i=this.getMark(e.type.name),s=t?i.open:i.close;return"string"==typeof s?s:s(this,e,n,r)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(e,t,n){for(;;t++){if(t>=e.childCount)return!1;let r=e.child(t);if(r.type.name!=this.options.hardBreakNodeName)return n.isInSet(r.marks);t++}}}var n3=n(65915),n5=n(76865),n4=Object.defineProperty,n6=(e,t,n)=>t in e?n4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,n8=(e,t,n)=>(n6(e,"symbol"!=typeof t?t+"":t,n),n);let n9=f.YY.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>"true"===e.getAttribute("data-tight")||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return n=>{let{editor:r,commands:i}=n;function s(e){if(!r.isActive(e))return!1;let n=r.getAttributes(e);return i.updateAttributes(e,{tight:null!=t?t:!(null!=n&&n.tight)})}return e.options.listTypes.some(e=>s(e))}}}}}),n7=n$();function re(e,t){return n7.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new n7.inline.State(e,null,null,[]).scanDelims(t,!0)}function rt(e,t,n,r){let i=e.substring(0,n)+e.substring(n+t.length);return i.substring(0,n+r)+t+i.substring(n+r)}function rn(e,t,n,r){let i=n,s=e;for(;i<r&&!re(s,i).can_open;)s=rt(s,t,i,1),i++;return{text:s,from:i,to:r}}function rr(e,t,n,r){let i=r,s=e;for(;i>n&&!re(s,i).can_close;)s=rt(s,t,i,-1),i--;return{text:s,from:n,to:i}}function ri(e,t,n,r){let i={text:e,from:n,to:r};return(i=rr((i=rn(i.text,t,i.from,i.to)).text,t,i.from,i.to)).to-i.from<t.length+1&&(i.text=i.text.substring(0,i.from)+i.text.substring(i.to+t.length)),i.text}class rs extends n2{constructor(e,t,n){super(e,t,null!=n?n:{}),n8(this,"inTable",!1),this.inlines=[]}render(e,t,n){super.render(e,t,n);let r=this.inlines[this.inlines.length-1];if(null!=r&&r.start&&null!=r&&r.end){let{delimiter:e,start:t,end:n}=this.normalizeInline(r);this.out=ri(this.out,e,t,n),this.inlines.pop()}}markString(e,t,n,r){let i=this.marks[e.type.name];if(i.expelEnclosingWhitespace)if(t)this.inlines.push({start:this.out.length,delimiter:i.open});else{let e=this.inlines.pop();this.inlines.push({...e,end:this.out.length})}return super.markString(e,t,n,r)}normalizeInline(e){let{start:t,end:n}=e;for(;this.out.charAt(t).match(/\s/);)t++;return{...e,start:t}}}let ro=f.CU.create({name:"markdownHTMLMark",addStorage:()=>({markdown:{serialize:{open(e,t){var n,r;return this.editor.storage.markdown.options.html?null!=(n=null==(r=ra(t))?void 0:r[0])?n:"":(console.warn(`Tiptap Markdown: "${t.type.name}" mark is only available in html mode`),"")},close(e,t){var n,r;return this.editor.storage.markdown.options.html&&null!=(n=null==(r=ra(t))?void 0:r[1])?n:""}},parse:{}}})});function ra(e){let t=e.type.schema,n=t.text(" ",[e]),r=(0,f.su)(m.FK.from(n),t).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}function rl(e){let t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,"text/html").body}function rh(e){return null==e?void 0:e.replace(/</g,"<").replace(/>/g,">")}function rc(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),0===t.childNodes.length&&t.remove()}function ru(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}let rd=f.bP.create({name:"markdownHTMLNode",addStorage:()=>({markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(rp(t,n)):(console.warn(`Tiptap Markdown: "${t.type.name}" node is only available in html mode`),e.write(`[${t.type.name}]`)),t.isBlock&&e.closeBlock(t)},parse:{}}})});function rp(e,t){let n=e.type.schema,r=(0,f.su)(m.FK.from(e),n);return e.isBlock&&(t instanceof m.FK||t.type.name===n.topNodeType.name)?rf(r):r}function rf(e){let t=rl(e).firstElementChild;return t.innerHTML=t.innerHTML.trim()?`
|
|
10
|
+
${t.innerHTML}
|
|
11
|
+
`:`
|
|
12
|
+
`,t.outerHTML}let rm=f.bP.create({name:"blockquote"}).extend({addStorage:()=>({markdown:{serialize:nY.nodes.blockquote,parse:{}}})}),rg=f.bP.create({name:"bulletList"}).extend({addStorage:()=>({markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}})}),r_=f.bP.create({name:"codeBlock"}).extend({addStorage:()=>({markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:null!=(t=this.options.languageClassPrefix)?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}})}),ry=f.bP.create({name:"hardBreak"}).extend({addStorage:()=>({markdown:{serialize(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type)return void e.write(e.inTable?rd.storage.markdown.serialize.call(this,e,t,n):"\\\n")},parse:{}}})}),rb=f.bP.create({name:"heading"}).extend({addStorage:()=>({markdown:{serialize:nY.nodes.heading,parse:{}}})}),rk=f.bP.create({name:"horizontalRule"}).extend({addStorage:()=>({markdown:{serialize:nY.nodes.horizontal_rule,parse:{}}})}),rw=f.bP.create({name:"image"}).extend({addStorage:()=>({markdown:{serialize:nY.nodes.image,parse:{}}})}),rv=f.bP.create({name:"listItem"}).extend({addStorage:()=>({markdown:{serialize:nY.nodes.list_item,parse:{}}})});function rC(e,t,n){let r=0;for(;n-r>0&&t.child(n-r-1).type.name===e.type.name;r++);return r}let rx=f.bP.create({name:"orderedList"}).extend({addStorage:()=>({markdown:{serialize(e,t,n,r){let i=t.attrs.start||1,s=String(i+t.childCount-1).length,o=e.repeat(" ",s+2),a=rC(t,n,r)%2?") ":". ";e.renderList(t,o,t=>{let n=String(i+t);return e.repeat(" ",s-n.length)+n+a})},parse:{}}})}),rS=f.bP.create({name:"paragraph"}).extend({addStorage:()=>({markdown:{serialize:nY.nodes.paragraph,parse:{}}})});function rA(e){var t,n;return null!=(t=null==e||null==(n=e.content)?void 0:n.content)?t:[]}let rE=f.bP.create({name:"table"}).extend({addStorage:()=>({markdown:{serialize(e,t,n){rT(t)?(e.inTable=!0,t.forEach((t,n,r)=>{if(e.write("| "),t.forEach((t,n,r)=>{r&&e.write(" | ");let i=t.firstChild;i.textContent.trim()&&e.renderInline(i)}),e.write(" |"),e.ensureNewLine(),!r){let n=Array.from({length:t.childCount}).map(()=>"---").join(" | ");e.write(`| ${n} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1):rd.storage.markdown.serialize.call(this,e,t,n)},parse:{}}})});function rM(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function rT(e){let t=rA(e),n=t[0],r=t.slice(1);return!(rA(n).some(e=>"tableHeader"!==e.type.name||rM(e)||e.childCount>1)||r.some(e=>rA(e).some(e=>"tableHeader"===e.type.name||rM(e)||e.childCount>1)))}let rN=f.bP.create({name:"taskItem"}).extend({addStorage:()=>({markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(e=>{let t=e.querySelector("input");e.setAttribute("data-type","taskItem"),t&&(e.setAttribute("data-checked",t.checked),t.remove())})}}}})}),rI=f.bP.create({name:"taskList"}).extend({addStorage:()=>({markdown:{serialize:rg.storage.markdown.serialize,parse:{setup(e){e.use(n3)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(e=>{e.setAttribute("data-type","taskList")})}}}})}),rD=[rm,rg,r_,ry,rb,rk,rd,rw,rv,rx,rS,rE,rN,rI,f.bP.create({name:"text"}).extend({addStorage:()=>({markdown:{serialize(e,t){e.text(rh(t.text))},parse:{}}})}),f.CU.create({name:"bold"}).extend({addStorage:()=>({markdown:{serialize:nY.marks.strong,parse:{}}})}),f.CU.create({name:"code"}).extend({addStorage:()=>({markdown:{serialize:nY.marks.code,parse:{}}})}),ro,f.CU.create({name:"italic"}).extend({addStorage:()=>({markdown:{serialize:nY.marks.em,parse:{}}})}),f.CU.create({name:"link"}).extend({addStorage:()=>({markdown:{serialize:nY.marks.link,parse:{}}})}),f.CU.create({name:"strike"}).extend({addStorage:()=>({markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}})})];function rL(e){var t,n;let r=null==(t=e.storage)?void 0:t.markdown,i=null==(n=rD.find(t=>t.name===e.name))?void 0:n.storage.markdown;return r||i?{...i,...r}:null}class rR{constructor(e){n8(this,"editor",null),this.editor=e}serialize(e){let t=new rs(this.nodes,this.marks,{hardBreakNodeName:ry.name});return t.renderContent(e),t.out}get nodes(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(e=>[e,this.serializeNode(rd)])),...Object.fromEntries(null!=(e=this.editor.extensionManager.extensions.filter(e=>"node"===e.type&&this.serializeNode(e)).map(e=>[e.name,this.serializeNode(e)]))?e:[])}}get marks(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(e=>[e,this.serializeMark(ro)])),...Object.fromEntries(null!=(e=this.editor.extensionManager.extensions.filter(e=>"mark"===e.type&&this.serializeMark(e)).map(e=>[e.name,this.serializeMark(e)]))?e:[])}}serializeNode(e){var t;return null==(t=rL(e))||null==(t=t.serialize)?void 0:t.bind({editor:this.editor,options:e.options})}serializeMark(e){var t;let n=null==(t=rL(e))?void 0:t.serialize;return n?{...n,open:"function"==typeof n.open?n.open.bind({editor:this.editor,options:e.options}):n.open,close:"function"==typeof n.close?n.close.bind({editor:this.editor,options:e.options}):n.close}:null}}class rF{constructor(e,t){n8(this,"editor",null),n8(this,"md",null);let{html:n,linkify:r,breaks:i}=t;this.editor=e,this.md=this.withPatchedRenderer(n$({html:n,linkify:r,breaks:i}))}parse(e){let{inline:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e){this.editor.extensionManager.extensions.forEach(e=>{var t;return null==(t=rL(e))||null==(t=t.parse)||null==(t=t.setup)?void 0:t.call({editor:this.editor,options:e.options},this.md)});let n=rl(this.md.render(e));return this.editor.extensionManager.extensions.forEach(e=>{var t;return null==(t=rL(e))||null==(t=t.parse)||null==(t=t.updateDOM)?void 0:t.call({editor:this.editor,options:e.options},n)}),this.normalizeDOM(n,{inline:t,content:e}),n.innerHTML}return e}normalizeDOM(e,t){let{inline:n,content:r}=t;return this.normalizeBlocks(e),e.querySelectorAll("*").forEach(e=>{var t;(null==(t=e.nextSibling)?void 0:t.nodeType)!==Node.TEXT_NODE||e.closest("pre")||(e.nextSibling.textContent=e.nextSibling.textContent.replace(/^\n/,""))}),n&&this.normalizeInline(e,r),e}normalizeBlocks(e){let t=Object.values(this.editor.schema.nodes).filter(e=>e.isBlock).map(e=>{var t;return null==(t=e.spec.parseDOM)?void 0:t.map(e=>e.tag)}).flat().filter(Boolean).join(",");t&&[...e.querySelectorAll(t)].forEach(e=>{e.parentElement.matches("p")&&rc(e)})}normalizeInline(e,t){var n,r,i,s,o;if(null!=(n=e.firstElementChild)&&n.matches("p")){let n=e.firstElementChild,{nextElementSibling:a}=n,l=null!=(r=null==(i=t.match(/^\s+/))?void 0:i[0])?r:"",h=a?"":null!=(s=null==(o=t.match(/\s+$/))?void 0:o[0])?s:"";if(t.match(/^\n\n/)){n.innerHTML=`${n.innerHTML}${h}`;return}ru(n),e.innerHTML=`${l}${e.innerHTML}${h}`}}withPatchedRenderer(e){let t=e=>function(){let t=e(...arguments);return"\n"===t?t:"\n"===t[t.length-1]?t.slice(0,-1):t};return e.renderer.rules.hardbreak=t(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=t(e.renderer.rules.softbreak),e.renderer.rules.fence=t(e.renderer.rules.fence),e.renderer.rules.code_block=t(e.renderer.rules.code_block),e.renderer.renderToken=t(e.renderer.renderToken.bind(e.renderer)),e}}let rP=f.YY.create({name:"markdownClipboard",addOptions:()=>({transformPastedText:!1,transformCopiedText:!1}),addProseMirrorPlugins(){return[new n5.k_({key:new n5.hs("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return m.S4.fromSchema(this.editor.schema).parseSlice(rl(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),rO=f.YY.create({name:"markdown",priority:50,addOptions:()=>({html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}),addCommands(){let e=f.XO.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>i=>e.insertContentAt(t,i.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new rF(this.editor,this.options),serializer:new rR(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage:()=>({}),addExtensions(){return[n9.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),rP.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}})},27050:(e,t,n)=>{"use strict";function r(e){this.content=e}n.d(t,{S4:()=>ea,ZF:()=>ew,FK:()=>a,CU:()=>u,sX:()=>en,bP:()=>D,u$:()=>N,vI:()=>d,Sj:()=>er,Ji:()=>p}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return -1==s?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new r(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(-1==o?s.length:o,0,t,n),new r(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};let i=r;function s(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let e=0;i.text[e]==o.text[e];e++)n++;return n}if(i.content.size||o.content.size){let e=s(i.content,o.content,n+1);if(null!=e)return e}n+=i.nodeSize}}function o(e,t,n,r){for(let i=e.childCount,s=t.childCount;;){if(0==i||0==s)return i==s?null:{a:n,b:r};let a=e.child(--i),l=t.child(--s),h=a.nodeSize;if(a==l){n-=h,r-=h;continue}if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let e=0,t=Math.min(a.text.length,l.text.length);for(;e<t&&a.text[a.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let e=o(a.content,l.content,n-1,r-1);if(e)return e}n-=h,r-=h}}class a{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let s=0,o=0;o<t;s++){let a=this.content[s],l=o+a.nodeSize;if(l>e&&!1!==n(a,r+o,i||null,s)&&a.content.size){let i=o+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}o=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",s=!0;return this.nodesBetween(e,t,(o,a)=>{let l=o.isText?o.text.slice(Math.max(e,a)-a,t-a):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&l||o.isTextblock)&&n&&(s?s=!1:i+=n),i+=l},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new a(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,s=0;s<t;i++){let o=this.content[i],a=s+o.nodeSize;a>e&&((s<e||a>t)&&(o=o.isText?o.cut(Math.max(0,e-s),Math.min(o.text.length,t-s)):o.cut(Math.max(0,e-s-1),Math.min(o.content.size,t-s-1))),n.push(o),r+=o.nodeSize),s=a}return new a(n,r)}cutByIndex(e,t){return e==t?a.empty:0==e&&t==this.content.length?this:new a(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new a(r,i)}addToStart(e){return new a([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new a(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return s(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return o(this,e,t,n)}findIndex(e){if(0==e)return h(0,e);if(e==this.size)return h(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return h(t+1,r);return h(t,n)}n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return a.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new a(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return a.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new a(t||e,n)}static from(e){if(!e)return a.empty;if(e instanceof a)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new a([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}a.empty=new a([],0);let l={index:0,offset:0};function h(e,t){return l.index=e,l.offset=t,l}function c(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!c(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!c(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class u{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&c(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return u.none;if(e instanceof u)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}u.none=[];class d extends Error{}class p{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=m(this.content,e+this.openStart,t);return n&&new p(n,this.openStart,this.openEnd)}removeBetween(e,t){return new p(f(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return p.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new p(a.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new p(e,n,r)}}function f(e,t,n){let{index:r,offset:i}=e.findIndex(t),s=e.maybeChild(r),{index:o,offset:a}=e.findIndex(n);if(i==t||s.isText){if(a!=n&&!e.child(o).isText)throw RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError("Removing non-flat range");return e.replaceChild(r,s.copy(f(s.content,t-i-1,n-i-1)))}function m(e,t,n,r){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i);if(s==t||o.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=m(o.content,t-s-1,n,o);return a&&e.replaceChild(i,o.copy(a))}function g(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return _(e,t,n,0)}function _(e,t,n,r){let i=e.index(r),s=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=_(e,t,n,r+1);return s.copy(s.content.replaceChild(i,o))}if(!n.content.size)return v(s,x(e,t,r));if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:i,end:o}=S(n,e);return v(s,C(e,i,o,t,r))}{let r=e.parent,i=r.content;return v(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}}function y(e,t){if(!t.type.compatibleContent(e.type))throw new d("Cannot join "+t.type.name+" onto "+e.type.name)}function b(e,t,n){let r=e.node(n);return y(r,t.node(n)),r}function k(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function w(e,t,n,r){let i=(t||e).node(n),s=0,o=t?t.index(n):i.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(k(e.nodeAfter,r),s++));for(let e=s;e<o;e++)k(i.child(e),r);t&&t.depth==n&&t.textOffset&&k(t.nodeBefore,r)}function v(e,t){return e.type.checkContent(t),e.copy(t)}function C(e,t,n,r,i){let s=e.depth>i&&b(e,t,i+1),o=r.depth>i&&b(n,r,i+1),l=[];return w(null,e,i,l),s&&o&&t.index(i)==n.index(i)?(y(s,o),k(v(s,C(e,t,n,r,i+1)),l)):(s&&k(v(s,x(e,t,i+1)),l),w(t,n,i,l),o&&k(v(o,x(n,r,i+1)),l)),w(r,null,i,l),new a(l)}function x(e,t,n){let r=[];return w(null,e,n,r),e.depth>n&&k(v(b(e,t,n+1),x(e,t,n+1)),r),w(t,null,n,r),new a(r)}function S(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(a.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}p.empty=new p(a.empty,0,0);class A{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return u.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new N(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:s}=t.content.findIndex(i),o=i-s;if(n.push(t,e,r+s),!o||(t=t.child(e)).isText)break;i=o-1,r+=s+1}return new A(t,n,i)}static resolveCached(e,t){let n=T.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else T.set(e,n=new E);let r=n.elts[n.i]=A.resolve(e,t);return n.i=(n.i+1)%M,r}}class E{constructor(){this.elts=[],this.i=0}}let M=12,T=new WeakMap;class N{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let I=Object.create(null);class D{constructor(e,t,n,r=u.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||a.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&c(this.attrs,t||e.defaultAttrs||I)&&u.sameSet(this.marks,n||u.none)}copy(e=null){return e==this.content?this:new D(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new D(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return p.empty;let r=this.resolve(e),i=this.resolve(t),s=n?0:r.sharedDepth(t),o=r.start(s);return new p(r.node(s).content.cut(r.pos-o,i.pos-o),r.depth-s,i.depth-s)}replace(e,t,n){return g(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return A.resolveCached(this,e)}resolveNoCache(e){return A.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),R(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=a.empty,r=0,i=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,r,i),o=s&&s.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),s=i&&i.matchFragment(this.content,t);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=u.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!u.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=a.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}D.prototype.text=void 0;class L extends D{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):R(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new L(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new L(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function R(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class F{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new P(e,t);if(null==n.next)return F.empty;let r=O(n);n.next&&n.err("Unexpected trailing text");let i=G(U(r));return J(i,n),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(s,o){let l=s.matchFragment(e,n);if(l&&(!t||l.validEnd))return a.from(o.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:n}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:s,next:o}=i.next[e];s.isLeaf||s.hasRequiredAttrs()||s.name in t||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}F.empty=new F(!0);class P{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function O(e){let t=[];do t.push(z(e));while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function z(e){let t=[];do t.push(B(e));while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function B(e){let t=H(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=j(e,t);else break;return t}function $(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function j(e,t){let n=$(e),r=n;return e.eat(",")&&(r="}"!=e.next?$(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function q(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i}function H(e){if(e.eat("(")){let t=O(e);return e.eat(")")||e.err("Missing closing paren"),t}if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=q(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}}function U(e){let t=[[]];return i(s(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function s(e,t){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(s(n,t)),[]);if("seq"==e.type)for(let r=0;;r++){let o=s(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if("star"==e.type){let o=n();return r(t,o),i(s(e.expr,o),o),[r(o)]}else if("plus"==e.type){let o=n();return i(s(e.expr,t),o),i(s(e.expr,o),o),[r(o)]}else if("opt"==e.type)return[r(t)].concat(s(e.expr,t));else if("range"==e.type){let o=t;for(let t=0;t<e.min;t++){let t=n();i(s(e.expr,o),t),o=t}if(-1==e.max)i(s(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(s(e.expr,o),t),o=t}return[r(o)]}else if("name"==e.type)return[r(t,void 0,e.value)];else throw Error("Unknown expr type")}}function W(e,t){return t-e}function V(e,t){let n=[];return r(t),n.sort(W);function r(t){let i=e[t];if(1==i.length&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:s}=i[e];t||-1!=n.indexOf(s)||r(s)}}}function G(e){let t=Object.create(null);return n(V(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{let r;if(t){for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);V(e,n).forEach(e=>{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})}})});let s=t[r.join(",")]=new F(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(W);s.next.push({type:i[e][0],next:t[r.join(",")]||n(r)})}return s}}function J(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,s=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];s.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function K(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Z(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function X(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function Q(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new et(e,r,t[r]);return n}class Y{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=Q(e,n.attrs),this.defaultAttrs=K(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==F.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Z(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new D(this,this.computeAttrs(e),a.from(t),u.setFrom(n))}createChecked(e=null,t,n){return t=a.from(t),this.checkContent(t),new D(this,this.computeAttrs(e),t,u.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=a.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(a.empty,!0);return i?new D(this,e,t.append(i),u.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){X(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:u.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new Y(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}function ee(e,t,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}class et{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?ee(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class en{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Q(e,r.attrs),this.excluded=null;let i=K(this.attrs);this.instance=i?new u(this,i):null}create(e=null){return!e&&this.instance?this.instance:new u(this,Z(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new en(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){X(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class er{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=i.from(e.nodes),t.marks=i.from(e.marks||{}),this.nodes=Y.compile(this.spec.nodes,this),this.marks=en.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=F.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?ei(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:ei(this,n.split(" "))}this.nodeFromJSON=e=>D.fromJSON(this,e),this.markFromJSON=e=>u.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof Y){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new L(n,n.defaultAttrs,e,u.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function ei(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],s=e.marks[i],o=s;if(s)n.push(s);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function es(e){return null!=e.tag}function eo(e){return null!=e.style}class ea{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(es(e))this.tags.push(e);else if(eo(e)){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new eg(this,t,!1);return n.addAll(e,u.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new eg(this,t,!0);return n.addAll(e,u.none,t.from,t.to),p.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(ey(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],s=r.style;if(0==s.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(s.length>e.length)||61==s.charCodeAt(e.length)&&s.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=eb(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=eb(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ea(e,ea.schemaRules(e)))}}let el={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},eh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ec={ol:!0,ul:!0},eu=1,ed=2,ep=4;function ef(e,t,n){return null!=t?(t?eu:0)|("full"===t?ed:0):e&&"pre"==e.whitespace?eu|ed:n&~ep}class em{constructor(e,t,n,r,i,s){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=u.none,this.match=i||(s&ep?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(a.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&eu)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=a.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!el.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class eg{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,s=ef(null,t.preserveWhitespace,0)|(n?ep:0);i=r?new em(r.type,r.attrs,u.none,!0,t.topMatch||r.type.contentMatch,s):n?new em(null,null,u.none,!0,null,s):new em(e.schema.topNodeType,null,u.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&ed?"full":this.localPreserveWS||(r.options&eu)>0,{schema:s}=this.parser;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(s.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(s.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(s.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;ec.hasOwnProperty(s)&&this.parser.normalizeLists&&e_(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));r:if(a?a.ignore:eh.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let n,r=this.needsBlock;if(el.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break r}let o=a&&a.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,a,n,!1===a.consuming?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,s;if(t.node)if((s=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(s.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(s,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let s=n?e.childNodes[n]:e.firstChild,o=null==r?null:e.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,s=0;t>=0;t--){let o=this.nodes[t],a=o.findWrapping(e);if(a&&(!r||r.length>a.length+s)&&(r=a,i=o,!a.length))break;if(o.solid){if(n)break;s+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=u.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):ek(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=ef(e,i,s.options);s.options&ep&&0==s.content.length&&(o|=ep);let a=u.none;return n=n.filter(t=>(s.type?!s.type.allowsMarkType(t.type):!ek(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new em(e,t,a,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=eu);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,s=(e,o)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;o>=i;o--)if(s(e-1,o))return!0;return!1}{let e=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=a&&!e.isInGroup(a))return!1;o--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function e_(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&ec.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}function ey(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function eb(e){let t={};for(let n in e)t[n]=e[n];return t}function ek(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let s=[],o=e=>{s.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>s.indexOf(i)&&o(i))return!0}};if(o(i.contentMatch))return!0}}class ew{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=eC(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,s=0;for(;n<i.length&&s<e.marks.length;){let t=e.marks[s];if(!this.marks[t.type.name]){s++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,s++}for(;n<i.length;)r=i.pop()[1];for(;s<e.marks.length;){let n=e.marks[s++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=eE(eC(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&eE(eC(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return eE(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ew(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=ev(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return ev(e.marks)}}function ev(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function eC(e){return e.document||window.document}let ex=new WeakMap;function eS(e){let t=ex.get(e);return void 0===t&&ex.set(e,t=eA(e)),t}function eA(e){let t=null;function n(e){if(e&&"object"==typeof e)if(Array.isArray(e))if("string"==typeof e[0])t||(t=[]),t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}function eE(e,t,n,r){let i;if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let s=t[0],o;if("string"!=typeof s)throw RangeError("Invalid array passed to renderSpec");if(r&&(o=eS(r))&&o.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=s.indexOf(" ");a>0&&(n=s.slice(0,a),s=s.slice(a+1));let l=n?e.createElementNS(n,s):e.createElement(s),h=t[1],c=1;if(h&&"object"==typeof h&&null==h.nodeType&&!Array.isArray(h)){for(let e in c=2,h)if(null!=h[e]){let t=e.indexOf(" ");t>0?l.setAttributeNS(e.slice(0,t),e.slice(t+1),h[e]):"style"==e&&l.style?l.style.cssText=h[e]:l.setAttribute(e,h[e])}}for(let s=c;s<t.length;s++){let o=t[s];if(0===o){if(s<t.length-1||s>c)throw RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:t,contentDOM:s}=eE(e,o,n,r);if(l.appendChild(t),s){if(i)throw RangeError("Multiple content holes");i=s}}}return{dom:l,contentDOM:i}}},31794:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],s=(0,r.A)("heading-1",i)},33210:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],s=(0,r.A)("x",i)},36201:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],s=(0,r.A)("square",i)},37595:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],s=(0,r.A)("layout-grid",i)},37618:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],s=(0,r.A)("pen-line",i)},37795:(e,t,n)=>{"use strict";n.d(t,{A:()=>$});var r=n(82159),i=(e,t)=>{if("slot"===e)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=null!=t?t:{};if("svg"===e)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},s=/^\s*>\s$/,o=r.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return i("blockquote",{...(0,r.KV)(this.options.HTMLAttributes,e),children:i("slot",{})})},parseMarkdown:(e,t)=>{var n;let r=null!=(n=t.parseBlockChildren)?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach((e,i)=>{var s,o;let a=(null!=(o=null==(s=t.renderChild)?void 0:s.call(t,e,i))?o:t.renderChildren([e])).split("\n").map(e=>""===e.trim()?n:`${n} ${e}`);r.push(a.join("\n"))}),r.join(`
|
|
13
|
+
${n}
|
|
14
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.tG)({find:s,type:this.type})]}}),a=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,h=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,c=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,u=r.CU.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return i("strong",{...(0,r.KV)(this.options.HTMLAttributes,e),children:i("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.OX)({find:a,type:this.type}),(0,r.OX)({find:h,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:l,type:this.type}),(0,r.Zc)({find:c,type:this.type})]}}),d=/(^|[^`])`([^`]+)`(?!`)$/,p=/(^|[^`])`([^`]+)`(?!`)/g,f=r.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.OX)({find:d,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:p,type:this.type})]}}),m=n(76865),g=4,_=/^```([a-z]+)?[\s\n]$/,y=/^~~~([a-z]+)?[\s\n]$/,b=r.bP.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:g,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,r.KV)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return(null==(n=e.raw)?void 0:n.startsWith("```"))===!1&&(null==(r=e.raw)?void 0:r.startsWith("~~~"))===!1&&"indented"!==e.codeBlockStyle?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.language)||"";return e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join("\n"):`\`\`\`${r}
|
|
15
|
+
|
|
16
|
+
\`\`\``},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:g,{state:r}=e,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;let a=" ".repeat(n);return o?e.commands.insertContent(a):e.commands.command(({tr:e})=>{let{from:t,to:n}=i,s=r.doc.textBetween(t,n,"\n","\n").split("\n").map(e=>a+e).join("\n");return e.replaceWith(t,n,r.schema.text(s)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:g,{state:r}=e,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type===this.type&&(o?e.commands.command(({tr:e})=>{var t;let{pos:i}=s,o=s.start(),a=s.end(),l=r.doc.textBetween(o,a,"\n","\n").split("\n"),h=0,c=0,u=i-o;for(let e=0;e<l.length;e+=1){if(c+l[e].length>=u){h=e;break}c+=l[e].length+1}let d=Math.min(((null==(t=l[h].match(/^ */))?void 0:t[0])||"").length,n);if(0===d)return!0;let p=o;for(let e=0;e<h;e+=1)p+=l[e].length+1;return e.delete(p,p+d),i-p<=d&&e.setSelection(m.U3.create(e.doc,p)),!0}):e.commands.command(({tr:e})=>{let{from:t,to:s}=i,o=r.doc.textBetween(t,s,"\n","\n").split("\n").map(e=>{var t;let r=Math.min(((null==(t=e.match(/^ */))?void 0:t[0])||"").length,n);return e.slice(r)}).join("\n");return e.replaceWith(t,s,r.schema.text(o)),!0}))},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith("\n\n");return!!s&&!!o&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return void 0!==o&&(r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(m.LN.near(r.resolve(o))),!0)):e.commands.exitCode())}}},addInputRules(){return[(0,r.JJ)({find:_,type:this.type,getAttributes:e=>({language:e[1]})}),(0,r.JJ)({find:y,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new m.k_({key:new m.hs("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=null==i?void 0:i.mode;if(!n||!s)return!1;let{tr:o,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,"\n"));return o.replaceSelectionWith(this.type.create({language:s},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(m.U3.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),e.dispatch(o),!0}}})]}}),k=r.bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""}),w=r.bP.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.KV)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>`
|
|
17
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:o}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&a&&s){let t=a.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),v=r.bP.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){let n=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.KV)(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,...{[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}}),{})},addInputRules(){return this.options.levels.map(e=>(0,r.JJ)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),C=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",(0,r.KV)(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!(0,r.AB)(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:i}=n,s=e();return(0,r.BQ)(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(m.U3.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(m.nh.create(t.doc,n.pos)):t.setSelection(m.U3.create(t.doc,n.pos));else{let i=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,s=null==i?void 0:i.create();s&&(t.insert(r,s),t.setSelection(m.U3.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.Ce)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),x=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,S=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,A=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,E=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,M=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.OX)({find:x,type:this.type}),(0,r.OX)({find:A,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:S,type:this.type}),(0,r.Zc)({find:E,type:this.type})]}}),T=n(59265),N=n(82150),I=" ",D="\xa0",L=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===I||n[0].text===I||n[0].raw===D||n[0].text===D)&&1===r.length&&"text"===r[0].type&&(r[0].text===I||r[0].text===D)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{var r,i;if(!e)return"";let s=Array.isArray(e.content)?e.content:[];if(0===s.length){let e=Array.isArray(null==(r=null==n?void 0:n.previousNode)?void 0:r.content)?n.previousNode.content:[];return(null==(i=null==n?void 0:n.previousNode)?void 0:i.type)==="paragraph"&&0===e.length?I:""}return t.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),R=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,F=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,P=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.OX)({find:R,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:F,type:this.type})]}}),O=r.bP.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),z=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>`++${t.renderChildren(e)}++`,markdownTokenizer:{name:"underline",level:"inline",start:e=>e.indexOf("++"),tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),B=n(62678),$=r.YY.create({name:"starterKit",addExtensions(){var e,t,n,r;let i=[];return!1!==this.options.bold&&i.push(u.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(o.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(N.Rg.configure(this.options.bulletList)),!1!==this.options.code&&i.push(f.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(b.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(k.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(B.QO.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(B.vR.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(w.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(v.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(B.lb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(C.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(M.configure(this.options.italic)),!1!==this.options.listItem&&i.push(N.ck.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(N.it.configure(null==(e=this.options)?void 0:e.listKeymap)),!1!==this.options.link&&i.push(T.N_.configure(null==(t=this.options)?void 0:t.link)),!1!==this.options.orderedList&&i.push(N._J.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(L.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(P.configure(this.options.strike)),!1!==this.options.text&&i.push(O.configure(this.options.text)),!1!==this.options.underline&&i.push(z.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(B.JU.configure(null==(r=this.options)?void 0:r.trailingNode)),i}})},42080:(e,t,n)=>{"use strict";n.d(t,{$B:()=>u,Sd:()=>s,T2:()=>l});var r=n(8242),i=n(27050);function s(e,t=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s);if(!a)return!1;let l=r?n.tr:null;return!!o(l,a,e,t)&&(r&&r(l.scrollIntoView()),!0)}}function o(e,t,n,s=null){let l=!1,h=t,c=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=c.resolve(t.start-2);h=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,c.resolve(t.$to.end(t.depth)),t.depth)),l=!0}let u=(0,r.oM)(h,n,s,t);return!!u&&(e&&a(e,t,u,l,n),!0)}function a(e,t,n,s,o){let a=i.FK.empty;for(let e=n.length-1;e>=0;e--)a=i.FK.from(n[e].type.create(n[e].attrs,a));e.step(new r.Wg(t.start-2*!!s,t.end,t.start,t.end,new i.Ji(a,0,0),n.length,!0));let l=0;for(let e=0;e<n.length;e++)n[e].type==o&&(l=e+1);let h=n.length-l,c=t.start+n.length-2*!!s,u=t.parent;for(let n=t.startIndex,i=t.endIndex,s=!0;n<i;n++,s=!1)!s&&(0,r.zy)(e.doc,c,h)&&(e.split(c,h),c+=2*h),c+=u.child(n).nodeSize;return e}function l(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return!!s&&(!n||(r.node(s.depth-1).type==e?h(t,n,e,s):c(t,n,s)))}}function h(e,t,n,s){let o=e.tr,a=s.end,l=s.$to.end(s.depth);a<l&&(o.step(new r.Wg(a-1,l,a,l,new i.Ji(i.FK.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new i.u$(o.doc.resolve(s.$from.pos),o.doc.resolve(l),s.depth));let h=(0,r.jP)(s);if(null==h)return!1;o.lift(s,h);let c=o.doc.resolve(o.mapping.map(a,-1)-1);return(0,r.n9)(o.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&o.join(c.pos),t(o.scrollIntoView()),!0}function c(e,t,n){let s=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=o.child(t).nodeSize,s.delete(e-1,e+1);let a=s.doc.resolve(n.start),l=a.nodeAfter;if(s.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let h=0==n.startIndex,c=n.endIndex==o.childCount,u=a.node(-1),d=a.index(-1);if(!u.canReplace(d+ +!h,d+1,l.content.append(c?i.FK.empty:i.FK.from(o))))return!1;let p=a.pos,f=p+l.nodeSize;return s.step(new r.Wg(p-!!h,f+ +!!c,p+1,f-1,new i.Ji((h?i.FK.empty:i.FK.from(o.copy(i.FK.empty))).append(c?i.FK.empty:i.FK.from(o.copy(i.FK.empty))),+!h,+!c),+!h)),t(s.scrollIntoView()),!0}function u(e){return function(t,n){let{$from:s,$to:o}=t.selection,a=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let l=a.startIndex;if(0==l)return!1;let h=a.parent,c=h.child(l-1);if(c.type!=e)return!1;if(n){let s=c.lastChild&&c.lastChild.type==h.type,o=i.FK.from(s?e.create():null),l=new i.Ji(i.FK.from(e.create(null,i.FK.from(h.type.create(null,o)))),s?3:1,0),u=a.start,d=a.end;n(t.tr.step(new r.Wg(u-(s?3:1),d,u,d,l,1,!0)).scrollIntoView())}return!0}}},42790:(e,t,n)=>{"use strict";n.d(t,{v:()=>l});var r,i,s,o,a=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};!function(e){e[e.EOS=0]="EOS",e[e.Text=1]="Text",e[e.Incomplete=2]="Incomplete",e[e.ESC=3]="ESC",e[e.Unknown=4]="Unknown",e[e.SGR=5]="SGR",e[e.OSCURL=6]="OSCURL"}(r||(r={}));class l{constructor(){this.VERSION="6.0.6",this.setup_palettes(),this._use_classes=!1,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1,this.fg=this.bg=null,this._buffer="",this._url_allowlist={http:1,https:1},this._escape_html=!0,this.boldStyle="font-weight:bold",this.faintStyle="opacity:0.7",this.italicStyle="font-style:italic",this.underlineStyle="text-decoration:underline"}set use_classes(e){this._use_classes=e}get use_classes(){return this._use_classes}set url_allowlist(e){this._url_allowlist=e}get url_allowlist(){return this._url_allowlist}set escape_html(e){this._escape_html=e}get escape_html(){return this._escape_html}set boldStyle(e){this._boldStyle=e}get boldStyle(){return this._boldStyle}set faintStyle(e){this._faintStyle=e}get faintStyle(){return this._faintStyle}set italicStyle(e){this._italicStyle=e}get italicStyle(){return this._italicStyle}set underlineStyle(e){this._underlineStyle=e}get underlineStyle(){return this._underlineStyle}setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach(e=>{e.forEach(e=>{this.palette_256.push(e)})});let e=[0,95,135,175,215,255];for(let t=0;t<6;++t)for(let n=0;n<6;++n)for(let r=0;r<6;++r){let i={rgb:[e[t],e[n],e[r]],class_name:"truecolor"};this.palette_256.push(i)}let t=8;for(let e=0;e<24;++e,t+=10){let e={rgb:[t,t,t],class_name:"truecolor"};this.palette_256.push(e)}}escape_txt_for_html(e){return this._escape_html?e.replace(/[&<>"']/gm,e=>"&"===e?"&":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":void 0):e}append_buffer(e){var t=this._buffer+e;this._buffer=t}get_next_packet(){var e={kind:r.EOS,text:"",url:""},t=this._buffer.length;if(0==t)return e;var n=this._buffer.indexOf("\x1b");if(-1==n)return e.kind=r.Text,e.text=this._buffer,this._buffer="",e;if(n>0)return e.kind=r.Text,e.text=this._buffer.slice(0,n),this._buffer=this._buffer.slice(n),e;if(0==n){if(t<3)return e.kind=r.Incomplete,e;var l=this._buffer.charAt(1);if("["!=l&&"]"!=l&&"("!=l)return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==l){this._csi_regex||(this._csi_regex=h(i||(i=a(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \x1b[ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \x1b[ # CSI\n [ -~]* # anything legal\n ([\0-\x1f:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))));let t=this._buffer.match(this._csi_regex);if(null===t)return e.kind=r.Incomplete,e;if(t[4])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=t[1]||"m"!=t[3]?e.kind=r.Unknown:e.kind=r.SGR,e.text=t[2];var u=t[0].length;return this._buffer=this._buffer.slice(u),e}if("]"==l){if(t<4)return e.kind=r.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=c(s||(s=a(["\n (?: # legal sequence\n (\x1b\\) # ESC | # alternate\n (\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-\x06] # anything illegal\n | # alternate\n [\b-\x1a] # anything illegal\n | # alternate\n [\x1c-\x1f] # anything illegal\n )\n "],["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "])))),this._osc_st.lastIndex=0;{let t=this._osc_st.exec(this._buffer);if(null===t)return e.kind=r.Incomplete,e;if(t[3])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e}{let t=this._osc_st.exec(this._buffer);if(null===t)return e.kind=r.Incomplete,e;if(t[3])return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e}this._osc_regex||(this._osc_regex=h(o||(o=a(["\n ^ # beginning of line\n #\n \x1b]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\x1b\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n ([ -~]+) # TEXT capture\n \x1b]8;; # OSC Hyperlink End\n (?: # ST\n (?:\x1b\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n "],["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x20-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]))));let n=this._buffer.match(this._osc_regex);if(null===n)return e.kind=r.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;e.kind=r.OSCURL,e.url=n[1],e.text=n[2];var u=n[0].length;return this._buffer=this._buffer.slice(u),e}if("("==l)return e.kind=r.Unknown,this._buffer=this._buffer.slice(3),e}}ansi_to_html(e){this.append_buffer(e);for(var t=[];;){var n=this.get_next_packet();if(n.kind==r.EOS||n.kind==r.Incomplete)break;n.kind!=r.ESC&&n.kind!=r.Unknown&&(n.kind==r.Text?t.push(this.transform_to_html(this.with_state(n))):n.kind==r.SGR?this.process_ansi(n):n.kind==r.OSCURL&&t.push(this.process_hyperlink(n)))}return t.join("")}with_state(e){return{bold:this.bold,faint:this.faint,italic:this.italic,underline:this.underline,fg:this.fg,bg:this.bg,text:e.text}}process_ansi(e){let t=e.text.split(";");for(;t.length>0;){let e=parseInt(t.shift(),10);if(isNaN(e)||0===e)this.fg=null,this.bg=null,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1;else if(1===e)this.bold=!0;else if(2===e)this.faint=!0;else if(3===e)this.italic=!0;else if(4===e)this.underline=!0;else if(21===e)this.bold=!1;else if(22===e)this.faint=!1,this.bold=!1;else if(23===e)this.italic=!1;else if(24===e)this.underline=!1;else if(39===e)this.fg=null;else if(49===e)this.bg=null;else if(e>=30&&e<38)this.fg=this.ansi_colors[0][e-30];else if(e>=40&&e<48)this.bg=this.ansi_colors[0][e-40];else if(e>=90&&e<98)this.fg=this.ansi_colors[1][e-90];else if(e>=100&&e<108)this.bg=this.ansi_colors[1][e-100];else if((38===e||48===e)&&t.length>0){let n=38===e,r=t.shift();if("5"===r&&t.length>0){let e=parseInt(t.shift(),10);e>=0&&e<=255&&(n?this.fg=this.palette_256[e]:this.bg=this.palette_256[e])}if("2"===r&&t.length>2){let e=parseInt(t.shift(),10),r=parseInt(t.shift(),10),i=parseInt(t.shift(),10);if(e>=0&&e<=255&&r>=0&&r<=255&&i>=0&&i<=255){let t={rgb:[e,r,i],class_name:"truecolor"};n?this.fg=t:this.bg=t}}}}}transform_to_html(e){let t=e.text;if(0===t.length||(t=this.escape_txt_for_html(t),!e.bold&&!e.italic&&!e.faint&&!e.underline&&null===e.fg&&null===e.bg))return t;let n=[],r=[],i=e.fg,s=e.bg;e.bold&&n.push(this._boldStyle),e.faint&&n.push(this._faintStyle),e.italic&&n.push(this._italicStyle),e.underline&&n.push(this._underlineStyle),this._use_classes?(i&&("truecolor"!==i.class_name?r.push(`${i.class_name}-fg`):n.push(`color:rgb(${i.rgb.join(",")})`)),s&&("truecolor"!==s.class_name?r.push(`${s.class_name}-bg`):n.push(`background-color:rgb(${s.rgb.join(",")})`))):(i&&n.push(`color:rgb(${i.rgb.join(",")})`),s&&n.push(`background-color:rgb(${s.rgb})`));let o="",a="";return r.length&&(o=` class="${r.join(" ")}"`),n.length&&(a=` style="${n.join(";")}"`),`<span${a}${o}>${t}</span>`}process_hyperlink(e){let t=e.url.split(":");return t.length<1||!this._url_allowlist[t[0]]?"":`<a href="${this.escape_txt_for_html(e.url)}">${this.escape_txt_for_html(e.text)}</a>`}}function h(e){let t=e.raw[0],n=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;return new RegExp(t.replace(n,""))}function c(e){let t=e.raw[0],n=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;return RegExp(t.replace(n,""),"g")}},43203:(e,t,n)=>{"use strict";n.d(t,{n:()=>r.nA});var r=n(5989)},43561:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var r=n(62678).Or},44695:(e,t,n)=>{"use strict";n.d(t,{L:()=>r.L2});var r=n(82150)},45916:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],s=(0,r.A)("text-align-start",i)},48368:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],s=(0,r.A)("file-text",i)},48434:(e,t,n)=>{"use strict";n.d(t,{_:()=>r._0});var r=n(82150)},49698:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],s=(0,r.A)("variable",i)},50538:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],s=(0,r.A)("history",i)},51914:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],s=(0,r.A)("plus",i)},52475:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],s=(0,r.A)("code",i)},53961:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],s=(0,r.A)("zap",i)},55804:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],s=(0,r.A)("circle-dot",i)},58515:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],s=(0,r.A)("square-check-big",i)},59265:(e,t,n)=>{"use strict";n.d(t,{N_:()=>tc,Ay:()=>tu});var r=n(82159);let i="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",s="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",o="numeric",a="ascii",l="alpha",h="asciinumeric",c="alphanumeric",u="domain",d="emoji",p="scheme",f="slashscheme",m="whitespace";function g(e,t){return e in t||(t[e]=[]),t[e]}function _(e,t,n){for(let r in t[o]&&(t[h]=!0,t[c]=!0),t[a]&&(t[h]=!0,t[l]=!0),t[h]&&(t[c]=!0),t[l]&&(t[c]=!0),t[c]&&(t[u]=!0),t[d]&&(t[u]=!0),t){let t=g(r,n);0>t.indexOf(e)&&t.push(e)}}function y(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function b(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}b.groups={},b.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||b.groups,t&&t.j?i=t:(i=new b(t),n&&r&&_(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,s=e.length;if(!s)return i;for(let t=0;t<s-1;t++)i=i.tt(e[t]);return i.tt(e[s-1],t,n,r)},tt(e,t,n,r){r=r||b.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let s=t,o,a=i.go(e);return a?(Object.assign((o=new b).j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new b,s&&(r&&(o.t&&"string"==typeof o.t?_(s,Object.assign(y(o.t,r),n),r):n&&_(s,n,r)),o.t=s),i.j[e]=o,o}};let k=(e,t,n,r,i)=>e.ta(t,n,r,i),w=(e,t,n,r,i)=>e.tr(t,n,r,i),v=(e,t,n,r,i)=>e.ts(t,n,r,i),C=(e,t,n,r,i)=>e.tt(t,n,r,i),x="WORD",S="UWORD",A="ASCIINUMERICAL",E="ALPHANUMERICAL",M="LOCALHOST",T="TLD",N="UTLD",I="SCHEME",D="SLASH_SCHEME",L="NUM",R="WS",F="NL",P="OPENBRACE",O="CLOSEBRACE",z="OPENBRACKET",B="CLOSEBRACKET",$="OPENPAREN",j="CLOSEPAREN",q="OPENANGLEBRACKET",H="CLOSEANGLEBRACKET",U="FULLWIDTHLEFTPAREN",W="FULLWIDTHRIGHTPAREN",V="LEFTCORNERBRACKET",G="RIGHTCORNERBRACKET",J="LEFTWHITECORNERBRACKET",K="RIGHTWHITECORNERBRACKET",Z="FULLWIDTHLESSTHAN",X="FULLWIDTHGREATERTHAN",Q="AMPERSAND",Y="APOSTROPHE",ee="ASTERISK",et="AT",en="BACKSLASH",er="BACKTICK",ei="CARET",es="COLON",eo="COMMA",ea="DOLLAR",el="DOT",eh="EQUALS",ec="EXCLAMATION",eu="HYPHEN",ed="PERCENT",ep="PIPE",ef="PLUS",em="POUND",eg="QUERY",e_="QUOTE",ey="FULLWIDTHMIDDLEDOT",eb="SEMI",ek="SLASH",ew="TILDE",ev="UNDERSCORE",eC="EMOJI",ex="SYM";var eS=Object.freeze({__proto__:null,ALPHANUMERICAL:E,AMPERSAND:Q,APOSTROPHE:Y,ASCIINUMERICAL:A,ASTERISK:ee,AT:et,BACKSLASH:en,BACKTICK:er,CARET:ei,CLOSEANGLEBRACKET:H,CLOSEBRACE:O,CLOSEBRACKET:B,CLOSEPAREN:j,COLON:es,COMMA:eo,DOLLAR:ea,DOT:el,EMOJI:eC,EQUALS:eh,EXCLAMATION:ec,FULLWIDTHGREATERTHAN:X,FULLWIDTHLEFTPAREN:U,FULLWIDTHLESSTHAN:Z,FULLWIDTHMIDDLEDOT:ey,FULLWIDTHRIGHTPAREN:W,HYPHEN:eu,LEFTCORNERBRACKET:V,LEFTWHITECORNERBRACKET:J,LOCALHOST:M,NL:F,NUM:L,OPENANGLEBRACKET:q,OPENBRACE:P,OPENBRACKET:z,OPENPAREN:$,PERCENT:ed,PIPE:ep,PLUS:ef,POUND:em,QUERY:eg,QUOTE:e_,RIGHTCORNERBRACKET:G,RIGHTWHITECORNERBRACKET:K,SCHEME:I,SEMI:eb,SLASH:ek,SLASH_SCHEME:D,SYM:ex,TILDE:ew,TLD:T,UNDERSCORE:ev,UTLD:N,UWORD:S,WORD:x,WS:R});let eA=/[a-z]/,eE=/\p{L}/u,eM=/\p{Emoji}/u,eT=/\d/,eN=/\s/,eI="\r",eD="\n",eL="️",eR="",eF="",eP=null,eO=null;function ez(e=[]){let t={};b.groups=t;let n=new b;null==eP&&(eP=eq(i)),null==eO&&(eO=eq(s)),C(n,"'",Y),C(n,"{",P),C(n,"}",O),C(n,"[",z),C(n,"]",B),C(n,"(",$),C(n,")",j),C(n,"<",q),C(n,">",H),C(n,"(",U),C(n,")",W),C(n,"「",V),C(n,"」",G),C(n,"『",J),C(n,"』",K),C(n,"<",Z),C(n,">",X),C(n,"&",Q),C(n,"*",ee),C(n,"@",et),C(n,"`",er),C(n,"^",ei),C(n,":",es),C(n,",",eo),C(n,"$",ea),C(n,".",el),C(n,"=",eh),C(n,"!",ec),C(n,"-",eu),C(n,"%",ed),C(n,"|",ep),C(n,"+",ef),C(n,"#",em),C(n,"?",eg),C(n,'"',e_),C(n,"/",ek),C(n,";",eb),C(n,"~",ew),C(n,"_",ev),C(n,"\\",en),C(n,"・",ey);let r=w(n,eT,L,{[o]:!0});w(r,eT,r);let g=w(r,eA,A,{[h]:!0}),y=w(r,eE,E,{[c]:!0}),k=w(n,eA,x,{[a]:!0});w(k,eT,g),w(k,eA,k),w(g,eT,g),w(g,eA,g);let eB=w(n,eE,S,{[l]:!0});w(eB,eA),w(eB,eT,y),w(eB,eE,eB),w(y,eT,y),w(y,eA),w(y,eE,y);let e$=C(n,eD,F,{[m]:!0}),eH=C(n,eI,R,{[m]:!0}),eU=w(n,eN,R,{[m]:!0});C(n,eF,eU),C(eH,eD,e$),C(eH,eF,eU),w(eH,eN,eU),C(eU,eI),C(eU,eD),w(eU,eN,eU),C(eU,eF,eU);let eW=w(n,eM,eC,{[d]:!0});C(eW,"#"),w(eW,eM,eW),C(eW,eL,eW);let eV=C(eW,eR);C(eV,"#"),w(eV,eM,eW);let eG=[[eA,k],[eT,g]],eJ=[[eA,null],[eE,eB],[eT,y]];for(let e=0;e<eP.length;e++)ej(n,eP[e],T,x,eG);for(let e=0;e<eO.length;e++)ej(n,eO[e],N,S,eJ);_(T,{tld:!0,ascii:!0},t),_(N,{utld:!0,alpha:!0},t),ej(n,"file",I,x,eG),ej(n,"mailto",I,x,eG),ej(n,"http",D,x,eG),ej(n,"https",D,x,eG),ej(n,"ftp",D,x,eG),ej(n,"ftps",D,x,eG),_(I,{scheme:!0,ascii:!0},t),_(D,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[p]:!0}:{[f]:!0};r.indexOf("-")>=0?i[u]=!0:eA.test(r)?eT.test(r)?i[h]=!0:i[a]=!0:i[o]=!0,v(n,r,r,i)}return v(n,"localhost",M,{ascii:!0}),n.jd=new b(ex),{start:n,tokens:Object.assign({groups:t},eS)}}function eB(e,t){let n=e$(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],s=0,o=0;for(;o<r;){let a=e,l=null,h=0,c=null,u=-1,d=-1;for(;o<r&&(l=a.go(n[o]));)(a=l).accepts()?(u=0,d=0,c=a):u>=0&&(u+=n[o].length,d++),h+=n[o].length,s+=n[o].length,o++;s-=u,o-=d,h-=u,i.push({t:c.t,v:t.slice(s-h,s),s:s-h,e:s})}return i}function e$(e){let t=[],n=e.length,r=0;for(;r<n;){let i,s=e.charCodeAt(r),o=s<55296||s>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function ej(e,t,n,r,i){let s,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?s=e.j[o]:((s=new b(r)).jr=i.slice(),e.j[o]=s),e=s}return(s=new b(n)).jr=i.slice(),e.j[t[o-1]]=s,s}function eq(e){let t=[],n=[],r=0,i="0123456789";for(;r<e.length;){let s=0;for(;i.indexOf(e[r+s])>=0;)s++;if(s>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+s),10);t>0;t--)n.pop();r+=s}else n.push(e[r]),r++}return t}let eH={defaultProtocol:"http",events:null,format:eW,formatHref:eW,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function eU(e,t=null){let n=Object.assign({},eH);e&&(n=Object.assign(n,e instanceof eU?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function eW(e){return e}function eV(e,t){this.t="token",this.v=e,this.tk=t}function eG(e,t){class n extends eV{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}eU.prototype={o:eH,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:eH[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},eV.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=eH.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),s=this.toFormattedString(e),o={},a=e.get("className",n,t),l=e.get("target",n,t),h=e.get("rel",n,t),c=e.getObj("attributes",n,t),u=e.getObj("events",n,t);return o.href=r,a&&(o.class=a),l&&(o.target=l),h&&(o.rel=h),c&&Object.assign(o,c),{tagName:i,attributes:o,content:s,eventListeners:u}}};let eJ=eG("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eK=eG("text"),eZ=eG("nl"),eX=eG("url",{isLink:!0,toHref(e=eH.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==M&&e[1].t===es}}),eQ=e=>new b(e);function eY({groups:e}){let t=e.domain.concat([Q,ee,et,en,er,ei,ea,eh,eu,L,ed,ep,ef,em,ek,ex,ew,ev]),n=[Y,es,eo,el,ec,ed,eg,e_,eb,q,H,P,O,B,z,$,j,U,W,V,G,J,K,Z,X],r=[Q,Y,ee,en,er,ei,ea,eh,eu,P,O,ed,ep,ef,em,eg,ek,ex,ew,ev],i=eQ(),s=C(i,ew);k(s,r,s),k(s,e.domain,s);let o=eQ(),a=eQ(),l=eQ();k(i,e.domain,o),k(i,e.scheme,a),k(i,e.slashscheme,l),k(o,r,s),k(o,e.domain,o);let h=C(o,et);C(s,et,h),C(a,et,h),C(l,et,h);let c=C(s,el);k(c,r,s),k(c,e.domain,s);let u=eQ();k(h,e.domain,u),k(u,e.domain,u);let d=C(u,el);k(d,e.domain,u);let p=eQ(eJ);k(d,e.tld,p),k(d,e.utld,p),C(h,M,p);let f=C(u,eu);C(f,eu,f),k(f,e.domain,u),k(p,e.domain,u),C(p,el,d),C(p,eu,f),k(C(p,es),e.numeric,eJ);let m=C(o,eu),g=C(o,el);C(m,eu,m),k(m,e.domain,o),k(g,r,s),k(g,e.domain,o);let _=eQ(eX);k(g,e.tld,_),k(g,e.utld,_),k(_,e.domain,o),k(_,r,s),C(_,el,g),C(_,eu,m),C(_,et,h);let y=C(_,es),b=eQ(eX);k(y,e.numeric,b);let w=eQ(eX),v=eQ();k(w,t,w),k(w,n,v),k(v,t,w),k(v,n,v),C(_,ek,w),C(b,ek,w);let x=C(a,es),S=C(l,es),A=C(S,ek),E=C(A,ek);k(a,e.domain,o),C(a,el,g),C(a,eu,m),k(l,e.domain,o),C(l,el,g),C(l,eu,m),k(x,e.domain,w),C(x,ek,w),C(x,eg,w),k(E,e.domain,w),k(E,t,w),C(E,ek,w);let T=[[P,O],[z,B],[$,j],[q,H],[U,W],[V,G],[J,K],[Z,X]];for(let e=0;e<T.length;e++){let[r,i]=T[e],s=C(w,r);C(v,r,s),C(s,i,w);let o=eQ(eX);k(s,t,o);let a=eQ();k(s,n),k(o,t,o),k(o,n,a),k(a,t,o),k(a,n,a),C(o,i,w),C(a,i,w)}return C(i,M,_),C(i,F,eZ),{start:i,tokens:eS}}function e0(e,t,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let a=e,l=null,h=null,c=0,u=null,d=-1;for(;i<r&&!(l=a.go(n[i].t));)o.push(n[i++]);for(;i<r&&(h=l||a.go(n[i].t));)l=null,(a=h).accepts()?(d=0,u=a):d>=0&&d++,i++,c++;if(d<0)(i-=c)<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(e1(eK,t,o)),o=[]),i-=d,c-=d;let e=u.t,r=n.slice(i-c,i);s.push(e1(e,t,r))}}return o.length>0&&s.push(e1(eK,t,o)),s}function e1(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let e2="u">typeof console&&console&&console.warn||(()=>{}),e3="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",e5={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function e4(){return b.groups={},e5.scanner=null,e5.parser=null,e5.tokenQueue=[],e5.pluginQueue=[],e5.customSchemes=[],e5.initialized=!1,e5}function e6(e,t=!1){if(e5.initialized&&e2(`linkifyjs: already initialized - will not register custom scheme "${e}" ${e3}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
|
|
18
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
19
|
+
2. Cannot start or end with "-"
|
|
20
|
+
3. "-" cannot repeat`);e5.customSchemes.push([e,t])}function e8(){e5.scanner=ez(e5.customSchemes);for(let e=0;e<e5.tokenQueue.length;e++)e5.tokenQueue[e][1]({scanner:e5.scanner});e5.parser=eY(e5.scanner.tokens);for(let e=0;e<e5.pluginQueue.length;e++)e5.pluginQueue[e][1]({scanner:e5.scanner,parser:e5.parser});return e5.initialized=!0,e5}function e9(e){return e5.initialized||e8(),e0(e5.parser.start,e,eB(e5.scanner.start,e))}function e7(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new eU(n),i=e9(e),s=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&s.push(n.toFormattedObject(r))}return s}e9.scan=eB;var te=n(76865),tt="[\0- \xa0 -\u2029 ]",tn=new RegExp(tt),tr=RegExp(`${tt}$`),ti=RegExp(tt,"g");function ts(e){return 1===e.length?e[0].isLink:3===e.length&&!!e[1].isLink&&["()","[]"].includes(e[0].value+e[2].value)}function to(e){return new te.k_({key:new te.hs("autolink"),appendTransaction:(t,n,i)=>{let s=t.some(e=>e.docChanged)&&!n.doc.eq(i.doc),o=t.some(e=>e.getMeta("preventAutolink"));if(!s||o)return;let{tr:a}=i,l=(0,r.T7)(n.doc,[...t]);if((0,r.FF)(l).forEach(({newRange:t})=>{let n,s,o=(0,r.Nx)(i.doc,t,e=>e.isTextblock);if(o.length>1)n=o[0],s=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(o.length){let e=i.doc.textBetween(t.from,t.to," "," ");if(!tr.test(e))return;n=o[0],s=i.doc.textBetween(n.pos,t.to,void 0," ")}if(n&&s){let t=s.split(tn).filter(Boolean);if(t.length<=0)return!1;let o=t[t.length-1],l=n.pos+s.lastIndexOf(o);if(!o)return!1;let h=e9(o).map(t=>t.toObject(e.defaultProtocol));if(!ts(h))return!1;h.filter(e=>e.isLink).map(e=>({...e,from:l+e.start+1,to:l+e.end+1})).filter(e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{(0,r.hO)(t.from,t.to,i.doc).some(t=>t.mark.type===e.type)||a.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),a.steps.length)return a}})}function ta(e){return new te.k_({key:new te.hs("handleClickLink"),props:{handleClick:(t,n,i)=>{var s,o;if(0!==i.button||!t.editable)return!1;let a=null;if(i.target instanceof HTMLAnchorElement)a=i.target;else{let t=i.target;if(!t)return!1;let n=e.editor.view.dom;(a=t.closest("a"))&&!n.contains(a)&&(a=null)}if(!a)return!1;let l=!1;if(e.enableClickSelection&&(l=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=(0,r.gu)(t.state,e.type.name),i=null!=(s=a.href)?s:n.href,h=null!=(o=a.target)?o:n.target;i&&(window.open(i,h),l=!0)}return l}}})}function tl(e){return new te.k_({key:new te.hs("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:s}=t,{selection:o}=s,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(e=>{l+=e.textContent});let h=e7(l,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===l);return!!l&&!!h&&(void 0===i||!!i(h.value))&&e.editor.commands.setMark(e.type,{href:h.href})}}})}function th(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(ti,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var tc=r.CU.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{"string"==typeof e?e6(e):e6(e.scheme,e.optionalSlashes)})},onDestroy(){e4()},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!th(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!t&&!!this.options.isAllowedUri(t,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,r.KV)(this.options.HTMLAttributes,e),0]:["a",(0,r.KV)(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,s;let o=null!=(r=null==(n=e.attrs)?void 0:n.href)?r:"",a=null!=(s=null==(i=e.attrs)?void 0:i.title)?s:"",l=t.renderChildren(e);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return(!n||!!this.options.isAllowedUri(n,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.Zc)({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=e7(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!th(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:null==(t=e.data)?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(to({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!th(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(ta({type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(tl({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),tu=tc},61878:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],s=(0,r.A)("search",i)},62678:(e,t,n)=>{"use strict";n.d(t,{QO:()=>G,vR:()=>J,Or:()=>X,JU:()=>ee,lb:()=>et});var r=n(82159),i=n(76865),s=n(8242);function o(e={}){return new i.k_({view:t=>new a(t,e)})}class a{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,s=this.editorView.dom,o=s.getBoundingClientRect(),a=o.width/s.offsetWidth,l=o.height/s.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),s=e?r.bottom:r.top;e&&t&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let o=this.width/2*l;i={left:r.left,right:r.right,top:s-o,bottom:s+o}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let h=this.editorView.dom.offsetParent;if(!this.element&&(this.element=h.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let n=h.getBoundingClientRect(),r=n.width/h.offsetWidth,i=n.height/h.offsetHeight;e=n.left-h.scrollLeft*r,t=n.top-h.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/a+"px",this.element.style.top=(i.top-t)/l+"px",this.element.style.width=(i.right-i.left)/a+"px",this.element.style.height=(i.bottom-i.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,s.Um)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}var l=n(63197),h=n(12894),c=n(27050);class u extends i.LN{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return u.valid(n)?new u(n):i.LN.near(n)}content(){return c.Ji.empty}eq(e){return e instanceof u&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new u(e.resolve(t.pos))}getBookmark(){return new d(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!f(e)||!m(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){i:for(;;){if(!n&&u.valid(e))return e;let r=e.pos,s=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){s=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let o=e.doc.resolve(r);if(u.valid(o))return o}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!i.nh.isSelectable(s)){e=e.doc.resolve(r+s.nodeSize*t),n=!1;continue i}break}s=o,r+=t;let a=e.doc.resolve(r);if(u.valid(a))return a}return null}}}u.prototype.visible=!1,u.findFrom=u.findGapCursorFrom,i.LN.jsonID("gapcursor",u);class d{constructor(e){this.pos=e}map(e){return new d(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return u.valid(t)?new u(t):i.LN.near(t)}}function p(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function f(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||p(e.type))return!0;if(e.inlineContent)return!1}}return!0}function m(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||p(e.type))return!0;if(e.inlineContent)return!1}}return!0}function g(){return new i.k_({props:{decorations:w,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&u.valid(n)?new u(n):null,handleClick:b,handleKeyDown:_,handleDOMEvents:{beforeinput:k}}})}let _=(0,h.K)({ArrowLeft:y("horiz",-1),ArrowRight:y("horiz",1),ArrowUp:y("vert",-1),ArrowDown:y("vert",1)});function y(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,s){let o=e.selection,a=t>0?o.$to:o.$from,l=o.empty;if(o instanceof i.U3){if(!s.endOfTextblock(n)||0==a.depth)return!1;l=!1,a=e.doc.resolve(t>0?a.after():a.before())}let h=u.findGapCursorFrom(a,t,l);return!!h&&(r&&r(e.tr.setSelection(new u(h))),!0)}}function b(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!u.valid(r))return!1;let s=e.posAtCoords({left:n.clientX,top:n.clientY});return!(s&&s.inside>-1&&i.nh.isSelectable(e.state.doc.nodeAt(s.inside)))&&(e.dispatch(e.state.tr.setSelection(new u(r))),!0)}function k(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof u))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let s=c.FK.empty;for(let e=r.length-1;e>=0;e--)s=c.FK.from(r[e].createAndFill(null,s));let o=e.state.tr.replace(n.pos,n.pos,new c.Ji(s,0,0));return o.setSelection(i.U3.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function w(e){if(!(e.selection instanceof u))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",l.zF.create(e.doc,[l.NZ.widget(e.selection.head,t,{key:"gapcursor"})])}var v=200,C=function(){};C.prototype.append=function(e){return e.length?(e=C.from(e),!this.length&&e||e.length<v&&this.leafAppend(e)||this.length<v&&e.leafPrepend(this)||this.appendInner(e)):this},C.prototype.prepend=function(e){return e.length?C.from(e).append(this):this},C.prototype.appendInner=function(e){return new S(this,e)},C.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?C.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},C.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},C.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},C.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},C.from=function(e){return e instanceof C?e:e&&e.length?new x(e):C.empty};var x=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=v)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=v)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(C);C.empty=new x([]);var S=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(C);let A=C,E=500;class M{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,s;if(0==this.eventCount)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(r=(n=this.remapping(o,this.items.length)).maps.length);let a=e.tr,l=[],h=[];return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(o,t+1)).maps.length),r--,h.push(e);return}if(n){h.push(new N(e.map));let t=e.step.map(n.slice(r)),i;t&&a.maybeStep(t).doc&&(i=a.mapping.maps[a.mapping.maps.length-1],l.push(new N(i,void 0,void 0,l.length+h.length))),r--,i&&n.appendMap(i,r)}else a.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,s=new M(this.items.slice(0,o).append(h.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let i=[],s=this.eventCount,o=this.items,a=!r&&o.length?o.get(o.length-1):null;for(let n=0;n<e.steps.length;n++){let l=e.steps[n].invert(e.docs[n]),h=new N(e.mapping.maps[n],l,t),c;(c=a&&a.merge(h))&&(h=c,n?i.pop():o=o.slice(0,o.length-1)),i.push(h),t&&(s++,t=void 0),r||(a=h)}let l=s-n.depth;return l>D&&(o=T(o,l),s-=l),new M(o.append(i),s)}remapping(e,t){let n=new s.X9;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new M(this.items.append(e.map(e=>new N(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,s=e.steps.length,o=this.eventCount;this.items.forEach(e=>{e.selection&&o--},r);let a=t;this.items.forEach(t=>{let r=i.getMirror(--a);if(null==r)return;s=Math.min(s,r);let l=i.maps[r];if(t.step){let s=e.steps[r].invert(e.docs[r]),h=t.selection&&t.selection.map(i.slice(a+1,r));h&&o++,n.push(new N(l,s,h))}else n.push(new N(l))},r);let l=[];for(let e=t;e<s;e++)l.push(new N(i.maps[e]));let h=new M(this.items.slice(0,r).append(l).append(n),o);return h.emptyItemCount()>E&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((s,o)=>{if(o>=e)r.push(s),s.selection&&i++;else if(s.step){let e=s.step.map(t.slice(n)),o=e&&e.getMap();if(n--,o&&t.appendMap(o,n),e){let a=s.selection&&s.selection.map(t.slice(n));a&&i++;let l=new N(o.invert(),e,a),h,c=r.length-1;(h=r.length&&r[c].merge(l))?r[c]=h:r.push(l)}}else s.map&&n--},this.items.length,0),new M(A.from(r.reverse()),i)}}function T(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&0==t--)return n=r,!1}),e.slice(n)}M.empty=new M(A.empty,0);class N{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new N(t.getMap().invert(),t,this.selection)}}}class I{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let D=20;function L(e,t,n,r){let i=n.getMeta(j),s;if(i)return i.historyState;n.getMeta(q)&&(e=new I(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(o&&o.getMeta(j))if(o.getMeta(j).redo)return new I(e.done.addTransform(n,void 0,r,$(t)),e.undone,F(n.mapping.maps),e.prevTime,e.prevComposition);else return new I(e.done,e.undone.addTransform(n,void 0,r,$(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||o&&!1===o.getMeta("addToHistory"))if(s=n.getMeta("rebased"))return new I(e.done.rebased(n,s),e.undone.rebased(n,s),P(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new I(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),P(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),s=0==e.prevTime||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!R(n,e.prevRanges)),a=o?P(e.prevRanges,n.mapping):F(n.mapping.maps);return new I(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,$(t)),M.empty,a,n.time,null==i?e.prevComposition:i)}}function R(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function F(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function P(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),s=t.map(e[r+1],-1);i<=s&&n.push(i,s)}return n}function O(e,t,n){let r=$(t),i=j.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,r),l=new I(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(j,{redo:n,historyState:l})}let z=!1,B=null;function $(e){let t=e.plugins;if(B!=t){z=!1,B=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){z=!0;break}}return z}let j=new i.hs("history"),q=new i.hs("closeHistory");function H(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new i.k_({key:j,state:{init:()=>new I(M.empty,M.empty,null,0,-1),apply:(t,n,r)=>L(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?W:"historyRedo"==n?V:null;return!!r&&!!e.editable&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}function U(e,t){return(n,r)=>{let i=j.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let s=O(i,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}let W=U(!1,!0),V=U(!0,!0);U(!1,!1),U(!0,!1),r.YY.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new i.k_({key:new i.hs("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(null==i||0===i){e=!0;return}let s=this.storage.characters({node:r.doc});if(s>i){let t=0,n=s-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let o=r.tr.deleteRange(t,n);return e=!0,o}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta("paste"))return!1;let s=e.selection.$head.pos,o=s-(i-n),a=s;return e.deleteRange(o,a),!(this.storage.characters({node:e.doc})>n)}})]}});var G=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[o(this.options)]}});r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new i.k_({key:new i.hs("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,s=[];if(!n||!r)return l.zF.create(e,[]);let o=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let a=0;return e.descendants((e,t)=>!e.isText&&!!(i>=t&&i<=t+e.nodeSize-1)&&((a+=1,"deepest"===this.options.mode&&o-a>0||"shallowest"===this.options.mode&&a>1)?"deepest"===this.options.mode:void s.push(l.NZ.node(t,t+e.nodeSize,{class:this.options.className})))),l.zF.create(e,s)}}})]}});var J=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[g()],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,r.gk)((0,r.iI)(e,"allowGapCursor",n)))?t:null}}}),K="placeholder";function Z(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var X=r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:K,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${Z(this.options.dataAttribute)}`:`data-${K}`;return[new i.k_({key:new i.hs("placeholder"),props:{decorations:({doc:t,selection:n})=>{let i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:s}=n,o=[];if(!i)return null;let a=this.editor.isEmpty;return t.descendants((t,n)=>{let i=s>=n&&s<=n+t.nodeSize,h=!t.isLeaf&&(0,r.Op)(t);if(!t.type.isTextblock)return this.options.includeChildren;if((i||!this.options.showOnlyCurrent)&&h){let r=[this.options.emptyNodeClass];a&&r.push(this.options.emptyEditorClass);let s=l.NZ.node(n,n+t.nodeSize,{class:r.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:i}):this.options.placeholder});o.push(s)}return this.options.includeChildren}),l.zF.create(t,o)}}})]}});r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new i.k_({key:new i.hs("selection"),props:{decorations:n=>n.selection.empty||e.isFocused||!e.isEditable||(0,r.BQ)(n.selection)||e.view.dragging?null:l.zF.create(n.doc,[l.NZ.inline(n.selection.from,n.selection.to,{class:t.className})])}})]}});var Q="skipTrailingNode";function Y({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}var ee=r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new i.hs(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new i.k_({key:t,appendTransaction:(e,r,i)=>{let{doc:s,tr:o,schema:a}=i,l=t.getState(i),h=s.content.size,c=a.nodes[n];if(!e.some(e=>e.getMeta(Q))&&l)return o.insert(h,c.create())},state:{init:(e,t)=>!Y({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!Y({node:e.doc.lastChild,types:r})}})]}}),et=r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>W(e,t),redo:()=>({state:e,dispatch:t})=>V(e,t)}),addProseMirrorPlugins(){return[H(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},64702:(e,t,n)=>{"use strict";n.d(t,{Te:()=>C});var r=n(12115),i=n(47650);function s(e,t,n){let r,i=n.initialDeps??[],s=!0;function o(){var o,a,l;let h,c;n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(h=Date.now());let u=e();if(!(u.length!==i.length||u.some((e,t)=>i[t]!==e)))return r;if(i=u,n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(c=Date.now()),r=t(...u),n.key&&(null==(l=n.debug)?void 0:l.call(n))){let e=Math.round((Date.now()-h)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
|
|
21
|
+
font-size: .6rem;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return(null==n?void 0:n.onChange)&&!(s&&n.skipInitialOnChange)&&n.onChange(r),s=!1,r}return o.updateDeps=e=>{i=e},o}function o(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let a=(e,t)=>1.01>Math.abs(e-t),l=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},h=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},c=e=>e,u=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},d=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(h(n)),!r.ResizeObserver)return()=>{};let s=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(h(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},p={passive:!0},f="u"<typeof window||"onscrollend"in window,m=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,s=e.options.useScrollendEvent&&f?()=>void 0:l(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:a}=e.options;i=o?n.scrollLeft*(a&&-1||1):n.scrollTop,s(),t(i,r)},a=o(!0),h=o(!1);n.addEventListener("scroll",a,p);let c=e.options.useScrollendEvent&&f;return c&&n.addEventListener("scrollend",h,p),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",h)}},g=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},_=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;let o=e+t;null==(s=null==(i=r.scrollElement)?void 0:i.scrollTo)||s.call(i,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class y{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,n;return(null==(n=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:n.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);t.isConnected?this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this)):this.observer.unobserve(t)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:c,rangeExtractor:u,onChange:()=>{},measureElement:g,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=s(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let s=r.get(t.lane);if(null==s||t.end>s.end?r.set(t.lane,t):t.end<s.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=s(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,s,o)=>(void 0!==this.prevLanes&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=s(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:o},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let h=this.measurementsCache.slice(0,l),c=Array(s).fill(void 0);for(let e=0;e<l;e++){let t=h[e];t&&(c[t.lane]=e)}for(let i=l;i<e;i++){let e,s,l=r(i),u=this.laneAssignments.get(i),d="estimate"===o||a.has(l);if(void 0!==u&&this.options.lanes>1){let r=c[e=u],i=void 0!==r?h[r]:void 0;s=i?i.end+this.options.gap:t+n}else{let r=1===this.options.lanes?h[i-1]:this.getFurthestMeasurement(h,i);s=r?r.end+this.options.gap:t+n,e=r?r.lane:i%this.options.lanes,this.options.lanes>1&&d&&this.laneAssignments.set(i,e)}let p=a.get(l),f="number"==typeof p?p:this.options.estimateSize(i),m=s+f;h[i]={index:i,start:s,size:f,end:m,key:l,lane:e},c[e]=i}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=s(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?k({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=s(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>null===r||null===i?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let n=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==n&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,n-t),i=Math.min(this.options.count-1,n+t);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;let r=this.measurementsCache[e];if(!r)return;let i=t-(this.itemSizeCache.get(r.key)??r.size);0!==i&&((null==(n=this.scrollState)?void 0:n.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,i,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.getVirtualItems=s(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return o(t[b(0,t.length-1,e=>o(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();return"auto"===t&&(t=e>=i+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if("auto"===t)if(i.end>=r+n-this.options.scrollPaddingEnd)t="end";else{if(!(i.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let s="end"===t?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,i.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,s]=r,o=this.now();this.scrollState={index:e,align:s,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),r=n.length-1;for(;r>=0&&e.some(e=>null===e);){let t=n[r];null===e[t.lane]&&(e[t.lane]=t.end),r--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;let e=5e3;if(this.now()-this.scrollState.startedAt>e){this.scrollState=null;return}let t=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,n=t?t[0]:this.scrollState.lastTargetOffset,r=1,i=n!==this.scrollState.lastTargetOffset;if(!i&&a(n,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=r){this.scrollState=null;return}}else this.scrollState.stableFrames=0,i&&(this.scrollState.lastTargetOffset=n,this.scrollState.behavior="auto",this._scrollToOffset(n,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let b=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else{if(!(s>r))return i;t=i-1}}return e>0?e-1:0};function k({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,s=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=b(0,i,s,n),a=o;if(1===r)for(;a<i&&e[a].end<n+t;)a++;else if(r>1){let s=Array(r).fill(0);for(;a<i&&s.some(e=>e<n+t);){let t=e[a];s[t.lane]=t.end,a++}let l=Array(r).fill(n+t);for(;o>=0&&l.some(e=>e>=n);){let t=e[o];l[t.lane]=t.start,o--}o=Math.max(0,o-o%r),a=Math.min(i,a+(r-1-a%r))}return{startIndex:o,endIndex:a}}let w="u">typeof document?r.useLayoutEffect:r.useEffect;function v({useFlushSync:e=!0,...t}){let n=r.useReducer(()=>({}),{})[1],s={...t,onChange:(r,s)=>{var o;e&&s?(0,i.flushSync)(n):n(),null==(o=t.onChange)||o.call(t,r,s)}},[o]=r.useState(()=>new y(s));return o.setOptions(s),w(()=>o._didMount(),[]),w(()=>o._willUpdate()),o}function C(e){return v({observeElementRect:d,observeElementOffset:m,scrollToFn:_,...e})}},65915:e=>{var t=!0,n=!1,r=!1;function i(e,t,n){var r=e.attrIndex(t),i=[t,n];r<0?e.attrPush(i):e.attrs[r]=i}function s(e,t){for(var n=e[t].level-1,r=t-1;r>=0;r--)if(e[r].level===n)return r;return -1}function o(e,t){return d(e[t])&&p(e[t-1])&&f(e[t-2])&&m(e[t])}function a(e,t){if(e.children.unshift(l(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),n)if(r){e.children.pop();var i="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+i+'">',e.children.push(u(e.content,i,t))}else e.children.unshift(h(t)),e.children.push(c(t))}function l(e,n){var r=new n("html_inline","",0),i=t?' disabled="" ':"";return 0===e.content.indexOf("[ ] ")?r.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':(0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] "))&&(r.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),r}function h(e){var t=new e("html_inline","",0);return t.content="<label>",t}function c(e){var t=new e("html_inline","",0);return t.content="</label>",t}function u(e,t,n){var r=new n("html_inline","",0);return r.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",r.attrs=[{for:t}],r}function d(e){return"inline"===e.type}function p(e){return"paragraph_open"===e.type}function f(e){return"list_item_open"===e.type}function m(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}e.exports=function(e,l){l&&(t=!l.enabled,n=!!l.label,r=!!l.labelAfter),e.core.ruler.after("inline","github-task-lists",function(e){for(var n=e.tokens,r=2;r<n.length;r++)o(n,r)&&(a(n[r],e.Token),i(n[r-2],"class","task-list-item"+(t?"":" enabled")),i(n[s(n,r-2)],"class","contains-task-list"))})}},66088:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],s=(0,r.A)("chevron-down",i)},67014:(e,t,n)=>{"use strict";let r,i,s,o;n.d(t,{O_:()=>rU});class a extends Error{constructor(e){super(e),this.name="ShikiError"}}var l=n(41463);function h(e){return c(e)}function c(e){return Array.isArray(e)?u(e):e instanceof RegExp?e:"object"==typeof e?d(e):e}function u(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=c(e[n]);return t}function d(e){let t={};for(let n in e)t[n]=c(e[n]);return t}function p(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function f(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?f(e.substring(0,e.length-1)):e.substr(~t+1)}var m=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,g=class{static hasCaptures(e){return null!==e&&(m.lastIndex=0,m.test(e))}static replaceCaptures(e,t,n){return e.replace(m,(e,r,i,s)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(s){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function _(e,t){return e<t?-1:+(e>t)}function y(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=_(e[r],t[r]);if(0!==n)return n}return 0}return n-r}function b(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function k(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var w=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},v=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(E(e),t)}static createFromParsedTheme(e,t){return N(e,t)}_cachedMatchRoot=new w(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>x(e.parent,t.parentScopes));return n?new A(n.fontStyle,n.foreground,n.background):null}},C=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function x(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(">"===r){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!S(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function S(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var A=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function E(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,s=t[e];if(!s.settings)continue;if("string"==typeof s.scope){let e=s.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(s.scope)?s.scope:[""];let o=-1;if("string"==typeof s.settings.fontStyle){o=0;let e=s.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let a=null;"string"==typeof s.settings.foreground&&b(s.settings.foreground)&&(a=s.settings.foreground);let l=null;"string"==typeof s.settings.background&&b(s.settings.background)&&(l=s.settings.background);for(let t=0,s=i.length;t<s;t++){let s=i[t].trim().split(" "),h=s[s.length-1],c=null;s.length>1&&(c=s.slice(0,s.length-1)).reverse(),n[r++]=new M(h,c,e,o,a,l)}}return n}var M=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},T=((s=T||{})[s.NotSet=-1]="NotSet",s[s.None=0]="None",s[s.Italic=1]="Italic",s[s.Bold=2]="Bold",s[s.Underline=4]="Underline",s[s.Strikethrough=8]="Strikethrough",s);function N(e,t){e.sort((e,t)=>{let n=_(e.scope,t.scope);return 0!==n||0!==(n=y(e.parentScopes,t.parentScopes))?n:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let s=new I(t),o=new A(n,s.getId(r),s.getId(i)),a=new R(new L(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];a.insert(0,n.scope,n.parentScopes,n.fontStyle,s.getId(n.foreground),s.getId(n.background))}return new v(s,o,a)}var I=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},D=Object.freeze([]),L=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||D,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},R=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,s,o){let a,l,h;if(""===n)return void this._doInsertHere(t,r,i,s,o);let c=n.indexOf(".");-1===c?(a=n,l=""):(a=n.substring(0,c),l=n.substring(c+1)),this._children.hasOwnProperty(a)?h=this._children[a]:(h=new e(this._mainRule.clone(),L.cloneArr(this._rulesWithParentScopes)),this._children[a]=h),h.insert(t+1,l,r,i,s,o)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let o=this._rulesWithParentScopes[s];if(0===y(o.parentScopes,t))return void o.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new L(e,t,n,r,i))}},F=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,s,o,a){let l=e.getLanguageId(t),h=e.getTokenType(t),c=+!!e.containsBalancedBrackets(t),u=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(h=O(r)),null!==i&&(c=+!!i),-1!==s&&(u=s),0!==o&&(d=o),0!==a&&(p=a),(l|h<<8|c<<10|u<<11|d<<15|p<<24)>>>0}};function P(e){return e}function O(e){return e}function z(e,t){let n=[],r=$(e),i=r.next();for(;null!==i;){let e=0;if(2===i.length&&":"===i.charAt(1)){switch(i.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),","!==i)break;i=r.next()}return n;function s(){if("-"===i){i=r.next();let e=s();return t=>!!e&&!e(t)}if("("===i){i=r.next();let e=a();return")"===i&&(i=r.next()),e}if(B(i)){let e=[];do e.push(i),i=r.next();while(B(i));return n=>t(e,n)}return null}function o(){let e=[],t=s();for(;t;)e.push(t),t=s();return t=>e.every(e=>e(t))}function a(){let e=[],t=o();for(;t&&(e.push(t),"|"===i||","===i);){do i=r.next();while("|"===i||","===i);t=o()}return t=>e.some(e=>e(t))}}function B(e){return!!e&&!!e.match(/[\w\.:]+/)}function $(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}var j=((o=j||{})[o.None=0]="None",o[o.NotBeginString=1]="NotBeginString",o[o.NotEndString=2]="NotEndString",o[o.NotBeginPosition=4]="NotBeginPosition",o[o.DebugCall=8]="DebugCall",o);function q(e){"function"==typeof e.dispose&&e.dispose()}var H=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},U=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},W=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},V=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new H(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new W;for(let n of e)G(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof H){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function G(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let s=n.lookup(t);e instanceof H?K({baseGrammar:s,selfGrammar:i},r):J(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new H(e))}function J(e,t,n){t.repository&&t.repository[e]&&Z([t.repository[e]],t,n)}function K(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Z(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Z(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Z(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?p({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Z(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let s=en(i);switch(s.kind){case 0:K({...t,selfGrammar:t.baseGrammar},n);break;case 1:K(t,n);break;case 2:J(s.ruleName,{...t,repository:e},n);break;case 3:case 4:let o=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let r={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===s.kind?J(s.ruleName,r,n):K(r,n)}else 4===s.kind?n.add(new U(s.scopeName,s.ruleName)):n.add(new H(s.scopeName))}}}var X=class{kind=0},Q=class{kind=1},Y=class{constructor(e){this.ruleName=e}kind=2},ee=class{constructor(e){this.scopeName=e}kind=3},et=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function en(e){if("$base"===e)return new X;if("$self"===e)return new Q;let t=e.indexOf("#");return -1===t?new ee(e):0===t?new Y(e.substring(1)):new et(e.substring(0,t),e.substring(t+1))}var er=/\\(\d+)/,ei=/\\(\d+)/g;Symbol("RuleId");var es=-1,eo=-2;function ea(e){return e}function el(e){return e}var eh=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=g.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=g.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${f(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?g.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?g.replaceCaptures(this._contentName,e,t):this._contentName}},ec=class extends eh{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},eu=class extends eh{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new eg(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new e_,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ed=class extends eh{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new e_,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ep=class extends eh{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,o,a,l,h){super(e,t,n,r),this._begin=new eg(i,this.id),this.beginCaptures=s,this._end=new eg(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new e_,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ef=class extends eh{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,o,a,l){super(e,t,n,r),this._begin=new eg(i,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new eg(o,eo),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new e_,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new e_,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},em=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new ec(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new eu(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=p({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new ed(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new ef(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new ep(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>s&&(s=t)}for(let e=0;e<=s;e++)i[e]=null;for(let s in t){if("$vscodeTextmateLocation"===s)continue;let o=parseInt(s,10),a=0;t[s].patterns&&(a=e.getCompiledRuleId(t[s],n,r)),i[o]=e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,a)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,o=t.length;s<o;s++){let o=t[s],a=-1;if(o.include){let t=en(o.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(a=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let s=t.scopeName,l=4===t.kind?t.ruleName:null,h=n.getExternalGrammar(s,r);if(h)if(l){let t=h.repository[l];t&&(a=e.getCompiledRuleId(t,n,h.repository))}else a=e.getCompiledRuleId(h.repository.$self,n,h.repository)}}else a=e.getCompiledRuleId(o,n,r);if(-1!==a){let e=n.getRule(a),t=!1;if((e instanceof ed||e instanceof ep||e instanceof ef)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},eg=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],i=!1;for(let s=0;s<t;s++)if("\\"===e.charAt(s)&&s+1<t){const t=e.charAt(s+1);"z"===t?(r.push(e.substring(n,s)),r.push("$(?!\\n)(?<!\\n)"),n=s+2):("A"===t||"G"===t)&&(i=!0),s++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=er.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return ei.lastIndex=0,this.source.replace(ei,(e,t)=>k(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],s=[],o=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,s[e]=n,o[e]=n,a[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="",s[e+1]="",o[e+1]="A",a[e+1]="A"):"G"===r?(i[e+1]="",s[e+1]="G",o[e+1]="",a[e+1]="G"):(i[e+1]=r,s[e+1]=r,o[e+1]=r,a[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:s.join(""),A1_G0:o.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},e_=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new ey(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new ey(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},ey=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},eb=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ek=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new eb(e,8),this._embeddedLanguagesMatcher=new ew(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new eb(0,0);_getBasicScopeAttributes=new w(e=>new eb(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ew=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>k(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==l&&l.env.VSCODE_TEXTMATE_DEBUG;var ev=!1,eC=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function ex(e,t,n,r,i,s,o,a){let l=t.content.length,h=!1,c=-1;if(o){let o=eS(e,t,n,r,i,s);i=o.stack,r=o.linePos,n=o.isFirstLine,c=o.anchorPosition}let u=Date.now();for(;!h;){if(0!==a&&Date.now()-u>a)return new eC(i,!0);d()}return new eC(i,!1);function d(){let o=eA(e,t,n,r,i,c);if(!o){s.produce(i,l),h=!0;return}let a=o.captureIndices,u=o.matchedRuleId,d=!!a&&a.length>0&&a[0].end>r;if(u===es){let o=i.getRule(e);s.produce(i,a[0].start),i=i.withContentNameScopesList(i.nameScopesList),eD(e,t,n,i,s,o.endCaptures,a),s.produce(i,a[0].end);let u=i;if(i=i.parent,c=u.getAnchorPos(),!d&&u.getEnterPos()===r){i=u,s.produce(i,l),h=!0;return}}else{let o=e.getRule(u);s.produce(i,a[0].start);let p=i,f=o.getName(t.content,a),m=i.contentNameScopesList.pushAttributed(f,e);if(i=i.push(u,r,c,a[0].end===l,null,m,m),o instanceof ep){let r=o;eD(e,t,n,i,s,r.beginCaptures,a),s.produce(i,a[0].end),c=a[0].end;let u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(i=i.withContentNameScopesList(f),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),h=!0;return}}else if(o instanceof ef){let r=o;eD(e,t,n,i,s,r.beginCaptures,a),s.produce(i,a[0].end),c=a[0].end;let u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(i=i.withContentNameScopesList(f),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),h=!0;return}}else if(eD(e,t,n,i,s,o.captures,a),s.produce(i,a[0].end),i=i.pop(),!d){i=i.safePop(),s.produce(i,l),h=!0;return}}a[0].end>r&&(r=a[0].end,n=!1)}}function eS(e,t,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1,a=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof ef&&a.push({rule:n,stack:t})}for(let l=a.pop();l;l=a.pop()){let{ruleScanner:a,findOptions:h}=eN(l.rule,e,l.stack.endRule,n,r===o),c=a.findNextMatchSync(t,r,h);if(c){if(c.ruleId!==eo){i=l.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(s.produce(l.stack,c.captureIndices[0].start),eD(e,t,n,l.stack,s,l.rule.whileCaptures,c.captureIndices),s.produce(l.stack,c.captureIndices[0].end),o=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function eA(e,t,n,r,i,s){let o=eE(e,t,n,r,i,s),a=e.getInjections();if(0===a.length)return o;let l=eM(a,e,t,n,r,i,s);if(!l)return o;if(!o)return l;let h=o.captureIndices[0].start,c=l.captureIndices[0].start;return c<h||l.priorityMatch&&c===h?l:o}function eE(e,t,n,r,i,s){let{ruleScanner:o,findOptions:a}=eT(i.getRule(e),e,i.endRule,n,r===s),l=o.findNextMatchSync(t,r,a);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function eM(e,t,n,r,i,s,o){let a,l=Number.MAX_VALUE,h=null,c=0,u=s.contentNameScopesList.getScopeNames();for(let s=0,d=e.length;s<d;s++){let d=e[s];if(!d.matcher(u))continue;let{ruleScanner:p,findOptions:f}=eT(t.getRule(d.ruleId),t,null,r,i===o),m=p.findNextMatchSync(n,i,f);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=l)&&(l=g,h=m.captureIndices,a=m.ruleId,c=d.priority,l===i))break}return h?{priorityMatch:-1===c,captureIndices:h,matchedRuleId:a}:null}function eT(e,t,n,r,i){return ev?{ruleScanner:e.compile(t,n),findOptions:eI(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function eN(e,t,n,r,i){return ev?{ruleScanner:e.compileWhile(t,n),findOptions:eI(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function eI(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function eD(e,t,n,r,i,s,o){if(0===s.length)return;let a=t.content,l=Math.min(s.length,o.length),h=[],c=o[0].end;for(let t=0;t<l;t++){let l=s[t];if(null===l)continue;let u=o[t];if(0===u.length)continue;if(u.start>c)break;for(;h.length>0&&h[h.length-1].endPos<=u.start;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?i.produceFromScopes(h[h.length-1].scopes,u.start):i.produce(r,u.start),l.retokenizeCapturedWithRuleId){let t=l.getName(a,o),s=r.contentNameScopesList.pushAttributed(t,e),h=l.getContentName(a,o),c=s.pushAttributed(h,e),d=r.push(l.retokenizeCapturedWithRuleId,u.start,-1,!1,null,s,c),p=e.createOnigString(a.substring(0,u.end));ex(e,p,n&&0===u.start,u.start,d,i,!1,0),q(p);continue}let d=l.getName(a,o);if(null!==d){let t=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);h.push(new eL(t,u.end))}}for(;h.length>0;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var eL=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eR(e,t,n,r,i,s,o,a){return new ez(e,t,n,r,i,s,o,a)}function eF(e,t,n,r,i){let s=z(t,eP),o=em.getCompiledRuleId(n,r,i.repository);for(let n of s)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function eP(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(eO(t[r],e))return n=r+1,!0;return!1})}function eO(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var ez=class{constructor(e,t,n,r,i,s,o,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new ek(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=eB(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const e of Object.keys(i))for(const t of z(e,eP))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,r=e(n);if(r){let e=r.injections;if(e)for(let n in e)eF(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&eF(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(ea(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[el(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eB(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=em.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==ej.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),s=F.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?e$.createRootAndLookUpScopeName(o,s,this):e$.createRoot("unknown",s),t=new ej(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let s=this.createOnigString(e),o=s.content.length,a=new eH(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=ex(this,s,i,0,t,a,!0,r);return q(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eB(e,t){return(e=h(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var e$=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=C.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new C(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),s=new C(null,t),o=r.themeProvider.themeMatch(s),a=e.mergeAttributes(n,i,o);return new e(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,s=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,s=n.backgroundId),F.set(e,t.languageId,t.tokenType,null,r,i,s)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),s=t.scopePath.push(n),o=r.themeProvider.themeMatch(s),a=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},ej=class e{constructor(e,t,n,r,i,s,o,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e$.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,o,a){return new e(this,t,n,r,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:el(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=e$.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,ea(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,e$.fromExtension(r,n.contentNameScopesList))}},eq=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):z(e,eP).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>z(e,eP).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eH=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=F.set(n,0,P(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=F.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eU=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,eR(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},eW=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eU(v.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(v.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new eq(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let s=new V(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(e=>this._loadSingleGrammar(e.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},eV=ej.NULL,eG=n(51640),eJ=n(4918),eK=n(27629);let eZ=/["&'<>`]/g,eX=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eQ=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eY=/[|\\{}()[\]^$+*?.]/g,e0=new WeakMap;function e1(e,t){if(e=e.replace(t.subset?e2(t.subset):eZ,r),t.subset||t.escapeOnly)return e;return e.replace(eX,n).replace(eQ,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function e2(e){let t=e0.get(e);return t||(t=e3(e),e0.set(e,t)),t}function e3(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(eY,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}let e5=/[\dA-Fa-f]/;function e4(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!e5.test(String.fromCharCode(t))?r:r+";"}let e6=/\d/;function e8(e,t,n){let r="&#"+String(e);return n&&t&&!e6.test(String.fromCharCode(t))?r:r+";"}var e9=n(6801);let e7={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},te=["cent","copy","divide","gt","lt","not","para","times"],tt={}.hasOwnProperty,tn={};for(r in e7)tt.call(e7,r)&&(tn[e7[r]]=r);let tr=/[^\dA-Za-z]/;function ti(e,t,n,r){let i=String.fromCharCode(e);if(tt.call(tn,i)){let e=tn[i],s="&"+e;return n&&e9.K.includes(e)&&!te.includes(e)&&(!r||t&&61!==t&&tr.test(String.fromCharCode(t)))?s:s+";"}return""}function ts(e,t,n){let r,i=e4(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=ti(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){let r=e8(e,t,n.omitOptionalSemicolons);r.length<i.length&&(i=r)}return r&&(!n.useShortestReferences||r.length<i.length)?r:i}function to(e,t){return e1(e,Object.assign({format:ts},t))}let ta=/^>|^->|<!--|-->|--!>|<!-$/g,tl=[">"],th=["<",">"];function tc(e,t,n,r){return r.settings.bogusComments?"<?"+to(e.value,Object.assign({},r.settings.characterReferences,{subset:tl}))+">":"\x3c!--"+e.value.replace(ta,i)+"--\x3e";function i(e){return to(e,Object.assign({},r.settings.characterReferences,{subset:th}))}}function tu(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var td=n(49884),tp=n(86994),tf=n(38609),tm=n(51705),tg=n(36887);let t_=tk(1),ty=tk(-1),tb=[];function tk(e){return t;function t(t,n,r){let i=t?t.children:tb,s=(n||0)+e,o=i[s];if(!r)for(;o&&(0,tg.m)(o);)s+=e,o=i[s];return o}}let tw={}.hasOwnProperty;function tv(e){return t;function t(t,n,r){return tw.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let tC=tv({body:tA,caption:tx,colgroup:tx,dd:tN,dt:tT,head:tx,html:tS,li:tM,optgroup:tD,option:tL,p:tE,rp:tI,rt:tI,tbody:tF,td:tz,tfoot:tP,th:tz,thead:tR,tr:tO});function tx(e,t,n){let r=t_(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&(0,tg.m)(r.value.charAt(0)))}function tS(e,t,n){let r=t_(n,t);return!r||"comment"!==r.type}function tA(e,t,n){let r=t_(n,t);return!r||"comment"!==r.type}function tE(e,t,n){let r=t_(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName}function tM(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"li"===r.tagName}function tT(e,t,n){let r=t_(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))}function tN(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)}function tI(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function tD(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName}function tL(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)}function tR(e,t,n){let r=t_(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))}function tF(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)}function tP(e,t,n){return!t_(n,t)}function tO(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"tr"===r.tagName}function tz(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let tB=tv({body:tq,colgroup:tH,head:tj,html:t$,tbody:tU});function t$(e){let t=t_(e,-1);return!t||"comment"!==t.type}function tj(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type}function tq(e){let t=t_(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,tg.m)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)}function tH(e,t,n){let r=ty(n,t),i=t_(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&tC(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)}function tU(e,t,n){let r=ty(n,t),i=t_(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&tC(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}let tW={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function tV(e,t,n,r){let i,s=r.schema,o="svg"!==s.space&&r.settings.omitOptionalTags,a="svg"===s.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===s.space&&"svg"===e.tagName&&(r.schema=eJ.JW);let h=tG(r,e.properties),c=r.all("html"===s.space&&"template"===e.tagName?e.content:e);return r.schema=s,c&&(a=!1),!h&&o&&tB(e,t,n)||(l.push("<",e.tagName,h?" "+h:""),a&&("svg"===s.space||r.settings.closeSelfClosing)&&(i=h.charAt(h.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),a||o&&tC(e,t,n)||l.push("</"+e.tagName+">"),l.join("")}function tG(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=tJ(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}function tJ(e,t,n){let r,i=(0,tf.I)(e.schema,t),s=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=+!e.settings.allowDangerousCharacters,a=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=to(i.attribute,Object.assign({},e.settings.characterReferences,{subset:tW.name[s][o]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?tp.A:tm.A)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=to(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tW.unquoted[s][o]}))),r!==n&&(e.settings.quoteSmart&&(0,td.D)(n,a)>(0,td.D)(n,e.alternative)&&(a=e.alternative),r=a+to(n,Object.assign({},e.settings.characterReferences,{subset:("'"===a?tW.single:tW.double)[s][o],attribute:!0}))+a),l+(r?"="+r:r))}let tK=["<","&"];function tZ(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:to(e.value,Object.assign({},r.settings.characterReferences,{subset:tK}))}function tX(e,t,n,r){return r.settings.allowDangerousHtml?e.value:tZ(e,t,n,r)}function tQ(e,t,n,r){return r.all(e)}let tY=(0,eK.A)("type",{invalid:t0,unknown:t1,handlers:{comment:tc,doctype:tu,element:tV,raw:tX,root:tQ,text:tZ}});function t0(e){throw Error("Expected node, not `"+e+"`")}function t1(e){throw Error("Cannot compile unknown node `"+e.type+"`")}let t2={},t3={},t5=[];function t4(e,t){let n=t||t2,r=n.quote||'"',i='"'===r?"'":'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:t6,all:t8,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||eG.b,characterReferences:n.characterReferences||t3,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?eJ.JW:eJ.qy,quote:r,alternative:i}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function t6(e,t,n){return tY(e,t,n,this)}function t8(e){let t=[],n=e&&e.children||t5,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function t9(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function t7(e,t){return e&&t?.[e?.toLowerCase()]||e}function ne(e){return Array.isArray(e)?e:[e]}async function nt(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function nn(e){return!e||["plaintext","txt","text","plain"].includes(e)}function nr(e){return"ansi"===e||nn(e)}function ni(e){return"none"===e}function ns(e){return ni(e)}function no(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function na(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let s=t?n[e]+(n[e+1]||""):n[e];i.push([s,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function nl(e){let t=na(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+n}return{lines:t,indexToPos:n,posToIndex:r}}let nh="light-dark()",nc=["color","background-color"];function nu(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function nd(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?nu(e,t):e})):e}function np(e,t,n,r,i="css-vars"){let s={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>nf(e.variants[t])),l=new Set(o.flatMap(e=>Object.keys(e))),h={},c=(e,r)=>{let i="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":i)};return o.forEach((e,n)=>{for(let s of l){let l=e[s]||"inherit";if(0===n&&r&&nc.includes(s))if(r===nh&&o.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new a('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][s]||"inherit",d=o[r][s]||"inherit";h[s]=`light-dark(${u}, ${d})`,"css-vars"===i&&(h[c(n,s)]=l)}else h[s]=l;else"css-vars"===i&&(h[c(n,s)]=l)}}),s.htmlStyle=h,s}function nf(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&T.Italic&&(t["font-style"]="italic"),e.fontStyle&T.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&T.Underline&&n.push("underline"),e.fontStyle&T.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function nm(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let ng=new WeakMap;function n_(e,t){ng.set(e,t)}function ny(e){return ng.get(e)}class nb{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new nb(Object.fromEntries(ne(t).map(e=>[e,eV])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return nk(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function nk(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function nw(e,t){if(!(e instanceof nb))throw new a("Invalid grammar state");return e.getInternalStack(t)}function nv(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new a(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,s=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,l=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||s||o||l){if(i&&s||o&&l||o&&n.start.offset===n.end.offset||s&&t.start.offset===t.end.offset)continue;throw new a(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function nC(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(nC).join(""):""}let nx=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new a(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(void 0===t)throw new a(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new a(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=nl(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));nv(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length)return nd(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new a(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let s=r[e],l="",h=-1,c=-1;if(0===t&&(h=0),0===n&&(c=0),n===1/0&&(c=s.children.length),-1===h||-1===c)for(let e=0;e<s.children.length;e++)l+=nC(s.children[e]),-1===h&&l.length===t&&(h=e+1),-1===c&&l.length===n&&(c=e+1);if(-1===h)throw new a(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===c)throw new a(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=s.children.slice(h,c);if(i.alwaysWrap||u.length!==s.children.length)if(i.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};o(e,i,"wrapper"),s.children.splice(h,u.length,e)}else o(u[0],i,"token");else o(s,i,"line")}function s(e,t){r[e]=o(r[e],t,"line")}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&no(e,t.properties.class),e=i(e,n)||e}let l=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)l.unshift(()=>s(r,e));i(n.line,0,n.character,e)}}l.forEach(e=>e())}}}()];function nS(e){let t=nA(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nx]}function nA(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var nE=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],nM={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function nT(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function nN(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}function nI(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)nM[r]&&t.push({type:"setDecoration",value:nM[r]});else if(r<=29){let e=nM[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:nE[r-30]}});else if(38===r){let n=nN(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:nE[r-40]}});else if(48===r){let n=nN(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:nE[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:nE[r-100+8]}})}return t}function nD(){let e=null,t=null,n=new Set;return{parse(r){let i=[],s=0;do{let o=nT(r,s),a=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=nI(o.sequence);for(let i of r)"resetAll"===i.type?(e=null,t=null,n.clear()):"resetForegroundColor"===i.type?e=null:"resetBackgroundColor"===i.type?t=null:"resetDecoration"===i.type&&n.delete(i.value);for(let i of r)"setForegroundColor"===i.type?e=i.value:"setBackgroundColor"===i.type?t=i.value:"setDecoration"===i.type&&n.add(i.value)}s=o.position}while(s<r.length);return i}}}var nL={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function nR(e=nL){let t;function n(t){return e[t]}function r(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}function i(){if(t)return t;t=[];for(let e=0;e<nE.length;e++)t.push(n(nE[e]));let e=[0,95,135,175,215,255];for(let n=0;n<6;n++)for(let i=0;i<6;i++)for(let s=0;s<6;s++)t.push(r([e[n],e[i],e[s]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(r([i,i,i]));return t}function s(e){return i()[e]}return{value:function(e){switch(e.type){case"named":return n(e.name);case"rgb":return r(e.rgb);case"table":return s(e.index)}}}}let nF={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function nP(e,t,n){let r=t9(e,n),i=na(t),s=nR(Object.fromEntries(nE.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||nF[t]]}))),o=nD();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has("reverse")?(i=n.background?s.value(n.background):e.bg,o=n.foreground?s.value(n.foreground):e.fg):(i=n.foreground?s.value(n.foreground):e.fg,o=n.background?s.value(n.background):void 0),i=t7(i,r),o=t7(o,r),n.decorations.has("dim")&&(i=nO(i));let a=T.None;return n.decorations.has("bold")&&(a|=T.Bold),n.decorations.has("italic")&&(a|=T.Italic),n.decorations.has("underline")&&(a|=T.Underline),n.decorations.has("strikethrough")&&(a|=T.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:a}}))}function nO(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],r=e[2],i=e[3],s=Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0");return`#${t}${t}${n}${n}${r}${r}${s}`}else if(3===e.length){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function nz(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(nn(i)||ni(r))return na(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:s,colorMap:o}=e.setTheme(r);if("ansi"===i)return nP(s,t,n);let l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new a(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(s.name))throw new a(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return n$(t,l,s,o,n)}function nB(...e){if(2===e.length)return ny(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(nn(i)||ni(s))throw new a("Plain language does not have grammar state");if("ansi"===i)throw new a("ANSI language does not have grammar state");let{theme:o,colorMap:l}=t.setTheme(s),h=t.getLanguage(i);return new nb(nj(n,h,o,l,r).stateStack,h.name,o.name)}function n$(e,t,n,r,i){let s=nj(e,t,n,r,i),o=new nb(s.stateStack,t.name,n.name);return n_(s.tokens,o),s.tokens}function nj(e,t,n,r,i){let s=t9(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=na(e),h=i.grammarState?nw(i.grammarState,n.name)??eV:null!=i.grammarContextCode?nj(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:eV,c=[],u=[];for(let e=0,d=l.length;e<d;e++){let d,p,[f,m]=l[e];if(""===f){c=[],u.push([]);continue}if(o>0&&f.length>=o){c=[],u.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}i.includeExplanation&&(d=t.tokenizeLine(f,h,a).tokens,p=0);let g=t.tokenizeLine2(f,h,a),_=g.tokens.length/2;for(let e=0;e<_;e++){let t=g.tokens[2*e],o=e+1<_?g.tokens[2*e+2]:f.length;if(t===o)continue;let a=g.tokens[2*e+1],l=t7(r[F.getForeground(a)],s),h=F.getFontStyle(a),u={content:f.substring(t,o),offset:m+t,color:l,fontStyle:h};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}u.explanation=[];let r=0;for(;t+r<o;){let t=d[p],n=f.substring(t.startIndex,t.endIndex);r+=n.length,u.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?nq(t.scopes):nH(e,t.scopes)}),p+=1}}c.push(u)}u.push(c),c=[],h=g.ruleStack}return{tokens:u,stateStack:h}}function nq(e){return e.map(e=>({scopeName:e}))}function nH(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:nV(e,i,t.slice(0,r))}}return n}function nU(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function nW(e,t,n){if(!nU(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)nU(e[r],n[i])&&(r-=1),i-=1;return -1===r}function nV(e,t,n){let r=[];for(let{selectors:i,settings:s}of e)for(let e of i)if(nW(e,t,n)){r.push(s);break}return r}function nG(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=nz(e,t,{...n,theme:r.theme}),s=ny(i);return{tokens:i,state:s,theme:"string"==typeof r.theme?r.theme:r.theme.name}}),s=nJ(...i.map(e=>e.tokens)),o=s[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),s.forEach((e,n)=>{let{content:s,explanation:a,offset:l,...h}=e[t][i];o.variants[r[n].color]=h}),o})),a=i[0].state?new nb(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return a&&n_(o,a),o}function nJ(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),s=t.map(()=>[]);t.forEach((e,t)=>e.push(s[t]));let o=i.map(()=>0),a=i.map(e=>e[0]);for(;a.every(e=>e);){let e=Math.min(...a.map(e=>e.content.length));for(let t=0;t<n;t++){let n=a[t];n.content.length===e?(s[t].push(n),o[t]+=1,a[t]=i[t][o[t]]):(s[t].push({...n,content:n.content.slice(0,e)}),a[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function nK(e,t,n){let r,i,s,o,l,h;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,p=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:+(t.color===c));if(0===p.length)throw new a("`themes` option must not be empty");let f=nG(e,t,n);if(h=ny(f),c&&nh!==c&&!p.find(e=>e.color===c))throw new a(`\`themes\` option must contain the defaultColor key \`${c}\``);let m=p.map(t=>e.getTheme(t.theme)),g=p.map(e=>e.color);s=f.map(e=>e.map(e=>np(e,g,u,c,d))),h&&n_(s,h);let _=p.map(e=>t9(e.theme,n));i=nZ(p,m,_,u,c,"fg",d),r=nZ(p,m,_,u,c,"bg",d),o=`shiki-themes ${m.map(e=>e.name).join(" ")}`,l=c?void 0:[i,r].join(";")}else if("theme"in n){let a=t9(n.theme,n);s=nz(e,t,n);let l=e.getTheme(n.theme);r=t7(l.bg,a),i=t7(l.fg,a),o=l.name,h=ny(s)}else throw new a("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:l,grammarState:h}}function nZ(e,t,n,r,i,s,o){return e.map((l,h)=>{let c=t7(t[h][s],n[h])||"inherit",u=`${r+l.color}${"bg"===s?"-bg":""}:${c}`;if(0===h&&i){if(i===nh&&e.length>1){let r=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===i)throw new a('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let o=t7(t[r][s],n[r])||"inherit",l=t7(t[i][s],n[i])||"inherit";return`light-dark(${o}, ${l});${u}`}return c}return"css-vars"===o?u:null}).filter(e=>!!e).join(";")}function nX(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>nX(e,t,n),codeToTokens:(t,n)=>nK(e,t,n)}){let i=t;for(let e of nS(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:h,grammarState:c}=nK(e,i,n),{mergeWhitespaces:u=!0,mergeSameStyleTokens:d=!1}=n;!0===u?s=nY(s):"never"===u&&(s=n0(s)),d&&(s=n1(s));let p={...r,get source(){return i}};for(let e of nS(n))s=e.tokens?.call(p,s)||s;return nQ(s,{...n,fg:o,bg:a,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??h)},p,c)}function nQ(e,t,n,r=ny(e)){let i=nS(t),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t,h={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(h.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(h[e]=n);let c={type:"element",tagName:"pre",properties:h,children:[],data:t.data},u={type:"element",tagName:"code",properties:{},children:s},d=[],p={...n,structure:a,addClassToHast:no,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return c},get code(){return u},get lines(){return d}};if(e.forEach((e,t)=>{t&&("inline"===a?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&s.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let s of e){let e={type:"element",tagName:"span",properties:{...s.htmlAttrs},children:[{type:"text",value:s.content}]},l=nm(s.htmlStyle||nf(s));for(let o of(l&&(e.properties.style=l),i))e=o?.span?.call(p,e,t+1,r,n,s)||e;"inline"===a?o.children.push(e):"classic"===a&&n.children.push(e),r+=s.content.length}if("classic"===a){for(let e of i)n=e?.line?.call(p,n,t+1)||n;d.push(n),s.push(n)}else"inline"===a&&d.push(n)}),"classic"===a){for(let e of i)u=e?.code?.call(p,u)||u;for(let e of(c.children.push(u),i))c=e?.pre?.call(p,c)||c;o.children.push(c)}else if("inline"===a){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let n of o.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&o.children.push(...t.children)}}let f=o;for(let e of i)f=e?.root?.call(p,f)||f;return r&&n_(f,r),f}function nY(e){return e.map(e=>{let t,n=[],r="";return e.forEach((i,s)=>{let o=!(i.fontStyle&&(i.fontStyle&T.Underline||i.fontStyle&T.Strikethrough));o&&i.content.match(/^\s+$/)&&e[s+1]?(void 0===t&&(t=i.offset),r+=i.content):r?(o?n.push({...i,offset:t,content:r+i.content}):n.push({content:r,offset:t},i),t=void 0,r=""):n.push(i)}),n})}function n0(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let s=[{...e,offset:e.offset+n.length,content:r}];return n&&s.unshift({content:n,offset:e.offset}),i&&s.push({content:i,offset:e.offset+n.length+r.length}),s}))}function n1(e){return e.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],r=nm(e.htmlStyle||nf(e)),i=nm(n.htmlStyle||nf(n)),s=e.fontStyle&&(e.fontStyle&T.Underline||e.fontStyle&T.Strikethrough),o=n.fontStyle&&(n.fontStyle&T.Underline||n.fontStyle&T.Strikethrough);s||o||r!==i?t.push({...n}):e.content+=n.content}return t})}let n2=t4;function n3(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>nX(e,t,n),codeToTokens:(t,n)=>nK(e,t,n)},i=n2(nX(e,t,n,r));for(let e of nS(n))i=e.postprocess?.call(r,i,n)||i;return i}let n5="#333333",n4="#bbbbbb",n6="#fffffe",n8="#1e1e1e",n9="__shiki_resolved";function n7(e){if(e?.[n9])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?n5:n4),n||(n="light"===t.type?n6:n8),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,s=new Map;function o(e){if(s.has(e))return s.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(s.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,n9,{enumerable:!1,writable:!1,value:!0}),t}async function re(e){return Array.from(new Set((await Promise.all(e.filter(e=>!nr(e)).map(async e=>await nt(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function rt(e){return(await Promise.all(e.map(async e=>ns(e)?null:n7(await nt(e))))).filter(e=>!!e)}let rn=3,rr=!1;function ri(e,t=3){if(rn&&("number"!=typeof rn||!(t>rn)))if(rr)throw Error(`[SHIKI DEPRECATE]: ${e}`);else console.trace(`[SHIKI DEPRECATE]: ${e}`)}class rs extends Error{constructor(e){super(e),this.name="ShikiError"}}function ro(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new rs(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class ra extends eW{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=n7(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=v.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=ro(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>{if(!t)return!1;let r=t.embeddedLanguages||t.embeddedLangs;return r?.some(e=>n.map(([e])=>e).includes(e))}).filter(e=>!n.includes(e));throw new rs(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}}class rl{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let rh=0;function rc(e){let t;rh+=1,!1!==e.warnings&&rh>=10&&rh%10==0&&console.warn(`[Shiki] ${rh} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new rs("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(n7),s=new ra(new rl(e.engine,r),i,r,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};h();let t=s.getTheme(e);if(!t)throw new rs(`Theme \`${e}\` not found, you may need to load it first`);return t}function a(...e){h(),s.loadLanguages(e.flat(1))}function l(...e){for(let t of(h(),e.flat(1)))s.loadTheme(t)}function h(){if(n)throw new rs("Shiki instance has been disposed")}function c(){n||(n=!0,s.dispose(),rh-=1)}return{setTheme:function(e){h();let n=o(e);return t!==e&&(s.setTheme(n),t=e),{theme:n,colorMap:s.getColorMap()}},getTheme:o,getLanguage:function(e){h();let t=s.getGrammar("string"==typeof e?e:e.name);if(!t)throw new rs(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return h(),s.getLoadedThemes()},getLoadedLanguages:function(){return h(),s.getLoadedLanguages()},resolveLangAlias:function(t){return ro(t,e.langAlias)},loadLanguage:async function(...e){return a(await re(e))},loadLanguageSync:a,loadTheme:async function(...e){return h(),l(await rt(e))},loadThemeSync:l,dispose:c,[Symbol.dispose]:c}}async function ru(e){e.engine||ri("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([rt(e.themes||[]),re(e.langs||[]),e.engine]);return rc({...e,themes:t,langs:n,engine:r})}async function rd(e){let t=await ru(e);return{getLastGrammarState:(...e)=>nB(t,...e),codeToTokensBase:(e,n)=>nz(t,e,n),codeToTokensWithThemes:(e,n)=>nG(t,e,n),codeToTokens:(e,n)=>nK(t,e,n),codeToHast:(e,n)=>nX(t,e,n),codeToHtml:(e,n)=>n3(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function rp(e){let t=e.langs,n=e.themes,r=e.engine;return async function(e){function i(n){if("string"==typeof n){if(nr(n=e.langAlias?.[n]||n))return[];let r=t[n];if(!r)throw new a(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function s(e){if(ns(e))return"none";if("string"==typeof e){let t=n[e];if(!t)throw new a(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>s(e)),l=(e.langs??[]).map(e=>i(e)),h=await rd({engine:e.engine??r(),...e,themes:o,langs:l});return{...h,loadLanguage:(...e)=>h.loadLanguage(...e.map(i)),loadTheme:(...e)=>h.loadTheme(...e.map(s)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}let rf=[{id:"abap",name:"ABAP",import:()=>n.e(8773).then(n.bind(n,48773))},{id:"actionscript-3",name:"ActionScript",import:()=>n.e(36).then(n.bind(n,10036))},{id:"ada",name:"Ada",import:()=>n.e(5575).then(n.bind(n,55575))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3175)]).then(n.bind(n,23175))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([n.e(2577),n.e(1630),n.e(3782),n.e(3476),n.e(3111),n.e(3186)]).then(n.bind(n,76359))},{id:"apache",name:"Apache Conf",import:()=>n.e(2765).then(n.bind(n,52765))},{id:"apex",name:"Apex",import:()=>n.e(7455).then(n.bind(n,27455))},{id:"apl",name:"APL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(4174)]).then(n.bind(n,54174))},{id:"applescript",name:"AppleScript",import:()=>n.e(9178).then(n.bind(n,19178))},{id:"ara",name:"Ara",import:()=>n.e(3313).then(n.bind(n,93313))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>n.e(8318).then(n.bind(n,98318))},{id:"asm",name:"Assembly",import:()=>n.e(7846).then(n.bind(n,87846))},{id:"astro",name:"Astro",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(3782),n.e(6686)]).then(n.bind(n,36686))},{id:"awk",name:"AWK",import:()=>n.e(4900).then(n.bind(n,54900))},{id:"ballerina",name:"Ballerina",import:()=>n.e(2747).then(n.bind(n,92747))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>n.e(3290).then(n.bind(n,73290))},{id:"beancount",name:"Beancount",import:()=>n.e(8496).then(n.bind(n,98496))},{id:"berry",name:"Berry",aliases:["be"],import:()=>n.e(5331).then(n.bind(n,95331))},{id:"bibtex",name:"BibTeX",import:()=>n.e(5937).then(n.bind(n,25937))},{id:"bicep",name:"Bicep",import:()=>n.e(8406).then(n.bind(n,68406))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>n.e(1410).then(n.bind(n,71410))},{id:"blade",name:"Blade",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(5005)]).then(n.bind(n,25005))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>n.e(4608).then(n.bind(n,4608))},{id:"c",name:"C",import:()=>n.e(8192).then(n.bind(n,88192))},{id:"c3",name:"C3",import:()=>n.e(7113).then(n.bind(n,7113))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>n.e(4242).then(n.bind(n,64242))},{id:"cairo",name:"Cairo",import:()=>Promise.all([n.e(893),n.e(4367)]).then(n.bind(n,84367))},{id:"clarity",name:"Clarity",import:()=>n.e(5183).then(n.bind(n,15183))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>n.e(6959).then(n.bind(n,66959))},{id:"cmake",name:"CMake",import:()=>n.e(5482).then(n.bind(n,55482))},{id:"cobol",name:"COBOL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(5498)]).then(n.bind(n,15498))},{id:"codeowners",name:"CODEOWNERS",import:()=>n.e(1188).then(n.bind(n,21188))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>n.e(2403).then(n.bind(n,22403))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([n.e(2577),n.e(6647)]).then(n.bind(n,76647))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>n.e(3787).then(n.bind(n,93787))},{id:"coq",name:"Coq",import:()=>n.e(5920).then(n.bind(n,55920))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(6110)]).then(n.bind(n,27816))},{id:"crystal",name:"Crystal",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(8192),n.e(7152),n.e(1413)]).then(n.bind(n,21413))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>n.e(9261).then(n.bind(n,71642))},{id:"css",name:"CSS",import:()=>n.e(3782).then(n.bind(n,63782))},{id:"csv",name:"CSV",import:()=>n.e(6331).then(n.bind(n,66331))},{id:"cue",name:"CUE",import:()=>n.e(5338).then(n.bind(n,45338))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>n.e(4350).then(n.bind(n,14350))},{id:"d",name:"D",import:()=>n.e(9015).then(n.bind(n,59015))},{id:"dart",name:"Dart",import:()=>n.e(3288).then(n.bind(n,3288))},{id:"dax",name:"DAX",import:()=>n.e(1932).then(n.bind(n,21932))},{id:"desktop",name:"Desktop",import:()=>n.e(7819).then(n.bind(n,7819))},{id:"diff",name:"Diff",import:()=>n.e(2614).then(n.bind(n,62614))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>n.e(2783).then(n.bind(n,52783))},{id:"dotenv",name:"dotEnv",import:()=>n.e(4829).then(n.bind(n,44829))},{id:"dream-maker",name:"Dream Maker",import:()=>n.e(425).then(n.bind(n,32806))},{id:"edge",name:"Edge",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(7844)]).then(n.bind(n,67844))},{id:"elixir",name:"Elixir",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(698)]).then(n.bind(n,20698))},{id:"elm",name:"Elm",import:()=>Promise.all([n.e(8192),n.e(4583)]).then(n.bind(n,84583))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>n.e(3879).then(n.bind(n,62965))},{id:"erb",name:"ERB",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848),n.e(1198)]).then(n.bind(n,91198))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([n.e(3304),n.e(4678)]).then(n.bind(n,64678))},{id:"fennel",name:"Fennel",import:()=>n.e(2964).then(n.bind(n,60583))},{id:"fish",name:"Fish",import:()=>n.e(2349).then(n.bind(n,52349))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>n.e(6293).then(n.bind(n,26293))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([n.e(4823),n.e(5061)]).then(n.bind(n,85061))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>n.e(4823).then(n.bind(n,94823))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([n.e(3304),n.e(2501)]).then(n.bind(n,52501))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>n.e(8670).then(n.bind(n,98670))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>n.e(4223).then(n.bind(n,34223))},{id:"gdshader",name:"GDShader",import:()=>n.e(7977).then(n.bind(n,67977))},{id:"genie",name:"Genie",import:()=>n.e(2031).then(n.bind(n,42031))},{id:"gherkin",name:"Gherkin",import:()=>n.e(8457).then(n.bind(n,88457))},{id:"git-commit",name:"Git Commit Message",import:()=>n.e(2041).then(n.bind(n,92041))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([n.e(7152),n.e(3194)]).then(n.bind(n,33194))},{id:"gleam",name:"Gleam",import:()=>n.e(2895).then(n.bind(n,62895))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(640)]).then(n.bind(n,30640))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(9186)]).then(n.bind(n,59186))},{id:"glsl",name:"GLSL",import:()=>Promise.all([n.e(8192),n.e(6887)]).then(n.bind(n,6887))},{id:"gn",name:"GN",import:()=>n.e(9448).then(n.bind(n,99448))},{id:"gnuplot",name:"Gnuplot",import:()=>n.e(9690).then(n.bind(n,79690))},{id:"go",name:"Go",import:()=>n.e(4553).then(n.bind(n,64553))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(1248)]).then(n.bind(n,41248))},{id:"groovy",name:"Groovy",import:()=>n.e(9189).then(n.bind(n,39189))},{id:"hack",name:"Hack",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(400)]).then(n.bind(n,70400))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3437)]).then(n.bind(n,63437))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2735)]).then(n.bind(n,12735))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>n.e(1335).then(n.bind(n,21335))},{id:"haxe",name:"Haxe",import:()=>n.e(1215).then(n.bind(n,11215))},{id:"hcl",name:"HashiCorp HCL",import:()=>n.e(2374).then(n.bind(n,82374))},{id:"hjson",name:"Hjson",import:()=>n.e(9421).then(n.bind(n,79421))},{id:"hlsl",name:"HLSL",import:()=>n.e(10).then(n.bind(n,80010))},{id:"html",name:"HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476)]).then(n.bind(n,43476))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(1656)]).then(n.bind(n,51656))},{id:"http",name:"HTTP",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(7152),n.e(1248),n.e(8243)]).then(n.bind(n,98243))},{id:"hurl",name:"Hurl",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(1248),n.e(816)]).then(n.bind(n,20816))},{id:"hxml",name:"HXML",import:()=>n.e(376).then(n.bind(n,50376))},{id:"hy",name:"Hy",import:()=>n.e(6938).then(n.bind(n,26938))},{id:"imba",name:"Imba",import:()=>n.e(794).then(n.bind(n,30794))},{id:"ini",name:"INI",aliases:["properties"],import:()=>n.e(4309).then(n.bind(n,34309))},{id:"java",name:"Java",import:()=>n.e(6931).then(n.bind(n,76931))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>n.e(2577).then(n.bind(n,52970))},{id:"jinja",name:"Jinja",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3392)]).then(n.bind(n,43392))},{id:"jison",name:"Jison",import:()=>Promise.all([n.e(2577),n.e(6402)]).then(n.bind(n,36402))},{id:"json",name:"JSON",import:()=>n.e(4053).then(n.bind(n,4053))},{id:"json5",name:"JSON5",import:()=>n.e(3860).then(n.bind(n,63860))},{id:"jsonc",name:"JSON with Comments",import:()=>n.e(4650).then(n.bind(n,4650))},{id:"jsonl",name:"JSON Lines",import:()=>n.e(1453).then(n.bind(n,91453))},{id:"jsonnet",name:"Jsonnet",import:()=>n.e(8132).then(n.bind(n,8132))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>n.e(4634).then(n.bind(n,24634))},{id:"jsx",name:"JSX",import:()=>n.e(9312).then(n.bind(n,29228))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([n.e(2577),n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(893),n.e(6339)]).then(n.bind(n,85816))},{id:"just",name:"Just",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(968),n.e(8977)]).then(n.bind(n,18977))},{id:"kdl",name:"KDL",import:()=>n.e(5968).then(n.bind(n,95968))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>n.e(6572).then(n.bind(n,26572))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>n.e(583).then(n.bind(n,50583))},{id:"latex",name:"LaTeX",import:()=>n.e(2839).then(n.bind(n,72839))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>n.e(7227).then(n.bind(n,77227))},{id:"less",name:"Less",import:()=>n.e(1280).then(n.bind(n,11280))},{id:"liquid",name:"Liquid",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5347)]).then(n.bind(n,25347))},{id:"llvm",name:"LLVM IR",import:()=>n.e(9220).then(n.bind(n,19220))},{id:"log",name:"Log file",import:()=>n.e(6741).then(n.bind(n,16741))},{id:"logo",name:"Logo",import:()=>n.e(5670).then(n.bind(n,25670))},{id:"lua",name:"Lua",import:()=>Promise.all([n.e(8192),n.e(3873)]).then(n.bind(n,33873))},{id:"luau",name:"Luau",import:()=>n.e(3072).then(n.bind(n,33072))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>n.e(541).then(n.bind(n,30541))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>n.e(3304).then(n.bind(n,13304))},{id:"marko",name:"Marko",import:()=>Promise.all([n.e(535),n.e(3782),n.e(3111),n.e(1280),n.e(5645)]).then(n.bind(n,65645))},{id:"matlab",name:"MATLAB",import:()=>n.e(1184).then(n.bind(n,31184))},{id:"mdc",name:"MDC",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3304),n.e(6729)]).then(n.bind(n,86729))},{id:"mdx",name:"MDX",import:()=>n.e(5690).then(n.bind(n,55690))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>n.e(9842).then(n.bind(n,29842))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>n.e(1501).then(n.bind(n,11501))},{id:"mojo",name:"Mojo",import:()=>n.e(194).then(n.bind(n,50194))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>n.e(4567).then(n.bind(n,24567))},{id:"move",name:"Move",import:()=>n.e(4540).then(n.bind(n,24540))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>n.e(6455).then(n.bind(n,36455))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>n.e(5320).then(n.bind(n,35320))},{id:"nextflow-groovy",name:"nextflow-groovy",import:()=>n.e(3633).then(n.bind(n,53633))},{id:"nginx",name:"Nginx",import:()=>Promise.all([n.e(8192),n.e(2215)]).then(n.bind(n,2215))},{id:"nim",name:"Nim",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(8192),n.e(3304),n.e(7799)]).then(n.bind(n,7799))},{id:"nix",name:"Nix",import:()=>n.e(6099).then(n.bind(n,86099))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>n.e(8288).then(n.bind(n,38288))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>n.e(6290).then(n.bind(n,36290))},{id:"objective-cpp",name:"Objective-C++",import:()=>n.e(4763).then(n.bind(n,21946))},{id:"ocaml",name:"OCaml",import:()=>n.e(3419).then(n.bind(n,3419))},{id:"odin",name:"Odin",import:()=>n.e(9547).then(n.bind(n,69547))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>n.e(4474).then(n.bind(n,4474))},{id:"pascal",name:"Pascal",import:()=>n.e(6948).then(n.bind(n,46948))},{id:"perl",name:"Perl",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(968),n.e(7040)]).then(n.bind(n,30968))},{id:"php",name:"PHP",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(6155),n.e(4659)]).then(n.bind(n,86155))},{id:"pkl",name:"Pkl",import:()=>n.e(6166).then(n.bind(n,96166))},{id:"plsql",name:"PL/SQL",import:()=>n.e(8947).then(n.bind(n,48947))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>n.e(3324).then(n.bind(n,43324))},{id:"polar",name:"Polar",import:()=>n.e(3095).then(n.bind(n,93095))},{id:"postcss",name:"PostCSS",import:()=>n.e(9240).then(n.bind(n,19240))},{id:"powerquery",name:"PowerQuery",import:()=>n.e(9294).then(n.bind(n,19294))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>n.e(7636).then(n.bind(n,7636))},{id:"prisma",name:"Prisma",import:()=>n.e(327).then(n.bind(n,40327))},{id:"prolog",name:"Prolog",import:()=>n.e(34).then(n.bind(n,80034))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>n.e(8545).then(n.bind(n,58545))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5755)]).then(n.bind(n,55755))},{id:"puppet",name:"Puppet",import:()=>n.e(9569).then(n.bind(n,19569))},{id:"purescript",name:"PureScript",import:()=>n.e(6580).then(n.bind(n,36580))},{id:"python",name:"Python",aliases:["py"],import:()=>n.e(893).then(n.bind(n,40893))},{id:"qml",name:"QML",import:()=>Promise.all([n.e(2577),n.e(3077)]).then(n.bind(n,73077))},{id:"qmldir",name:"QML Directory",import:()=>n.e(6144).then(n.bind(n,46144))},{id:"qss",name:"Qt Style Sheets",import:()=>n.e(5712).then(n.bind(n,55712))},{id:"r",name:"R",import:()=>n.e(5025).then(n.bind(n,25025))},{id:"racket",name:"Racket",import:()=>n.e(3229).then(n.bind(n,3229))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>n.e(252).then(n.bind(n,30252))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(9261),n.e(4903)]).then(n.bind(n,84903))},{id:"reg",name:"Windows Registry Script",import:()=>n.e(5997).then(n.bind(n,85997))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>n.e(6412).then(n.bind(n,86412))},{id:"rel",name:"Rel",import:()=>n.e(2062).then(n.bind(n,62062))},{id:"riscv",name:"RISC-V",import:()=>n.e(2710).then(n.bind(n,52710))},{id:"ron",name:"RON",import:()=>n.e(862).then(n.bind(n,80862))},{id:"rosmsg",name:"ROS Interface",import:()=>n.e(5728).then(n.bind(n,95728))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(123)]).then(n.bind(n,52504))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848)]).then(n.bind(n,72331))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>n.e(1161).then(n.bind(n,61161))},{id:"sas",name:"SAS",import:()=>Promise.all([n.e(2503),n.e(6360)]).then(n.bind(n,66360))},{id:"sass",name:"Sass",import:()=>n.e(8113).then(n.bind(n,88113))},{id:"scala",name:"Scala",import:()=>n.e(9377).then(n.bind(n,89377))},{id:"scheme",name:"Scheme",import:()=>n.e(7142).then(n.bind(n,97142))},{id:"scss",name:"SCSS",import:()=>Promise.all([n.e(3782),n.e(3111)]).then(n.bind(n,43111))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>n.e(9648).then(n.bind(n,59648))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>n.e(1379).then(n.bind(n,1379))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>n.e(7152).then(n.bind(n,57152))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([n.e(7152),n.e(8257)]).then(n.bind(n,8257))},{id:"smalltalk",name:"Smalltalk",import:()=>n.e(1556).then(n.bind(n,61556))},{id:"solidity",name:"Solidity",import:()=>n.e(8704).then(n.bind(n,38704))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2728)]).then(n.bind(n,72728))},{id:"sparql",name:"SPARQL",import:()=>n.e(8432).then(n.bind(n,68432))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>n.e(7610).then(n.bind(n,47610))},{id:"sql",name:"SQL",import:()=>n.e(2503).then(n.bind(n,2503))},{id:"ssh-config",name:"SSH Config",import:()=>n.e(6046).then(n.bind(n,16046))},{id:"stata",name:"Stata",import:()=>Promise.all([n.e(2503),n.e(4080)]).then(n.bind(n,64080))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>n.e(7557).then(n.bind(n,97557))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>Promise.all([n.e(2577),n.e(830)]).then(n.bind(n,30830))},{id:"svelte",name:"Svelte",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(1142)]).then(n.bind(n,81142))},{id:"swift",name:"Swift",import:()=>n.e(5922).then(n.bind(n,35922))},{id:"system-verilog",name:"SystemVerilog",import:()=>n.e(3274).then(n.bind(n,90893))},{id:"systemd",name:"Systemd Units",import:()=>n.e(9006).then(n.bind(n,9006))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>n.e(1078).then(n.bind(n,21078))},{id:"tasl",name:"Tasl",import:()=>n.e(4963).then(n.bind(n,94963))},{id:"tcl",name:"Tcl",import:()=>n.e(1274).then(n.bind(n,41274))},{id:"templ",name:"Templ",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(4553),n.e(1977)]).then(n.bind(n,81977))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>n.e(3483).then(n.bind(n,43483))},{id:"tex",name:"TeX",import:()=>n.e(1456).then(n.bind(n,11456))},{id:"toml",name:"TOML",import:()=>n.e(4163).then(n.bind(n,84163))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(4357)]).then(n.bind(n,74357))},{id:"tsv",name:"TSV",import:()=>n.e(840).then(n.bind(n,30840))},{id:"tsx",name:"TSX",import:()=>n.e(6814).then(n.bind(n,33710))},{id:"turtle",name:"Turtle",import:()=>n.e(1365).then(n.bind(n,41365))},{id:"twig",name:"Twig",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(3111),n.e(6155),n.e(6588)]).then(n.bind(n,96588))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>n.e(535).then(n.bind(n,5346))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>n.e(9466).then(n.bind(n,19466))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>n.e(2013).then(n.bind(n,62013))},{id:"v",name:"V",import:()=>n.e(7525).then(n.bind(n,7525))},{id:"vala",name:"Vala",import:()=>n.e(9565).then(n.bind(n,59565))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>n.e(2179).then(n.bind(n,62179))},{id:"verilog",name:"Verilog",import:()=>n.e(7182).then(n.bind(n,34801))},{id:"vhdl",name:"VHDL",import:()=>n.e(7425).then(n.bind(n,37425))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>n.e(4539).then(n.bind(n,14539))},{id:"vue",name:"Vue",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(5553)]).then(n.bind(n,45553))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([n.e(2577),n.e(7021)]).then(n.bind(n,17021))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([n.e(2577),n.e(1290),n.e(3782),n.e(3111),n.e(1280),n.e(2160)]).then(n.bind(n,98110))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>n.e(1219).then(n.bind(n,21219))},{id:"wasm",name:"WebAssembly",import:()=>n.e(4275).then(n.bind(n,84275))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>n.e(5269).then(n.bind(n,65269))},{id:"wgsl",name:"WGSL",import:()=>n.e(4976).then(n.bind(n,44976))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>n.e(4370).then(n.bind(n,44370))},{id:"wit",name:"WebAssembly Interface Types",import:()=>n.e(624).then(n.bind(n,58243))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>n.e(7442).then(n.bind(n,6987))},{id:"xml",name:"XML",import:()=>Promise.all([n.e(6931),n.e(2278)]).then(n.bind(n,77040))},{id:"xsl",name:"XSL",import:()=>Promise.all([n.e(6931),n.e(3942)]).then(n.bind(n,3942))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>n.e(5518).then(n.bind(n,95518))},{id:"zenscript",name:"ZenScript",import:()=>n.e(2485).then(n.bind(n,92485))},{id:"zig",name:"Zig",import:()=>n.e(7041).then(n.bind(n,57041))}],rm=Object.fromEntries(rf.map(e=>[e.id,e.import])),rg=Object.fromEntries(rf.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),r_={...rm,...rg},ry=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>n.e(2812).then(n.bind(n,62812))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>n.e(7635).then(n.bind(n,27635))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>n.e(7884).then(n.bind(n,77884))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>n.e(4358).then(n.bind(n,94358))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>n.e(9005).then(n.bind(n,19005))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>n.e(1595).then(n.bind(n,51595))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>n.e(3979).then(n.bind(n,83979))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>n.e(9680).then(n.bind(n,59680))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>n.e(2107).then(n.bind(n,2107))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>n.e(5375).then(n.bind(n,75375))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>n.e(5136).then(n.bind(n,55136))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>n.e(4295).then(n.bind(n,4295))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>n.e(7258).then(n.bind(n,87258))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>n.e(9996).then(n.bind(n,49996))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>n.e(9224).then(n.bind(n,39224))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>n.e(6704).then(n.bind(n,86704))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>n.e(6927).then(n.bind(n,96927))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>n.e(5424).then(n.bind(n,15424))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>n.e(3082).then(n.bind(n,23082))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>n.e(9382).then(n.bind(n,69382))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>n.e(2130).then(n.bind(n,32130))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>n.e(9666).then(n.bind(n,49666))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>n.e(392).then(n.bind(n,80392))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>n.e(9841).then(n.bind(n,49841))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>n.e(3492).then(n.bind(n,53492))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>n.e(214).then(n.bind(n,214))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>n.e(579).then(n.bind(n,60579))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>n.e(6311).then(n.bind(n,96311))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:()=>n.e(3526).then(n.bind(n,23526))},{id:"houston",displayName:"Houston",type:"dark",import:()=>n.e(7524).then(n.bind(n,7524))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>n.e(6563).then(n.bind(n,56563))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>n.e(6701).then(n.bind(n,26701))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>n.e(7785).then(n.bind(n,97785))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>n.e(9136).then(n.bind(n,19136))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>n.e(2489).then(n.bind(n,82489))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>n.e(1247).then(n.bind(n,21247))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>n.e(6859).then(n.bind(n,76859))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>n.e(7921).then(n.bind(n,67921))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>n.e(6846).then(n.bind(n,96846))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>n.e(3074).then(n.bind(n,83074))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>n.e(9521).then(n.bind(n,89521))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>n.e(6089).then(n.bind(n,6089))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>n.e(5520).then(n.bind(n,15520))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>n.e(4969).then(n.bind(n,44969))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>n.e(2954).then(n.bind(n,92954))},{id:"nord",displayName:"Nord",type:"dark",import:()=>n.e(5491).then(n.bind(n,5491))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>n.e(9615).then(n.bind(n,9615))},{id:"one-light",displayName:"One Light",type:"light",import:()=>n.e(7625).then(n.bind(n,67625))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>n.e(1534).then(n.bind(n,21534))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>n.e(8430).then(n.bind(n,28430))},{id:"red",displayName:"Red",type:"dark",import:()=>n.e(8555).then(n.bind(n,48555))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>n.e(7082).then(n.bind(n,87082))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>n.e(1583).then(n.bind(n,1583))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>n.e(5750).then(n.bind(n,35750))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>n.e(7465).then(n.bind(n,17465))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>n.e(1898).then(n.bind(n,21898))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>n.e(7130).then(n.bind(n,67130))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>n.e(966).then(n.bind(n,966))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>n.e(1664).then(n.bind(n,31664))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>n.e(3286).then(n.bind(n,83286))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>n.e(4593).then(n.bind(n,94593))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>n.e(9267).then(n.bind(n,39267))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>n.e(7889).then(n.bind(n,47889))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>n.e(5318).then(n.bind(n,55318))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>n.e(8656).then(n.bind(n,78656))}].map(e=>[e.id,e.import]));var rb=n(49304).Buffer;class rk extends Error{constructor(e){super(e),this.name="ShikiError"}}function rw(){return 0x80000000}function rv(){return"u">typeof performance?performance.now():Date.now()}let rC=(e,t)=>e+(t-e%t)%t;async function rx(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function s(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(e){let t=r.HEAPU8.length;e>>>=0;let n=rw();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+0x6000000),o(Math.min(n,rC(Math.max(e,i),65536))))return!0}return!1}let l="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&l)return l.decode(e.subarray(t,i));let s="";for(;t<i;){let n=e[t++];if(!(128&n)){s+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){s+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)s+=String.fromCharCode(n);else{let e=n-65536;s+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return s}function c(e,t){return e?h(r.HEAPU8,e,t):""}let u={emscripten_get_now:rv,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function d(){let n={env:u,wasi_snapshot_preview1:u},s=await e(n);i((t=s.memory).buffer),Object.assign(r,s),r.UTF8ToString=c}return await d(),r}var rS=Object.defineProperty,rA=(e,t,n)=>t in e?rS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rE=(e,t,n)=>rA(e,"symbol"!=typeof t?t+"":t,n);let rM=null;function rT(e){throw new rk(e.UTF8ToString(e.getLastOnigError()))}class rN{constructor(e){rE(this,"utf16Length"),rE(this,"utf8Length"),rE(this,"utf16Value"),rE(this,"utf8Value"),rE(this,"utf16OffsetToUtf8"),rE(this,"utf8OffsetToUtf16");const t=e.length,n=rN._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);const s=r?new Uint32Array(n+1):null;r&&(s[n]=t);const o=new Uint8Array(n);let a=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let h=l,c=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(h=(l-55296<<10)+65536|t-56320,c=!0)}r&&(i[n]=a,c&&(i[n+1]=a),h<=127?s[a+0]=n:h<=2047?(s[a+0]=n,s[a+1]=n):h<=65535?(s[a+0]=n,s[a+1]=n,s[a+2]=n):(s[a+0]=n,s[a+1]=n,s[a+2]=n,s[a+3]=n)),h<=127?o[a++]=h:(h<=2047?o[a++]=192|(1984&h)>>>6:(h<=65535?o[a++]=224|(61440&h)>>>12:(o[a++]=240|(1835008&h)>>>18,o[a++]=128|(258048&h)>>>12),o[a++]=128|(4032&h)>>>6),o[a++]=128|(63&h)>>>0),c&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),s=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(s=(i-55296<<10)+65536|t-56320,o=!0)}s<=127?t+=1:s<=2047?t+=2:s<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let rI=class e{constructor(t){if(rE(this,"id",++e.LAST_ID),rE(this,"_onigBinding"),rE(this,"content"),rE(this,"utf16Length"),rE(this,"utf8Length"),rE(this,"utf16OffsetToUtf8"),rE(this,"utf8OffsetToUtf16"),rE(this,"ptr"),!rM)throw new rk("Must invoke loadWasm first.");this._onigBinding=rM,this.content=t;const n=new rN(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=rM.omalloc(1e4)),e._sharedPtrInUse=!0,rM.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(rM)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};rE(rI,"LAST_ID",0),rE(rI,"_sharedPtr",0),rE(rI,"_sharedPtrInUse",!1);let rD=rI;class rL{constructor(e){if(rE(this,"_onigBinding"),rE(this,"_ptr"),!rM)throw new rk("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=new rN(e[r]);t[r]=i.createString(rM),n[r]=i.utf8Length}const r=rM.omalloc(4*e.length);rM.HEAPU32.set(t,r/4);const i=rM.omalloc(4*e.length);rM.HEAPU32.set(n,i/4);const s=rM.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)rM.ofree(t[n]);rM.ofree(i),rM.ofree(r),0===s&&rT(rM),this._onigBinding=rM,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new rD(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,s=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===s)return null;let o=i.HEAPU32,a=s/4,l=o[a++],h=o[a++],c=[];for(let t=0;t<h;t++){let n=e.convertUtf8OffsetToUtf16(o[a++]),r=e.convertUtf8OffsetToUtf16(o[a++]);c[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:c}}}function rR(e){return"function"==typeof e.instantiator}function rF(e){return"function"==typeof e.default}function rP(e){return void 0!==e.data}function rO(e){return"u">typeof Response&&e instanceof Response}function rz(e){return"u">typeof ArrayBuffer&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||void 0!==rb&&rb.isBuffer?.(e)||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"u">typeof Uint32Array&&e instanceof Uint32Array}function rB(e){return i||(i=async function(){rM=await rx(async t=>{let n=e;return"function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),rR(n)?n=await n.instantiator(t):rF(n)?n=await n.default(t):(rP(n)&&(n=n.data),rO(n)?n="function"==typeof WebAssembly.instantiateStreaming?await rj(n)(t):await rq(n)(t):rz(n)||n instanceof WebAssembly.Module?n=await r$(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await r$(n.default)(t))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())}function r$(e){return t=>WebAssembly.instantiate(e,t)}function rj(e){return t=>WebAssembly.instantiateStreaming(e,t)}function rq(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function rH(e){return e&&await rB(e),{createScanner:e=>new rL(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new rD(e)}}let rU=rp({langs:r_,themes:ry,engine:()=>rH(Promise.all([n.e(4814),n.e(9302)]).then(n.bind(n,49302)))})},67635:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],s=(0,r.A)("copy",i)},68459:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s=(0,r.A)("trash-2",i)},68806:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],s=(0,r.A)("plug",i)},69048:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],s=(0,r.A)("square-function",i)},73300:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],s=(0,r.A)("clipboard",i)},76022:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/web-tree-sitter.f7f7244f.wasm"},76065:(e,t,n)=>{"use strict";n.d(t,{H:()=>r.Hj});var r=n(5989)},76865:(e,t,n)=>{"use strict";n.d(t,{$t:()=>A,LN:()=>o,U3:()=>c,hs:()=>I,i5:()=>f,k_:()=>M,nh:()=>d,yn:()=>a});var r=n(27050),i=n(8242);let s=Object.create(null);class o{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.Ji.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:h}=o[a],c=e.mapping.slice(s);e.replaceRange(c.map(l.pos),c.map(h.pos),a?r.Ji.empty:t),0==a&&_(e,s,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],a=e.mapping.slice(n),l=a.map(s.pos),h=a.map(o.pos);i?e.deleteRange(l,h):(e.replaceRangeWith(l,h,t),_(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new c(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of selection JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}o.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function h(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class c extends o{constructor(e,t=e){h(e),h(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return o.near(n);let r=e.resolve(t.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof c&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new u(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new c(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=o.findFrom(t,n,!0)||o.findFrom(t,-n,!0);if(!e)return o.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(o.findFrom(e,-n,!0)||o.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new c(e,t)}}o.jsonID("text",c);class u{constructor(e,t){this.anchor=e,this.head=t}map(e){return new u(e.map(this.anchor),e.map(this.head))}resolve(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))}}class d extends o{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?o.near(i):new d(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(e){return e instanceof d&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new d(e.resolve(t.anchor))}static create(e,t){return new d(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}d.prototype.visible=!1,o.jsonID("node",d);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new u(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(t):o.near(t)}}class f extends o{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=o.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}o.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,i,s=!1){if(t.inlineContent)return c.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!s&&d.isSelectable(r))return d.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,s);if(t)return t}n+=r.nodeSize*i}return null}function _(e,t,n){let r,s=e.steps.length-1;if(s<t)return;let a=e.steps[s];(a instanceof i.Ln||a instanceof i.Wg)&&(e.mapping.maps[s].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(o.near(e.doc.resolve(r),n)))}let y=1,b=2,k=4;class w extends i.dL{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|y)&~b,this.storedMarks=null,this}get selectionSet(){return(this.updated&y)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=b,this}ensureMarks(e){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&b)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~b,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(o.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=k,this}get scrolledIntoView(){return(this.updated&k)>0}}function v(e,t){return t&&e?e.bind(t):e}class C{constructor(e,t,n){this.name=e,this.init=v(t.init,n),this.apply=v(t.apply,n)}}let x=[new C("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new C("selection",{init:(e,t)=>e.selection||o.atStart(t.doc),apply:e=>e.selection}),new C("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new C("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class S{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new C(e.key,e.spec.state,e))})}}class A{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let a=r?r[s].n:0,l=r?r[s].state:this,h=a<t.length&&o.spec.appendTransaction.call(o,a?t.slice(a):t,l,n);if(h&&n.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<s?{state:n,n:t.length}:{state:this,n:0})}t.push(h),n=n.applyInner(h),i=!0}r&&(r[s]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new A(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new w(this)}static create(e){let t=new S(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new A(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new S(this.schema,e.plugins),n=t.fields,r=new A(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new S(e.schema,e.plugins),s=new A(i);return i.fields.forEach(i=>{if("doc"==i.name)s.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],a=o.spec.state;if(o.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){s[i.name]=a.fromJSON.call(o,e,t[r],s);return}}s[i.name]=i.init(e,s)}}),s}}function E(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=E(i,t,{})),n[r]=i}return n}class M{constructor(e){this.spec=e,this.props={},e.props&&E(e.props,this,this.props),this.key=e.key?e.key.key:N("plugin")}getState(e){return e[this.key]}}let T=Object.create(null);function N(e){return e in T?e+"$"+ ++T[e]:(T[e]=0,e+"$")}class I{constructor(e="key"){this.key=N(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},81165:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],s=(0,r.A)("loader",i)},82150:(e,t,n)=>{"use strict";n.d(t,{L2:()=>R,Rg:()=>h,_0:()=>F,_J:()=>D,ck:()=>c,it:()=>w});var r=n(82159),i=Object.defineProperty,s=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},o="listItem",a="textStyle",l=/^\s*([-+*])\s$/,h=r.bP.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>"list"!==e.type||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(o,this.editor.getAttributes(a)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=(0,r.tG)({find:l,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:l,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(a),editor:this.editor})),[e]}}),c=r.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if("list_item"!==e.type)return[];let r=null!=(n=t.parseBlockChildren)?n:t.parseChildren,i=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>"paragraph"===e.type))i=r(e.tokens);else{let n=e.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(i=[{type:"paragraph",content:t.parseInline(n.tokens)}],e.tokens.length>1){let t=r(e.tokens.slice(1));i.push(...t)}}else i=r(e.tokens)}return 0===i.length&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(e,t,n)=>(0,r.kj)(e,t,e=>{var t,n;if("bulletList"===e.parentType)return"- ";if("orderedList"===e.parentType){let r=(null==(n=null==(t=e.meta)?void 0:t.parentAttrs)?void 0:n.start)||1;return`${r+e.index}. `}return"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});s({},{findListItemPos:()=>u,getNextListDepth:()=>d,handleBackspace:()=>g,handleDelete:()=>b,hasListBefore:()=>p,hasListItemAfter:()=>k,hasListItemBefore:()=>f,listItemHasSubList:()=>m,nextListIsDeeper:()=>_,nextListIsHigher:()=>y});var u=(e,t)=>{let{$from:n}=t.selection,i=(0,r.Pg)(e,t.schema),s=null,o=n.depth,a=n.pos,l=null;for(;o>0&&null===l;)(s=n.node(o)).type===i?l=o:(o-=1,a-=1);return null===l?null:{$pos:t.doc.resolve(a),depth:l}},d=(e,t)=>{let n=u(e,t);if(!n)return!1;let[,i]=(0,r.fl)(t,e,n.$pos.pos+4);return i},p=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),s=e.doc.resolve(i).node();return!!s&&!!n.includes(s.type.name)},f=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return 0!==i.index()&&(null==(n=i.nodeBefore)?void 0:n.type.name)===e},m=(e,t,n)=>{if(!n)return!1;let i=(0,r.Pg)(e,t.schema),s=!1;return n.descendants(e=>{e.type===i&&(s=!0)}),s},g=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!(0,r.rU)(e.state,t)&&p(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let s=i.at(-1);if(!s)return!1;let o=e.state.doc.resolve(r.start()+s.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!(0,r.rU)(e.state,t)||!(0,r.J_)(e.state))return!1;let i=u(t,e.state);if(!i)return!1;let s=e.state.doc.resolve(i.$pos.pos-2).node(i.depth),o=m(t,e.state,s);return f(t,e.state)&&!o?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},_=(e,t)=>{let n=d(e,t),r=u(e,t);return!!r&&!!n&&n>r.depth},y=(e,t)=>{let n=d(e,t),r=u(e,t);return!!r&&!!n&&n<r.depth},b=(e,t)=>{if(!(0,r.rU)(e.state,t)||!(0,r.QN)(e.state,t))return!1;let{selection:n}=e.state,{$from:i,$to:s}=n;return!(!n.empty&&i.sameParent(s))&&(_(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():y(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward())},k=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return i.index()!==i.parent.childCount-1&&(null==(n=i.nodeAfter)?void 0:n.type.name)===e},w=r.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&b(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&b(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&g(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&g(e,n,r)&&(t=!0)}),t}}}}),v=/^(\s*)(\d+)\.\s+(.*)$/,C=/^\s/;function x(e){let t=e.trimStart();return/^[-+*]\s+/.test(t)||/^\d+\.\s+/.test(t)||/^>\s?/.test(t)||/^```/.test(t)||/^~~~/.test(t)}function S(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r)return void n.push(e);if(""===e.trim()||t.length>0&&x(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function A(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],s=i.match(v);if(!s)break;let[,o,a,l]=s,h=o.length,c=[l],u=n+1,d=[i],p=!1;for(;u<e.length;){let t=e[u];if(t.match(v))break;if(""===t.trim())d.push(t),c.push(""),p=!0,u+=1;else if(t.match(C))d.push(t),c.push(t.slice(h+2)),u+=1;else{if(p)break;d.push(t),c.push(t),u+=1}}t.push({indent:h,number:parseInt(a,10),content:c.join("\n").trim(),contentLines:c,raw:d.join("\n")}),r=u,n=u}return[t,r]}function E(e,t,n){let r=[],i=0;for(;i<e.length;){let s=e[i];if(s.indent===t){let{paragraphLines:o,blockLines:a}=S(s.contentLines),l=o.join("\n").trim(),h=[];l&&h.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});let c=a.join("\n").trim();if(c){let e=n.blockTokens(c);h.push(...e)}let u=i+1,d=[];for(;u<e.length&&e[u].indent>t;)d.push(e[u]),u+=1;if(d.length>0){let e=Math.min(...d.map(e=>e.indent)),t=E(d,e,n);h.push({type:"list",ordered:!0,start:d[0].number,items:t,raw:d.map(e=>e.raw).join("\n")})}r.push({type:"list_item",raw:s.raw,tokens:h}),i=u}else i+=1}return r}function M(e,t){return e.map(e=>{if("list_item"!==e.type)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if("paragraph"===e.type||"list"===e.type||"blockquote"===e.type||"code"===e.type)n.push(...t.parseChildren([e]));else if("text"===e.type&&e.tokens){let r=t.parseChildren([e]);n.push({type:"paragraph",content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})}var T="listItem",N="textStyle",I=/^(\d+)\.\s$/,D=r.bP.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",(0,r.KV)(this.options.HTMLAttributes,n),0]:["ol",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if("list"!==e.type||!e.ordered)return[];let n=e.start||1,r=e.items?M(e.items,t):[];return 1!==n?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=null==t?void 0:t.index;return void 0!==n?n:-1},tokenize:(e,t,n)=>{var r;let i=e.split("\n"),[s,o]=A(i);if(0===s.length)return;let a=E(s,0,n);if(0!==a.length)return{type:"list",ordered:!0,start:(null==(r=s[0])?void 0:r.number)||1,items:a,raw:i.slice(0,o).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(T,this.editor.getAttributes(N)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=(0,r.tG)({find:I,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:I,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(N)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),L=/^\s*(\[([( |x])?\])\s$/,R=r.bP.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return""===t||"true"===t},renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",(0,r.KV)(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let i=(null==(n=e.attrs)?void 0:n.checked)?"x":" ",s=`- [${i}] `;return(0,r.kj)(e,t,s)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{let s=document.createElement("li"),o=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),h=document.createElement("div"),c=e=>{var t,n;l.ariaLabel=(null==(n=null==(t=this.options.a11y)?void 0:t.checkboxLabel)?void 0:n.call(t,e,l.checked))||`Task item checkbox for ${e.textContent||"empty task item"}`};c(e),o.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",e=>e.preventDefault()),l.addEventListener("change",t=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:r}=t.target;i.isEditable&&"function"==typeof n&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if("number"!=typeof t)return!1;let i=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==i?void 0:i.attrs,checked:r}),!0}).run(),i.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(e,r)||(l.checked=!l.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{s.setAttribute(e,t)}),s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,o.append(l,a),s.append(o,h),Object.entries(t).forEach(([e,t])=>{s.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:s,contentDOM:h,update:e=>{if(e.type!==this.type)return!1;s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,c(e);let t=i.extensionManager.attributes,n=(0,r.zU)(e,t),o=new Set(Object.keys(n)),a=this.options.HTMLAttributes;return u.forEach(e=>{o.has(e)||(e in a?s.setAttribute(e,a[e]):s.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{null==t?e in a?s.setAttribute(e,a[e]):s.removeAttribute(e):s.setAttribute(e,t)}),u=o,!0}}}},addInputRules(){return[(0,r.tG)({find:L,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),F=r.bP.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=null==(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:t.index;return void 0!==n?n:-1},tokenize(e,t,n){let i=e=>{let t=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);return t?[{type:"taskList",raw:t.raw,items:t.items}]:n.blockTokens(e)},s=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});r.YY.create({name:"listKit",addExtensions(){let e=[];return!1!==this.options.bulletList&&e.push(h.configure(this.options.bulletList)),!1!==this.options.listItem&&e.push(c.configure(this.options.listItem)),!1!==this.options.listKeymap&&e.push(w.configure(this.options.listKeymap)),!1!==this.options.orderedList&&e.push(D.configure(this.options.orderedList)),!1!==this.options.taskItem&&e.push(R.configure(this.options.taskItem)),!1!==this.options.taskList&&e.push(F.configure(this.options.taskList)),e}})},90425:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(12115);let i=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),a=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let h=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},c=(0,r.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:a,iconNode:c,...u},d)=>(0,r.createElement)("svg",{ref:d,...l,width:t,height:t,stroke:e,strokeWidth:s?24*Number(n)/Number(t):n,className:i("lucide",o),...!a&&!h(u)&&{"aria-hidden":"true"},...u},[...c.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(a)?a:[a]])),u=(e,t)=>{let n=(0,r.forwardRef)(({className:n,...o},l)=>(0,r.createElement)(c,{ref:l,iconNode:t,className:i(`lucide-${s(a(e))}`,`lucide-${e}`,n),...o}));return n.displayName=a(e),n}},91958:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],s=(0,r.A)("refresh-cw",i)},94577:(e,t,n)=>{"use strict";e.exports=n(99617)},96035:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],s=(0,r.A)("message-square",i)},97144:(e,t,n)=>{"use strict";n.d(t,{$f:()=>L,G2:()=>b,I$:()=>x,Im:()=>F,Qv:()=>l,Sd:()=>_,Z1:()=>S,_G:()=>c,_e:()=>p,bh:()=>k,eB:()=>h,eT:()=>g,ec:()=>R,hy:()=>M,ic:()=>o,iz:()=>A,pC:()=>v,yY:()=>w,y_:()=>P});var r=n(8242),i=n(27050),s=n(76865);let o=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let l=(e,t,n)=>{let o=a(e,n);if(!o)return!1;let l=f(o);if(!l){let n=o.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let h=l.nodeBefore;if(I(e,l,t,-1))return!0;if(0==o.parent.content.size&&(d(h,"end")||s.nh.isSelectable(h)))for(let n=o.depth;;n--){let a=(0,r.$L)(e.doc,o.before(n),o.after(n),i.Ji.empty);if(a&&a.slice.size<a.to-a.from){if(t){let n=e.tr.step(a);n.setSelection(d(h,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(l.pos,-1)),-1):s.nh.create(n.doc,l.pos-h.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||o.node(n-1).childCount>1)break}return!!h.isAtom&&l.depth==o.depth-1&&(t&&t(e.tr.delete(l.pos-h.nodeSize,l.pos).scrollIntoView()),!0)},h=(e,t,n)=>{let r=a(e,n);if(!r)return!1;let i=f(r);return!!i&&u(e,i,t)},c=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=y(r);return!!i&&u(e,i,t)};function u(e,t,n){let o=t.nodeBefore,a=t.pos-1;for(;!o.isTextblock;a--){if(o.type.spec.isolating)return!1;let e=o.lastChild;if(!e)return!1;o=e}let l=t.nodeAfter,h=t.pos+1;for(;!l.isTextblock;h++){if(l.type.spec.isolating)return!1;let e=l.firstChild;if(!e)return!1;l=e}let c=(0,r.$L)(e.doc,a,h,i.Ji.empty);if(!c||c.from!=a||c instanceof r.Ln&&c.slice.size>=h-a)return!1;if(n){let t=e.tr.step(c);t.setSelection(s.U3.create(t.doc,a)),n(t.scrollIntoView())}return!0}function d(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let p=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=f(r)}let a=o&&o.nodeBefore;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let g=(e,t,n)=>{let o=m(e,n);if(!o)return!1;let a=y(o);if(!a)return!1;let l=a.nodeAfter;if(I(e,a,t,1))return!0;if(0==o.parent.content.size&&(d(l,"start")||s.nh.isSelectable(l))){let n=(0,r.$L)(e.doc,o.before(),o.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(d(l,"start")?s.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos)),1):s.nh.create(r.doc,r.mapping.map(a.pos))),t(r.scrollIntoView())}return!0}}return!!l.isAtom&&a.depth==o.depth-1&&(t&&t(e.tr.delete(a.pos,a.pos+l.nodeSize).scrollIntoView()),!0)},_=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=y(r)}let a=o&&o.nodeAfter;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos)).scrollIntoView()),!0)};function y(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let b=(e,t)=>{let n=e.selection,i=n instanceof s.nh,o;if(i){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.from))return!1;o=n.from}else if(null==(o=(0,r.N0)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(o);i&&n.setSelection(s.nh.create(n.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},k=(e,t)=>{let n=e.selection,i;if(n instanceof s.nh){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.N0)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},w=(e,t)=>{let{$from:n,$to:i}=e.selection,s=n.blockRange(i),o=s&&(0,r.jP)(s);return null!=o&&(t&&t(e.tr.lift(s,o).scrollIntoView()),!0)},v=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function C(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let x=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=C(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,a.createAndFill());i.setSelection(s.LN.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},S=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof s.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=C(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(n,o.createAndFill());a.setSelection(s.U3.create(a.doc,n+1)),t(a.scrollIntoView())}return!0},A=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.jP)(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},E=function(){return(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof s.nh&&e.selection.node.isBlock)return!!n.parentOffset&&!!(0,r.zy)(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let o=[],a,l,h=!1,c=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){h=n.end(e)==n.pos+(n.depth-e),c=n.start(e)==n.pos-(n.depth-e),l=C(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));let t=void 0;o.unshift(t||(h&&l?{type:l}:null)),a=e;break}if(1==e)return!1;o.unshift(null)}let u=e.tr;(e.selection instanceof s.U3||e.selection instanceof s.i5)&&u.deleteSelection();let d=u.mapping.map(n.pos),p=(0,r.zy)(u.doc,d,o.length,o);if(p||(o[0]=l?{type:l}:null,p=(0,r.zy)(u.doc,d,o.length,o)),!p)return!1;if(u.split(d,o.length,o),!h&&c&&n.node(a).type!=l){let e=u.mapping.map(n.before(a)),t=u.doc.resolve(e);l&&n.node(a-1).canReplaceWith(t.index(),t.index()+1,l)&&u.setNodeMarkup(u.mapping.map(n.before(a)),l)}return t&&t(u.scrollIntoView()),!0}}(),M=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection(s.nh.create(e.doc,i))),!0)},T=(e,t)=>(t&&t(e.tr.setSelection(new s.i5(e.doc))),!0);function N(e,t,n){let i=t.nodeBefore,s=t.nodeAfter,o=t.index();return!!i&&!!s&&!!i.type.compatibleContent(s.type)&&(!i.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(o,o+1)&&!!(s.isTextblock||(0,r.n9)(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))}function I(e,t,n,o){let a=t.nodeBefore,l=t.nodeAfter,h,c,u=a.type.spec.isolating||l.type.spec.isolating;if(!u&&N(e,t,n))return!0;let p=!u&&t.parent.canReplace(t.index(),t.index()+1);if(p&&(h=(c=a.contentMatchAt(a.childCount)).findWrapping(l.type))&&c.matchType(h[0]||l.type).validEnd){if(n){let s=t.pos+l.nodeSize,o=i.FK.empty;for(let e=h.length-1;e>=0;e--)o=i.FK.from(h[e].create(null,o));o=i.FK.from(a.copy(o));let c=e.tr.step(new r.Wg(t.pos-1,s,t.pos,s,new i.Ji(o,1,0),h.length,!0)),u=c.doc.resolve(s+2*h.length);u.nodeAfter&&u.nodeAfter.type==a.type&&(0,r.n9)(c.doc,u.pos)&&c.join(u.pos),n(c.scrollIntoView())}return!0}let f=l.type.spec.isolating||o>0&&u?null:s.LN.findFrom(t,1),m=f&&f.$from.blockRange(f.$to),g=m&&(0,r.jP)(m);if(null!=g&&g>=t.depth)return n&&n(e.tr.lift(m,g).scrollIntoView()),!0;if(p&&d(l,"start",!0)&&d(a,"end")){let s=a,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let h=l,c=1;for(;!h.isTextblock;h=h.firstChild)c++;if(s.canReplace(s.childCount,s.childCount,h.content)){if(n){let s=i.FK.empty;for(let e=o.length-1;e>=0;e--)s=i.FK.from(o[e].copy(s));n(e.tr.step(new r.Wg(t.pos-o.length,t.pos+l.nodeSize,t.pos+c,t.pos+l.nodeSize-c,new i.Ji(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function D(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(s.U3.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let L=D(-1),R=D(1);function F(e,t=null){return function(n,i){let{$from:s,$to:o}=n.selection,a=s.blockRange(o),l=a&&(0,r.oM)(a,e,t);return!!l&&(i&&i(n.tr.wrap(a,l).scrollIntoView()),!0)}}function P(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(s),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,e,t)}r(i.scrollIntoView())}return!0}}function O(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let z=O(o,l,p),B=O(o,g,_),$={Enter:O(v,S,A,E),"Mod-Enter":x,Backspace:z,"Mod-Backspace":z,"Shift-Backspace":z,Delete:B,"Mod-Delete":B,"Mod-a":T},j={"Ctrl-h":$.Backspace,"Alt-Backspace":$["Mod-Backspace"],"Ctrl-d":$.Delete,"Ctrl-Alt-Backspace":$["Mod-Delete"],"Alt-Delete":$["Mod-Delete"],"Alt-d":$["Mod-Delete"],"Ctrl-a":L,"Ctrl-e":R};for(let e in $)j[e]=$[e];"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform()},97567:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],s=(0,r.A)("box",i)},99617:(e,t,n)=>{"use strict";var r=n(12115),i=n(8039);function s(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var o="function"==typeof Object.is?Object.is:s,a=i.useSyncExternalStore,l=r.useRef,h=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=l(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;var p=a(e,(s=c(function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,a=n)}var s,a,l=!1,h=void 0===n?null:n;return[function(){return e(t())},null===h?void 0:function(){return e(h())}]},[t,n,r,i]))[0],s[1]);return h(function(){d.hasValue=!0,d.value=p},[p]),u(p),p}}}]);
|