@synapse-research/synapse 0.2.1 → 0.2.3
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/bin/synapse.mjs +10 -0
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +199 -192
- package/dist/.next/app-path-routes-manifest.json +32 -31
- package/dist/.next/build-manifest.json +2 -2
- package/dist/.next/prerender-manifest.json +12 -12
- package/dist/.next/routes-manifest.json +8 -0
- package/dist/.next/server/app/(dashboard)/agents/page.js +2 -2
- package/dist/.next/server/app/(dashboard)/agents/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/compute/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/activity/page.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/dashboard/page.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/[documentUuid]/page.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/page.js +2 -2
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/[designUuid]/page.js +2 -2
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/[designUuid]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/[designUuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/new/page.js +3 -3
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/new/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/new/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-runs/[runUuid]/page.js +2 -2
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-runs/[runUuid]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-runs/[runUuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-runs/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/new/page.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/new/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/page.js +2 -8
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/insights/page.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/insights/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/related-works/page.js +2 -2
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/related-works/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/related-works/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/research-questions/[questionUuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/research-questions/page.js +2 -8
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/research-questions/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/research-questions/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/settings/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/new/page.js +2 -2
- package/dist/.next/server/app/(dashboard)/research-projects/new/page.js.nft.json +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/new/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/admin/companies/new.html +1 -1
- package/dist/.next/server/app/admin/companies/new.rsc +1 -1
- package/dist/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/admin/companies.html +1 -1
- package/dist/.next/server/app/admin/companies.rsc +1 -1
- package/dist/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/admin.html +1 -1
- package/dist/.next/server/app/admin.rsc +1 -1
- package/dist/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/admin/stats/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-nodes/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-nodes/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-pools/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-pools/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-designs/[uuid]/approve/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-designs/[uuid]/close/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-designs/[uuid]/reject/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-designs/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/dependencies/[dependsOnRunUuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/evaluate-criteria/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/registry/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/complete/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/progress/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/request-plan/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/reset/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/review/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/start/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/mcp/route.js +3 -3
- package/dist/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/onboarding/status/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/activity/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/agent-activity/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/available/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/available/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/baselines/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/documents/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/[designUuid]/validate/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/summary/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/summary/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-runs/dependencies/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-runs/dependencies/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-runs/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-runs/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiments/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiments/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/github/branches/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/group/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/[workUuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/auto-search/complete/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/auto-search/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/deep-research/complete/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/deep-research/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/research-questions/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/research-questions/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/route.js +1 -1
- package/dist/.next/server/app/api/research-projects/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/move/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/review/route.js +1 -0
- package/dist/.next/server/app/api/research-questions/[uuid]/review/route.js.nft.json +1 -0
- package/dist/.next/server/app/api/research-questions/[uuid]/review/route_client-reference-manifest.js +1 -0
- package/dist/.next/server/app/api/research-questions/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/settings/integrations/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/ssh-config/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/index.html +1 -1
- package/dist/.next/server/app/index.rsc +1 -1
- package/dist/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/login/admin.html +1 -1
- package/dist/.next/server/app/login/admin.rsc +1 -1
- package/dist/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/login/callback.html +1 -1
- package/dist/.next/server/app/login/callback.rsc +1 -1
- package/dist/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/login/silent-refresh.html +1 -1
- package/dist/.next/server/app/login/silent-refresh.rsc +1 -1
- package/dist/.next/server/app/login.html +1 -1
- package/dist/.next/server/app/login.rsc +1 -1
- package/dist/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/research-projects/new.html +1 -1
- package/dist/.next/server/app/research-projects/new.rsc +1 -1
- package/dist/.next/server/app/research-projects.html +1 -1
- package/dist/.next/server/app/research-projects.rsc +1 -1
- package/dist/.next/server/app/settings.html +1 -1
- package/dist/.next/server/app/settings.rsc +1 -1
- package/dist/.next/server/app-paths-manifest.json +32 -31
- package/dist/.next/server/chunks/1512.js +1 -1
- package/dist/.next/server/chunks/2653.js +1 -1
- package/dist/.next/server/chunks/691.js +1 -0
- package/dist/.next/server/chunks/7018.js +1 -0
- package/dist/.next/server/chunks/759.js +1 -1
- package/dist/.next/server/chunks/7878.js +1 -1
- package/dist/.next/server/chunks/8322.js +4 -4
- package/dist/.next/server/chunks/8481.js +2 -2
- package/dist/.next/server/chunks/8858.js +7 -0
- package/dist/.next/server/chunks/9993.js +1 -0
- package/dist/.next/server/middleware-manifest.json +1 -1
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/pages-manifest.json +1 -1
- package/dist/.next/server/server-reference-manifest.js +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/chunks/{1148-353990d9346d10d6.js → 7940-a2c0482f78fd6c5f.js} +2 -2
- package/dist/.next/static/chunks/8769-5d4452c6a3f6c876.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/agents/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/compute/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/activity/page-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/dashboard/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/documents/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiment-designs/[designUuid]/page-d6b2ed0ef745b114.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiment-designs/page-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiment-runs/[runUuid]/{page-f8e511d8f04a686a.js → page-17cd83ad0d3ff96c.js} +1 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiment-runs/page-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiments/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/insights/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/related-works/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/research-questions/[questionUuid]/page-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/research-questions/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/research-questions/page-95f56a6f1698bfeb.js +1 -0
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/settings/loading-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/admin/companies/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/admin/companies/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/admin/login/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/admin/session/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/admin/stats/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/agents/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/agents/[uuid]/sessions/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/agents/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/api-keys/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/api-keys/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/callback/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/check-default/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/default-login/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/identify/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/logout/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/me/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/refresh/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/session/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/auth/sync-token/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/comments/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/compute-nodes/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/compute-nodes/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/compute-pools/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/compute-pools/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/documents/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/events/notifications/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/events/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-designs/[uuid]/approve/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-designs/[uuid]/close/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-designs/[uuid]/reject/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-designs/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/claim/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/dependencies/[dependsOnRunUuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/dependencies/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/evaluate-criteria/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/registry/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/release/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/sessions/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/complete/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/progress/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/request-plan/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/reset/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/review/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/start/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/health/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/mcp/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/me/assignments/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/mentionables/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/notifications/[uuid]/archive/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/notifications/[uuid]/read/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/notifications/preferences/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/notifications/read-all/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/notifications/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/notifications/unread-count/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/onboarding/status/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/project-groups/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/project-groups/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/activity/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/agent-activity/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/available/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/baselines/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/documents/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-designs/[designUuid]/validate/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-designs/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-designs/summary/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-runs/dependencies/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-runs/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiments/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/github/branches/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/group/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/[workUuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/auto-search/complete/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/auto-search/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/deep-research/complete/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/deep-research/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/research-questions/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-projects/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/claim/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/move/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/release/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/review/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/sessions/[uuid]/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/settings/integrations/route-3378f6ebe832c47f.js +1 -0
- package/dist/.next/static/chunks/app/api/ssh-config/route-3378f6ebe832c47f.js +1 -0
- package/package.json +1 -1
- package/dist/.next/server/chunks/1397.js +0 -1
- package/dist/.next/server/chunks/5958.js +0 -1
- package/dist/.next/server/chunks/7678.js +0 -1
- package/dist/.next/server/chunks/8042.js +0 -1
- package/dist/.next/static/chunks/8825-4088b6b44db8f360.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/agents/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/compute/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/activity/page-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/dashboard/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/documents/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiment-designs/[designUuid]/page-68c412f9174907e4.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiment-designs/page-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiment-runs/page-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/experiments/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/insights/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/related-works/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/research-questions/[questionUuid]/page-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/research-questions/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/research-questions/page-47e84eca6b6a7aaa.js +0 -1
- package/dist/.next/static/chunks/app/(dashboard)/research-projects/[uuid]/settings/loading-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/admin/companies/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/admin/companies/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/admin/login/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/admin/session/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/admin/stats/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/agents/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/agents/[uuid]/sessions/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/agents/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/api-keys/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/api-keys/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/callback/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/check-default/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/default-login/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/identify/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/logout/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/me/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/refresh/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/session/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/auth/sync-token/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/comments/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/compute-nodes/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/compute-nodes/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/compute-pools/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/compute-pools/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/documents/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/events/notifications/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/events/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-designs/[uuid]/approve/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-designs/[uuid]/close/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-designs/[uuid]/reject/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-designs/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/claim/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/dependencies/[dependsOnRunUuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/dependencies/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/evaluate-criteria/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/registry/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/release/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiment-runs/[uuid]/sessions/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/complete/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/progress/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/request-plan/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/reset/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/review/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/experiments/[uuid]/start/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/health/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/mcp/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/me/assignments/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/mentionables/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/notifications/[uuid]/archive/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/notifications/[uuid]/read/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/notifications/preferences/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/notifications/read-all/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/notifications/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/notifications/unread-count/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/onboarding/status/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/project-groups/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/project-groups/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/activity/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/agent-activity/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/available/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/baselines/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/documents/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-designs/[designUuid]/validate/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-designs/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-designs/summary/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-runs/dependencies/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiment-runs/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/experiments/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/github/branches/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/group/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/[workUuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/auto-search/complete/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/auto-search/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/deep-research/complete/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/deep-research/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/related-works/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/research-questions/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-projects/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/claim/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/move/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/release/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/research-questions/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/sessions/[uuid]/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/settings/integrations/route-ba707ca9adc234af.js +0 -1
- package/dist/.next/static/chunks/app/api/ssh-config/route-ba707ca9adc234af.js +0 -1
- /package/dist/.next/static/{_Xj9BQgDF0XFubwsfL_6V → JSDpzmO29w6Ket-Y2K6Nw}/_buildManifest.js +0 -0
- /package/dist/.next/static/{_Xj9BQgDF0XFubwsfL_6V → JSDpzmO29w6Ket-Y2K6Nw}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1148],{143:(e,t,r)=>{var n;try{n=r(15910)}catch(e){}n||(n=window.graphlib),e.exports=n},713:(e,t,r)=>{var n=r(37155);e.exports=function(e){return n(e,5)}},801:(e,t,r)=>{var n=r(77220),i=r(30004),o=r(58587),s=r(90827);e.exports=i(function(e){return o(n(e,1,s,!0))})},855:(e,t,r)=>{var n=r(95589),i=r(53542);e.exports=function(e,t){return e&&n(t,i(t),e)}},898:(e,t,r)=>{var n=r(88055);e.exports=function(){this.__data__=new n,this.size=0}},1578:e=>{e.exports=function(e,t){return e<t}},1851:(e,t,r)=>{var n=r(11581),i=r(32724),o=r(143).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),r=new o({compound:!0,multigraph:!0}).setGraph({});return n.forEach(e.nodes(),function(t){r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)}),n.forEach(e.edges(),function(e){r.setEdge(e.v,e.w,{},e.name)}),n.forEach(t,function(e,t){r.setNode("layer"+t,{rank:"same"}),n.reduce(e,function(e,t){return r.setEdge(e,t,{style:"invis"}),t})}),r}}},1861:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},2253:(e,t,r)=>{var n=r(60682),i=r(39626),o=r(12721);e.exports=n&&1/o(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i},2379:(e,t,r)=>{var n=r(57031),i=r(20618),o=r(47869);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},2598:(e,t,r)=>{var n=r(39358);e.exports=function(e){return null==e?"":n(e)}},2627:(e,t,r)=>{var n=r(2379),i=r(6402),o=r(63120),s=r(91347),a=r(78815);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):n(e):a(e)}},3399:(e,t,r)=>{var n=r(41967),i=r(2627),o=r(7271),s=Math.max;e.exports=function(e,t,r){var a=null==e?0:e.length;if(!a)return -1;var l=null==r?0:o(r);return l<0&&(l=s(a+l,0)),n(e,i(t,3),l)}},3620:(e,t,r)=>{var n=r(11581);e.exports=function(e,t){return n.map(t,function(t){var r=e.inEdges(t);if(!r.length)return{v:t};var i=n.reduce(r,function(t,r){var n=e.edge(r),i=e.node(r.v);return{sum:t.sum+n.weight*i.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}})}},3721:(e,t,r)=>{var n=r(77078);e.exports=r(59793)(n)},3941:(e,t,r)=>{var n=r(84364),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},4006:(e,t,r)=>{var n=r(77651),i=r(96830),o=r(91347),s=r(86237),a=r(25238),l=r(24837);e.exports=function(e,t,r){t=n(t,e);for(var c=-1,u=t.length,d=!1;++c<u;){var h=l(t[c]);if(!(d=null!=e&&r(e,h)))break;e=e[h]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&a(u)&&s(h,u)&&(o(e)||i(e))}},4518:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},4850:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5654:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6164:(e,t,r)=>{e.exports=r(32771)(Object.keys,Object)},6402:(e,t,r)=>{var n=r(33546),i=r(36966),o=r(13913),s=r(36942),a=r(41118),l=r(47869),c=r(24837);e.exports=function(e,t){return s(e)&&a(t)?l(c(e),t):function(r){var s=i(r,e);return void 0===s&&s===t?o(r,e):n(t,s,3)}}},6534:(e,t,r)=>{var n=r(96348),i=r(12863),o=r(2627);e.exports=function(e,t){var r={};return t=o(t,3),i(e,function(e,i,o){n(r,i,t(e,i,o))}),r}},7145:(e,t,r)=>{var n=r(30727);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},7271:(e,t,r)=>{var n=r(28400);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},7696:(e,t,r)=>{var n=r(2627),i=r(44700),o=r(53542);e.exports=function(e){return function(t,r,s){var a=Object(t);if(!i(t)){var l=n(r,3);t=o(t),r=function(e){return l(a[e],e,a)}}var c=e(t,r,s);return c>-1?a[l?t[c]:c]:void 0}}},8586:(e,t,r)=>{var n=r(99083);e.exports=function(){return n.Date.now()}},8665:(e,t,r)=>{var n=r(29558);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},8896:(e,t,r)=>{var n=r(30004),i=r(69048),o=r(34370),s=r(95285),a=Object.prototype,l=a.hasOwnProperty;e.exports=n(function(e,t){e=Object(e);var r=-1,n=t.length,c=n>2?t[2]:void 0;for(c&&o(t[0],t[1],c)&&(n=1);++r<n;)for(var u=t[r],d=s(u),h=-1,p=d.length;++h<p;){var f=d[h],m=e[f];(void 0===m||i(m,a[f])&&!l.call(e,f))&&(e[f]=u[f])}return e})},9135:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},9281:(e,t,r)=>{e.exports=r(71633)()},10196:(e,t,r)=>{e.exports={graphlib:r(143),layout:r(66158),debug:r(1851),util:{time:r(32724).time,notime:r(32724).notime},version:r(12204)}},10283:(e,t,r)=>{e.exports=r(31184)()},10338:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},10548:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},11078:e=>{e.exports=function(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}},11254:(e,t,r)=>{var n=r(53237),i=r(5654);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},11581:(e,t,r)=>{var n;try{n={cloneDeep:r(713),constant:r(29974),defaults:r(8896),each:r(67007),filter:r(78968),find:r(41021),flatten:r(43372),forEach:r(14532),forIn:r(52542),has:r(29122),isUndefined:r(73838),last:r(4850),map:r(87956),mapValues:r(6534),max:r(94796),merge:r(65310),min:r(13729),minBy:r(32591),now:r(8586),pick:r(89287),range:r(10283),reduce:r(43900),sortBy:r(85655),uniqueId:r(77512),values:r(42180),zipObject:r(51094)}}catch(e){}n||(n=window._),e.exports=n},12151:(e,t,r)=>{var n=r(12863);e.exports=r(93255)(n)},12204:e=>{e.exports="0.8.5"},12721:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},12814:(e,t,r)=>{var n=r(86366),i=r(88046);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},12863:(e,t,r)=>{var n=r(9281),i=r(53542);e.exports=function(e,t){return e&&n(e,t,i)}},13570:(e,t,r)=>{var n=r(15178),i=r(72657),o=r(86319),s=o&&o.isSet;e.exports=s?i(s):n},13729:(e,t,r)=>{var n=r(68105),i=r(1578),o=r(63120);e.exports=function(e){return e&&e.length?n(e,o,i):void 0}},13913:(e,t,r)=>{var n=r(95521),i=r(4006);e.exports=function(e,t){return null!=e&&i(e,t,n)}},14507:(e,t,r)=>{"use strict";r.d(t,{$f:()=>T,G2:()=>v,I$:()=>S,Im:()=>I,Qv:()=>l,Sd:()=>y,Z1:()=>E,_G:()=>u,_e:()=>p,bh:()=>k,eB:()=>c,eT:()=>g,ec:()=>L,hy:()=>A,ic:()=>s,iz:()=>_,pC:()=>w,yY:()=>x,y_:()=>j});var n=r(28155),i=r(65282),o=r(32603);let s=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:r}=e.selection;return r&&(t?t.endOfTextblock("backward",e):!(r.parentOffset>0))?r:null}let l=(e,t,r)=>{let s=a(e,r);if(!s)return!1;let l=f(s);if(!l){let r=s.blockRange(),i=r&&(0,n.jP)(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)}let c=l.nodeBefore;if(N(e,l,t,-1))return!0;if(0==s.parent.content.size&&(h(c,"end")||o.nh.isSelectable(c)))for(let r=s.depth;;r--){let a=(0,n.$L)(e.doc,s.before(r),s.after(r),i.Ji.empty);if(a&&a.slice.size<a.to-a.from){if(t){let r=e.tr.step(a);r.setSelection(h(c,"end")?o.LN.findFrom(r.doc.resolve(r.mapping.map(l.pos,-1)),-1):o.nh.create(r.doc,l.pos-c.nodeSize)),t(r.scrollIntoView())}return!0}if(1==r||s.node(r-1).childCount>1)break}return!!c.isAtom&&l.depth==s.depth-1&&(t&&t(e.tr.delete(l.pos-c.nodeSize,l.pos).scrollIntoView()),!0)},c=(e,t,r)=>{let n=a(e,r);if(!n)return!1;let i=f(n);return!!i&&d(e,i,t)},u=(e,t,r)=>{let n=m(e,r);if(!n)return!1;let i=b(n);return!!i&&d(e,i,t)};function d(e,t,r){let s=t.nodeBefore,a=t.pos-1;for(;!s.isTextblock;a--){if(s.type.spec.isolating)return!1;let e=s.lastChild;if(!e)return!1;s=e}let l=t.nodeAfter,c=t.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let e=l.firstChild;if(!e)return!1;l=e}let u=(0,n.$L)(e.doc,a,c,i.Ji.empty);if(!u||u.from!=a||u instanceof n.Ln&&u.slice.size>=c-a)return!1;if(r){let t=e.tr.step(u);t.setSelection(o.U3.create(t.doc,a)),r(t.scrollIntoView())}return!0}function h(e,t,r=!1){for(let n=e;n;n="start"==t?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&1!=n.childCount)break}return!1}let p=(e,t,r)=>{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;s=f(n)}let a=s&&s.nodeBefore;return!!a&&!!o.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(o.nh.create(e.doc,s.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:r}=e.selection;return r&&(t?t.endOfTextblock("forward",e):!(r.parentOffset<r.parent.content.size))?r:null}let g=(e,t,r)=>{let s=m(e,r);if(!s)return!1;let a=b(s);if(!a)return!1;let l=a.nodeAfter;if(N(e,a,t,1))return!0;if(0==s.parent.content.size&&(h(l,"start")||o.nh.isSelectable(l))){let r=(0,n.$L)(e.doc,s.before(),s.after(),i.Ji.empty);if(r&&r.slice.size<r.to-r.from){if(t){let n=e.tr.step(r);n.setSelection(h(l,"start")?o.LN.findFrom(n.doc.resolve(n.mapping.map(a.pos)),1):o.nh.create(n.doc,n.mapping.map(a.pos))),t(n.scrollIntoView())}return!0}}return!!l.isAtom&&a.depth==s.depth-1&&(t&&t(e.tr.delete(a.pos,a.pos+l.nodeSize).scrollIntoView()),!0)},y=(e,t,r)=>{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)return!1;s=b(n)}let a=s&&s.nodeAfter;return!!a&&!!o.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(o.nh.create(e.doc,s.pos)).scrollIntoView()),!0)};function b(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let r=e.node(t);if(e.index(t)+1<r.childCount)return e.doc.resolve(e.after(t+1));if(r.type.spec.isolating)break}return null}let v=(e,t)=>{let r=e.selection,i=r instanceof o.nh,s;if(i){if(r.node.isTextblock||!(0,n.n9)(e.doc,r.from))return!1;s=r.from}else if(null==(s=(0,n.N0)(e.doc,r.from,-1)))return!1;if(t){let r=e.tr.join(s);i&&r.setSelection(o.nh.create(r.doc,s-e.doc.resolve(s).nodeBefore.nodeSize)),t(r.scrollIntoView())}return!0},k=(e,t)=>{let r=e.selection,i;if(r instanceof o.nh){if(r.node.isTextblock||!(0,n.n9)(e.doc,r.to))return!1;i=r.to}else if(null==(i=(0,n.N0)(e.doc,r.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},x=(e,t)=>{let{$from:r,$to:i}=e.selection,o=r.blockRange(i),s=o&&(0,n.jP)(o);return null!=s&&(t&&t(e.tr.lift(o,s).scrollIntoView()),!0)},w=(e,t)=>{let{$head:r,$anchor:n}=e.selection;return!!r.parent.type.spec.code&&!!r.sameParent(n)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function C(e){for(let t=0;t<e.edgeCount;t++){let{type:r}=e.edge(t);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}let S=(e,t)=>{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),s=r.indexAfter(-1),a=C(i.contentMatchAt(s));if(!a||!i.canReplaceWith(s,s,a))return!1;if(t){let n=r.after(),i=e.tr.replaceWith(n,n,a.createAndFill());i.setSelection(o.LN.near(i.doc.resolve(n),1)),t(i.scrollIntoView())}return!0},E=(e,t)=>{let r=e.selection,{$from:n,$to:i}=r;if(r instanceof o.i5||n.parent.inlineContent||i.parent.inlineContent)return!1;let s=C(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let r=(!n.parentOffset&&i.index()<i.parent.childCount?n:i).pos,a=e.tr.insert(r,s.createAndFill());a.setSelection(o.U3.create(a.doc,r+1)),t(a.scrollIntoView())}return!0},_=(e,t)=>{let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if((0,n.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=r.blockRange(),o=i&&(0,n.jP)(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},A=(e,t)=>{let{$from:r,to:n}=e.selection,i,s=r.sharedDepth(n);return 0!=s&&(i=r.before(s),t&&t(e.tr.setSelection(o.nh.create(e.doc,i))),!0)};function N(e,t,r,s){let a,l,c,u=t.nodeBefore,d=t.nodeAfter,p,f,m=u.type.spec.isolating||d.type.spec.isolating;if(!m&&(a=t.nodeBefore,l=t.nodeAfter,c=t.index(),a&&l&&a.type.compatibleContent(l.type)&&(!a.content.size&&t.parent.canReplace(c-1,c)?(r&&r(e.tr.delete(t.pos-a.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(c,c+1)&&!!(l.isTextblock||(0,n.n9)(e.doc,t.pos))&&(r&&r(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let g=!m&&t.parent.canReplace(t.index(),t.index()+1);if(g&&(p=(f=u.contentMatchAt(u.childCount)).findWrapping(d.type))&&f.matchType(p[0]||d.type).validEnd){if(r){let o=t.pos+d.nodeSize,s=i.FK.empty;for(let e=p.length-1;e>=0;e--)s=i.FK.from(p[e].create(null,s));s=i.FK.from(u.copy(s));let a=e.tr.step(new n.Wg(t.pos-1,o,t.pos,o,new i.Ji(s,1,0),p.length,!0)),l=a.doc.resolve(o+2*p.length);l.nodeAfter&&l.nodeAfter.type==u.type&&(0,n.n9)(a.doc,l.pos)&&a.join(l.pos),r(a.scrollIntoView())}return!0}let y=d.type.spec.isolating||s>0&&m?null:o.LN.findFrom(t,1),b=y&&y.$from.blockRange(y.$to),v=b&&(0,n.jP)(b);if(null!=v&&v>=t.depth)return r&&r(e.tr.lift(b,v).scrollIntoView()),!0;if(g&&h(d,"start",!0)&&h(u,"end")){let o=u,s=[];for(;s.push(o),!o.isTextblock;)o=o.lastChild;let a=d,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(o.canReplace(o.childCount,o.childCount,a.content)){if(r){let o=i.FK.empty;for(let e=s.length-1;e>=0;e--)o=i.FK.from(s[e].copy(o));r(e.tr.step(new n.Wg(t.pos-s.length,t.pos+d.nodeSize,t.pos+l,t.pos+d.nodeSize-l,new i.Ji(o,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function M(e){return function(t,r){let n=t.selection,i=e<0?n.$from:n.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return!!i.node(s).isTextblock&&(r&&r(t.tr.setSelection(o.U3.create(t.doc,e<0?i.start(s):i.end(s)))),!0)}}let T=M(-1),L=M(1);function I(e,t=null){return function(r,i){let{$from:o,$to:s}=r.selection,a=o.blockRange(s),l=a&&(0,n.oM)(a,e,t);return!!l&&(i&&i(r.tr.wrap(a,l).scrollIntoView()),!0)}}function j(e,t=null){return function(r,n){let i=!1;for(let n=0;n<r.selection.ranges.length&&!i;n++){let{$from:{pos:o},$to:{pos:s}}=r.selection.ranges[n];r.doc.nodesBetween(o,s,(n,o)=>{if(i)return!1;if(!(!n.isTextblock||n.hasMarkup(e,t)))if(n.type==e)i=!0;else{let t=r.doc.resolve(o),n=t.index();i=t.parent.canReplaceWith(n,n+1,e)}})}if(!i)return!1;if(n){let i=r.tr;for(let n=0;n<r.selection.ranges.length;n++){let{$from:{pos:o},$to:{pos:s}}=r.selection.ranges[n];i.setBlockType(o,s,e,t)}n(i.scrollIntoView())}return!0}}function R(...e){return function(t,r,n){for(let i=0;i<e.length;i++)if(e[i](t,r,n))return!0;return!1}}let O=R(s,l,p),P=R(s,g,y),$={Enter:R(w,E,_,(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof o.nh&&e.selection.node.isBlock)return!!r.parentOffset&&!!(0,n.zy)(e.doc,r.pos)&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],a,l,c=!1,u=!1;for(let e=r.depth;;e--){if(r.node(e).isBlock){let t;c=r.end(e)==r.pos+(r.depth-e),u=r.start(e)==r.pos-(r.depth-e),l=C(r.node(e-1).contentMatchAt(r.indexAfter(e-1)));s.unshift(t||(c&&l?{type:l}:null)),a=e;break}if(1==e)return!1;s.unshift(null)}let d=e.tr;(e.selection instanceof o.U3||e.selection instanceof o.i5)&&d.deleteSelection();let h=d.mapping.map(r.pos),p=(0,n.zy)(d.doc,h,s.length,s);if(p||(s[0]=l?{type:l}:null,p=(0,n.zy)(d.doc,h,s.length,s)),!p)return!1;if(d.split(h,s.length,s),!c&&u&&r.node(a).type!=l){let e=d.mapping.map(r.before(a)),t=d.doc.resolve(e);l&&r.node(a-1).canReplaceWith(t.index(),t.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(a)),l)}return t&&t(d.scrollIntoView()),!0}),"Mod-Enter":S,Backspace:O,"Mod-Backspace":O,"Shift-Backspace":O,Delete:P,"Mod-Delete":P,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new o.i5(e.doc))),!0)},z={"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":T,"Ctrl-e":L};for(let e in $)z[e]=$[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},14532:(e,t,r)=>{var n=r(75197),i=r(12151),o=r(20552),s=r(91347);e.exports=function(e,t){return(s(e)?n:i)(e,o(t))}},14786:(e,t,r)=>{var n=r(91339),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},15178:(e,t,r)=>{var n=r(20243),i=r(88046);e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},15447:(e,t,r)=>{var n=r(90868),i=r(90140),o=r(3941),s=r(80041),a=r(49641);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},15784:(e,t,r)=>{var n=r(41760);e.exports=function(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}},15910:(e,t,r)=>{var n=r(44934);e.exports={Graph:n.Graph,json:r(68584),alg:r(36639),version:n.version}},17021:(e,t,r)=>{var n=r(78591);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},17475:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},17730:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},17971:e=>{var t=Math.ceil,r=Math.max;e.exports=function(e,n,i,o){for(var s=-1,a=r(t((n-e)/(i||1)),0),l=Array(a);a--;)l[o?a:++s]=e,e+=i;return l}},18018:(e,t,r)=>{var n=r(53212);e.exports=function(e,t,r){for(var i=-1,o=e.criteria,s=t.criteria,a=o.length,l=r.length;++i<a;){var c=n(o[i],s[i]);if(c){if(i>=l)return c;return c*("desc"==r[i]?-1:1)}}return e.index-t.index}},18042:(e,t,r)=>{e.exports=r(11254)(r(99083),"DataView")},18063:e=>{var t="\ud800-\udfff",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\ud83c[\udffb-\udfff]",i="[^"+t+"]",o="(?:\ud83c[\udde6-\uddff]){2}",s="[\ud800-\udbff][\udc00-\udfff]",a="(?:"+r+"|"+n+")?",l="[\\ufe0e\\ufe0f]?",c="(?:\\u200d(?:"+[i,o,s].join("|")+")"+l+a+")*",u=RegExp(n+"(?="+n+")|"+("(?:"+[i+r+"?",r,o,s,"["+t+"]"].join("|"))+")"+(l+a+c),"g");e.exports=function(e){for(var t=u.lastIndex=0;u.test(e);)++t;return t}},18131:e=>{e.exports=function(e){return this.__data__.has(e)}},18518:(e,t,r)=>{"use strict";var n=r(11581);e.exports=function(e){var t={},r=n.filter(e.nodes(),function(t){return!e.children(t).length}),i=n.max(n.map(r,function(t){return e.node(t).rank})),o=n.map(n.range(i+1),function(){return[]}),s=n.sortBy(r,function(t){return e.node(t).rank});return n.forEach(s,function r(i){n.has(t,i)||(t[i]=!0,o[e.node(i).rank].push(i),n.forEach(e.successors(i),r))}),o}},19760:(e,t,r)=>{var n=r(69239),i=r(87702),o=r(88981),s=r(9135),a=r(54169),l=r(96830),c=r(91347),u=r(90827),d=r(61288),h=r(86114),p=r(41929),f=r(38949),m=r(52791),g=r(4518),y=r(35514);e.exports=function(e,t,r,b,v,k,x){var w=g(e,r),C=g(t,r),S=x.get(C);if(S)return void n(e,r,S);var E=k?k(w,C,r+"",e,t,x):void 0,_=void 0===E;if(_){var A=c(C),N=!A&&d(C),M=!A&&!N&&m(C);E=C,A||N||M?c(w)?E=w:u(w)?E=s(w):N?(_=!1,E=i(C,!0)):M?(_=!1,E=o(C,!0)):E=[]:f(C)||l(C)?(E=w,l(w)?E=y(w):(!p(w)||h(w))&&(E=a(C))):_=!1}_&&(x.set(C,E),v(E,C,b,k,x),x.delete(C)),n(e,r,E)}},19916:(e,t,r)=>{var n=r(88463);e.exports=function(e,t,r){n.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],s={};return n.each(t,function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);!function e(t,r,i,o,s,a){!n.has(o,r)&&(o[r]=!0,i||a.push(r),n.each(s(r),function(r){e(t,r,i,o,s,a)}),i&&a.push(r))}(e,t,"post"===r,s,i,o)}),o}},20243:(e,t,r)=>{var n=r(18042),i=r(81895),o=r(87664),s=r(60682),a=r(53443),l=r(86366),c=r(68591),u="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",m=c(n),g=c(i),y=c(o),b=c(s),v=c(a),k=l;(n&&k(new n(new ArrayBuffer(1)))!=f||i&&k(new i)!=u||o&&k(o.resolve())!=d||s&&k(new s)!=h||a&&k(new a)!=p)&&(k=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return f;case g:return u;case y:return d;case b:return h;case v:return p}return t}),e.exports=k},20423:(e,t,r)=>{var n=r(11581),i=r(143).Graph,o=r(40393);e.exports=function(e,t){if(1>=e.nodeCount())return[];var r,c,u,d,h,p,f,m=(r=e,c=t||s,u=new i,d=0,h=0,n.forEach(r.nodes(),function(e){u.setNode(e,{v:e,in:0,out:0})}),n.forEach(r.edges(),function(e){var t=u.edge(e.v,e.w)||0,r=c(e);u.setEdge(e.v,e.w,t+r),h=Math.max(h,u.node(e.v).out+=r),d=Math.max(d,u.node(e.w).in+=r)}),p=n.range(h+d+3).map(function(){return new o}),f=d+1,n.forEach(u.nodes(),function(e){l(p,f,u.node(e))}),{graph:u,buckets:p,zeroIdx:f}),g=function(e,t,r){for(var n,i=[],o=t[t.length-1],s=t[0];e.nodeCount();){for(;n=s.dequeue();)a(e,t,r,n);for(;n=o.dequeue();)a(e,t,r,n);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(n=t[l].dequeue()){i=i.concat(a(e,t,r,n,!0));break}}}return i}(m.graph,m.buckets,m.zeroIdx);return n.flatten(n.map(g,function(t){return e.outEdges(t.v,t.w)}),!0)};var s=n.constant(1);function a(e,t,r,i,o){var s=o?[]:void 0;return n.forEach(e.inEdges(i.v),function(n){var i=e.edge(n),a=e.node(n.v);o&&s.push({v:n.v,w:n.w}),a.out-=i,l(t,r,a)}),n.forEach(e.outEdges(i.v),function(n){var i=e.edge(n),o=n.w,s=e.node(o);s.in-=i,l(t,r,s)}),e.removeNode(i.v),s}function l(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}},20552:(e,t,r)=>{var n=r(63120);e.exports=function(e){return"function"==typeof e?e:n}},20618:(e,t,r)=>{var n=r(41118),i=r(53542);e.exports=function(e){for(var t=i(e),r=t.length;r--;){var o=t[r],s=e[o];t[r]=[o,s,n(s)]}return t}},21172:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},21275:(e,t,r)=>{var n=r(88055),i=r(81895),o=r(25895);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},21884:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},22168:(e,t,r)=>{var n=r(95589),i=r(95285);e.exports=function(e,t){return e&&n(t,i(t),e)}},22526:e=>{e.exports="2.1.8"},24420:(e,t,r)=>{var n=r(15447),i=r(88055),o=r(81895);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},24837:(e,t,r)=>{var n=r(12814),i=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},25238:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},25555:(e,t,r)=>{"use strict";var n=r(11581),i=r(18518),o=r(62401),s=r(38330),a=r(39438),l=r(92056),c=r(143).Graph,u=r(32724);function d(e,t,r){return n.map(t,function(t){return a(e,t,r)})}function h(e,t){n.forEach(t,function(t){n.forEach(t,function(t,r){e.node(t).order=r})})}e.exports=function(e){var t=u.maxRank(e),r=d(e,n.range(1,t+1),"inEdges"),a=d(e,n.range(t-1,-1,-1),"outEdges"),p=i(e);h(e,p);for(var f,m=1/0,g=0,y=0;y<4;++g,++y){(function(e,t){var r=new c;n.forEach(e,function(e){var i=e.graph().root,o=s(e,i,r,t);n.forEach(o.vs,function(t,r){e.node(t).order=r}),l(e,r,o.vs)})})(g%2?r:a,g%4>=2),p=u.buildLayerMatrix(e);var b=o(e,p);b<m&&(y=0,f=n.cloneDeep(p),m=b)}h(e,f)}},25706:(e,t,r)=>{var n=r(43372),i=r(38700),o=r(3721);e.exports=function(e){return o(i(e,void 0,n),e+"")}},25895:(e,t,r)=>{var n=r(24420),i=r(46764),o=r(66613),s=r(63129),a=r(34041);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},26183:(e,t,r)=>{var n=r(78414),i=r(20243),o=r(96830),s=r(91347),a=r(44700),l=r(61288),c=r(59919),u=r(52791),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!n(e).length;for(var r in e)if(d.call(e,r))return!1;return!0}},26959:(e,t,r)=>{var n=r(82517),i=r(13913);e.exports=function(e,t){return n(e,t,function(t,r){return i(e,r)})}},28155:(e,t,r)=>{"use strict";r.d(t,{$L:()=>M,Ln:()=>m,N0:()=>A,Um:()=>N,Wg:()=>g,X9:()=>s,Ys:()=>h,dL:()=>B,jP:()=>v,n9:()=>E,oM:()=>k,zy:()=>S});var n=r(65282);class i{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class o{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&o.empty)return o.empty}recover(e){let t=0,r=65535&e;if(!this.inverted)for(let e=0;e<r;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*r]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let n=0,o=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?n:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let o=c?e==l?-1:e==d?1:t:t,s=l+n+(o<0?0:u);if(r)return s;let h=e==(t<0?l:d)?null:a/3+(e-l)*65536,p=e==l?2:e==d?1:4;return(t<0?e!=l:e!=d)&&(p|=8),new i(s,p,h)}n+=u-c}return r?e+n:new i(e+n,0,null)}touches(e,t){let r=0,n=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?r:0);if(s>e)break;let a=this.ranges[t+i];if(e<=s+a&&t==3*n)return!0;r+=this.ranges[t+o]-a}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let n=0,i=0;n<this.ranges.length;n+=3){let o=this.ranges[n],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[n+t],c=this.ranges[n+r];e(s,s+l,a,a+c),i+=c-l}}invert(){return new o(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?o.empty:new o(e<0?[0,-e,0]:[0,0,e])}}o.empty=new o([]);class s{constructor(e,t,r=0,n=e?e.length:0){this.mirror=t,this.from=r,this.to=n,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new s(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,r=this._maps.length;t<e._maps.length;t++){let n=e.getMirror(t);this.appendMap(e._maps[t],null!=n&&n<t?r+n: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,r=this._maps.length+e._maps.length;t>=0;t--){let n=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=n&&n>t?r-n-1:void 0)}}invert(){let e=new s;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let n=0;for(let r=this.from;r<this.to;r++){let i=this._maps[r].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(r);if(null!=t&&t>r&&t<this.to){r=t,e=this._maps[t].recover(i.recover);continue}}n|=i.delInfo,e=i.pos}return r?e:new i(e,n,null)}}let a=Object.create(null);class l{getMap(){return o.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let r=a[t.stepType];if(!r)throw RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in a)throw RangeError("Duplicate use of step JSON ID "+e);return a[e]=t,t.prototype.jsonID=e,t}}class c{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new c(e,null)}static fail(e){return new c(null,e)}static fromReplace(e,t,r,i){try{return c.ok(e.replace(t,r,i))}catch(e){if(e instanceof n.vI)return c.fail(e.message);throw e}}}function u(e,t,r){let i=[];for(let n=0;n<e.childCount;n++){let o=e.child(n);o.content.size&&(o=o.copy(u(o.content,t,o))),o.isInline&&(o=t(o,r,n)),i.push(o)}return n.FK.fromArray(i)}class d extends l{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new n.Ji(u(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 c.fromReplace(e,this.from,this.to,o)}invert(){return new h(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new d(t.pos,r.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(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 d(t.from,t.to,e.markFromJSON(t.mark))}}l.jsonID("addMark",d);class h extends l{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new n.Ji(u(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return c.fromReplace(e,this.from,this.to,r)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new h(t.pos,r.pos,this.mark)}merge(e){return e instanceof h&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new h(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 h(t.from,t.to,e.markFromJSON(t.mark))}}l.jsonID("removeMark",h);class p extends l{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return c.fromReplace(e,this.pos,this.pos+1,new n.Ji(n.FK.from(r),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 r=0;r<t.marks.length;r++)if(!t.marks[r].isInSet(e))return new p(this.pos,t.marks[r]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new p(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 p(t.pos,e.markFromJSON(t.mark))}}l.jsonID("addNodeMark",p);class f extends l{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return c.fromReplace(e,this.pos,this.pos+1,new n.Ji(n.FK.from(r),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new p(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(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 f(t.pos,e.markFromJSON(t.mark))}}l.jsonID("removeNodeMark",f);class m extends l{constructor(e,t,r,n=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=n}apply(e){return this.structure&&y(e,this.from,this.to)?c.fail("Structure replace would overwrite content"):c.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new o([this.from,this.to-this.from,this.slice.size])}invert(e){return new m(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new m(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof m)||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?n.Ji.empty:new n.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new m(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?n.Ji.empty:new n.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new m(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 m(t.from,t.to,n.Ji.fromJSON(e,t.slice),!!t.structure)}}l.jsonID("replace",m);class g extends l{constructor(e,t,r,n,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=n,this.slice=i,this.insert=o,this.structure=s}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return c.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return c.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?c.fromReplace(e,this.from,this.to,r):c.fail("Content does not fit in gap")}getMap(){return new o([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 g(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),r=e.mapResult(this.to,-1),n=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||n<t.pos||i>r.pos?null:new g(t.pos,r.pos,n,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 g(t.from,t.to,t.gapFrom,t.gapTo,n.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,r){let n=e.resolve(t),i=r-t,o=n.depth;for(;i>0&&o>0&&n.indexAfter(o)==n.node(o).childCount;)o--,i--;if(i>0){let e=n.node(o).maybeChild(n.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function b(e,t,r,i=r.contentMatch,o=!0){let s=e.doc.nodeAt(t),a=[],l=t+1;for(let t=0;t<s.childCount;t++){let c=s.child(t),u=l+c.nodeSize,d=i.matchType(c.type);if(d){i=d;for(let t=0;t<c.marks.length;t++)r.allowsMarkType(c.marks[t].type)||e.step(new h(l,u,c.marks[t]));if(o&&c.isText&&"pre"!=r.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(c.text);)i||(i=new n.Ji(n.FK.from(r.schema.text(" ",r.allowedMarks(c.marks))),0,0)),a.push(new m(l+e.index,l+e.index+e[0].length,i))}}else a.push(new m(l,u,n.Ji.empty));l=u}if(!i.validEnd){let t=i.fillBefore(n.FK.empty,!0);e.replace(l,l,new n.Ji(t,0,0))}for(let t=a.length-1;t>=0;t--)e.step(a[t])}function v(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,n=0,i=0;;--r){let o=e.$from.node(r),s=e.$from.index(r)+n,a=e.$to.indexAfter(r)-i;if(r<e.depth&&o.canReplace(s,a,t))return r;if(0==r||o.type.spec.isolating||!((0==s||o.canReplace(s,o.childCount))&&(a==o.childCount||o.canReplace(0,a))))break;s&&(n=1),a<o.childCount&&(i=1)}return null}function k(e,t,r=null,n=e){let i=function(e,t){let{parent:r,startIndex:n,endIndex:i}=e,o=r.contentMatchAt(n).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return r.canReplaceWith(n,i,s)?o:null}(e,t),o=i&&function(e,t){let{parent:r,startIndex:n,endIndex:i}=e,o=r.child(n),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=n;a&&e<i;e++)a=a.matchType(r.child(e).type);return a&&a.validEnd?s:null}(n,t);return o?i.map(x).concat({type:t,attrs:r}).concat(o.map(x)):null}function x(e){return{type:e,attrs:null}}function w(e,t,r,n){t.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let i=e.mapping.slice(n).map(r+1+o+s.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function C(e,t,r,n){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(n).map(r+1+o);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function S(e,t,r=1,n){let i=e.resolve(t),o=i.depth-r,s=n&&n[n.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=r-2;e>o;e--,t--){let r=i.node(e),o=i.index(e);if(r.type.spec.isolating)return!1;let s=r.content.cutByIndex(o,r.childCount),a=n&&n[t+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=n&&n[t]||r;if(!r.canReplace(o+1,r.childCount)||!l.type.validContent(s))return!1}let a=i.indexAfter(o),l=n&&n[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function E(e,t){let r=e.resolve(t),n=r.index();return _(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function _(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let r=e.contentMatchAt(e.childCount),{linebreakReplacement:n}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==n?e.type.schema.nodes.text:o.type;if(!(r=r.matchType(s))||!e.type.allowsMarks(o.marks))return!1}return r.validEnd}(e,t))}function A(e,t,r=-1){let n=e.resolve(t);for(let e=n.depth;;e--){let i,o,s=n.index(e);if(e==n.depth?(i=n.nodeBefore,o=n.nodeAfter):r>0?(i=n.node(e+1),s++,o=n.node(e).maybeChild(s)):(i=n.node(e).maybeChild(s-1),o=n.node(e+1)),i&&!i.isTextblock&&_(i,o)&&n.node(e).canReplace(s,s+1))return t;if(0==e)break;t=r<0?n.before(e):n.after(e)}}function N(e,t,r){let n=e.resolve(t);if(!r.content.size)return t;let i=r.content;for(let e=0;e<r.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==r.openStart&&r.size?2:1);e++)for(let t=n.depth;t>=0;t--){let r=t==n.depth?0:n.pos<=(n.start(t+1)+n.end(t+1))/2?-1:1,o=n.index(t)+ +(r>0),s=n.node(t),a=!1;if(1==e)a=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=e&&s.canReplaceWith(o,o,e[0])}if(a)return 0==r?n.pos:r<0?n.before(t+1):n.after(t+1)}return null}function M(e,t,r=t,i=n.Ji.empty){if(t==r&&!i.size)return null;let o=e.resolve(t),s=e.resolve(r);return T(o,s,i)?new m(t,r,i):new L(o,s,i).fit()}function T(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}l.jsonID("replaceAround",g);class L{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=n.FK.empty;for(let t=0;t<=e.depth;t++){let r=e.node(t);this.frontier.push({type:r.type,match:r.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=n.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,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new n.Ji(o,s,a);return e>-1?new g(r.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||r.pos!=this.$to.pos?new m(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,n=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(n=0),i.type.spec.isolating&&n<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=1==t?e:this.unplaced.openStart;r>=0;r--){let e=null,i=(r?(e=R(this.unplaced.content,r-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:s,match:a}=this.frontier[o],l,c=null;if(1==t&&(i?a.matchType(i.type)||(c=a.fillBefore(n.FK.from(i),!1)):e&&s.compatibleContent(e.type)))return{sliceDepth:r,frontierDepth:o,parent:e,inject:c};if(2==t&&i&&(l=a.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:o,parent:e,wrap:l};if(e&&a.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=R(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new n.Ji(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=R(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new n.Ji(I(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new n.Ji(I(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,c=0,u=[],{match:d,type:h}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)u.push(i.child(e));d=d.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let e=a.child(c),t=d.matchType(e.type);if(!t)break;(++c>1||0==l||e.content.size)&&(d=t,u.push(function e(t,r,i){if(r<=0)return t;let o=t.content;return r>1&&(o=o.replaceChild(0,e(o.firstChild,r-1,1==o.childCount?i-1:0))),r>0&&(o=t.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(n.FK.empty,!0)))),t.copy(o)}(e.mark(h.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=j(this.placed,t,n.FK.from(u)),this.frontier[t].match=d,f&&p<0&&r&&r.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?n.Ji.empty:new n.Ji(I(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new n.Ji(I(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!O(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:r}=this.$to,n=this.$to.after(r);for(;r>1&&n==this.$to.end(--r);)++n;return n}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:n}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=O(e,t,n,r,i);if(o){for(let r=t-1;r>=0;r--){let{match:t,type:n}=this.frontier[r],i=O(e,r,n,t,!0);if(!i||i.childCount)continue e}return{depth:t,fit:o,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=j(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let t=e.node(r),n=t.type.contentMatch.fillBefore(t.content,!0,e.index(r));this.openFrontierNode(t.type,t.attrs,n)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=j(this.placed,this.depth,n.FK.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(n.FK.empty,!0);e.childCount&&(this.placed=j(this.placed,this.frontier.length,e))}}function I(e,t,r){return 0==t?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(I(e.firstChild.content,t-1,r)))}function j(e,t,r){return 0==t?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(j(e.lastChild.content,t-1,r)))}function R(e,t){for(let r=0;r<t;r++)e=e.firstChild.content;return e}function O(e,t,r,n,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!r.compatibleContent(o.type))return null;let a=n.fillBefore(o.content,!0,s);return a&&!function(e,t,r){for(let n=r;n<t.childCount;n++)if(!e.allowsMarks(t.child(n).marks))return!0;return!1}(r,o.content,s)?a:null}function P(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let i=n;i>=0;i--){let n=e.start(i);if(n<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;(n==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==n-1)&&r.push(i)}return r}class $ extends l{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at attribute step's position");let r=Object.create(null);for(let e in t.attrs)r[e]=t.attrs[e];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return c.fromReplace(e,this.pos,this.pos+1,new n.Ji(n.FK.from(i),0,+!t.isLeaf))}getMap(){return o.empty}invert(e){return new $(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 $(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 $(t.pos,t.attr,t.value)}}l.jsonID("attr",$);class z extends l{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return c.ok(r)}getMap(){return o.empty}invert(e){return new z(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 z(t.attr,t.value)}}l.jsonID("docAttr",z);let D=class extends Error{};(D=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r}).prototype=Object.create(Error.prototype),D.prototype.constructor=D,D.prototype.name="TransformError";class B{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new s}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new D(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 r=0;r<this.mapping.maps.length;r++){let n=this.mapping.maps[r];r&&(e=n.map(e,1),t=n.map(t,-1)),n.forEach((r,n,i,o)=>{e=Math.min(e,i),t=Math.max(t,o)})}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,r=n.Ji.empty){let i=M(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new n.Ji(n.FK.from(r),0,0))}delete(e,t){return this.replace(e,t,n.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return!function(e,t,r,i){if(!i.size)return e.deleteRange(t,r);let o=e.doc.resolve(t),s=e.doc.resolve(r);if(T(o,s,i))return e.step(new m(t,r,i));let a=P(o,s);0==a[a.length-1]&&a.pop();let l=-(o.depth+1);a.unshift(l);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let r=o.node(e).type.spec;if(r.defining||r.definingAsContext||r.isolating)break;a.indexOf(e)>-1?l=e:o.before(e)==t&&a.splice(1,0,-e)}let c=a.indexOf(l),u=[],d=i.openStart;for(let e=i.content,t=0;;t++){let r=e.firstChild;if(u.push(r),t==i.openStart)break;e=r.content}for(let e=d-1;e>=0;e--){var h;let t=u[e],r=(h=t.type).spec.defining||h.spec.definingForContent;if(r&&!t.sameMarkup(o.node(Math.abs(l)-1)))d=e;else if(r||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let l=(t+d+1)%(i.openStart+1),h=u[l];if(h)for(let t=0;t<a.length;t++){let u=a[(t+c)%a.length],d=!0;u<0&&(d=!1,u=-u);let p=o.node(u-1),f=o.index(u-1);if(p.canReplaceWith(f,f,h.type,h.marks))return e.replace(o.before(u),d?s.after(u):r,new n.Ji(function e(t,r,i,o,s){if(r<i){let n=t.firstChild;t=t.replaceChild(0,n.copy(e(n.content,r+1,i,o,n)))}if(r>o){let e=s.contentMatchAt(0),r=e.fillBefore(t).append(t);t=r.append(e.matchFragment(r).fillBefore(n.FK.empty,!0))}return t}(i.content,0,i.openStart,l),l,i.openEnd))}}let p=e.steps.length;for(let n=a.length-1;n>=0&&(e.replace(t,r,i),!(e.steps.length>p));n--){let e=a[n];e<0||(t=o.before(e),r=s.after(e))}}(this,e,t,r),this}replaceRangeWith(e,t,r){var i=e,o=t;if(!r.isInline&&i==o&&this.doc.resolve(i).parent.content.size){let e=function(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(0==n.parentOffset)for(let e=n.depth-1;e>=0;e--){let t=n.index(e);if(n.node(e).canReplaceWith(t,t,r))return n.before(e+1);if(t>0)return null}if(n.parentOffset==n.parent.content.size)for(let e=n.depth-1;e>=0;e--){let t=n.indexAfter(e);if(n.node(e).canReplaceWith(t,t,r))return n.after(e+1);if(t<n.node(e).childCount)break}return null}(this.doc,i,r.type);null!=e&&(i=o=e)}return this.replaceRange(i,o,new n.Ji(n.FK.from(r),0,0)),this}deleteRange(e,t){return!function(e,t,r){let n=e.doc.resolve(t),i=e.doc.resolve(r),o=P(n,i);for(let t=0;t<o.length;t++){let r=o[t],s=t==o.length-1;if(s&&0==r||n.node(r).type.contentMatch.validEnd)return e.delete(n.start(r),i.end(r));if(r>0&&(s||n.node(r-1).canReplace(n.index(r-1),i.indexAfter(r-1))))return e.delete(n.before(r),i.after(r))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(t-n.start(o)==n.depth-o&&r>n.end(o)&&i.end(o)-r!=i.depth-o&&n.start(o-1)==i.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),i.index(o-1)))return e.delete(n.before(o),r);e.delete(t,r)}(this,e,t),this}lift(e,t){return!function(e,t,r){let{$from:i,$to:o,depth:s}=t,a=i.before(s+1),l=o.after(s+1),c=a,u=l,d=n.FK.empty,h=0;for(let e=s,t=!1;e>r;e--)t||i.index(e)>0?(t=!0,d=n.FK.from(i.node(e).copy(d)),h++):c--;let p=n.FK.empty,f=0;for(let e=s,t=!1;e>r;e--)t||o.after(e+1)<o.end(e)?(t=!0,p=n.FK.from(o.node(e).copy(p)),f++):u++;e.step(new g(c,u,a,l,new n.Ji(d.append(p),h,f),d.size-h,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,r){let i=null,{linebreakReplacement:o}=e.doc.type.schema,s=e.doc.resolve(t-r),a=s.node().type;if(o&&a.inlineContent){let e="pre"==a.whitespace,t=!!a.contentMatch.matchType(o);e&&!t?i=!1:!e&&t&&(i=!0)}let l=e.steps.length;if(!1===i){let n=e.doc.resolve(t+r);C(e,n.node(),n.before(),l)}a.inlineContent&&b(e,t+r-1,a,s.node().contentMatchAt(s.index()),null==i);let c=e.mapping.slice(l),u=c.map(t-r);if(e.step(new m(u,c.map(t+r,-1),n.Ji.empty,!0)),!0===i){let t=e.doc.resolve(u);w(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,r){let i=n.FK.empty;for(let e=r.length-1;e>=0;e--){if(i.size){let t=r[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=n.FK.from(r[e].type.create(r[e].attrs,i))}let o=t.start,s=t.end;e.step(new g(o,s,o,s,new n.Ji(i,0,0),r.length,!0))}(this,e,t),this}setBlockType(e,t=e,r,i=null){var o=this;if(!r.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let s=o.steps.length;return o.doc.nodesBetween(e,t,(e,t)=>{var a,l,c;let u,d,h="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(r,h)&&(a=o.doc,l=o.mapping.slice(s).map(t),c=r,d=(u=a.resolve(l)).index(),u.parent.canReplaceWith(d,d+1,c))){let i=null;if(r.schema.linebreakReplacement){let e="pre"==r.whitespace,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&C(o,e,t,s),b(o,o.mapping.slice(s).map(t,1),r,void 0,null===i);let a=o.mapping.slice(s),l=a.map(t,1),c=a.map(t+e.nodeSize,1);return o.step(new g(l,c,l+1,c-1,new n.Ji(n.FK.from(r.create(h,null,e.marks)),0,0),1,!0)),!0===i&&w(o,e,t,s),!1}}),this}setNodeMarkup(e,t,r=null,i){return!function(e,t,r,i,o){let s=e.doc.nodeAt(t);if(!s)throw RangeError("No node at given position");r||(r=s.type);let a=r.create(i,null,o||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,a);if(!r.validContent(s.content))throw RangeError("Invalid content for node type "+r.name);e.step(new g(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new n.Ji(n.FK.from(a),0,0),1,!0))}(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new $(e,t,r)),this}setDocAttribute(e,t){return this.step(new z(e,t)),this}addNodeMark(e,t){return this.step(new p(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw RangeError("No node at position "+e);if(t instanceof n.CU)t.isInSet(r.marks)&&this.step(new f(e,t));else{let n=r.marks,i,o=[];for(;i=t.isInSet(n);)o.push(new f(e,i)),n=i.removeFromSet(n);for(let e=o.length-1;e>=0;e--)this.step(o[e])}return this}split(e,t=1,r){return!function(e,t,r=1,i){let o=e.doc.resolve(t),s=n.FK.empty,a=n.FK.empty;for(let e=o.depth,t=o.depth-r,l=r-1;e>t;e--,l--){s=n.FK.from(o.node(e).copy(s));let t=i&&i[l];a=n.FK.from(t?t.type.create(t.attrs,a):o.node(e).copy(a))}e.step(new m(t,t,new n.Ji(s.append(a),r,r),!0))}(this,e,t,r),this}addMark(e,t,r){var n;let i,o,s,a;return n=this,s=[],a=[],n.doc.nodesBetween(e,t,(n,l,c)=>{if(!n.isInline)return;let u=n.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),p=Math.min(l+n.nodeSize,t),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(i&&i.to==c&&i.mark.eq(u[e])?i.to=p:s.push(i=new h(c,p,u[e])));o&&o.to==c?o.to=p:a.push(o=new d(c,p,r))}}),s.forEach(e=>n.step(e)),a.forEach(e=>n.step(e)),this}removeMark(e,t,r){var i;let o,s;return i=this,o=[],s=0,i.doc.nodesBetween(e,t,(i,a)=>{if(!i.isInline)return;s++;let l=null;if(r instanceof n.sX){let e=i.marks,t;for(;t=r.isInSet(e);)(l||(l=[])).push(t),e=t.removeFromSet(e)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let r=Math.min(a+i.nodeSize,t);for(let t=0;t<l.length;t++){let n=l[t],i;for(let e=0;e<o.length;e++){let t=o[e];t.step==s-1&&n.eq(o[e].style)&&(i=t)}i?(i.to=r,i.step=s):o.push({style:n,from:Math.max(a,e),to:r,step:s})}}}),o.forEach(e=>i.step(new h(e.from,e.to,e.style))),this}clearIncompatible(e,t,r){return b(this,e,t,r),this}}},28400:(e,t,r)=>{var n=r(32558),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},28806:(e,t,r)=>{var n=r(86366),i=r(88046);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},29122:(e,t,r)=>{var n=r(43370),i=r(4006);e.exports=function(e,t){return null!=e&&i(e,t,n)}},29558:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},29974:e=>{e.exports=function(e){return function(){return e}}},30004:(e,t,r)=>{var n=r(63120),i=r(38700),o=r(3721);e.exports=function(e,t){return o(i(e,t,n),e+"")}},30044:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},30727:(e,t,r)=>{var n=r(69048);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return -1}},31184:(e,t,r)=>{var n=r(17971),i=r(34370),o=r(28400);e.exports=function(e){return function(t,r,s){return s&&"number"!=typeof s&&i(t,r,s)&&(r=s=void 0),t=o(t),void 0===r?(r=t,t=0):r=o(r),s=void 0===s?t<r?1:-1:o(s),n(t,r,s,e)}}},31310:(e,t,r)=>{var n=r(41929),i=Object.create;e.exports=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}()},31585:(e,t,r)=>{var n=r(11581),i=r(32724);function o(e,t,r,n,o,s){var a=o[t][s-1],l=i.addDummyNode(e,"border",{width:0,height:0,rank:s,borderType:t},r);o[t][s]=l,e.setParent(l,n),a&&e.setEdge(a,l,{weight:1})}e.exports=function(e){n.forEach(e.children(),function t(r){var i=e.children(r),s=e.node(r);if(i.length&&n.forEach(i,t),n.has(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(var a=s.minRank,l=s.maxRank+1;a<l;++a)o(e,"borderLeft","_bl",r,s,a),o(e,"borderRight","_br",r,s,a)}})}},31769:(e,t,r)=>{"use strict";var n=r(33499).longestPath,i=r(33405),o=r(78928);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:o(e);break;case"tight-tree":var t;n(t=e),i(t);break;case"longest-path":s(e)}};var s=n},32558:(e,t,r)=>{var n=r(36110),i=r(41929),o=r(12814),s=0/0,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):a.test(e)?s:+e}},32591:(e,t,r)=>{var n=r(68105),i=r(2627),o=r(1578);e.exports=function(e,t){return e&&e.length?n(e,i(t,2),o):void 0}},32603:(e,t,r)=>{"use strict";r.d(t,{$t:()=>C,LN:()=>s,U3:()=>u,hs:()=>A,i5:()=>f,k_:()=>S,nh:()=>h});var n=r(65282),i=r(28155);let o=Object.create(null);class s{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[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=n.Ji.empty){let r=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=e.mapping.slice(o);e.replaceRange(u.map(l.pos),u.map(c.pos),a?n.Ji.empty:t),0==a&&y(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,n=this.ranges;for(let i=0;i<n.length;i++){let{$from:o,$to:s}=n[i],a=e.mapping.slice(r),l=a.map(o.pos),c=a.map(s.pos);i?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),y(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let n=e.parent.inlineContent?new u(e):g(e.node(0),e.parent,e.pos,e.index(),t,r);if(n)return n;for(let n=e.depth-1;n>=0;n--){let i=t<0?g(e.node(0),e.node(n),e.before(n+1),e.index(n),t,r):g(e.node(0),e.node(n),e.after(n+1),e.index(n)+1,t,r);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 r=o[t.type];if(!r)throw RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends s{constructor(e,t=e){c(e),c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return s.near(r);let n=e.resolve(t.map(this.anchor));return new u(n.parent.inlineContent?n:r,r)}replace(e,t=n.Ji.empty){if(super.replace(e,t),t==n.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof u&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new d(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 u(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let n=e.resolve(t);return new this(n,r==t?n:e.resolve(r))}static between(e,t,r){let n=e.pos-t.pos;if((!r||n)&&(r=n>=0?1:-1),!t.parent.inlineContent){let e=s.findFrom(t,r,!0)||s.findFrom(t,-r,!0);if(!e)return s.near(t,r);t=e.$head}return e.parent.inlineContent||(0==n?e=t:(e=(s.findFrom(e,-r,!0)||s.findFrom(e,r,!0)).$anchor).pos<t.pos!=n<0&&(e=t)),new u(e,t)}}s.jsonID("text",u);class d{constructor(e,t){this.anchor=e,this.head=t}map(e){return new d(e.map(this.anchor),e.map(this.head))}resolve(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))}}class h extends s{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:r,pos:n}=t.mapResult(this.anchor),i=e.resolve(n);return r?s.near(i):new h(i)}content(){return new n.Ji(n.FK.from(this.node),0,0)}eq(e){return e instanceof h&&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 h(e.resolve(t.anchor))}static create(e,t){return new h(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}h.prototype.visible=!1,s.jsonID("node",h);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new d(r,r):new p(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&h.isSelectable(r)?new h(t):s.near(t)}}class f extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=n.Ji.empty){if(t==n.Ji.empty){e.delete(0,e.doc.content.size);let t=s.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}}s.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,r,n,i,o=!1){if(t.inlineContent)return u.create(e,r);for(let s=n-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let n=t.child(s);if(n.isAtom){if(!o&&h.isSelectable(n))return h.create(e,r-(i<0?n.nodeSize:0))}else{let t=g(e,n,r+i,i<0?n.childCount:0,i,o);if(t)return t}r+=n.nodeSize*i}return null}function y(e,t,r){let n,o=e.steps.length-1;if(o<t)return;let a=e.steps[o];(a instanceof i.Ln||a instanceof i.Wg)&&(e.mapping.maps[o].forEach((e,t,r,i)=>{null==n&&(n=i)}),e.setSelection(s.near(e.doc.resolve(n),r)))}class b 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=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return n.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(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||n.CU.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let n=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(n.text(e),!0):this.deleteSelection();{if(null==r&&(r=t),!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=r==t?e.marks():e.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,n.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(s.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|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function v(e,t){return t&&e?e.bind(t):e}class k{constructor(e,t,r){this.name=e,this.init=v(t.init,r),this.apply=v(t.apply,r)}}let x=[new k("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new k("selection",{init:(e,t)=>e.selection||s.atStart(t.doc),apply:e=>e.selection}),new k("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,r,n)=>n.selection.$cursor?e.storedMarks:null}),new k("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class w{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 k(e.key,e.spec.state,e))})}}class C{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 r=0;r<this.config.plugins.length;r++)if(r!=t){let t=this.config.plugins[r];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],r=this.applyInner(e),n=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let a=n?n[o].n:0,l=n?n[o].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,r);if(c&&r.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!n){n=[];for(let e=0;e<this.config.plugins.length;e++)n.push(e<o?{state:r,n:t.length}:{state:this,n:0})}t.push(c),r=r.applyInner(c),i=!0}n&&(n[o]={state:r,n:t.length})}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new C(this.config),r=this.config.fields;for(let n=0;n<r.length;n++){let i=r[n];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new b(this)}static create(e){let t=new w(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new C(t);for(let n=0;n<t.fields.length;n++)r[t.fields[n].name]=t.fields[n].init(e,r);return r}reconfigure(e){let t=new w(this.schema,e.plugins),r=t.fields,n=new C(t);for(let t=0;t<r.length;t++){let i=r[t].name;n[i]=this.hasOwnProperty(i)?this[i]:r[t].init(e,n)}return n}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 r in e){if("doc"==r||"selection"==r)throw RangeError("The JSON fields `doc` and `selection` are reserved");let n=e[r],i=n.spec.state;i&&i.toJSON&&(t[r]=i.toJSON.call(n,this[n.key]))}return t}static fromJSON(e,t,r){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new w(e.schema,e.plugins),o=new C(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=n.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let n in r){let s=r[n],a=s.spec.state;if(s.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,n)){o[i.name]=a.fromJSON.call(s,e,t[n],o);return}}o[i.name]=i.init(e,o)}}),o}}class S{constructor(e){this.spec=e,this.props={},e.props&&function e(t,r,n){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(r):"handleDOMEvents"==i&&(o=e(o,r,{})),n[i]=o}return n}(e.props,this,this.props),this.key=e.key?e.key.key:_("plugin")}getState(e){return e[this.key]}}let E=Object.create(null);function _(e){return e in E?e+"$"+ ++E[e]:(E[e]=0,e+"$")}class A{constructor(e="key"){this.key=_(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},32724:(e,t,r)=>{"use strict";var n=r(11581),i=r(143).Graph;function o(e,t,r,i){var o;do o=n.uniqueId(i);while(e.hasNode(o));return r.dummy=t,e.setNode(o,r),o}function s(e){return n.max(n.map(e.nodes(),function(t){var r=e.node(t).rank;if(!n.isUndefined(r))return r}))}e.exports={addDummyNode:o,simplify:function(e){var t=new i().setGraph(e.graph());return n.forEach(e.nodes(),function(r){t.setNode(r,e.node(r))}),n.forEach(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t},asNonCompoundGraph:function(e){var t=new i({multigraph:e.isMultigraph()}).setGraph(e.graph());return n.forEach(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),n.forEach(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t},successorWeights:function(e){var t=n.map(e.nodes(),function(t){var r={};return n.forEach(e.outEdges(t),function(t){r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return n.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=n.map(e.nodes(),function(t){var r={};return n.forEach(e.inEdges(t),function(t){r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return n.zipObject(e.nodes(),t)},intersectRect:function(e,t){var r,n,i=e.x,o=e.y,s=t.x-i,a=t.y-o,l=e.width/2,c=e.height/2;if(!s&&!a)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*l>Math.abs(s)*c?(a<0&&(c=-c),r=c*s/a,n=c):(s<0&&(l=-l),r=l,n=l*a/s),{x:i+r,y:o+n}},buildLayerMatrix:function(e){var t=n.map(n.range(s(e)+1),function(){return[]});return n.forEach(e.nodes(),function(r){var i=e.node(r),o=i.rank;n.isUndefined(o)||(t[o][i.order]=r)}),t},normalizeRanks:function(e){var t=n.min(n.map(e.nodes(),function(t){return e.node(t).rank}));n.forEach(e.nodes(),function(r){var i=e.node(r);n.has(i,"rank")&&(i.rank-=t)})},removeEmptyRanks:function(e){var t=n.min(n.map(e.nodes(),function(t){return e.node(t).rank})),r=[];n.forEach(e.nodes(),function(n){var i=e.node(n).rank-t;r[i]||(r[i]=[]),r[i].push(n)});var i=0,o=e.graph().nodeRankFactor;n.forEach(r,function(t,r){n.isUndefined(t)&&r%o!=0?--i:i&&n.forEach(t,function(t){e.node(t).rank+=i})})},addBorderNode:function(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),o(e,"border",i,t)},maxRank:s,partition:function(e,t){var r={lhs:[],rhs:[]};return n.forEach(e,function(e){t(e)?r.lhs.push(e):r.rhs.push(e)}),r},time:function(e,t){var r=n.now();try{return t()}finally{console.log(e+" time: "+(n.now()-r)+"ms")}},notime:function(e,t){return t()}}},32771:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},33382:(e,t,r)=>{var n=r(10338),i=r(80791),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;e.exports=s?function(e){return null==e?[]:n(s(e=Object(e)),function(t){return o.call(e,t)})}:i},33405:(e,t,r)=>{"use strict";var n=r(11581),i=r(143).Graph,o=r(33499).slack;e.exports=function(e){var t,r,s,a,l=new i({directed:!1}),c=e.nodes()[0],u=e.nodeCount();for(l.setNode(c,{});t=l,r=e,n.forEach(t.nodes(),function e(i){n.forEach(r.nodeEdges(i),function(n){var s=n.v,a=i===s?n.w:s;t.hasNode(a)||o(r,n)||(t.setNode(a,{}),t.setEdge(i,a,{}),e(a))})}),t.nodeCount()<u;)s=function(e,t){return n.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return o(t,r)})}(l,e),a=l.hasNode(s.v)?o(e,s):-o(e,s),function(e,t,r){n.forEach(e.nodes(),function(e){t.node(e).rank+=r})}(l,e,a);return l}},33445:(e,t,r)=>{var n=r(88463);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(e){return e.key})},i.prototype.has=function(e){return n.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!n.has(r,e)){var i=this._arr,o=i.length;return r[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)},i.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))},i.prototype._decrease=function(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t},i.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t}},33499:(e,t,r)=>{"use strict";var n=r(11581);e.exports={longestPath:function(e){var t={};n.forEach(e.sources(),function r(i){var o=e.node(i);if(n.has(t,i))return o.rank;t[i]=!0;var s=n.min(n.map(e.outEdges(i),function(t){return r(t.w)-e.edge(t).minlen}));return(s===1/0||null==s)&&(s=0),o.rank=s})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},33546:(e,t,r)=>{var n=r(85068),i=r(88046);e.exports=function e(t,r,o,s,a){return t===r||(null!=t&&null!=r&&(i(t)||i(r))?n(t,r,o,s,e,a):t!=t&&r!=r)}},33857:e=>{e.exports=function(){return!1}},34017:(e,t,r)=>{var n=r(35031),i=r(88463);e.exports=function(e,t,r){return i.transform(e.nodes(),function(i,o){i[o]=n(e,o,t,r)},{})}},34041:(e,t,r)=>{var n=r(8665);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=+(r.size!=i),this}},34370:(e,t,r)=>{var n=r(69048),i=r(44700),o=r(86237),s=r(41929);e.exports=function(e,t,r){if(!s(r))return!1;var a=typeof t;return("number"==a?!!(i(r)&&o(t,r.length)):"string"==a&&t in r)&&n(r[t],e)}},35031:(e,t,r)=>{var n=r(88463),i=r(33445);e.exports=function(e,t,r,n){return function(e,t,r,n){var o,s,a={},l=new i,c=function(e){var t=e.v!==o?e.v:e.w,n=a[t],i=r(e),c=s.distance+i;if(i<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);c<n.distance&&(n.distance=c,n.predecessor=o,l.decrease(t,c))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;a[e]={distance:r},l.add(e,r)});l.size()>0&&(s=a[o=l.removeMin()]).distance!==1/0;)n(o).forEach(c);return a}(e,String(t),r||o,n||function(t){return e.outEdges(t)})};var o=n.constant(1)},35514:(e,t,r)=>{var n=r(95589),i=r(95285);e.exports=function(e){return n(e,i(e))}},36110:(e,t,r)=>{var n=r(54444),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},36639:(e,t,r)=>{e.exports={components:r(74249),dijkstra:r(35031),dijkstraAll:r(34017),findCycles:r(93718),floydWarshall:r(38264),isAcyclic:r(15784),postorder:r(77185),preorder:r(74166),prim:r(41521),tarjan:r(85950),topsort:r(41760)}},36942:(e,t,r)=>{var n=r(91347),i=r(12814),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},36966:(e,t,r)=>{var n=r(67070);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},37021:(e,t,r)=>{"use strict";r.d(t,{jH:()=>n.C});var n=r(97001)},37155:(e,t,r)=>{var n=r(65273),i=r(75197),o=r(72043),s=r(855),a=r(22168),l=r(87702),c=r(9135),u=r(57847),d=r(45176),h=r(43188),p=r(77599),f=r(20243),m=r(40739),g=r(72821),y=r(54169),b=r(91347),v=r(61288),k=r(64908),x=r(41929),w=r(13570),C=r(53542),S=r(95285),E="[object Arguments]",_="[object Function]",A="[object Object]",N={};N[E]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[A]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[_]=N["[object WeakMap]"]=!1,e.exports=function e(t,r,M,T,L,I){var j,R=1&r,O=2&r,P=4&r;if(M&&(j=L?M(t,T,L,I):M(t)),void 0!==j)return j;if(!x(t))return t;var $=b(t);if($){if(j=m(t),!R)return c(t,j)}else{var z=f(t),D=z==_||"[object GeneratorFunction]"==z;if(v(t))return l(t,R);if(z==A||z==E||D&&!L){if(j=O||D?{}:y(t),!R)return O?d(t,a(j,t)):u(t,s(j,t))}else{if(!N[z])return L?t:{};j=g(t,z,R)}}I||(I=new n);var B=I.get(t);if(B)return B;I.set(t,j),w(t)?t.forEach(function(n){j.add(e(n,r,M,n,t,I))}):k(t)&&t.forEach(function(n,i){j.set(i,e(n,r,M,i,t,I))});var F=P?O?p:h:O?S:C,H=$?void 0:F(t);return i(H||t,function(n,i){H&&(n=t[i=n]),o(j,i,e(n,r,M,i,t,I))}),j}},37291:(e,t,r)=>{var n=r(43113),i=r(21884),o=r(38605);e.exports=function(e,t,r,s,a,l){var c=1&r,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var y=e[f],b=t[f];if(s)var v=c?s(b,y,f,t,e,l):s(y,b,f,e,t,l);if(void 0!==v){if(v)continue;m=!1;break}if(g){if(!i(t,function(e,t){if(!o(g,t)&&(y===e||a(y,e,r,s,l)))return g.push(t)})){m=!1;break}}else if(!(y===b||a(y,b,r,s,l))){m=!1;break}}return l.delete(e),l.delete(t),m}},38264:(e,t,r)=>{var n=r(88463);e.exports=function(e,t,r){var n,o,s,a,l;return n=e,o=t||i,s=r||function(t){return e.outEdges(t)},a={},(l=n.nodes()).forEach(function(e){a[e]={},a[e][e]={distance:0},l.forEach(function(t){e!==t&&(a[e][t]={distance:1/0})}),s(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=o(t);a[e][r]={distance:n,predecessor:e}})}),l.forEach(function(e){var t=a[e];l.forEach(function(r){var n=a[r];l.forEach(function(r){var i=n[e],o=t[r],s=n[r],a=i.distance+o.distance;a<s.distance&&(s.distance=a,s.predecessor=o.predecessor)})})}),a};var i=n.constant(1)},38330:(e,t,r)=>{var n=r(11581),i=r(3620),o=r(71097),s=r(40369);e.exports=function e(t,r,a,l){var c,u,d=t.children(r),h=t.node(r),p=h?h.borderLeft:void 0,f=h?h.borderRight:void 0,m={};p&&(d=n.filter(d,function(e){return e!==p&&e!==f}));var g=i(t,d);n.forEach(g,function(r){if(t.children(r.v).length){var i,o,s=e(t,r.v,a,l);m[r.v]=s,n.has(s,"barycenter")&&(i=r,o=s,n.isUndefined(i.barycenter)?(i.barycenter=o.barycenter,i.weight=o.weight):(i.barycenter=(i.barycenter*i.weight+o.barycenter*o.weight)/(i.weight+o.weight),i.weight+=o.weight))}});var y=o(g,a);c=y,u=m,n.forEach(c,function(e){e.vs=n.flatten(e.vs.map(function(e){return u[e]?u[e].vs:e}),!0)});var b=s(y,l);if(p&&(b.vs=n.flatten([p,b.vs,f],!0),t.predecessors(p).length)){var v=t.node(t.predecessors(p)[0]),k=t.node(t.predecessors(f)[0]);n.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+v.order+k.order)/(b.weight+2),b.weight+=2}return b}},38605:e=>{e.exports=function(e,t){return e.has(t)}},38700:(e,t,r)=>{var n=r(82685),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=r(l),n(e,this,c)}}},38949:(e,t,r)=>{var n=r(86366),i=r(74205),o=r(88046),s=Object.prototype,a=Function.prototype.toString,l=s.hasOwnProperty,c=a.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==c}},38974:(e,t,r)=>{var n=r(25895);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},39281:(e,t,r)=>{"use strict";let n,i;r.d(t,{a:()=>nY});let o=[{id:"abap",name:"ABAP",import:()=>r.e(3889).then(r.bind(r,3889))},{id:"actionscript-3",name:"ActionScript",import:()=>r.e(8136).then(r.bind(r,18136))},{id:"ada",name:"Ada",import:()=>r.e(3155).then(r.bind(r,73155))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(5587)]).then(r.bind(r,5587))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([r.e(5568),r.e(8868),r.e(5962),r.e(7704),r.e(5347),r.e(9034)]).then(r.bind(r,41875))},{id:"apache",name:"Apache Conf",import:()=>r.e(5153).then(r.bind(r,75153))},{id:"apex",name:"Apex",import:()=>r.e(1459).then(r.bind(r,21459))},{id:"apl",name:"APL",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(794)]).then(r.bind(r,50794))},{id:"applescript",name:"AppleScript",import:()=>r.e(3350).then(r.bind(r,73350))},{id:"ara",name:"Ara",import:()=>r.e(2453).then(r.bind(r,12453))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>r.e(9626).then(r.bind(r,99626))},{id:"asm",name:"Assembly",import:()=>r.e(546).then(r.bind(r,10546))},{id:"astro",name:"Astro",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(5962),r.e(8386)]).then(r.bind(r,78386))},{id:"awk",name:"AWK",import:()=>r.e(6672).then(r.bind(r,46672))},{id:"ballerina",name:"Ballerina",import:()=>r.e(2399).then(r.bind(r,22399))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>r.e(2166).then(r.bind(r,42166))},{id:"beancount",name:"Beancount",import:()=>r.e(4260).then(r.bind(r,94260))},{id:"berry",name:"Berry",aliases:["be"],import:()=>r.e(8399).then(r.bind(r,98399))},{id:"bibtex",name:"BibTeX",import:()=>r.e(5869).then(r.bind(r,25869))},{id:"bicep",name:"Bicep",import:()=>r.e(5170).then(r.bind(r,85170))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>r.e(4974).then(r.bind(r,24974))},{id:"blade",name:"Blade",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(2793)]).then(r.bind(r,92793))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>r.e(6908).then(r.bind(r,6908))},{id:"c",name:"C",import:()=>r.e(8004).then(r.bind(r,18004))},{id:"c3",name:"C3",import:()=>r.e(2325).then(r.bind(r,72325))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>r.e(2582).then(r.bind(r,2582))},{id:"cairo",name:"Cairo",import:()=>Promise.all([r.e(9198),r.e(9899)]).then(r.bind(r,49899))},{id:"clarity",name:"Clarity",import:()=>r.e(9379).then(r.bind(r,29379))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>r.e(915).then(r.bind(r,60915))},{id:"cmake",name:"CMake",import:()=>r.e(7342).then(r.bind(r,57342))},{id:"cobol",name:"COBOL",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(5270)]).then(r.bind(r,75270))},{id:"codeowners",name:"CODEOWNERS",import:()=>r.e(3976).then(r.bind(r,53976))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>r.e(5391).then(r.bind(r,75391))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([r.e(5568),r.e(9803)]).then(r.bind(r,69803))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>r.e(7319).then(r.bind(r,67319))},{id:"coq",name:"Coq",import:()=>r.e(6252).then(r.bind(r,66252))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([r.e(169),r.e(841),r.e(691),r.e(8004),r.e(654)]).then(r.bind(r,96668))},{id:"crystal",name:"Crystal",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(691),r.e(8004),r.e(3188),r.e(6313)]).then(r.bind(r,76313))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>r.e(2614).then(r.bind(r,22614))},{id:"css",name:"CSS",import:()=>r.e(5962).then(r.bind(r,25962))},{id:"csv",name:"CSV",import:()=>r.e(8231).then(r.bind(r,18231))},{id:"cue",name:"CUE",import:()=>r.e(318).then(r.bind(r,20318))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>r.e(2898).then(r.bind(r,32898))},{id:"d",name:"D",import:()=>r.e(579).then(r.bind(r,20579))},{id:"dart",name:"Dart",import:()=>r.e(4772).then(r.bind(r,54772))},{id:"dax",name:"DAX",import:()=>r.e(4248).then(r.bind(r,44248))},{id:"desktop",name:"Desktop",import:()=>r.e(783).then(r.bind(r,60783))},{id:"diff",name:"Diff",import:()=>r.e(8170).then(r.bind(r,88170))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>r.e(2483).then(r.bind(r,52483))},{id:"dotenv",name:"dotEnv",import:()=>r.e(569).then(r.bind(r,60569))},{id:"dream-maker",name:"Dream Maker",import:()=>r.e(9325).then(r.bind(r,39325))},{id:"edge",name:"Edge",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(128)]).then(r.bind(r,50128))},{id:"elixir",name:"Elixir",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(8710)]).then(r.bind(r,98710))},{id:"elm",name:"Elm",import:()=>Promise.all([r.e(8004),r.e(3075)]).then(r.bind(r,43075))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>r.e(7072).then(r.bind(r,68657))},{id:"erb",name:"ERB",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(6266),r.e(4202)]).then(r.bind(r,4202))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([r.e(4572),r.e(1186)]).then(r.bind(r,61186))},{id:"fennel",name:"Fennel",import:()=>r.e(2336).then(r.bind(r,69955))},{id:"fish",name:"Fish",import:()=>r.e(689).then(r.bind(r,689))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>r.e(6385).then(r.bind(r,6385))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([r.e(4939),r.e(3793)]).then(r.bind(r,63793))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>r.e(4939).then(r.bind(r,44939))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([r.e(4572),r.e(8121)]).then(r.bind(r,38121))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>r.e(6010).then(r.bind(r,6010))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>r.e(7203).then(r.bind(r,47203))},{id:"gdshader",name:"GDShader",import:()=>r.e(5605).then(r.bind(r,15605))},{id:"genie",name:"Genie",import:()=>r.e(1075).then(r.bind(r,31075))},{id:"gherkin",name:"Gherkin",import:()=>r.e(3461).then(r.bind(r,93461))},{id:"git-commit",name:"Git Commit Message",import:()=>r.e(1757).then(r.bind(r,71757))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([r.e(3188),r.e(9614)]).then(r.bind(r,69614))},{id:"gleam",name:"Gleam",import:()=>r.e(2403).then(r.bind(r,82403))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(300)]).then(r.bind(r,70300))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(3862)]).then(r.bind(r,23862))},{id:"glsl",name:"GLSL",import:()=>Promise.all([r.e(8004),r.e(3739)]).then(r.bind(r,73739))},{id:"gn",name:"GN",import:()=>r.e(3220).then(r.bind(r,93220))},{id:"gnuplot",name:"Gnuplot",import:()=>r.e(5070).then(r.bind(r,75070))},{id:"go",name:"Go",import:()=>r.e(4885).then(r.bind(r,14885))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(4676)]).then(r.bind(r,74676))},{id:"groovy",name:"Groovy",import:()=>r.e(881).then(r.bind(r,60881))},{id:"hack",name:"Hack",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(691),r.e(684)]).then(r.bind(r,10684))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(2521)]).then(r.bind(r,2521))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(843)]).then(r.bind(r,20843))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>r.e(1123).then(r.bind(r,21123))},{id:"haxe",name:"Haxe",import:()=>r.e(9347).then(r.bind(r,49347))},{id:"hcl",name:"HashiCorp HCL",import:()=>r.e(5522).then(r.bind(r,25522))},{id:"hjson",name:"Hjson",import:()=>r.e(7265).then(r.bind(r,67265))},{id:"hlsl",name:"HLSL",import:()=>r.e(694).then(r.bind(r,80694))},{id:"html",name:"HTML",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704)]).then(r.bind(r,67704))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(1484)]).then(r.bind(r,81484))},{id:"http",name:"HTTP",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(3959),r.e(3188),r.e(4676),r.e(6063)]).then(r.bind(r,66063))},{id:"hurl",name:"Hurl",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(3959),r.e(4676),r.e(6700)]).then(r.bind(r,66700))},{id:"hxml",name:"HXML",import:()=>r.e(2500).then(r.bind(r,62500))},{id:"hy",name:"Hy",import:()=>r.e(1222).then(r.bind(r,31222))},{id:"imba",name:"Imba",import:()=>r.e(6206).then(r.bind(r,16206))},{id:"ini",name:"INI",aliases:["properties"],import:()=>r.e(6113).then(r.bind(r,6113))},{id:"java",name:"Java",import:()=>r.e(3959).then(r.bind(r,73959))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>r.e(5568).then(r.bind(r,90406))},{id:"jinja",name:"Jinja",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(9727)]).then(r.bind(r,49727))},{id:"jison",name:"Jison",import:()=>Promise.all([r.e(5568),r.e(9078)]).then(r.bind(r,79078))},{id:"json",name:"JSON",import:()=>r.e(8481).then(r.bind(r,28481))},{id:"json5",name:"JSON5",import:()=>r.e(5760).then(r.bind(r,5760))},{id:"jsonc",name:"JSON with Comments",import:()=>r.e(8462).then(r.bind(r,78462))},{id:"jsonl",name:"JSON Lines",import:()=>r.e(41).then(r.bind(r,70041))},{id:"jsonnet",name:"Jsonnet",import:()=>r.e(2496).then(r.bind(r,42496))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>r.e(8798).then(r.bind(r,88798))},{id:"jsx",name:"JSX",import:()=>r.e(2460).then(r.bind(r,44128))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([r.e(5568),r.e(169),r.e(841),r.e(691),r.e(8004),r.e(9198),r.e(4706)]).then(r.bind(r,88012))},{id:"just",name:"Just",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(9198),r.e(6266),r.e(676),r.e(4237)]).then(r.bind(r,4237))},{id:"kdl",name:"KDL",import:()=>r.e(4900).then(r.bind(r,44900))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>r.e(552).then(r.bind(r,80552))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>r.e(1331).then(r.bind(r,81331))},{id:"latex",name:"LaTeX",import:()=>r.e(4243).then(r.bind(r,4243))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>r.e(4879).then(r.bind(r,24879))},{id:"less",name:"Less",import:()=>r.e(3199).then(r.bind(r,45580))},{id:"liquid",name:"Liquid",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(9783)]).then(r.bind(r,69783))},{id:"llvm",name:"LLVM IR",import:()=>r.e(7968).then(r.bind(r,97968))},{id:"log",name:"Log file",import:()=>r.e(6817).then(r.bind(r,6817))},{id:"logo",name:"Logo",import:()=>r.e(4866).then(r.bind(r,24866))},{id:"lua",name:"Lua",import:()=>Promise.all([r.e(8004),r.e(5557)]).then(r.bind(r,35557))},{id:"luau",name:"Luau",import:()=>r.e(6004).then(r.bind(r,76004))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>r.e(9769).then(r.bind(r,69769))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>r.e(4572).then(r.bind(r,24572))},{id:"marko",name:"Marko",import:()=>Promise.all([r.e(6165),r.e(5962),r.e(5347),r.e(3199),r.e(5921)]).then(r.bind(r,65921))},{id:"matlab",name:"MATLAB",import:()=>r.e(1828).then(r.bind(r,41828))},{id:"mdc",name:"MDC",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(4572),r.e(5677)]).then(r.bind(r,75677))},{id:"mdx",name:"MDX",import:()=>r.e(6766).then(r.bind(r,6766))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>r.e(5718).then(r.bind(r,95718))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>r.e(9857).then(r.bind(r,59857))},{id:"mojo",name:"Mojo",import:()=>r.e(2902).then(r.bind(r,2902))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>r.e(6851).then(r.bind(r,26851))},{id:"move",name:"Move",import:()=>r.e(5e3).then(r.bind(r,15e3))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>r.e(6099).then(r.bind(r,26099))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>r.e(1804).then(r.bind(r,51804))},{id:"nextflow-groovy",name:"nextflow-groovy",import:()=>r.e(8693).then(r.bind(r,88693))},{id:"nginx",name:"Nginx",import:()=>Promise.all([r.e(8004),r.e(9107)]).then(r.bind(r,9107))},{id:"nim",name:"Nim",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(8004),r.e(4572),r.e(7883)]).then(r.bind(r,67883))},{id:"nix",name:"Nix",import:()=>r.e(7504).then(r.bind(r,37504))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>r.e(2796).then(r.bind(r,2796))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>r.e(5126).then(r.bind(r,85126))},{id:"objective-cpp",name:"Objective-C++",import:()=>r.e(4698).then(r.bind(r,74078))},{id:"ocaml",name:"OCaml",import:()=>r.e(3159).then(r.bind(r,13159))},{id:"odin",name:"Odin",import:()=>r.e(2719).then(r.bind(r,12719))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>r.e(3126).then(r.bind(r,63126))},{id:"pascal",name:"Pascal",import:()=>r.e(7627).then(r.bind(r,17627))},{id:"perl",name:"Perl",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(676),r.e(8148)]).then(r.bind(r,10676))},{id:"php",name:"PHP",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(2975),r.e(5767)]).then(r.bind(r,42975))},{id:"pkl",name:"Pkl",import:()=>r.e(6034).then(r.bind(r,56034))},{id:"plsql",name:"PL/SQL",import:()=>r.e(4855).then(r.bind(r,84855))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>r.e(9392).then(r.bind(r,29392))},{id:"polar",name:"Polar",import:()=>r.e(379).then(r.bind(r,379))},{id:"postcss",name:"PostCSS",import:()=>r.e(9932).then(r.bind(r,99932))},{id:"powerquery",name:"PowerQuery",import:()=>r.e(7762).then(r.bind(r,47762))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>r.e(3392).then(r.bind(r,53392))},{id:"prisma",name:"Prisma",import:()=>r.e(1915).then(r.bind(r,21915))},{id:"prolog",name:"Prolog",import:()=>r.e(1806).then(r.bind(r,91806))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>r.e(6909).then(r.bind(r,46909))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3791)]).then(r.bind(r,73791))},{id:"puppet",name:"Puppet",import:()=>r.e(5301).then(r.bind(r,45301))},{id:"purescript",name:"PureScript",import:()=>r.e(4312).then(r.bind(r,84312))},{id:"python",name:"Python",aliases:["py"],import:()=>r.e(9198).then(r.bind(r,26817))},{id:"qml",name:"QML",import:()=>Promise.all([r.e(5568),r.e(2697)]).then(r.bind(r,62697))},{id:"qmldir",name:"QML Directory",import:()=>r.e(724).then(r.bind(r,10724))},{id:"qss",name:"Qt Style Sheets",import:()=>r.e(596).then(r.bind(r,40596))},{id:"r",name:"R",import:()=>r.e(8469).then(r.bind(r,78469))},{id:"racket",name:"Racket",import:()=>r.e(2345).then(r.bind(r,12345))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>r.e(5264).then(r.bind(r,35264))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(2614),r.e(6323)]).then(r.bind(r,6323))},{id:"reg",name:"Windows Registry Script",import:()=>r.e(1825).then(r.bind(r,71825))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>r.e(9552).then(r.bind(r,99552))},{id:"rel",name:"Rel",import:()=>r.e(9954).then(r.bind(r,79954))},{id:"riscv",name:"RISC-V",import:()=>r.e(3541).then(r.bind(r,55922))},{id:"ron",name:"RON",import:()=>r.e(5570).then(r.bind(r,65570))},{id:"rosmsg",name:"ROS Interface",import:()=>r.e(9044).then(r.bind(r,29044))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(9198),r.e(6266),r.e(6612)]).then(r.bind(r,96612))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(6266)]).then(r.bind(r,63583))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>r.e(7349).then(r.bind(r,27349))},{id:"sas",name:"SAS",import:()=>Promise.all([r.e(691),r.e(6588)]).then(r.bind(r,16588))},{id:"sass",name:"Sass",import:()=>r.e(1706).then(r.bind(r,49325))},{id:"scala",name:"Scala",import:()=>r.e(7133).then(r.bind(r,17133))},{id:"scheme",name:"Scheme",import:()=>r.e(426).then(r.bind(r,50426))},{id:"scss",name:"SCSS",import:()=>Promise.all([r.e(5962),r.e(5347)]).then(r.bind(r,95347))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>r.e(444).then(r.bind(r,20444))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>r.e(9855).then(r.bind(r,29855))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>r.e(3188).then(r.bind(r,93188))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([r.e(3188),r.e(7597)]).then(r.bind(r,7597))},{id:"smalltalk",name:"Smalltalk",import:()=>r.e(288).then(r.bind(r,50288))},{id:"solidity",name:"Solidity",import:()=>r.e(1388).then(r.bind(r,51388))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(8500)]).then(r.bind(r,58500))},{id:"sparql",name:"SPARQL",import:()=>r.e(9460).then(r.bind(r,9460))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>r.e(3582).then(r.bind(r,13582))},{id:"sql",name:"SQL",import:()=>r.e(691).then(r.bind(r,30691))},{id:"ssh-config",name:"SSH Config",import:()=>r.e(6834).then(r.bind(r,46834))},{id:"stata",name:"Stata",import:()=>Promise.all([r.e(691),r.e(8388)]).then(r.bind(r,78388))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>r.e(553).then(r.bind(r,60553))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>Promise.all([r.e(5568),r.e(9026)]).then(r.bind(r,99026))},{id:"svelte",name:"Svelte",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(8890)]).then(r.bind(r,58890))},{id:"swift",name:"Swift",import:()=>r.e(1262).then(r.bind(r,71262))},{id:"system-verilog",name:"SystemVerilog",import:()=>r.e(2993).then(r.bind(r,72993))},{id:"systemd",name:"Systemd Units",import:()=>r.e(8322).then(r.bind(r,28322))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>r.e(8303).then(r.bind(r,65922))},{id:"tasl",name:"Tasl",import:()=>r.e(8719).then(r.bind(r,68719))},{id:"tcl",name:"Tcl",import:()=>r.e(7294).then(r.bind(r,97294))},{id:"templ",name:"Templ",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(4885),r.e(4989)]).then(r.bind(r,34989))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>r.e(7).then(r.bind(r,30007))},{id:"tex",name:"TeX",import:()=>r.e(5620).then(r.bind(r,35620))},{id:"toml",name:"TOML",import:()=>r.e(4495).then(r.bind(r,54495))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(6852)]).then(r.bind(r,6852))},{id:"tsv",name:"TSV",import:()=>r.e(1420).then(r.bind(r,21420))},{id:"tsx",name:"TSX",import:()=>r.e(219).then(r.bind(r,86970))},{id:"turtle",name:"Turtle",import:()=>r.e(4601).then(r.bind(r,54601))},{id:"twig",name:"Twig",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(9198),r.e(6266),r.e(5347),r.e(2975),r.e(752)]).then(r.bind(r,10752))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>r.e(6165).then(r.bind(r,31366))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>r.e(9598).then(r.bind(r,79598))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>r.e(6609).then(r.bind(r,6609))},{id:"v",name:"V",import:()=>r.e(2529).then(r.bind(r,62529))},{id:"vala",name:"Vala",import:()=>r.e(5529).then(r.bind(r,25529))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>r.e(5111).then(r.bind(r,65111))},{id:"verilog",name:"Verilog",import:()=>r.e(157).then(r.bind(r,30157))},{id:"vhdl",name:"VHDL",import:()=>r.e(1237).then(r.bind(r,31237))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>r.e(3919).then(r.bind(r,33919))},{id:"vue",name:"Vue",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(2172)]).then(r.bind(r,12172))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([r.e(5568),r.e(6801)]).then(r.bind(r,36801))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([r.e(5568),r.e(3459),r.e(5962),r.e(5347),r.e(3199),r.e(8790)]).then(r.bind(r,79106))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>r.e(3367).then(r.bind(r,83367))},{id:"wasm",name:"WebAssembly",import:()=>r.e(6607).then(r.bind(r,26607))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>r.e(5249).then(r.bind(r,35249))},{id:"wgsl",name:"WGSL",import:()=>r.e(5012).then(r.bind(r,15012))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>r.e(7614).then(r.bind(r,47614))},{id:"wit",name:"WebAssembly Interface Types",import:()=>r.e(1191).then(r.bind(r,31191))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>r.e(4725).then(r.bind(r,67399))},{id:"xml",name:"XML",import:()=>Promise.all([r.e(3959),r.e(3386)]).then(r.bind(r,98148))},{id:"xsl",name:"XSL",import:()=>Promise.all([r.e(3959),r.e(898)]).then(r.bind(r,70898))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>r.e(7226).then(r.bind(r,47226))},{id:"zenscript",name:"ZenScript",import:()=>r.e(2273).then(r.bind(r,22273))},{id:"zig",name:"Zig",import:()=>r.e(9949).then(r.bind(r,19949))}],s=Object.fromEntries(o.map(e=>[e.id,e.import])),a=Object.fromEntries(o.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),l={...s,...a};class c extends Error{constructor(e){super(e),this.name="ShikiError"}}var u=r(34897);function d(e,...t){return t.forEach(t=>{for(let r in t)e[r]=t[r]}),e}var h=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,p=class{static hasCaptures(e){return null!==e&&(h.lastIndex=0,h.test(e))}static replaceCaptures(e,t,r){return e.replace(h,(e,n,i,o)=>{let s=r[parseInt(n||i,10)];if(!s)return e;{let e=t.substring(s.start,s.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function f(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let n=0;n<r;n++){var i,o;let r=(i=e[n],i<(o=t[n])?-1:+(i>o));if(0!==r)return r}return 0}return r-n}function m(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 g(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var y=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}},b=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let e=0,i=t.length;e<i;e++){let i,o=t[e];if(!o.settings)continue;if("string"==typeof o.scope){let e=o.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(o.scope)?o.scope:[""];let s=-1;if("string"==typeof o.settings.fontStyle){s=0;let e=o.settings.fontStyle.split(" ");for(let t=0,r=e.length;t<r;t++)switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}let a=null;"string"==typeof o.settings.foreground&&m(o.settings.foreground)&&(a=o.settings.foreground);let l=null;"string"==typeof o.settings.background&&m(o.settings.background)&&(l=o.settings.background);for(let t=0,o=i.length;t<o;t++){let o=i[t].trim().split(" "),c=o[o.length-1],u=null;o.length>1&&(u=o.slice(0,o.length-1)).reverse(),r[n++]=new x(c,u,e,s,a,l)}}return r}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var r,n;let i=(r=e.scope,r<(n=t.scope)?-1:+(r>n));return 0!==i||0!==(i=f(e.parentScopes,t.parentScopes))?i:e.index-t.index});let r=0,n="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(r=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(i=t.background)}let o=new C(t),s=new k(r,o.getId(n),o.getId(i)),a=new _(new E(0,null,-1,0,0),[]);for(let t=0,r=e.length;t<r;t++){let r=e[t];a.insert(0,r.scope,r.parentScopes,r.fontStyle,o.getId(r.foreground),o.getId(r.background))}return new b(o,s,a)}(e,t)}_cachedMatchRoot=new y(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,r=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let i=0;i<t.length;i++){var r,n;let o=t[i],s=!1;if(">"===o){if(i===t.length-1)return!1;o=t[++i],s=!0}for(;e&&(r=e.scopeName,!((n=o)===r||r.startsWith(n)&&"."===r[n.length]));){if(s)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return r?new k(r.fontStyle,r.foreground,r.background):null}},v=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,r){for(let n of r)t=new e(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new e(r,t[n]);return r}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=[],r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}},k=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}},x=class{constructor(e,t,r,n,i,o){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=i,this.background=o}},w=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(w||{}),C=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,r=e.length;t<r;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)}},S=Object.freeze([]),E=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,n,i){this.scopeDepth=e,this.parentScopes=t||S,this.fontStyle=r,this.foreground=n,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,n){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==r&&(this.foreground=r),0!==n&&(this.background=n)}},_=class e{constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,n=0;for(;">"===e.parentScopes[r]&&r++,">"===t.parentScopes[n]&&n++,!(r>=e.parentScopes.length)&&!(n>=t.parentScopes.length);){let i=t.parentScopes[n].length-e.parentScopes[r].length;if(0!==i)return i;r++,n++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,r,n=t.indexOf(".");if(-1===n?(e=t,r=""):(e=t.substring(0,n),r=t.substring(n+1)),this._children.hasOwnProperty(e))return this._children[e].match(r)}let r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(e._cmpBySpecificity),r}insert(t,r,n,i,o,s){let a,l,c;if(""===r)return void this._doInsertHere(t,n,i,o,s);let u=r.indexOf(".");-1===u?(a=r,l=""):(a=r.substring(0,u),l=r.substring(u+1)),this._children.hasOwnProperty(a)?c=this._children[a]:(c=new e(this._mainRule.clone(),E.cloneArr(this._rulesWithParentScopes)),this._children[a]=c),c.insert(t+1,l,n,i,o,s)}_doInsertHere(e,t,r,n,i){if(null===t)return void this._mainRule.acceptOverwrite(e,r,n,i);for(let o=0,s=this._rulesWithParentScopes.length;o<s;o++){let s=this._rulesWithParentScopes[o];if(0===f(s.parentScopes,t))return void s.acceptOverwrite(e,r,n,i)}-1===r&&(r=this._mainRule.fontStyle),0===n&&(n=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new E(e,t,r,n,i))}},A=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let r=e.getLanguageId(t),n=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:r,tokenType:n,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,r,n,i,o,s,a){let l=e.getLanguageId(t),c=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),h=e.getForeground(t),p=e.getBackground(t);return 0!==r&&(l=r),8!==n&&(c=n),null!==i&&(u=+!!i),-1!==o&&(d=o),0!==s&&(h=s),0!==a&&(p=a),(0|l|c<<8|u<<10|d<<11|h<<15|p<<24)>>>0}};function N(e,t){var r;let n,i,o=[],s=(r=e,i=(n=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(r),{next:()=>{if(!i)return null;let e=i[0];return i=n.exec(r),e}}),a=s.next();for(;null!==a;){let e=0;if(2===a.length&&":"===a.charAt(1)){switch(a.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=s.next()}let t=c();if(o.push({matcher:t,priority:e}),","!==a)break;a=s.next()}return o;function l(){if("-"===a){a=s.next();let e=l();return t=>!!e&&!e(t)}if("("===a){a=s.next();let e=function(){let e=[],t=c();for(;t&&(e.push(t),"|"===a||","===a);){do a=s.next();while("|"===a||","===a);t=c()}return t=>e.some(e=>e(t))}();return")"===a&&(a=s.next()),e}if(M(a)){let e=[];do e.push(a),a=s.next();while(M(a));return r=>t(e,r)}return null}function c(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function M(e){return!!e&&!!e.match(/[\w\.:]+/)}var T=(e=>(e[e.None=0]="None",e[e.NotBeginString=1]="NotBeginString",e[e.NotEndString=2]="NotEndString",e[e.NotBeginPosition=4]="NotBeginPosition",e[e.DebugCall=8]="DebugCall",e))(T||{});function L(e){"function"==typeof e.dispose&&e.dispose()}var I=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},j=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},R=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))}},O=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new I(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new R;for(let r of e)!function(e,t,r,n){let i=r.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let o=r.lookup(t);e instanceof I?$({baseGrammar:o,selfGrammar:i},n):P(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);let s=r.injections(e.scopeName);if(s)for(let e of s)n.add(new I(e))}(r,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof I){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 P(e,t,r){t.repository&&t.repository[e]&&z([t.repository[e]],t,r)}function $(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,r){for(let n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);let e=n.repository?d({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&z(n.patterns,{...t,repository:e},r);let i=n.include;if(!i)continue;let o=G(i);switch(o.kind){case 0:$({...t,selfGrammar:t.baseGrammar},r);break;case 1:$(t,r);break;case 2:P(o.ruleName,{...t,repository:e},r);break;case 3:case 4:let s=o.scopeName===t.selfGrammar.scopeName?t.selfGrammar:o.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){let n={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===o.kind?P(o.ruleName,n,r):$(n,r)}else 4===o.kind?r.add(new j(o.scopeName,o.ruleName)):r.add(new I(o.scopeName))}}}var D=class{kind=0},B=class{kind=1},F=class{constructor(e){this.ruleName=e}kind=2},H=class{constructor(e){this.scopeName=e}kind=3},U=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function G(e){if("$base"===e)return new D;if("$self"===e)return new B;let t=e.indexOf("#");return -1===t?new H(e):0===t?new F(e.substring(1)):new U(e.substring(0,t),e.substring(t+1))}var q=/\\(\d+)/,W=/\\(\d+)/g;Symbol("RuleId");var V=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=p.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=p.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let r=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===r?t:~r==t.length-1?e(t.substring(0,t.length-1)):t.substr(~r+1)}(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?p.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?p.replaceCaptures(this._contentName,e,t):this._contentName}},K=class extends V{retokenizeCapturedWithRuleId;constructor(e,t,r,n,i){super(e,t,r,n),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,r,n){throw Error("Not supported!")}},J=class extends V{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,i){super(e,t,r,null),this._match=new ee(n,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,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new et,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Z=class extends V{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,i){super(e,t,r,n),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 r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new et,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},X=class extends V{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,i,o,s,a,l,c){super(e,t,r,n),this._begin=new ee(i,this.id),this.beginCaptures=o,this._end=new ee(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.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,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new et,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}},Q=class extends V{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,i,o,s,a,l){super(e,t,r,n),this._begin=new ee(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new ee(s,-2),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,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new et,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,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new et,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Y=class e{static createCaptureRule(e,t,r,n,i){return e.registerRule(e=>new K(t,e,r,n,i))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(i=>{if(t.id=i,t.match)return new J(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,r,n));if(void 0===t.begin){t.repository&&(n=d({},n,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new Z(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,r,n))}return t.while?new Q(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,e._compileCaptures(t.whileCaptures||t.captures,r,n),e._compilePatterns(t.patterns,r,n)):new X(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,e._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,e._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let i=[];if(t){let o=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>o&&(o=t)}for(let e=0;e<=o;e++)i[e]=null;for(let o in t){if("$vscodeTextmateLocation"===o)continue;let s=parseInt(o,10),a=0;t[o].patterns&&(a=e.getCompiledRuleId(t[o],r,n)),i[s]=e.createCaptureRule(r,t[o].$vscodeTextmateLocation,t[o].name,t[o].contentName,a)}}return i}static _compilePatterns(t,r,n){let i=[];if(t)for(let o=0,s=t.length;o<s;o++){let s=t[o],a=-1;if(s.include){let t=G(s.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(n[s.include],r,n);break;case 2:let i=n[t.ruleName];i&&(a=e.getCompiledRuleId(i,r,n));break;case 3:case 4:let o=t.scopeName,l=4===t.kind?t.ruleName:null,c=r.getExternalGrammar(o,n);if(c)if(l){let t=c.repository[l];t&&(a=e.getCompiledRuleId(t,r,c.repository))}else a=e.getCompiledRuleId(c.repository.$self,r,c.repository)}}else a=e.getCompiledRuleId(s,r,n);if(-1!==a){let e=r.getRule(a),t=!1;if((e instanceof Z||e instanceof X||e instanceof Q)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ee=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){let t=e.length,r=0,n=[],i=!1;for(let o=0;o<t;o++)if("\\"===e.charAt(o)&&o+1<t){let t=e.charAt(o+1);"z"===t?(n.push(e.substring(r,o)),n.push("$(?!\\n)(?<!\\n)"),r=o+2):("A"===t||"G"===t)&&(i=!0),o++}this.hasAnchor=i,0===r?this.source=e:(n.push(e.substring(r,t)),this.source=n.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=q.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 r=t.map(t=>e.substring(t.start,t.end));return W.lastIndex=0,this.source.replace(W,(e,t)=>g(r[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,r,n;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],o=[],s=[],a=[];for(e=0,t=this.source.length;e<t;e++)r=this.source.charAt(e),i[e]=r,o[e]=r,s[e]=r,a[e]=r,"\\"===r&&e+1<t&&("A"===(n=this.source.charAt(e+1))?(i[e+1]="",o[e+1]="",s[e+1]="A",a[e+1]="A"):"G"===n?(i[e+1]="",o[e+1]="G",s[e+1]="",a[e+1]="G"):(i[e+1]=n,o[e+1]=n,s[e+1]=n,a[e+1]=n),e++);return{A0_G0:i.join(""),A0_G1:o.join(""),A1_G0:s.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}},et=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 er(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,r){if(!this._hasAnchors)return this.compile(e);if(t)if(r)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0;return r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,r){return new er(e,this._items.map(e=>e.resolveAnchors(t,r)),this._items.map(e=>e.ruleId))}},er=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,r){let n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},en=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ei=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new en(e,8),this._embeddedLanguagesMatcher=new eo(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 en(0,0);_getBasicScopeAttributes=new y(e=>new en(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let r=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[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/},eo=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>g(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!==u&&u.env.VSCODE_TEXTMATE_DEBUG;var es=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function ea(e,t,r,n,i,o,s,a){let l=t.content.length,c=!1,u=-1;if(s){let s=function(e,t,r,n,i,o){let s=i.beginRuleCapturedEOL?0:-1,a=[];for(let t=i;t;t=t.pop()){let r=t.getRule(e);r instanceof Q&&a.push({rule:r,stack:t})}for(let p=a.pop();p;p=a.pop()){var l,c,u,d,h;let{ruleScanner:a,findOptions:f}=(l=p.rule,c=e,u=p.stack.endRule,d=r,h=n===s,{ruleScanner:l.compileWhileAG(c,u,d,h),findOptions:0}),m=a.findNextMatchSync(t,n,f);if(m){if(-2!==m.ruleId){i=p.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(o.produce(p.stack,m.captureIndices[0].start),ec(e,t,r,p.stack,o,p.rule.whileCaptures,m.captureIndices),o.produce(p.stack,m.captureIndices[0].end),s=m.captureIndices[0].end,m.captureIndices[0].end>n&&(n=m.captureIndices[0].end,r=!1))}else{i=p.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:s,isFirstLine:r}}(e,t,r,n,i,o);i=s.stack,n=s.linePos,r=s.isFirstLine,u=s.anchorPosition}let d=Date.now();for(;!c;){if(0!==a&&Date.now()-d>a)return new es(i,!0);!function(){let s=function(e,t,r,n,i,o){let s=function(e,t,r,n,i,o){let{ruleScanner:s,findOptions:a}=el(i.getRule(e),e,i.endRule,r,n===o),l=s.findNextMatchSync(t,n,a);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,r,n,i,o),a=e.getInjections();if(0===a.length)return s;let l=function(e,t,r,n,i,o,s){let a,l=Number.MAX_VALUE,c=null,u=0,d=o.contentNameScopesList.getScopeNames();for(let o=0,h=e.length;o<h;o++){let h=e[o];if(!h.matcher(d))continue;let{ruleScanner:p,findOptions:f}=el(t.getRule(h.ruleId),t,null,n,i===s),m=p.findNextMatchSync(r,i,f);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=l)&&(l=g,c=m.captureIndices,a=m.ruleId,u=h.priority,l===i))break}return c?{priorityMatch:-1===u,captureIndices:c,matchedRuleId:a}:null}(a,e,t,r,n,i,o);if(!l)return s;if(!s)return l;let c=s.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:s}(e,t,r,n,i,u);if(!s){o.produce(i,l),c=!0;return}let a=s.captureIndices,d=s.matchedRuleId,h=!!a&&a.length>0&&a[0].end>n;if(-1===d){let s=i.getRule(e);o.produce(i,a[0].start),i=i.withContentNameScopesList(i.nameScopesList),ec(e,t,r,i,o,s.endCaptures,a),o.produce(i,a[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!h&&d.getEnterPos()===n){i=d,o.produce(i,l),c=!0;return}}else{let s=e.getRule(d);o.produce(i,a[0].start);let p=i,f=s.getName(t.content,a),m=i.contentNameScopesList.pushAttributed(f,e);if(i=i.push(d,n,u,a[0].end===l,null,m,m),s instanceof X){ec(e,t,r,i,o,s.beginCaptures,a),o.produce(i,a[0].end),u=a[0].end;let n=s.getContentName(t.content,a),d=m.pushAttributed(n,e);if(i=i.withContentNameScopesList(d),s.endHasBackReferences&&(i=i.withEndRule(s.getEndWithResolvedBackReferences(t.content,a))),!h&&p.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),c=!0;return}}else if(s instanceof Q){ec(e,t,r,i,o,s.beginCaptures,a),o.produce(i,a[0].end),u=a[0].end;let n=s.getContentName(t.content,a),d=m.pushAttributed(n,e);if(i=i.withContentNameScopesList(d),s.whileHasBackReferences&&(i=i.withEndRule(s.getWhileWithResolvedBackReferences(t.content,a))),!h&&p.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),c=!0;return}}else if(ec(e,t,r,i,o,s.captures,a),o.produce(i,a[0].end),i=i.pop(),!h){i=i.safePop(),o.produce(i,l),c=!0;return}}a[0].end>n&&(n=a[0].end,r=!1)}()}return new es(i,!1)}function el(e,t,r,n,i){return{ruleScanner:e.compileAG(t,r,n,i),findOptions:0}}function ec(e,t,r,n,i,o,s){if(0===o.length)return;let a=t.content,l=Math.min(o.length,s.length),c=[],u=s[0].end;for(let t=0;t<l;t++){let l=o[t];if(null===l)continue;let d=s[t];if(0===d.length)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,d.start):i.produce(n,d.start),l.retokenizeCapturedWithRuleId){let t=l.getName(a,s),o=n.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(a,s),u=o.pushAttributed(c,e),h=n.push(l.retokenizeCapturedWithRuleId,d.start,-1,!1,null,o,u),p=e.createOnigString(a.substring(0,d.end));ea(e,p,r&&0===d.start,d.start,h,i,!1,0),L(p);continue}let h=l.getName(a,s);if(null!==h){let t=(c.length>0?c[c.length-1].scopes:n.contentNameScopesList).pushAttributed(h,e);c.push(new eu(t,d.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var eu=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ed(e,t,r,n,i){let o=N(t,eh),s=Y.getCompiledRuleId(r,n,i.repository);for(let r of o)e.push({debugSelector:t,matcher:r.matcher,ruleId:s,grammar:i,priority:r.priority})}function eh(e,t){if(t.length<e.length)return!1;let r=0;return e.every(e=>{for(let n=r;n<t.length;n++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let r=t.length;return e.length>r&&e.substr(0,r)===t&&"."===e[r]}(t[n],e))return r=n+1,!0;return!1})}var ep=class{constructor(e,t,r,n,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new ei(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=ef(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i))for(let t of N(e,eh))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=[],t=this._rootScopeName,r=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(r){let n=r.injections;if(n)for(let t in n)ed(e,t,n[t],this,r);let i=this._grammarRepository.injections(t);i&&i.forEach(t=>{let r=this.getExternalGrammar(t);if(r){let t=r.injectionSelector;t&&ed(e,t,r,this,r)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=ef(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){let n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){let n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){let i;if(-1===this._rootId&&(this._rootId=Y.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==eg.NULL)i=!1,t.reset();else{let e;i=!0;let r=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),o=A.set(0,r.languageId,r.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),s=this.getRule(this._rootId).getName(null,null);e=s?em.createRootAndLookUpScopeName(s,o,this):em.createRoot("unknown",o),t=new eg(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let o=this.createOnigString(e),s=o.content.length,a=new eb(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=ea(this,o,i,0,t,a,!0,n);return L(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function ef(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let r=[];for(let n=0,i=t.length;n<i;n++)r[n]=e(t[n]);return r}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let r={};for(let n in t)r[n]=e(t[n]);return r}(t):t}(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 em=class e{constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(t,r){let n=t,i=t?.scopePath??null;for(let t of r)n=new e(n,i=v.push(i,t.scopeNames),t.encodedTokenAttributes);return n}static createRoot(t,r){return new e(null,new v(null,t),r)}static createRootAndLookUpScopeName(t,r,n){let i=n.getMetadataForScope(t),o=new v(null,t),s=n.themeProvider.themeMatch(o),a=e.mergeAttributes(r,i,s);return new e(null,o,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,r){let n=-1,i=0,o=0;return null!==r&&(n=r.fontStyle,i=r.foregroundId,o=r.backgroundId),A.set(e,t.languageId,t.tokenType,null,n,i,o)}pushAttributed(t,r){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,r);let n=t.split(/ /g),i=this;for(let t of n)i=e._pushAttributed(i,t,r);return i}static _pushAttributed(t,r,n){let i=n.getMetadataForScope(r),o=t.scopePath.push(r),s=n.themeProvider.themeMatch(o),a=e.mergeAttributes(t.tokenAttributes,i,s);return new e(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?t.reverse():void 0}},eg=class e{constructor(e,t,r,n,i,o,s,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=s,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=n}_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)&&em.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,r,n,i,o,s,a){return new e(this,t,r,n,i,o,s,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: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,r){let n=em.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new e(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,em.fromExtension(n,r.contentNameScopesList))}},ey=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):N(e,eh).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>N(e,eh).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}},eb=class{constructor(e,t,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,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 r=e?.tokenAttributes??0,n=!1;if(this.balancedBracketSelectors?.matchesAlways&&(n=!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)&&(r=A.set(r,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(n=this.balancedBracketSelectors.match(t))}if(n&&(r=A.set(r,0,8,n,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}let r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),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 r=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)r[e]=this._binaryTokens[e];return r}},ev=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,r,n,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,new ep(e,o,t,r,n,i,this,this._onigLib))}return this._grammars.get(e)}},ek=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ev(b.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(b.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new ey(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,n,i){let o=new O(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(e=>this._loadSingleGrammar(e.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,r,n,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 r="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,n=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,n)}_grammarForScopeName(e,t=0,r=null,n=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,r,n,i)}},ex=eg.NULL,ew=r(30736),eC=r(78444),eS=r(8959);let eE=/["&'<>`]/g,e_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eA=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eN=/[|\\{}()[\]^$+*?.]/g,eM=new WeakMap,eT=/[\dA-Fa-f]/,eL=/\d/,eI=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],ej={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:"€"},eR=["cent","copy","divide","gt","lt","not","para","times"],eO={}.hasOwnProperty,eP={};for(n in ej)eO.call(ej,n)&&(eP[ej[n]]=n);let e$=/[^\dA-Za-z]/;function ez(e,t,r){let n,i=function(e,t,r){let n="&#x"+e.toString(16).toUpperCase();return r&&t&&!eT.test(String.fromCharCode(t))?n:n+";"}(e,t,r.omitOptionalSemicolons);if((r.useNamedReferences||r.useShortestReferences)&&(n=function(e,t,r,n){let i=String.fromCharCode(e);if(eO.call(eP,i)){let e=eP[i],o="&"+e;return r&&eI.includes(e)&&!eR.includes(e)&&(!n||t&&61!==t&&e$.test(String.fromCharCode(t)))?o:o+";"}return""}(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!n)&&r.useShortestReferences){let n=function(e,t,r){let n="&#"+String(e);return r&&t&&!eL.test(String.fromCharCode(t))?n:n+";"}(e,t,r.omitOptionalSemicolons);n.length<i.length&&(i=n)}return n&&(!r.useShortestReferences||n.length<i.length)?n:i}function eD(e,t){let r;var n,i=e,o=Object.assign({format:ez},t);if(i=i.replace(o.subset?(n=o.subset,(r=eM.get(n))||(r=function(e){let t=[],r=-1;for(;++r<e.length;)t.push(e[r].replace(eN,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(n),eM.set(n,r)),r):eE,s),o.subset||o.escapeOnly)return i;return i.replace(e_,function(e,t,r){return o.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(t+2),o)}).replace(eA,s);function s(e,t,r){return o.format(e.charCodeAt(0),r.charCodeAt(t+1),o)}}let eB=/^>|^->|<!--|-->|--!>|<!-$/g,eF=[">"],eH=["<",">"];var eU=r(98728),eG=r(43918),eq=r(54802),eW=r(49009),eV=r(16468);let eK=eX(1),eJ=eX(-1),eZ=[];function eX(e){return function(t,r,n){let i=t?t.children:eZ,o=(r||0)+e,s=i[o];if(!n)for(;s&&(0,eV.m)(s);)o+=e,s=i[o];return s}}let eQ={}.hasOwnProperty;function eY(e){return function(t,r,n){return eQ.call(e,t.tagName)&&e[t.tagName](t,r,n)}}let e0=eY({body:function(e,t,r){let n=eK(r,t);return!n||"comment"!==n.type},caption:e1,colgroup:e1,dd:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("dt"===n.tagName||"dd"===n.tagName)},dt:function(e,t,r){let n=eK(r,t);return!!(n&&"element"===n.type&&("dt"===n.tagName||"dd"===n.tagName))},head:e1,html:function(e,t,r){let n=eK(r,t);return!n||"comment"!==n.type},li:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&"li"===n.tagName},optgroup:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&"optgroup"===n.tagName},option:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("option"===n.tagName||"optgroup"===n.tagName)},p:function(e,t,r){let n=eK(r,t);return n?"element"===n.type&&("address"===n.tagName||"article"===n.tagName||"aside"===n.tagName||"blockquote"===n.tagName||"details"===n.tagName||"div"===n.tagName||"dl"===n.tagName||"fieldset"===n.tagName||"figcaption"===n.tagName||"figure"===n.tagName||"footer"===n.tagName||"form"===n.tagName||"h1"===n.tagName||"h2"===n.tagName||"h3"===n.tagName||"h4"===n.tagName||"h5"===n.tagName||"h6"===n.tagName||"header"===n.tagName||"hgroup"===n.tagName||"hr"===n.tagName||"main"===n.tagName||"menu"===n.tagName||"nav"===n.tagName||"ol"===n.tagName||"p"===n.tagName||"pre"===n.tagName||"section"===n.tagName||"table"===n.tagName||"ul"===n.tagName):!r||"element"!==r.type||"a"!==r.tagName&&"audio"!==r.tagName&&"del"!==r.tagName&&"ins"!==r.tagName&&"map"!==r.tagName&&"noscript"!==r.tagName&&"video"!==r.tagName},rp:e2,rt:e2,tbody:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("tbody"===n.tagName||"tfoot"===n.tagName)},td:e5,tfoot:function(e,t,r){return!eK(r,t)},th:e5,thead:function(e,t,r){let n=eK(r,t);return!!(n&&"element"===n.type&&("tbody"===n.tagName||"tfoot"===n.tagName))},tr:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&"tr"===n.tagName}});function e1(e,t,r){let n=eK(r,t,!0);return!n||"comment"!==n.type&&!("text"===n.type&&(0,eV.m)(n.value.charAt(0)))}function e2(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("rp"===n.tagName||"rt"===n.tagName)}function e5(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("td"===n.tagName||"th"===n.tagName)}let e3=eY({body:function(e){let t=eK(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,eV.m)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,r){let n=eJ(r,t),i=eK(e,-1,!0);return!(r&&n&&"element"===n.type&&"colgroup"===n.tagName&&e0(n,r.children.indexOf(n),r))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let r of e.children)if("element"===r.type&&("base"===r.tagName||"title"===r.tagName)){if(t.has(r.tagName))return!1;t.add(r.tagName)}let r=e.children[0];return!r||"element"===r.type},html:function(e){let t=eK(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,r){let n=eJ(r,t),i=eK(e,-1);return!(r&&n&&"element"===n.type&&("thead"===n.tagName||"tbody"===n.tagName)&&e0(n,r.children.indexOf(n),r))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),e6={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("")]]},e4=["<","&"];function e9(e,t,r,n){return r&&"element"===r.type&&("script"===r.tagName||"style"===r.tagName)?e.value:eD(e.value,Object.assign({},n.settings.characterReferences,{subset:e4}))}let e8=(0,eS.A)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,r,n){return n.settings.bogusComments?"<?"+eD(e.value,Object.assign({},n.settings.characterReferences,{subset:eF}))+">":"\x3c!--"+e.value.replace(eB,function(e){return eD(e,Object.assign({},n.settings.characterReferences,{subset:eH}))})+"--\x3e"},doctype:function(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,r,n){let i,o=n.schema,s="svg"!==o.space&&n.settings.omitOptionalTags,a="svg"===o.space?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===o.space&&"svg"===e.tagName&&(n.schema=eC.JW);let c=function(e,t){let r,n=[],i=-1;if(t){for(r in t)if(null!==t[r]&&void 0!==t[r]){let i=function(e,t,r){let n,i=(0,eq.I)(e.schema,t),o=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,s=+!e.settings.allowDangerousCharacters,a=e.quote;if(i.overloadedBoolean&&(r===i.attribute||""===r)?r=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof r||r===i.attribute||""===r)&&(r=!!r),null==r||!1===r||"number"==typeof r&&Number.isNaN(r))return"";let l=eD(i.attribute,Object.assign({},e.settings.characterReferences,{subset:e6.name[o][s]}));return!0===r||(r=Array.isArray(r)?(i.commaSeparated?eG.A:eW.A)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(n=eD(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:e6.unquoted[o][s]}))),n!==r&&(e.settings.quoteSmart&&(0,eU.D)(r,a)>(0,eU.D)(r,e.alternative)&&(a=e.alternative),n=a+eD(r,Object.assign({},e.settings.characterReferences,{subset:("'"===a?e6.single:e6.double)[o][s],attribute:!0}))+a),l+(n?"="+n:n))}(e,r,t[r]);i&&n.push(i)}}for(;++i<n.length;){let t=e.settings.tightAttributes?n[i].charAt(n[i].length-1):void 0;i!==n.length-1&&'"'!==t&&"'"!==t&&(n[i]+=" ")}return n.join("")}(n,e.properties),u=n.all("html"===o.space&&"template"===e.tagName?e.content:e);return n.schema=o,u&&(a=!1),!c&&s&&e3(e,t,r)||(l.push("<",e.tagName,c?" "+c:""),a&&("svg"===o.space||n.settings.closeSelfClosing)&&(i=c.charAt(c.length-1),(!n.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(u),a||s&&e0(e,t,r)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,r,n){return n.settings.allowDangerousHtml?e.value:e9(e,t,r,n)},root:function(e,t,r,n){return n.all(e)},text:e9}}),e7={},te={},tt=[];function tr(e,t,r){return e8(e,t,r,this)}function tn(e){let t=[],r=e&&e.children||tt,n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}function ti(e,t){let r="string"==typeof e?{}:{...e.colorReplacements},n="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?r[e]=i:e===n&&Object.assign(r,i);return r}function to(e,t){return e&&t?.[e?.toLowerCase()]||e}async function ts(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function ta(e){return!e||["plaintext","txt","text","plain"].includes(e)}function tl(e){return"ansi"===e||ta(e)}function tc(e){return"none"===e}function tu(e,t){if(!t)return e;for(let r 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)))r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function td(e,t=!1){if(0===e.length)return[["",0]];let r=e.split(/(\r?\n)/g),n=0,i=[];for(let e=0;e<r.length;e+=2){let o=t?r[e]+(r[e+1]||""):r[e];i.push([o,n]),n+=r[e].length,n+=r[e+1]?.length||0}return i}let th="light-dark()",tp=["color","background-color"];function tf(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&w.Italic&&(t["font-style"]="italic"),e.fontStyle&w.Bold&&(t["font-weight"]="bold");let r=[];e.fontStyle&w.Underline&&r.push("underline"),e.fontStyle&w.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function tm(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let tg=new WeakMap;function ty(e,t){tg.set(e,t)}function tb(e){return tg.get(e)}class tv{_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 tv(Object.fromEntries((Array.isArray(t)?t:[t]).map(e=>[e,ex])),e)}constructor(...e){if(2===e.length){let[t,r]=e;this.lang=r,this._stacks=t}else{let[t,r,n]=e;this.lang=r,this._stacks={[n]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t=this._stacks[e];let r=[],n=new Set;return!function e(t){if(n.has(t))return;n.add(t);let i=t?.nameScopesList?.scopeName;i&&r.push(i),t.parent&&e(t.parent)}(t),r}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}let tk=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let r=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new c(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(void 0===t)throw new c(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new c(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}},n=function(e){let t=td(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(r){if(r===e.length)return{line:t.length-1,character:t[t.length-1].length};let n=r,i=0;for(let e of t){if(n<e.length)break;n-=e.length,i++}return{line:i,character:n}},posToIndex:function(e,r){let n=0;for(let r=0;r<e;r++)n+=t[r].length;return n+r}}}(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));(function(e){for(let t=0;t<e.length;t++){let r=e[t];if(r.start.offset>r.end.offset)throw new c(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){let t=e[n],i=r.start.offset<=t.start.offset&&t.start.offset<r.end.offset,o=r.start.offset<t.end.offset&&t.end.offset<=r.end.offset,s=t.start.offset<=r.start.offset&&r.start.offset<t.end.offset,a=t.start.offset<r.end.offset&&r.end.offset<=t.end.offset;if(i||o||s||a){if(i&&o||s&&a||s&&r.start.offset===r.end.offset||o&&t.start.offset===t.end.offset)continue;throw new c(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length){var r=e,n=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]);let i=Array.from(n instanceof Set?n:new Set(n)).sort((e,t)=>e-t);return i.length?r.map(e=>e.flatMap(e=>{let t=i.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let r=0,n=[];for(let i of t)i>r&&n.push({...e,content:e.content.slice(r,i),offset:e.offset+r}),r=i;return r<e.content.length&&n.push({...e,content:e.content.slice(r),offset:e.offset+r}),n})):r}},code(e){if(!this.options.decorations?.length)return;let r=t(this),n=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(n.length!==r.converter.lines.length)throw new c(`Number of lines in code element (${n.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(e,t,r,i){let s=n[e],a="",l=-1,u=-1;if(0===t&&(l=0),0===r&&(u=0),r===1/0&&(u=s.children.length),-1===l||-1===u)for(let e=0;e<s.children.length;e++)a+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(s.children[e]),-1===l&&a.length===t&&(l=e+1),-1===u&&a.length===r&&(u=e+1);if(-1===l)throw new c(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===u)throw new c(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let d=s.children.slice(l,u);if(i.alwaysWrap||d.length!==s.children.length)if(i.alwaysWrap||1!==d.length||"element"!==d[0].type){let e={type:"element",tagName:"span",properties:{},children:d};o(e,i,"wrapper"),s.children.splice(l,d.length,e)}else o(d[0],i,"token");else o(s,i,"line")}function o(e,t,r){let n=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...n,class:e.properties.class},t.properties?.class&&tu(e,t.properties.class),e=i(e,r)||e}let s=[];for(let e of r.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:r}=e;if(t.line===r.line)i(t.line,t.character,r.character,e);else if(t.line<r.line){i(t.line,t.character,1/0,e);for(let i=t.line+1;i<r.line;i++)s.unshift(()=>{var t;n[t=i]=o(n[t],e,"line")});i(r.line,0,r.character,e)}}s.forEach(e=>e())}}}()];function tx(e){let t=function(e){let t=[],r=[],n=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:t,post:r,normal:n}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...tk]}var tw=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],tC={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function tS(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)}}}var tE={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"};let t_={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 tA(e,t,r={}){let{theme:n=e.getLoadedThemes()[0]}=r,i=e.resolveLangAlias(r.lang||"text");if(ta(i)||tc(n))return td(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:o,colorMap:s}=e.setTheme(n);if("ansi"===i)return function(e,t,r){let n,i,o,s=ti(e,r),a=td(t),l=function(e=tE){let t;function r(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(n){switch(n.type){case"named":return e[n.name];case"rgb":return r(n.rgb);case"table":var i;return i=n.index,function(){if(t)return t;t=[];for(let r=0;r<tw.length;r++)t.push(e[tw[r]]);let n=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let i=0;i<6;i++)for(let o=0;o<6;o++)t.push(r([n[e],n[i],n[o]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(r([i,i,i]));return t}()[i]}}}}(Object.fromEntries(tw.map(t=>{let r=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[r]||t_[t]]}))),c=(n=null,i=null,o=new Set,{parse(e){let t=[],r=0;do{let s=function(e,t){let r=e.indexOf("\x1b",t);if(-1!==r&&"["===e[r+1]){let t=e.indexOf("m",r);if(-1!==t)return{sequence:e.substring(r+2,t).split(";"),startPosition:r,position:t+1}}return{position:e.length}}(e,r),a=s.sequence?e.substring(r,s.startPosition):e.substring(r);if(a.length>0&&t.push({value:a,foreground:n,background:i,decorations:new Set(o)}),s.sequence){let e=function(e){let t=[];for(;e.length>0;){let r=e.shift();if(!r)continue;let n=Number.parseInt(r);if(!Number.isNaN(n))if(0===n)t.push({type:"resetAll"});else if(n<=9)tC[n]&&t.push({type:"setDecoration",value:tC[n]});else if(n<=29){let e=tC[n-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)t.push({type:"setForegroundColor",value:{type:"named",name:tw[n-30]}});else if(38===n){let r=tS(e);r&&t.push({type:"setForegroundColor",value:r})}else if(39===n)t.push({type:"resetForegroundColor"});else if(n<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:tw[n-40]}});else if(48===n){let r=tS(e);r&&t.push({type:"setBackgroundColor",value:r})}else 49===n?t.push({type:"resetBackgroundColor"}):53===n?t.push({type:"setDecoration",value:"overline"}):55===n?t.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?t.push({type:"setForegroundColor",value:{type:"named",name:tw[n-90+8]}}):n>=100&&n<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:tw[n-100+8]}})}return t}(s.sequence);for(let t of e)"resetAll"===t.type?(n=null,i=null,o.clear()):"resetForegroundColor"===t.type?n=null:"resetBackgroundColor"===t.type?i=null:"resetDecoration"===t.type&&o.delete(t.value);for(let t of e)"setForegroundColor"===t.type?n=t.value:"setBackgroundColor"===t.type?i=t.value:"setDecoration"===t.type&&o.add(t.value)}r=s.position}while(r<e.length);return t}});return a.map(t=>c.parse(t[0]).map(r=>{let n,i;r.decorations.has("reverse")?(n=r.background?l.value(r.background):e.bg,i=r.foreground?l.value(r.foreground):e.fg):(n=r.foreground?l.value(r.foreground):e.fg,i=r.background?l.value(r.background):void 0),n=to(n,s),i=to(i,s),r.decorations.has("dim")&&(n=function(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],r=e[1],n=e[2],i=e[3],o=Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0");return`#${t}${t}${r}${r}${n}${n}${o}`}else if(3===e.length){let t=e[0],r=e[1],n=e[2];return`#${t}${t}${r}${r}${n}${n}80`}}let r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}(n));let o=w.None;return r.decorations.has("bold")&&(o|=w.Bold),r.decorations.has("italic")&&(o|=w.Italic),r.decorations.has("underline")&&(o|=w.Underline),r.decorations.has("strikethrough")&&(o|=w.Strikethrough),{content:r.value,offset:t[1],color:n,bgColor:i,fontStyle:o}}))}(o,t,r);let a=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==a.name)throw new c(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${a.name}"`);if(!r.grammarState.themes.includes(o.name))throw new c(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${o.name}"`)}var l=t,u=a,d=o,h=s,p=r;let f=tN(l,u,d,h,p),m=new tv(f.stateStack,u.name,d.name);return ty(f.tokens,m),f.tokens}function tN(e,t,r,n,i){let o=ti(r,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500}=i,l=td(e),u=i.grammarState?function(e,t){if(!(e instanceof tv))throw new c("Invalid grammar state");return e.getInternalStack(t)}(i.grammarState,r.name)??ex:null!=i.grammarContextCode?tN(i.grammarContextCode,t,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:ex,d=[],h=[];for(let e=0,c=l.length;e<c;e++){let c,p,[f,m]=l[e];if(""===f){d=[],h.push([]);continue}if(s>0&&f.length>=s){d=[],h.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}i.includeExplanation&&(c=t.tokenizeLine(f,u,a).tokens,p=0);let g=t.tokenizeLine2(f,u,a),y=g.tokens.length/2;for(let e=0;e<y;e++){let t=g.tokens[2*e],s=e+1<y?g.tokens[2*e+2]:f.length;if(t===s)continue;let a=g.tokens[2*e+1],l=to(n[A.getForeground(a)],o),u=A.getFontStyle(a),h={content:f.substring(t,s),offset:m+t,color:l,fontStyle:u};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of r.settings){let r;switch(typeof t.scope){case"string":r=t.scope.split(/,/).map(e=>e.trim());break;case"object":r=t.scope;break;default:continue}e.push({settings:t,selectors:r.map(e=>e.split(/ /))})}h.explanation=[];let n=0;for(;t+n<s;){let t=c[p],r=f.substring(t.startIndex,t.endIndex);n+=r.length,h.explanation.push({content:r,scopes:"scopeName"===i.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let r=[];for(let n=0,i=t.length;n<i;n++){let i=t[n];r[n]={scopeName:i,themeMatches:function(e,t,r){let n=[];for(let{selectors:i,settings:o}of e)for(let e of i)if(function(e,t,r){if(!tM(e[e.length-1],t))return!1;let n=e.length-2,i=r.length-1;for(;n>=0&&i>=0;)tM(e[n],r[i])&&(n-=1),i-=1;return -1===n}(e,t,r)){n.push(o);break}return n}(e,i,t.slice(0,n))}}return r}(e,t.scopes)}),p+=1}}d.push(h)}h.push(d),d=[],u=g.ruleStack}return{tokens:h,stateStack:u}}function tM(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function tT(e,t,r){let n=Object.entries(r.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=n.map(n=>{let i=tA(e,t,{...r,theme:n.theme}),o=tb(i);return{tokens:i,state:o,theme:"string"==typeof n.theme?n.theme:n.theme.name}}),o=function(...e){let t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){let i=e.map(e=>e[n]),o=t.map(()=>[]);t.forEach((e,t)=>e.push(o[t]));let s=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<r;t++){let r=a[t];r.content.length===e?(o[t].push(r),s[t]+=1,a[t]=i[t][s[t]]):(o[t].push({...r,content:r.content.slice(0,e)}),a[t]={...r,content:r.content.slice(e),offset:r.offset+e})}}}return t}(...i.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,i)=>{let s={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in r&&r.includeExplanation&&(s.explanation=e.explanation),o.forEach((e,r)=>{let{content:o,explanation:a,offset:l,...c}=e[t][i];s.variants[n[r].color]=c}),s})),a=i[0].state?new tv(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return a&&ty(s,a),s}function tL(e,t,r){let n,i,o,s,a,l;if("themes"in r){let{defaultColor:u="light",cssVariablePrefix:d="--shiki-",colorsRendering:h="css-vars"}=r,p=Object.entries(r.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===u?-1:+(t.color===u));if(0===p.length)throw new c("`themes` option must not be empty");let f=tT(e,t,r);if(l=tb(f),u&&th!==u&&!p.find(e=>e.color===u))throw new c(`\`themes\` option must contain the defaultColor key \`${u}\``);let m=p.map(t=>e.getTheme(t.theme)),g=p.map(e=>e.color);o=f.map(e=>e.map(e=>(function(e,t,r,n,i="css-vars"){let o={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(t=>tf(e.variants[t])),a=new Set(s.flatMap(e=>Object.keys(e))),l={},u=(e,n)=>{let i="color"===n?"":"background-color"===n?"-bg":`-${n}`;return r+t[e]+("color"===n?"":i)};return s.forEach((e,r)=>{for(let o of a){let a=e[o]||"inherit";if(0===r&&n&&tp.includes(o))if(n===th&&s.length>1){let e=t.findIndex(e=>"light"===e),n=t.findIndex(e=>"dark"===e);if(-1===e||-1===n)throw new c('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let d=s[e][o]||"inherit",h=s[n][o]||"inherit";l[o]=`light-dark(${d}, ${h})`,"css-vars"===i&&(l[u(r,o)]=a)}else l[o]=a;else"css-vars"===i&&(l[u(r,o)]=a)}}),o.htmlStyle=l,o})(e,g,d,u,h))),l&&ty(o,l);let y=p.map(e=>ti(e.theme,r));i=tI(p,m,y,d,u,"fg",h),n=tI(p,m,y,d,u,"bg",h),s=`shiki-themes ${m.map(e=>e.name).join(" ")}`,a=u?void 0:[i,n].join(";")}else if("theme"in r){let a=ti(r.theme,r);o=tA(e,t,r);let c=e.getTheme(r.theme);n=to(c.bg,a),i=to(c.fg,a),s=c.name,l=tb(o)}else throw new c("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:n,themeName:s,rootStyle:a,grammarState:l}}function tI(e,t,r,n,i,o,s){return e.map((a,l)=>{let u=to(t[l][o],r[l])||"inherit",d=`${n+a.color}${"bg"===o?"-bg":""}:${u}`;if(0===l&&i){if(i===th&&e.length>1){let n=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===n||-1===i)throw new c('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let s=to(t[n][o],r[n])||"inherit",a=to(t[i][o],r[i])||"inherit";return`light-dark(${s}, ${a});${d}`}return u}return"css-vars"===s?d:null}).filter(e=>!!e).join(";")}function tj(e,t,r,n={meta:{},options:r,codeToHast:(t,r)=>tj(e,t,r),codeToTokens:(t,r)=>tL(e,t,r)}){let i=t;for(let e of tx(r))i=e.preprocess?.call(n,i,r)||i;let{tokens:o,fg:s,bg:a,themeName:l,rootStyle:c,grammarState:u}=tL(e,i,r),{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=r;!0===d?o=o.map(e=>{let t,r=[],n="";return e.forEach((i,o)=>{let s=!(i.fontStyle&&(i.fontStyle&w.Underline||i.fontStyle&w.Strikethrough));s&&i.content.match(/^\s+$/)&&e[o+1]?(void 0===t&&(t=i.offset),n+=i.content):n?(s?r.push({...i,offset:t,content:n+i.content}):r.push({content:n,offset:t},i),t=void 0,n=""):r.push(i)}),r}):"never"===d&&(o=o.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,r,n,i]=t;if(!r&&!i)return e;let o=[{...e,offset:e.offset+r.length,content:n}];return r&&o.unshift({content:r,offset:e.offset}),i&&o.push({content:i,offset:e.offset+r.length+n.length}),o}))),h&&(o=o.map(e=>{let t=[];for(let r of e){if(0===t.length){t.push({...r});continue}let e=t[t.length-1],n=tm(e.htmlStyle||tf(e)),i=tm(r.htmlStyle||tf(r)),o=e.fontStyle&&(e.fontStyle&w.Underline||e.fontStyle&w.Strikethrough),s=r.fontStyle&&(r.fontStyle&w.Underline||r.fontStyle&w.Strikethrough);o||s||n!==i?t.push({...r}):e.content+=r.content}return t}));let p={...n,get source(){return i}};for(let e of tx(r))o=e.tokens?.call(p,o)||o;return function(e,t,r,n=tb(e)){let i=tx(t),o=[],s={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};for(let[e,r]of(!1!==t.rootStyle&&(null!=t.rootStyle?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(c.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(c[e]=r);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:o},h=[],p={...r,structure:a,addClassToHast:tu,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return u},get code(){return d},get lines(){return h}};if(e.forEach((e,t)=>{t&&("inline"===a?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&o.push({type:"text",value:"\n"}));let r={type:"element",tagName:"span",properties:{class:"line"},children:[]},n=0;for(let o of e){let e={type:"element",tagName:"span",properties:{...o.htmlAttrs},children:[{type:"text",value:o.content}]},l=tm(o.htmlStyle||tf(o));for(let s of(l&&(e.properties.style=l),i))e=s?.span?.call(p,e,t+1,n,r,o)||e;"inline"===a?s.children.push(e):"classic"===a&&r.children.push(e),n+=o.content.length}if("classic"===a){for(let e of i)r=e?.line?.call(p,r,t+1)||r;h.push(r),o.push(r)}else"inline"===a&&h.push(r)}),"classic"===a){for(let e of i)d=e?.code?.call(p,d)||d;for(let e of(u.children.push(d),i))u=e?.pre?.call(p,u)||u;s.children.push(u)}else if("inline"===a){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let r of s.children)"element"===r.type&&"br"===r.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===r.type||"text"===r.type)&&t.children.push(r);e.push(t);let r={type:"element",tagName:"code",properties:{},children:e};for(let e of i)r=e?.code?.call(p,r)||r;s.children=[];for(let e=0;e<r.children.length;e++){e>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=r.children[e];"element"===t.type&&s.children.push(...t.children)}}let f=s;for(let e of i)f=e?.root?.call(p,f)||f;return n&&ty(f,n),f}(o,{...r,fg:s,bg:a,themeName:l,rootStyle:!1!==r.rootStyle&&(r.rootStyle??c)},p,u)}let tR=function(e,t){let r=t||e7,n=r.quote||'"';if('"'!==n&&"'"!==n)throw Error("Invalid quote `"+n+"`, expected `'` or `\"`");return({one:tr,all:tn,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||ew.b,characterReferences:r.characterReferences||te,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:"svg"===r.space?eC.JW:eC.qy,quote:n,alternative:'"'===n?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)},tO={light:"#333333",dark:"#bbbbbb"},tP={light:"#fffffe",dark:"#1e1e1e"},t$="__shiki_resolved";function tz(e){if(e?.[t$])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:r,fg:n}=t;if(!r||!n){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(n=e.settings.foreground),e?.settings?.background&&(r=e.settings.background),!n&&t?.colors?.["editor.foreground"]&&(n=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),n||(n="light"===t.type?tO.light:tO.dark),r||(r="light"===t.type?tP.light:tP.dark),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,o=new Map;function s(e){if(o.has(e))return o.get(e);i+=1;let r=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${r}`]?s(e):(o.set(e,r),r)}for(let e of(t.settings=t.settings.map(e=>{let r=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),n=e.settings?.background&&!e.settings.background.startsWith("#");if(!r&&!n)return e;let i={...e,settings:{...e.settings}};if(r){let r=s(e.settings.foreground);t.colorReplacements[r]=e.settings.foreground,i.settings.foreground=r}if(n){let r=s(e.settings.background);t.colorReplacements[r]=e.settings.background,i.settings.background=r}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let r=s(t.colors[e]);t.colorReplacements[r]=t.colors[e],t.colors[e]=r}return Object.defineProperty(t,t$,{enumerable:!1,writable:!1,value:!0}),t}async function tD(e){return Array.from(new Set((await Promise.all(e.filter(e=>!tl(e)).map(async e=>await ts(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function tB(e){return(await Promise.all(e.map(async e=>tc(e)?null:tz(await ts(e))))).filter(e=>!!e)}class tF extends Error{constructor(e){super(e),this.name="ShikiError"}}function tH(e,t){if(!t)return e;if(t[e]){let r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new tF(`Circular alias \`${Array.from(r).join(" -> ")} -> ${e}\``);r.add(e)}}return e}class tU extends ek{constructor(e,t,r,n={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=n,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=tz(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=b.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=tH(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 r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let n=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(n.name=e.name,this._resolvedGrammars.set(e.name,n),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()),r=t.filter(([e,t])=>!t);if(r.length){let e=t.filter(([e,t])=>{if(!t)return!1;let n=t.embeddedLanguages||t.embeddedLangs;return n?.some(e=>r.map(([e])=>e).includes(e))}).filter(e=>!r.includes(e));throw new tF(`Missing languages ${r.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,r]of t)this._resolver.addLanguage(r);for(let[e,r]of t)this.loadLanguage(r)}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 tG{_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("."),r=[];for(let e=1;e<=t.length;e++){let n=t.slice(0,e).join(".");r=[...r,...this._injections.get(n)||[]]}return r}}let tq=0;async function tW(e){e.engine||function(e,t=3){if(!(t>3))if(1)console.trace(`[SHIKI DEPRECATE]: ${e}`);else throw Error(`[SHIKI DEPRECATE]: ${e}`)}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,r,n]=await Promise.all([tB(e.themes||[]),tD(e.langs||[]),e.engine]);return function(e){let t;tq+=1,!1!==e.warnings&&tq>=10&&tq%10==0&&console.warn(`[Shiki] ${tq} 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 r=!1;if(!e.engine)throw new tF("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(tz),o=new tU(new tG(e.engine,n),i,n,e.langAlias);function s(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();let t=o.getTheme(e);if(!t)throw new tF(`Theme \`${e}\` not found, you may need to load it first`);return t}function a(...e){c(),o.loadLanguages(e.flat(1))}function l(...e){for(let t of(c(),e.flat(1)))o.loadTheme(t)}function c(){if(r)throw new tF("Shiki instance has been disposed")}function u(){r||(r=!0,o.dispose(),tq-=1)}return{setTheme:function(e){c();let r=s(e);return t!==e&&(o.setTheme(r),t=e),{theme:r,colorMap:o.getColorMap()}},getTheme:s,getLanguage:function(e){c();let t=o.getGrammar("string"==typeof e?e:e.name);if(!t)throw new tF(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return c(),o.getLoadedThemes()},getLoadedLanguages:function(){return c(),o.getLoadedLanguages()},resolveLangAlias:function(t){return tH(t,e.langAlias)},loadLanguage:async function(...e){return a(await tD(e))},loadLanguageSync:a,loadTheme:async function(...e){return c(),l(await tB(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}({...e,themes:t,langs:r,engine:n})}async function tV(e){let t=await tW(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return tb(e[1]);let[t,r,n={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=n;if(ta(i)||tc(o))throw new c("Plain language does not have grammar state");if("ansi"===i)throw new c("ANSI language does not have grammar state");let{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new tv(tN(r,l,s,a,n).stateStack,l.name,s.name)})(t,...e),codeToTokensBase:(e,r)=>tA(t,e,r),codeToTokensWithThemes:(e,r)=>tT(t,e,r),codeToTokens:(e,r)=>tL(t,e,r),codeToHast:(e,r)=>tj(t,e,r),codeToHtml:(e,r)=>(function(e,t,r){let n={meta:{},options:r,codeToHast:(t,r)=>tj(e,t,r),codeToTokens:(t,r)=>tL(e,t,r)},i=tR(tj(e,t,r,n));for(let e of tx(r))i=e.postprocess?.call(n,i,r)||i;return i})(t,e,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}let tK=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>r.e(6481).then(r.bind(r,16481))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>r.e(1038).then(r.bind(r,1038))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>r.e(8850).then(r.bind(r,86469))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>r.e(4869).then(r.bind(r,44869))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>r.e(3104).then(r.bind(r,93104))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>r.e(556).then(r.bind(r,10556))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>r.e(9066).then(r.bind(r,79066))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>r.e(5973).then(r.bind(r,75973))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>r.e(9782).then(r.bind(r,29782))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>r.e(1832).then(r.bind(r,61832))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>r.e(4419).then(r.bind(r,54419))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>r.e(4482).then(r.bind(r,54482))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>r.e(8817).then(r.bind(r,88817))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>r.e(137).then(r.bind(r,80137))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>r.e(1275).then(r.bind(r,51275))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>r.e(8235).then(r.bind(r,28235))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>r.e(4470).then(r.bind(r,44470))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>r.e(6235).then(r.bind(r,66235))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>r.e(4715).then(r.bind(r,24715))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>r.e(4811).then(r.bind(r,64811))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>r.e(5163).then(r.bind(r,15163))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>r.e(2957).then(r.bind(r,42957))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>r.e(67).then(r.bind(r,10067))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>r.e(2890).then(r.bind(r,32890))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>r.e(1933).then(r.bind(r,21933))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>r.e(6160).then(r.bind(r,13779))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>r.e(8218).then(r.bind(r,28218))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>r.e(9084).then(r.bind(r,19084))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:()=>r.e(5079).then(r.bind(r,65079))},{id:"houston",displayName:"Houston",type:"dark",import:()=>r.e(1291).then(r.bind(r,61291))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>r.e(5908).then(r.bind(r,35908))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>r.e(8140).then(r.bind(r,28140))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>r.e(2394).then(r.bind(r,82394))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>r.e(7379).then(r.bind(r,67379))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>r.e(1344).then(r.bind(r,91344))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>r.e(6126).then(r.bind(r,96126))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>r.e(6924).then(r.bind(r,96924))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>r.e(6556).then(r.bind(r,76556))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>r.e(3759).then(r.bind(r,23759))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>r.e(9059).then(r.bind(r,89059))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>r.e(6056).then(r.bind(r,56056))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>r.e(2234).then(r.bind(r,32234))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>r.e(7859).then(r.bind(r,67859))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>r.e(7326).then(r.bind(r,67326))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>r.e(3917).then(r.bind(r,83917))},{id:"nord",displayName:"Nord",type:"dark",import:()=>r.e(4977).then(r.bind(r,77358))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>r.e(658).then(r.bind(r,40658))},{id:"one-light",displayName:"One Light",type:"light",import:()=>r.e(8630).then(r.bind(r,8630))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>r.e(1473).then(r.bind(r,91473))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>r.e(3375).then(r.bind(r,35756))},{id:"red",displayName:"Red",type:"dark",import:()=>r.e(9728).then(r.bind(r,49728))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>r.e(6849).then(r.bind(r,16849))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>r.e(1330).then(r.bind(r,81330))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>r.e(3895).then(r.bind(r,93895))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>r.e(2908).then(r.bind(r,22908))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>r.e(7465).then(r.bind(r,67465))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>r.e(23).then(r.bind(r,60023))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>r.e(9559).then(r.bind(r,9559))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>r.e(8959).then(r.bind(r,98959))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>r.e(4543).then(r.bind(r,74543))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>r.e(6654).then(r.bind(r,26654))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>r.e(3878).then(r.bind(r,93878))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>r.e(674).then(r.bind(r,60674))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>r.e(8831).then(r.bind(r,88831))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>r.e(8743).then(r.bind(r,8743))}].map(e=>[e.id,e.import]));var tJ=r(6389).Buffer;class tZ extends Error{constructor(e){super(e),this.name="ShikiError"}}function tX(){return"undefined"!=typeof performance?performance.now():Date.now()}let tQ=(e,t)=>e+(t-e%t)%t;async function tY(e){let t,r,n={};function i(e){r=e,n.HEAPU8=new Uint8Array(e),n.HEAPU32=new Uint32Array(e)}let o="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function s(e,t){return e?function(e,t,r=1024){let n=t+r,i=t;for(;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&o)return o.decode(e.subarray(t,i));let s="";for(;t<i;){let r=e[t++];if(!(128&r)){s+=String.fromCharCode(r);continue}let n=63&e[t++];if((224&r)==192){s+=String.fromCharCode((31&r)<<6|n);continue}let i=63&e[t++];if((r=(240&r)==224?(15&r)<<12|n<<6|i:(7&r)<<18|n<<12|i<<6|63&e[t++])<65536)s+=String.fromCharCode(r);else{let e=r-65536;s+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return s}(n.HEAPU8,e,t):""}let a={emscripten_get_now:tX,emscripten_memcpy_big:function(e,t,r){n.HEAPU8.copyWithin(e,t,t+r)},emscripten_resize_heap:function(e){let o=n.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let n=1;n<=4;n*=2){let s=o*(1+.2/n);if(s=Math.min(s,e+0x6000000),function(e){try{return t.grow(e-r.byteLength+65535>>>16),i(t.buffer),1}catch{}}(Math.min(0x80000000,tQ(Math.max(e,s),65536))))return!0}return!1},fd_write:()=>0};async function l(){let r=await e({env:a,wasi_snapshot_preview1:a});i((t=r.memory).buffer),Object.assign(n,r),n.UTF8ToString=s}return await l(),n}var t0=Object.defineProperty,t1=(e,t,r)=>((e,t,r)=>t in e?t0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);let t2=null;class t5{constructor(e){t1(this,"utf16Length"),t1(this,"utf8Length"),t1(this,"utf16Value"),t1(this,"utf8Value"),t1(this,"utf16OffsetToUtf8"),t1(this,"utf8OffsetToUtf16");let t=e.length,r=t5._utf8ByteLength(e),n=r!==t,i=n?new Uint32Array(t+1):null;n&&(i[t]=r);let o=n?new Uint32Array(r+1):null;n&&(o[r]=t);let s=new Uint8Array(r),a=0;for(let r=0;r<t;r++){let l=e.charCodeAt(r),c=l,u=!1;if(l>=55296&&l<=56319&&r+1<t){let t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(c=(l-55296<<10)+65536|t-56320,u=!0)}n&&(i[r]=a,u&&(i[r+1]=a),c<=127?o[a+0]=r:c<=2047?(o[a+0]=r,o[a+1]=r):c<=65535?(o[a+0]=r,o[a+1]=r,o[a+2]=r):(o[a+0]=r,o[a+1]=r,o[a+2]=r,o[a+3]=r)),c<=127?s[a++]=c:(c<=2047?s[a++]=192|(1984&c)>>>6:(c<=65535?s[a++]=224|(61440&c)>>>12:(s[a++]=240|(1835008&c)>>>18,s[a++]=128|(258048&c)>>>12),s[a++]=128|(4032&c)>>>6),s[a++]=128|(63&c)>>>0),u&&r++}this.utf16Length=t,this.utf8Length=r,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let r=0,n=e.length;r<n;r++){let i=e.charCodeAt(r),o=i,s=!1;if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(o=(i-55296<<10)+65536|t-56320,s=!0)}o<=127?t+=1:o<=2047?t+=2:o<=65535?t+=3:t+=4,s&&r++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let t3=class e{constructor(t){if(t1(this,"id",++e.LAST_ID),t1(this,"_onigBinding"),t1(this,"content"),t1(this,"utf16Length"),t1(this,"utf8Length"),t1(this,"utf16OffsetToUtf8"),t1(this,"utf8OffsetToUtf16"),t1(this,"ptr"),!t2)throw new tZ("Must invoke loadWasm first.");this._onigBinding=t2,this.content=t;let r=new t5(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=t2.omalloc(1e4)),e._sharedPtrInUse=!0,t2.HEAPU8.set(r.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=r.createString(t2)}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)}};t1(t3,"LAST_ID",0),t1(t3,"_sharedPtr",0),t1(t3,"_sharedPtrInUse",!1);class t6{constructor(e){if(t1(this,"_onigBinding"),t1(this,"_ptr"),!t2)throw new tZ("Must invoke loadWasm first.");let t=[],r=[];for(let n=0,i=e.length;n<i;n++){let i=new t5(e[n]);t[n]=i.createString(t2),r[n]=i.utf8Length}let n=t2.omalloc(4*e.length);t2.HEAPU32.set(t,n/4);let i=t2.omalloc(4*e.length);t2.HEAPU32.set(r,i/4);let o=t2.createOnigScanner(n,i,e.length);for(let r=0,n=e.length;r<n;r++)t2.ofree(t[r]);t2.ofree(i),t2.ofree(n),0===o&&function(e){throw new tZ(e.UTF8ToString(e.getLastOnigError()))}(t2),this._onigBinding=t2,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,r){let n=0;if("number"==typeof r&&(n=r),"string"==typeof e){e=new t3(e);let r=this._findNextMatchSync(e,t,!1,n);return e.dispose(),r}return this._findNextMatchSync(e,t,!1,n)}_findNextMatchSync(e,t,r,n){let i=this._onigBinding,o=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),n);if(0===o)return null;let s=i.HEAPU32,a=o/4,l=s[a++],c=s[a++],u=[];for(let t=0;t<c;t++){let r=e.convertUtf8OffsetToUtf16(s[a++]),n=e.convertUtf8OffsetToUtf16(s[a++]);u[t]={start:r,end:n,length:n-r}}return{index:l,captureIndices:u}}}function t4(e){return t=>WebAssembly.instantiate(e,t)}async function t9(e){return e&&await (i||(i=async function(){t2=await tY(async t=>{let r=e;if("function"==typeof(r=await r)&&(r=await r(t)),"function"==typeof r&&(r=await r(t)),"function"==typeof r.instantiator)r=await r.instantiator(t);else if("function"==typeof r.default)r=await r.default(t);else{var n,i,o,s;if(void 0!==r.data&&(r=r.data),n=r,"undefined"!=typeof Response&&n instanceof Response){r="function"==typeof WebAssembly.instantiateStreaming?await (o=r,e=>WebAssembly.instantiateStreaming(o,e))(t):await (s=r,async e=>{let t=await s.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(i=r,"undefined"!=typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||void 0!==tJ&&tJ.isBuffer?.(i)||"undefined"!=typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&i instanceof Uint32Array||r instanceof WebAssembly.Module)?r=await t4(r)(t):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await t4(r.default)(t))}return"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}())),{createScanner:e=>new t6(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new t3(e)}}let t8=function(e){let t=e.langs,r=e.themes,n=e.engine;return async function(e){function i(r){if("string"==typeof r){if(tl(r=e.langAlias?.[r]||r))return[];let n=t[r];if(!n)throw new c(`Language \`${r}\` is not included in this bundle. You may want to load it from external source.`);return n}return r}function o(e){if(tc(e))return"none";if("string"==typeof e){let t=r[e];if(!t)throw new c(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let s=(e.themes??[]).map(e=>o(e)),a=(e.langs??[]).map(e=>i(e)),l=await tV({engine:e.engine??n(),...e,themes:s,langs:a});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(i)),loadTheme:(...e)=>l.loadTheme(...e.map(o)),getBundledLanguages:()=>t,getBundledThemes:()=>r}}}({langs:l,themes:tK,engine:()=>t9(Promise.all([r.e(4352),r.e(9677)]).then(r.bind(r,99677)))});function t7(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let re=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),rt=String.raw;function rr(e,t){if(null==e)throw Error(t??"Value expected");return e}let rn=rt`\[\^?`,ri=`c.? | C(?:-.?)?|${rt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${rt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${rt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${rt`o\{[^\}]*\}?`}|${rt`\d{1,3}`}`,ro=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,rs=RegExp(rt`
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7940],{143:(e,t,r)=>{var n;try{n=r(15910)}catch(e){}n||(n=window.graphlib),e.exports=n},713:(e,t,r)=>{var n=r(37155);e.exports=function(e){return n(e,5)}},801:(e,t,r)=>{var n=r(77220),i=r(30004),o=r(58587),s=r(90827);e.exports=i(function(e){return o(n(e,1,s,!0))})},855:(e,t,r)=>{var n=r(95589),i=r(53542);e.exports=function(e,t){return e&&n(t,i(t),e)}},898:(e,t,r)=>{var n=r(88055);e.exports=function(){this.__data__=new n,this.size=0}},1578:e=>{e.exports=function(e,t){return e<t}},1851:(e,t,r)=>{var n=r(11581),i=r(32724),o=r(143).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),r=new o({compound:!0,multigraph:!0}).setGraph({});return n.forEach(e.nodes(),function(t){r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)}),n.forEach(e.edges(),function(e){r.setEdge(e.v,e.w,{},e.name)}),n.forEach(t,function(e,t){r.setNode("layer"+t,{rank:"same"}),n.reduce(e,function(e,t){return r.setEdge(e,t,{style:"invis"}),t})}),r}}},1861:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},2253:(e,t,r)=>{var n=r(60682),i=r(39626),o=r(12721);e.exports=n&&1/o(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i},2379:(e,t,r)=>{var n=r(57031),i=r(20618),o=r(47869);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},2598:(e,t,r)=>{var n=r(39358);e.exports=function(e){return null==e?"":n(e)}},2627:(e,t,r)=>{var n=r(2379),i=r(6402),o=r(63120),s=r(91347),a=r(78815);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):n(e):a(e)}},3399:(e,t,r)=>{var n=r(41967),i=r(2627),o=r(7271),s=Math.max;e.exports=function(e,t,r){var a=null==e?0:e.length;if(!a)return -1;var l=null==r?0:o(r);return l<0&&(l=s(a+l,0)),n(e,i(t,3),l)}},3620:(e,t,r)=>{var n=r(11581);e.exports=function(e,t){return n.map(t,function(t){var r=e.inEdges(t);if(!r.length)return{v:t};var i=n.reduce(r,function(t,r){var n=e.edge(r),i=e.node(r.v);return{sum:t.sum+n.weight*i.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}})}},3721:(e,t,r)=>{var n=r(77078);e.exports=r(59793)(n)},3941:(e,t,r)=>{var n=r(84364),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},4006:(e,t,r)=>{var n=r(77651),i=r(96830),o=r(91347),s=r(86237),a=r(25238),l=r(24837);e.exports=function(e,t,r){t=n(t,e);for(var c=-1,u=t.length,d=!1;++c<u;){var h=l(t[c]);if(!(d=null!=e&&r(e,h)))break;e=e[h]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&a(u)&&s(h,u)&&(o(e)||i(e))}},4518:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},4850:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5654:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6164:(e,t,r)=>{e.exports=r(32771)(Object.keys,Object)},6402:(e,t,r)=>{var n=r(33546),i=r(36966),o=r(13913),s=r(36942),a=r(41118),l=r(47869),c=r(24837);e.exports=function(e,t){return s(e)&&a(t)?l(c(e),t):function(r){var s=i(r,e);return void 0===s&&s===t?o(r,e):n(t,s,3)}}},6534:(e,t,r)=>{var n=r(96348),i=r(12863),o=r(2627);e.exports=function(e,t){var r={};return t=o(t,3),i(e,function(e,i,o){n(r,i,t(e,i,o))}),r}},7145:(e,t,r)=>{var n=r(30727);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},7271:(e,t,r)=>{var n=r(28400);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},7696:(e,t,r)=>{var n=r(2627),i=r(44700),o=r(53542);e.exports=function(e){return function(t,r,s){var a=Object(t);if(!i(t)){var l=n(r,3);t=o(t),r=function(e){return l(a[e],e,a)}}var c=e(t,r,s);return c>-1?a[l?t[c]:c]:void 0}}},8586:(e,t,r)=>{var n=r(99083);e.exports=function(){return n.Date.now()}},8665:(e,t,r)=>{var n=r(29558);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},8896:(e,t,r)=>{var n=r(30004),i=r(69048),o=r(34370),s=r(95285),a=Object.prototype,l=a.hasOwnProperty;e.exports=n(function(e,t){e=Object(e);var r=-1,n=t.length,c=n>2?t[2]:void 0;for(c&&o(t[0],t[1],c)&&(n=1);++r<n;)for(var u=t[r],d=s(u),h=-1,p=d.length;++h<p;){var f=d[h],m=e[f];(void 0===m||i(m,a[f])&&!l.call(e,f))&&(e[f]=u[f])}return e})},9135:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},9281:(e,t,r)=>{e.exports=r(71633)()},10196:(e,t,r)=>{e.exports={graphlib:r(143),layout:r(66158),debug:r(1851),util:{time:r(32724).time,notime:r(32724).notime},version:r(12204)}},10283:(e,t,r)=>{e.exports=r(31184)()},10338:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},10548:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},11078:e=>{e.exports=function(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}},11254:(e,t,r)=>{var n=r(53237),i=r(5654);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},11581:(e,t,r)=>{var n;try{n={cloneDeep:r(713),constant:r(29974),defaults:r(8896),each:r(67007),filter:r(78968),find:r(41021),flatten:r(43372),forEach:r(14532),forIn:r(52542),has:r(29122),isUndefined:r(73838),last:r(4850),map:r(87956),mapValues:r(6534),max:r(94796),merge:r(65310),min:r(13729),minBy:r(32591),now:r(8586),pick:r(89287),range:r(10283),reduce:r(43900),sortBy:r(85655),uniqueId:r(77512),values:r(42180),zipObject:r(51094)}}catch(e){}n||(n=window._),e.exports=n},12151:(e,t,r)=>{var n=r(12863);e.exports=r(93255)(n)},12204:e=>{e.exports="0.8.5"},12721:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},12814:(e,t,r)=>{var n=r(86366),i=r(88046);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},12863:(e,t,r)=>{var n=r(9281),i=r(53542);e.exports=function(e,t){return e&&n(e,t,i)}},13570:(e,t,r)=>{var n=r(15178),i=r(72657),o=r(86319),s=o&&o.isSet;e.exports=s?i(s):n},13729:(e,t,r)=>{var n=r(68105),i=r(1578),o=r(63120);e.exports=function(e){return e&&e.length?n(e,o,i):void 0}},13913:(e,t,r)=>{var n=r(95521),i=r(4006);e.exports=function(e,t){return null!=e&&i(e,t,n)}},14507:(e,t,r)=>{"use strict";r.d(t,{$f:()=>T,G2:()=>v,I$:()=>S,Im:()=>I,Qv:()=>l,Sd:()=>y,Z1:()=>E,_G:()=>u,_e:()=>p,bh:()=>k,eB:()=>c,eT:()=>g,ec:()=>L,hy:()=>A,ic:()=>s,iz:()=>_,pC:()=>w,yY:()=>x,y_:()=>j});var n=r(28155),i=r(65282),o=r(32603);let s=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:r}=e.selection;return r&&(t?t.endOfTextblock("backward",e):!(r.parentOffset>0))?r:null}let l=(e,t,r)=>{let s=a(e,r);if(!s)return!1;let l=f(s);if(!l){let r=s.blockRange(),i=r&&(0,n.jP)(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)}let c=l.nodeBefore;if(N(e,l,t,-1))return!0;if(0==s.parent.content.size&&(h(c,"end")||o.nh.isSelectable(c)))for(let r=s.depth;;r--){let a=(0,n.$L)(e.doc,s.before(r),s.after(r),i.Ji.empty);if(a&&a.slice.size<a.to-a.from){if(t){let r=e.tr.step(a);r.setSelection(h(c,"end")?o.LN.findFrom(r.doc.resolve(r.mapping.map(l.pos,-1)),-1):o.nh.create(r.doc,l.pos-c.nodeSize)),t(r.scrollIntoView())}return!0}if(1==r||s.node(r-1).childCount>1)break}return!!c.isAtom&&l.depth==s.depth-1&&(t&&t(e.tr.delete(l.pos-c.nodeSize,l.pos).scrollIntoView()),!0)},c=(e,t,r)=>{let n=a(e,r);if(!n)return!1;let i=f(n);return!!i&&d(e,i,t)},u=(e,t,r)=>{let n=m(e,r);if(!n)return!1;let i=b(n);return!!i&&d(e,i,t)};function d(e,t,r){let s=t.nodeBefore,a=t.pos-1;for(;!s.isTextblock;a--){if(s.type.spec.isolating)return!1;let e=s.lastChild;if(!e)return!1;s=e}let l=t.nodeAfter,c=t.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let e=l.firstChild;if(!e)return!1;l=e}let u=(0,n.$L)(e.doc,a,c,i.Ji.empty);if(!u||u.from!=a||u instanceof n.Ln&&u.slice.size>=c-a)return!1;if(r){let t=e.tr.step(u);t.setSelection(o.U3.create(t.doc,a)),r(t.scrollIntoView())}return!0}function h(e,t,r=!1){for(let n=e;n;n="start"==t?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&1!=n.childCount)break}return!1}let p=(e,t,r)=>{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;s=f(n)}let a=s&&s.nodeBefore;return!!a&&!!o.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(o.nh.create(e.doc,s.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:r}=e.selection;return r&&(t?t.endOfTextblock("forward",e):!(r.parentOffset<r.parent.content.size))?r:null}let g=(e,t,r)=>{let s=m(e,r);if(!s)return!1;let a=b(s);if(!a)return!1;let l=a.nodeAfter;if(N(e,a,t,1))return!0;if(0==s.parent.content.size&&(h(l,"start")||o.nh.isSelectable(l))){let r=(0,n.$L)(e.doc,s.before(),s.after(),i.Ji.empty);if(r&&r.slice.size<r.to-r.from){if(t){let n=e.tr.step(r);n.setSelection(h(l,"start")?o.LN.findFrom(n.doc.resolve(n.mapping.map(a.pos)),1):o.nh.create(n.doc,n.mapping.map(a.pos))),t(n.scrollIntoView())}return!0}}return!!l.isAtom&&a.depth==s.depth-1&&(t&&t(e.tr.delete(a.pos,a.pos+l.nodeSize).scrollIntoView()),!0)},y=(e,t,r)=>{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)return!1;s=b(n)}let a=s&&s.nodeAfter;return!!a&&!!o.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(o.nh.create(e.doc,s.pos)).scrollIntoView()),!0)};function b(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let r=e.node(t);if(e.index(t)+1<r.childCount)return e.doc.resolve(e.after(t+1));if(r.type.spec.isolating)break}return null}let v=(e,t)=>{let r=e.selection,i=r instanceof o.nh,s;if(i){if(r.node.isTextblock||!(0,n.n9)(e.doc,r.from))return!1;s=r.from}else if(null==(s=(0,n.N0)(e.doc,r.from,-1)))return!1;if(t){let r=e.tr.join(s);i&&r.setSelection(o.nh.create(r.doc,s-e.doc.resolve(s).nodeBefore.nodeSize)),t(r.scrollIntoView())}return!0},k=(e,t)=>{let r=e.selection,i;if(r instanceof o.nh){if(r.node.isTextblock||!(0,n.n9)(e.doc,r.to))return!1;i=r.to}else if(null==(i=(0,n.N0)(e.doc,r.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},x=(e,t)=>{let{$from:r,$to:i}=e.selection,o=r.blockRange(i),s=o&&(0,n.jP)(o);return null!=s&&(t&&t(e.tr.lift(o,s).scrollIntoView()),!0)},w=(e,t)=>{let{$head:r,$anchor:n}=e.selection;return!!r.parent.type.spec.code&&!!r.sameParent(n)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function C(e){for(let t=0;t<e.edgeCount;t++){let{type:r}=e.edge(t);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}let S=(e,t)=>{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),s=r.indexAfter(-1),a=C(i.contentMatchAt(s));if(!a||!i.canReplaceWith(s,s,a))return!1;if(t){let n=r.after(),i=e.tr.replaceWith(n,n,a.createAndFill());i.setSelection(o.LN.near(i.doc.resolve(n),1)),t(i.scrollIntoView())}return!0},E=(e,t)=>{let r=e.selection,{$from:n,$to:i}=r;if(r instanceof o.i5||n.parent.inlineContent||i.parent.inlineContent)return!1;let s=C(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let r=(!n.parentOffset&&i.index()<i.parent.childCount?n:i).pos,a=e.tr.insert(r,s.createAndFill());a.setSelection(o.U3.create(a.doc,r+1)),t(a.scrollIntoView())}return!0},_=(e,t)=>{let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if((0,n.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=r.blockRange(),o=i&&(0,n.jP)(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},A=(e,t)=>{let{$from:r,to:n}=e.selection,i,s=r.sharedDepth(n);return 0!=s&&(i=r.before(s),t&&t(e.tr.setSelection(o.nh.create(e.doc,i))),!0)};function N(e,t,r,s){let a,l,c,u=t.nodeBefore,d=t.nodeAfter,p,f,m=u.type.spec.isolating||d.type.spec.isolating;if(!m&&(a=t.nodeBefore,l=t.nodeAfter,c=t.index(),a&&l&&a.type.compatibleContent(l.type)&&(!a.content.size&&t.parent.canReplace(c-1,c)?(r&&r(e.tr.delete(t.pos-a.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(c,c+1)&&!!(l.isTextblock||(0,n.n9)(e.doc,t.pos))&&(r&&r(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let g=!m&&t.parent.canReplace(t.index(),t.index()+1);if(g&&(p=(f=u.contentMatchAt(u.childCount)).findWrapping(d.type))&&f.matchType(p[0]||d.type).validEnd){if(r){let o=t.pos+d.nodeSize,s=i.FK.empty;for(let e=p.length-1;e>=0;e--)s=i.FK.from(p[e].create(null,s));s=i.FK.from(u.copy(s));let a=e.tr.step(new n.Wg(t.pos-1,o,t.pos,o,new i.Ji(s,1,0),p.length,!0)),l=a.doc.resolve(o+2*p.length);l.nodeAfter&&l.nodeAfter.type==u.type&&(0,n.n9)(a.doc,l.pos)&&a.join(l.pos),r(a.scrollIntoView())}return!0}let y=d.type.spec.isolating||s>0&&m?null:o.LN.findFrom(t,1),b=y&&y.$from.blockRange(y.$to),v=b&&(0,n.jP)(b);if(null!=v&&v>=t.depth)return r&&r(e.tr.lift(b,v).scrollIntoView()),!0;if(g&&h(d,"start",!0)&&h(u,"end")){let o=u,s=[];for(;s.push(o),!o.isTextblock;)o=o.lastChild;let a=d,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(o.canReplace(o.childCount,o.childCount,a.content)){if(r){let o=i.FK.empty;for(let e=s.length-1;e>=0;e--)o=i.FK.from(s[e].copy(o));r(e.tr.step(new n.Wg(t.pos-s.length,t.pos+d.nodeSize,t.pos+l,t.pos+d.nodeSize-l,new i.Ji(o,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function M(e){return function(t,r){let n=t.selection,i=e<0?n.$from:n.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return!!i.node(s).isTextblock&&(r&&r(t.tr.setSelection(o.U3.create(t.doc,e<0?i.start(s):i.end(s)))),!0)}}let T=M(-1),L=M(1);function I(e,t=null){return function(r,i){let{$from:o,$to:s}=r.selection,a=o.blockRange(s),l=a&&(0,n.oM)(a,e,t);return!!l&&(i&&i(r.tr.wrap(a,l).scrollIntoView()),!0)}}function j(e,t=null){return function(r,n){let i=!1;for(let n=0;n<r.selection.ranges.length&&!i;n++){let{$from:{pos:o},$to:{pos:s}}=r.selection.ranges[n];r.doc.nodesBetween(o,s,(n,o)=>{if(i)return!1;if(!(!n.isTextblock||n.hasMarkup(e,t)))if(n.type==e)i=!0;else{let t=r.doc.resolve(o),n=t.index();i=t.parent.canReplaceWith(n,n+1,e)}})}if(!i)return!1;if(n){let i=r.tr;for(let n=0;n<r.selection.ranges.length;n++){let{$from:{pos:o},$to:{pos:s}}=r.selection.ranges[n];i.setBlockType(o,s,e,t)}n(i.scrollIntoView())}return!0}}function R(...e){return function(t,r,n){for(let i=0;i<e.length;i++)if(e[i](t,r,n))return!0;return!1}}let O=R(s,l,p),P=R(s,g,y),$={Enter:R(w,E,_,(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof o.nh&&e.selection.node.isBlock)return!!r.parentOffset&&!!(0,n.zy)(e.doc,r.pos)&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],a,l,c=!1,u=!1;for(let e=r.depth;;e--){if(r.node(e).isBlock){let t;c=r.end(e)==r.pos+(r.depth-e),u=r.start(e)==r.pos-(r.depth-e),l=C(r.node(e-1).contentMatchAt(r.indexAfter(e-1)));s.unshift(t||(c&&l?{type:l}:null)),a=e;break}if(1==e)return!1;s.unshift(null)}let d=e.tr;(e.selection instanceof o.U3||e.selection instanceof o.i5)&&d.deleteSelection();let h=d.mapping.map(r.pos),p=(0,n.zy)(d.doc,h,s.length,s);if(p||(s[0]=l?{type:l}:null,p=(0,n.zy)(d.doc,h,s.length,s)),!p)return!1;if(d.split(h,s.length,s),!c&&u&&r.node(a).type!=l){let e=d.mapping.map(r.before(a)),t=d.doc.resolve(e);l&&r.node(a-1).canReplaceWith(t.index(),t.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(a)),l)}return t&&t(d.scrollIntoView()),!0}),"Mod-Enter":S,Backspace:O,"Mod-Backspace":O,"Shift-Backspace":O,Delete:P,"Mod-Delete":P,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new o.i5(e.doc))),!0)},z={"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":T,"Ctrl-e":L};for(let e in $)z[e]=$[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},14532:(e,t,r)=>{var n=r(75197),i=r(12151),o=r(20552),s=r(91347);e.exports=function(e,t){return(s(e)?n:i)(e,o(t))}},14786:(e,t,r)=>{var n=r(91339),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},15178:(e,t,r)=>{var n=r(20243),i=r(88046);e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},15447:(e,t,r)=>{var n=r(90868),i=r(90140),o=r(3941),s=r(80041),a=r(49641);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},15784:(e,t,r)=>{var n=r(41760);e.exports=function(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}},15910:(e,t,r)=>{var n=r(44934);e.exports={Graph:n.Graph,json:r(68584),alg:r(36639),version:n.version}},17021:(e,t,r)=>{var n=r(78591);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},17475:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},17730:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},17971:e=>{var t=Math.ceil,r=Math.max;e.exports=function(e,n,i,o){for(var s=-1,a=r(t((n-e)/(i||1)),0),l=Array(a);a--;)l[o?a:++s]=e,e+=i;return l}},18018:(e,t,r)=>{var n=r(53212);e.exports=function(e,t,r){for(var i=-1,o=e.criteria,s=t.criteria,a=o.length,l=r.length;++i<a;){var c=n(o[i],s[i]);if(c){if(i>=l)return c;return c*("desc"==r[i]?-1:1)}}return e.index-t.index}},18042:(e,t,r)=>{e.exports=r(11254)(r(99083),"DataView")},18063:e=>{var t="\ud800-\udfff",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\ud83c[\udffb-\udfff]",i="[^"+t+"]",o="(?:\ud83c[\udde6-\uddff]){2}",s="[\ud800-\udbff][\udc00-\udfff]",a="(?:"+r+"|"+n+")?",l="[\\ufe0e\\ufe0f]?",c="(?:\\u200d(?:"+[i,o,s].join("|")+")"+l+a+")*",u=RegExp(n+"(?="+n+")|"+("(?:"+[i+r+"?",r,o,s,"["+t+"]"].join("|"))+")"+(l+a+c),"g");e.exports=function(e){for(var t=u.lastIndex=0;u.test(e);)++t;return t}},18131:e=>{e.exports=function(e){return this.__data__.has(e)}},18518:(e,t,r)=>{"use strict";var n=r(11581);e.exports=function(e){var t={},r=n.filter(e.nodes(),function(t){return!e.children(t).length}),i=n.max(n.map(r,function(t){return e.node(t).rank})),o=n.map(n.range(i+1),function(){return[]}),s=n.sortBy(r,function(t){return e.node(t).rank});return n.forEach(s,function r(i){n.has(t,i)||(t[i]=!0,o[e.node(i).rank].push(i),n.forEach(e.successors(i),r))}),o}},19760:(e,t,r)=>{var n=r(69239),i=r(87702),o=r(88981),s=r(9135),a=r(54169),l=r(96830),c=r(91347),u=r(90827),d=r(61288),h=r(86114),p=r(41929),f=r(38949),m=r(52791),g=r(4518),y=r(35514);e.exports=function(e,t,r,b,v,k,x){var w=g(e,r),C=g(t,r),S=x.get(C);if(S)return void n(e,r,S);var E=k?k(w,C,r+"",e,t,x):void 0,_=void 0===E;if(_){var A=c(C),N=!A&&d(C),M=!A&&!N&&m(C);E=C,A||N||M?c(w)?E=w:u(w)?E=s(w):N?(_=!1,E=i(C,!0)):M?(_=!1,E=o(C,!0)):E=[]:f(C)||l(C)?(E=w,l(w)?E=y(w):(!p(w)||h(w))&&(E=a(C))):_=!1}_&&(x.set(C,E),v(E,C,b,k,x),x.delete(C)),n(e,r,E)}},19916:(e,t,r)=>{var n=r(88463);e.exports=function(e,t,r){n.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],s={};return n.each(t,function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);!function e(t,r,i,o,s,a){!n.has(o,r)&&(o[r]=!0,i||a.push(r),n.each(s(r),function(r){e(t,r,i,o,s,a)}),i&&a.push(r))}(e,t,"post"===r,s,i,o)}),o}},20243:(e,t,r)=>{var n=r(18042),i=r(81895),o=r(87664),s=r(60682),a=r(53443),l=r(86366),c=r(68591),u="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",m=c(n),g=c(i),y=c(o),b=c(s),v=c(a),k=l;(n&&k(new n(new ArrayBuffer(1)))!=f||i&&k(new i)!=u||o&&k(o.resolve())!=d||s&&k(new s)!=h||a&&k(new a)!=p)&&(k=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return f;case g:return u;case y:return d;case b:return h;case v:return p}return t}),e.exports=k},20423:(e,t,r)=>{var n=r(11581),i=r(143).Graph,o=r(40393);e.exports=function(e,t){if(1>=e.nodeCount())return[];var r,c,u,d,h,p,f,m=(r=e,c=t||s,u=new i,d=0,h=0,n.forEach(r.nodes(),function(e){u.setNode(e,{v:e,in:0,out:0})}),n.forEach(r.edges(),function(e){var t=u.edge(e.v,e.w)||0,r=c(e);u.setEdge(e.v,e.w,t+r),h=Math.max(h,u.node(e.v).out+=r),d=Math.max(d,u.node(e.w).in+=r)}),p=n.range(h+d+3).map(function(){return new o}),f=d+1,n.forEach(u.nodes(),function(e){l(p,f,u.node(e))}),{graph:u,buckets:p,zeroIdx:f}),g=function(e,t,r){for(var n,i=[],o=t[t.length-1],s=t[0];e.nodeCount();){for(;n=s.dequeue();)a(e,t,r,n);for(;n=o.dequeue();)a(e,t,r,n);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(n=t[l].dequeue()){i=i.concat(a(e,t,r,n,!0));break}}}return i}(m.graph,m.buckets,m.zeroIdx);return n.flatten(n.map(g,function(t){return e.outEdges(t.v,t.w)}),!0)};var s=n.constant(1);function a(e,t,r,i,o){var s=o?[]:void 0;return n.forEach(e.inEdges(i.v),function(n){var i=e.edge(n),a=e.node(n.v);o&&s.push({v:n.v,w:n.w}),a.out-=i,l(t,r,a)}),n.forEach(e.outEdges(i.v),function(n){var i=e.edge(n),o=n.w,s=e.node(o);s.in-=i,l(t,r,s)}),e.removeNode(i.v),s}function l(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}},20552:(e,t,r)=>{var n=r(63120);e.exports=function(e){return"function"==typeof e?e:n}},20618:(e,t,r)=>{var n=r(41118),i=r(53542);e.exports=function(e){for(var t=i(e),r=t.length;r--;){var o=t[r],s=e[o];t[r]=[o,s,n(s)]}return t}},21172:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},21275:(e,t,r)=>{var n=r(88055),i=r(81895),o=r(25895);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},21884:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},22168:(e,t,r)=>{var n=r(95589),i=r(95285);e.exports=function(e,t){return e&&n(t,i(t),e)}},22526:e=>{e.exports="2.1.8"},24420:(e,t,r)=>{var n=r(15447),i=r(88055),o=r(81895);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},24837:(e,t,r)=>{var n=r(12814),i=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},25238:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},25555:(e,t,r)=>{"use strict";var n=r(11581),i=r(18518),o=r(62401),s=r(38330),a=r(39438),l=r(92056),c=r(143).Graph,u=r(32724);function d(e,t,r){return n.map(t,function(t){return a(e,t,r)})}function h(e,t){n.forEach(t,function(t){n.forEach(t,function(t,r){e.node(t).order=r})})}e.exports=function(e){var t=u.maxRank(e),r=d(e,n.range(1,t+1),"inEdges"),a=d(e,n.range(t-1,-1,-1),"outEdges"),p=i(e);h(e,p);for(var f,m=1/0,g=0,y=0;y<4;++g,++y){(function(e,t){var r=new c;n.forEach(e,function(e){var i=e.graph().root,o=s(e,i,r,t);n.forEach(o.vs,function(t,r){e.node(t).order=r}),l(e,r,o.vs)})})(g%2?r:a,g%4>=2),p=u.buildLayerMatrix(e);var b=o(e,p);b<m&&(y=0,f=n.cloneDeep(p),m=b)}h(e,f)}},25706:(e,t,r)=>{var n=r(43372),i=r(38700),o=r(3721);e.exports=function(e){return o(i(e,void 0,n),e+"")}},25895:(e,t,r)=>{var n=r(24420),i=r(46764),o=r(66613),s=r(63129),a=r(34041);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},26183:(e,t,r)=>{var n=r(78414),i=r(20243),o=r(96830),s=r(91347),a=r(44700),l=r(61288),c=r(59919),u=r(52791),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!n(e).length;for(var r in e)if(d.call(e,r))return!1;return!0}},26959:(e,t,r)=>{var n=r(82517),i=r(13913);e.exports=function(e,t){return n(e,t,function(t,r){return i(e,r)})}},28155:(e,t,r)=>{"use strict";r.d(t,{$L:()=>M,Ln:()=>m,N0:()=>A,Um:()=>N,Wg:()=>g,X9:()=>s,Ys:()=>h,dL:()=>B,jP:()=>v,n9:()=>E,oM:()=>k,zy:()=>S});var n=r(65282);class i{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class o{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&o.empty)return o.empty}recover(e){let t=0,r=65535&e;if(!this.inverted)for(let e=0;e<r;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*r]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let n=0,o=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?n:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let o=c?e==l?-1:e==d?1:t:t,s=l+n+(o<0?0:u);if(r)return s;let h=e==(t<0?l:d)?null:a/3+(e-l)*65536,p=e==l?2:e==d?1:4;return(t<0?e!=l:e!=d)&&(p|=8),new i(s,p,h)}n+=u-c}return r?e+n:new i(e+n,0,null)}touches(e,t){let r=0,n=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?r:0);if(s>e)break;let a=this.ranges[t+i];if(e<=s+a&&t==3*n)return!0;r+=this.ranges[t+o]-a}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let n=0,i=0;n<this.ranges.length;n+=3){let o=this.ranges[n],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[n+t],c=this.ranges[n+r];e(s,s+l,a,a+c),i+=c-l}}invert(){return new o(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?o.empty:new o(e<0?[0,-e,0]:[0,0,e])}}o.empty=new o([]);class s{constructor(e,t,r=0,n=e?e.length:0){this.mirror=t,this.from=r,this.to=n,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new s(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,r=this._maps.length;t<e._maps.length;t++){let n=e.getMirror(t);this.appendMap(e._maps[t],null!=n&&n<t?r+n: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,r=this._maps.length+e._maps.length;t>=0;t--){let n=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=n&&n>t?r-n-1:void 0)}}invert(){let e=new s;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let n=0;for(let r=this.from;r<this.to;r++){let i=this._maps[r].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(r);if(null!=t&&t>r&&t<this.to){r=t,e=this._maps[t].recover(i.recover);continue}}n|=i.delInfo,e=i.pos}return r?e:new i(e,n,null)}}let a=Object.create(null);class l{getMap(){return o.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let r=a[t.stepType];if(!r)throw RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in a)throw RangeError("Duplicate use of step JSON ID "+e);return a[e]=t,t.prototype.jsonID=e,t}}class c{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new c(e,null)}static fail(e){return new c(null,e)}static fromReplace(e,t,r,i){try{return c.ok(e.replace(t,r,i))}catch(e){if(e instanceof n.vI)return c.fail(e.message);throw e}}}function u(e,t,r){let i=[];for(let n=0;n<e.childCount;n++){let o=e.child(n);o.content.size&&(o=o.copy(u(o.content,t,o))),o.isInline&&(o=t(o,r,n)),i.push(o)}return n.FK.fromArray(i)}class d extends l{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new n.Ji(u(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 c.fromReplace(e,this.from,this.to,o)}invert(){return new h(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new d(t.pos,r.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(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 d(t.from,t.to,e.markFromJSON(t.mark))}}l.jsonID("addMark",d);class h extends l{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new n.Ji(u(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return c.fromReplace(e,this.from,this.to,r)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new h(t.pos,r.pos,this.mark)}merge(e){return e instanceof h&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new h(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 h(t.from,t.to,e.markFromJSON(t.mark))}}l.jsonID("removeMark",h);class p extends l{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return c.fromReplace(e,this.pos,this.pos+1,new n.Ji(n.FK.from(r),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 r=0;r<t.marks.length;r++)if(!t.marks[r].isInSet(e))return new p(this.pos,t.marks[r]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new p(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 p(t.pos,e.markFromJSON(t.mark))}}l.jsonID("addNodeMark",p);class f extends l{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return c.fromReplace(e,this.pos,this.pos+1,new n.Ji(n.FK.from(r),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new p(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(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 f(t.pos,e.markFromJSON(t.mark))}}l.jsonID("removeNodeMark",f);class m extends l{constructor(e,t,r,n=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=n}apply(e){return this.structure&&y(e,this.from,this.to)?c.fail("Structure replace would overwrite content"):c.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new o([this.from,this.to-this.from,this.slice.size])}invert(e){return new m(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new m(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof m)||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?n.Ji.empty:new n.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new m(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?n.Ji.empty:new n.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new m(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 m(t.from,t.to,n.Ji.fromJSON(e,t.slice),!!t.structure)}}l.jsonID("replace",m);class g extends l{constructor(e,t,r,n,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=n,this.slice=i,this.insert=o,this.structure=s}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return c.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return c.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?c.fromReplace(e,this.from,this.to,r):c.fail("Content does not fit in gap")}getMap(){return new o([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 g(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),r=e.mapResult(this.to,-1),n=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||n<t.pos||i>r.pos?null:new g(t.pos,r.pos,n,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 g(t.from,t.to,t.gapFrom,t.gapTo,n.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,r){let n=e.resolve(t),i=r-t,o=n.depth;for(;i>0&&o>0&&n.indexAfter(o)==n.node(o).childCount;)o--,i--;if(i>0){let e=n.node(o).maybeChild(n.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function b(e,t,r,i=r.contentMatch,o=!0){let s=e.doc.nodeAt(t),a=[],l=t+1;for(let t=0;t<s.childCount;t++){let c=s.child(t),u=l+c.nodeSize,d=i.matchType(c.type);if(d){i=d;for(let t=0;t<c.marks.length;t++)r.allowsMarkType(c.marks[t].type)||e.step(new h(l,u,c.marks[t]));if(o&&c.isText&&"pre"!=r.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(c.text);)i||(i=new n.Ji(n.FK.from(r.schema.text(" ",r.allowedMarks(c.marks))),0,0)),a.push(new m(l+e.index,l+e.index+e[0].length,i))}}else a.push(new m(l,u,n.Ji.empty));l=u}if(!i.validEnd){let t=i.fillBefore(n.FK.empty,!0);e.replace(l,l,new n.Ji(t,0,0))}for(let t=a.length-1;t>=0;t--)e.step(a[t])}function v(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,n=0,i=0;;--r){let o=e.$from.node(r),s=e.$from.index(r)+n,a=e.$to.indexAfter(r)-i;if(r<e.depth&&o.canReplace(s,a,t))return r;if(0==r||o.type.spec.isolating||!((0==s||o.canReplace(s,o.childCount))&&(a==o.childCount||o.canReplace(0,a))))break;s&&(n=1),a<o.childCount&&(i=1)}return null}function k(e,t,r=null,n=e){let i=function(e,t){let{parent:r,startIndex:n,endIndex:i}=e,o=r.contentMatchAt(n).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return r.canReplaceWith(n,i,s)?o:null}(e,t),o=i&&function(e,t){let{parent:r,startIndex:n,endIndex:i}=e,o=r.child(n),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=n;a&&e<i;e++)a=a.matchType(r.child(e).type);return a&&a.validEnd?s:null}(n,t);return o?i.map(x).concat({type:t,attrs:r}).concat(o.map(x)):null}function x(e){return{type:e,attrs:null}}function w(e,t,r,n){t.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let i=e.mapping.slice(n).map(r+1+o+s.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function C(e,t,r,n){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(n).map(r+1+o);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function S(e,t,r=1,n){let i=e.resolve(t),o=i.depth-r,s=n&&n[n.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=r-2;e>o;e--,t--){let r=i.node(e),o=i.index(e);if(r.type.spec.isolating)return!1;let s=r.content.cutByIndex(o,r.childCount),a=n&&n[t+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=n&&n[t]||r;if(!r.canReplace(o+1,r.childCount)||!l.type.validContent(s))return!1}let a=i.indexAfter(o),l=n&&n[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function E(e,t){let r=e.resolve(t),n=r.index();return _(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function _(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let r=e.contentMatchAt(e.childCount),{linebreakReplacement:n}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==n?e.type.schema.nodes.text:o.type;if(!(r=r.matchType(s))||!e.type.allowsMarks(o.marks))return!1}return r.validEnd}(e,t))}function A(e,t,r=-1){let n=e.resolve(t);for(let e=n.depth;;e--){let i,o,s=n.index(e);if(e==n.depth?(i=n.nodeBefore,o=n.nodeAfter):r>0?(i=n.node(e+1),s++,o=n.node(e).maybeChild(s)):(i=n.node(e).maybeChild(s-1),o=n.node(e+1)),i&&!i.isTextblock&&_(i,o)&&n.node(e).canReplace(s,s+1))return t;if(0==e)break;t=r<0?n.before(e):n.after(e)}}function N(e,t,r){let n=e.resolve(t);if(!r.content.size)return t;let i=r.content;for(let e=0;e<r.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==r.openStart&&r.size?2:1);e++)for(let t=n.depth;t>=0;t--){let r=t==n.depth?0:n.pos<=(n.start(t+1)+n.end(t+1))/2?-1:1,o=n.index(t)+ +(r>0),s=n.node(t),a=!1;if(1==e)a=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=e&&s.canReplaceWith(o,o,e[0])}if(a)return 0==r?n.pos:r<0?n.before(t+1):n.after(t+1)}return null}function M(e,t,r=t,i=n.Ji.empty){if(t==r&&!i.size)return null;let o=e.resolve(t),s=e.resolve(r);return T(o,s,i)?new m(t,r,i):new L(o,s,i).fit()}function T(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}l.jsonID("replaceAround",g);class L{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=n.FK.empty;for(let t=0;t<=e.depth;t++){let r=e.node(t);this.frontier.push({type:r.type,match:r.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=n.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,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new n.Ji(o,s,a);return e>-1?new g(r.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||r.pos!=this.$to.pos?new m(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,n=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(n=0),i.type.spec.isolating&&n<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=1==t?e:this.unplaced.openStart;r>=0;r--){let e=null,i=(r?(e=R(this.unplaced.content,r-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:s,match:a}=this.frontier[o],l,c=null;if(1==t&&(i?a.matchType(i.type)||(c=a.fillBefore(n.FK.from(i),!1)):e&&s.compatibleContent(e.type)))return{sliceDepth:r,frontierDepth:o,parent:e,inject:c};if(2==t&&i&&(l=a.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:o,parent:e,wrap:l};if(e&&a.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=R(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new n.Ji(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=R(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new n.Ji(I(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new n.Ji(I(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,c=0,u=[],{match:d,type:h}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)u.push(i.child(e));d=d.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let e=a.child(c),t=d.matchType(e.type);if(!t)break;(++c>1||0==l||e.content.size)&&(d=t,u.push(function e(t,r,i){if(r<=0)return t;let o=t.content;return r>1&&(o=o.replaceChild(0,e(o.firstChild,r-1,1==o.childCount?i-1:0))),r>0&&(o=t.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(n.FK.empty,!0)))),t.copy(o)}(e.mark(h.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=j(this.placed,t,n.FK.from(u)),this.frontier[t].match=d,f&&p<0&&r&&r.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?n.Ji.empty:new n.Ji(I(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new n.Ji(I(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!O(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:r}=this.$to,n=this.$to.after(r);for(;r>1&&n==this.$to.end(--r);)++n;return n}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:n}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=O(e,t,n,r,i);if(o){for(let r=t-1;r>=0;r--){let{match:t,type:n}=this.frontier[r],i=O(e,r,n,t,!0);if(!i||i.childCount)continue e}return{depth:t,fit:o,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=j(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let t=e.node(r),n=t.type.contentMatch.fillBefore(t.content,!0,e.index(r));this.openFrontierNode(t.type,t.attrs,n)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=j(this.placed,this.depth,n.FK.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(n.FK.empty,!0);e.childCount&&(this.placed=j(this.placed,this.frontier.length,e))}}function I(e,t,r){return 0==t?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(I(e.firstChild.content,t-1,r)))}function j(e,t,r){return 0==t?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(j(e.lastChild.content,t-1,r)))}function R(e,t){for(let r=0;r<t;r++)e=e.firstChild.content;return e}function O(e,t,r,n,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!r.compatibleContent(o.type))return null;let a=n.fillBefore(o.content,!0,s);return a&&!function(e,t,r){for(let n=r;n<t.childCount;n++)if(!e.allowsMarks(t.child(n).marks))return!0;return!1}(r,o.content,s)?a:null}function P(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let i=n;i>=0;i--){let n=e.start(i);if(n<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;(n==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==n-1)&&r.push(i)}return r}class $ extends l{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at attribute step's position");let r=Object.create(null);for(let e in t.attrs)r[e]=t.attrs[e];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return c.fromReplace(e,this.pos,this.pos+1,new n.Ji(n.FK.from(i),0,+!t.isLeaf))}getMap(){return o.empty}invert(e){return new $(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 $(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 $(t.pos,t.attr,t.value)}}l.jsonID("attr",$);class z extends l{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return c.ok(r)}getMap(){return o.empty}invert(e){return new z(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 z(t.attr,t.value)}}l.jsonID("docAttr",z);let D=class extends Error{};(D=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r}).prototype=Object.create(Error.prototype),D.prototype.constructor=D,D.prototype.name="TransformError";class B{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new s}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new D(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 r=0;r<this.mapping.maps.length;r++){let n=this.mapping.maps[r];r&&(e=n.map(e,1),t=n.map(t,-1)),n.forEach((r,n,i,o)=>{e=Math.min(e,i),t=Math.max(t,o)})}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,r=n.Ji.empty){let i=M(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new n.Ji(n.FK.from(r),0,0))}delete(e,t){return this.replace(e,t,n.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return!function(e,t,r,i){if(!i.size)return e.deleteRange(t,r);let o=e.doc.resolve(t),s=e.doc.resolve(r);if(T(o,s,i))return e.step(new m(t,r,i));let a=P(o,s);0==a[a.length-1]&&a.pop();let l=-(o.depth+1);a.unshift(l);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let r=o.node(e).type.spec;if(r.defining||r.definingAsContext||r.isolating)break;a.indexOf(e)>-1?l=e:o.before(e)==t&&a.splice(1,0,-e)}let c=a.indexOf(l),u=[],d=i.openStart;for(let e=i.content,t=0;;t++){let r=e.firstChild;if(u.push(r),t==i.openStart)break;e=r.content}for(let e=d-1;e>=0;e--){var h;let t=u[e],r=(h=t.type).spec.defining||h.spec.definingForContent;if(r&&!t.sameMarkup(o.node(Math.abs(l)-1)))d=e;else if(r||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let l=(t+d+1)%(i.openStart+1),h=u[l];if(h)for(let t=0;t<a.length;t++){let u=a[(t+c)%a.length],d=!0;u<0&&(d=!1,u=-u);let p=o.node(u-1),f=o.index(u-1);if(p.canReplaceWith(f,f,h.type,h.marks))return e.replace(o.before(u),d?s.after(u):r,new n.Ji(function e(t,r,i,o,s){if(r<i){let n=t.firstChild;t=t.replaceChild(0,n.copy(e(n.content,r+1,i,o,n)))}if(r>o){let e=s.contentMatchAt(0),r=e.fillBefore(t).append(t);t=r.append(e.matchFragment(r).fillBefore(n.FK.empty,!0))}return t}(i.content,0,i.openStart,l),l,i.openEnd))}}let p=e.steps.length;for(let n=a.length-1;n>=0&&(e.replace(t,r,i),!(e.steps.length>p));n--){let e=a[n];e<0||(t=o.before(e),r=s.after(e))}}(this,e,t,r),this}replaceRangeWith(e,t,r){var i=e,o=t;if(!r.isInline&&i==o&&this.doc.resolve(i).parent.content.size){let e=function(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(0==n.parentOffset)for(let e=n.depth-1;e>=0;e--){let t=n.index(e);if(n.node(e).canReplaceWith(t,t,r))return n.before(e+1);if(t>0)return null}if(n.parentOffset==n.parent.content.size)for(let e=n.depth-1;e>=0;e--){let t=n.indexAfter(e);if(n.node(e).canReplaceWith(t,t,r))return n.after(e+1);if(t<n.node(e).childCount)break}return null}(this.doc,i,r.type);null!=e&&(i=o=e)}return this.replaceRange(i,o,new n.Ji(n.FK.from(r),0,0)),this}deleteRange(e,t){return!function(e,t,r){let n=e.doc.resolve(t),i=e.doc.resolve(r),o=P(n,i);for(let t=0;t<o.length;t++){let r=o[t],s=t==o.length-1;if(s&&0==r||n.node(r).type.contentMatch.validEnd)return e.delete(n.start(r),i.end(r));if(r>0&&(s||n.node(r-1).canReplace(n.index(r-1),i.indexAfter(r-1))))return e.delete(n.before(r),i.after(r))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(t-n.start(o)==n.depth-o&&r>n.end(o)&&i.end(o)-r!=i.depth-o&&n.start(o-1)==i.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),i.index(o-1)))return e.delete(n.before(o),r);e.delete(t,r)}(this,e,t),this}lift(e,t){return!function(e,t,r){let{$from:i,$to:o,depth:s}=t,a=i.before(s+1),l=o.after(s+1),c=a,u=l,d=n.FK.empty,h=0;for(let e=s,t=!1;e>r;e--)t||i.index(e)>0?(t=!0,d=n.FK.from(i.node(e).copy(d)),h++):c--;let p=n.FK.empty,f=0;for(let e=s,t=!1;e>r;e--)t||o.after(e+1)<o.end(e)?(t=!0,p=n.FK.from(o.node(e).copy(p)),f++):u++;e.step(new g(c,u,a,l,new n.Ji(d.append(p),h,f),d.size-h,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,r){let i=null,{linebreakReplacement:o}=e.doc.type.schema,s=e.doc.resolve(t-r),a=s.node().type;if(o&&a.inlineContent){let e="pre"==a.whitespace,t=!!a.contentMatch.matchType(o);e&&!t?i=!1:!e&&t&&(i=!0)}let l=e.steps.length;if(!1===i){let n=e.doc.resolve(t+r);C(e,n.node(),n.before(),l)}a.inlineContent&&b(e,t+r-1,a,s.node().contentMatchAt(s.index()),null==i);let c=e.mapping.slice(l),u=c.map(t-r);if(e.step(new m(u,c.map(t+r,-1),n.Ji.empty,!0)),!0===i){let t=e.doc.resolve(u);w(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,r){let i=n.FK.empty;for(let e=r.length-1;e>=0;e--){if(i.size){let t=r[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=n.FK.from(r[e].type.create(r[e].attrs,i))}let o=t.start,s=t.end;e.step(new g(o,s,o,s,new n.Ji(i,0,0),r.length,!0))}(this,e,t),this}setBlockType(e,t=e,r,i=null){var o=this;if(!r.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let s=o.steps.length;return o.doc.nodesBetween(e,t,(e,t)=>{var a,l,c;let u,d,h="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(r,h)&&(a=o.doc,l=o.mapping.slice(s).map(t),c=r,d=(u=a.resolve(l)).index(),u.parent.canReplaceWith(d,d+1,c))){let i=null;if(r.schema.linebreakReplacement){let e="pre"==r.whitespace,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&C(o,e,t,s),b(o,o.mapping.slice(s).map(t,1),r,void 0,null===i);let a=o.mapping.slice(s),l=a.map(t,1),c=a.map(t+e.nodeSize,1);return o.step(new g(l,c,l+1,c-1,new n.Ji(n.FK.from(r.create(h,null,e.marks)),0,0),1,!0)),!0===i&&w(o,e,t,s),!1}}),this}setNodeMarkup(e,t,r=null,i){return!function(e,t,r,i,o){let s=e.doc.nodeAt(t);if(!s)throw RangeError("No node at given position");r||(r=s.type);let a=r.create(i,null,o||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,a);if(!r.validContent(s.content))throw RangeError("Invalid content for node type "+r.name);e.step(new g(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new n.Ji(n.FK.from(a),0,0),1,!0))}(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new $(e,t,r)),this}setDocAttribute(e,t){return this.step(new z(e,t)),this}addNodeMark(e,t){return this.step(new p(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw RangeError("No node at position "+e);if(t instanceof n.CU)t.isInSet(r.marks)&&this.step(new f(e,t));else{let n=r.marks,i,o=[];for(;i=t.isInSet(n);)o.push(new f(e,i)),n=i.removeFromSet(n);for(let e=o.length-1;e>=0;e--)this.step(o[e])}return this}split(e,t=1,r){return!function(e,t,r=1,i){let o=e.doc.resolve(t),s=n.FK.empty,a=n.FK.empty;for(let e=o.depth,t=o.depth-r,l=r-1;e>t;e--,l--){s=n.FK.from(o.node(e).copy(s));let t=i&&i[l];a=n.FK.from(t?t.type.create(t.attrs,a):o.node(e).copy(a))}e.step(new m(t,t,new n.Ji(s.append(a),r,r),!0))}(this,e,t,r),this}addMark(e,t,r){var n;let i,o,s,a;return n=this,s=[],a=[],n.doc.nodesBetween(e,t,(n,l,c)=>{if(!n.isInline)return;let u=n.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),p=Math.min(l+n.nodeSize,t),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(i&&i.to==c&&i.mark.eq(u[e])?i.to=p:s.push(i=new h(c,p,u[e])));o&&o.to==c?o.to=p:a.push(o=new d(c,p,r))}}),s.forEach(e=>n.step(e)),a.forEach(e=>n.step(e)),this}removeMark(e,t,r){var i;let o,s;return i=this,o=[],s=0,i.doc.nodesBetween(e,t,(i,a)=>{if(!i.isInline)return;s++;let l=null;if(r instanceof n.sX){let e=i.marks,t;for(;t=r.isInSet(e);)(l||(l=[])).push(t),e=t.removeFromSet(e)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let r=Math.min(a+i.nodeSize,t);for(let t=0;t<l.length;t++){let n=l[t],i;for(let e=0;e<o.length;e++){let t=o[e];t.step==s-1&&n.eq(o[e].style)&&(i=t)}i?(i.to=r,i.step=s):o.push({style:n,from:Math.max(a,e),to:r,step:s})}}}),o.forEach(e=>i.step(new h(e.from,e.to,e.style))),this}clearIncompatible(e,t,r){return b(this,e,t,r),this}}},28400:(e,t,r)=>{var n=r(32558),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},28806:(e,t,r)=>{var n=r(86366),i=r(88046);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},29122:(e,t,r)=>{var n=r(43370),i=r(4006);e.exports=function(e,t){return null!=e&&i(e,t,n)}},29558:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},29974:e=>{e.exports=function(e){return function(){return e}}},30004:(e,t,r)=>{var n=r(63120),i=r(38700),o=r(3721);e.exports=function(e,t){return o(i(e,t,n),e+"")}},30044:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},30727:(e,t,r)=>{var n=r(69048);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return -1}},31184:(e,t,r)=>{var n=r(17971),i=r(34370),o=r(28400);e.exports=function(e){return function(t,r,s){return s&&"number"!=typeof s&&i(t,r,s)&&(r=s=void 0),t=o(t),void 0===r?(r=t,t=0):r=o(r),s=void 0===s?t<r?1:-1:o(s),n(t,r,s,e)}}},31310:(e,t,r)=>{var n=r(41929),i=Object.create;e.exports=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}()},31585:(e,t,r)=>{var n=r(11581),i=r(32724);function o(e,t,r,n,o,s){var a=o[t][s-1],l=i.addDummyNode(e,"border",{width:0,height:0,rank:s,borderType:t},r);o[t][s]=l,e.setParent(l,n),a&&e.setEdge(a,l,{weight:1})}e.exports=function(e){n.forEach(e.children(),function t(r){var i=e.children(r),s=e.node(r);if(i.length&&n.forEach(i,t),n.has(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(var a=s.minRank,l=s.maxRank+1;a<l;++a)o(e,"borderLeft","_bl",r,s,a),o(e,"borderRight","_br",r,s,a)}})}},31769:(e,t,r)=>{"use strict";var n=r(33499).longestPath,i=r(33405),o=r(78928);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:o(e);break;case"tight-tree":var t;n(t=e),i(t);break;case"longest-path":s(e)}};var s=n},32558:(e,t,r)=>{var n=r(36110),i=r(41929),o=r(12814),s=0/0,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):a.test(e)?s:+e}},32591:(e,t,r)=>{var n=r(68105),i=r(2627),o=r(1578);e.exports=function(e,t){return e&&e.length?n(e,i(t,2),o):void 0}},32603:(e,t,r)=>{"use strict";r.d(t,{$t:()=>C,LN:()=>s,U3:()=>u,hs:()=>A,i5:()=>f,k_:()=>S,nh:()=>h});var n=r(65282),i=r(28155);let o=Object.create(null);class s{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[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=n.Ji.empty){let r=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=e.mapping.slice(o);e.replaceRange(u.map(l.pos),u.map(c.pos),a?n.Ji.empty:t),0==a&&y(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,n=this.ranges;for(let i=0;i<n.length;i++){let{$from:o,$to:s}=n[i],a=e.mapping.slice(r),l=a.map(o.pos),c=a.map(s.pos);i?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),y(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let n=e.parent.inlineContent?new u(e):g(e.node(0),e.parent,e.pos,e.index(),t,r);if(n)return n;for(let n=e.depth-1;n>=0;n--){let i=t<0?g(e.node(0),e.node(n),e.before(n+1),e.index(n),t,r):g(e.node(0),e.node(n),e.after(n+1),e.index(n)+1,t,r);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 r=o[t.type];if(!r)throw RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends s{constructor(e,t=e){c(e),c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return s.near(r);let n=e.resolve(t.map(this.anchor));return new u(n.parent.inlineContent?n:r,r)}replace(e,t=n.Ji.empty){if(super.replace(e,t),t==n.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof u&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new d(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 u(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let n=e.resolve(t);return new this(n,r==t?n:e.resolve(r))}static between(e,t,r){let n=e.pos-t.pos;if((!r||n)&&(r=n>=0?1:-1),!t.parent.inlineContent){let e=s.findFrom(t,r,!0)||s.findFrom(t,-r,!0);if(!e)return s.near(t,r);t=e.$head}return e.parent.inlineContent||(0==n?e=t:(e=(s.findFrom(e,-r,!0)||s.findFrom(e,r,!0)).$anchor).pos<t.pos!=n<0&&(e=t)),new u(e,t)}}s.jsonID("text",u);class d{constructor(e,t){this.anchor=e,this.head=t}map(e){return new d(e.map(this.anchor),e.map(this.head))}resolve(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))}}class h extends s{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:r,pos:n}=t.mapResult(this.anchor),i=e.resolve(n);return r?s.near(i):new h(i)}content(){return new n.Ji(n.FK.from(this.node),0,0)}eq(e){return e instanceof h&&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 h(e.resolve(t.anchor))}static create(e,t){return new h(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}h.prototype.visible=!1,s.jsonID("node",h);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new d(r,r):new p(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&h.isSelectable(r)?new h(t):s.near(t)}}class f extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=n.Ji.empty){if(t==n.Ji.empty){e.delete(0,e.doc.content.size);let t=s.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}}s.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,r,n,i,o=!1){if(t.inlineContent)return u.create(e,r);for(let s=n-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let n=t.child(s);if(n.isAtom){if(!o&&h.isSelectable(n))return h.create(e,r-(i<0?n.nodeSize:0))}else{let t=g(e,n,r+i,i<0?n.childCount:0,i,o);if(t)return t}r+=n.nodeSize*i}return null}function y(e,t,r){let n,o=e.steps.length-1;if(o<t)return;let a=e.steps[o];(a instanceof i.Ln||a instanceof i.Wg)&&(e.mapping.maps[o].forEach((e,t,r,i)=>{null==n&&(n=i)}),e.setSelection(s.near(e.doc.resolve(n),r)))}class b 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=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return n.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(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||n.CU.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let n=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(n.text(e),!0):this.deleteSelection();{if(null==r&&(r=t),!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=r==t?e.marks():e.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,n.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(s.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|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function v(e,t){return t&&e?e.bind(t):e}class k{constructor(e,t,r){this.name=e,this.init=v(t.init,r),this.apply=v(t.apply,r)}}let x=[new k("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new k("selection",{init:(e,t)=>e.selection||s.atStart(t.doc),apply:e=>e.selection}),new k("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,r,n)=>n.selection.$cursor?e.storedMarks:null}),new k("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class w{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 k(e.key,e.spec.state,e))})}}class C{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 r=0;r<this.config.plugins.length;r++)if(r!=t){let t=this.config.plugins[r];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],r=this.applyInner(e),n=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let a=n?n[o].n:0,l=n?n[o].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,r);if(c&&r.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!n){n=[];for(let e=0;e<this.config.plugins.length;e++)n.push(e<o?{state:r,n:t.length}:{state:this,n:0})}t.push(c),r=r.applyInner(c),i=!0}n&&(n[o]={state:r,n:t.length})}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new C(this.config),r=this.config.fields;for(let n=0;n<r.length;n++){let i=r[n];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new b(this)}static create(e){let t=new w(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new C(t);for(let n=0;n<t.fields.length;n++)r[t.fields[n].name]=t.fields[n].init(e,r);return r}reconfigure(e){let t=new w(this.schema,e.plugins),r=t.fields,n=new C(t);for(let t=0;t<r.length;t++){let i=r[t].name;n[i]=this.hasOwnProperty(i)?this[i]:r[t].init(e,n)}return n}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 r in e){if("doc"==r||"selection"==r)throw RangeError("The JSON fields `doc` and `selection` are reserved");let n=e[r],i=n.spec.state;i&&i.toJSON&&(t[r]=i.toJSON.call(n,this[n.key]))}return t}static fromJSON(e,t,r){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new w(e.schema,e.plugins),o=new C(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=n.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let n in r){let s=r[n],a=s.spec.state;if(s.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,n)){o[i.name]=a.fromJSON.call(s,e,t[n],o);return}}o[i.name]=i.init(e,o)}}),o}}class S{constructor(e){this.spec=e,this.props={},e.props&&function e(t,r,n){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(r):"handleDOMEvents"==i&&(o=e(o,r,{})),n[i]=o}return n}(e.props,this,this.props),this.key=e.key?e.key.key:_("plugin")}getState(e){return e[this.key]}}let E=Object.create(null);function _(e){return e in E?e+"$"+ ++E[e]:(E[e]=0,e+"$")}class A{constructor(e="key"){this.key=_(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},32724:(e,t,r)=>{"use strict";var n=r(11581),i=r(143).Graph;function o(e,t,r,i){var o;do o=n.uniqueId(i);while(e.hasNode(o));return r.dummy=t,e.setNode(o,r),o}function s(e){return n.max(n.map(e.nodes(),function(t){var r=e.node(t).rank;if(!n.isUndefined(r))return r}))}e.exports={addDummyNode:o,simplify:function(e){var t=new i().setGraph(e.graph());return n.forEach(e.nodes(),function(r){t.setNode(r,e.node(r))}),n.forEach(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t},asNonCompoundGraph:function(e){var t=new i({multigraph:e.isMultigraph()}).setGraph(e.graph());return n.forEach(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),n.forEach(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t},successorWeights:function(e){var t=n.map(e.nodes(),function(t){var r={};return n.forEach(e.outEdges(t),function(t){r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return n.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=n.map(e.nodes(),function(t){var r={};return n.forEach(e.inEdges(t),function(t){r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return n.zipObject(e.nodes(),t)},intersectRect:function(e,t){var r,n,i=e.x,o=e.y,s=t.x-i,a=t.y-o,l=e.width/2,c=e.height/2;if(!s&&!a)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*l>Math.abs(s)*c?(a<0&&(c=-c),r=c*s/a,n=c):(s<0&&(l=-l),r=l,n=l*a/s),{x:i+r,y:o+n}},buildLayerMatrix:function(e){var t=n.map(n.range(s(e)+1),function(){return[]});return n.forEach(e.nodes(),function(r){var i=e.node(r),o=i.rank;n.isUndefined(o)||(t[o][i.order]=r)}),t},normalizeRanks:function(e){var t=n.min(n.map(e.nodes(),function(t){return e.node(t).rank}));n.forEach(e.nodes(),function(r){var i=e.node(r);n.has(i,"rank")&&(i.rank-=t)})},removeEmptyRanks:function(e){var t=n.min(n.map(e.nodes(),function(t){return e.node(t).rank})),r=[];n.forEach(e.nodes(),function(n){var i=e.node(n).rank-t;r[i]||(r[i]=[]),r[i].push(n)});var i=0,o=e.graph().nodeRankFactor;n.forEach(r,function(t,r){n.isUndefined(t)&&r%o!=0?--i:i&&n.forEach(t,function(t){e.node(t).rank+=i})})},addBorderNode:function(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),o(e,"border",i,t)},maxRank:s,partition:function(e,t){var r={lhs:[],rhs:[]};return n.forEach(e,function(e){t(e)?r.lhs.push(e):r.rhs.push(e)}),r},time:function(e,t){var r=n.now();try{return t()}finally{console.log(e+" time: "+(n.now()-r)+"ms")}},notime:function(e,t){return t()}}},32771:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},33382:(e,t,r)=>{var n=r(10338),i=r(80791),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;e.exports=s?function(e){return null==e?[]:n(s(e=Object(e)),function(t){return o.call(e,t)})}:i},33405:(e,t,r)=>{"use strict";var n=r(11581),i=r(143).Graph,o=r(33499).slack;e.exports=function(e){var t,r,s,a,l=new i({directed:!1}),c=e.nodes()[0],u=e.nodeCount();for(l.setNode(c,{});t=l,r=e,n.forEach(t.nodes(),function e(i){n.forEach(r.nodeEdges(i),function(n){var s=n.v,a=i===s?n.w:s;t.hasNode(a)||o(r,n)||(t.setNode(a,{}),t.setEdge(i,a,{}),e(a))})}),t.nodeCount()<u;)s=function(e,t){return n.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return o(t,r)})}(l,e),a=l.hasNode(s.v)?o(e,s):-o(e,s),function(e,t,r){n.forEach(e.nodes(),function(e){t.node(e).rank+=r})}(l,e,a);return l}},33445:(e,t,r)=>{var n=r(88463);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(e){return e.key})},i.prototype.has=function(e){return n.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!n.has(r,e)){var i=this._arr,o=i.length;return r[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)},i.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))},i.prototype._decrease=function(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t},i.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t}},33499:(e,t,r)=>{"use strict";var n=r(11581);e.exports={longestPath:function(e){var t={};n.forEach(e.sources(),function r(i){var o=e.node(i);if(n.has(t,i))return o.rank;t[i]=!0;var s=n.min(n.map(e.outEdges(i),function(t){return r(t.w)-e.edge(t).minlen}));return(s===1/0||null==s)&&(s=0),o.rank=s})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},33546:(e,t,r)=>{var n=r(85068),i=r(88046);e.exports=function e(t,r,o,s,a){return t===r||(null!=t&&null!=r&&(i(t)||i(r))?n(t,r,o,s,e,a):t!=t&&r!=r)}},33857:e=>{e.exports=function(){return!1}},34017:(e,t,r)=>{var n=r(35031),i=r(88463);e.exports=function(e,t,r){return i.transform(e.nodes(),function(i,o){i[o]=n(e,o,t,r)},{})}},34041:(e,t,r)=>{var n=r(8665);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=+(r.size!=i),this}},34370:(e,t,r)=>{var n=r(69048),i=r(44700),o=r(86237),s=r(41929);e.exports=function(e,t,r){if(!s(r))return!1;var a=typeof t;return("number"==a?!!(i(r)&&o(t,r.length)):"string"==a&&t in r)&&n(r[t],e)}},35031:(e,t,r)=>{var n=r(88463),i=r(33445);e.exports=function(e,t,r,n){return function(e,t,r,n){var o,s,a={},l=new i,c=function(e){var t=e.v!==o?e.v:e.w,n=a[t],i=r(e),c=s.distance+i;if(i<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);c<n.distance&&(n.distance=c,n.predecessor=o,l.decrease(t,c))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;a[e]={distance:r},l.add(e,r)});l.size()>0&&(s=a[o=l.removeMin()]).distance!==1/0;)n(o).forEach(c);return a}(e,String(t),r||o,n||function(t){return e.outEdges(t)})};var o=n.constant(1)},35514:(e,t,r)=>{var n=r(95589),i=r(95285);e.exports=function(e){return n(e,i(e))}},36110:(e,t,r)=>{var n=r(54444),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},36639:(e,t,r)=>{e.exports={components:r(74249),dijkstra:r(35031),dijkstraAll:r(34017),findCycles:r(93718),floydWarshall:r(38264),isAcyclic:r(15784),postorder:r(77185),preorder:r(74166),prim:r(41521),tarjan:r(85950),topsort:r(41760)}},36942:(e,t,r)=>{var n=r(91347),i=r(12814),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},36966:(e,t,r)=>{var n=r(67070);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},37021:(e,t,r)=>{"use strict";r.d(t,{jH:()=>n.C});var n=r(97001)},37155:(e,t,r)=>{var n=r(65273),i=r(75197),o=r(72043),s=r(855),a=r(22168),l=r(87702),c=r(9135),u=r(57847),d=r(45176),h=r(43188),p=r(77599),f=r(20243),m=r(40739),g=r(72821),y=r(54169),b=r(91347),v=r(61288),k=r(64908),x=r(41929),w=r(13570),C=r(53542),S=r(95285),E="[object Arguments]",_="[object Function]",A="[object Object]",N={};N[E]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[A]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[_]=N["[object WeakMap]"]=!1,e.exports=function e(t,r,M,T,L,I){var j,R=1&r,O=2&r,P=4&r;if(M&&(j=L?M(t,T,L,I):M(t)),void 0!==j)return j;if(!x(t))return t;var $=b(t);if($){if(j=m(t),!R)return c(t,j)}else{var z=f(t),D=z==_||"[object GeneratorFunction]"==z;if(v(t))return l(t,R);if(z==A||z==E||D&&!L){if(j=O||D?{}:y(t),!R)return O?d(t,a(j,t)):u(t,s(j,t))}else{if(!N[z])return L?t:{};j=g(t,z,R)}}I||(I=new n);var B=I.get(t);if(B)return B;I.set(t,j),w(t)?t.forEach(function(n){j.add(e(n,r,M,n,t,I))}):k(t)&&t.forEach(function(n,i){j.set(i,e(n,r,M,i,t,I))});var F=P?O?p:h:O?S:C,H=$?void 0:F(t);return i(H||t,function(n,i){H&&(n=t[i=n]),o(j,i,e(n,r,M,i,t,I))}),j}},37291:(e,t,r)=>{var n=r(43113),i=r(21884),o=r(38605);e.exports=function(e,t,r,s,a,l){var c=1&r,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var y=e[f],b=t[f];if(s)var v=c?s(b,y,f,t,e,l):s(y,b,f,e,t,l);if(void 0!==v){if(v)continue;m=!1;break}if(g){if(!i(t,function(e,t){if(!o(g,t)&&(y===e||a(y,e,r,s,l)))return g.push(t)})){m=!1;break}}else if(!(y===b||a(y,b,r,s,l))){m=!1;break}}return l.delete(e),l.delete(t),m}},38264:(e,t,r)=>{var n=r(88463);e.exports=function(e,t,r){var n,o,s,a,l;return n=e,o=t||i,s=r||function(t){return e.outEdges(t)},a={},(l=n.nodes()).forEach(function(e){a[e]={},a[e][e]={distance:0},l.forEach(function(t){e!==t&&(a[e][t]={distance:1/0})}),s(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=o(t);a[e][r]={distance:n,predecessor:e}})}),l.forEach(function(e){var t=a[e];l.forEach(function(r){var n=a[r];l.forEach(function(r){var i=n[e],o=t[r],s=n[r],a=i.distance+o.distance;a<s.distance&&(s.distance=a,s.predecessor=o.predecessor)})})}),a};var i=n.constant(1)},38330:(e,t,r)=>{var n=r(11581),i=r(3620),o=r(71097),s=r(40369);e.exports=function e(t,r,a,l){var c,u,d=t.children(r),h=t.node(r),p=h?h.borderLeft:void 0,f=h?h.borderRight:void 0,m={};p&&(d=n.filter(d,function(e){return e!==p&&e!==f}));var g=i(t,d);n.forEach(g,function(r){if(t.children(r.v).length){var i,o,s=e(t,r.v,a,l);m[r.v]=s,n.has(s,"barycenter")&&(i=r,o=s,n.isUndefined(i.barycenter)?(i.barycenter=o.barycenter,i.weight=o.weight):(i.barycenter=(i.barycenter*i.weight+o.barycenter*o.weight)/(i.weight+o.weight),i.weight+=o.weight))}});var y=o(g,a);c=y,u=m,n.forEach(c,function(e){e.vs=n.flatten(e.vs.map(function(e){return u[e]?u[e].vs:e}),!0)});var b=s(y,l);if(p&&(b.vs=n.flatten([p,b.vs,f],!0),t.predecessors(p).length)){var v=t.node(t.predecessors(p)[0]),k=t.node(t.predecessors(f)[0]);n.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+v.order+k.order)/(b.weight+2),b.weight+=2}return b}},38605:e=>{e.exports=function(e,t){return e.has(t)}},38700:(e,t,r)=>{var n=r(82685),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=r(l),n(e,this,c)}}},38949:(e,t,r)=>{var n=r(86366),i=r(74205),o=r(88046),s=Object.prototype,a=Function.prototype.toString,l=s.hasOwnProperty,c=a.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==c}},38974:(e,t,r)=>{var n=r(25895);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},39281:(e,t,r)=>{"use strict";let n,i;r.d(t,{a:()=>nY});let o=[{id:"abap",name:"ABAP",import:()=>r.e(3889).then(r.bind(r,3889))},{id:"actionscript-3",name:"ActionScript",import:()=>r.e(8136).then(r.bind(r,18136))},{id:"ada",name:"Ada",import:()=>r.e(3155).then(r.bind(r,73155))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(5587)]).then(r.bind(r,5587))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([r.e(5568),r.e(8868),r.e(5962),r.e(7704),r.e(5347),r.e(9034)]).then(r.bind(r,41875))},{id:"apache",name:"Apache Conf",import:()=>r.e(5153).then(r.bind(r,75153))},{id:"apex",name:"Apex",import:()=>r.e(1459).then(r.bind(r,21459))},{id:"apl",name:"APL",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(794)]).then(r.bind(r,50794))},{id:"applescript",name:"AppleScript",import:()=>r.e(3350).then(r.bind(r,73350))},{id:"ara",name:"Ara",import:()=>r.e(2453).then(r.bind(r,12453))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>r.e(9626).then(r.bind(r,99626))},{id:"asm",name:"Assembly",import:()=>r.e(546).then(r.bind(r,10546))},{id:"astro",name:"Astro",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(5962),r.e(8386)]).then(r.bind(r,78386))},{id:"awk",name:"AWK",import:()=>r.e(6672).then(r.bind(r,46672))},{id:"ballerina",name:"Ballerina",import:()=>r.e(2399).then(r.bind(r,22399))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>r.e(2166).then(r.bind(r,42166))},{id:"beancount",name:"Beancount",import:()=>r.e(4260).then(r.bind(r,94260))},{id:"berry",name:"Berry",aliases:["be"],import:()=>r.e(8399).then(r.bind(r,98399))},{id:"bibtex",name:"BibTeX",import:()=>r.e(5869).then(r.bind(r,25869))},{id:"bicep",name:"Bicep",import:()=>r.e(5170).then(r.bind(r,85170))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>r.e(4974).then(r.bind(r,24974))},{id:"blade",name:"Blade",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(2793)]).then(r.bind(r,92793))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>r.e(6908).then(r.bind(r,6908))},{id:"c",name:"C",import:()=>r.e(8004).then(r.bind(r,18004))},{id:"c3",name:"C3",import:()=>r.e(2325).then(r.bind(r,72325))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>r.e(2582).then(r.bind(r,2582))},{id:"cairo",name:"Cairo",import:()=>Promise.all([r.e(9198),r.e(9899)]).then(r.bind(r,49899))},{id:"clarity",name:"Clarity",import:()=>r.e(9379).then(r.bind(r,29379))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>r.e(915).then(r.bind(r,60915))},{id:"cmake",name:"CMake",import:()=>r.e(7342).then(r.bind(r,57342))},{id:"cobol",name:"COBOL",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(5270)]).then(r.bind(r,75270))},{id:"codeowners",name:"CODEOWNERS",import:()=>r.e(3976).then(r.bind(r,53976))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>r.e(5391).then(r.bind(r,75391))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([r.e(5568),r.e(9803)]).then(r.bind(r,69803))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>r.e(7319).then(r.bind(r,67319))},{id:"coq",name:"Coq",import:()=>r.e(6252).then(r.bind(r,66252))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([r.e(169),r.e(841),r.e(691),r.e(8004),r.e(654)]).then(r.bind(r,96668))},{id:"crystal",name:"Crystal",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(691),r.e(8004),r.e(3188),r.e(6313)]).then(r.bind(r,76313))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>r.e(2614).then(r.bind(r,22614))},{id:"css",name:"CSS",import:()=>r.e(5962).then(r.bind(r,25962))},{id:"csv",name:"CSV",import:()=>r.e(8231).then(r.bind(r,18231))},{id:"cue",name:"CUE",import:()=>r.e(318).then(r.bind(r,20318))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>r.e(2898).then(r.bind(r,32898))},{id:"d",name:"D",import:()=>r.e(579).then(r.bind(r,20579))},{id:"dart",name:"Dart",import:()=>r.e(4772).then(r.bind(r,54772))},{id:"dax",name:"DAX",import:()=>r.e(4248).then(r.bind(r,44248))},{id:"desktop",name:"Desktop",import:()=>r.e(783).then(r.bind(r,60783))},{id:"diff",name:"Diff",import:()=>r.e(8170).then(r.bind(r,88170))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>r.e(2483).then(r.bind(r,52483))},{id:"dotenv",name:"dotEnv",import:()=>r.e(569).then(r.bind(r,60569))},{id:"dream-maker",name:"Dream Maker",import:()=>r.e(9325).then(r.bind(r,39325))},{id:"edge",name:"Edge",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(128)]).then(r.bind(r,50128))},{id:"elixir",name:"Elixir",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(8710)]).then(r.bind(r,98710))},{id:"elm",name:"Elm",import:()=>Promise.all([r.e(8004),r.e(3075)]).then(r.bind(r,43075))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>r.e(7072).then(r.bind(r,68657))},{id:"erb",name:"ERB",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(6266),r.e(4202)]).then(r.bind(r,4202))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([r.e(4572),r.e(1186)]).then(r.bind(r,61186))},{id:"fennel",name:"Fennel",import:()=>r.e(2336).then(r.bind(r,69955))},{id:"fish",name:"Fish",import:()=>r.e(689).then(r.bind(r,689))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>r.e(6385).then(r.bind(r,6385))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([r.e(4939),r.e(3793)]).then(r.bind(r,63793))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>r.e(4939).then(r.bind(r,44939))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([r.e(4572),r.e(8121)]).then(r.bind(r,38121))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>r.e(6010).then(r.bind(r,6010))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>r.e(7203).then(r.bind(r,47203))},{id:"gdshader",name:"GDShader",import:()=>r.e(5605).then(r.bind(r,15605))},{id:"genie",name:"Genie",import:()=>r.e(1075).then(r.bind(r,31075))},{id:"gherkin",name:"Gherkin",import:()=>r.e(3461).then(r.bind(r,93461))},{id:"git-commit",name:"Git Commit Message",import:()=>r.e(1757).then(r.bind(r,71757))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([r.e(3188),r.e(9614)]).then(r.bind(r,69614))},{id:"gleam",name:"Gleam",import:()=>r.e(2403).then(r.bind(r,82403))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(300)]).then(r.bind(r,70300))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(3862)]).then(r.bind(r,23862))},{id:"glsl",name:"GLSL",import:()=>Promise.all([r.e(8004),r.e(3739)]).then(r.bind(r,73739))},{id:"gn",name:"GN",import:()=>r.e(3220).then(r.bind(r,93220))},{id:"gnuplot",name:"Gnuplot",import:()=>r.e(5070).then(r.bind(r,75070))},{id:"go",name:"Go",import:()=>r.e(4885).then(r.bind(r,14885))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(4676)]).then(r.bind(r,74676))},{id:"groovy",name:"Groovy",import:()=>r.e(881).then(r.bind(r,60881))},{id:"hack",name:"Hack",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(691),r.e(684)]).then(r.bind(r,10684))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(2521)]).then(r.bind(r,2521))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(843)]).then(r.bind(r,20843))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>r.e(1123).then(r.bind(r,21123))},{id:"haxe",name:"Haxe",import:()=>r.e(9347).then(r.bind(r,49347))},{id:"hcl",name:"HashiCorp HCL",import:()=>r.e(5522).then(r.bind(r,25522))},{id:"hjson",name:"Hjson",import:()=>r.e(7265).then(r.bind(r,67265))},{id:"hlsl",name:"HLSL",import:()=>r.e(694).then(r.bind(r,80694))},{id:"html",name:"HTML",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704)]).then(r.bind(r,67704))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(1484)]).then(r.bind(r,81484))},{id:"http",name:"HTTP",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(3959),r.e(3188),r.e(4676),r.e(6063)]).then(r.bind(r,66063))},{id:"hurl",name:"Hurl",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(3959),r.e(4676),r.e(6700)]).then(r.bind(r,66700))},{id:"hxml",name:"HXML",import:()=>r.e(2500).then(r.bind(r,62500))},{id:"hy",name:"Hy",import:()=>r.e(1222).then(r.bind(r,31222))},{id:"imba",name:"Imba",import:()=>r.e(6206).then(r.bind(r,16206))},{id:"ini",name:"INI",aliases:["properties"],import:()=>r.e(6113).then(r.bind(r,6113))},{id:"java",name:"Java",import:()=>r.e(3959).then(r.bind(r,73959))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>r.e(5568).then(r.bind(r,90406))},{id:"jinja",name:"Jinja",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(9727)]).then(r.bind(r,49727))},{id:"jison",name:"Jison",import:()=>Promise.all([r.e(5568),r.e(9078)]).then(r.bind(r,79078))},{id:"json",name:"JSON",import:()=>r.e(8481).then(r.bind(r,28481))},{id:"json5",name:"JSON5",import:()=>r.e(5760).then(r.bind(r,5760))},{id:"jsonc",name:"JSON with Comments",import:()=>r.e(8462).then(r.bind(r,78462))},{id:"jsonl",name:"JSON Lines",import:()=>r.e(41).then(r.bind(r,70041))},{id:"jsonnet",name:"Jsonnet",import:()=>r.e(2496).then(r.bind(r,42496))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>r.e(8798).then(r.bind(r,88798))},{id:"jsx",name:"JSX",import:()=>r.e(2460).then(r.bind(r,44128))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([r.e(5568),r.e(169),r.e(841),r.e(691),r.e(8004),r.e(9198),r.e(4706)]).then(r.bind(r,88012))},{id:"just",name:"Just",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(9198),r.e(6266),r.e(676),r.e(4237)]).then(r.bind(r,4237))},{id:"kdl",name:"KDL",import:()=>r.e(4900).then(r.bind(r,44900))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>r.e(552).then(r.bind(r,80552))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>r.e(1331).then(r.bind(r,81331))},{id:"latex",name:"LaTeX",import:()=>r.e(4243).then(r.bind(r,4243))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>r.e(4879).then(r.bind(r,24879))},{id:"less",name:"Less",import:()=>r.e(3199).then(r.bind(r,45580))},{id:"liquid",name:"Liquid",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(9783)]).then(r.bind(r,69783))},{id:"llvm",name:"LLVM IR",import:()=>r.e(7968).then(r.bind(r,97968))},{id:"log",name:"Log file",import:()=>r.e(6817).then(r.bind(r,6817))},{id:"logo",name:"Logo",import:()=>r.e(4866).then(r.bind(r,24866))},{id:"lua",name:"Lua",import:()=>Promise.all([r.e(8004),r.e(5557)]).then(r.bind(r,35557))},{id:"luau",name:"Luau",import:()=>r.e(6004).then(r.bind(r,76004))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>r.e(9769).then(r.bind(r,69769))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>r.e(4572).then(r.bind(r,24572))},{id:"marko",name:"Marko",import:()=>Promise.all([r.e(6165),r.e(5962),r.e(5347),r.e(3199),r.e(5921)]).then(r.bind(r,65921))},{id:"matlab",name:"MATLAB",import:()=>r.e(1828).then(r.bind(r,41828))},{id:"mdc",name:"MDC",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(4572),r.e(5677)]).then(r.bind(r,75677))},{id:"mdx",name:"MDX",import:()=>r.e(6766).then(r.bind(r,6766))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>r.e(5718).then(r.bind(r,95718))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>r.e(9857).then(r.bind(r,59857))},{id:"mojo",name:"Mojo",import:()=>r.e(2902).then(r.bind(r,2902))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>r.e(6851).then(r.bind(r,26851))},{id:"move",name:"Move",import:()=>r.e(5e3).then(r.bind(r,15e3))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>r.e(6099).then(r.bind(r,26099))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>r.e(1804).then(r.bind(r,51804))},{id:"nextflow-groovy",name:"nextflow-groovy",import:()=>r.e(8693).then(r.bind(r,88693))},{id:"nginx",name:"Nginx",import:()=>Promise.all([r.e(8004),r.e(9107)]).then(r.bind(r,9107))},{id:"nim",name:"Nim",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(8004),r.e(4572),r.e(7883)]).then(r.bind(r,67883))},{id:"nix",name:"Nix",import:()=>r.e(7504).then(r.bind(r,37504))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>r.e(2796).then(r.bind(r,2796))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>r.e(5126).then(r.bind(r,85126))},{id:"objective-cpp",name:"Objective-C++",import:()=>r.e(4698).then(r.bind(r,74078))},{id:"ocaml",name:"OCaml",import:()=>r.e(3159).then(r.bind(r,13159))},{id:"odin",name:"Odin",import:()=>r.e(2719).then(r.bind(r,12719))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>r.e(3126).then(r.bind(r,63126))},{id:"pascal",name:"Pascal",import:()=>r.e(7627).then(r.bind(r,17627))},{id:"perl",name:"Perl",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(676),r.e(8148)]).then(r.bind(r,10676))},{id:"php",name:"PHP",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(2975),r.e(5767)]).then(r.bind(r,42975))},{id:"pkl",name:"Pkl",import:()=>r.e(6034).then(r.bind(r,56034))},{id:"plsql",name:"PL/SQL",import:()=>r.e(4855).then(r.bind(r,84855))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>r.e(9392).then(r.bind(r,29392))},{id:"polar",name:"Polar",import:()=>r.e(379).then(r.bind(r,379))},{id:"postcss",name:"PostCSS",import:()=>r.e(9932).then(r.bind(r,99932))},{id:"powerquery",name:"PowerQuery",import:()=>r.e(7762).then(r.bind(r,47762))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>r.e(3392).then(r.bind(r,53392))},{id:"prisma",name:"Prisma",import:()=>r.e(1915).then(r.bind(r,21915))},{id:"prolog",name:"Prolog",import:()=>r.e(1806).then(r.bind(r,91806))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>r.e(6909).then(r.bind(r,46909))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(3791)]).then(r.bind(r,73791))},{id:"puppet",name:"Puppet",import:()=>r.e(5301).then(r.bind(r,45301))},{id:"purescript",name:"PureScript",import:()=>r.e(4312).then(r.bind(r,84312))},{id:"python",name:"Python",aliases:["py"],import:()=>r.e(9198).then(r.bind(r,26817))},{id:"qml",name:"QML",import:()=>Promise.all([r.e(5568),r.e(2697)]).then(r.bind(r,62697))},{id:"qmldir",name:"QML Directory",import:()=>r.e(724).then(r.bind(r,10724))},{id:"qss",name:"Qt Style Sheets",import:()=>r.e(596).then(r.bind(r,40596))},{id:"r",name:"R",import:()=>r.e(8469).then(r.bind(r,78469))},{id:"racket",name:"Racket",import:()=>r.e(2345).then(r.bind(r,12345))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>r.e(5264).then(r.bind(r,35264))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(2614),r.e(6323)]).then(r.bind(r,6323))},{id:"reg",name:"Windows Registry Script",import:()=>r.e(1825).then(r.bind(r,71825))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>r.e(9552).then(r.bind(r,99552))},{id:"rel",name:"Rel",import:()=>r.e(9954).then(r.bind(r,79954))},{id:"riscv",name:"RISC-V",import:()=>r.e(3541).then(r.bind(r,55922))},{id:"ron",name:"RON",import:()=>r.e(5570).then(r.bind(r,65570))},{id:"rosmsg",name:"ROS Interface",import:()=>r.e(9044).then(r.bind(r,29044))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(9198),r.e(6266),r.e(6612)]).then(r.bind(r,96612))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(6266)]).then(r.bind(r,63583))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>r.e(7349).then(r.bind(r,27349))},{id:"sas",name:"SAS",import:()=>Promise.all([r.e(691),r.e(6588)]).then(r.bind(r,16588))},{id:"sass",name:"Sass",import:()=>r.e(1706).then(r.bind(r,49325))},{id:"scala",name:"Scala",import:()=>r.e(7133).then(r.bind(r,17133))},{id:"scheme",name:"Scheme",import:()=>r.e(426).then(r.bind(r,50426))},{id:"scss",name:"SCSS",import:()=>Promise.all([r.e(5962),r.e(5347)]).then(r.bind(r,95347))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>r.e(444).then(r.bind(r,20444))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>r.e(9855).then(r.bind(r,29855))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>r.e(3188).then(r.bind(r,93188))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([r.e(3188),r.e(7597)]).then(r.bind(r,7597))},{id:"smalltalk",name:"Smalltalk",import:()=>r.e(288).then(r.bind(r,50288))},{id:"solidity",name:"Solidity",import:()=>r.e(1388).then(r.bind(r,51388))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([r.e(5568),r.e(5962),r.e(7704),r.e(8500)]).then(r.bind(r,58500))},{id:"sparql",name:"SPARQL",import:()=>r.e(9460).then(r.bind(r,9460))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>r.e(3582).then(r.bind(r,13582))},{id:"sql",name:"SQL",import:()=>r.e(691).then(r.bind(r,30691))},{id:"ssh-config",name:"SSH Config",import:()=>r.e(6834).then(r.bind(r,46834))},{id:"stata",name:"Stata",import:()=>Promise.all([r.e(691),r.e(8388)]).then(r.bind(r,78388))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>r.e(553).then(r.bind(r,60553))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>Promise.all([r.e(5568),r.e(9026)]).then(r.bind(r,99026))},{id:"svelte",name:"Svelte",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(8890)]).then(r.bind(r,58890))},{id:"swift",name:"Swift",import:()=>r.e(1262).then(r.bind(r,71262))},{id:"system-verilog",name:"SystemVerilog",import:()=>r.e(2993).then(r.bind(r,72993))},{id:"systemd",name:"Systemd Units",import:()=>r.e(8322).then(r.bind(r,28322))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>r.e(8303).then(r.bind(r,65922))},{id:"tasl",name:"Tasl",import:()=>r.e(8719).then(r.bind(r,68719))},{id:"tcl",name:"Tcl",import:()=>r.e(7294).then(r.bind(r,97294))},{id:"templ",name:"Templ",import:()=>Promise.all([r.e(5568),r.e(5962),r.e(4885),r.e(4989)]).then(r.bind(r,34989))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>r.e(7).then(r.bind(r,30007))},{id:"tex",name:"TeX",import:()=>r.e(5620).then(r.bind(r,35620))},{id:"toml",name:"TOML",import:()=>r.e(4495).then(r.bind(r,54495))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(6852)]).then(r.bind(r,6852))},{id:"tsv",name:"TSV",import:()=>r.e(1420).then(r.bind(r,21420))},{id:"tsx",name:"TSX",import:()=>r.e(219).then(r.bind(r,86970))},{id:"turtle",name:"Turtle",import:()=>r.e(4601).then(r.bind(r,54601))},{id:"twig",name:"Twig",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(219),r.e(2460),r.e(169),r.e(841),r.e(5962),r.e(7704),r.e(3959),r.e(691),r.e(8004),r.e(3188),r.e(4676),r.e(9198),r.e(6266),r.e(5347),r.e(2975),r.e(752)]).then(r.bind(r,10752))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>r.e(6165).then(r.bind(r,31366))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>r.e(9598).then(r.bind(r,79598))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>r.e(6609).then(r.bind(r,6609))},{id:"v",name:"V",import:()=>r.e(2529).then(r.bind(r,62529))},{id:"vala",name:"Vala",import:()=>r.e(5529).then(r.bind(r,25529))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>r.e(5111).then(r.bind(r,65111))},{id:"verilog",name:"Verilog",import:()=>r.e(157).then(r.bind(r,30157))},{id:"vhdl",name:"VHDL",import:()=>r.e(1237).then(r.bind(r,31237))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>r.e(3919).then(r.bind(r,33919))},{id:"vue",name:"Vue",import:()=>Promise.all([r.e(5568),r.e(6165),r.e(5962),r.e(7704),r.e(2172)]).then(r.bind(r,12172))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([r.e(5568),r.e(6801)]).then(r.bind(r,36801))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([r.e(5568),r.e(3459),r.e(5962),r.e(5347),r.e(3199),r.e(8790)]).then(r.bind(r,79106))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>r.e(3367).then(r.bind(r,83367))},{id:"wasm",name:"WebAssembly",import:()=>r.e(6607).then(r.bind(r,26607))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>r.e(5249).then(r.bind(r,35249))},{id:"wgsl",name:"WGSL",import:()=>r.e(5012).then(r.bind(r,15012))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>r.e(7614).then(r.bind(r,47614))},{id:"wit",name:"WebAssembly Interface Types",import:()=>r.e(1191).then(r.bind(r,31191))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>r.e(4725).then(r.bind(r,67399))},{id:"xml",name:"XML",import:()=>Promise.all([r.e(3959),r.e(3386)]).then(r.bind(r,98148))},{id:"xsl",name:"XSL",import:()=>Promise.all([r.e(3959),r.e(898)]).then(r.bind(r,70898))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>r.e(7226).then(r.bind(r,47226))},{id:"zenscript",name:"ZenScript",import:()=>r.e(2273).then(r.bind(r,22273))},{id:"zig",name:"Zig",import:()=>r.e(9949).then(r.bind(r,19949))}],s=Object.fromEntries(o.map(e=>[e.id,e.import])),a=Object.fromEntries(o.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),l={...s,...a};class c extends Error{constructor(e){super(e),this.name="ShikiError"}}var u=r(34897);function d(e,...t){return t.forEach(t=>{for(let r in t)e[r]=t[r]}),e}var h=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,p=class{static hasCaptures(e){return null!==e&&(h.lastIndex=0,h.test(e))}static replaceCaptures(e,t,r){return e.replace(h,(e,n,i,o)=>{let s=r[parseInt(n||i,10)];if(!s)return e;{let e=t.substring(s.start,s.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function f(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let n=0;n<r;n++){var i,o;let r=(i=e[n],i<(o=t[n])?-1:+(i>o));if(0!==r)return r}return 0}return r-n}function m(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 g(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var y=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}},b=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let e=0,i=t.length;e<i;e++){let i,o=t[e];if(!o.settings)continue;if("string"==typeof o.scope){let e=o.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(o.scope)?o.scope:[""];let s=-1;if("string"==typeof o.settings.fontStyle){s=0;let e=o.settings.fontStyle.split(" ");for(let t=0,r=e.length;t<r;t++)switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}let a=null;"string"==typeof o.settings.foreground&&m(o.settings.foreground)&&(a=o.settings.foreground);let l=null;"string"==typeof o.settings.background&&m(o.settings.background)&&(l=o.settings.background);for(let t=0,o=i.length;t<o;t++){let o=i[t].trim().split(" "),c=o[o.length-1],u=null;o.length>1&&(u=o.slice(0,o.length-1)).reverse(),r[n++]=new x(c,u,e,s,a,l)}}return r}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var r,n;let i=(r=e.scope,r<(n=t.scope)?-1:+(r>n));return 0!==i||0!==(i=f(e.parentScopes,t.parentScopes))?i:e.index-t.index});let r=0,n="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(r=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(i=t.background)}let o=new C(t),s=new k(r,o.getId(n),o.getId(i)),a=new _(new E(0,null,-1,0,0),[]);for(let t=0,r=e.length;t<r;t++){let r=e[t];a.insert(0,r.scope,r.parentScopes,r.fontStyle,o.getId(r.foreground),o.getId(r.background))}return new b(o,s,a)}(e,t)}_cachedMatchRoot=new y(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,r=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let i=0;i<t.length;i++){var r,n;let o=t[i],s=!1;if(">"===o){if(i===t.length-1)return!1;o=t[++i],s=!0}for(;e&&(r=e.scopeName,!((n=o)===r||r.startsWith(n)&&"."===r[n.length]));){if(s)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return r?new k(r.fontStyle,r.foreground,r.background):null}},v=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,r){for(let n of r)t=new e(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new e(r,t[n]);return r}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=[],r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}},k=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}},x=class{constructor(e,t,r,n,i,o){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=i,this.background=o}},w=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(w||{}),C=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,r=e.length;t<r;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)}},S=Object.freeze([]),E=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,n,i){this.scopeDepth=e,this.parentScopes=t||S,this.fontStyle=r,this.foreground=n,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,n){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==r&&(this.foreground=r),0!==n&&(this.background=n)}},_=class e{constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,n=0;for(;">"===e.parentScopes[r]&&r++,">"===t.parentScopes[n]&&n++,!(r>=e.parentScopes.length)&&!(n>=t.parentScopes.length);){let i=t.parentScopes[n].length-e.parentScopes[r].length;if(0!==i)return i;r++,n++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,r,n=t.indexOf(".");if(-1===n?(e=t,r=""):(e=t.substring(0,n),r=t.substring(n+1)),this._children.hasOwnProperty(e))return this._children[e].match(r)}let r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(e._cmpBySpecificity),r}insert(t,r,n,i,o,s){let a,l,c;if(""===r)return void this._doInsertHere(t,n,i,o,s);let u=r.indexOf(".");-1===u?(a=r,l=""):(a=r.substring(0,u),l=r.substring(u+1)),this._children.hasOwnProperty(a)?c=this._children[a]:(c=new e(this._mainRule.clone(),E.cloneArr(this._rulesWithParentScopes)),this._children[a]=c),c.insert(t+1,l,n,i,o,s)}_doInsertHere(e,t,r,n,i){if(null===t)return void this._mainRule.acceptOverwrite(e,r,n,i);for(let o=0,s=this._rulesWithParentScopes.length;o<s;o++){let s=this._rulesWithParentScopes[o];if(0===f(s.parentScopes,t))return void s.acceptOverwrite(e,r,n,i)}-1===r&&(r=this._mainRule.fontStyle),0===n&&(n=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new E(e,t,r,n,i))}},A=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let r=e.getLanguageId(t),n=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:r,tokenType:n,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,r,n,i,o,s,a){let l=e.getLanguageId(t),c=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),h=e.getForeground(t),p=e.getBackground(t);return 0!==r&&(l=r),8!==n&&(c=n),null!==i&&(u=+!!i),-1!==o&&(d=o),0!==s&&(h=s),0!==a&&(p=a),(0|l|c<<8|u<<10|d<<11|h<<15|p<<24)>>>0}};function N(e,t){var r;let n,i,o=[],s=(r=e,i=(n=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(r),{next:()=>{if(!i)return null;let e=i[0];return i=n.exec(r),e}}),a=s.next();for(;null!==a;){let e=0;if(2===a.length&&":"===a.charAt(1)){switch(a.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=s.next()}let t=c();if(o.push({matcher:t,priority:e}),","!==a)break;a=s.next()}return o;function l(){if("-"===a){a=s.next();let e=l();return t=>!!e&&!e(t)}if("("===a){a=s.next();let e=function(){let e=[],t=c();for(;t&&(e.push(t),"|"===a||","===a);){do a=s.next();while("|"===a||","===a);t=c()}return t=>e.some(e=>e(t))}();return")"===a&&(a=s.next()),e}if(M(a)){let e=[];do e.push(a),a=s.next();while(M(a));return r=>t(e,r)}return null}function c(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function M(e){return!!e&&!!e.match(/[\w\.:]+/)}var T=(e=>(e[e.None=0]="None",e[e.NotBeginString=1]="NotBeginString",e[e.NotEndString=2]="NotEndString",e[e.NotBeginPosition=4]="NotBeginPosition",e[e.DebugCall=8]="DebugCall",e))(T||{});function L(e){"function"==typeof e.dispose&&e.dispose()}var I=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},j=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},R=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))}},O=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new I(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new R;for(let r of e)!function(e,t,r,n){let i=r.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let o=r.lookup(t);e instanceof I?$({baseGrammar:o,selfGrammar:i},n):P(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);let s=r.injections(e.scopeName);if(s)for(let e of s)n.add(new I(e))}(r,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof I){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 P(e,t,r){t.repository&&t.repository[e]&&z([t.repository[e]],t,r)}function $(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,r){for(let n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);let e=n.repository?d({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&z(n.patterns,{...t,repository:e},r);let i=n.include;if(!i)continue;let o=G(i);switch(o.kind){case 0:$({...t,selfGrammar:t.baseGrammar},r);break;case 1:$(t,r);break;case 2:P(o.ruleName,{...t,repository:e},r);break;case 3:case 4:let s=o.scopeName===t.selfGrammar.scopeName?t.selfGrammar:o.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){let n={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===o.kind?P(o.ruleName,n,r):$(n,r)}else 4===o.kind?r.add(new j(o.scopeName,o.ruleName)):r.add(new I(o.scopeName))}}}var D=class{kind=0},B=class{kind=1},F=class{constructor(e){this.ruleName=e}kind=2},H=class{constructor(e){this.scopeName=e}kind=3},U=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function G(e){if("$base"===e)return new D;if("$self"===e)return new B;let t=e.indexOf("#");return -1===t?new H(e):0===t?new F(e.substring(1)):new U(e.substring(0,t),e.substring(t+1))}var q=/\\(\d+)/,W=/\\(\d+)/g;Symbol("RuleId");var V=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=p.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=p.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let r=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===r?t:~r==t.length-1?e(t.substring(0,t.length-1)):t.substr(~r+1)}(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?p.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?p.replaceCaptures(this._contentName,e,t):this._contentName}},K=class extends V{retokenizeCapturedWithRuleId;constructor(e,t,r,n,i){super(e,t,r,n),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,r,n){throw Error("Not supported!")}},J=class extends V{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,i){super(e,t,r,null),this._match=new ee(n,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,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new et,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Z=class extends V{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,i){super(e,t,r,n),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 r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new et,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},X=class extends V{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,i,o,s,a,l,c){super(e,t,r,n),this._begin=new ee(i,this.id),this.beginCaptures=o,this._end=new ee(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.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,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new et,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}},Q=class extends V{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,i,o,s,a,l){super(e,t,r,n),this._begin=new ee(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new ee(s,-2),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,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new et,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,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new et,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Y=class e{static createCaptureRule(e,t,r,n,i){return e.registerRule(e=>new K(t,e,r,n,i))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(i=>{if(t.id=i,t.match)return new J(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,r,n));if(void 0===t.begin){t.repository&&(n=d({},n,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new Z(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,r,n))}return t.while?new Q(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,e._compileCaptures(t.whileCaptures||t.captures,r,n),e._compilePatterns(t.patterns,r,n)):new X(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,e._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,e._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let i=[];if(t){let o=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>o&&(o=t)}for(let e=0;e<=o;e++)i[e]=null;for(let o in t){if("$vscodeTextmateLocation"===o)continue;let s=parseInt(o,10),a=0;t[o].patterns&&(a=e.getCompiledRuleId(t[o],r,n)),i[s]=e.createCaptureRule(r,t[o].$vscodeTextmateLocation,t[o].name,t[o].contentName,a)}}return i}static _compilePatterns(t,r,n){let i=[];if(t)for(let o=0,s=t.length;o<s;o++){let s=t[o],a=-1;if(s.include){let t=G(s.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(n[s.include],r,n);break;case 2:let i=n[t.ruleName];i&&(a=e.getCompiledRuleId(i,r,n));break;case 3:case 4:let o=t.scopeName,l=4===t.kind?t.ruleName:null,c=r.getExternalGrammar(o,n);if(c)if(l){let t=c.repository[l];t&&(a=e.getCompiledRuleId(t,r,c.repository))}else a=e.getCompiledRuleId(c.repository.$self,r,c.repository)}}else a=e.getCompiledRuleId(s,r,n);if(-1!==a){let e=r.getRule(a),t=!1;if((e instanceof Z||e instanceof X||e instanceof Q)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ee=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){let t=e.length,r=0,n=[],i=!1;for(let o=0;o<t;o++)if("\\"===e.charAt(o)&&o+1<t){let t=e.charAt(o+1);"z"===t?(n.push(e.substring(r,o)),n.push("$(?!\\n)(?<!\\n)"),r=o+2):("A"===t||"G"===t)&&(i=!0),o++}this.hasAnchor=i,0===r?this.source=e:(n.push(e.substring(r,t)),this.source=n.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=q.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 r=t.map(t=>e.substring(t.start,t.end));return W.lastIndex=0,this.source.replace(W,(e,t)=>g(r[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,r,n;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],o=[],s=[],a=[];for(e=0,t=this.source.length;e<t;e++)r=this.source.charAt(e),i[e]=r,o[e]=r,s[e]=r,a[e]=r,"\\"===r&&e+1<t&&("A"===(n=this.source.charAt(e+1))?(i[e+1]="",o[e+1]="",s[e+1]="A",a[e+1]="A"):"G"===n?(i[e+1]="",o[e+1]="G",s[e+1]="",a[e+1]="G"):(i[e+1]=n,o[e+1]=n,s[e+1]=n,a[e+1]=n),e++);return{A0_G0:i.join(""),A0_G1:o.join(""),A1_G0:s.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}},et=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 er(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,r){if(!this._hasAnchors)return this.compile(e);if(t)if(r)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0;return r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,r){return new er(e,this._items.map(e=>e.resolveAnchors(t,r)),this._items.map(e=>e.ruleId))}},er=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,r){let n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},en=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ei=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new en(e,8),this._embeddedLanguagesMatcher=new eo(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 en(0,0);_getBasicScopeAttributes=new y(e=>new en(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let r=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[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/},eo=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>g(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!==u&&u.env.VSCODE_TEXTMATE_DEBUG;var es=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function ea(e,t,r,n,i,o,s,a){let l=t.content.length,c=!1,u=-1;if(s){let s=function(e,t,r,n,i,o){let s=i.beginRuleCapturedEOL?0:-1,a=[];for(let t=i;t;t=t.pop()){let r=t.getRule(e);r instanceof Q&&a.push({rule:r,stack:t})}for(let p=a.pop();p;p=a.pop()){var l,c,u,d,h;let{ruleScanner:a,findOptions:f}=(l=p.rule,c=e,u=p.stack.endRule,d=r,h=n===s,{ruleScanner:l.compileWhileAG(c,u,d,h),findOptions:0}),m=a.findNextMatchSync(t,n,f);if(m){if(-2!==m.ruleId){i=p.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(o.produce(p.stack,m.captureIndices[0].start),ec(e,t,r,p.stack,o,p.rule.whileCaptures,m.captureIndices),o.produce(p.stack,m.captureIndices[0].end),s=m.captureIndices[0].end,m.captureIndices[0].end>n&&(n=m.captureIndices[0].end,r=!1))}else{i=p.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:s,isFirstLine:r}}(e,t,r,n,i,o);i=s.stack,n=s.linePos,r=s.isFirstLine,u=s.anchorPosition}let d=Date.now();for(;!c;){if(0!==a&&Date.now()-d>a)return new es(i,!0);!function(){let s=function(e,t,r,n,i,o){let s=function(e,t,r,n,i,o){let{ruleScanner:s,findOptions:a}=el(i.getRule(e),e,i.endRule,r,n===o),l=s.findNextMatchSync(t,n,a);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,r,n,i,o),a=e.getInjections();if(0===a.length)return s;let l=function(e,t,r,n,i,o,s){let a,l=Number.MAX_VALUE,c=null,u=0,d=o.contentNameScopesList.getScopeNames();for(let o=0,h=e.length;o<h;o++){let h=e[o];if(!h.matcher(d))continue;let{ruleScanner:p,findOptions:f}=el(t.getRule(h.ruleId),t,null,n,i===s),m=p.findNextMatchSync(r,i,f);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=l)&&(l=g,c=m.captureIndices,a=m.ruleId,u=h.priority,l===i))break}return c?{priorityMatch:-1===u,captureIndices:c,matchedRuleId:a}:null}(a,e,t,r,n,i,o);if(!l)return s;if(!s)return l;let c=s.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:s}(e,t,r,n,i,u);if(!s){o.produce(i,l),c=!0;return}let a=s.captureIndices,d=s.matchedRuleId,h=!!a&&a.length>0&&a[0].end>n;if(-1===d){let s=i.getRule(e);o.produce(i,a[0].start),i=i.withContentNameScopesList(i.nameScopesList),ec(e,t,r,i,o,s.endCaptures,a),o.produce(i,a[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!h&&d.getEnterPos()===n){i=d,o.produce(i,l),c=!0;return}}else{let s=e.getRule(d);o.produce(i,a[0].start);let p=i,f=s.getName(t.content,a),m=i.contentNameScopesList.pushAttributed(f,e);if(i=i.push(d,n,u,a[0].end===l,null,m,m),s instanceof X){ec(e,t,r,i,o,s.beginCaptures,a),o.produce(i,a[0].end),u=a[0].end;let n=s.getContentName(t.content,a),d=m.pushAttributed(n,e);if(i=i.withContentNameScopesList(d),s.endHasBackReferences&&(i=i.withEndRule(s.getEndWithResolvedBackReferences(t.content,a))),!h&&p.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),c=!0;return}}else if(s instanceof Q){ec(e,t,r,i,o,s.beginCaptures,a),o.produce(i,a[0].end),u=a[0].end;let n=s.getContentName(t.content,a),d=m.pushAttributed(n,e);if(i=i.withContentNameScopesList(d),s.whileHasBackReferences&&(i=i.withEndRule(s.getWhileWithResolvedBackReferences(t.content,a))),!h&&p.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),c=!0;return}}else if(ec(e,t,r,i,o,s.captures,a),o.produce(i,a[0].end),i=i.pop(),!h){i=i.safePop(),o.produce(i,l),c=!0;return}}a[0].end>n&&(n=a[0].end,r=!1)}()}return new es(i,!1)}function el(e,t,r,n,i){return{ruleScanner:e.compileAG(t,r,n,i),findOptions:0}}function ec(e,t,r,n,i,o,s){if(0===o.length)return;let a=t.content,l=Math.min(o.length,s.length),c=[],u=s[0].end;for(let t=0;t<l;t++){let l=o[t];if(null===l)continue;let d=s[t];if(0===d.length)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,d.start):i.produce(n,d.start),l.retokenizeCapturedWithRuleId){let t=l.getName(a,s),o=n.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(a,s),u=o.pushAttributed(c,e),h=n.push(l.retokenizeCapturedWithRuleId,d.start,-1,!1,null,o,u),p=e.createOnigString(a.substring(0,d.end));ea(e,p,r&&0===d.start,d.start,h,i,!1,0),L(p);continue}let h=l.getName(a,s);if(null!==h){let t=(c.length>0?c[c.length-1].scopes:n.contentNameScopesList).pushAttributed(h,e);c.push(new eu(t,d.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var eu=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ed(e,t,r,n,i){let o=N(t,eh),s=Y.getCompiledRuleId(r,n,i.repository);for(let r of o)e.push({debugSelector:t,matcher:r.matcher,ruleId:s,grammar:i,priority:r.priority})}function eh(e,t){if(t.length<e.length)return!1;let r=0;return e.every(e=>{for(let n=r;n<t.length;n++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let r=t.length;return e.length>r&&e.substr(0,r)===t&&"."===e[r]}(t[n],e))return r=n+1,!0;return!1})}var ep=class{constructor(e,t,r,n,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new ei(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=ef(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i))for(let t of N(e,eh))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=[],t=this._rootScopeName,r=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(r){let n=r.injections;if(n)for(let t in n)ed(e,t,n[t],this,r);let i=this._grammarRepository.injections(t);i&&i.forEach(t=>{let r=this.getExternalGrammar(t);if(r){let t=r.injectionSelector;t&&ed(e,t,r,this,r)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=ef(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){let n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){let n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){let i;if(-1===this._rootId&&(this._rootId=Y.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==eg.NULL)i=!1,t.reset();else{let e;i=!0;let r=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),o=A.set(0,r.languageId,r.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),s=this.getRule(this._rootId).getName(null,null);e=s?em.createRootAndLookUpScopeName(s,o,this):em.createRoot("unknown",o),t=new eg(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let o=this.createOnigString(e),s=o.content.length,a=new eb(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=ea(this,o,i,0,t,a,!0,n);return L(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function ef(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let r=[];for(let n=0,i=t.length;n<i;n++)r[n]=e(t[n]);return r}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let r={};for(let n in t)r[n]=e(t[n]);return r}(t):t}(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 em=class e{constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(t,r){let n=t,i=t?.scopePath??null;for(let t of r)n=new e(n,i=v.push(i,t.scopeNames),t.encodedTokenAttributes);return n}static createRoot(t,r){return new e(null,new v(null,t),r)}static createRootAndLookUpScopeName(t,r,n){let i=n.getMetadataForScope(t),o=new v(null,t),s=n.themeProvider.themeMatch(o),a=e.mergeAttributes(r,i,s);return new e(null,o,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,r){let n=-1,i=0,o=0;return null!==r&&(n=r.fontStyle,i=r.foregroundId,o=r.backgroundId),A.set(e,t.languageId,t.tokenType,null,n,i,o)}pushAttributed(t,r){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,r);let n=t.split(/ /g),i=this;for(let t of n)i=e._pushAttributed(i,t,r);return i}static _pushAttributed(t,r,n){let i=n.getMetadataForScope(r),o=t.scopePath.push(r),s=n.themeProvider.themeMatch(o),a=e.mergeAttributes(t.tokenAttributes,i,s);return new e(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?t.reverse():void 0}},eg=class e{constructor(e,t,r,n,i,o,s,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=s,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=n}_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)&&em.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,r,n,i,o,s,a){return new e(this,t,r,n,i,o,s,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: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,r){let n=em.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new e(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,em.fromExtension(n,r.contentNameScopesList))}},ey=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):N(e,eh).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>N(e,eh).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}},eb=class{constructor(e,t,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,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 r=e?.tokenAttributes??0,n=!1;if(this.balancedBracketSelectors?.matchesAlways&&(n=!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)&&(r=A.set(r,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(n=this.balancedBracketSelectors.match(t))}if(n&&(r=A.set(r,0,8,n,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}let r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),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 r=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)r[e]=this._binaryTokens[e];return r}},ev=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,r,n,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,new ep(e,o,t,r,n,i,this,this._onigLib))}return this._grammars.get(e)}},ek=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ev(b.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(b.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new ey(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,n,i){let o=new O(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(e=>this._loadSingleGrammar(e.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,r,n,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 r="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,n=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,n)}_grammarForScopeName(e,t=0,r=null,n=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,r,n,i)}},ex=eg.NULL,ew=r(30736),eC=r(78444),eS=r(8959);let eE=/["&'<>`]/g,e_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eA=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eN=/[|\\{}()[\]^$+*?.]/g,eM=new WeakMap,eT=/[\dA-Fa-f]/,eL=/\d/,eI=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],ej={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:"€"},eR=["cent","copy","divide","gt","lt","not","para","times"],eO={}.hasOwnProperty,eP={};for(n in ej)eO.call(ej,n)&&(eP[ej[n]]=n);let e$=/[^\dA-Za-z]/;function ez(e,t,r){let n,i=function(e,t,r){let n="&#x"+e.toString(16).toUpperCase();return r&&t&&!eT.test(String.fromCharCode(t))?n:n+";"}(e,t,r.omitOptionalSemicolons);if((r.useNamedReferences||r.useShortestReferences)&&(n=function(e,t,r,n){let i=String.fromCharCode(e);if(eO.call(eP,i)){let e=eP[i],o="&"+e;return r&&eI.includes(e)&&!eR.includes(e)&&(!n||t&&61!==t&&e$.test(String.fromCharCode(t)))?o:o+";"}return""}(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!n)&&r.useShortestReferences){let n=function(e,t,r){let n="&#"+String(e);return r&&t&&!eL.test(String.fromCharCode(t))?n:n+";"}(e,t,r.omitOptionalSemicolons);n.length<i.length&&(i=n)}return n&&(!r.useShortestReferences||n.length<i.length)?n:i}function eD(e,t){let r;var n,i=e,o=Object.assign({format:ez},t);if(i=i.replace(o.subset?(n=o.subset,(r=eM.get(n))||(r=function(e){let t=[],r=-1;for(;++r<e.length;)t.push(e[r].replace(eN,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(n),eM.set(n,r)),r):eE,s),o.subset||o.escapeOnly)return i;return i.replace(e_,function(e,t,r){return o.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(t+2),o)}).replace(eA,s);function s(e,t,r){return o.format(e.charCodeAt(0),r.charCodeAt(t+1),o)}}let eB=/^>|^->|<!--|-->|--!>|<!-$/g,eF=[">"],eH=["<",">"];var eU=r(98728),eG=r(43918),eq=r(54802),eW=r(49009),eV=r(16468);let eK=eX(1),eJ=eX(-1),eZ=[];function eX(e){return function(t,r,n){let i=t?t.children:eZ,o=(r||0)+e,s=i[o];if(!n)for(;s&&(0,eV.m)(s);)o+=e,s=i[o];return s}}let eQ={}.hasOwnProperty;function eY(e){return function(t,r,n){return eQ.call(e,t.tagName)&&e[t.tagName](t,r,n)}}let e0=eY({body:function(e,t,r){let n=eK(r,t);return!n||"comment"!==n.type},caption:e1,colgroup:e1,dd:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("dt"===n.tagName||"dd"===n.tagName)},dt:function(e,t,r){let n=eK(r,t);return!!(n&&"element"===n.type&&("dt"===n.tagName||"dd"===n.tagName))},head:e1,html:function(e,t,r){let n=eK(r,t);return!n||"comment"!==n.type},li:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&"li"===n.tagName},optgroup:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&"optgroup"===n.tagName},option:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("option"===n.tagName||"optgroup"===n.tagName)},p:function(e,t,r){let n=eK(r,t);return n?"element"===n.type&&("address"===n.tagName||"article"===n.tagName||"aside"===n.tagName||"blockquote"===n.tagName||"details"===n.tagName||"div"===n.tagName||"dl"===n.tagName||"fieldset"===n.tagName||"figcaption"===n.tagName||"figure"===n.tagName||"footer"===n.tagName||"form"===n.tagName||"h1"===n.tagName||"h2"===n.tagName||"h3"===n.tagName||"h4"===n.tagName||"h5"===n.tagName||"h6"===n.tagName||"header"===n.tagName||"hgroup"===n.tagName||"hr"===n.tagName||"main"===n.tagName||"menu"===n.tagName||"nav"===n.tagName||"ol"===n.tagName||"p"===n.tagName||"pre"===n.tagName||"section"===n.tagName||"table"===n.tagName||"ul"===n.tagName):!r||"element"!==r.type||"a"!==r.tagName&&"audio"!==r.tagName&&"del"!==r.tagName&&"ins"!==r.tagName&&"map"!==r.tagName&&"noscript"!==r.tagName&&"video"!==r.tagName},rp:e2,rt:e2,tbody:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("tbody"===n.tagName||"tfoot"===n.tagName)},td:e5,tfoot:function(e,t,r){return!eK(r,t)},th:e5,thead:function(e,t,r){let n=eK(r,t);return!!(n&&"element"===n.type&&("tbody"===n.tagName||"tfoot"===n.tagName))},tr:function(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&"tr"===n.tagName}});function e1(e,t,r){let n=eK(r,t,!0);return!n||"comment"!==n.type&&!("text"===n.type&&(0,eV.m)(n.value.charAt(0)))}function e2(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("rp"===n.tagName||"rt"===n.tagName)}function e5(e,t,r){let n=eK(r,t);return!n||"element"===n.type&&("td"===n.tagName||"th"===n.tagName)}let e3=eY({body:function(e){let t=eK(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,eV.m)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,r){let n=eJ(r,t),i=eK(e,-1,!0);return!(r&&n&&"element"===n.type&&"colgroup"===n.tagName&&e0(n,r.children.indexOf(n),r))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let r of e.children)if("element"===r.type&&("base"===r.tagName||"title"===r.tagName)){if(t.has(r.tagName))return!1;t.add(r.tagName)}let r=e.children[0];return!r||"element"===r.type},html:function(e){let t=eK(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,r){let n=eJ(r,t),i=eK(e,-1);return!(r&&n&&"element"===n.type&&("thead"===n.tagName||"tbody"===n.tagName)&&e0(n,r.children.indexOf(n),r))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),e6={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("")]]},e4=["<","&"];function e9(e,t,r,n){return r&&"element"===r.type&&("script"===r.tagName||"style"===r.tagName)?e.value:eD(e.value,Object.assign({},n.settings.characterReferences,{subset:e4}))}let e8=(0,eS.A)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,r,n){return n.settings.bogusComments?"<?"+eD(e.value,Object.assign({},n.settings.characterReferences,{subset:eF}))+">":"\x3c!--"+e.value.replace(eB,function(e){return eD(e,Object.assign({},n.settings.characterReferences,{subset:eH}))})+"--\x3e"},doctype:function(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,r,n){let i,o=n.schema,s="svg"!==o.space&&n.settings.omitOptionalTags,a="svg"===o.space?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===o.space&&"svg"===e.tagName&&(n.schema=eC.JW);let c=function(e,t){let r,n=[],i=-1;if(t){for(r in t)if(null!==t[r]&&void 0!==t[r]){let i=function(e,t,r){let n,i=(0,eq.I)(e.schema,t),o=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,s=+!e.settings.allowDangerousCharacters,a=e.quote;if(i.overloadedBoolean&&(r===i.attribute||""===r)?r=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof r||r===i.attribute||""===r)&&(r=!!r),null==r||!1===r||"number"==typeof r&&Number.isNaN(r))return"";let l=eD(i.attribute,Object.assign({},e.settings.characterReferences,{subset:e6.name[o][s]}));return!0===r||(r=Array.isArray(r)?(i.commaSeparated?eG.A:eW.A)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(n=eD(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:e6.unquoted[o][s]}))),n!==r&&(e.settings.quoteSmart&&(0,eU.D)(r,a)>(0,eU.D)(r,e.alternative)&&(a=e.alternative),n=a+eD(r,Object.assign({},e.settings.characterReferences,{subset:("'"===a?e6.single:e6.double)[o][s],attribute:!0}))+a),l+(n?"="+n:n))}(e,r,t[r]);i&&n.push(i)}}for(;++i<n.length;){let t=e.settings.tightAttributes?n[i].charAt(n[i].length-1):void 0;i!==n.length-1&&'"'!==t&&"'"!==t&&(n[i]+=" ")}return n.join("")}(n,e.properties),u=n.all("html"===o.space&&"template"===e.tagName?e.content:e);return n.schema=o,u&&(a=!1),!c&&s&&e3(e,t,r)||(l.push("<",e.tagName,c?" "+c:""),a&&("svg"===o.space||n.settings.closeSelfClosing)&&(i=c.charAt(c.length-1),(!n.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(u),a||s&&e0(e,t,r)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,r,n){return n.settings.allowDangerousHtml?e.value:e9(e,t,r,n)},root:function(e,t,r,n){return n.all(e)},text:e9}}),e7={},te={},tt=[];function tr(e,t,r){return e8(e,t,r,this)}function tn(e){let t=[],r=e&&e.children||tt,n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}function ti(e,t){let r="string"==typeof e?{}:{...e.colorReplacements},n="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?r[e]=i:e===n&&Object.assign(r,i);return r}function to(e,t){return e&&t?.[e?.toLowerCase()]||e}async function ts(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function ta(e){return!e||["plaintext","txt","text","plain"].includes(e)}function tl(e){return"ansi"===e||ta(e)}function tc(e){return"none"===e}function tu(e,t){if(!t)return e;for(let r 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)))r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function td(e,t=!1){if(0===e.length)return[["",0]];let r=e.split(/(\r?\n)/g),n=0,i=[];for(let e=0;e<r.length;e+=2){let o=t?r[e]+(r[e+1]||""):r[e];i.push([o,n]),n+=r[e].length,n+=r[e+1]?.length||0}return i}let th="light-dark()",tp=["color","background-color"];function tf(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&w.Italic&&(t["font-style"]="italic"),e.fontStyle&w.Bold&&(t["font-weight"]="bold");let r=[];e.fontStyle&w.Underline&&r.push("underline"),e.fontStyle&w.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function tm(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let tg=new WeakMap;function ty(e,t){tg.set(e,t)}function tb(e){return tg.get(e)}class tv{_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 tv(Object.fromEntries((Array.isArray(t)?t:[t]).map(e=>[e,ex])),e)}constructor(...e){if(2===e.length){let[t,r]=e;this.lang=r,this._stacks=t}else{let[t,r,n]=e;this.lang=r,this._stacks={[n]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t=this._stacks[e];let r=[],n=new Set;return!function e(t){if(n.has(t))return;n.add(t);let i=t?.nameScopesList?.scopeName;i&&r.push(i),t.parent&&e(t.parent)}(t),r}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}let tk=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let r=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new c(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(void 0===t)throw new c(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new c(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}},n=function(e){let t=td(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(r){if(r===e.length)return{line:t.length-1,character:t[t.length-1].length};let n=r,i=0;for(let e of t){if(n<e.length)break;n-=e.length,i++}return{line:i,character:n}},posToIndex:function(e,r){let n=0;for(let r=0;r<e;r++)n+=t[r].length;return n+r}}}(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));(function(e){for(let t=0;t<e.length;t++){let r=e[t];if(r.start.offset>r.end.offset)throw new c(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){let t=e[n],i=r.start.offset<=t.start.offset&&t.start.offset<r.end.offset,o=r.start.offset<t.end.offset&&t.end.offset<=r.end.offset,s=t.start.offset<=r.start.offset&&r.start.offset<t.end.offset,a=t.start.offset<r.end.offset&&r.end.offset<=t.end.offset;if(i||o||s||a){if(i&&o||s&&a||s&&r.start.offset===r.end.offset||o&&t.start.offset===t.end.offset)continue;throw new c(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length){var r=e,n=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]);let i=Array.from(n instanceof Set?n:new Set(n)).sort((e,t)=>e-t);return i.length?r.map(e=>e.flatMap(e=>{let t=i.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let r=0,n=[];for(let i of t)i>r&&n.push({...e,content:e.content.slice(r,i),offset:e.offset+r}),r=i;return r<e.content.length&&n.push({...e,content:e.content.slice(r),offset:e.offset+r}),n})):r}},code(e){if(!this.options.decorations?.length)return;let r=t(this),n=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(n.length!==r.converter.lines.length)throw new c(`Number of lines in code element (${n.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(e,t,r,i){let s=n[e],a="",l=-1,u=-1;if(0===t&&(l=0),0===r&&(u=0),r===1/0&&(u=s.children.length),-1===l||-1===u)for(let e=0;e<s.children.length;e++)a+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(s.children[e]),-1===l&&a.length===t&&(l=e+1),-1===u&&a.length===r&&(u=e+1);if(-1===l)throw new c(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===u)throw new c(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let d=s.children.slice(l,u);if(i.alwaysWrap||d.length!==s.children.length)if(i.alwaysWrap||1!==d.length||"element"!==d[0].type){let e={type:"element",tagName:"span",properties:{},children:d};o(e,i,"wrapper"),s.children.splice(l,d.length,e)}else o(d[0],i,"token");else o(s,i,"line")}function o(e,t,r){let n=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...n,class:e.properties.class},t.properties?.class&&tu(e,t.properties.class),e=i(e,r)||e}let s=[];for(let e of r.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:r}=e;if(t.line===r.line)i(t.line,t.character,r.character,e);else if(t.line<r.line){i(t.line,t.character,1/0,e);for(let i=t.line+1;i<r.line;i++)s.unshift(()=>{var t;n[t=i]=o(n[t],e,"line")});i(r.line,0,r.character,e)}}s.forEach(e=>e())}}}()];function tx(e){let t=function(e){let t=[],r=[],n=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:t,post:r,normal:n}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...tk]}var tw=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],tC={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function tS(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)}}}var tE={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"};let t_={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 tA(e,t,r={}){let{theme:n=e.getLoadedThemes()[0]}=r,i=e.resolveLangAlias(r.lang||"text");if(ta(i)||tc(n))return td(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:o,colorMap:s}=e.setTheme(n);if("ansi"===i)return function(e,t,r){let n,i,o,s=ti(e,r),a=td(t),l=function(e=tE){let t;function r(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(n){switch(n.type){case"named":return e[n.name];case"rgb":return r(n.rgb);case"table":var i;return i=n.index,function(){if(t)return t;t=[];for(let r=0;r<tw.length;r++)t.push(e[tw[r]]);let n=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let i=0;i<6;i++)for(let o=0;o<6;o++)t.push(r([n[e],n[i],n[o]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(r([i,i,i]));return t}()[i]}}}}(Object.fromEntries(tw.map(t=>{let r=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[r]||t_[t]]}))),c=(n=null,i=null,o=new Set,{parse(e){let t=[],r=0;do{let s=function(e,t){let r=e.indexOf("\x1b",t);if(-1!==r&&"["===e[r+1]){let t=e.indexOf("m",r);if(-1!==t)return{sequence:e.substring(r+2,t).split(";"),startPosition:r,position:t+1}}return{position:e.length}}(e,r),a=s.sequence?e.substring(r,s.startPosition):e.substring(r);if(a.length>0&&t.push({value:a,foreground:n,background:i,decorations:new Set(o)}),s.sequence){let e=function(e){let t=[];for(;e.length>0;){let r=e.shift();if(!r)continue;let n=Number.parseInt(r);if(!Number.isNaN(n))if(0===n)t.push({type:"resetAll"});else if(n<=9)tC[n]&&t.push({type:"setDecoration",value:tC[n]});else if(n<=29){let e=tC[n-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)t.push({type:"setForegroundColor",value:{type:"named",name:tw[n-30]}});else if(38===n){let r=tS(e);r&&t.push({type:"setForegroundColor",value:r})}else if(39===n)t.push({type:"resetForegroundColor"});else if(n<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:tw[n-40]}});else if(48===n){let r=tS(e);r&&t.push({type:"setBackgroundColor",value:r})}else 49===n?t.push({type:"resetBackgroundColor"}):53===n?t.push({type:"setDecoration",value:"overline"}):55===n?t.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?t.push({type:"setForegroundColor",value:{type:"named",name:tw[n-90+8]}}):n>=100&&n<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:tw[n-100+8]}})}return t}(s.sequence);for(let t of e)"resetAll"===t.type?(n=null,i=null,o.clear()):"resetForegroundColor"===t.type?n=null:"resetBackgroundColor"===t.type?i=null:"resetDecoration"===t.type&&o.delete(t.value);for(let t of e)"setForegroundColor"===t.type?n=t.value:"setBackgroundColor"===t.type?i=t.value:"setDecoration"===t.type&&o.add(t.value)}r=s.position}while(r<e.length);return t}});return a.map(t=>c.parse(t[0]).map(r=>{let n,i;r.decorations.has("reverse")?(n=r.background?l.value(r.background):e.bg,i=r.foreground?l.value(r.foreground):e.fg):(n=r.foreground?l.value(r.foreground):e.fg,i=r.background?l.value(r.background):void 0),n=to(n,s),i=to(i,s),r.decorations.has("dim")&&(n=function(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],r=e[1],n=e[2],i=e[3],o=Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0");return`#${t}${t}${r}${r}${n}${n}${o}`}else if(3===e.length){let t=e[0],r=e[1],n=e[2];return`#${t}${t}${r}${r}${n}${n}80`}}let r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}(n));let o=w.None;return r.decorations.has("bold")&&(o|=w.Bold),r.decorations.has("italic")&&(o|=w.Italic),r.decorations.has("underline")&&(o|=w.Underline),r.decorations.has("strikethrough")&&(o|=w.Strikethrough),{content:r.value,offset:t[1],color:n,bgColor:i,fontStyle:o}}))}(o,t,r);let a=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==a.name)throw new c(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${a.name}"`);if(!r.grammarState.themes.includes(o.name))throw new c(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${o.name}"`)}var l=t,u=a,d=o,h=s,p=r;let f=tN(l,u,d,h,p),m=new tv(f.stateStack,u.name,d.name);return ty(f.tokens,m),f.tokens}function tN(e,t,r,n,i){let o=ti(r,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500}=i,l=td(e),u=i.grammarState?function(e,t){if(!(e instanceof tv))throw new c("Invalid grammar state");return e.getInternalStack(t)}(i.grammarState,r.name)??ex:null!=i.grammarContextCode?tN(i.grammarContextCode,t,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:ex,d=[],h=[];for(let e=0,c=l.length;e<c;e++){let c,p,[f,m]=l[e];if(""===f){d=[],h.push([]);continue}if(s>0&&f.length>=s){d=[],h.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}i.includeExplanation&&(c=t.tokenizeLine(f,u,a).tokens,p=0);let g=t.tokenizeLine2(f,u,a),y=g.tokens.length/2;for(let e=0;e<y;e++){let t=g.tokens[2*e],s=e+1<y?g.tokens[2*e+2]:f.length;if(t===s)continue;let a=g.tokens[2*e+1],l=to(n[A.getForeground(a)],o),u=A.getFontStyle(a),h={content:f.substring(t,s),offset:m+t,color:l,fontStyle:u};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of r.settings){let r;switch(typeof t.scope){case"string":r=t.scope.split(/,/).map(e=>e.trim());break;case"object":r=t.scope;break;default:continue}e.push({settings:t,selectors:r.map(e=>e.split(/ /))})}h.explanation=[];let n=0;for(;t+n<s;){let t=c[p],r=f.substring(t.startIndex,t.endIndex);n+=r.length,h.explanation.push({content:r,scopes:"scopeName"===i.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let r=[];for(let n=0,i=t.length;n<i;n++){let i=t[n];r[n]={scopeName:i,themeMatches:function(e,t,r){let n=[];for(let{selectors:i,settings:o}of e)for(let e of i)if(function(e,t,r){if(!tM(e[e.length-1],t))return!1;let n=e.length-2,i=r.length-1;for(;n>=0&&i>=0;)tM(e[n],r[i])&&(n-=1),i-=1;return -1===n}(e,t,r)){n.push(o);break}return n}(e,i,t.slice(0,n))}}return r}(e,t.scopes)}),p+=1}}d.push(h)}h.push(d),d=[],u=g.ruleStack}return{tokens:h,stateStack:u}}function tM(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function tT(e,t,r){let n=Object.entries(r.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=n.map(n=>{let i=tA(e,t,{...r,theme:n.theme}),o=tb(i);return{tokens:i,state:o,theme:"string"==typeof n.theme?n.theme:n.theme.name}}),o=function(...e){let t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){let i=e.map(e=>e[n]),o=t.map(()=>[]);t.forEach((e,t)=>e.push(o[t]));let s=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<r;t++){let r=a[t];r.content.length===e?(o[t].push(r),s[t]+=1,a[t]=i[t][s[t]]):(o[t].push({...r,content:r.content.slice(0,e)}),a[t]={...r,content:r.content.slice(e),offset:r.offset+e})}}}return t}(...i.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,i)=>{let s={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in r&&r.includeExplanation&&(s.explanation=e.explanation),o.forEach((e,r)=>{let{content:o,explanation:a,offset:l,...c}=e[t][i];s.variants[n[r].color]=c}),s})),a=i[0].state?new tv(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return a&&ty(s,a),s}function tL(e,t,r){let n,i,o,s,a,l;if("themes"in r){let{defaultColor:u="light",cssVariablePrefix:d="--shiki-",colorsRendering:h="css-vars"}=r,p=Object.entries(r.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===u?-1:+(t.color===u));if(0===p.length)throw new c("`themes` option must not be empty");let f=tT(e,t,r);if(l=tb(f),u&&th!==u&&!p.find(e=>e.color===u))throw new c(`\`themes\` option must contain the defaultColor key \`${u}\``);let m=p.map(t=>e.getTheme(t.theme)),g=p.map(e=>e.color);o=f.map(e=>e.map(e=>(function(e,t,r,n,i="css-vars"){let o={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(t=>tf(e.variants[t])),a=new Set(s.flatMap(e=>Object.keys(e))),l={},u=(e,n)=>{let i="color"===n?"":"background-color"===n?"-bg":`-${n}`;return r+t[e]+("color"===n?"":i)};return s.forEach((e,r)=>{for(let o of a){let a=e[o]||"inherit";if(0===r&&n&&tp.includes(o))if(n===th&&s.length>1){let e=t.findIndex(e=>"light"===e),n=t.findIndex(e=>"dark"===e);if(-1===e||-1===n)throw new c('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let d=s[e][o]||"inherit",h=s[n][o]||"inherit";l[o]=`light-dark(${d}, ${h})`,"css-vars"===i&&(l[u(r,o)]=a)}else l[o]=a;else"css-vars"===i&&(l[u(r,o)]=a)}}),o.htmlStyle=l,o})(e,g,d,u,h))),l&&ty(o,l);let y=p.map(e=>ti(e.theme,r));i=tI(p,m,y,d,u,"fg",h),n=tI(p,m,y,d,u,"bg",h),s=`shiki-themes ${m.map(e=>e.name).join(" ")}`,a=u?void 0:[i,n].join(";")}else if("theme"in r){let a=ti(r.theme,r);o=tA(e,t,r);let c=e.getTheme(r.theme);n=to(c.bg,a),i=to(c.fg,a),s=c.name,l=tb(o)}else throw new c("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:n,themeName:s,rootStyle:a,grammarState:l}}function tI(e,t,r,n,i,o,s){return e.map((a,l)=>{let u=to(t[l][o],r[l])||"inherit",d=`${n+a.color}${"bg"===o?"-bg":""}:${u}`;if(0===l&&i){if(i===th&&e.length>1){let n=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===n||-1===i)throw new c('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let s=to(t[n][o],r[n])||"inherit",a=to(t[i][o],r[i])||"inherit";return`light-dark(${s}, ${a});${d}`}return u}return"css-vars"===s?d:null}).filter(e=>!!e).join(";")}function tj(e,t,r,n={meta:{},options:r,codeToHast:(t,r)=>tj(e,t,r),codeToTokens:(t,r)=>tL(e,t,r)}){let i=t;for(let e of tx(r))i=e.preprocess?.call(n,i,r)||i;let{tokens:o,fg:s,bg:a,themeName:l,rootStyle:c,grammarState:u}=tL(e,i,r),{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=r;!0===d?o=o.map(e=>{let t,r=[],n="";return e.forEach((i,o)=>{let s=!(i.fontStyle&&(i.fontStyle&w.Underline||i.fontStyle&w.Strikethrough));s&&i.content.match(/^\s+$/)&&e[o+1]?(void 0===t&&(t=i.offset),n+=i.content):n?(s?r.push({...i,offset:t,content:n+i.content}):r.push({content:n,offset:t},i),t=void 0,n=""):r.push(i)}),r}):"never"===d&&(o=o.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,r,n,i]=t;if(!r&&!i)return e;let o=[{...e,offset:e.offset+r.length,content:n}];return r&&o.unshift({content:r,offset:e.offset}),i&&o.push({content:i,offset:e.offset+r.length+n.length}),o}))),h&&(o=o.map(e=>{let t=[];for(let r of e){if(0===t.length){t.push({...r});continue}let e=t[t.length-1],n=tm(e.htmlStyle||tf(e)),i=tm(r.htmlStyle||tf(r)),o=e.fontStyle&&(e.fontStyle&w.Underline||e.fontStyle&w.Strikethrough),s=r.fontStyle&&(r.fontStyle&w.Underline||r.fontStyle&w.Strikethrough);o||s||n!==i?t.push({...r}):e.content+=r.content}return t}));let p={...n,get source(){return i}};for(let e of tx(r))o=e.tokens?.call(p,o)||o;return function(e,t,r,n=tb(e)){let i=tx(t),o=[],s={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};for(let[e,r]of(!1!==t.rootStyle&&(null!=t.rootStyle?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(c.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(c[e]=r);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:o},h=[],p={...r,structure:a,addClassToHast:tu,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return u},get code(){return d},get lines(){return h}};if(e.forEach((e,t)=>{t&&("inline"===a?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&o.push({type:"text",value:"\n"}));let r={type:"element",tagName:"span",properties:{class:"line"},children:[]},n=0;for(let o of e){let e={type:"element",tagName:"span",properties:{...o.htmlAttrs},children:[{type:"text",value:o.content}]},l=tm(o.htmlStyle||tf(o));for(let s of(l&&(e.properties.style=l),i))e=s?.span?.call(p,e,t+1,n,r,o)||e;"inline"===a?s.children.push(e):"classic"===a&&r.children.push(e),n+=o.content.length}if("classic"===a){for(let e of i)r=e?.line?.call(p,r,t+1)||r;h.push(r),o.push(r)}else"inline"===a&&h.push(r)}),"classic"===a){for(let e of i)d=e?.code?.call(p,d)||d;for(let e of(u.children.push(d),i))u=e?.pre?.call(p,u)||u;s.children.push(u)}else if("inline"===a){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let r of s.children)"element"===r.type&&"br"===r.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===r.type||"text"===r.type)&&t.children.push(r);e.push(t);let r={type:"element",tagName:"code",properties:{},children:e};for(let e of i)r=e?.code?.call(p,r)||r;s.children=[];for(let e=0;e<r.children.length;e++){e>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=r.children[e];"element"===t.type&&s.children.push(...t.children)}}let f=s;for(let e of i)f=e?.root?.call(p,f)||f;return n&&ty(f,n),f}(o,{...r,fg:s,bg:a,themeName:l,rootStyle:!1!==r.rootStyle&&(r.rootStyle??c)},p,u)}let tR=function(e,t){let r=t||e7,n=r.quote||'"';if('"'!==n&&"'"!==n)throw Error("Invalid quote `"+n+"`, expected `'` or `\"`");return({one:tr,all:tn,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||ew.b,characterReferences:r.characterReferences||te,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:"svg"===r.space?eC.JW:eC.qy,quote:n,alternative:'"'===n?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)},tO={light:"#333333",dark:"#bbbbbb"},tP={light:"#fffffe",dark:"#1e1e1e"},t$="__shiki_resolved";function tz(e){if(e?.[t$])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:r,fg:n}=t;if(!r||!n){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(n=e.settings.foreground),e?.settings?.background&&(r=e.settings.background),!n&&t?.colors?.["editor.foreground"]&&(n=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),n||(n="light"===t.type?tO.light:tO.dark),r||(r="light"===t.type?tP.light:tP.dark),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,o=new Map;function s(e){if(o.has(e))return o.get(e);i+=1;let r=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${r}`]?s(e):(o.set(e,r),r)}for(let e of(t.settings=t.settings.map(e=>{let r=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),n=e.settings?.background&&!e.settings.background.startsWith("#");if(!r&&!n)return e;let i={...e,settings:{...e.settings}};if(r){let r=s(e.settings.foreground);t.colorReplacements[r]=e.settings.foreground,i.settings.foreground=r}if(n){let r=s(e.settings.background);t.colorReplacements[r]=e.settings.background,i.settings.background=r}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let r=s(t.colors[e]);t.colorReplacements[r]=t.colors[e],t.colors[e]=r}return Object.defineProperty(t,t$,{enumerable:!1,writable:!1,value:!0}),t}async function tD(e){return Array.from(new Set((await Promise.all(e.filter(e=>!tl(e)).map(async e=>await ts(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function tB(e){return(await Promise.all(e.map(async e=>tc(e)?null:tz(await ts(e))))).filter(e=>!!e)}class tF extends Error{constructor(e){super(e),this.name="ShikiError"}}function tH(e,t){if(!t)return e;if(t[e]){let r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new tF(`Circular alias \`${Array.from(r).join(" -> ")} -> ${e}\``);r.add(e)}}return e}class tU extends ek{constructor(e,t,r,n={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=n,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=tz(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=b.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=tH(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 r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let n=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(n.name=e.name,this._resolvedGrammars.set(e.name,n),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()),r=t.filter(([e,t])=>!t);if(r.length){let e=t.filter(([e,t])=>{if(!t)return!1;let n=t.embeddedLanguages||t.embeddedLangs;return n?.some(e=>r.map(([e])=>e).includes(e))}).filter(e=>!r.includes(e));throw new tF(`Missing languages ${r.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,r]of t)this._resolver.addLanguage(r);for(let[e,r]of t)this.loadLanguage(r)}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 tG{_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("."),r=[];for(let e=1;e<=t.length;e++){let n=t.slice(0,e).join(".");r=[...r,...this._injections.get(n)||[]]}return r}}let tq=0;async function tW(e){e.engine||function(e,t=3){if(!(t>3))if(1)console.trace(`[SHIKI DEPRECATE]: ${e}`);else throw Error(`[SHIKI DEPRECATE]: ${e}`)}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,r,n]=await Promise.all([tB(e.themes||[]),tD(e.langs||[]),e.engine]);return function(e){let t;tq+=1,!1!==e.warnings&&tq>=10&&tq%10==0&&console.warn(`[Shiki] ${tq} 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 r=!1;if(!e.engine)throw new tF("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(tz),o=new tU(new tG(e.engine,n),i,n,e.langAlias);function s(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();let t=o.getTheme(e);if(!t)throw new tF(`Theme \`${e}\` not found, you may need to load it first`);return t}function a(...e){c(),o.loadLanguages(e.flat(1))}function l(...e){for(let t of(c(),e.flat(1)))o.loadTheme(t)}function c(){if(r)throw new tF("Shiki instance has been disposed")}function u(){r||(r=!0,o.dispose(),tq-=1)}return{setTheme:function(e){c();let r=s(e);return t!==e&&(o.setTheme(r),t=e),{theme:r,colorMap:o.getColorMap()}},getTheme:s,getLanguage:function(e){c();let t=o.getGrammar("string"==typeof e?e:e.name);if(!t)throw new tF(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return c(),o.getLoadedThemes()},getLoadedLanguages:function(){return c(),o.getLoadedLanguages()},resolveLangAlias:function(t){return tH(t,e.langAlias)},loadLanguage:async function(...e){return a(await tD(e))},loadLanguageSync:a,loadTheme:async function(...e){return c(),l(await tB(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}({...e,themes:t,langs:r,engine:n})}async function tV(e){let t=await tW(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return tb(e[1]);let[t,r,n={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=n;if(ta(i)||tc(o))throw new c("Plain language does not have grammar state");if("ansi"===i)throw new c("ANSI language does not have grammar state");let{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new tv(tN(r,l,s,a,n).stateStack,l.name,s.name)})(t,...e),codeToTokensBase:(e,r)=>tA(t,e,r),codeToTokensWithThemes:(e,r)=>tT(t,e,r),codeToTokens:(e,r)=>tL(t,e,r),codeToHast:(e,r)=>tj(t,e,r),codeToHtml:(e,r)=>(function(e,t,r){let n={meta:{},options:r,codeToHast:(t,r)=>tj(e,t,r),codeToTokens:(t,r)=>tL(e,t,r)},i=tR(tj(e,t,r,n));for(let e of tx(r))i=e.postprocess?.call(n,i,r)||i;return i})(t,e,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}let tK=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>r.e(6481).then(r.bind(r,16481))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>r.e(1038).then(r.bind(r,1038))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>r.e(8850).then(r.bind(r,86469))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>r.e(4869).then(r.bind(r,44869))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>r.e(3104).then(r.bind(r,93104))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>r.e(556).then(r.bind(r,10556))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>r.e(9066).then(r.bind(r,79066))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>r.e(5973).then(r.bind(r,75973))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>r.e(9782).then(r.bind(r,29782))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>r.e(1832).then(r.bind(r,61832))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>r.e(4419).then(r.bind(r,54419))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>r.e(4482).then(r.bind(r,54482))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>r.e(8817).then(r.bind(r,88817))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>r.e(137).then(r.bind(r,80137))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>r.e(1275).then(r.bind(r,51275))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>r.e(8235).then(r.bind(r,28235))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>r.e(4470).then(r.bind(r,44470))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>r.e(6235).then(r.bind(r,66235))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>r.e(4715).then(r.bind(r,24715))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>r.e(4811).then(r.bind(r,64811))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>r.e(5163).then(r.bind(r,15163))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>r.e(2957).then(r.bind(r,42957))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>r.e(67).then(r.bind(r,10067))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>r.e(2890).then(r.bind(r,32890))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>r.e(1933).then(r.bind(r,21933))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>r.e(6160).then(r.bind(r,13779))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>r.e(8218).then(r.bind(r,28218))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>r.e(9084).then(r.bind(r,19084))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:()=>r.e(5079).then(r.bind(r,65079))},{id:"houston",displayName:"Houston",type:"dark",import:()=>r.e(1291).then(r.bind(r,61291))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>r.e(5908).then(r.bind(r,35908))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>r.e(8140).then(r.bind(r,28140))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>r.e(2394).then(r.bind(r,82394))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>r.e(7379).then(r.bind(r,67379))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>r.e(1344).then(r.bind(r,91344))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>r.e(6126).then(r.bind(r,96126))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>r.e(6924).then(r.bind(r,96924))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>r.e(6556).then(r.bind(r,76556))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>r.e(3759).then(r.bind(r,23759))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>r.e(9059).then(r.bind(r,89059))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>r.e(6056).then(r.bind(r,56056))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>r.e(2234).then(r.bind(r,32234))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>r.e(7859).then(r.bind(r,67859))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>r.e(7326).then(r.bind(r,67326))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>r.e(3917).then(r.bind(r,83917))},{id:"nord",displayName:"Nord",type:"dark",import:()=>r.e(4977).then(r.bind(r,77358))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>r.e(658).then(r.bind(r,40658))},{id:"one-light",displayName:"One Light",type:"light",import:()=>r.e(8630).then(r.bind(r,8630))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>r.e(1473).then(r.bind(r,91473))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>r.e(3375).then(r.bind(r,35756))},{id:"red",displayName:"Red",type:"dark",import:()=>r.e(9728).then(r.bind(r,49728))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>r.e(6849).then(r.bind(r,16849))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>r.e(1330).then(r.bind(r,81330))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>r.e(3895).then(r.bind(r,93895))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>r.e(2908).then(r.bind(r,22908))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>r.e(7465).then(r.bind(r,67465))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>r.e(23).then(r.bind(r,60023))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>r.e(9559).then(r.bind(r,9559))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>r.e(8959).then(r.bind(r,98959))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>r.e(4543).then(r.bind(r,74543))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>r.e(6654).then(r.bind(r,26654))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>r.e(3878).then(r.bind(r,93878))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>r.e(674).then(r.bind(r,60674))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>r.e(8831).then(r.bind(r,88831))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>r.e(8743).then(r.bind(r,8743))}].map(e=>[e.id,e.import]));var tJ=r(6389).Buffer;class tZ extends Error{constructor(e){super(e),this.name="ShikiError"}}function tX(){return"undefined"!=typeof performance?performance.now():Date.now()}let tQ=(e,t)=>e+(t-e%t)%t;async function tY(e){let t,r,n={};function i(e){r=e,n.HEAPU8=new Uint8Array(e),n.HEAPU32=new Uint32Array(e)}let o="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function s(e,t){return e?function(e,t,r=1024){let n=t+r,i=t;for(;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&o)return o.decode(e.subarray(t,i));let s="";for(;t<i;){let r=e[t++];if(!(128&r)){s+=String.fromCharCode(r);continue}let n=63&e[t++];if((224&r)==192){s+=String.fromCharCode((31&r)<<6|n);continue}let i=63&e[t++];if((r=(240&r)==224?(15&r)<<12|n<<6|i:(7&r)<<18|n<<12|i<<6|63&e[t++])<65536)s+=String.fromCharCode(r);else{let e=r-65536;s+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return s}(n.HEAPU8,e,t):""}let a={emscripten_get_now:tX,emscripten_memcpy_big:function(e,t,r){n.HEAPU8.copyWithin(e,t,t+r)},emscripten_resize_heap:function(e){let o=n.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let n=1;n<=4;n*=2){let s=o*(1+.2/n);if(s=Math.min(s,e+0x6000000),function(e){try{return t.grow(e-r.byteLength+65535>>>16),i(t.buffer),1}catch{}}(Math.min(0x80000000,tQ(Math.max(e,s),65536))))return!0}return!1},fd_write:()=>0};async function l(){let r=await e({env:a,wasi_snapshot_preview1:a});i((t=r.memory).buffer),Object.assign(n,r),n.UTF8ToString=s}return await l(),n}var t0=Object.defineProperty,t1=(e,t,r)=>((e,t,r)=>t in e?t0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);let t2=null;class t5{constructor(e){t1(this,"utf16Length"),t1(this,"utf8Length"),t1(this,"utf16Value"),t1(this,"utf8Value"),t1(this,"utf16OffsetToUtf8"),t1(this,"utf8OffsetToUtf16");let t=e.length,r=t5._utf8ByteLength(e),n=r!==t,i=n?new Uint32Array(t+1):null;n&&(i[t]=r);let o=n?new Uint32Array(r+1):null;n&&(o[r]=t);let s=new Uint8Array(r),a=0;for(let r=0;r<t;r++){let l=e.charCodeAt(r),c=l,u=!1;if(l>=55296&&l<=56319&&r+1<t){let t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(c=(l-55296<<10)+65536|t-56320,u=!0)}n&&(i[r]=a,u&&(i[r+1]=a),c<=127?o[a+0]=r:c<=2047?(o[a+0]=r,o[a+1]=r):c<=65535?(o[a+0]=r,o[a+1]=r,o[a+2]=r):(o[a+0]=r,o[a+1]=r,o[a+2]=r,o[a+3]=r)),c<=127?s[a++]=c:(c<=2047?s[a++]=192|(1984&c)>>>6:(c<=65535?s[a++]=224|(61440&c)>>>12:(s[a++]=240|(1835008&c)>>>18,s[a++]=128|(258048&c)>>>12),s[a++]=128|(4032&c)>>>6),s[a++]=128|(63&c)>>>0),u&&r++}this.utf16Length=t,this.utf8Length=r,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let r=0,n=e.length;r<n;r++){let i=e.charCodeAt(r),o=i,s=!1;if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(o=(i-55296<<10)+65536|t-56320,s=!0)}o<=127?t+=1:o<=2047?t+=2:o<=65535?t+=3:t+=4,s&&r++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let t3=class e{constructor(t){if(t1(this,"id",++e.LAST_ID),t1(this,"_onigBinding"),t1(this,"content"),t1(this,"utf16Length"),t1(this,"utf8Length"),t1(this,"utf16OffsetToUtf8"),t1(this,"utf8OffsetToUtf16"),t1(this,"ptr"),!t2)throw new tZ("Must invoke loadWasm first.");this._onigBinding=t2,this.content=t;let r=new t5(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=t2.omalloc(1e4)),e._sharedPtrInUse=!0,t2.HEAPU8.set(r.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=r.createString(t2)}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)}};t1(t3,"LAST_ID",0),t1(t3,"_sharedPtr",0),t1(t3,"_sharedPtrInUse",!1);class t6{constructor(e){if(t1(this,"_onigBinding"),t1(this,"_ptr"),!t2)throw new tZ("Must invoke loadWasm first.");let t=[],r=[];for(let n=0,i=e.length;n<i;n++){let i=new t5(e[n]);t[n]=i.createString(t2),r[n]=i.utf8Length}let n=t2.omalloc(4*e.length);t2.HEAPU32.set(t,n/4);let i=t2.omalloc(4*e.length);t2.HEAPU32.set(r,i/4);let o=t2.createOnigScanner(n,i,e.length);for(let r=0,n=e.length;r<n;r++)t2.ofree(t[r]);t2.ofree(i),t2.ofree(n),0===o&&function(e){throw new tZ(e.UTF8ToString(e.getLastOnigError()))}(t2),this._onigBinding=t2,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,r){let n=0;if("number"==typeof r&&(n=r),"string"==typeof e){e=new t3(e);let r=this._findNextMatchSync(e,t,!1,n);return e.dispose(),r}return this._findNextMatchSync(e,t,!1,n)}_findNextMatchSync(e,t,r,n){let i=this._onigBinding,o=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),n);if(0===o)return null;let s=i.HEAPU32,a=o/4,l=s[a++],c=s[a++],u=[];for(let t=0;t<c;t++){let r=e.convertUtf8OffsetToUtf16(s[a++]),n=e.convertUtf8OffsetToUtf16(s[a++]);u[t]={start:r,end:n,length:n-r}}return{index:l,captureIndices:u}}}function t4(e){return t=>WebAssembly.instantiate(e,t)}async function t9(e){return e&&await (i||(i=async function(){t2=await tY(async t=>{let r=e;if("function"==typeof(r=await r)&&(r=await r(t)),"function"==typeof r&&(r=await r(t)),"function"==typeof r.instantiator)r=await r.instantiator(t);else if("function"==typeof r.default)r=await r.default(t);else{var n,i,o,s;if(void 0!==r.data&&(r=r.data),n=r,"undefined"!=typeof Response&&n instanceof Response){r="function"==typeof WebAssembly.instantiateStreaming?await (o=r,e=>WebAssembly.instantiateStreaming(o,e))(t):await (s=r,async e=>{let t=await s.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(i=r,"undefined"!=typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||void 0!==tJ&&tJ.isBuffer?.(i)||"undefined"!=typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&i instanceof Uint32Array||r instanceof WebAssembly.Module)?r=await t4(r)(t):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await t4(r.default)(t))}return"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}())),{createScanner:e=>new t6(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new t3(e)}}let t8=function(e){let t=e.langs,r=e.themes,n=e.engine;return async function(e){function i(r){if("string"==typeof r){if(tl(r=e.langAlias?.[r]||r))return[];let n=t[r];if(!n)throw new c(`Language \`${r}\` is not included in this bundle. You may want to load it from external source.`);return n}return r}function o(e){if(tc(e))return"none";if("string"==typeof e){let t=r[e];if(!t)throw new c(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let s=(e.themes??[]).map(e=>o(e)),a=(e.langs??[]).map(e=>i(e)),l=await tV({engine:e.engine??n(),...e,themes:s,langs:a});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(i)),loadTheme:(...e)=>l.loadTheme(...e.map(o)),getBundledLanguages:()=>t,getBundledThemes:()=>r}}}({langs:l,themes:tK,engine:()=>t9(Promise.all([r.e(4352),r.e(9677)]).then(r.bind(r,99677)))});function t7(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let re=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),rt=String.raw;function rr(e,t){if(null==e)throw Error(t??"Value expected");return e}let rn=rt`\[\^?`,ri=`c.? | C(?:-.?)?|${rt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${rt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${rt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${rt`o\{[^\}]*\}?`}|${rt`\d{1,3}`}`,ro=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,rs=RegExp(rt`
|
|
2
2
|
\\ (?:
|
|
3
3
|
${ri}
|
|
4
4
|
| [gk]<[^>]*>?
|
|
@@ -135,7 +135,7 @@ Uppercase Upper
|
|
|
135
135
|
Variation_Selector VS
|
|
136
136
|
White_Space space
|
|
137
137
|
XID_Continue XIDC
|
|
138
|
-
XID_Start XIDS`.split(/\s/).map(e=>[rD(e),e])),nd=new Map([["s",r7(383)],[r7(383),"s"]]),nh=new Map([[r7(223),r7(7838)],[r7(107),r7(8490)],[r7(229),r7(8491)],[r7(969),r7(8486)]]),np=new Map([nm(453),nm(456),nm(459),nm(498),...ng(8072,8079),...ng(8088,8095),...ng(8104,8111),nm(8124),nm(8140),nm(8188)]),nf=new Map([["alnum",ne`[\p{Alpha}\p{Nd}]`],["alpha",ne`\p{Alpha}`],["ascii",ne`\p{ASCII}`],["blank",ne`[\p{Zs}\t]`],["cntrl",ne`\p{Cc}`],["digit",ne`\p{Nd}`],["graph",ne`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ne`\p{Lower}`],["print",ne`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ne`[\p{P}\p{S}]`],["space",ne`\p{space}`],["upper",ne`\p{Upper}`],["word",ne`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ne`\p{AHex}`]]);function nm(e){let t=r7(e);return[t.toLowerCase(),t]}function ng(e,t){return(function(e,t){let r=[];for(let n=e;n<=t;n++)r.push(n);return r})(e,t).map(e=>nm(e))}var ny=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),nb={AbsenceFunction({node:e,parent:t,replaceWith:r}){let{body:n,kind:i}=e;if("repeater"===i){let e=rT();e.body[0].body.push(rL({negate:!0,body:n}),rR("Any"));let i=rT();i.body[0].body.push(rI("greedy",0,1/0,e)),r(nT(i,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:n}){let i=e.body.filter(e=>"flags"===e.kind);for(let e=r+1;e<t.body.length;e++)nn(n,t.body[e],[]).push(...i)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let r=nS(t.get(e));if(r){let t=rT({flags:r});t.body[0].body=e.body,e.body=[nT(t,e)]}}}},Assertion({node:e,parent:t,key:r,container:n,root:i,remove:o,replaceWith:s},a){let{kind:l,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:h,wordIsAscii:p}=a;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if("line_end"===l)s(nT(rL({body:[rC({body:[rS("string_end")]}),rC({body:[rA(10)]})]}),t));else if("line_start"===l)s(nT(nA(ne`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(h.has(e))i.flags.sticky=!0,o();else{let e=n[r-1];if(e&&function(e){let t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||"Quantifier"===e.type&&e.min&&t.includes(e.body.type)}(e))s(nT(rL({negate:!0}),t));else if(d)throw Error(ne`Uses "\G" in a way that requires a subclass`);else s(nM(rS("string_start"),t)),a.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)s(nT(nA(ne`(?=\n?\z)`),t));else if("word_boundary"===l){if(!p&&!u){let e=`(?:(?<=${nl})(?!${nl})|(?<!${nl})(?=${nl}))`,r=`(?:(?<=${nl})(?=${nl})|(?<!${nl})(?!${nl}))`;s(nT(nA(c?r:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||n_(r)||(e.ref=r=nC(r,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:n}=e;n&&!n_(n)&&(e.name=n=nC(n,t)),r.set(e.number,e),n&&r.set(n,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){"intersection"===t.kind&&r(nT(rN({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:n,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:s,wordIsAscii:a}){let{kind:l,negate:c,value:u}=e;if(o&&("digit"===l||"digit"===u))return void r(nM(rM("digit",{negate:c}),t));if(s&&("space"===l||"space"===u))return void r(nT(nN(nA("[ -\r ]"),c),t));if(a&&("word"===l||"word"===u))return void r(nM(rM("word",{negate:c}),t));if("any"===l)r(nM(rR("Any"),t));else if("digit"===l)r(nM(rR("Nd",{negate:c}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===n)throw Error(ne`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",o=ne`\p{RI}{2}|${e}(?:\u200D${e})*`;r(nT(nA(ne`(?>\r\n|${i?ne`\p{RGI_Emoji}`:o}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)r(nM(rR("AHex",{negate:c}),t));else if("newline"===l)r(nT(nA(c?"[^\n]":"(?>\r\n?|[\n\v\f\x85\u2028\u2029])"),t));else if("posix"===l)if(i||"graph"!==u&&"print"!==u)r(nT(nN(nA(nf.get(u)),c),t));else{if("strict"===n)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[u];c&&(e=`\0-${r7(e.codePointAt(0)-1)}${r7(e.codePointAt(2)+1)}-\u{10FFFF}`),r(nT(nA(`[${e}]`),t))}else if("property"===l)nu.has(rD(u))||(e.key="sc");else if("space"===l)r(nM(rR("space",{negate:c}),t));else if("word"===l)r(nT(nN(nA(nl),c),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:r,remove:n,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:s}){let{kind:a,flags:l}=e;if("flags"===a)if(l.enable||l.disable){let e=rT({flags:l});e.body[0].body=s(),i(nT(e,t),{traverse:!0})}else n();else if("keep"===a){let e=r.body[0],n=1===r.body.length&&rk(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:r;if(t.parent!==n||n.body.length>1)throw Error(ne`Uses "\K" in a way that's unsupported`);let s=rL({behind:!0});s.body[0].body=o(),i(nT(s,t))}else throw Error(`Unexpected directive kind "${a}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:r}=e;"lookbehind"===r&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){let{kind:n}=e;if("fail"===n)r(nT(rL({negate:!0}),t));else throw Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=rT();t.body[0].body.push(e.body),e.body=nT(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let r=[],n=!1,i=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let r=t.find(e=>"search_start"===e.kind||function(e,t){let r={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===r.negate||e.negate===r.negate)&&1===e.body.length&&rk(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!r)return null;if("search_start"===r.kind)return r;if("LookaroundAssertion"===r.type)return r.body[0].body[0];if("CapturingGroup"===r.type||"Group"===r.type){let t=[];for(let n of r.body){let r=e(n.body);if(!r)return null;Array.isArray(r)?t.push(...r):t.push(r)}return t}return null}(t.body);e?(n=!0,Array.isArray(e)?r.push(...e):r.push(e)):i=!0}n&&!i&&r.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:r,strategy:n}){if("strict"===t&&r&&n)throw Error(ne`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||n_(r)||(e.ref=r=nC(r,t))}},nv={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){let{orphan:n,ref:i}=e;n||r.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:n},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:s,openRefs:a,reffedNodesByReferencer:l}){let c=i.get(e);if(c&&a.has(e.number)){let n=nM(nw(e.number),t);l.set(n,a.get(e.number)),r(n);return}a.set(e.number,e),s.set(e.number,[]),e.name&&nn(s,e.name,[]);let u=s.get(e.name??e.number);for(let t=0;t<u.length;t++){let r=u[t];if(c===r.node||c&&c===r.origin||e===r.origin){u.splice(t,1);break}}if(s.get(e.number).push({node:e,origin:c}),e.name&&s.get(e.name).push({node:e,origin:c}),e.name){let t=nn(o,e.name,new Map),r=!1;if(c)r=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){r=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:r})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=nr(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},n){let{isRecursive:i,ref:o}=e;if(i){let r=t;for(;(r=r.parent)&&("CapturingGroup"!==r.type||r.name!==o&&r.number!==o););n.reffedNodesByReferencer.set(e,r);return}let s=n.subroutineRefMap.get(o),a=0===o,l=a?nw(0):function e(t,r,n,i){let o=Array.isArray(t)?[]:{};for(let[s,a]of Object.entries(t))"parent"===s?o.parent=Array.isArray(n)?i:n:a&&"object"==typeof a?o[s]=e(a,r,o,n):("type"===s&&"CapturingGroup"===a&&r.set(o,r.get(t)??t),o[s]=a);return o}(s,n.groupOriginByCopy,null),c=l;if(!a){var u,d;let e=nS(function(e,t){let r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}(s,e=>"Group"===e.type&&!!e.flags)),t=e?nr(n.globalFlags,e):n.globalFlags;u=t,d=n.currentFlags,(u.dotAll!==d.dotAll||u.ignoreCase!==d.ignoreCase)&&(c=rT({flags:function({dotAll:e,ignoreCase:t}){let r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),e&&t||(r.disable={},e||(r.disable.dotAll=!0),t||(r.disable.ignoreCase=!0)),r}(t)})).body[0].body.push(l)}r(nT(c,t),{traverse:!a})}},nk={Backreference({node:e,parent:t,replaceWith:r},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}let i=n.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let r=t;do{if("Regex"===r.type)return!1;if("Alternative"===r.type)continue;if(r===e)return!1;for(let t of nE(r.parent)){if(t===r)break;if(t===e||function e(t,r){for(let n of nE(t)??[])if(n===r||e(n,r))return!0;return!1}(t,e))return!0}}while(r=r.parent);throw Error("Unexpected path")})(t,e));i.length?i.length>1?r(nT(rT({atomic:!0,body:i.reverse().map(e=>rC({body:[rE(e.number)]}))}),t)):e.ref=i[0].number:r(nT(rL({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<r;t++){let t=r_();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function nx(e){rH(e,{"*"({node:e,parent:t}){e.parent=t}})}function nw(e){let t=rj(e);return t.isRecursive=!0,t}function nC(e,t){if(t.has(e))return t.get(e);let r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function nS(e){let t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete r.disable[t],r.enable[t]=!0),e.disable?.[t]&&(r.disable[t]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable)?r:null}function nE(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function n_(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function nA(e,t){let r=rw(e,{...t,unicodePropertyMap:nu}).body;return r.length>1||r[0].body.length>1?rT({body:r}):r[0].body[0]}function nN(e,t){return e.negate=t,e}function nM(e,t){return e.parent=t,e}function nT(e,t){return nx(e),e.parent=t,e}var nL={"*":{enter({node:e},t){if(nF(e)){let r=t.getCurrentModI();t.pushModI(e.flags?nr({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){nF(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){nz(r7(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),nD(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&ny.has(e.value)&&t.setHasCasedChar()}},nI={Alternative:({body:e},t,r)=>e.map(r).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?ne`\B`:ne`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){let{body:n,name:i,number:o}=e,s={ignoreCase:t.currentFlags.ignoreCase},a=t.originMap.get(e);return a&&(s.hidden=!0,o>a.number&&(s.transferTo=a.number)),t.captureMap.set(o,s),`(${i?`?<${i}>`:""}${n.map(r).join("|")})`},Character({value:e},t){let r=r7(e),n=nB(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(n!==r)return n;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&nz(r)){let e=nc(r);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return r},CharacterClass(e,t,r){let{kind:n,negate:i,parent:o}=e,{body:s}=e;if("intersection"===n&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");nt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&s.some(nH)&&(s=[rA(45),...s.filter(e=>!nH(e))]);let a=()=>`[${i?"^":""}${s.map(r).join("intersection"===n?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||nt.bugNestedClassIgnoresNegation)&&!i){let t=s.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let n=rT(),i=n.body[0];return n.parent=o,i.parent=n,e.body=s=s.filter(e=>!t.includes(e)),s.length?(e.parent=i,i.body.push(e)):n.body.pop(),t.forEach(e=>{let t=rC({body:[e]});e.parent=t,t.parent=n,n.body.push(t)}),r(n)}}t.inCharClass=!0;let n=a();return t.inCharClass=!1,n}let l=s[0];if("union"===n&&!i&&l&&((!t.useFlagV||!t.verbose)&&"union"===o.kind&&!(nt.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===o.kind&&1===s.length&&"CharacterClassRange"!==l.type))return s.map(r).join("");if(!t.useFlagV&&"CharacterClass"===o.type)throw Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(e,t){let r=e.min.value,n=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=nB(r,i),s=nB(n,i),a=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),r=[],n=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?n??=t[e]:null===n?r.push(t[e]):(r.push([n,t[e]]),n=null);return r})(nD(e)).forEach(e=>{a.add(Array.isArray(e)?`${nB(e[0],i)}-${nB(e[1],i)}`:nB(e,i))}),`${o}-${s}${[...a].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:n},i){if("dot"===e)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":ne`[^\n]`;if("digit"===e)return t?ne`\D`:ne`\d`;if("property"===e){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ny.has(r))throw Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?ne`\P`:ne`\p`}{${n?`${n}=`:""}${r}}`}if("word"===e)return t?ne`\W`:ne`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:r,parent:n},i,o){let s=i.currentFlags;r&&(i.currentFlags=nr(s,r));let a=t.map(o).join("|"),l=i.verbose||1!==t.length||"Quantifier"===n.type||e||i.useFlagMods&&r?`(?${function(e,t,r){if(e)return">";let n="";if(t&&r){let{enable:e,disable:r}=t;n=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(r?"-":"")+(r?.ignoreCase?"i":"")+(r?.dotAll?"s":"")}return`${n}:`}(e,r,i.useFlagMods)}${a})`:a;return i.currentFlags=s,l},LookaroundAssertion({body:e,kind:t,negate:r},n,i){let o=`${"lookahead"===t?"":"<"}${r?"!":"="}`;return`(?${o}${e.map(i).join("|")})`},Quantifier:(e,t,r)=>r(e.body)+function({kind:e,max:t,min:r}){return(r||1!==t?r||t!==1/0?1===r&&t===1/0?"+":r===t?`{${r}}`:`{${r},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},r){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let n=r.recursionLimit;return 0===t?`(?R=${n})`:ne`\g<${t}&R=${n}>`}},nj=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),nR=new Set(["-","\\","]","^","["]),nO=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),nP=new Map([[9,ne`\t`],[10,ne`\n`],[11,ne`\v`],[12,ne`\f`],[13,ne`\r`],[8232,ne`\u2028`],[8233,ne`\u2029`],[65279,ne`\uFEFF`]]),n$=/^\p{Cased}$/u;function nz(e){return n$.test(e)}function nD(e,t){let r=!!t?.firstOnly,n=e.min.value,i=e.max.value,o=[];if(n<65&&(65535===i||i>=131071)||65536===n&&i>=131071)return o;for(let e=n;e<=i;e++){let t=r7(e);if(!nz(t))continue;let s=nc(t).filter(e=>{let t=e.codePointAt(0);return t<n||t>i});if(s.length&&(o.push(...s),r))break}return o}function nB(e,{escDigit:t,inCharClass:r,useFlagV:n}){var i;if(nP.has(e))return nP.get(e);if(e<32||e>126&&e<160||e>262143||t&&(i=e)>47&&i<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let o=r7(e);return((r?n?nO:nR:nj).has(o)?"\\":"")+o}function nF({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function nH({type:e,value:t}){return"Character"===e&&45===t}var nU=class e extends RegExp{#e=new Map;#t=null;#r;#n=null;#i=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,r,n){let i=!!n?.lazyCompile;if(t instanceof RegExp){if(n)throw Error("Cannot provide options when copying a regexp");super(t,r),this.#r=t.source,t instanceof e&&(this.#e=t.#e,this.#n=t.#n,this.#i=t.#i,this.rawOptions=t.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...n};super(i?"":t,r),this.#r=t,this.#e=function(e,t){let r=new Map;for(let t of e)r.set(t,{hidden:!0});for(let[e,n]of t)for(let t of n)nn(r,t,{}).transferTo=e;return r}(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=n??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...r}=this.rawOptions;this.#t=new e(this.#r,this.flags,r)}let r=this.global||this.sticky,n=this.lastIndex;if("clip_search"===this.#i&&r&&n){this.lastIndex=0;let e=this.#o(t.slice(n));return e&&(function(e,t,r,n){if(e.index+=t,e.input=r,n){let r=e.indices;for(let e=0;e<r.length;e++){let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])}let n=r.groups;n&&Object.keys(n).forEach(e=>{let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])})}}(e,n,t,this.hasIndices),this.lastIndex+=n),e}return this.#o(t)}#o(e){let t;this.#t.lastIndex=this.lastIndex;let r=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!r||!this.#e.size)return r;let n=[...r];r.length=1,this.hasIndices&&(t=[...r.indices],r.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:o,transferTo:s}=this.#e.get(e)??{};if(o?i.push(null):(i.push(r.length),r.push(n[e]),this.hasIndices&&r.indices.push(t[e])),s&&void 0!==n[e]){let o=i[s];if(!o)throw Error(`Invalid capture transfer to "${o}"`);if(r[o]=n[e],this.hasIndices&&(r.indices[o]=t[e]),r.groups){this.#n||(this.#n=function(e){let t,r=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,i=0,o=0;for(;t=r.exec(e);){let{0:e,groups:{capture:r,name:s}}=t;"["===e?i++:i?"]"===e&&i--:r&&(o++,s&&n.set(o,s))}return n}(this.source));let i=this.#n.get(s);i&&(r.groups[i]=n[e],this.hasIndices&&(r.indices.groups[i]=t[e]))}}}return r}};class nG{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:r=!1,cache:n,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=n?.get(e);if(t){if(t instanceof RegExp)return t;if(r)return null;throw t}try{let t=i(e);return n?.set(e,t),t}catch(t){if(n?.set(e,t),r)return null;throw t}})}regexps;findNextMatchSync(e,t,r){let n="string"==typeof e?e:e.content,i=[];function o(e,t,r=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+r,end:e[1]+r,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let r=this.regexps[e];if(r)try{r.lastIndex=t;let s=r.exec(n);if(!s)continue;if(s.index===t)return o(e,s,0);i.push([e,s,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,r,n]of i)if(r.index===e)return o(t,r,n)}return null}}var nq=function(e={}){let t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=e=>(function(e,t){let r=function(e,t){let r=ns(t),n=function(e,t){let r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};nx(e);let n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:ni[r.bestEffortTarget]>=ni.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};rH(e,nb,n);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};return rH(e,nv,o),rH(e,nk,{groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer}),e._originMap=o.groupOriginByCopy,e._strategy=n.strategy,e}(rw(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:nu}),{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),i=function(e,t){let r=ns(t),n=ni[r.target]>=ni.ES2024,i=ni[r.target]>=ni.ES2025,o=r.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw Error("Invalid recursionLimit; use 2-20");let s=null,a=null;if(!i){let t=[e.flags.ignoreCase];rH(e,nL,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?s=!0:a=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||s)&&!a)},c=e,u={accuracy:r.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&s&&a),useFlagMods:i,useFlagV:n,verbose:r.verbose};function d(e){return u.lastNode=c,c=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(nI[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let h={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return n||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&h._hiddenCaptures.push(t),e.transferTo&&nn(h._captureTransfers,e.transferTo,[]).push(t)}),h}(n,r),o=function(e,t){let r,{hiddenCaptures:n,mode:i}={hiddenCaptures:[],mode:"plugin",...t},o=t?.captureTransfers??new Map;if(!RegExp(r0,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if("plugin"===i&&rK(e,rQ`\(\?\(DEFINE\)`,rW.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let s=[],a=rK(e,rQ`\\[1-9]`,rW.DEFAULT),l=new Map,c=[],u=!1,d=0,h=0;for(r5.lastIndex=0;r=r5.exec(e);){let{0:t,groups:{captureName:p,rDepth:f,gRNameOrNum:m,gRDepth:g}}=r;if("["===t)d++;else if(d)"]"===t&&d--;else if(f){if(r6(f),u)throw Error(r3);if(a)throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,r.index),l=e.slice(r5.lastIndex);if(rK(l,r0,rW.DEFAULT))throw Error(r3);let c=f-1;e=r4(t,l,c,!1,n,s,h),o=r8(o,t,c,s.length,0,h);break}else if(m){r6(g);let d=!1;for(let e of c)if(e.name===m||e.num===+m){if(d=!0,e.hasRecursedWithin)throw Error(r3);break}if(!d)throw Error(rQ`Recursive \g cannot be used outside the referenced group "${"external"===i?m:rQ`\g<${m}&R=${g}>`}"`);let p=l.get(m),f=function(e,t){let r,n=/\\?./gsu;n.lastIndex=t;let i=e.length,o=0,s=1;for(;r=n.exec(e);){let[e]=r;if("["===e)o++;else if(o)"]"===e&&o--;else if("("===e)s++;else if(")"===e&&!--s){i=r.index;break}}return e.slice(t,i)}(e,p);if(a&&rK(f,rQ`${r1}|\((?!\?)`,rW.DEFAULT))throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let y=e.slice(p,r.index),b=f.slice(y.length+t.length),v=s.length,k=g-1,x=r4(y,b,k,!0,n,s,h);o=r8(o,y,k,s.length-v,v,h);let w=e.slice(0,p),C=e.slice(p+f.length);e=`${w}${x}${C}`,r5.lastIndex+=x.length-t.length-y.length-b.length,c.forEach(e=>e.hasRecursedWithin=!0),u=!0}else if(p)h++,l.set(String(h),r5.lastIndex),l.set(p,r5.lastIndex),c.push({num:h,name:p});else if("("===t[0]){let e="("===t;e&&(h++,l.set(String(h),r5.lastIndex)),c.push(e?{num:h}:{})}else")"===t&&c.pop()}return n.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:n}}(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:"external"}),s=function(e,t){let r,n=t?.hiddenCaptures??[],i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};let o="(?:(?=(",s=[0],a=[],l=0,c=0,u=NaN;do{let t;r=!1;let d=0,h=0,p=!1;for(rJ.lastIndex=Number.isNaN(u)?0:u+o.length;t=rJ.exec(e);){let{0:f,index:m,groups:{capturingStart:g,noncapturingStart:y}}=t;if("["===f)d++;else if(d)"]"===f&&d--;else if("(?>"!==f||p){if(p&&y)h++;else if(g)p?h++:(l++,s.push(l+c));else if(")"===f&&p){if(!h){let t=l+ ++c;e=`${e.slice(0,u)}${o}${e.slice(u+3,m)}))<$$${t}>)${e.slice(m+1)}`,r=!0,a.push(t);for(let e=0;e<n.length;e++)n[e]>=t&&n[e]++;if(i.size){let e=new Map;i.forEach((r,n)=>{e.set(n>=t?n+1:n,r.map(e=>e>=t?e+1:e))}),i=e}break}h--}}else u=m,p=!0}}while(r);return n.push(...a),{pattern:e=rV(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:r}})=>{if(t){let r=+t;if(r>s.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${s[r]}`}return`\\${r}`},rW.DEFAULT),captureTransfers:i,hiddenCaptures:n}}(function(e){let t;if(!RegExp(`${rZ}\\+`).test(e))return{pattern:e};let r=[],n=null,i=null,o="",s=0;for(rX.lastIndex=0;t=rX.exec(e);){let{0:c,index:u,groups:{qBase:d,qMod:h,invalidQ:p}}=t;if("["===c)s||(i=u),s++;else if("]"===c)s?s--:i=null;else if(!s)if("+"===h&&o&&!o.startsWith("(")){if(p)throw Error(`Invalid quantifier "${c}"`);let t=-1;if(/^\{\d+\}$/.test(d)){var a,l;a=e,l=u+d.length,e=a.slice(0,l)+""+a.slice(l+h.length)}else{if(")"===o||"]"===o){let t=")"===o?n:i;if(null===t)throw Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,t)}(?>${e.slice(t,u)}${d})${e.slice(u+c.length)}`}else e=`${e.slice(0,u-o.length)}(?>${o}${d})${e.slice(u+c.length)}`;t+=4}rX.lastIndex+=t}else"("===c[0]?r.push(u):")"===c&&(n=r.length?r.pop():null);o=c}return{pattern:e}}(o.pattern).pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),a={pattern:s.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=s.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(s.captureTransfers),i=n._strategy,o=a.pattern.length>=r.lazyCompileLength;(e.length||t.length||i||o)&&(a.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...o&&{lazyCompile:o}})}return a}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t});return r.options?new nU(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)})(e,{target:t.target}),{createScanner:e=>new nG(e,t),createString:e=>({content:e})}}({forgiving:!0}),nW=Object.fromEntries(o.flatMap(e=>{var t;return(null!=(t=e.aliases)?t:[]).map(t=>[t,e.id])})),nV=new Set(Object.keys(l)),nK=e=>{let t=e.trim().toLowerCase();return nW[t]||(nV.has(t),t)},nJ=new Map,nZ=new Map,nX=new Map,nQ=e=>{var t;return"string"==typeof e?e:null!=(t=e.name)?t:"custom"},nY=function(e={}){var t;let r=null!=(t=e.themes)?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(e){let t=nK(e);return nV.has(t)},getSupportedLanguages:()=>Array.from(nV),getThemes:()=>r,highlight({code:e,language:t,themes:r},n){let i,o,s=nK(t),a=[nQ(r[0]),nQ(r[1])],l=(i=e.slice(0,100),o=e.length>100?e.slice(-100):"",`${s}:${a[0]}:${a[1]}:${e.length}:${i}:${o}`);return nZ.has(l)?nZ.get(l):(n&&(nX.has(l)||nX.set(l,new Set),nX.get(l).add(n)),((e,t)=>{let r,n,i=(r=e,n=t,`${r}-${nQ(n[0])}-${nQ(n[1])}`);if(nJ.has(i))return nJ.get(i);let o=t8({themes:t,langs:[e],engine:nq});return nJ.set(i,o),o})(s,r).then(t=>{let r=t.getLoadedLanguages().includes(s)?s:"text",n=t.codeToTokens(e,{lang:r,themes:{light:a[0],dark:a[1]}});nZ.set(l,n);let i=nX.get(l);if(i){for(let e of i)e(n);nX.delete(l)}}).catch(e=>{console.error("[Streamdown Code] Failed to highlight code:",e),nX.delete(l)}),null)}}}()},39358:(e,t,r)=>{var n=r(98175),i=r(58002),o=r(91347),s=r(12814),a=1/0,l=n?n.prototype:void 0,c=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-a?"-0":r}},39438:(e,t,r)=>{var n=r(11581),i=r(143).Graph;e.exports=function(e,t,r){var o=function(e){for(var t;e.hasNode(t=n.uniqueId("_root")););return t}(e),s=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(t){return e.node(t)});return n.forEach(e.nodes(),function(i){var a=e.node(i),l=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(i),s.setParent(i,l||o),n.forEach(e[r](i),function(t){var r=t.v===i?t.w:t.v,o=s.edge(r,i),a=n.isUndefined(o)?0:o.weight;s.setEdge(r,i,{weight:e.edge(t).weight+a})}),n.has(a,"minRank")&&s.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),s}},39626:e=>{e.exports=function(){}},39942:(e,t,r)=>{var n=r(65273),i=r(69239),o=r(9281),s=r(19760),a=r(41929),l=r(95285),c=r(4518);e.exports=function e(t,r,u,d,h){t!==r&&o(r,function(o,l){if(h||(h=new n),a(o))s(t,r,l,u,e,d,h);else{var p=d?d(c(t,l),o,l+"",t,r,h):void 0;void 0===p&&(p=o),i(t,l,p)}},l)}},40369:(e,t,r)=>{var n=r(11581),i=r(32724);function o(e,t,r){for(var i;t.length&&(i=n.last(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}e.exports=function(e,t){var r,s=i.partition(e,function(e){return n.has(e,"barycenter")}),a=s.lhs,l=n.sortBy(s.rhs,function(e){return-e.i}),c=[],u=0,d=0,h=0;a.sort((r=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:r?t.i-e.i:e.i-t.i})),h=o(c,l,h),n.forEach(a,function(e){h+=e.vs.length,c.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,h=o(c,l,h)});var p={vs:n.flatten(c,!0)};return d&&(p.barycenter=u/d,p.weight=d),p}},40393:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return r(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}},40459:(e,t,r)=>{var n=r(41967),i=r(76827),o=r(57591);e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},40739:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},41021:(e,t,r)=>{e.exports=r(7696)(r(3399))},41118:(e,t,r)=>{var n=r(41929);e.exports=function(e){return e==e&&!n(e)}},41521:(e,t,r)=>{var n=r(88463),i=r(56222),o=r(33445);e.exports=function(e,t){var r,s=new i,a={},l=new o;function c(e){var n=e.v===r?e.w:e.v,i=l.priority(n);if(void 0!==i){var o=t(e);o<i&&(a[n]=r,l.decrease(n,o))}}if(0===e.nodeCount())return s;n.each(e.nodes(),function(e){l.add(e,1/0),s.setNode(e)}),l.decrease(e.nodes()[0],0);for(var u=!1;l.size()>0;){if(r=l.removeMin(),n.has(a,r))s.setEdge(r,a[r]);else if(u)throw Error("Input graph is not connected: "+e);else u=!0;e.nodeEdges(r).forEach(c)}return s}},41760:(e,t,r)=>{var n=r(88463);function i(e){var t={},r={},i=[];if(n.each(e.sinks(),function s(a){if(n.has(r,a))throw new o;n.has(t,a)||(r[a]=!0,t[a]=!0,n.each(e.predecessors(a),s),delete r[a],i.push(a))}),n.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=Error()},41929:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},41967:e=>{e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return -1}},42180:(e,t,r)=>{var n=r(63100),i=r(53542);e.exports=function(e){return null==e?[]:n(e,i(e))}},42242:(e,t,r)=>{"use strict";r.d(t,{$Z:()=>F,hG:()=>V});var n=r(1856),i=r(38129),o=r(87161),s=r(90508),a=r(17749);let{getOwnPropertyNames:l,getOwnPropertySymbols:c}=Object,{hasOwnProperty:u}=Object.prototype;function d(e,t){return function(r,n,i){return e(r,n,i)&&t(r,n,i)}}function h(e){return function(t,r,n){if(!t||!r||"object"!=typeof t||"object"!=typeof r)return e(t,r,n);let{cache:i}=n,o=i.get(t),s=i.get(r);if(o&&s)return o===r&&s===t;i.set(t,r),i.set(r,t);let a=e(t,r,n);return i.delete(t),i.delete(r),a}}function p(e){return l(e).concat(c(e))}let f=Object.hasOwn||((e,t)=>u.call(e,t));function m(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let{getOwnPropertyDescriptor:g,keys:y}=Object;function b(e,t){return e.byteLength===t.byteLength&&T(new Uint8Array(e),new Uint8Array(t))}function v(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function k(e,t){return e.byteLength===t.byteLength&&T(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function x(e,t){return m(e.getTime(),t.getTime())}function w(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function C(e,t){return e===t}function S(e,t,r){let n,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;let s=Array(o),a=e.entries(),l=0;for(;(n=a.next())&&!n.done;){let o=t.entries(),a=!1,c=0;for(;(i=o.next())&&!i.done;){if(s[c]){c++;continue}let o=n.value,u=i.value;if(r.equals(o[0],u[0],l,c,e,t,r)&&r.equals(o[1],u[1],o[0],u[0],e,t,r)){a=s[c]=!0;break}c++}if(!a)return!1;l++}return!0}function E(e,t,r){let n=y(e),i=n.length;if(y(t).length!==i)return!1;for(;i-- >0;)if(!I(e,t,r,n[i]))return!1;return!0}function _(e,t,r){let n,i,o,s=p(e),a=s.length;if(p(t).length!==a)return!1;for(;a-- >0;)if(!I(e,t,r,n=s[a])||(i=g(e,n),o=g(t,n),(i||o)&&(!i||!o||i.configurable!==o.configurable||i.enumerable!==o.enumerable||i.writable!==o.writable)))return!1;return!0}function A(e,t){return m(e.valueOf(),t.valueOf())}function N(e,t){return e.source===t.source&&e.flags===t.flags}function M(e,t,r){let n,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;let s=Array(o),a=e.values();for(;(n=a.next())&&!n.done;){let o=t.values(),a=!1,l=0;for(;(i=o.next())&&!i.done;){if(!s[l]&&r.equals(n.value,i.value,n.value,i.value,e,t,r)){a=s[l]=!0;break}l++}if(!a)return!1}return!0}function T(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function L(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 I(e,t,r,n){return("_owner"===n||"__o"===n||"__v"===n)&&(!!e.$$typeof||!!t.$$typeof)||f(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}let j={"[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},R=Object.prototype.toString,O=P();function P(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,o=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;let b=typeof m;if(b!==typeof g)return!1;if("object"!==b)return"number"===b?a(m,g,y):"function"===b&&o(m,g,y);let v=m.constructor;if(v!==g.constructor)return!1;if(v===Object)return l(m,g,y);if(Array.isArray(m))return t(m,g,y);if(v===Date)return n(m,g,y);if(v===RegExp)return u(m,g,y);if(v===Map)return s(m,g,y);if(v===Set)return d(m,g,y);let k=R.call(m);if("[object Date]"===k)return n(m,g,y);if("[object RegExp]"===k)return u(m,g,y);if("[object Map]"===k)return s(m,g,y);if("[object Set]"===k)return d(m,g,y);if("[object Object]"===k)return"function"!=typeof m.then&&"function"!=typeof g.then&&l(m,g,y);if("[object URL]"===k)return p(m,g,y);if("[object Error]"===k)return i(m,g,y);if("[object Arguments]"===k)return l(m,g,y);if(j[k])return h(m,g,y);if("[object ArrayBuffer]"===k)return e(m,g,y);if("[object DataView]"===k)return r(m,g,y);if("[object Boolean]"===k||"[object Number]"===k||"[object String]"===k)return c(m,g,y);if(f){let e=f[k];if(!e){let t=null!=m?m[Symbol.toStringTag]:void 0;t&&(e=f[t])}if(e)return e(m,g,y)}return!1}}(function({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:b,areArraysEqual:r?_:v,areDataViewsEqual:k,areDatesEqual:x,areErrorsEqual:w,areFunctionsEqual:C,areMapsEqual:r?d(S,_):S,areNumbersEqual:m,areObjectsEqual:r?_:E,arePrimitiveWrappersEqual:A,areRegExpsEqual:N,areSetsEqual:r?d(M,_):M,areTypedArraysEqual:r?d(T,_):T,areUrlsEqual:L,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let e=h(n.areArraysEqual),t=h(n.areMapsEqual),r=h(n.areObjectsEqual),i=h(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:r,areSetsEqual:i})}return n}(e)),s=r?r(o):function(e,t,r,n,i,s,a){return o(e,t,a)};return function({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(o,s){let{cache:a=e?new WeakMap:void 0,meta:l}=r();return t(o,s,{cache:a,equals:n,meta:l,strict:i})};if(e)return function(e,r){return t(e,r,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};let o={cache:void 0,equals:n,meta:void 0,strict:i};return function(e,r){return t(e,r,o)}}({circular:t,comparator:o,createState:n,equals:s,strict:i})}P({strict:!0}),P({circular:!0}),P({circular:!0,strict:!0}),P({createInternalComparator:()=>m}),P({strict:!0,createInternalComparator:()=>m}),P({circular:!0,createInternalComparator:()=>m}),P({circular:!0,createInternalComparator:()=>m,strict:!0});var $=r(36955),z=({contentComponent:e})=>{let t=(0,o.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,s.jsx)(s.Fragment,{children:Object.values(t)})},D=class extends n.Component{constructor(e){var t;super(e),this.editorContentRef=n.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null==(t=e.editor)?void 0:t.contentComponent)}}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=function(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(r,n){t={...t,[r]:i.createPortal(n.reactElement,n.element,r)},e.forEach(e=>e())},removeRenderer(r){let n={...t};delete n[r],t=n,e.forEach(e=>e())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let r=document.createElement("div");r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r})}catch{}}}render(){let{editor:e,innerRef:t,...r}=this.props;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:((...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})})(t,this.editorContentRef),...r}),(null==e?void 0:e.contentComponent)&&(0,s.jsx)(z,{contentComponent:e.contentComponent})]})}},B=(0,n.forwardRef)((e,t)=>{let r=n.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return n.createElement(D,{key:r,innerRef:t,...e})}),F=n.memo(B),H="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,U=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)}}}},G="undefined"==typeof window,q=G||!!("undefined"!=typeof window&&window.next),W=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)return G||q?null:this.createEditor();return this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onBeforeCreate)?void 0:r.call(t,...e)},onBlur:(...e)=>{var t,r;return null==(r=(t=this.options.current).onBlur)?void 0:r.call(t,...e)},onCreate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onCreate)?void 0:r.call(t,...e)},onDestroy:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDestroy)?void 0:r.call(t,...e)},onFocus:(...e)=>{var t,r;return null==(r=(t=this.options.current).onFocus)?void 0:r.call(t,...e)},onSelectionUpdate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onSelectionUpdate)?void 0:r.call(t,...e)},onTransaction:(...e)=>{var t,r;return null==(r=(t=this.options.current).onTransaction)?void 0:r.call(t,...e)},onUpdate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onUpdate)?void 0:r.call(t,...e)},onContentError:(...e)=>{var t,r;return null==(r=(t=this.options.current).onContentError)?void 0:r.call(t,...e)},onDrop:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDrop)?void 0:r.call(t,...e)},onPaste:(...e)=>{var t,r;return null==(r=(t=this.options.current).onPaste)?void 0:r.call(t,...e)},onDelete:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDelete)?void 0:r.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(r=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)||("extensions"===r&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,r)=>{var n;return e===(null==(n=t.extensions)?void 0:n[r])}):e[r]===t[r]))}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,r)=>t===e[r]))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 V(e={},t=[]){let r=(0,n.useRef)(e);r.current=e;let[i]=(0,n.useState)(()=>new W(r)),s=(0,o.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,n.useDebugValue)(s),(0,n.useEffect)(i.onRender(t)),!function(e){var t;let[r]=(0,n.useState)(()=>new U(e.editor)),i=(0,$.useSyncExternalStoreWithSelector)(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:O);H(()=>r.watch(e.editor),[e.editor,r]),(0,n.useDebugValue)(i)}({editor:s,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),s}var K=(0,n.createContext)({editor:null});K.Consumer;var J=(0,n.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});n.forwardRef((e,t)=>{let{onDragStart:r}=(0,n.useContext)(J),i=e.as||"div";return(0,s.jsx)(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})}),n.createContext({markViewContentRef:()=>{}}),a.Db,a.Yv;var Z=(0,n.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function X({editor:e,instance:t,children:r}){let i=null!=e?e:t;if(!i)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let o=(0,n.useMemo)(()=>({editor:i}),[i]),a=(0,n.useMemo)(()=>({editor:i}),[i]);return(0,s.jsx)(K.Provider,{value:a,children:(0,s.jsx)(Z.Provider,{value:o,children:r})})}function Q({...e}){let{editor:t}=(0,n.useContext)(Z);return(0,s.jsx)(F,{editor:t,...e})}Z.displayName="TiptapContext",X.displayName="Tiptap",Q.displayName="Tiptap.Content",Object.assign(X,{Content:Q})},42533:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},43113:(e,t,r)=>{var n=r(25895),i=r(75552),o=r(87747);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},43188:(e,t,r)=>{var n=r(59745),i=r(33382),o=r(53542);e.exports=function(e){return n(e,o,i)}},43240:(e,t,r)=>{var n=r(98175),i=r(55746),o=r(69048),s=r(37291),a=r(60819),l=r(12721),c=n?n.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,r,n,c,d,h){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&n;if(p||(p=l),e.size!=t.size&&!f)break;var m=h.get(e);if(m)return m==t;n|=2,h.set(e,t);var g=s(p(e),p(t),n,c,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},43370:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,r){return null!=e&&t.call(e,r)}},43372:(e,t,r)=>{var n=r(77220);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},43900:(e,t,r)=>{var n=r(11078),i=r(12151),o=r(2627),s=r(59588),a=r(91347);e.exports=function(e,t,r){var l=a(e)?n:s,c=arguments.length<3;return l(e,o(t,4),r,c,i)}},44700:(e,t,r)=>{var n=r(86114),i=r(25238);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},44934:(e,t,r)=>{e.exports={Graph:r(56222),version:r(22526)}},45176:(e,t,r)=>{var n=r(95589),i=r(49717);e.exports=function(e,t){return n(e,i(e),t)}},46451:(e,t,r)=>{var n=r(21172),i=r(96830),o=r(91347),s=r(61288),a=r(86237),l=r(52791),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),u=!r&&i(e),d=!r&&!u&&s(e),h=!r&&!u&&!d&&l(e),p=r||u||d||h,f=p?n(e.length,String):[],m=f.length;for(var g in e)(t||c.call(e,g))&&!(p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&f.push(g);return f}},46555:(e,t,r)=>{var n=r(37155);e.exports=function(e){return n(e,4)}},46764:(e,t,r)=>{var n=r(8665);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=!!t,t}},46958:e=>{e.exports=function(e,t,r){for(var n=-1,i=e.length,o=t.length,s={};++n<i;){var a=n<o?t[n]:void 0;r(s,e[n],a)}return s}},47505:e=>{e.exports=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}},47869:e=>{e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},48095:(e,t,r)=>{"use strict";var n=r(11581),i=r(32724);e.exports={run:function(e){e.graph().dummyChains=[],n.forEach(e.edges(),function(t){!function(e,t){var r,n,o,s=t.v,a=e.node(s).rank,l=t.w,c=e.node(l).rank,u=t.name,d=e.edge(t),h=d.labelRank;if(c!==a+1){for(e.removeEdge(t),o=0,++a;a<c;++o,++a)d.points=[],n={width:0,height:0,edgeLabel:d,edgeObj:t,rank:a},r=i.addDummyNode(e,"edge",n,"_d"),a===h&&(n.width=d.width,n.height=d.height,n.dummy="edge-label",n.labelpos=d.labelpos),e.setEdge(s,r,{weight:d.weight},u),0===o&&e.graph().dummyChains.push(r),s=r;e.setEdge(s,l,{weight:d.weight},u)}}(e,t)})},undo:function(e){n.forEach(e.graph().dummyChains,function(t){var r,n=e.node(t),i=n.edgeLabel;for(e.setEdge(n.edgeObj,i);n.dummy;)r=e.successors(t)[0],e.removeNode(t),i.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),t=r,n=e.node(t)})}}},48717:(e,t,r)=>{"use strict";r.d(t,{$B:()=>a,Sd:()=>o,T2:()=>s});var n=r(28155),i=r(65282);function o(e,t=null){return function(r,o){let{$from:s,$to:a}=r.selection,l=s.blockRange(a);if(!l)return!1;let c=o?r.tr:null;return!!function(e,t,r,o=null){let s=!1,a=t,l=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(r)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=l.resolve(t.start-2);a=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,l.resolve(t.$to.end(t.depth)),t.depth)),s=!0}let c=(0,n.oM)(a,r,o,t);return!!c&&(e&&function(e,t,r,o,s){let a=i.FK.empty;for(let e=r.length-1;e>=0;e--)a=i.FK.from(r[e].type.create(r[e].attrs,a));e.step(new n.Wg(t.start-2*!!o,t.end,t.start,t.end,new i.Ji(a,0,0),r.length,!0));let l=0;for(let e=0;e<r.length;e++)r[e].type==s&&(l=e+1);let c=r.length-l,u=t.start+r.length-2*!!o,d=t.parent;for(let r=t.startIndex,i=t.endIndex,o=!0;r<i;r++,o=!1)!o&&(0,n.zy)(e.doc,u,c)&&(e.split(u,c),u+=2*c),u+=d.child(r).nodeSize}(e,t,c,s,r),!0)}(c,l,e,t)&&(o&&o(c.scrollIntoView()),!0)}}function s(e){return function(t,r){let{$from:o,$to:s}=t.selection,a=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);return!!a&&(!r||(o.node(a.depth-1).type==e?function(e,t,r,o){let s=e.tr,a=o.end,l=o.$to.end(o.depth);a<l&&(s.step(new n.Wg(a-1,l,a,l,new i.Ji(i.FK.from(r.create(null,o.parent.copy())),1,0),1,!0)),o=new i.u$(s.doc.resolve(o.$from.pos),s.doc.resolve(l),o.depth));let c=(0,n.jP)(o);if(null==c)return!1;s.lift(o,c);let u=s.doc.resolve(s.mapping.map(a,-1)-1);return(0,n.n9)(s.doc,u.pos)&&u.nodeBefore.type==u.nodeAfter.type&&s.join(u.pos),t(s.scrollIntoView()),!0}(t,r,e,a):function(e,t,r){let o=e.tr,s=r.parent;for(let e=r.end,t=r.endIndex-1,n=r.startIndex;t>n;t--)e-=s.child(t).nodeSize,o.delete(e-1,e+1);let a=o.doc.resolve(r.start),l=a.nodeAfter;if(o.mapping.map(r.end)!=r.start+a.nodeAfter.nodeSize)return!1;let c=0==r.startIndex,u=r.endIndex==s.childCount,d=a.node(-1),h=a.index(-1);if(!d.canReplace(h+ +!c,h+1,l.content.append(u?i.FK.empty:i.FK.from(s))))return!1;let p=a.pos,f=p+l.nodeSize;return o.step(new n.Wg(p-!!c,f+ +!!u,p+1,f-1,new i.Ji((c?i.FK.empty:i.FK.from(s.copy(i.FK.empty))).append(u?i.FK.empty:i.FK.from(s.copy(i.FK.empty))),+!c,+!u),+!c)),t(o.scrollIntoView()),!0}(t,r,a)))}}function a(e){return function(t,r){let{$from:o,$to:s}=t.selection,a=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let l=a.startIndex;if(0==l)return!1;let c=a.parent,u=c.child(l-1);if(u.type!=e)return!1;if(r){let o=u.lastChild&&u.lastChild.type==c.type,s=i.FK.from(o?e.create():null),l=new i.Ji(i.FK.from(e.create(null,i.FK.from(c.type.create(null,s)))),o?3:1,0),d=a.start,h=a.end;r(t.tr.step(new n.Wg(d-(o?3:1),h,d,h,l,1,!0)).scrollIntoView())}return!0}}},49641:(e,t,r)=>{var n=r(84364);e.exports=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},49717:(e,t,r)=>{var n=r(10548),i=r(74205),o=r(33382),s=r(80791);e.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:s},50079:e=>{e.exports=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}},51094:(e,t,r)=>{var n=r(72043),i=r(46958);e.exports=function(e,t){return i(e||[],t||[],n)}},52480:(e,t,r)=>{var n=r(38974);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},52542:(e,t,r)=>{var n=r(9281),i=r(20552),o=r(95285);e.exports=function(e,t){return null==e?e:n(e,i(t),o)}},52791:(e,t,r)=>{var n=r(54351),i=r(72657),o=r(86319),s=o&&o.isTypedArray;e.exports=s?i(s):n},53212:(e,t,r)=>{var n=r(12814);e.exports=function(e,t){if(e!==t){var r=void 0!==e,i=null===e,o=e==e,s=n(e),a=void 0!==t,l=null===t,c=t==t,u=n(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!u&&e<t||u&&r&&o&&!i&&!s||l&&r&&o||!a&&o||!c)return -1}return 0}},53237:(e,t,r)=>{var n=r(86114),i=r(14786),o=r(41929),s=r(68591),a=/^\[object .+?Constructor\]$/,l=Object.prototype,c=Function.prototype.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?d:a).test(s(e))}},53443:(e,t,r)=>{e.exports=r(11254)(r(99083),"WeakMap")},53542:(e,t,r)=>{var n=r(46451),i=r(78414),o=r(44700);e.exports=function(e){return o(e)?n(e):i(e)}},53901:(e,t,r)=>{var n=r(67070);e.exports=function(e){return function(t){return n(t,e)}}},54169:(e,t,r)=>{var n=r(31310),i=r(74205),o=r(59919);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},54351:(e,t,r)=>{var n=r(86366),i=r(25238),o=r(88046),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[n(e)]}},54373:(e,t,r)=>{var n=r(30727);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},54444:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},54546:(e,t,r)=>{var n=r(72043),i=r(77651),o=r(86237),s=r(41929),a=r(24837);e.exports=function(e,t,r,l){if(!s(e))return e;t=i(t,e);for(var c=-1,u=t.length,d=u-1,h=e;null!=h&&++c<u;){var p=a(t[c]),f=r;if("__proto__"===p||"constructor"===p||"prototype"===p)break;if(c!=d){var m=h[p];void 0===(f=l?l(m,p,h):void 0)&&(f=s(m)?m:o(t[c+1])?[]:{})}n(h,p,f),h=h[p]}return e}},54812:(e,t,r)=>{var n=r(12151),i=r(44700);e.exports=function(e,t){var r=-1,o=i(e)?Array(e.length):[];return n(e,function(e,n,i){o[++r]=t(e,n,i)}),o}},54900:e=>{e.exports=function(){this.__data__=[],this.size=0}},55746:(e,t,r)=>{e.exports=r(99083).Uint8Array},55823:e=>{e.exports=function(e){return this.__data__.get(e)}},56222:(e,t,r)=>{"use strict";var n=r(88463);function i(e){this._isDirected=!n.has(e,"directed")||e.directed,this._isMultigraph=!!n.has(e,"multigraph")&&e.multigraph,this._isCompound=!!n.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=n.constant(void 0),this._defaultEdgeLabelFn=n.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function a(e,t,r,i){var o=""+t,s=""+r;if(!e&&o>s){var a=o;o=s,s=a}return o+"\x01"+s+"\x01"+(n.isUndefined(i)?"\0":i)}function l(e,t){return a(e,t.v,t.w,t.name)}e.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return n.isFunction(e)||(e=n.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return n.keys(this._nodes)},i.prototype.sources=function(){var e=this;return n.filter(this.nodes(),function(t){return n.isEmpty(e._in[t])})},i.prototype.sinks=function(){var e=this;return n.filter(this.nodes(),function(t){return n.isEmpty(e._out[t])})},i.prototype.setNodes=function(e,t){var r=arguments,i=this;return n.each(e,function(e){r.length>1?i.setNode(e,t):i.setNode(e)}),this},i.prototype.setNode=function(e,t){return n.has(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return n.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(n.has(this._nodes,e)){var r=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],n.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),n.each(n.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],n.each(n.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(n.isUndefined(t))t="\0";else{t+="";for(var r=t;!n.isUndefined(r);r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},i.prototype.children=function(e){if(n.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return n.keys(t)}else if("\0"===e)return this.nodes();else if(this.hasNode(e))return[]},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return n.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return n.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return n.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;n.each(this._nodes,function(r,n){e(n)&&t.setNode(n,r)}),n.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var i={};return this._isCompound&&n.each(t.nodes(),function(e){t.setParent(e,function e(n){var o=r.parent(n);return void 0===o||t.hasNode(o)?(i[n]=o,o):o in i?i[o]:e(o)}(e))}),t},i.prototype.setDefaultEdgeLabel=function(e){return n.isFunction(e)||(e=n.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return n.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var r=this,i=arguments;return n.reduce(e,function(e,n){return i.length>1?r.setEdge(e,n,t):r.setEdge(e,n),n}),this},i.prototype.setEdge=function(){var e,t,r,i,s=!1,l=arguments[0];"object"==typeof l&&null!==l&&"v"in l?(e=l.v,t=l.w,r=l.name,2==arguments.length&&(i=arguments[1],s=!0)):(e=l,t=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,t=""+t,n.isUndefined(r)||(r=""+r);var c=a(this._isDirected,e,t,r);if(n.has(this._edgeLabels,c))return s&&(this._edgeLabels[c]=i),this;if(!n.isUndefined(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=s?i:this._defaultEdgeLabelFn(e,t,r);var u=function(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var s=i;i=o,o=s}var a={v:i,w:o};return n&&(a.name=n),a}(this._isDirected,e,t,r);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[c]=u,o(this._preds[t],e),o(this._sucs[e],t),this._in[t][c]=u,this._out[e][c]=u,this._edgeCount++,this},i.prototype.edge=function(e,t,r){var n=1==arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return this._edgeLabels[n]},i.prototype.hasEdge=function(e,t,r){var i=1==arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return n.has(this._edgeLabels,i)},i.prototype.removeEdge=function(e,t,r){var n=1==arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,r),i=this._edgeObjs[n];return i&&(e=i.v,t=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var i=n.values(r);return t?n.filter(i,function(e){return e.v===t}):i}},i.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var i=n.values(r);return t?n.filter(i,function(e){return e.w===t}):i}},i.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))}},56392:(e,t,r)=>{"use strict";var n=r(11581);function i(e){n.forEach(e.nodes(),function(t){o(e.node(t))}),n.forEach(e.edges(),function(t){o(e.edge(t))})}function o(e){var t=e.width;e.width=e.height,e.height=t}function s(e){e.y=-e.y}function a(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&i(e)},undo:function(e){var t,r,o=e.graph().rankdir.toLowerCase();("bt"===o||"rl"===o)&&(t=e,n.forEach(t.nodes(),function(e){s(t.node(e))}),n.forEach(t.edges(),function(e){var r=t.edge(e);n.forEach(r.points,s),n.has(r,"y")&&s(r)})),("lr"===o||"rl"===o)&&(r=e,n.forEach(r.nodes(),function(e){a(r.node(e))}),n.forEach(r.edges(),function(e){var t=r.edge(e);n.forEach(t.points,a),n.has(t,"x")&&a(t)}),i(e))}}},56513:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},56770:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("file-text",[["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"}]])},57031:(e,t,r)=>{var n=r(65273),i=r(33546);e.exports=function(e,t,r,o){var s=r.length,a=s,l=!o;if(null==e)return!a;for(e=Object(e);s--;){var c=r[s];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var u=(c=r[s])[0],d=e[u],h=c[1];if(l&&c[2]){if(void 0===d&&!(u in e))return!1}else{var p=new n;if(o)var f=o(d,h,u,e,t,p);if(!(void 0===f?i(h,d,3,o,p):f))return!1}}return!0}},57591:e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}},57847:(e,t,r)=>{var n=r(95589),i=r(33382);e.exports=function(e,t){return n(e,i(e),t)}},58002:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},58367:(e,t,r)=>{var n=r(71559),i=r(61092),o=r(18063);e.exports=function(e){return i(e)?o(e):n(e)}},58587:(e,t,r)=>{var n=r(43113),i=r(91433),o=r(47505),s=r(38605),a=r(2253),l=r(12721);e.exports=function(e,t,r){var c=-1,u=i,d=e.length,h=!0,p=[],f=p;if(r)h=!1,u=o;else if(d>=200){var m=t?null:a(e);if(m)return l(m);h=!1,u=s,f=new n}else f=t?[]:p;t:for(;++c<d;){var g=e[c],y=t?t(g):g;if(g=r||0!==g?g:0,h&&y==y){for(var b=f.length;b--;)if(f[b]===y)continue t;t&&f.push(y),p.push(g)}else u(f,y,r)||(f!==p&&f.push(y),p.push(g))}return p}},59547:(e,t,r)=>{"use strict";r.d(t,{K:()=>f,w:()=>p});for(var n={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:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)n[48+a]=n[96+a]=String(a);for(var a=1;a<=24;a++)n[a+111]="F"+a;for(var a=65;a<=90;a++)n[a]=String.fromCharCode(a+32),i[a]=String.fromCharCode(a);for(var l in n)i.hasOwnProperty(l)||(i[l]=n[l]);var c=r(32603);let u="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function h(e,t,r=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),r&&t.shiftKey&&(e="Shift-"+e),e}function p(e){return new c.k_({props:{handleKeyDown:f(e)}})}function f(e){let t=function(e){let t=Object.create(null);for(let r in e)t[function(e){let t,r,n,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))n=!0;else if(/^mod$/i.test(s))u?i=!0:r=!0;else throw Error("Unrecognized modifier name: "+s)}return t&&(s="Alt-"+s),r&&(s="Ctrl-"+s),i&&(s="Meta-"+s),n&&(s="Shift-"+s),s}(r)]=e[r];return t}(e);return function(e,r){var a;let l=("Esc"==(a=!(o&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||s&&r.shiftKey&&r.key&&1==r.key.length||"Unidentified"==r.key)&&r.key||(r.shiftKey?i:n)[r.keyCode]||r.key||"Unidentified")&&(a="Escape"),"Del"==a&&(a="Delete"),"Left"==a&&(a="ArrowLeft"),"Up"==a&&(a="ArrowUp"),"Right"==a&&(a="ArrowRight"),"Down"==a&&(a="ArrowDown"),a),c,u=t[h(l,r)];if(u&&u(e.state,e.dispatch,e))return!0;if(1==l.length&&" "!=l){if(r.shiftKey){let n=t[h(l,r,!1)];if(n&&n(e.state,e.dispatch,e))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(d&&r.ctrlKey&&r.altKey)&&(c=n[r.keyCode])&&c!=l){let n=t[h(c,r)];if(n&&n(e.state,e.dispatch,e))return!0}}return!1}}},59588:e=>{e.exports=function(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}},59745:(e,t,r)=>{var n=r(10548),i=r(91347);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},59793:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},59919:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},60682:(e,t,r)=>{e.exports=r(11254)(r(99083),"Set")},60819:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},61092:e=>{var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},61288:(e,t,r)=>{e=r.nmd(e);var n=r(99083),i=r(33857),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,l=a?a.isBuffer:void 0;e.exports=l||i},62401:(e,t,r)=>{"use strict";var n=r(11581);e.exports=function(e,t){for(var r=0,i=1;i<t.length;++i)r+=function(e,t,r){for(var i=n.zipObject(r,n.map(r,function(e,t){return t})),o=n.flatten(n.map(t,function(t){return n.sortBy(n.map(e.outEdges(t),function(t){return{pos:i[t.w],weight:e.edge(t).weight}}),"pos")}),!0),s=1;s<r.length;)s<<=1;var a=2*s-1;s-=1;var l=n.map(Array(a),function(){return 0}),c=0;return n.forEach(o.forEach(function(e){var t=e.pos+s;l[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=l[t+1]),t=t-1>>1,l[t]+=e.weight;c+=e.weight*r})),c}(e,t[i-1],t[i]);return r}},62862:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},63100:(e,t,r)=>{var n=r(58002);e.exports=function(e,t){return n(t,function(t){return e[t]})}},63120:e=>{e.exports=function(e){return e}},63129:(e,t,r)=>{var n=r(8665);e.exports=function(e){return n(this,e).has(e)}},64291:(e,t,r)=>{var n=r(98175),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},64541:(e,t,r)=>{var n=r(41929),i=r(59919),o=r(84223),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var a in e)"constructor"==a&&(t||!s.call(e,a))||r.push(a);return r}},64731:(e,t,r)=>{"use strict";r.d(t,{uB:()=>I});var n=/[\\\/_+.#"@\[\(\{&]/,i=/[\\\/_+.#"@\[\(\{&]/g,o=/[\s-]/,s=/[\s-]/g;function a(e){return e.toLowerCase().replace(s," ")}var l=r(71350),c=r(1856),u=r(81597),d=r(40577),h=r(34124),p='[cmdk-group=""]',f='[cmdk-group-items=""]',m='[cmdk-item=""]',g="".concat(m,':not([aria-disabled="true"])'),y="cmdk-item-select",b="data-value",v=(e,t,r)=>(function(e,t,r){return function e(t,r,a,l,c,u,d){if(u===r.length)return c===t.length?1:.99;var h=`${c},${u}`;if(void 0!==d[h])return d[h];for(var p,f,m,g,y=l.charAt(u),b=a.indexOf(y,c),v=0;b>=0;)(p=e(t,r,a,l,b+1,u+1,d))>v&&(b===c?p*=1:n.test(t.charAt(b-1))?(p*=.8,(m=t.slice(c,b-1).match(i))&&c>0&&(p*=Math.pow(.999,m.length))):o.test(t.charAt(b-1))?(p*=.9,(g=t.slice(c,b-1).match(s))&&c>0&&(p*=Math.pow(.999,g.length))):(p*=.17,c>0&&(p*=Math.pow(.999,b-c))),t.charAt(b)!==r.charAt(u)&&(p*=.9999)),(p<.1&&a.charAt(b-1)===l.charAt(u+1)||l.charAt(u+1)===l.charAt(u)&&a.charAt(b-1)!==l.charAt(u))&&.1*(f=e(t,r,a,l,b+1,u+2,d))>p&&(p=.1*f),p>v&&(v=p),b=a.indexOf(y,b+1);return d[h]=v,v}(e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,t,a(e),a(t),0,0,{})})(e,t,r),k=c.createContext(void 0),x=()=>c.useContext(k),w=c.createContext(void 0),C=()=>c.useContext(w),S=c.createContext(void 0),E=c.forwardRef((e,t)=>{let r=O(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=O(()=>new Set),i=O(()=>new Map),o=O(()=>new Map),s=O(()=>new Set),a=j(e),{label:l,children:h,value:x,onValueChange:C,filter:S,shouldFilter:E,loop:_,disablePointerSelection:A=!1,vimBindings:N=!0,...M}=e,T=(0,d.B)(),L=(0,d.B)(),I=(0,d.B)(),P=c.useRef(null),$=z();R(()=>{if(void 0!==x){let e=x.trim();r.current.value=e,F.emit()}},[x]),R(()=>{$(6,V)},[]);let F=c.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var i,o,s,l;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)W(),G(),$(1,q);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(I);e?e.focus():null==(i=document.getElementById(T))||i.focus()}if($(7,()=>{var e;r.current.selectedItemId=null==(e=K())?void 0:e.id,F.emit()}),n||$(5,V),(null==(o=a.current)?void 0:o.value)!==void 0){null==(l=(s=a.current).onValueChange)||l.call(s,null!=t?t:"");return}}F.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),H=c.useMemo(()=>({value:(e,t,n)=>{var i;t!==(null==(i=o.current.get(e))?void 0:i.value)&&(o.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,U(t,n)),$(2,()=>{G(),F.emit()}))},item:(e,t)=>(n.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),$(3,()=>{W(),G(),r.current.value||q(),F.emit()}),()=>{o.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=K();$(4,()=>{W(),(null==t?void 0:t.getAttribute("id"))===e&&q(),F.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{o.current.delete(e),i.current.delete(e)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:T,inputId:I,labelId:L,listInnerRef:P}),[]);function U(e,t){var n,i;let o=null!=(i=null==(n=a.current)?void 0:n.filter)?i:v;return e?o(e,r.current.search,t):0}function G(){if(!r.current.search||!1===a.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=i.current.get(r),o=0;n.forEach(t=>{o=Math.max(e.get(t),o)}),t.push([r,o])});let n=P.current;J().sort((t,r)=>{var n,i;let o=t.getAttribute("id"),s=r.getAttribute("id");return(null!=(n=e.get(s))?n:0)-(null!=(i=e.get(o))?i:0)}).forEach(e=>{let t=e.closest(f);t?t.appendChild(e.parentElement===t?e:e.closest("".concat(f," > *"))):n.appendChild(e.parentElement===n?e:e.closest("".concat(f," > *")))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=P.current)?void 0:t.querySelector("".concat(p,"[").concat(b,'="').concat(encodeURIComponent(e[0]),'"]'));null==r||r.parentElement.appendChild(r)})}function q(){let e=J().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(b);F.setState("value",t||void 0)}function W(){var e,t,s,l;if(!r.current.search||!1===a.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let c=0;for(let i of n.current){let n=U(null!=(t=null==(e=o.current.get(i))?void 0:e.value)?t:"",null!=(l=null==(s=o.current.get(i))?void 0:s.keywords)?l:[]);r.current.filtered.items.set(i,n),n>0&&c++}for(let[e,t]of i.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function V(){var e,t,r;let n=K();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(p))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function K(){var e;return null==(e=P.current)?void 0:e.querySelector("".concat(m,'[aria-selected="true"]'))}function J(){var e;return Array.from((null==(e=P.current)?void 0:e.querySelectorAll(g))||[])}function Z(e){let t=J()[e];t&&F.setState("value",t.getAttribute(b))}function X(e){var t;let r=K(),n=J(),i=n.findIndex(e=>e===r),o=n[i+e];null!=(t=a.current)&&t.loop&&(o=i+e<0?n[n.length-1]:i+e===n.length?n[0]:n[i+e]),o&&F.setState("value",o.getAttribute(b))}function Q(e){let t=K(),r=null==t?void 0:t.closest(p),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,p):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,p))?void 0:r.querySelector(g);n?F.setState("value",n.getAttribute(b)):X(e)}let Y=()=>Z(J().length-1),ee=e=>{e.preventDefault(),e.metaKey?Y():e.altKey?Q(1):X(1)},et=e=>{e.preventDefault(),e.metaKey?Z(0):e.altKey?Q(-1):X(-1)};return c.createElement(u.sG.div,{ref:t,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=M.onKeyDown)||t.call(M,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":N&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":N&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),Z(0);break;case"End":e.preventDefault(),Y();break;case"Enter":{e.preventDefault();let t=K();if(t){let e=new Event(y);t.dispatchEvent(e)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:B},l),D(e,e=>c.createElement(w.Provider,{value:F},c.createElement(k.Provider,{value:H},e))))}),_=c.forwardRef((e,t)=>{var r,n;let i=(0,d.B)(),o=c.useRef(null),s=c.useContext(S),a=x(),l=j(e),p=null!=(n=null==(r=l.current)?void 0:r.forceMount)?n:null==s?void 0:s.forceMount;R(()=>{if(!p)return a.item(i,null==s?void 0:s.id)},[p]);let f=$(i,o,[e.value,e.children,o],e.keywords),m=C(),g=P(e=>e.value&&e.value===f.current),b=P(e=>!!p||!1===a.filter()||!e.search||e.filtered.items.get(i)>0);function v(){var e,t;k(),null==(t=(e=l.current).onSelect)||t.call(e,f.current)}function k(){m.setState("value",f.current,!0)}if(c.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(y,v),()=>t.removeEventListener(y,v)},[b,e.onSelect,e.disabled]),!b)return null;let{disabled:w,value:E,onSelect:_,forceMount:A,keywords:N,...M}=e;return c.createElement(u.sG.div,{ref:(0,h.t)(o,t),...M,id:i,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!g,"data-disabled":!!w,"data-selected":!!g,onPointerMove:w||a.getDisablePointerSelection()?void 0:k,onClick:w?void 0:v},e.children)}),A=c.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,s=(0,d.B)(),a=c.useRef(null),l=c.useRef(null),p=(0,d.B)(),f=x(),m=P(e=>!!i||!1===f.filter()||!e.search||e.filtered.groups.has(s));R(()=>f.group(s),[]),$(s,a,[e.value,e.heading,l]);let g=c.useMemo(()=>({id:s,forceMount:i}),[i]);return c.createElement(u.sG.div,{ref:(0,h.t)(a,t),...o,"cmdk-group":"",role:"presentation",hidden:!m||void 0},r&&c.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:p},r),D(e,e=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?p:void 0},c.createElement(S.Provider,{value:g},e))))}),N=c.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=c.useRef(null),o=P(e=>!e.search);return r||o?c.createElement(u.sG.div,{ref:(0,h.t)(i,t),...n,"cmdk-separator":"",role:"separator"}):null}),M=c.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=null!=e.value,o=C(),s=P(e=>e.search),a=P(e=>e.selectedItemId),l=x();return c.useEffect(()=>{null!=e.value&&o.setState("search",e.value)},[e.value]),c.createElement(u.sG.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:i?e.value:s,onChange:e=>{i||o.setState("search",e.target.value),null==r||r(e.target.value)}})}),T=c.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=c.useRef(null),s=c.useRef(null),a=P(e=>e.selectedItemId),l=x();return c.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),c.createElement(u.sG.div,{ref:(0,h.t)(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":n,id:l.listId},D(e,e=>c.createElement("div",{ref:(0,h.t)(s,l.listInnerRef),"cmdk-list-sizer":""},e)))}),L=c.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:s,...a}=e;return c.createElement(l.Root,{open:r,onOpenChange:n},c.createElement(l.Portal,{container:s},c.createElement(l.Overlay,{"cmdk-overlay":"",className:i}),c.createElement(l.Content,{"aria-label":e.label,"cmdk-dialog":"",className:o},c.createElement(E,{ref:t,...a}))))}),I=Object.assign(E,{List:T,Item:_,Input:M,Group:A,Separator:N,Dialog:L,Empty:c.forwardRef((e,t)=>P(e=>0===e.filtered.count)?c.createElement(u.sG.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:c.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return c.createElement(u.sG.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},D(e,e=>c.createElement("div",{"aria-hidden":!0},e)))})});function j(e){let t=c.useRef(e);return R(()=>{t.current=e}),t}var R="undefined"==typeof window?c.useEffect:c.useLayoutEffect;function O(e){let t=c.useRef();return void 0===t.current&&(t.current=e()),t}function P(e){let t=C(),r=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,r,r)}function $(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=c.useRef(),o=x();return R(()=>{var s;let a=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():i.current}})(),l=n.map(e=>e.trim());o.value(e,a,l),null==(s=t.current)||s.setAttribute(b,a),i.current=a}),i}var z=()=>{let[e,t]=c.useState(),r=O(()=>new Map);return R(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function D(e,t){let r,{asChild:n,children:i}=e;return n&&c.isValidElement(i)?c.cloneElement("function"==typeof(r=i.type)?r(i.props):"render"in r?r.render(i.props):i,{ref:i.ref},t(i.props.children)):t(i)}var B={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}},64908:(e,t,r)=>{var n=r(65604),i=r(72657),o=r(86319),s=o&&o.isMap;e.exports=s?i(s):n},65273:(e,t,r)=>{var n=r(88055),i=r(898),o=r(62862),s=r(55823),a=r(18131),l=r(21275);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},65282:(e,t,r)=>{"use strict";function n(e){this.content=e}r.d(t,{S4:()=>B,ZF:()=>J,FK:()=>i,CU:()=>l,sX:()=>$,bP:()=>C,u$:()=>x,vI:()=>c,Sj:()=>z,Ji:()=>u}),n.prototype={constructor:n,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,r){var i=r&&r!=e?this.remove(r):this,o=i.find(e),s=i.content.slice();return -1==o?s.push(r||e,t):(s[o+1]=t,r&&(s[o]=r)),new n(s)},remove:function(e){var t=this.find(e);if(-1==t)return this;var r=this.content.slice();return r.splice(t,2),new n(r)},addToStart:function(e,t){return new n([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var r=this.remove(e).content.slice();return r.push(e,t),new n(r)},addBefore:function(e,t,r){var i=this.remove(t),o=i.content.slice(),s=i.find(e);return o.splice(-1==s?o.length:s,0,t,r),new n(o)},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=n.from(e)).size?new n(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=n.from(e)).size?new n(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=n.from(e);for(var r=0;r<e.content.length;r+=2)t=t.remove(e.content[r]);return t},toObject:function(){var e={};return this.forEach(function(t,r){e[t]=r}),e},get size(){return this.content.length>>1}},n.from=function(e){if(e instanceof n)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new n(t)};class i{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,r,n=0,i){for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;if(l>e&&!1!==r(a,n+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),r,n+i)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,n){let i="",o=!0;return this.nodesBetween(e,t,(s,a)=>{let l=s.isText?s.text.slice(Math.max(e,a)-a,t-a):s.isLeaf?n?"function"==typeof n?n(s):n:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&r&&(o?o=!1:i+=r),i+=l},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,n=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(n[n.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)n.push(e.content[o]);return new i(n,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let r=[],n=0;if(t>e)for(let i=0,o=0;o<t;i++){let s=this.content[i],a=o+s.nodeSize;a>e&&((o<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),r.push(s),n+=s.nodeSize),o=a}return new i(r,n)}cutByIndex(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let n=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return n[e]=t,new i(n,o)}addToStart(e){return new i([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new i(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,r=0;t<this.content.length;t++){let n=this.content[t];e(n,r,t),r+=n.nodeSize}}findDiffStart(e,t=0){return function e(t,r,n){for(let i=0;;i++){if(i==t.childCount||i==r.childCount)return t.childCount==r.childCount?null:n;let o=t.child(i),s=r.child(i);if(o==s){n+=o.nodeSize;continue}if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)n++;return n}if(o.content.size||s.content.size){let t=e(o.content,s.content,n+1);if(null!=t)return t}n+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return function e(t,r,n,i){for(let o=t.childCount,s=r.childCount;;){if(0==o||0==s)return o==s?null:{a:n,b:i};let a=t.child(--o),l=r.child(--s),c=a.nodeSize;if(a==l){n-=c,i-=c;continue}if(!a.sameMarkup(l))return{a:n,b:i};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--,i--;return{a:n,b:i}}if(a.content.size||l.content.size){let t=e(a.content,l.content,n-1,i-1);if(t)return t}n-=c,i-=c}}(this,e,t,r)}findIndex(e){if(0==e)return s(0,e);if(e==this.size)return s(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let n=r+this.child(t).nodeSize;if(n>=e){if(n==e)return s(t+1,n);return s(t,r)}r=n}}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 i.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return i.empty;let t,r=0;for(let n=0;n<e.length;n++){let i=e[n];r+=i.nodeSize,n&&i.isText&&e[n-1].sameMarkup(i)?(t||(t=e.slice(0,n)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new i(t||e,r)}static from(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}i.empty=new i([],0);let o={index:0,offset:0};function s(e,t){return o.index=e,o.offset=t,o}function a(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let r=Array.isArray(e);if(Array.isArray(t)!=r)return!1;if(r){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!a(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!a(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class l{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let n=0;n<e.length;n++){let i=e[n];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,n));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,n)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||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&&a(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 r=e.marks[t.type];if(!r)throw RangeError(`There is no mark type ${t.type} in this schema`);let n=r.create(t.attrs);return r.checkAttrs(n.attrs),n}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return l.none;if(e instanceof l)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}l.none=[];class c extends Error{}class u{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=function e(t,r,n,i){let{index:o,offset:s}=t.findIndex(r),a=t.maybeChild(o);if(s==r||a.isText)return i&&!i.canReplace(o,o,n)?null:t.cut(0,r).append(n).append(t.cut(r));let l=e(a.content,r-s-1,n,a);return l&&t.replaceChild(o,a.copy(l))}(this.content,e+this.openStart,t);return r&&new u(r,this.openStart,this.openEnd)}removeBetween(e,t){return new u(function e(t,r,n){let{index:i,offset:o}=t.findIndex(r),s=t.maybeChild(i),{index:a,offset:l}=t.findIndex(n);if(o==r||s.isText){if(l!=n&&!t.child(a).isText)throw RangeError("Removing non-flat range");return t.cut(0,r).append(t.cut(n))}if(i!=a)throw RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,r-o-1,n-o-1)))}(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 u.empty;let r=t.openStart||0,n=t.openEnd||0;if("number"!=typeof r||"number"!=typeof n)throw RangeError("Invalid input for Slice.fromJSON");return new u(i.fromJSON(e,t.content),r,n)}static maxOpen(e,t=!0){let r=0,n=0;for(let n=e.firstChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.firstChild)r++;for(let r=e.lastChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.lastChild)n++;return new u(e,r,n)}}function d(e,t){if(!t.type.compatibleContent(e.type))throw new c("Cannot join "+t.type.name+" onto "+e.type.name)}function h(e,t,r){let n=e.node(r);return d(n,t.node(r)),n}function p(e,t){let r=t.length-1;r>=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function f(e,t,r,n){let i=(t||e).node(r),o=0,s=t?t.index(r):i.childCount;e&&(o=e.index(r),e.depth>r?o++:e.textOffset&&(p(e.nodeAfter,n),o++));for(let e=o;e<s;e++)p(i.child(e),n);t&&t.depth==r&&t.textOffset&&p(t.nodeBefore,n)}function m(e,t){return e.type.checkContent(t),e.copy(t)}function g(e,t,r){let n=[];return f(null,e,r,n),e.depth>r&&p(m(h(e,t,r+1),g(e,t,r+1)),n),f(t,null,r,n),new i(n)}u.empty=new u(i.empty,0,0);class y{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,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 r=this.pos-this.path[this.path.length-1],n=e.child(t);return r?e.child(t).cut(r):n}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 r=this.path[3*t],n=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)n+=r.child(t).nodeSize;return n}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return l.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),n=e.maybeChild(t);if(!r){let e=r;r=n,n=e}let i=r.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||n&&i[o].isInSet(n.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,n=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)!1!==r[i].type.spec.inclusive||n&&r[i].isInSet(n.marks)||(r=r[i--].removeFromSet(r));return r}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 r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new x(this,e,r);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 r=[],n=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),s=i-o;if(r.push(t,e,n+o),!s||(t=t.child(e)).isText)break;i=s-1,n+=o+1}return new y(t,r,i)}static resolveCached(e,t){let r=k.get(e);if(r)for(let e=0;e<r.elts.length;e++){let n=r.elts[e];if(n.pos==t)return n}else k.set(e,r=new b);let n=r.elts[r.i]=y.resolve(e,t);return r.i=(r.i+1)%v,n}}class b{constructor(){this.elts=[],this.i=0}}let v=12,k=new WeakMap;class x{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}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 w=Object.create(null);class C{constructor(e,t,r,n=l.none){this.type=e,this.attrs=t,this.marks=n,this.content=r||i.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,r,n=0){this.content.nodesBetween(e,t,r,n,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,r,n){return this.content.textBetween(e,t,r,n)}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,r){return this.type==e&&a(this.attrs,t||e.defaultAttrs||w)&&l.sameSet(this.marks,r||l.none)}copy(e=null){return e==this.content?this:new C(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new C(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,r=!1){if(e==t)return u.empty;let n=this.resolve(e),i=this.resolve(t),o=r?0:n.sharedDepth(t),s=n.start(o);return new u(n.node(o).content.cut(n.pos-s,i.pos-s),n.depth-o,i.depth-o)}replace(e,t,r){var n=this.resolve(e),o=this.resolve(t);if(r.openStart>n.depth)throw new c("Inserted content deeper than insertion position");if(n.depth-r.openStart!=o.depth-r.openEnd)throw new c("Inconsistent open depths");return function e(t,r,n,o){let s=t.index(o),a=t.node(o);if(s==r.index(o)&&o<t.depth-n.openStart){let i=e(t,r,n,o+1);return a.copy(a.content.replaceChild(s,i))}if(!n.content.size)return m(a,g(t,r,o));if(n.openStart||n.openEnd||t.depth!=o||r.depth!=o){let{start:e,end:s}=function(e,t){let r=t.depth-e.openStart,n=t.node(r).copy(e.content);for(let e=r-1;e>=0;e--)n=t.node(e).copy(i.from(n));return{start:n.resolveNoCache(e.openStart+r),end:n.resolveNoCache(n.content.size-e.openEnd-r)}}(n,t);return m(a,function e(t,r,n,o,s){let a=t.depth>s&&h(t,r,s+1),l=o.depth>s&&h(n,o,s+1),c=[];return f(null,t,s,c),a&&l&&r.index(s)==n.index(s)?(d(a,l),p(m(a,e(t,r,n,o,s+1)),c)):(a&&p(m(a,g(t,r,s+1)),c),f(r,n,s,c),l&&p(m(l,g(n,o,s+1)),c)),f(o,null,s,c),new i(c)}(t,e,s,r,o))}{let e=t.parent,i=e.content;return m(e,i.cut(0,t.parentOffset).append(n.content).append(i.cut(r.parentOffset)))}}(n,o,r,0)}nodeAt(e){for(let t=this;;){let{index:r,offset:n}=t.content.findIndex(e);if(!(t=t.maybeChild(r)))return null;if(n==e||t.isText)return t;e-=n+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let n=this.content.child(t-1);return{node:n,index:t-1,offset:r-n.nodeSize}}resolve(e){return y.resolveCached(this,e)}resolveNoCache(e){return y.resolve(this,e)}rangeHasMark(e,t,r){let n=!1;return t>e&&this.nodesBetween(e,t,e=>(r.isInSet(e.marks)&&(n=!0),!n)),n}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()+")"),E(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,r=i.empty,n=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,n,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=n;e<o;e++)if(!this.type.allowsMarks(r.child(e).marks))return!1;return!0}canReplaceWith(e,t,r,n){if(n&&!this.type.allowsMarks(n))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return!!o&&o.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=l.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!l.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 r;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");r=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,r)}let n=i.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,n,r);return o.type.checkAttrs(o.attrs),o}}C.prototype.text=void 0;class S extends C{constructor(e,t,r,n){if(super(e,t,null,n),!r)throw RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(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 S(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new S(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 E(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class _{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var r;let n,i=new A(e,t);if(null==i.next)return _.empty;let o=function e(t){let r=[];do r.push(function(t){let r=[];do r.push(function(t){let r=function(t){if(t.eat("(")){let r=e(t);return t.eat(")")||t.err("Missing closing paren"),r}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let i=[];for(let e in r){let n=r[e];n.isInGroup(t)&&i.push(n)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))r={type:"plus",expr:r};else if(t.eat("*"))r={type:"star",expr:r};else if(t.eat("?"))r={type:"opt",expr:r};else if(t.eat("{"))r=function(e,t){let r=N(e),n=r;return e.eat(",")&&(n="}"!=e.next?N(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}(t,r);else break;return r}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==r.length?r[0]:{type:"seq",exprs:r}}(t));while(t.eat("|"));return 1==r.length?r[0]:{type:"choice",exprs:r}}(i);i.next&&i.err("Unexpected trailing text");let s=(r=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,r)=>t.concat(e(r,o)),[]);if("seq"==t.type)for(let n=0;;n++){let s=e(t.exprs[n],o);if(n==t.exprs.length-1)return s;i(s,o=r())}else if("star"==t.type){let s=r();return n(o,s),i(e(t.expr,s),s),[n(s)]}else if("plus"==t.type){let s=r();return i(e(t.expr,o),s),i(e(t.expr,s),s),[n(s)]}else if("opt"==t.type)return[n(o)].concat(e(t.expr,o));else if("range"==t.type){let s=o;for(let n=0;n<t.min;n++){let n=r();i(e(t.expr,s),n),s=n}if(-1==t.max)i(e(t.expr,s),s);else for(let o=t.min;o<t.max;o++){let o=r();n(s,o),i(e(t.expr,s),o),s=o}return[n(s)]}else if("name"==t.type)return[n(o,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),r()),t;function r(){return t.push([])-1}function n(e,r,n){let i={term:n,to:r};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}}(o),n=Object.create(null),function e(t){let i=[];t.forEach(e=>{r[e].forEach(({term:e,to:t})=>{let n;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(n=i[t][1]);T(r,t).forEach(t=>{n||i.push([e,n=[]]),-1==n.indexOf(t)&&n.push(t)})}})});let o=n[t.join(",")]=new _(t.indexOf(r.length-1)>-1);for(let t=0;t<i.length;t++){let r=i[t][1].sort(M);o.next.push({type:i[t][0],next:n[r.join(",")]||e(r)})}return o}(T(r,0)));return function(e,t){for(let r=0,n=[e];r<n.length;r++){let e=n[r],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:r,next:s}=e.next[t];o.push(r.name),i&&!(r.isText||r.hasRequiredAttrs())&&(i=!1),-1==n.indexOf(s)&&n.push(s)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,i),s}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,r=e.childCount){let n=this;for(let i=t;n&&i<r;i++)n=n.matchType(e.child(i).type);return n}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 r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let n=[this];return function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return i.from(a.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:r}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==n.indexOf(r)){n.push(r);let e=o(r,a.concat(t));if(e)return e}}return null}(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),r=[{match:this,type:null,via:null}];for(;r.length;){let n=r.shift(),i=n.match;if(i.matchType(e)){let e=[];for(let t=n;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:s}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||n.type&&!s.validEnd||(r.push({match:o.contentMatch,type:o,via:n}),t[o.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=[];return!function t(r){e.push(r);for(let n=0;n<r.next.length;n++)-1==e.indexOf(r.next[n].next)&&t(r.next[n].next)}(this),e.map((t,r)=>{let n=r+(t.validEnd?"*":" ")+" ";for(let r=0;r<t.next.length;r++)n+=(r?", ":"")+t.next[r].type.name+"->"+e.indexOf(t.next[r].next);return n}).join("\n")}}_.empty=new _(!0);class A{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 N(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function M(e,t){return t-e}function T(e,t){let r=[];return function t(n){let i=e[n];if(1==i.length&&!i[0].term)return t(i[0].to);r.push(n);for(let e=0;e<i.length;e++){let{term:n,to:o}=i[e];n||-1!=r.indexOf(o)||t(o)}}(t),r.sort(M)}function L(e){let t=Object.create(null);for(let r in e){let n=e[r];if(!n.hasDefault)return null;t[r]=n.default}return t}function I(e,t){let r=Object.create(null);for(let n in e){let i=t&&t[n];if(void 0===i){let t=e[n];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+n)}r[n]=i}return r}function j(e,t,r,n){for(let n in t)if(!(n in e))throw RangeError(`Unsupported attribute ${n} for ${r} of type ${n}`);for(let r in e){let n=e[r];n.validate&&n.validate(t[r])}}function R(e,t){let r=Object.create(null);if(t)for(let n in t)r[n]=new P(e,n,t[n]);return r}class O{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=R(e,r.attrs),this.defaultAttrs=L(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_.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:I(this.attrs,e)}create(e=null,t,r){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new C(this,this.computeAttrs(e),i.from(t),l.setFrom(r))}createChecked(e=null,t,r){return t=i.from(t),this.checkContent(t),new C(this,this.computeAttrs(e),t,l.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),(t=i.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let n=this.contentMatch.matchFragment(t),o=n&&n.fillBefore(i.empty,!0);return o?new C(this,e,t.append(o),l.setFrom(r)):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){j(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 r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:l.none:e}static compile(e,t){let r=Object.create(null);e.forEach((e,n)=>r[e]=new O(e,t,n));let n=t.spec.topNode||"doc";if(!r[n])throw RangeError("Schema is missing its top node type ('"+n+"')");if(!r.text)throw RangeError("Every schema needs a 'text' type");for(let e in r.text.attrs)throw RangeError("The text node type should not have attributes");return r}}class P{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate="string"==typeof r.validate?function(e,t,r){let n=r.split("|");return r=>{let i=null===r?"null":typeof r;if(0>n.indexOf(i))throw RangeError(`Expected value of type ${n} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ${constructor(e,t,r,n){this.name=e,this.rank=t,this.schema=r,this.spec=n,this.attrs=R(e,n.attrs),this.excluded=null;let i=L(this.attrs);this.instance=i?new l(this,i):null}create(e=null){return!e&&this.instance?this.instance:new l(this,I(this.attrs,e))}static compile(e,t){let r=Object.create(null),n=0;return e.forEach((e,i)=>r[e]=new $(e,n++,t,i)),r}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){j(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class z{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=n.from(e.nodes),t.marks=n.from(e.marks||{}),this.nodes=O.compile(this.spec.nodes,this),this.marks=$.compile(this.spec.marks,this);let r=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],n=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=r[n]||(r[n]=_.parse(n,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?D(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],r=t.spec.excludes;t.excluded=null==r?[t]:""==r?[]:D(this,r.split(" "))}this.nodeFromJSON=e=>C.fromJSON(this,e),this.markFromJSON=e=>l.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,n){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof O){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,r,n)}text(e,t){let r=this.nodes.text;return new S(r,r.defaultAttrs,e,l.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 D(e,t){let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e.marks[i],s=o;if(o)r.push(o);else for(let t in e.marks){let n=e.marks[t];("_"==i||n.spec.group&&n.spec.group.split(" ").indexOf(i)>-1)&&r.push(s=n)}if(!s)throw SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}class B{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>r.indexOf(t)&&r.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let r=e.nodes[t.node];return r.contentMatch.matchType(r)})}parse(e,t={}){let r=new W(this,t,!1);return r.addAll(e,l.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new W(this,t,!0);return r.addAll(e,l.none,t.from,t.to),u.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){var n,i;let r=this.tags[o];if(n=e,i=r.tag,(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,i)&&(void 0===r.namespace||e.namespaceURI==r.namespace)&&(!r.context||t.matchesContext(r.context))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}matchStyle(e,t,r,n){for(let i=n?this.styles.indexOf(n)+1:0;i<this.styles.length;i++){let n=this.styles[i],o=n.style;if(0==o.indexOf(e)&&(!n.context||r.matchesContext(n.context))&&(!(o.length>e.length)||61==o.charCodeAt(e.length)&&o.slice(e.length+1)==t)){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}static schemaRules(e){let t=[];function r(e){let r=null==e.priority?50:e.priority,n=0;for(;n<t.length;n++){let e=t[n];if((null==e.priority?50:e.priority)<r)break}t.splice(n,0,e)}for(let t in e.marks){let n=e.marks[t].spec.parseDOM;n&&n.forEach(e=>{r(e=V(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let n=e.nodes[t].spec.parseDOM;n&&n.forEach(e=>{r(e=V(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new B(e,B.schemaRules(e)))}}let F={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},H={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},U={ol:!0,ul:!0};function G(e,t,r){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&r}class q{constructor(e,t,r,n,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=n,this.options=o,this.content=[],this.activeMarks=l.none,this.match=i||(4&o?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(i.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,r;return(r=t.findWrapping(e.type))?(this.match=t,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=i.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(i.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&&!F.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class W{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let n=t.topNode,i,o=G(null,t.preserveWhitespace,0)|4*!!r;i=n?new q(n.type,n.attrs,l.none,!0,t.topMatch||n.type.contentMatch,o):r?new q(null,null,l.none,!0,null,o):new q(e.schema.topNodeType,null,l.none,!0,null,o),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 r=e.nodeValue,n=this.top,i=2&n.options?"full":this.localPreserveWS||(1&n.options)>0,{schema:o}=this.parser;if("full"===i||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if("full"===i)r=r.replace(/\r\n?/g,"\n");else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let e=r.split(/\r?\n|\r/);for(let r=0;r<e.length;r++)r&&this.insertNode(o.linebreakReplacement.create(),t,!0),e[r]&&this.insertNode(o.text(e[r]),t,!/\S/.test(e[r]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let t=n.content[n.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let n=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;U.hasOwnProperty(o)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&U.hasOwnProperty(e)&&r?(r.appendChild(t),t=r):"li"==e?r=t:e&&(r=null)}}(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));r:if(a?a.ignore:H.hasOwnProperty(o))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 r,n=this.needsBlock;if(F.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),r=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break r}let s=a&&a.skip?t:this.readStyles(e,t);s&&this.addAll(e,s),r&&this.sync(i),this.needsBlock=n}else{let r=this.readStyles(e,t);r&&this.addElementByRule(e,a,r,!1===a.consuming?s:void 0)}this.localPreserveWS=n}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 r=e.style;if(r&&r.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let n=this.parser.matchedStyles[e],i=r.getPropertyValue(n);if(i)for(let e;;){let r=this.parser.matchStyle(n,i,this,e);if(!r)break;if(r.ignore)return null;if(t=r.clearMark?t.filter(e=>!r.clearMark(e)):t.concat(this.parser.schema.marks[r.mark].create(r.attrs)),!1===r.consuming)e=r;else break}}return t}addElementByRule(e,t,r,n){let i,o;if(t.node)if((o=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(o.create(t.attrs),r,"BR"==e.nodeName)||this.leafFallback(e,r);else{let e=this.enter(o,t.attrs||null,r,t.preserveWhitespace);e&&(i=!0,r=e)}else{let e=this.parser.schema.marks[t.mark];r=r.concat(e.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,r,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,r,!1));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n,r),this.findAround(e,n,!1)}i&&this.sync(s)&&this.open--}addAll(e,t,r,n){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,s=null==n?null:e.childNodes[n];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let n,i;for(let t=this.open,o=0;t>=0;t--){let s=this.nodes[t],a=s.findWrapping(e);if(a&&(!n||n.length>a.length+o)&&(n=a,i=s,!a.length))break;if(s.solid){if(r)break;o+=2}}if(!n)return null;this.sync(i);for(let e=0;e<n.length;e++)t=this.enterInner(n[e],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let n=this.findPlace(e,t,r);if(n){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let r=l.none;for(let i of n.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):K(i.type,e.type))&&(r=i.addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r,n){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,n)),i}enterInner(e,t,r,n=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=G(e,i,o.options);4&o.options&&0==o.content.length&&(s|=4);let a=l.none;return r=r.filter(t=>(o.type?!o.type.allowsMarkType(t.type):!K(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new q(e,t,a,n,null,s)),this.open++,r}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|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let t=r.length-1;t>=0;t--)e+=r[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].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,r){if(e!=t&&this.find)for(let n=0;n<this.find.length;n++)null==this.find[n].pos&&1==e.nodeType&&e.contains(this.find[n].node)&&t.compareDocumentPosition(this.find[n].node)&(r?2:4)&&(this.find[n].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("/"),r=this.options.context,n=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+ +!n,o=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=i;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&n?this.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!e||e.name!=a&&!e.isInGroup(a))return!1;s--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function V(e){let t={};for(let r in e)t[r]=e[r];return t}function K(e,t){let r=t.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let r=0;r<e.edgeCount;r++){let{type:n,next:i}=e.edge(r);if(n==t||0>o.indexOf(i)&&s(i))return!0}};if(s(i.contentMatch))return!0}}class J{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=X(t).createDocumentFragment());let n=r,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let r=0,o=0;for(;r<i.length&&o<e.marks.length;){let t=e.marks[o];if(!this.marks[t.type.name]){o++;continue}if(!t.eq(i[r][0])||!1===t.type.spec.spanning)break;r++,o++}for(;r<i.length;)n=i.pop()[1];for(;o<e.marks.length;){let r=e.marks[o++],s=this.serializeMark(r,e.isInline,t);s&&(i.push([r,n]),n.appendChild(s.dom),n=s.contentDOM||s.dom)}}n.appendChild(this.serializeNodeInner(e,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:n}=Y(X(t),this.nodes[e.type.name](e),null,e.attrs);if(n){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,n)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let n=e.marks.length-1;n>=0;n--){let i=this.serializeMark(e.marks[n],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let n=this.marks[e.type.name];return n&&Y(X(r),n(e,t),null,e.attrs)}static renderSpec(e,t,r=null,n){return Y(e,t,r,n)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new J(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Z(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Z(e.marks)}}function Z(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function X(e){return e.document||window.document}let Q=new WeakMap;function Y(e,t,r,n){let i,o,s;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 a=t[0],l;if("string"!=typeof a)throw RangeError("Invalid array passed to renderSpec");if(n&&(void 0===(o=Q.get(n))&&Q.set(n,(s=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])s||(s=[]),s.push(t);else for(let r=0;r<t.length;r++)e(t[r]);else for(let r in t)e(t[r])}(n),o=s)),l=o)&&l.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 c=a.indexOf(" ");c>0&&(r=a.slice(0,c),a=a.slice(c+1));let u=r?e.createElementNS(r,a):e.createElement(a),d=t[1],h=1;if(d&&"object"==typeof d&&null==d.nodeType&&!Array.isArray(d)){for(let e in h=2,d)if(null!=d[e]){let t=e.indexOf(" ");t>0?u.setAttributeNS(e.slice(0,t),e.slice(t+1),d[e]):"style"==e&&u.style?u.style.cssText=d[e]:u.setAttribute(e,d[e])}}for(let o=h;o<t.length;o++){let s=t[o];if(0===s){if(o<t.length-1||o>h)throw RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}{let{dom:t,contentDOM:o}=Y(e,s,r,n);if(u.appendChild(t),o){if(i)throw RangeError("Multiple content holes");i=o}}}return{dom:u,contentDOM:i}}},65310:(e,t,r)=>{var n=r(39942);e.exports=r(93733)(function(e,t,r){n(e,t,r)})},65409:(e,t,r)=>{var n=r(11254);e.exports=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},65604:(e,t,r)=>{var n=r(20243),i=r(88046);e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},66158:(e,t,r)=>{"use strict";var n=r(11581),i=r(84756),o=r(48095),s=r(31769),a=r(32724).normalizeRanks,l=r(93598),c=r(32724).removeEmptyRanks,u=r(99671),d=r(31585),h=r(56392),p=r(25555),f=r(94104),m=r(32724),g=r(143).Graph;e.exports=function(e,t){var r=t&&t.debugTiming?m.time:m.notime;r("layout",function(){var t=r(" buildLayoutGraph",function(){var t,r,i;return t=e,r=new g({multigraph:!0,compound:!0}),i=_(t.graph()),r.setGraph(n.merge({},b,E(i,y),n.pick(i,v))),n.forEach(t.nodes(),function(e){var i=_(t.node(e));r.setNode(e,n.defaults(E(i,k),x)),r.setParent(e,t.parent(e))}),n.forEach(t.edges(),function(e){var i=_(t.edge(e));r.setEdge(e,n.merge({},C,E(i,w),n.pick(i,S)))}),r});r(" runLayout",function(){var e,g;e=t,(g=r)(" makeSpaceForEdgeLabels",function(){var t,r;r=(t=e).graph(),r.ranksep/=2,n.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}),g(" removeSelfEdges",function(){var t;t=e,n.forEach(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),g(" acyclic",function(){i.run(e)}),g(" nestingGraph.run",function(){u.run(e)}),g(" rank",function(){s(m.asNonCompoundGraph(e))}),g(" injectEdgeLabelProxies",function(){var t;t=e,n.forEach(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e:e};m.addDummyNode(t,"edge-proxy",i,"_ep")}})}),g(" removeEmptyRanks",function(){c(e)}),g(" nestingGraph.cleanup",function(){u.cleanup(e)}),g(" normalizeRanks",function(){a(e)}),g(" assignRankMinMax",function(){var t,r;t=e,r=0,n.forEach(t.nodes(),function(e){var i=t.node(e);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,r=n.max(r,i.maxRank))}),t.graph().maxRank=r}),g(" removeEdgeLabelProxies",function(){var t;t=e,n.forEach(t.nodes(),function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),g(" normalize.run",function(){o.run(e)}),g(" parentDummyChains",function(){l(e)}),g(" addBorderSegments",function(){d(e)}),g(" order",function(){p(e)}),g(" insertSelfEdges",function(){var t,r;t=e,r=m.buildLayerMatrix(t),n.forEach(r,function(e){var r=0;n.forEach(e,function(e,i){var o=t.node(e);o.order=i+r,n.forEach(o.selfEdges,function(e){m.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}),g(" adjustCoordinateSystem",function(){h.adjust(e)}),g(" position",function(){f(e)}),g(" positionSelfEdges",function(){var t;t=e,n.forEach(t.nodes(),function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,o=n.y,s=r.x-i,a=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{x:i+s,y:o},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],r.label.x=r.x,r.label.y=r.y}})}),g(" removeBorderNodes",function(){var t;t=e,n.forEach(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),i=t.node(r.borderTop),o=t.node(r.borderBottom),s=t.node(n.last(r.borderLeft)),a=t.node(n.last(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(o.y-i.y),r.x=s.x+r.width/2,r.y=i.y+r.height/2}}),n.forEach(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}),g(" normalize.undo",function(){o.undo(e)}),g(" fixupEdgeLabelCoords",function(){var t;t=e,n.forEach(t.edges(),function(e){var r=t.edge(e);if(n.has(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),g(" undoCoordinateSystem",function(){h.undo(e)}),g(" translateGraph",function(){!function(e){var t=1/0,r=0,i=1/0,o=0,s=e.graph(),a=s.marginx||0,l=s.marginy||0;function c(e){var n=e.x,s=e.y,a=e.width,l=e.height;t=Math.min(t,n-a/2),r=Math.max(r,n+a/2),i=Math.min(i,s-l/2),o=Math.max(o,s+l/2)}n.forEach(e.nodes(),function(t){c(e.node(t))}),n.forEach(e.edges(),function(t){var r=e.edge(t);n.has(r,"x")&&c(r)}),t-=a,i-=l,n.forEach(e.nodes(),function(r){var n=e.node(r);n.x-=t,n.y-=i}),n.forEach(e.edges(),function(r){var o=e.edge(r);n.forEach(o.points,function(e){e.x-=t,e.y-=i}),n.has(o,"x")&&(o.x-=t),n.has(o,"y")&&(o.y-=i)}),s.width=r-t+a,s.height=o-i+l}(e)}),g(" assignNodeIntersects",function(){var t;t=e,n.forEach(t.edges(),function(e){var r,n,i=t.edge(e),o=t.node(e.v),s=t.node(e.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=s,n=o),i.points.unshift(m.intersectRect(o,r)),i.points.push(m.intersectRect(s,n))})}),g(" reversePoints",function(){var t;t=e,n.forEach(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}),g(" acyclic.undo",function(){i.undo(e)})}),r(" updateInputGraph",function(){var r,i;r=e,i=t,n.forEach(r.nodes(),function(e){var t=r.node(e),n=i.node(e);t&&(t.x=n.x,t.y=n.y,i.children(e).length&&(t.width=n.width,t.height=n.height))}),n.forEach(r.edges(),function(e){var t=r.edge(e),o=i.edge(e);t.points=o.points,n.has(o,"x")&&(t.x=o.x,t.y=o.y)}),r.graph().width=i.graph().width,r.graph().height=i.graph().height})})};var y=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},v=["acyclicer","ranker","rankdir","align"],k=["width","height"],x={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},S=["labelpos"];function E(e,t){return n.mapValues(n.pick(e,t),Number)}function _(e){var t={};return n.forEach(e,function(e,r){t[r.toLowerCase()]=e}),t}},66613:(e,t,r)=>{var n=r(8665);e.exports=function(e){return n(this,e).get(e)}},67007:(e,t,r)=>{e.exports=r(14532)},67070:(e,t,r)=>{var n=r(77651),i=r(24837);e.exports=function(e,t){t=n(t,e);for(var r=0,o=t.length;null!=e&&r<o;)e=e[i(t[r++])];return r&&r==o?e:void 0}},67819:(e,t,r)=>{var n=r(43188),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,s,a){var l=1&r,c=n(e),u=c.length;if(u!=n(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:i.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++d<u;){var y=e[h=c[d]],b=t[h];if(o)var v=l?o(b,y,h,t,e,a):o(y,b,h,e,t,a);if(!(void 0===v?y===b||s(y,b,r,o,a):v)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var k=e.constructor,x=t.constructor;k!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof k&&k instanceof k&&"function"==typeof x&&x instanceof x)&&(m=!1)}return a.delete(e),a.delete(t),m}},68105:(e,t,r)=>{var n=r(12814);e.exports=function(e,t,r){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(void 0===l?a==a&&!n(a):r(a,l)))var l=a,c=s}return c}},68584:(e,t,r)=>{var n=r(88463),i=r(56222);e.exports={write:function(e){var t,r,i={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e,n.map(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),o={v:e};return n.isUndefined(r)||(o.value=r),n.isUndefined(i)||(o.parent=i),o})),edges:(r=e,n.map(r.edges(),function(e){var t=r.edge(e),i={v:e.v,w:e.w};return n.isUndefined(e.name)||(i.name=e.name),n.isUndefined(t)||(i.value=t),i}))};return n.isUndefined(e.graph())||(i.value=n.clone(e.graph())),i},read:function(e){var t=new i(e.options).setGraph(e.value);return n.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),n.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},68591:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},69048:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},69239:(e,t,r)=>{var n=r(96348),i=r(69048);e.exports=function(e,t,r){(void 0===r||i(e[t],r))&&(void 0!==r||t in e)||n(e,t,r)}},70345:(e,t,r)=>{var n=r(30727);e.exports=function(e){return n(this.__data__,e)>-1}},70501:e=>{e.exports=function(e,t){return e>t}},71097:(e,t,r)=>{"use strict";var n=r(11581);e.exports=function(e,t){var r={};return n.forEach(e,function(e,t){var i=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};n.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),n.forEach(t.edges(),function(e){var t=r[e.v],i=r[e.w];n.isUndefined(t)||n.isUndefined(i)||(i.indegree++,t.out.push(r[e.w]))}),function(e){for(var t=[];e.length;){var r=e.pop();t.push(r),n.forEach(r.in.reverse(),function(e){return function(t){!t.merged&&(n.isUndefined(t.barycenter)||n.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),n.forEach(r.out,function(t){return function(r){r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return n.map(n.filter(t,function(e){return!e.merged}),function(e){return n.pick(e,["vs","i","barycenter","weight"])})}(n.filter(r,function(e){return!e.indegree}))}},71559:(e,t,r)=>{e.exports=r(72615)("length")},71633:e=>{e.exports=function(e){return function(t,r,n){for(var i=-1,o=Object(t),s=n(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===r(o[l],l,o))break}return t}}},72043:(e,t,r)=>{var n=r(96348),i=r(69048),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&i(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},72615:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},72657:e=>{e.exports=function(e){return function(t){return e(t)}}},72821:(e,t,r)=>{var n=r(78591),i=r(17021),o=r(56513),s=r(77664),a=r(88981);e.exports=function(e,t,r){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,r);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},73838:e=>{e.exports=function(e){return void 0===e}},74166:(e,t,r)=>{var n=r(19916);e.exports=function(e,t){return n(e,t,"pre")}},74205:(e,t,r)=>{e.exports=r(32771)(Object.getPrototypeOf,Object)},74249:(e,t,r)=>{var n=r(88463);e.exports=function(e){var t,r={},i=[];return n.each(e.nodes(),function(o){t=[],function i(o){n.has(r,o)||(r[o]=!0,t.push(o),n.each(e.successors(o),i),n.each(e.predecessors(o),i))}(o),t.length&&i.push(t)}),i}},75197:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},75552:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},76111:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]])},76827:e=>{e.exports=function(e){return e!=e}},77078:(e,t,r)=>{var n=r(29974),i=r(65409),o=r(63120);e.exports=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o},77185:(e,t,r)=>{var n=r(19916);e.exports=function(e,t){return n(e,t,"post")}},77220:(e,t,r)=>{var n=r(10548),i=r(84039);e.exports=function e(t,r,o,s,a){var l=-1,c=t.length;for(o||(o=i),a||(a=[]);++l<c;){var u=t[l];r>0&&o(u)?r>1?e(u,r-1,o,s,a):n(a,u):s||(a[a.length]=u)}return a}},77512:(e,t,r)=>{var n=r(2598),i=0;e.exports=function(e){var t=++i;return n(e)+t}},77599:(e,t,r)=>{var n=r(59745),i=r(49717),o=r(95285);e.exports=function(e){return n(e,o,i)}},77651:(e,t,r)=>{var n=r(91347),i=r(36942),o=r(89176),s=r(2598);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(s(e))}},77664:(e,t,r)=>{var n=r(98175),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},78414:(e,t,r)=>{var n=r(59919),i=r(6164),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},78591:(e,t,r)=>{var n=r(55746);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},78815:(e,t,r)=>{var n=r(72615),i=r(53901),o=r(36942),s=r(24837);e.exports=function(e){return o(e)?n(s(e)):i(e)}},78928:(e,t,r)=>{"use strict";var n=r(11581),i=r(33405),o=r(33499).slack,s=r(33499).longestPath,a=r(143).alg.preorder,l=r(143).alg.postorder,c=r(32724).simplify;function u(e){s(e=c(e));var t,r,n=i(e);for(p(n),d(n,e);t=f(n);)r=m(n,e,t),g(n,e,t,r)}function d(e,t){var r=l(e,e.nodes());r=r.slice(0,r.length-1),n.forEach(r,function(r){var n,i,o,s;n=e,i=t,o=r,s=n.node(o).parent,n.edge(o,s).cutvalue=h(n,i,o)})}function h(e,t,r){var i=e.node(r).parent,o=!0,s=t.edge(r,i),a=0;return s||(o=!1,s=t.edge(i,r)),a=s.weight,n.forEach(t.nodeEdges(r),function(n){var s=n.v===r,l=s?n.w:n.v;if(l!==i){var c,u,d,h=s===o,p=t.edge(n).weight;if(a+=h?p:-p,c=e,u=r,d=l,c.hasEdge(u,d)){var f=e.edge(r,l).cutvalue;a+=h?-f:f}}}),a}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,i,o,s){var a=i,l=t.node(o);return r[o]=!0,n.forEach(t.neighbors(o),function(s){n.has(r,s)||(i=e(t,r,i,s,o))}),l.low=a,l.lim=i++,s?l.parent=s:delete l.parent,i}(e,{},1,t)}function f(e){return n.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function m(e,t,r){var i=r.v,s=r.w;t.hasEdge(i,s)||(i=r.w,s=r.v);var a=e.node(i),l=e.node(s),c=a,u=!1;a.lim>l.lim&&(c=l,u=!0);var d=n.filter(t.edges(),function(t){return u===y(e,e.node(t.v),c)&&u!==y(e,e.node(t.w),c)});return n.minBy(d,function(e){return o(t,e)})}function g(e,t,r,i){var o,s,l,c,u=r.v,h=r.w;e.removeEdge(u,h),e.setEdge(i.v,i.w,{}),p(e),d(e,t),o=e,s=t,l=n.find(o.nodes(),function(e){return!s.node(e).parent}),c=(c=a(o,l)).slice(1),n.forEach(c,function(e){var t=o.node(e).parent,r=s.edge(e,t),n=!1;r||(r=s.edge(t,e),n=!0),s.node(e).rank=s.node(t).rank+(n?r.minlen:-r.minlen)})}function y(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}e.exports=u,u.initLowLimValues=p,u.initCutValues=d,u.calcCutValue=h,u.leaveEdge=f,u.enterEdge=m,u.exchangeEdges=g},78968:(e,t,r)=>{var n=r(10338),i=r(96928),o=r(2627),s=r(91347);e.exports=function(e,t){return(s(e)?n:i)(e,o(t,3))}},80041:(e,t,r)=>{var n=r(84364),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},80791:e=>{e.exports=function(){return[]}},81543:(e,t,r)=>{var n=r(86366),i=r(91347),o=r(88046);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==n(e)}},81597:(e,t,r)=>{"use strict";r.d(t,{sG:()=>h});var n=r(1856),i=r.t(n,2);r(38129);var o=r(34124),s=r(90508),a=Symbol.for("react.lazy"),l=i[" use ".trim().toString()];function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var u=Symbol("radix.slottable");function d(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}var h=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=function(e){let t=function(e){let t=n.forwardRef((e,t)=>{let{children:r,...i}=e;if(c(r)&&"function"==typeof l&&(r=l(r._payload)),n.isValidElement(r)){var s;let e,a,l=(s=r,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),c=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(i,r.props);return r.type!==n.Fragment&&(c.ref=t?(0,o.t)(t,l):l),n.cloneElement(r,c)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=n.forwardRef((e,r)=>{let{children:i,...o}=e;c(i)&&"function"==typeof l&&(i=l(i._payload));let a=n.Children.toArray(i),u=a.find(d);if(u){let e=u.props.children,i=a.map(t=>t!==u?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...o,ref:r,children:n.isValidElement(e)?n.cloneElement(e,void 0,i):null})}return(0,s.jsx)(t,{...o,ref:r,children:i})});return r.displayName=`${e}.Slot`,r}(`Primitive.${t}`),i=n.forwardRef((e,n)=>{let{asChild:i,...o}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(i?r:t,{...o,ref:n})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{})},81895:(e,t,r)=>{e.exports=r(11254)(r(99083),"Map")},82517:(e,t,r)=>{var n=r(67070),i=r(54546),o=r(77651);e.exports=function(e,t,r){for(var s=-1,a=t.length,l={};++s<a;){var c=t[s],u=n(e,c);r(u,c)&&i(l,o(c,e),u)}return l}},82685:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},84039:(e,t,r)=>{var n=r(98175),i=r(96830),o=r(91347),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},84223:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},84364:(e,t,r)=>{e.exports=r(11254)(Object,"create")},84756:(e,t,r)=>{"use strict";var n=r(11581),i=r(20423);e.exports={run:function(e){var t,r,o,s,a,l="greedy"===e.graph().acyclicer?i(e,(t=e,function(e){return t.edge(e).weight})):(r=e,o=[],s={},a={},n.forEach(r.nodes(),function e(t){n.has(a,t)||(a[t]=!0,s[t]=!0,n.forEach(r.outEdges(t),function(t){n.has(s,t.w)?o.push(t):e(t.w)}),delete s[t])}),o);n.forEach(l,function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n.uniqueId("rev"))})},undo:function(e){n.forEach(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}},85068:(e,t,r)=>{var n=r(65273),i=r(37291),o=r(43240),s=r(67819),a=r(20243),l=r(91347),c=r(61288),u=r(52791),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,y){var b=l(e),v=l(t),k=b?h:a(e),x=v?h:a(t);k=k==d?p:k,x=x==d?p:x;var w=k==p,C=x==p,S=k==x;if(S&&c(e)){if(!c(t))return!1;b=!0,w=!1}if(S&&!w)return y||(y=new n),b||u(e)?i(e,t,r,m,g,y):o(e,t,k,r,m,g,y);if(!(1&r)){var E=w&&f.call(e,"__wrapped__"),_=C&&f.call(t,"__wrapped__");if(E||_){var A=E?e.value():e,N=_?t.value():t;return y||(y=new n),g(A,N,r,m,y)}}return!!S&&(y||(y=new n),s(e,t,r,m,g,y))}},85655:(e,t,r)=>{var n=r(77220),i=r(91267),o=r(30004),s=r(34370);e.exports=o(function(e,t){if(null==e)return[];var r=t.length;return r>1&&s(e,t[0],t[1])?t=[]:r>2&&s(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])})},85783:(e,t,r)=>{"use strict";r.d(t,{A:()=>rl});var n=r(17749),i=(e,t)=>{if("slot"===e)return 0;if(e instanceof Function)return e(t);let{children:r,...n}=null!=t?t:{};if("svg"===e)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,n,r]},o=/^\s*>\s$/,s=n.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return i("blockquote",{...(0,n.KV)(this.options.HTMLAttributes,e),children:i("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let r=[];return e.content.forEach(e=>{let n=t.renderChildren([e]).split("\n").map(e=>""===e.trim()?">":`> ${e}`);r.push(n.join("\n"))}),r.join(`
|
|
138
|
+
XID_Start XIDS`.split(/\s/).map(e=>[rD(e),e])),nd=new Map([["s",r7(383)],[r7(383),"s"]]),nh=new Map([[r7(223),r7(7838)],[r7(107),r7(8490)],[r7(229),r7(8491)],[r7(969),r7(8486)]]),np=new Map([nm(453),nm(456),nm(459),nm(498),...ng(8072,8079),...ng(8088,8095),...ng(8104,8111),nm(8124),nm(8140),nm(8188)]),nf=new Map([["alnum",ne`[\p{Alpha}\p{Nd}]`],["alpha",ne`\p{Alpha}`],["ascii",ne`\p{ASCII}`],["blank",ne`[\p{Zs}\t]`],["cntrl",ne`\p{Cc}`],["digit",ne`\p{Nd}`],["graph",ne`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ne`\p{Lower}`],["print",ne`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ne`[\p{P}\p{S}]`],["space",ne`\p{space}`],["upper",ne`\p{Upper}`],["word",ne`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ne`\p{AHex}`]]);function nm(e){let t=r7(e);return[t.toLowerCase(),t]}function ng(e,t){return(function(e,t){let r=[];for(let n=e;n<=t;n++)r.push(n);return r})(e,t).map(e=>nm(e))}var ny=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),nb={AbsenceFunction({node:e,parent:t,replaceWith:r}){let{body:n,kind:i}=e;if("repeater"===i){let e=rT();e.body[0].body.push(rL({negate:!0,body:n}),rR("Any"));let i=rT();i.body[0].body.push(rI("greedy",0,1/0,e)),r(nT(i,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:n}){let i=e.body.filter(e=>"flags"===e.kind);for(let e=r+1;e<t.body.length;e++)nn(n,t.body[e],[]).push(...i)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let r=nS(t.get(e));if(r){let t=rT({flags:r});t.body[0].body=e.body,e.body=[nT(t,e)]}}}},Assertion({node:e,parent:t,key:r,container:n,root:i,remove:o,replaceWith:s},a){let{kind:l,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:h,wordIsAscii:p}=a;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if("line_end"===l)s(nT(rL({body:[rC({body:[rS("string_end")]}),rC({body:[rA(10)]})]}),t));else if("line_start"===l)s(nT(nA(ne`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(h.has(e))i.flags.sticky=!0,o();else{let e=n[r-1];if(e&&function(e){let t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||"Quantifier"===e.type&&e.min&&t.includes(e.body.type)}(e))s(nT(rL({negate:!0}),t));else if(d)throw Error(ne`Uses "\G" in a way that requires a subclass`);else s(nM(rS("string_start"),t)),a.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)s(nT(nA(ne`(?=\n?\z)`),t));else if("word_boundary"===l){if(!p&&!u){let e=`(?:(?<=${nl})(?!${nl})|(?<!${nl})(?=${nl}))`,r=`(?:(?<=${nl})(?=${nl})|(?<!${nl})(?!${nl}))`;s(nT(nA(c?r:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||n_(r)||(e.ref=r=nC(r,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:n}=e;n&&!n_(n)&&(e.name=n=nC(n,t)),r.set(e.number,e),n&&r.set(n,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){"intersection"===t.kind&&r(nT(rN({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:n,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:s,wordIsAscii:a}){let{kind:l,negate:c,value:u}=e;if(o&&("digit"===l||"digit"===u))return void r(nM(rM("digit",{negate:c}),t));if(s&&("space"===l||"space"===u))return void r(nT(nN(nA("[ -\r ]"),c),t));if(a&&("word"===l||"word"===u))return void r(nM(rM("word",{negate:c}),t));if("any"===l)r(nM(rR("Any"),t));else if("digit"===l)r(nM(rR("Nd",{negate:c}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===n)throw Error(ne`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",o=ne`\p{RI}{2}|${e}(?:\u200D${e})*`;r(nT(nA(ne`(?>\r\n|${i?ne`\p{RGI_Emoji}`:o}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)r(nM(rR("AHex",{negate:c}),t));else if("newline"===l)r(nT(nA(c?"[^\n]":"(?>\r\n?|[\n\v\f\x85\u2028\u2029])"),t));else if("posix"===l)if(i||"graph"!==u&&"print"!==u)r(nT(nN(nA(nf.get(u)),c),t));else{if("strict"===n)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[u];c&&(e=`\0-${r7(e.codePointAt(0)-1)}${r7(e.codePointAt(2)+1)}-\u{10FFFF}`),r(nT(nA(`[${e}]`),t))}else if("property"===l)nu.has(rD(u))||(e.key="sc");else if("space"===l)r(nM(rR("space",{negate:c}),t));else if("word"===l)r(nT(nN(nA(nl),c),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:r,remove:n,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:s}){let{kind:a,flags:l}=e;if("flags"===a)if(l.enable||l.disable){let e=rT({flags:l});e.body[0].body=s(),i(nT(e,t),{traverse:!0})}else n();else if("keep"===a){let e=r.body[0],n=1===r.body.length&&rk(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:r;if(t.parent!==n||n.body.length>1)throw Error(ne`Uses "\K" in a way that's unsupported`);let s=rL({behind:!0});s.body[0].body=o(),i(nT(s,t))}else throw Error(`Unexpected directive kind "${a}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:r}=e;"lookbehind"===r&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){let{kind:n}=e;if("fail"===n)r(nT(rL({negate:!0}),t));else throw Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=rT();t.body[0].body.push(e.body),e.body=nT(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let r=[],n=!1,i=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let r=t.find(e=>"search_start"===e.kind||function(e,t){let r={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===r.negate||e.negate===r.negate)&&1===e.body.length&&rk(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!r)return null;if("search_start"===r.kind)return r;if("LookaroundAssertion"===r.type)return r.body[0].body[0];if("CapturingGroup"===r.type||"Group"===r.type){let t=[];for(let n of r.body){let r=e(n.body);if(!r)return null;Array.isArray(r)?t.push(...r):t.push(r)}return t}return null}(t.body);e?(n=!0,Array.isArray(e)?r.push(...e):r.push(e)):i=!0}n&&!i&&r.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:r,strategy:n}){if("strict"===t&&r&&n)throw Error(ne`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||n_(r)||(e.ref=r=nC(r,t))}},nv={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){let{orphan:n,ref:i}=e;n||r.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:n},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:s,openRefs:a,reffedNodesByReferencer:l}){let c=i.get(e);if(c&&a.has(e.number)){let n=nM(nw(e.number),t);l.set(n,a.get(e.number)),r(n);return}a.set(e.number,e),s.set(e.number,[]),e.name&&nn(s,e.name,[]);let u=s.get(e.name??e.number);for(let t=0;t<u.length;t++){let r=u[t];if(c===r.node||c&&c===r.origin||e===r.origin){u.splice(t,1);break}}if(s.get(e.number).push({node:e,origin:c}),e.name&&s.get(e.name).push({node:e,origin:c}),e.name){let t=nn(o,e.name,new Map),r=!1;if(c)r=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){r=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:r})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=nr(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},n){let{isRecursive:i,ref:o}=e;if(i){let r=t;for(;(r=r.parent)&&("CapturingGroup"!==r.type||r.name!==o&&r.number!==o););n.reffedNodesByReferencer.set(e,r);return}let s=n.subroutineRefMap.get(o),a=0===o,l=a?nw(0):function e(t,r,n,i){let o=Array.isArray(t)?[]:{};for(let[s,a]of Object.entries(t))"parent"===s?o.parent=Array.isArray(n)?i:n:a&&"object"==typeof a?o[s]=e(a,r,o,n):("type"===s&&"CapturingGroup"===a&&r.set(o,r.get(t)??t),o[s]=a);return o}(s,n.groupOriginByCopy,null),c=l;if(!a){var u,d;let e=nS(function(e,t){let r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}(s,e=>"Group"===e.type&&!!e.flags)),t=e?nr(n.globalFlags,e):n.globalFlags;u=t,d=n.currentFlags,(u.dotAll!==d.dotAll||u.ignoreCase!==d.ignoreCase)&&(c=rT({flags:function({dotAll:e,ignoreCase:t}){let r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),e&&t||(r.disable={},e||(r.disable.dotAll=!0),t||(r.disable.ignoreCase=!0)),r}(t)})).body[0].body.push(l)}r(nT(c,t),{traverse:!a})}},nk={Backreference({node:e,parent:t,replaceWith:r},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}let i=n.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let r=t;do{if("Regex"===r.type)return!1;if("Alternative"===r.type)continue;if(r===e)return!1;for(let t of nE(r.parent)){if(t===r)break;if(t===e||function e(t,r){for(let n of nE(t)??[])if(n===r||e(n,r))return!0;return!1}(t,e))return!0}}while(r=r.parent);throw Error("Unexpected path")})(t,e));i.length?i.length>1?r(nT(rT({atomic:!0,body:i.reverse().map(e=>rC({body:[rE(e.number)]}))}),t)):e.ref=i[0].number:r(nT(rL({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<r;t++){let t=r_();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function nx(e){rH(e,{"*"({node:e,parent:t}){e.parent=t}})}function nw(e){let t=rj(e);return t.isRecursive=!0,t}function nC(e,t){if(t.has(e))return t.get(e);let r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function nS(e){let t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete r.disable[t],r.enable[t]=!0),e.disable?.[t]&&(r.disable[t]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable)?r:null}function nE(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function n_(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function nA(e,t){let r=rw(e,{...t,unicodePropertyMap:nu}).body;return r.length>1||r[0].body.length>1?rT({body:r}):r[0].body[0]}function nN(e,t){return e.negate=t,e}function nM(e,t){return e.parent=t,e}function nT(e,t){return nx(e),e.parent=t,e}var nL={"*":{enter({node:e},t){if(nF(e)){let r=t.getCurrentModI();t.pushModI(e.flags?nr({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){nF(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){nz(r7(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),nD(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&ny.has(e.value)&&t.setHasCasedChar()}},nI={Alternative:({body:e},t,r)=>e.map(r).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?ne`\B`:ne`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){let{body:n,name:i,number:o}=e,s={ignoreCase:t.currentFlags.ignoreCase},a=t.originMap.get(e);return a&&(s.hidden=!0,o>a.number&&(s.transferTo=a.number)),t.captureMap.set(o,s),`(${i?`?<${i}>`:""}${n.map(r).join("|")})`},Character({value:e},t){let r=r7(e),n=nB(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(n!==r)return n;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&nz(r)){let e=nc(r);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return r},CharacterClass(e,t,r){let{kind:n,negate:i,parent:o}=e,{body:s}=e;if("intersection"===n&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");nt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&s.some(nH)&&(s=[rA(45),...s.filter(e=>!nH(e))]);let a=()=>`[${i?"^":""}${s.map(r).join("intersection"===n?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||nt.bugNestedClassIgnoresNegation)&&!i){let t=s.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let n=rT(),i=n.body[0];return n.parent=o,i.parent=n,e.body=s=s.filter(e=>!t.includes(e)),s.length?(e.parent=i,i.body.push(e)):n.body.pop(),t.forEach(e=>{let t=rC({body:[e]});e.parent=t,t.parent=n,n.body.push(t)}),r(n)}}t.inCharClass=!0;let n=a();return t.inCharClass=!1,n}let l=s[0];if("union"===n&&!i&&l&&((!t.useFlagV||!t.verbose)&&"union"===o.kind&&!(nt.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===o.kind&&1===s.length&&"CharacterClassRange"!==l.type))return s.map(r).join("");if(!t.useFlagV&&"CharacterClass"===o.type)throw Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(e,t){let r=e.min.value,n=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=nB(r,i),s=nB(n,i),a=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),r=[],n=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?n??=t[e]:null===n?r.push(t[e]):(r.push([n,t[e]]),n=null);return r})(nD(e)).forEach(e=>{a.add(Array.isArray(e)?`${nB(e[0],i)}-${nB(e[1],i)}`:nB(e,i))}),`${o}-${s}${[...a].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:n},i){if("dot"===e)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":ne`[^\n]`;if("digit"===e)return t?ne`\D`:ne`\d`;if("property"===e){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ny.has(r))throw Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?ne`\P`:ne`\p`}{${n?`${n}=`:""}${r}}`}if("word"===e)return t?ne`\W`:ne`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:r,parent:n},i,o){let s=i.currentFlags;r&&(i.currentFlags=nr(s,r));let a=t.map(o).join("|"),l=i.verbose||1!==t.length||"Quantifier"===n.type||e||i.useFlagMods&&r?`(?${function(e,t,r){if(e)return">";let n="";if(t&&r){let{enable:e,disable:r}=t;n=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(r?"-":"")+(r?.ignoreCase?"i":"")+(r?.dotAll?"s":"")}return`${n}:`}(e,r,i.useFlagMods)}${a})`:a;return i.currentFlags=s,l},LookaroundAssertion({body:e,kind:t,negate:r},n,i){let o=`${"lookahead"===t?"":"<"}${r?"!":"="}`;return`(?${o}${e.map(i).join("|")})`},Quantifier:(e,t,r)=>r(e.body)+function({kind:e,max:t,min:r}){return(r||1!==t?r||t!==1/0?1===r&&t===1/0?"+":r===t?`{${r}}`:`{${r},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},r){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let n=r.recursionLimit;return 0===t?`(?R=${n})`:ne`\g<${t}&R=${n}>`}},nj=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),nR=new Set(["-","\\","]","^","["]),nO=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),nP=new Map([[9,ne`\t`],[10,ne`\n`],[11,ne`\v`],[12,ne`\f`],[13,ne`\r`],[8232,ne`\u2028`],[8233,ne`\u2029`],[65279,ne`\uFEFF`]]),n$=/^\p{Cased}$/u;function nz(e){return n$.test(e)}function nD(e,t){let r=!!t?.firstOnly,n=e.min.value,i=e.max.value,o=[];if(n<65&&(65535===i||i>=131071)||65536===n&&i>=131071)return o;for(let e=n;e<=i;e++){let t=r7(e);if(!nz(t))continue;let s=nc(t).filter(e=>{let t=e.codePointAt(0);return t<n||t>i});if(s.length&&(o.push(...s),r))break}return o}function nB(e,{escDigit:t,inCharClass:r,useFlagV:n}){var i;if(nP.has(e))return nP.get(e);if(e<32||e>126&&e<160||e>262143||t&&(i=e)>47&&i<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let o=r7(e);return((r?n?nO:nR:nj).has(o)?"\\":"")+o}function nF({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function nH({type:e,value:t}){return"Character"===e&&45===t}var nU=class e extends RegExp{#e=new Map;#t=null;#r;#n=null;#i=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,r,n){let i=!!n?.lazyCompile;if(t instanceof RegExp){if(n)throw Error("Cannot provide options when copying a regexp");super(t,r),this.#r=t.source,t instanceof e&&(this.#e=t.#e,this.#n=t.#n,this.#i=t.#i,this.rawOptions=t.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...n};super(i?"":t,r),this.#r=t,this.#e=function(e,t){let r=new Map;for(let t of e)r.set(t,{hidden:!0});for(let[e,n]of t)for(let t of n)nn(r,t,{}).transferTo=e;return r}(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=n??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...r}=this.rawOptions;this.#t=new e(this.#r,this.flags,r)}let r=this.global||this.sticky,n=this.lastIndex;if("clip_search"===this.#i&&r&&n){this.lastIndex=0;let e=this.#o(t.slice(n));return e&&(function(e,t,r,n){if(e.index+=t,e.input=r,n){let r=e.indices;for(let e=0;e<r.length;e++){let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])}let n=r.groups;n&&Object.keys(n).forEach(e=>{let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])})}}(e,n,t,this.hasIndices),this.lastIndex+=n),e}return this.#o(t)}#o(e){let t;this.#t.lastIndex=this.lastIndex;let r=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!r||!this.#e.size)return r;let n=[...r];r.length=1,this.hasIndices&&(t=[...r.indices],r.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:o,transferTo:s}=this.#e.get(e)??{};if(o?i.push(null):(i.push(r.length),r.push(n[e]),this.hasIndices&&r.indices.push(t[e])),s&&void 0!==n[e]){let o=i[s];if(!o)throw Error(`Invalid capture transfer to "${o}"`);if(r[o]=n[e],this.hasIndices&&(r.indices[o]=t[e]),r.groups){this.#n||(this.#n=function(e){let t,r=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,i=0,o=0;for(;t=r.exec(e);){let{0:e,groups:{capture:r,name:s}}=t;"["===e?i++:i?"]"===e&&i--:r&&(o++,s&&n.set(o,s))}return n}(this.source));let i=this.#n.get(s);i&&(r.groups[i]=n[e],this.hasIndices&&(r.indices.groups[i]=t[e]))}}}return r}};class nG{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:r=!1,cache:n,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=n?.get(e);if(t){if(t instanceof RegExp)return t;if(r)return null;throw t}try{let t=i(e);return n?.set(e,t),t}catch(t){if(n?.set(e,t),r)return null;throw t}})}regexps;findNextMatchSync(e,t,r){let n="string"==typeof e?e:e.content,i=[];function o(e,t,r=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+r,end:e[1]+r,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let r=this.regexps[e];if(r)try{r.lastIndex=t;let s=r.exec(n);if(!s)continue;if(s.index===t)return o(e,s,0);i.push([e,s,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,r,n]of i)if(r.index===e)return o(t,r,n)}return null}}var nq=function(e={}){let t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=e=>(function(e,t){let r=function(e,t){let r=ns(t),n=function(e,t){let r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};nx(e);let n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:ni[r.bestEffortTarget]>=ni.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};rH(e,nb,n);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};return rH(e,nv,o),rH(e,nk,{groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer}),e._originMap=o.groupOriginByCopy,e._strategy=n.strategy,e}(rw(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:nu}),{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),i=function(e,t){let r=ns(t),n=ni[r.target]>=ni.ES2024,i=ni[r.target]>=ni.ES2025,o=r.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw Error("Invalid recursionLimit; use 2-20");let s=null,a=null;if(!i){let t=[e.flags.ignoreCase];rH(e,nL,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?s=!0:a=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||s)&&!a)},c=e,u={accuracy:r.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&s&&a),useFlagMods:i,useFlagV:n,verbose:r.verbose};function d(e){return u.lastNode=c,c=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(nI[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let h={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return n||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&h._hiddenCaptures.push(t),e.transferTo&&nn(h._captureTransfers,e.transferTo,[]).push(t)}),h}(n,r),o=function(e,t){let r,{hiddenCaptures:n,mode:i}={hiddenCaptures:[],mode:"plugin",...t},o=t?.captureTransfers??new Map;if(!RegExp(r0,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if("plugin"===i&&rK(e,rQ`\(\?\(DEFINE\)`,rW.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let s=[],a=rK(e,rQ`\\[1-9]`,rW.DEFAULT),l=new Map,c=[],u=!1,d=0,h=0;for(r5.lastIndex=0;r=r5.exec(e);){let{0:t,groups:{captureName:p,rDepth:f,gRNameOrNum:m,gRDepth:g}}=r;if("["===t)d++;else if(d)"]"===t&&d--;else if(f){if(r6(f),u)throw Error(r3);if(a)throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,r.index),l=e.slice(r5.lastIndex);if(rK(l,r0,rW.DEFAULT))throw Error(r3);let c=f-1;e=r4(t,l,c,!1,n,s,h),o=r8(o,t,c,s.length,0,h);break}else if(m){r6(g);let d=!1;for(let e of c)if(e.name===m||e.num===+m){if(d=!0,e.hasRecursedWithin)throw Error(r3);break}if(!d)throw Error(rQ`Recursive \g cannot be used outside the referenced group "${"external"===i?m:rQ`\g<${m}&R=${g}>`}"`);let p=l.get(m),f=function(e,t){let r,n=/\\?./gsu;n.lastIndex=t;let i=e.length,o=0,s=1;for(;r=n.exec(e);){let[e]=r;if("["===e)o++;else if(o)"]"===e&&o--;else if("("===e)s++;else if(")"===e&&!--s){i=r.index;break}}return e.slice(t,i)}(e,p);if(a&&rK(f,rQ`${r1}|\((?!\?)`,rW.DEFAULT))throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let y=e.slice(p,r.index),b=f.slice(y.length+t.length),v=s.length,k=g-1,x=r4(y,b,k,!0,n,s,h);o=r8(o,y,k,s.length-v,v,h);let w=e.slice(0,p),C=e.slice(p+f.length);e=`${w}${x}${C}`,r5.lastIndex+=x.length-t.length-y.length-b.length,c.forEach(e=>e.hasRecursedWithin=!0),u=!0}else if(p)h++,l.set(String(h),r5.lastIndex),l.set(p,r5.lastIndex),c.push({num:h,name:p});else if("("===t[0]){let e="("===t;e&&(h++,l.set(String(h),r5.lastIndex)),c.push(e?{num:h}:{})}else")"===t&&c.pop()}return n.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:n}}(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:"external"}),s=function(e,t){let r,n=t?.hiddenCaptures??[],i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};let o="(?:(?=(",s=[0],a=[],l=0,c=0,u=NaN;do{let t;r=!1;let d=0,h=0,p=!1;for(rJ.lastIndex=Number.isNaN(u)?0:u+o.length;t=rJ.exec(e);){let{0:f,index:m,groups:{capturingStart:g,noncapturingStart:y}}=t;if("["===f)d++;else if(d)"]"===f&&d--;else if("(?>"!==f||p){if(p&&y)h++;else if(g)p?h++:(l++,s.push(l+c));else if(")"===f&&p){if(!h){let t=l+ ++c;e=`${e.slice(0,u)}${o}${e.slice(u+3,m)}))<$$${t}>)${e.slice(m+1)}`,r=!0,a.push(t);for(let e=0;e<n.length;e++)n[e]>=t&&n[e]++;if(i.size){let e=new Map;i.forEach((r,n)=>{e.set(n>=t?n+1:n,r.map(e=>e>=t?e+1:e))}),i=e}break}h--}}else u=m,p=!0}}while(r);return n.push(...a),{pattern:e=rV(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:r}})=>{if(t){let r=+t;if(r>s.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${s[r]}`}return`\\${r}`},rW.DEFAULT),captureTransfers:i,hiddenCaptures:n}}(function(e){let t;if(!RegExp(`${rZ}\\+`).test(e))return{pattern:e};let r=[],n=null,i=null,o="",s=0;for(rX.lastIndex=0;t=rX.exec(e);){let{0:c,index:u,groups:{qBase:d,qMod:h,invalidQ:p}}=t;if("["===c)s||(i=u),s++;else if("]"===c)s?s--:i=null;else if(!s)if("+"===h&&o&&!o.startsWith("(")){if(p)throw Error(`Invalid quantifier "${c}"`);let t=-1;if(/^\{\d+\}$/.test(d)){var a,l;a=e,l=u+d.length,e=a.slice(0,l)+""+a.slice(l+h.length)}else{if(")"===o||"]"===o){let t=")"===o?n:i;if(null===t)throw Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,t)}(?>${e.slice(t,u)}${d})${e.slice(u+c.length)}`}else e=`${e.slice(0,u-o.length)}(?>${o}${d})${e.slice(u+c.length)}`;t+=4}rX.lastIndex+=t}else"("===c[0]?r.push(u):")"===c&&(n=r.length?r.pop():null);o=c}return{pattern:e}}(o.pattern).pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),a={pattern:s.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=s.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(s.captureTransfers),i=n._strategy,o=a.pattern.length>=r.lazyCompileLength;(e.length||t.length||i||o)&&(a.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...o&&{lazyCompile:o}})}return a}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t});return r.options?new nU(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)})(e,{target:t.target}),{createScanner:e=>new nG(e,t),createString:e=>({content:e})}}({forgiving:!0}),nW=Object.fromEntries(o.flatMap(e=>{var t;return(null!=(t=e.aliases)?t:[]).map(t=>[t,e.id])})),nV=new Set(Object.keys(l)),nK=e=>{let t=e.trim().toLowerCase();return nW[t]||(nV.has(t),t)},nJ=new Map,nZ=new Map,nX=new Map,nQ=e=>{var t;return"string"==typeof e?e:null!=(t=e.name)?t:"custom"},nY=function(e={}){var t;let r=null!=(t=e.themes)?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(e){let t=nK(e);return nV.has(t)},getSupportedLanguages:()=>Array.from(nV),getThemes:()=>r,highlight({code:e,language:t,themes:r},n){let i,o,s=nK(t),a=[nQ(r[0]),nQ(r[1])],l=(i=e.slice(0,100),o=e.length>100?e.slice(-100):"",`${s}:${a[0]}:${a[1]}:${e.length}:${i}:${o}`);return nZ.has(l)?nZ.get(l):(n&&(nX.has(l)||nX.set(l,new Set),nX.get(l).add(n)),((e,t)=>{let r,n,i=(r=e,n=t,`${r}-${nQ(n[0])}-${nQ(n[1])}`);if(nJ.has(i))return nJ.get(i);let o=t8({themes:t,langs:[e],engine:nq});return nJ.set(i,o),o})(s,r).then(t=>{let r=t.getLoadedLanguages().includes(s)?s:"text",n=t.codeToTokens(e,{lang:r,themes:{light:a[0],dark:a[1]}});nZ.set(l,n);let i=nX.get(l);if(i){for(let e of i)e(n);nX.delete(l)}}).catch(e=>{console.error("[Streamdown Code] Failed to highlight code:",e),nX.delete(l)}),null)}}}()},39358:(e,t,r)=>{var n=r(98175),i=r(58002),o=r(91347),s=r(12814),a=1/0,l=n?n.prototype:void 0,c=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-a?"-0":r}},39438:(e,t,r)=>{var n=r(11581),i=r(143).Graph;e.exports=function(e,t,r){var o=function(e){for(var t;e.hasNode(t=n.uniqueId("_root")););return t}(e),s=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(t){return e.node(t)});return n.forEach(e.nodes(),function(i){var a=e.node(i),l=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(i),s.setParent(i,l||o),n.forEach(e[r](i),function(t){var r=t.v===i?t.w:t.v,o=s.edge(r,i),a=n.isUndefined(o)?0:o.weight;s.setEdge(r,i,{weight:e.edge(t).weight+a})}),n.has(a,"minRank")&&s.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),s}},39626:e=>{e.exports=function(){}},39942:(e,t,r)=>{var n=r(65273),i=r(69239),o=r(9281),s=r(19760),a=r(41929),l=r(95285),c=r(4518);e.exports=function e(t,r,u,d,h){t!==r&&o(r,function(o,l){if(h||(h=new n),a(o))s(t,r,l,u,e,d,h);else{var p=d?d(c(t,l),o,l+"",t,r,h):void 0;void 0===p&&(p=o),i(t,l,p)}},l)}},40369:(e,t,r)=>{var n=r(11581),i=r(32724);function o(e,t,r){for(var i;t.length&&(i=n.last(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}e.exports=function(e,t){var r,s=i.partition(e,function(e){return n.has(e,"barycenter")}),a=s.lhs,l=n.sortBy(s.rhs,function(e){return-e.i}),c=[],u=0,d=0,h=0;a.sort((r=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:r?t.i-e.i:e.i-t.i})),h=o(c,l,h),n.forEach(a,function(e){h+=e.vs.length,c.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,h=o(c,l,h)});var p={vs:n.flatten(c,!0)};return d&&(p.barycenter=u/d,p.weight=d),p}},40393:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return r(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}},40459:(e,t,r)=>{var n=r(41967),i=r(76827),o=r(57591);e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},40739:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},41021:(e,t,r)=>{e.exports=r(7696)(r(3399))},41118:(e,t,r)=>{var n=r(41929);e.exports=function(e){return e==e&&!n(e)}},41521:(e,t,r)=>{var n=r(88463),i=r(56222),o=r(33445);e.exports=function(e,t){var r,s=new i,a={},l=new o;function c(e){var n=e.v===r?e.w:e.v,i=l.priority(n);if(void 0!==i){var o=t(e);o<i&&(a[n]=r,l.decrease(n,o))}}if(0===e.nodeCount())return s;n.each(e.nodes(),function(e){l.add(e,1/0),s.setNode(e)}),l.decrease(e.nodes()[0],0);for(var u=!1;l.size()>0;){if(r=l.removeMin(),n.has(a,r))s.setEdge(r,a[r]);else if(u)throw Error("Input graph is not connected: "+e);else u=!0;e.nodeEdges(r).forEach(c)}return s}},41760:(e,t,r)=>{var n=r(88463);function i(e){var t={},r={},i=[];if(n.each(e.sinks(),function s(a){if(n.has(r,a))throw new o;n.has(t,a)||(r[a]=!0,t[a]=!0,n.each(e.predecessors(a),s),delete r[a],i.push(a))}),n.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=Error()},41929:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},41967:e=>{e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return -1}},42180:(e,t,r)=>{var n=r(63100),i=r(53542);e.exports=function(e){return null==e?[]:n(e,i(e))}},42242:(e,t,r)=>{"use strict";r.d(t,{$Z:()=>F,hG:()=>V});var n=r(1856),i=r(38129),o=r(87161),s=r(90508),a=r(17749);let{getOwnPropertyNames:l,getOwnPropertySymbols:c}=Object,{hasOwnProperty:u}=Object.prototype;function d(e,t){return function(r,n,i){return e(r,n,i)&&t(r,n,i)}}function h(e){return function(t,r,n){if(!t||!r||"object"!=typeof t||"object"!=typeof r)return e(t,r,n);let{cache:i}=n,o=i.get(t),s=i.get(r);if(o&&s)return o===r&&s===t;i.set(t,r),i.set(r,t);let a=e(t,r,n);return i.delete(t),i.delete(r),a}}function p(e){return l(e).concat(c(e))}let f=Object.hasOwn||((e,t)=>u.call(e,t));function m(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let{getOwnPropertyDescriptor:g,keys:y}=Object;function b(e,t){return e.byteLength===t.byteLength&&T(new Uint8Array(e),new Uint8Array(t))}function v(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function k(e,t){return e.byteLength===t.byteLength&&T(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function x(e,t){return m(e.getTime(),t.getTime())}function w(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function C(e,t){return e===t}function S(e,t,r){let n,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;let s=Array(o),a=e.entries(),l=0;for(;(n=a.next())&&!n.done;){let o=t.entries(),a=!1,c=0;for(;(i=o.next())&&!i.done;){if(s[c]){c++;continue}let o=n.value,u=i.value;if(r.equals(o[0],u[0],l,c,e,t,r)&&r.equals(o[1],u[1],o[0],u[0],e,t,r)){a=s[c]=!0;break}c++}if(!a)return!1;l++}return!0}function E(e,t,r){let n=y(e),i=n.length;if(y(t).length!==i)return!1;for(;i-- >0;)if(!I(e,t,r,n[i]))return!1;return!0}function _(e,t,r){let n,i,o,s=p(e),a=s.length;if(p(t).length!==a)return!1;for(;a-- >0;)if(!I(e,t,r,n=s[a])||(i=g(e,n),o=g(t,n),(i||o)&&(!i||!o||i.configurable!==o.configurable||i.enumerable!==o.enumerable||i.writable!==o.writable)))return!1;return!0}function A(e,t){return m(e.valueOf(),t.valueOf())}function N(e,t){return e.source===t.source&&e.flags===t.flags}function M(e,t,r){let n,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;let s=Array(o),a=e.values();for(;(n=a.next())&&!n.done;){let o=t.values(),a=!1,l=0;for(;(i=o.next())&&!i.done;){if(!s[l]&&r.equals(n.value,i.value,n.value,i.value,e,t,r)){a=s[l]=!0;break}l++}if(!a)return!1}return!0}function T(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function L(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 I(e,t,r,n){return("_owner"===n||"__o"===n||"__v"===n)&&(!!e.$$typeof||!!t.$$typeof)||f(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}let j={"[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},R=Object.prototype.toString,O=P();function P(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,o=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;let b=typeof m;if(b!==typeof g)return!1;if("object"!==b)return"number"===b?a(m,g,y):"function"===b&&o(m,g,y);let v=m.constructor;if(v!==g.constructor)return!1;if(v===Object)return l(m,g,y);if(Array.isArray(m))return t(m,g,y);if(v===Date)return n(m,g,y);if(v===RegExp)return u(m,g,y);if(v===Map)return s(m,g,y);if(v===Set)return d(m,g,y);let k=R.call(m);if("[object Date]"===k)return n(m,g,y);if("[object RegExp]"===k)return u(m,g,y);if("[object Map]"===k)return s(m,g,y);if("[object Set]"===k)return d(m,g,y);if("[object Object]"===k)return"function"!=typeof m.then&&"function"!=typeof g.then&&l(m,g,y);if("[object URL]"===k)return p(m,g,y);if("[object Error]"===k)return i(m,g,y);if("[object Arguments]"===k)return l(m,g,y);if(j[k])return h(m,g,y);if("[object ArrayBuffer]"===k)return e(m,g,y);if("[object DataView]"===k)return r(m,g,y);if("[object Boolean]"===k||"[object Number]"===k||"[object String]"===k)return c(m,g,y);if(f){let e=f[k];if(!e){let t=null!=m?m[Symbol.toStringTag]:void 0;t&&(e=f[t])}if(e)return e(m,g,y)}return!1}}(function({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:b,areArraysEqual:r?_:v,areDataViewsEqual:k,areDatesEqual:x,areErrorsEqual:w,areFunctionsEqual:C,areMapsEqual:r?d(S,_):S,areNumbersEqual:m,areObjectsEqual:r?_:E,arePrimitiveWrappersEqual:A,areRegExpsEqual:N,areSetsEqual:r?d(M,_):M,areTypedArraysEqual:r?d(T,_):T,areUrlsEqual:L,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let e=h(n.areArraysEqual),t=h(n.areMapsEqual),r=h(n.areObjectsEqual),i=h(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:r,areSetsEqual:i})}return n}(e)),s=r?r(o):function(e,t,r,n,i,s,a){return o(e,t,a)};return function({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(o,s){let{cache:a=e?new WeakMap:void 0,meta:l}=r();return t(o,s,{cache:a,equals:n,meta:l,strict:i})};if(e)return function(e,r){return t(e,r,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};let o={cache:void 0,equals:n,meta:void 0,strict:i};return function(e,r){return t(e,r,o)}}({circular:t,comparator:o,createState:n,equals:s,strict:i})}P({strict:!0}),P({circular:!0}),P({circular:!0,strict:!0}),P({createInternalComparator:()=>m}),P({strict:!0,createInternalComparator:()=>m}),P({circular:!0,createInternalComparator:()=>m}),P({circular:!0,createInternalComparator:()=>m,strict:!0});var $=r(36955),z=({contentComponent:e})=>{let t=(0,o.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,s.jsx)(s.Fragment,{children:Object.values(t)})},D=class extends n.Component{constructor(e){var t;super(e),this.editorContentRef=n.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null==(t=e.editor)?void 0:t.contentComponent)}}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=function(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(r,n){t={...t,[r]:i.createPortal(n.reactElement,n.element,r)},e.forEach(e=>e())},removeRenderer(r){let n={...t};delete n[r],t=n,e.forEach(e=>e())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let r=document.createElement("div");r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r})}catch{}}}render(){let{editor:e,innerRef:t,...r}=this.props;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:((...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})})(t,this.editorContentRef),...r}),(null==e?void 0:e.contentComponent)&&(0,s.jsx)(z,{contentComponent:e.contentComponent})]})}},B=(0,n.forwardRef)((e,t)=>{let r=n.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return n.createElement(D,{key:r,innerRef:t,...e})}),F=n.memo(B),H="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,U=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)}}}},G="undefined"==typeof window,q=G||!!("undefined"!=typeof window&&window.next),W=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)return G||q?null:this.createEditor();return this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onBeforeCreate)?void 0:r.call(t,...e)},onBlur:(...e)=>{var t,r;return null==(r=(t=this.options.current).onBlur)?void 0:r.call(t,...e)},onCreate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onCreate)?void 0:r.call(t,...e)},onDestroy:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDestroy)?void 0:r.call(t,...e)},onFocus:(...e)=>{var t,r;return null==(r=(t=this.options.current).onFocus)?void 0:r.call(t,...e)},onSelectionUpdate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onSelectionUpdate)?void 0:r.call(t,...e)},onTransaction:(...e)=>{var t,r;return null==(r=(t=this.options.current).onTransaction)?void 0:r.call(t,...e)},onUpdate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onUpdate)?void 0:r.call(t,...e)},onContentError:(...e)=>{var t,r;return null==(r=(t=this.options.current).onContentError)?void 0:r.call(t,...e)},onDrop:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDrop)?void 0:r.call(t,...e)},onPaste:(...e)=>{var t,r;return null==(r=(t=this.options.current).onPaste)?void 0:r.call(t,...e)},onDelete:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDelete)?void 0:r.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(r=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)||("extensions"===r&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,r)=>{var n;return e===(null==(n=t.extensions)?void 0:n[r])}):e[r]===t[r]))}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,r)=>t===e[r]))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 V(e={},t=[]){let r=(0,n.useRef)(e);r.current=e;let[i]=(0,n.useState)(()=>new W(r)),s=(0,o.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,n.useDebugValue)(s),(0,n.useEffect)(i.onRender(t)),!function(e){var t;let[r]=(0,n.useState)(()=>new U(e.editor)),i=(0,$.useSyncExternalStoreWithSelector)(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:O);H(()=>r.watch(e.editor),[e.editor,r]),(0,n.useDebugValue)(i)}({editor:s,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),s}var K=(0,n.createContext)({editor:null});K.Consumer;var J=(0,n.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});n.forwardRef((e,t)=>{let{onDragStart:r}=(0,n.useContext)(J),i=e.as||"div";return(0,s.jsx)(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})}),n.createContext({markViewContentRef:()=>{}}),a.Db,a.Yv;var Z=(0,n.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function X({editor:e,instance:t,children:r}){let i=null!=e?e:t;if(!i)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let o=(0,n.useMemo)(()=>({editor:i}),[i]),a=(0,n.useMemo)(()=>({editor:i}),[i]);return(0,s.jsx)(K.Provider,{value:a,children:(0,s.jsx)(Z.Provider,{value:o,children:r})})}function Q({...e}){let{editor:t}=(0,n.useContext)(Z);return(0,s.jsx)(F,{editor:t,...e})}Z.displayName="TiptapContext",X.displayName="Tiptap",Q.displayName="Tiptap.Content",Object.assign(X,{Content:Q})},42533:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},43113:(e,t,r)=>{var n=r(25895),i=r(75552),o=r(87747);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},43188:(e,t,r)=>{var n=r(59745),i=r(33382),o=r(53542);e.exports=function(e){return n(e,o,i)}},43240:(e,t,r)=>{var n=r(98175),i=r(55746),o=r(69048),s=r(37291),a=r(60819),l=r(12721),c=n?n.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,r,n,c,d,h){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&n;if(p||(p=l),e.size!=t.size&&!f)break;var m=h.get(e);if(m)return m==t;n|=2,h.set(e,t);var g=s(p(e),p(t),n,c,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},43370:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,r){return null!=e&&t.call(e,r)}},43372:(e,t,r)=>{var n=r(77220);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},43900:(e,t,r)=>{var n=r(11078),i=r(12151),o=r(2627),s=r(59588),a=r(91347);e.exports=function(e,t,r){var l=a(e)?n:s,c=arguments.length<3;return l(e,o(t,4),r,c,i)}},44700:(e,t,r)=>{var n=r(86114),i=r(25238);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},44934:(e,t,r)=>{e.exports={Graph:r(56222),version:r(22526)}},45176:(e,t,r)=>{var n=r(95589),i=r(49717);e.exports=function(e,t){return n(e,i(e),t)}},46451:(e,t,r)=>{var n=r(21172),i=r(96830),o=r(91347),s=r(61288),a=r(86237),l=r(52791),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),u=!r&&i(e),d=!r&&!u&&s(e),h=!r&&!u&&!d&&l(e),p=r||u||d||h,f=p?n(e.length,String):[],m=f.length;for(var g in e)(t||c.call(e,g))&&!(p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&f.push(g);return f}},46555:(e,t,r)=>{var n=r(37155);e.exports=function(e){return n(e,4)}},46764:(e,t,r)=>{var n=r(8665);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=!!t,t}},46958:e=>{e.exports=function(e,t,r){for(var n=-1,i=e.length,o=t.length,s={};++n<i;){var a=n<o?t[n]:void 0;r(s,e[n],a)}return s}},47505:e=>{e.exports=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}},47869:e=>{e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},48095:(e,t,r)=>{"use strict";var n=r(11581),i=r(32724);e.exports={run:function(e){e.graph().dummyChains=[],n.forEach(e.edges(),function(t){!function(e,t){var r,n,o,s=t.v,a=e.node(s).rank,l=t.w,c=e.node(l).rank,u=t.name,d=e.edge(t),h=d.labelRank;if(c!==a+1){for(e.removeEdge(t),o=0,++a;a<c;++o,++a)d.points=[],n={width:0,height:0,edgeLabel:d,edgeObj:t,rank:a},r=i.addDummyNode(e,"edge",n,"_d"),a===h&&(n.width=d.width,n.height=d.height,n.dummy="edge-label",n.labelpos=d.labelpos),e.setEdge(s,r,{weight:d.weight},u),0===o&&e.graph().dummyChains.push(r),s=r;e.setEdge(s,l,{weight:d.weight},u)}}(e,t)})},undo:function(e){n.forEach(e.graph().dummyChains,function(t){var r,n=e.node(t),i=n.edgeLabel;for(e.setEdge(n.edgeObj,i);n.dummy;)r=e.successors(t)[0],e.removeNode(t),i.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),t=r,n=e.node(t)})}}},48717:(e,t,r)=>{"use strict";r.d(t,{$B:()=>a,Sd:()=>o,T2:()=>s});var n=r(28155),i=r(65282);function o(e,t=null){return function(r,o){let{$from:s,$to:a}=r.selection,l=s.blockRange(a);if(!l)return!1;let c=o?r.tr:null;return!!function(e,t,r,o=null){let s=!1,a=t,l=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(r)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=l.resolve(t.start-2);a=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,l.resolve(t.$to.end(t.depth)),t.depth)),s=!0}let c=(0,n.oM)(a,r,o,t);return!!c&&(e&&function(e,t,r,o,s){let a=i.FK.empty;for(let e=r.length-1;e>=0;e--)a=i.FK.from(r[e].type.create(r[e].attrs,a));e.step(new n.Wg(t.start-2*!!o,t.end,t.start,t.end,new i.Ji(a,0,0),r.length,!0));let l=0;for(let e=0;e<r.length;e++)r[e].type==s&&(l=e+1);let c=r.length-l,u=t.start+r.length-2*!!o,d=t.parent;for(let r=t.startIndex,i=t.endIndex,o=!0;r<i;r++,o=!1)!o&&(0,n.zy)(e.doc,u,c)&&(e.split(u,c),u+=2*c),u+=d.child(r).nodeSize}(e,t,c,s,r),!0)}(c,l,e,t)&&(o&&o(c.scrollIntoView()),!0)}}function s(e){return function(t,r){let{$from:o,$to:s}=t.selection,a=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);return!!a&&(!r||(o.node(a.depth-1).type==e?function(e,t,r,o){let s=e.tr,a=o.end,l=o.$to.end(o.depth);a<l&&(s.step(new n.Wg(a-1,l,a,l,new i.Ji(i.FK.from(r.create(null,o.parent.copy())),1,0),1,!0)),o=new i.u$(s.doc.resolve(o.$from.pos),s.doc.resolve(l),o.depth));let c=(0,n.jP)(o);if(null==c)return!1;s.lift(o,c);let u=s.doc.resolve(s.mapping.map(a,-1)-1);return(0,n.n9)(s.doc,u.pos)&&u.nodeBefore.type==u.nodeAfter.type&&s.join(u.pos),t(s.scrollIntoView()),!0}(t,r,e,a):function(e,t,r){let o=e.tr,s=r.parent;for(let e=r.end,t=r.endIndex-1,n=r.startIndex;t>n;t--)e-=s.child(t).nodeSize,o.delete(e-1,e+1);let a=o.doc.resolve(r.start),l=a.nodeAfter;if(o.mapping.map(r.end)!=r.start+a.nodeAfter.nodeSize)return!1;let c=0==r.startIndex,u=r.endIndex==s.childCount,d=a.node(-1),h=a.index(-1);if(!d.canReplace(h+ +!c,h+1,l.content.append(u?i.FK.empty:i.FK.from(s))))return!1;let p=a.pos,f=p+l.nodeSize;return o.step(new n.Wg(p-!!c,f+ +!!u,p+1,f-1,new i.Ji((c?i.FK.empty:i.FK.from(s.copy(i.FK.empty))).append(u?i.FK.empty:i.FK.from(s.copy(i.FK.empty))),+!c,+!u),+!c)),t(o.scrollIntoView()),!0}(t,r,a)))}}function a(e){return function(t,r){let{$from:o,$to:s}=t.selection,a=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let l=a.startIndex;if(0==l)return!1;let c=a.parent,u=c.child(l-1);if(u.type!=e)return!1;if(r){let o=u.lastChild&&u.lastChild.type==c.type,s=i.FK.from(o?e.create():null),l=new i.Ji(i.FK.from(e.create(null,i.FK.from(c.type.create(null,s)))),o?3:1,0),d=a.start,h=a.end;r(t.tr.step(new n.Wg(d-(o?3:1),h,d,h,l,1,!0)).scrollIntoView())}return!0}}},49641:(e,t,r)=>{var n=r(84364);e.exports=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},49717:(e,t,r)=>{var n=r(10548),i=r(74205),o=r(33382),s=r(80791);e.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:s},50079:e=>{e.exports=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}},51094:(e,t,r)=>{var n=r(72043),i=r(46958);e.exports=function(e,t){return i(e||[],t||[],n)}},52217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{callServer:function(){return n.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}});let n=r(53874),i=r(11550),o=r(31802)},52480:(e,t,r)=>{var n=r(38974);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},52542:(e,t,r)=>{var n=r(9281),i=r(20552),o=r(95285);e.exports=function(e,t){return null==e?e:n(e,i(t),o)}},52791:(e,t,r)=>{var n=r(54351),i=r(72657),o=r(86319),s=o&&o.isTypedArray;e.exports=s?i(s):n},53212:(e,t,r)=>{var n=r(12814);e.exports=function(e,t){if(e!==t){var r=void 0!==e,i=null===e,o=e==e,s=n(e),a=void 0!==t,l=null===t,c=t==t,u=n(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!u&&e<t||u&&r&&o&&!i&&!s||l&&r&&o||!a&&o||!c)return -1}return 0}},53237:(e,t,r)=>{var n=r(86114),i=r(14786),o=r(41929),s=r(68591),a=/^\[object .+?Constructor\]$/,l=Object.prototype,c=Function.prototype.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?d:a).test(s(e))}},53443:(e,t,r)=>{e.exports=r(11254)(r(99083),"WeakMap")},53542:(e,t,r)=>{var n=r(46451),i=r(78414),o=r(44700);e.exports=function(e){return o(e)?n(e):i(e)}},53901:(e,t,r)=>{var n=r(67070);e.exports=function(e){return function(t){return n(t,e)}}},54169:(e,t,r)=>{var n=r(31310),i=r(74205),o=r(59919);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},54351:(e,t,r)=>{var n=r(86366),i=r(25238),o=r(88046),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[n(e)]}},54373:(e,t,r)=>{var n=r(30727);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},54444:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},54546:(e,t,r)=>{var n=r(72043),i=r(77651),o=r(86237),s=r(41929),a=r(24837);e.exports=function(e,t,r,l){if(!s(e))return e;t=i(t,e);for(var c=-1,u=t.length,d=u-1,h=e;null!=h&&++c<u;){var p=a(t[c]),f=r;if("__proto__"===p||"constructor"===p||"prototype"===p)break;if(c!=d){var m=h[p];void 0===(f=l?l(m,p,h):void 0)&&(f=s(m)?m:o(t[c+1])?[]:{})}n(h,p,f),h=h[p]}return e}},54812:(e,t,r)=>{var n=r(12151),i=r(44700);e.exports=function(e,t){var r=-1,o=i(e)?Array(e.length):[];return n(e,function(e,n,i){o[++r]=t(e,n,i)}),o}},54900:e=>{e.exports=function(){this.__data__=[],this.size=0}},55746:(e,t,r)=>{e.exports=r(99083).Uint8Array},55823:e=>{e.exports=function(e){return this.__data__.get(e)}},56222:(e,t,r)=>{"use strict";var n=r(88463);function i(e){this._isDirected=!n.has(e,"directed")||e.directed,this._isMultigraph=!!n.has(e,"multigraph")&&e.multigraph,this._isCompound=!!n.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=n.constant(void 0),this._defaultEdgeLabelFn=n.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function a(e,t,r,i){var o=""+t,s=""+r;if(!e&&o>s){var a=o;o=s,s=a}return o+"\x01"+s+"\x01"+(n.isUndefined(i)?"\0":i)}function l(e,t){return a(e,t.v,t.w,t.name)}e.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return n.isFunction(e)||(e=n.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return n.keys(this._nodes)},i.prototype.sources=function(){var e=this;return n.filter(this.nodes(),function(t){return n.isEmpty(e._in[t])})},i.prototype.sinks=function(){var e=this;return n.filter(this.nodes(),function(t){return n.isEmpty(e._out[t])})},i.prototype.setNodes=function(e,t){var r=arguments,i=this;return n.each(e,function(e){r.length>1?i.setNode(e,t):i.setNode(e)}),this},i.prototype.setNode=function(e,t){return n.has(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return n.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(n.has(this._nodes,e)){var r=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],n.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),n.each(n.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],n.each(n.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(n.isUndefined(t))t="\0";else{t+="";for(var r=t;!n.isUndefined(r);r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},i.prototype.children=function(e){if(n.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return n.keys(t)}else if("\0"===e)return this.nodes();else if(this.hasNode(e))return[]},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return n.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return n.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return n.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;n.each(this._nodes,function(r,n){e(n)&&t.setNode(n,r)}),n.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var i={};return this._isCompound&&n.each(t.nodes(),function(e){t.setParent(e,function e(n){var o=r.parent(n);return void 0===o||t.hasNode(o)?(i[n]=o,o):o in i?i[o]:e(o)}(e))}),t},i.prototype.setDefaultEdgeLabel=function(e){return n.isFunction(e)||(e=n.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return n.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var r=this,i=arguments;return n.reduce(e,function(e,n){return i.length>1?r.setEdge(e,n,t):r.setEdge(e,n),n}),this},i.prototype.setEdge=function(){var e,t,r,i,s=!1,l=arguments[0];"object"==typeof l&&null!==l&&"v"in l?(e=l.v,t=l.w,r=l.name,2==arguments.length&&(i=arguments[1],s=!0)):(e=l,t=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,t=""+t,n.isUndefined(r)||(r=""+r);var c=a(this._isDirected,e,t,r);if(n.has(this._edgeLabels,c))return s&&(this._edgeLabels[c]=i),this;if(!n.isUndefined(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=s?i:this._defaultEdgeLabelFn(e,t,r);var u=function(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var s=i;i=o,o=s}var a={v:i,w:o};return n&&(a.name=n),a}(this._isDirected,e,t,r);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[c]=u,o(this._preds[t],e),o(this._sucs[e],t),this._in[t][c]=u,this._out[e][c]=u,this._edgeCount++,this},i.prototype.edge=function(e,t,r){var n=1==arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return this._edgeLabels[n]},i.prototype.hasEdge=function(e,t,r){var i=1==arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return n.has(this._edgeLabels,i)},i.prototype.removeEdge=function(e,t,r){var n=1==arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,r),i=this._edgeObjs[n];return i&&(e=i.v,t=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var i=n.values(r);return t?n.filter(i,function(e){return e.v===t}):i}},i.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var i=n.values(r);return t?n.filter(i,function(e){return e.w===t}):i}},i.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))}},56392:(e,t,r)=>{"use strict";var n=r(11581);function i(e){n.forEach(e.nodes(),function(t){o(e.node(t))}),n.forEach(e.edges(),function(t){o(e.edge(t))})}function o(e){var t=e.width;e.width=e.height,e.height=t}function s(e){e.y=-e.y}function a(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&i(e)},undo:function(e){var t,r,o=e.graph().rankdir.toLowerCase();("bt"===o||"rl"===o)&&(t=e,n.forEach(t.nodes(),function(e){s(t.node(e))}),n.forEach(t.edges(),function(e){var r=t.edge(e);n.forEach(r.points,s),n.has(r,"y")&&s(r)})),("lr"===o||"rl"===o)&&(r=e,n.forEach(r.nodes(),function(e){a(r.node(e))}),n.forEach(r.edges(),function(e){var t=r.edge(e);n.forEach(t.points,a),n.has(t,"x")&&a(t)}),i(e))}}},56513:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},56770:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("file-text",[["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"}]])},57031:(e,t,r)=>{var n=r(65273),i=r(33546);e.exports=function(e,t,r,o){var s=r.length,a=s,l=!o;if(null==e)return!a;for(e=Object(e);s--;){var c=r[s];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var u=(c=r[s])[0],d=e[u],h=c[1];if(l&&c[2]){if(void 0===d&&!(u in e))return!1}else{var p=new n;if(o)var f=o(d,h,u,e,t,p);if(!(void 0===f?i(h,d,3,o,p):f))return!1}}return!0}},57591:e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}},57847:(e,t,r)=>{var n=r(95589),i=r(33382);e.exports=function(e,t){return n(e,i(e),t)}},58002:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},58367:(e,t,r)=>{var n=r(71559),i=r(61092),o=r(18063);e.exports=function(e){return i(e)?o(e):n(e)}},58587:(e,t,r)=>{var n=r(43113),i=r(91433),o=r(47505),s=r(38605),a=r(2253),l=r(12721);e.exports=function(e,t,r){var c=-1,u=i,d=e.length,h=!0,p=[],f=p;if(r)h=!1,u=o;else if(d>=200){var m=t?null:a(e);if(m)return l(m);h=!1,u=s,f=new n}else f=t?[]:p;t:for(;++c<d;){var g=e[c],y=t?t(g):g;if(g=r||0!==g?g:0,h&&y==y){for(var b=f.length;b--;)if(f[b]===y)continue t;t&&f.push(y),p.push(g)}else u(f,y,r)||(f!==p&&f.push(y),p.push(g))}return p}},59547:(e,t,r)=>{"use strict";r.d(t,{K:()=>f,w:()=>p});for(var n={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:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)n[48+a]=n[96+a]=String(a);for(var a=1;a<=24;a++)n[a+111]="F"+a;for(var a=65;a<=90;a++)n[a]=String.fromCharCode(a+32),i[a]=String.fromCharCode(a);for(var l in n)i.hasOwnProperty(l)||(i[l]=n[l]);var c=r(32603);let u="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function h(e,t,r=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),r&&t.shiftKey&&(e="Shift-"+e),e}function p(e){return new c.k_({props:{handleKeyDown:f(e)}})}function f(e){let t=function(e){let t=Object.create(null);for(let r in e)t[function(e){let t,r,n,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))n=!0;else if(/^mod$/i.test(s))u?i=!0:r=!0;else throw Error("Unrecognized modifier name: "+s)}return t&&(s="Alt-"+s),r&&(s="Ctrl-"+s),i&&(s="Meta-"+s),n&&(s="Shift-"+s),s}(r)]=e[r];return t}(e);return function(e,r){var a;let l=("Esc"==(a=!(o&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||s&&r.shiftKey&&r.key&&1==r.key.length||"Unidentified"==r.key)&&r.key||(r.shiftKey?i:n)[r.keyCode]||r.key||"Unidentified")&&(a="Escape"),"Del"==a&&(a="Delete"),"Left"==a&&(a="ArrowLeft"),"Up"==a&&(a="ArrowUp"),"Right"==a&&(a="ArrowRight"),"Down"==a&&(a="ArrowDown"),a),c,u=t[h(l,r)];if(u&&u(e.state,e.dispatch,e))return!0;if(1==l.length&&" "!=l){if(r.shiftKey){let n=t[h(l,r,!1)];if(n&&n(e.state,e.dispatch,e))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(d&&r.ctrlKey&&r.altKey)&&(c=n[r.keyCode])&&c!=l){let n=t[h(c,r)];if(n&&n(e.state,e.dispatch,e))return!0}}return!1}}},59588:e=>{e.exports=function(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}},59745:(e,t,r)=>{var n=r(10548),i=r(91347);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},59793:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},59919:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},60682:(e,t,r)=>{e.exports=r(11254)(r(99083),"Set")},60819:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},61092:e=>{var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},61288:(e,t,r)=>{e=r.nmd(e);var n=r(99083),i=r(33857),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,l=a?a.isBuffer:void 0;e.exports=l||i},62401:(e,t,r)=>{"use strict";var n=r(11581);e.exports=function(e,t){for(var r=0,i=1;i<t.length;++i)r+=function(e,t,r){for(var i=n.zipObject(r,n.map(r,function(e,t){return t})),o=n.flatten(n.map(t,function(t){return n.sortBy(n.map(e.outEdges(t),function(t){return{pos:i[t.w],weight:e.edge(t).weight}}),"pos")}),!0),s=1;s<r.length;)s<<=1;var a=2*s-1;s-=1;var l=n.map(Array(a),function(){return 0}),c=0;return n.forEach(o.forEach(function(e){var t=e.pos+s;l[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=l[t+1]),t=t-1>>1,l[t]+=e.weight;c+=e.weight*r})),c}(e,t[i-1],t[i]);return r}},62862:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},63100:(e,t,r)=>{var n=r(58002);e.exports=function(e,t){return n(t,function(t){return e[t]})}},63120:e=>{e.exports=function(e){return e}},63129:(e,t,r)=>{var n=r(8665);e.exports=function(e){return n(this,e).has(e)}},64291:(e,t,r)=>{var n=r(98175),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},64541:(e,t,r)=>{var n=r(41929),i=r(59919),o=r(84223),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var a in e)"constructor"==a&&(t||!s.call(e,a))||r.push(a);return r}},64731:(e,t,r)=>{"use strict";r.d(t,{uB:()=>I});var n=/[\\\/_+.#"@\[\(\{&]/,i=/[\\\/_+.#"@\[\(\{&]/g,o=/[\s-]/,s=/[\s-]/g;function a(e){return e.toLowerCase().replace(s," ")}var l=r(71350),c=r(1856),u=r(81597),d=r(40577),h=r(34124),p='[cmdk-group=""]',f='[cmdk-group-items=""]',m='[cmdk-item=""]',g="".concat(m,':not([aria-disabled="true"])'),y="cmdk-item-select",b="data-value",v=(e,t,r)=>(function(e,t,r){return function e(t,r,a,l,c,u,d){if(u===r.length)return c===t.length?1:.99;var h=`${c},${u}`;if(void 0!==d[h])return d[h];for(var p,f,m,g,y=l.charAt(u),b=a.indexOf(y,c),v=0;b>=0;)(p=e(t,r,a,l,b+1,u+1,d))>v&&(b===c?p*=1:n.test(t.charAt(b-1))?(p*=.8,(m=t.slice(c,b-1).match(i))&&c>0&&(p*=Math.pow(.999,m.length))):o.test(t.charAt(b-1))?(p*=.9,(g=t.slice(c,b-1).match(s))&&c>0&&(p*=Math.pow(.999,g.length))):(p*=.17,c>0&&(p*=Math.pow(.999,b-c))),t.charAt(b)!==r.charAt(u)&&(p*=.9999)),(p<.1&&a.charAt(b-1)===l.charAt(u+1)||l.charAt(u+1)===l.charAt(u)&&a.charAt(b-1)!==l.charAt(u))&&.1*(f=e(t,r,a,l,b+1,u+2,d))>p&&(p=.1*f),p>v&&(v=p),b=a.indexOf(y,b+1);return d[h]=v,v}(e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,t,a(e),a(t),0,0,{})})(e,t,r),k=c.createContext(void 0),x=()=>c.useContext(k),w=c.createContext(void 0),C=()=>c.useContext(w),S=c.createContext(void 0),E=c.forwardRef((e,t)=>{let r=O(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=O(()=>new Set),i=O(()=>new Map),o=O(()=>new Map),s=O(()=>new Set),a=j(e),{label:l,children:h,value:x,onValueChange:C,filter:S,shouldFilter:E,loop:_,disablePointerSelection:A=!1,vimBindings:N=!0,...M}=e,T=(0,d.B)(),L=(0,d.B)(),I=(0,d.B)(),P=c.useRef(null),$=z();R(()=>{if(void 0!==x){let e=x.trim();r.current.value=e,F.emit()}},[x]),R(()=>{$(6,V)},[]);let F=c.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var i,o,s,l;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)W(),G(),$(1,q);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(I);e?e.focus():null==(i=document.getElementById(T))||i.focus()}if($(7,()=>{var e;r.current.selectedItemId=null==(e=K())?void 0:e.id,F.emit()}),n||$(5,V),(null==(o=a.current)?void 0:o.value)!==void 0){null==(l=(s=a.current).onValueChange)||l.call(s,null!=t?t:"");return}}F.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),H=c.useMemo(()=>({value:(e,t,n)=>{var i;t!==(null==(i=o.current.get(e))?void 0:i.value)&&(o.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,U(t,n)),$(2,()=>{G(),F.emit()}))},item:(e,t)=>(n.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),$(3,()=>{W(),G(),r.current.value||q(),F.emit()}),()=>{o.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=K();$(4,()=>{W(),(null==t?void 0:t.getAttribute("id"))===e&&q(),F.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{o.current.delete(e),i.current.delete(e)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:T,inputId:I,labelId:L,listInnerRef:P}),[]);function U(e,t){var n,i;let o=null!=(i=null==(n=a.current)?void 0:n.filter)?i:v;return e?o(e,r.current.search,t):0}function G(){if(!r.current.search||!1===a.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=i.current.get(r),o=0;n.forEach(t=>{o=Math.max(e.get(t),o)}),t.push([r,o])});let n=P.current;J().sort((t,r)=>{var n,i;let o=t.getAttribute("id"),s=r.getAttribute("id");return(null!=(n=e.get(s))?n:0)-(null!=(i=e.get(o))?i:0)}).forEach(e=>{let t=e.closest(f);t?t.appendChild(e.parentElement===t?e:e.closest("".concat(f," > *"))):n.appendChild(e.parentElement===n?e:e.closest("".concat(f," > *")))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=P.current)?void 0:t.querySelector("".concat(p,"[").concat(b,'="').concat(encodeURIComponent(e[0]),'"]'));null==r||r.parentElement.appendChild(r)})}function q(){let e=J().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(b);F.setState("value",t||void 0)}function W(){var e,t,s,l;if(!r.current.search||!1===a.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let c=0;for(let i of n.current){let n=U(null!=(t=null==(e=o.current.get(i))?void 0:e.value)?t:"",null!=(l=null==(s=o.current.get(i))?void 0:s.keywords)?l:[]);r.current.filtered.items.set(i,n),n>0&&c++}for(let[e,t]of i.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function V(){var e,t,r;let n=K();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(p))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function K(){var e;return null==(e=P.current)?void 0:e.querySelector("".concat(m,'[aria-selected="true"]'))}function J(){var e;return Array.from((null==(e=P.current)?void 0:e.querySelectorAll(g))||[])}function Z(e){let t=J()[e];t&&F.setState("value",t.getAttribute(b))}function X(e){var t;let r=K(),n=J(),i=n.findIndex(e=>e===r),o=n[i+e];null!=(t=a.current)&&t.loop&&(o=i+e<0?n[n.length-1]:i+e===n.length?n[0]:n[i+e]),o&&F.setState("value",o.getAttribute(b))}function Q(e){let t=K(),r=null==t?void 0:t.closest(p),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,p):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,p))?void 0:r.querySelector(g);n?F.setState("value",n.getAttribute(b)):X(e)}let Y=()=>Z(J().length-1),ee=e=>{e.preventDefault(),e.metaKey?Y():e.altKey?Q(1):X(1)},et=e=>{e.preventDefault(),e.metaKey?Z(0):e.altKey?Q(-1):X(-1)};return c.createElement(u.sG.div,{ref:t,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=M.onKeyDown)||t.call(M,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":N&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":N&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),Z(0);break;case"End":e.preventDefault(),Y();break;case"Enter":{e.preventDefault();let t=K();if(t){let e=new Event(y);t.dispatchEvent(e)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:B},l),D(e,e=>c.createElement(w.Provider,{value:F},c.createElement(k.Provider,{value:H},e))))}),_=c.forwardRef((e,t)=>{var r,n;let i=(0,d.B)(),o=c.useRef(null),s=c.useContext(S),a=x(),l=j(e),p=null!=(n=null==(r=l.current)?void 0:r.forceMount)?n:null==s?void 0:s.forceMount;R(()=>{if(!p)return a.item(i,null==s?void 0:s.id)},[p]);let f=$(i,o,[e.value,e.children,o],e.keywords),m=C(),g=P(e=>e.value&&e.value===f.current),b=P(e=>!!p||!1===a.filter()||!e.search||e.filtered.items.get(i)>0);function v(){var e,t;k(),null==(t=(e=l.current).onSelect)||t.call(e,f.current)}function k(){m.setState("value",f.current,!0)}if(c.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(y,v),()=>t.removeEventListener(y,v)},[b,e.onSelect,e.disabled]),!b)return null;let{disabled:w,value:E,onSelect:_,forceMount:A,keywords:N,...M}=e;return c.createElement(u.sG.div,{ref:(0,h.t)(o,t),...M,id:i,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!g,"data-disabled":!!w,"data-selected":!!g,onPointerMove:w||a.getDisablePointerSelection()?void 0:k,onClick:w?void 0:v},e.children)}),A=c.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,s=(0,d.B)(),a=c.useRef(null),l=c.useRef(null),p=(0,d.B)(),f=x(),m=P(e=>!!i||!1===f.filter()||!e.search||e.filtered.groups.has(s));R(()=>f.group(s),[]),$(s,a,[e.value,e.heading,l]);let g=c.useMemo(()=>({id:s,forceMount:i}),[i]);return c.createElement(u.sG.div,{ref:(0,h.t)(a,t),...o,"cmdk-group":"",role:"presentation",hidden:!m||void 0},r&&c.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:p},r),D(e,e=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?p:void 0},c.createElement(S.Provider,{value:g},e))))}),N=c.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=c.useRef(null),o=P(e=>!e.search);return r||o?c.createElement(u.sG.div,{ref:(0,h.t)(i,t),...n,"cmdk-separator":"",role:"separator"}):null}),M=c.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=null!=e.value,o=C(),s=P(e=>e.search),a=P(e=>e.selectedItemId),l=x();return c.useEffect(()=>{null!=e.value&&o.setState("search",e.value)},[e.value]),c.createElement(u.sG.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:i?e.value:s,onChange:e=>{i||o.setState("search",e.target.value),null==r||r(e.target.value)}})}),T=c.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=c.useRef(null),s=c.useRef(null),a=P(e=>e.selectedItemId),l=x();return c.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),c.createElement(u.sG.div,{ref:(0,h.t)(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":n,id:l.listId},D(e,e=>c.createElement("div",{ref:(0,h.t)(s,l.listInnerRef),"cmdk-list-sizer":""},e)))}),L=c.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:s,...a}=e;return c.createElement(l.Root,{open:r,onOpenChange:n},c.createElement(l.Portal,{container:s},c.createElement(l.Overlay,{"cmdk-overlay":"",className:i}),c.createElement(l.Content,{"aria-label":e.label,"cmdk-dialog":"",className:o},c.createElement(E,{ref:t,...a}))))}),I=Object.assign(E,{List:T,Item:_,Input:M,Group:A,Separator:N,Dialog:L,Empty:c.forwardRef((e,t)=>P(e=>0===e.filtered.count)?c.createElement(u.sG.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:c.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return c.createElement(u.sG.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},D(e,e=>c.createElement("div",{"aria-hidden":!0},e)))})});function j(e){let t=c.useRef(e);return R(()=>{t.current=e}),t}var R="undefined"==typeof window?c.useEffect:c.useLayoutEffect;function O(e){let t=c.useRef();return void 0===t.current&&(t.current=e()),t}function P(e){let t=C(),r=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,r,r)}function $(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=c.useRef(),o=x();return R(()=>{var s;let a=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():i.current}})(),l=n.map(e=>e.trim());o.value(e,a,l),null==(s=t.current)||s.setAttribute(b,a),i.current=a}),i}var z=()=>{let[e,t]=c.useState(),r=O(()=>new Map);return R(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function D(e,t){let r,{asChild:n,children:i}=e;return n&&c.isValidElement(i)?c.cloneElement("function"==typeof(r=i.type)?r(i.props):"render"in r?r.render(i.props):i,{ref:i.ref},t(i.props.children)):t(i)}var B={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}},64908:(e,t,r)=>{var n=r(65604),i=r(72657),o=r(86319),s=o&&o.isMap;e.exports=s?i(s):n},65273:(e,t,r)=>{var n=r(88055),i=r(898),o=r(62862),s=r(55823),a=r(18131),l=r(21275);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},65282:(e,t,r)=>{"use strict";function n(e){this.content=e}r.d(t,{S4:()=>B,ZF:()=>J,FK:()=>i,CU:()=>l,sX:()=>$,bP:()=>C,u$:()=>x,vI:()=>c,Sj:()=>z,Ji:()=>u}),n.prototype={constructor:n,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,r){var i=r&&r!=e?this.remove(r):this,o=i.find(e),s=i.content.slice();return -1==o?s.push(r||e,t):(s[o+1]=t,r&&(s[o]=r)),new n(s)},remove:function(e){var t=this.find(e);if(-1==t)return this;var r=this.content.slice();return r.splice(t,2),new n(r)},addToStart:function(e,t){return new n([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var r=this.remove(e).content.slice();return r.push(e,t),new n(r)},addBefore:function(e,t,r){var i=this.remove(t),o=i.content.slice(),s=i.find(e);return o.splice(-1==s?o.length:s,0,t,r),new n(o)},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=n.from(e)).size?new n(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=n.from(e)).size?new n(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=n.from(e);for(var r=0;r<e.content.length;r+=2)t=t.remove(e.content[r]);return t},toObject:function(){var e={};return this.forEach(function(t,r){e[t]=r}),e},get size(){return this.content.length>>1}},n.from=function(e){if(e instanceof n)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new n(t)};class i{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,r,n=0,i){for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;if(l>e&&!1!==r(a,n+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),r,n+i)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,n){let i="",o=!0;return this.nodesBetween(e,t,(s,a)=>{let l=s.isText?s.text.slice(Math.max(e,a)-a,t-a):s.isLeaf?n?"function"==typeof n?n(s):n:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&r&&(o?o=!1:i+=r),i+=l},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,n=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(n[n.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)n.push(e.content[o]);return new i(n,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let r=[],n=0;if(t>e)for(let i=0,o=0;o<t;i++){let s=this.content[i],a=o+s.nodeSize;a>e&&((o<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),r.push(s),n+=s.nodeSize),o=a}return new i(r,n)}cutByIndex(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let n=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return n[e]=t,new i(n,o)}addToStart(e){return new i([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new i(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,r=0;t<this.content.length;t++){let n=this.content[t];e(n,r,t),r+=n.nodeSize}}findDiffStart(e,t=0){return function e(t,r,n){for(let i=0;;i++){if(i==t.childCount||i==r.childCount)return t.childCount==r.childCount?null:n;let o=t.child(i),s=r.child(i);if(o==s){n+=o.nodeSize;continue}if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)n++;return n}if(o.content.size||s.content.size){let t=e(o.content,s.content,n+1);if(null!=t)return t}n+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return function e(t,r,n,i){for(let o=t.childCount,s=r.childCount;;){if(0==o||0==s)return o==s?null:{a:n,b:i};let a=t.child(--o),l=r.child(--s),c=a.nodeSize;if(a==l){n-=c,i-=c;continue}if(!a.sameMarkup(l))return{a:n,b:i};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--,i--;return{a:n,b:i}}if(a.content.size||l.content.size){let t=e(a.content,l.content,n-1,i-1);if(t)return t}n-=c,i-=c}}(this,e,t,r)}findIndex(e){if(0==e)return s(0,e);if(e==this.size)return s(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let n=r+this.child(t).nodeSize;if(n>=e){if(n==e)return s(t+1,n);return s(t,r)}r=n}}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 i.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return i.empty;let t,r=0;for(let n=0;n<e.length;n++){let i=e[n];r+=i.nodeSize,n&&i.isText&&e[n-1].sameMarkup(i)?(t||(t=e.slice(0,n)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new i(t||e,r)}static from(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}i.empty=new i([],0);let o={index:0,offset:0};function s(e,t){return o.index=e,o.offset=t,o}function a(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let r=Array.isArray(e);if(Array.isArray(t)!=r)return!1;if(r){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!a(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!a(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class l{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let n=0;n<e.length;n++){let i=e[n];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,n));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,n)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||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&&a(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 r=e.marks[t.type];if(!r)throw RangeError(`There is no mark type ${t.type} in this schema`);let n=r.create(t.attrs);return r.checkAttrs(n.attrs),n}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return l.none;if(e instanceof l)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}l.none=[];class c extends Error{}class u{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=function e(t,r,n,i){let{index:o,offset:s}=t.findIndex(r),a=t.maybeChild(o);if(s==r||a.isText)return i&&!i.canReplace(o,o,n)?null:t.cut(0,r).append(n).append(t.cut(r));let l=e(a.content,r-s-1,n,a);return l&&t.replaceChild(o,a.copy(l))}(this.content,e+this.openStart,t);return r&&new u(r,this.openStart,this.openEnd)}removeBetween(e,t){return new u(function e(t,r,n){let{index:i,offset:o}=t.findIndex(r),s=t.maybeChild(i),{index:a,offset:l}=t.findIndex(n);if(o==r||s.isText){if(l!=n&&!t.child(a).isText)throw RangeError("Removing non-flat range");return t.cut(0,r).append(t.cut(n))}if(i!=a)throw RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,r-o-1,n-o-1)))}(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 u.empty;let r=t.openStart||0,n=t.openEnd||0;if("number"!=typeof r||"number"!=typeof n)throw RangeError("Invalid input for Slice.fromJSON");return new u(i.fromJSON(e,t.content),r,n)}static maxOpen(e,t=!0){let r=0,n=0;for(let n=e.firstChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.firstChild)r++;for(let r=e.lastChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.lastChild)n++;return new u(e,r,n)}}function d(e,t){if(!t.type.compatibleContent(e.type))throw new c("Cannot join "+t.type.name+" onto "+e.type.name)}function h(e,t,r){let n=e.node(r);return d(n,t.node(r)),n}function p(e,t){let r=t.length-1;r>=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function f(e,t,r,n){let i=(t||e).node(r),o=0,s=t?t.index(r):i.childCount;e&&(o=e.index(r),e.depth>r?o++:e.textOffset&&(p(e.nodeAfter,n),o++));for(let e=o;e<s;e++)p(i.child(e),n);t&&t.depth==r&&t.textOffset&&p(t.nodeBefore,n)}function m(e,t){return e.type.checkContent(t),e.copy(t)}function g(e,t,r){let n=[];return f(null,e,r,n),e.depth>r&&p(m(h(e,t,r+1),g(e,t,r+1)),n),f(t,null,r,n),new i(n)}u.empty=new u(i.empty,0,0);class y{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,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 r=this.pos-this.path[this.path.length-1],n=e.child(t);return r?e.child(t).cut(r):n}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 r=this.path[3*t],n=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)n+=r.child(t).nodeSize;return n}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return l.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),n=e.maybeChild(t);if(!r){let e=r;r=n,n=e}let i=r.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||n&&i[o].isInSet(n.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,n=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)!1!==r[i].type.spec.inclusive||n&&r[i].isInSet(n.marks)||(r=r[i--].removeFromSet(r));return r}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 r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new x(this,e,r);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 r=[],n=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),s=i-o;if(r.push(t,e,n+o),!s||(t=t.child(e)).isText)break;i=s-1,n+=o+1}return new y(t,r,i)}static resolveCached(e,t){let r=k.get(e);if(r)for(let e=0;e<r.elts.length;e++){let n=r.elts[e];if(n.pos==t)return n}else k.set(e,r=new b);let n=r.elts[r.i]=y.resolve(e,t);return r.i=(r.i+1)%v,n}}class b{constructor(){this.elts=[],this.i=0}}let v=12,k=new WeakMap;class x{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}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 w=Object.create(null);class C{constructor(e,t,r,n=l.none){this.type=e,this.attrs=t,this.marks=n,this.content=r||i.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,r,n=0){this.content.nodesBetween(e,t,r,n,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,r,n){return this.content.textBetween(e,t,r,n)}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,r){return this.type==e&&a(this.attrs,t||e.defaultAttrs||w)&&l.sameSet(this.marks,r||l.none)}copy(e=null){return e==this.content?this:new C(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new C(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,r=!1){if(e==t)return u.empty;let n=this.resolve(e),i=this.resolve(t),o=r?0:n.sharedDepth(t),s=n.start(o);return new u(n.node(o).content.cut(n.pos-s,i.pos-s),n.depth-o,i.depth-o)}replace(e,t,r){var n=this.resolve(e),o=this.resolve(t);if(r.openStart>n.depth)throw new c("Inserted content deeper than insertion position");if(n.depth-r.openStart!=o.depth-r.openEnd)throw new c("Inconsistent open depths");return function e(t,r,n,o){let s=t.index(o),a=t.node(o);if(s==r.index(o)&&o<t.depth-n.openStart){let i=e(t,r,n,o+1);return a.copy(a.content.replaceChild(s,i))}if(!n.content.size)return m(a,g(t,r,o));if(n.openStart||n.openEnd||t.depth!=o||r.depth!=o){let{start:e,end:s}=function(e,t){let r=t.depth-e.openStart,n=t.node(r).copy(e.content);for(let e=r-1;e>=0;e--)n=t.node(e).copy(i.from(n));return{start:n.resolveNoCache(e.openStart+r),end:n.resolveNoCache(n.content.size-e.openEnd-r)}}(n,t);return m(a,function e(t,r,n,o,s){let a=t.depth>s&&h(t,r,s+1),l=o.depth>s&&h(n,o,s+1),c=[];return f(null,t,s,c),a&&l&&r.index(s)==n.index(s)?(d(a,l),p(m(a,e(t,r,n,o,s+1)),c)):(a&&p(m(a,g(t,r,s+1)),c),f(r,n,s,c),l&&p(m(l,g(n,o,s+1)),c)),f(o,null,s,c),new i(c)}(t,e,s,r,o))}{let e=t.parent,i=e.content;return m(e,i.cut(0,t.parentOffset).append(n.content).append(i.cut(r.parentOffset)))}}(n,o,r,0)}nodeAt(e){for(let t=this;;){let{index:r,offset:n}=t.content.findIndex(e);if(!(t=t.maybeChild(r)))return null;if(n==e||t.isText)return t;e-=n+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let n=this.content.child(t-1);return{node:n,index:t-1,offset:r-n.nodeSize}}resolve(e){return y.resolveCached(this,e)}resolveNoCache(e){return y.resolve(this,e)}rangeHasMark(e,t,r){let n=!1;return t>e&&this.nodesBetween(e,t,e=>(r.isInSet(e.marks)&&(n=!0),!n)),n}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()+")"),E(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,r=i.empty,n=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,n,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=n;e<o;e++)if(!this.type.allowsMarks(r.child(e).marks))return!1;return!0}canReplaceWith(e,t,r,n){if(n&&!this.type.allowsMarks(n))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return!!o&&o.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=l.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!l.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 r;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");r=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,r)}let n=i.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,n,r);return o.type.checkAttrs(o.attrs),o}}C.prototype.text=void 0;class S extends C{constructor(e,t,r,n){if(super(e,t,null,n),!r)throw RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(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 S(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new S(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 E(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class _{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var r;let n,i=new A(e,t);if(null==i.next)return _.empty;let o=function e(t){let r=[];do r.push(function(t){let r=[];do r.push(function(t){let r=function(t){if(t.eat("(")){let r=e(t);return t.eat(")")||t.err("Missing closing paren"),r}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let i=[];for(let e in r){let n=r[e];n.isInGroup(t)&&i.push(n)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))r={type:"plus",expr:r};else if(t.eat("*"))r={type:"star",expr:r};else if(t.eat("?"))r={type:"opt",expr:r};else if(t.eat("{"))r=function(e,t){let r=N(e),n=r;return e.eat(",")&&(n="}"!=e.next?N(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}(t,r);else break;return r}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==r.length?r[0]:{type:"seq",exprs:r}}(t));while(t.eat("|"));return 1==r.length?r[0]:{type:"choice",exprs:r}}(i);i.next&&i.err("Unexpected trailing text");let s=(r=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,r)=>t.concat(e(r,o)),[]);if("seq"==t.type)for(let n=0;;n++){let s=e(t.exprs[n],o);if(n==t.exprs.length-1)return s;i(s,o=r())}else if("star"==t.type){let s=r();return n(o,s),i(e(t.expr,s),s),[n(s)]}else if("plus"==t.type){let s=r();return i(e(t.expr,o),s),i(e(t.expr,s),s),[n(s)]}else if("opt"==t.type)return[n(o)].concat(e(t.expr,o));else if("range"==t.type){let s=o;for(let n=0;n<t.min;n++){let n=r();i(e(t.expr,s),n),s=n}if(-1==t.max)i(e(t.expr,s),s);else for(let o=t.min;o<t.max;o++){let o=r();n(s,o),i(e(t.expr,s),o),s=o}return[n(s)]}else if("name"==t.type)return[n(o,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),r()),t;function r(){return t.push([])-1}function n(e,r,n){let i={term:n,to:r};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}}(o),n=Object.create(null),function e(t){let i=[];t.forEach(e=>{r[e].forEach(({term:e,to:t})=>{let n;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(n=i[t][1]);T(r,t).forEach(t=>{n||i.push([e,n=[]]),-1==n.indexOf(t)&&n.push(t)})}})});let o=n[t.join(",")]=new _(t.indexOf(r.length-1)>-1);for(let t=0;t<i.length;t++){let r=i[t][1].sort(M);o.next.push({type:i[t][0],next:n[r.join(",")]||e(r)})}return o}(T(r,0)));return function(e,t){for(let r=0,n=[e];r<n.length;r++){let e=n[r],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:r,next:s}=e.next[t];o.push(r.name),i&&!(r.isText||r.hasRequiredAttrs())&&(i=!1),-1==n.indexOf(s)&&n.push(s)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,i),s}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,r=e.childCount){let n=this;for(let i=t;n&&i<r;i++)n=n.matchType(e.child(i).type);return n}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 r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let n=[this];return function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return i.from(a.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:r}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==n.indexOf(r)){n.push(r);let e=o(r,a.concat(t));if(e)return e}}return null}(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),r=[{match:this,type:null,via:null}];for(;r.length;){let n=r.shift(),i=n.match;if(i.matchType(e)){let e=[];for(let t=n;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:s}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||n.type&&!s.validEnd||(r.push({match:o.contentMatch,type:o,via:n}),t[o.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=[];return!function t(r){e.push(r);for(let n=0;n<r.next.length;n++)-1==e.indexOf(r.next[n].next)&&t(r.next[n].next)}(this),e.map((t,r)=>{let n=r+(t.validEnd?"*":" ")+" ";for(let r=0;r<t.next.length;r++)n+=(r?", ":"")+t.next[r].type.name+"->"+e.indexOf(t.next[r].next);return n}).join("\n")}}_.empty=new _(!0);class A{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 N(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function M(e,t){return t-e}function T(e,t){let r=[];return function t(n){let i=e[n];if(1==i.length&&!i[0].term)return t(i[0].to);r.push(n);for(let e=0;e<i.length;e++){let{term:n,to:o}=i[e];n||-1!=r.indexOf(o)||t(o)}}(t),r.sort(M)}function L(e){let t=Object.create(null);for(let r in e){let n=e[r];if(!n.hasDefault)return null;t[r]=n.default}return t}function I(e,t){let r=Object.create(null);for(let n in e){let i=t&&t[n];if(void 0===i){let t=e[n];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+n)}r[n]=i}return r}function j(e,t,r,n){for(let n in t)if(!(n in e))throw RangeError(`Unsupported attribute ${n} for ${r} of type ${n}`);for(let r in e){let n=e[r];n.validate&&n.validate(t[r])}}function R(e,t){let r=Object.create(null);if(t)for(let n in t)r[n]=new P(e,n,t[n]);return r}class O{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=R(e,r.attrs),this.defaultAttrs=L(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_.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:I(this.attrs,e)}create(e=null,t,r){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new C(this,this.computeAttrs(e),i.from(t),l.setFrom(r))}createChecked(e=null,t,r){return t=i.from(t),this.checkContent(t),new C(this,this.computeAttrs(e),t,l.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),(t=i.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let n=this.contentMatch.matchFragment(t),o=n&&n.fillBefore(i.empty,!0);return o?new C(this,e,t.append(o),l.setFrom(r)):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){j(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 r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:l.none:e}static compile(e,t){let r=Object.create(null);e.forEach((e,n)=>r[e]=new O(e,t,n));let n=t.spec.topNode||"doc";if(!r[n])throw RangeError("Schema is missing its top node type ('"+n+"')");if(!r.text)throw RangeError("Every schema needs a 'text' type");for(let e in r.text.attrs)throw RangeError("The text node type should not have attributes");return r}}class P{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate="string"==typeof r.validate?function(e,t,r){let n=r.split("|");return r=>{let i=null===r?"null":typeof r;if(0>n.indexOf(i))throw RangeError(`Expected value of type ${n} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ${constructor(e,t,r,n){this.name=e,this.rank=t,this.schema=r,this.spec=n,this.attrs=R(e,n.attrs),this.excluded=null;let i=L(this.attrs);this.instance=i?new l(this,i):null}create(e=null){return!e&&this.instance?this.instance:new l(this,I(this.attrs,e))}static compile(e,t){let r=Object.create(null),n=0;return e.forEach((e,i)=>r[e]=new $(e,n++,t,i)),r}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){j(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class z{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=n.from(e.nodes),t.marks=n.from(e.marks||{}),this.nodes=O.compile(this.spec.nodes,this),this.marks=$.compile(this.spec.marks,this);let r=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],n=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=r[n]||(r[n]=_.parse(n,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?D(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],r=t.spec.excludes;t.excluded=null==r?[t]:""==r?[]:D(this,r.split(" "))}this.nodeFromJSON=e=>C.fromJSON(this,e),this.markFromJSON=e=>l.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,n){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof O){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,r,n)}text(e,t){let r=this.nodes.text;return new S(r,r.defaultAttrs,e,l.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 D(e,t){let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e.marks[i],s=o;if(o)r.push(o);else for(let t in e.marks){let n=e.marks[t];("_"==i||n.spec.group&&n.spec.group.split(" ").indexOf(i)>-1)&&r.push(s=n)}if(!s)throw SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}class B{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>r.indexOf(t)&&r.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let r=e.nodes[t.node];return r.contentMatch.matchType(r)})}parse(e,t={}){let r=new W(this,t,!1);return r.addAll(e,l.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new W(this,t,!0);return r.addAll(e,l.none,t.from,t.to),u.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){var n,i;let r=this.tags[o];if(n=e,i=r.tag,(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,i)&&(void 0===r.namespace||e.namespaceURI==r.namespace)&&(!r.context||t.matchesContext(r.context))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}matchStyle(e,t,r,n){for(let i=n?this.styles.indexOf(n)+1:0;i<this.styles.length;i++){let n=this.styles[i],o=n.style;if(0==o.indexOf(e)&&(!n.context||r.matchesContext(n.context))&&(!(o.length>e.length)||61==o.charCodeAt(e.length)&&o.slice(e.length+1)==t)){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}static schemaRules(e){let t=[];function r(e){let r=null==e.priority?50:e.priority,n=0;for(;n<t.length;n++){let e=t[n];if((null==e.priority?50:e.priority)<r)break}t.splice(n,0,e)}for(let t in e.marks){let n=e.marks[t].spec.parseDOM;n&&n.forEach(e=>{r(e=V(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let n=e.nodes[t].spec.parseDOM;n&&n.forEach(e=>{r(e=V(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new B(e,B.schemaRules(e)))}}let F={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},H={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},U={ol:!0,ul:!0};function G(e,t,r){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&r}class q{constructor(e,t,r,n,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=n,this.options=o,this.content=[],this.activeMarks=l.none,this.match=i||(4&o?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(i.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,r;return(r=t.findWrapping(e.type))?(this.match=t,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=i.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(i.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&&!F.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class W{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let n=t.topNode,i,o=G(null,t.preserveWhitespace,0)|4*!!r;i=n?new q(n.type,n.attrs,l.none,!0,t.topMatch||n.type.contentMatch,o):r?new q(null,null,l.none,!0,null,o):new q(e.schema.topNodeType,null,l.none,!0,null,o),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 r=e.nodeValue,n=this.top,i=2&n.options?"full":this.localPreserveWS||(1&n.options)>0,{schema:o}=this.parser;if("full"===i||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if("full"===i)r=r.replace(/\r\n?/g,"\n");else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let e=r.split(/\r?\n|\r/);for(let r=0;r<e.length;r++)r&&this.insertNode(o.linebreakReplacement.create(),t,!0),e[r]&&this.insertNode(o.text(e[r]),t,!/\S/.test(e[r]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let t=n.content[n.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let n=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;U.hasOwnProperty(o)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&U.hasOwnProperty(e)&&r?(r.appendChild(t),t=r):"li"==e?r=t:e&&(r=null)}}(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));r:if(a?a.ignore:H.hasOwnProperty(o))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 r,n=this.needsBlock;if(F.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),r=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break r}let s=a&&a.skip?t:this.readStyles(e,t);s&&this.addAll(e,s),r&&this.sync(i),this.needsBlock=n}else{let r=this.readStyles(e,t);r&&this.addElementByRule(e,a,r,!1===a.consuming?s:void 0)}this.localPreserveWS=n}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 r=e.style;if(r&&r.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let n=this.parser.matchedStyles[e],i=r.getPropertyValue(n);if(i)for(let e;;){let r=this.parser.matchStyle(n,i,this,e);if(!r)break;if(r.ignore)return null;if(t=r.clearMark?t.filter(e=>!r.clearMark(e)):t.concat(this.parser.schema.marks[r.mark].create(r.attrs)),!1===r.consuming)e=r;else break}}return t}addElementByRule(e,t,r,n){let i,o;if(t.node)if((o=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(o.create(t.attrs),r,"BR"==e.nodeName)||this.leafFallback(e,r);else{let e=this.enter(o,t.attrs||null,r,t.preserveWhitespace);e&&(i=!0,r=e)}else{let e=this.parser.schema.marks[t.mark];r=r.concat(e.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,r,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,r,!1));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n,r),this.findAround(e,n,!1)}i&&this.sync(s)&&this.open--}addAll(e,t,r,n){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,s=null==n?null:e.childNodes[n];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let n,i;for(let t=this.open,o=0;t>=0;t--){let s=this.nodes[t],a=s.findWrapping(e);if(a&&(!n||n.length>a.length+o)&&(n=a,i=s,!a.length))break;if(s.solid){if(r)break;o+=2}}if(!n)return null;this.sync(i);for(let e=0;e<n.length;e++)t=this.enterInner(n[e],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let n=this.findPlace(e,t,r);if(n){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let r=l.none;for(let i of n.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):K(i.type,e.type))&&(r=i.addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r,n){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,n)),i}enterInner(e,t,r,n=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=G(e,i,o.options);4&o.options&&0==o.content.length&&(s|=4);let a=l.none;return r=r.filter(t=>(o.type?!o.type.allowsMarkType(t.type):!K(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new q(e,t,a,n,null,s)),this.open++,r}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|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let t=r.length-1;t>=0;t--)e+=r[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].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,r){if(e!=t&&this.find)for(let n=0;n<this.find.length;n++)null==this.find[n].pos&&1==e.nodeType&&e.contains(this.find[n].node)&&t.compareDocumentPosition(this.find[n].node)&(r?2:4)&&(this.find[n].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("/"),r=this.options.context,n=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+ +!n,o=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=i;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&n?this.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!e||e.name!=a&&!e.isInGroup(a))return!1;s--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function V(e){let t={};for(let r in e)t[r]=e[r];return t}function K(e,t){let r=t.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let r=0;r<e.edgeCount;r++){let{type:n,next:i}=e.edge(r);if(n==t||0>o.indexOf(i)&&s(i))return!0}};if(s(i.contentMatch))return!0}}class J{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=X(t).createDocumentFragment());let n=r,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let r=0,o=0;for(;r<i.length&&o<e.marks.length;){let t=e.marks[o];if(!this.marks[t.type.name]){o++;continue}if(!t.eq(i[r][0])||!1===t.type.spec.spanning)break;r++,o++}for(;r<i.length;)n=i.pop()[1];for(;o<e.marks.length;){let r=e.marks[o++],s=this.serializeMark(r,e.isInline,t);s&&(i.push([r,n]),n.appendChild(s.dom),n=s.contentDOM||s.dom)}}n.appendChild(this.serializeNodeInner(e,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:n}=Y(X(t),this.nodes[e.type.name](e),null,e.attrs);if(n){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,n)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let n=e.marks.length-1;n>=0;n--){let i=this.serializeMark(e.marks[n],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let n=this.marks[e.type.name];return n&&Y(X(r),n(e,t),null,e.attrs)}static renderSpec(e,t,r=null,n){return Y(e,t,r,n)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new J(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Z(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Z(e.marks)}}function Z(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function X(e){return e.document||window.document}let Q=new WeakMap;function Y(e,t,r,n){let i,o,s;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 a=t[0],l;if("string"!=typeof a)throw RangeError("Invalid array passed to renderSpec");if(n&&(void 0===(o=Q.get(n))&&Q.set(n,(s=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])s||(s=[]),s.push(t);else for(let r=0;r<t.length;r++)e(t[r]);else for(let r in t)e(t[r])}(n),o=s)),l=o)&&l.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 c=a.indexOf(" ");c>0&&(r=a.slice(0,c),a=a.slice(c+1));let u=r?e.createElementNS(r,a):e.createElement(a),d=t[1],h=1;if(d&&"object"==typeof d&&null==d.nodeType&&!Array.isArray(d)){for(let e in h=2,d)if(null!=d[e]){let t=e.indexOf(" ");t>0?u.setAttributeNS(e.slice(0,t),e.slice(t+1),d[e]):"style"==e&&u.style?u.style.cssText=d[e]:u.setAttribute(e,d[e])}}for(let o=h;o<t.length;o++){let s=t[o];if(0===s){if(o<t.length-1||o>h)throw RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}{let{dom:t,contentDOM:o}=Y(e,s,r,n);if(u.appendChild(t),o){if(i)throw RangeError("Multiple content holes");i=o}}}return{dom:u,contentDOM:i}}},65310:(e,t,r)=>{var n=r(39942);e.exports=r(93733)(function(e,t,r){n(e,t,r)})},65409:(e,t,r)=>{var n=r(11254);e.exports=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},65604:(e,t,r)=>{var n=r(20243),i=r(88046);e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},66158:(e,t,r)=>{"use strict";var n=r(11581),i=r(84756),o=r(48095),s=r(31769),a=r(32724).normalizeRanks,l=r(93598),c=r(32724).removeEmptyRanks,u=r(99671),d=r(31585),h=r(56392),p=r(25555),f=r(94104),m=r(32724),g=r(143).Graph;e.exports=function(e,t){var r=t&&t.debugTiming?m.time:m.notime;r("layout",function(){var t=r(" buildLayoutGraph",function(){var t,r,i;return t=e,r=new g({multigraph:!0,compound:!0}),i=_(t.graph()),r.setGraph(n.merge({},b,E(i,y),n.pick(i,v))),n.forEach(t.nodes(),function(e){var i=_(t.node(e));r.setNode(e,n.defaults(E(i,k),x)),r.setParent(e,t.parent(e))}),n.forEach(t.edges(),function(e){var i=_(t.edge(e));r.setEdge(e,n.merge({},C,E(i,w),n.pick(i,S)))}),r});r(" runLayout",function(){var e,g;e=t,(g=r)(" makeSpaceForEdgeLabels",function(){var t,r;r=(t=e).graph(),r.ranksep/=2,n.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}),g(" removeSelfEdges",function(){var t;t=e,n.forEach(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),g(" acyclic",function(){i.run(e)}),g(" nestingGraph.run",function(){u.run(e)}),g(" rank",function(){s(m.asNonCompoundGraph(e))}),g(" injectEdgeLabelProxies",function(){var t;t=e,n.forEach(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e:e};m.addDummyNode(t,"edge-proxy",i,"_ep")}})}),g(" removeEmptyRanks",function(){c(e)}),g(" nestingGraph.cleanup",function(){u.cleanup(e)}),g(" normalizeRanks",function(){a(e)}),g(" assignRankMinMax",function(){var t,r;t=e,r=0,n.forEach(t.nodes(),function(e){var i=t.node(e);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,r=n.max(r,i.maxRank))}),t.graph().maxRank=r}),g(" removeEdgeLabelProxies",function(){var t;t=e,n.forEach(t.nodes(),function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),g(" normalize.run",function(){o.run(e)}),g(" parentDummyChains",function(){l(e)}),g(" addBorderSegments",function(){d(e)}),g(" order",function(){p(e)}),g(" insertSelfEdges",function(){var t,r;t=e,r=m.buildLayerMatrix(t),n.forEach(r,function(e){var r=0;n.forEach(e,function(e,i){var o=t.node(e);o.order=i+r,n.forEach(o.selfEdges,function(e){m.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}),g(" adjustCoordinateSystem",function(){h.adjust(e)}),g(" position",function(){f(e)}),g(" positionSelfEdges",function(){var t;t=e,n.forEach(t.nodes(),function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,o=n.y,s=r.x-i,a=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{x:i+s,y:o},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],r.label.x=r.x,r.label.y=r.y}})}),g(" removeBorderNodes",function(){var t;t=e,n.forEach(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),i=t.node(r.borderTop),o=t.node(r.borderBottom),s=t.node(n.last(r.borderLeft)),a=t.node(n.last(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(o.y-i.y),r.x=s.x+r.width/2,r.y=i.y+r.height/2}}),n.forEach(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}),g(" normalize.undo",function(){o.undo(e)}),g(" fixupEdgeLabelCoords",function(){var t;t=e,n.forEach(t.edges(),function(e){var r=t.edge(e);if(n.has(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),g(" undoCoordinateSystem",function(){h.undo(e)}),g(" translateGraph",function(){!function(e){var t=1/0,r=0,i=1/0,o=0,s=e.graph(),a=s.marginx||0,l=s.marginy||0;function c(e){var n=e.x,s=e.y,a=e.width,l=e.height;t=Math.min(t,n-a/2),r=Math.max(r,n+a/2),i=Math.min(i,s-l/2),o=Math.max(o,s+l/2)}n.forEach(e.nodes(),function(t){c(e.node(t))}),n.forEach(e.edges(),function(t){var r=e.edge(t);n.has(r,"x")&&c(r)}),t-=a,i-=l,n.forEach(e.nodes(),function(r){var n=e.node(r);n.x-=t,n.y-=i}),n.forEach(e.edges(),function(r){var o=e.edge(r);n.forEach(o.points,function(e){e.x-=t,e.y-=i}),n.has(o,"x")&&(o.x-=t),n.has(o,"y")&&(o.y-=i)}),s.width=r-t+a,s.height=o-i+l}(e)}),g(" assignNodeIntersects",function(){var t;t=e,n.forEach(t.edges(),function(e){var r,n,i=t.edge(e),o=t.node(e.v),s=t.node(e.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=s,n=o),i.points.unshift(m.intersectRect(o,r)),i.points.push(m.intersectRect(s,n))})}),g(" reversePoints",function(){var t;t=e,n.forEach(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}),g(" acyclic.undo",function(){i.undo(e)})}),r(" updateInputGraph",function(){var r,i;r=e,i=t,n.forEach(r.nodes(),function(e){var t=r.node(e),n=i.node(e);t&&(t.x=n.x,t.y=n.y,i.children(e).length&&(t.width=n.width,t.height=n.height))}),n.forEach(r.edges(),function(e){var t=r.edge(e),o=i.edge(e);t.points=o.points,n.has(o,"x")&&(t.x=o.x,t.y=o.y)}),r.graph().width=i.graph().width,r.graph().height=i.graph().height})})};var y=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},v=["acyclicer","ranker","rankdir","align"],k=["width","height"],x={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},S=["labelpos"];function E(e,t){return n.mapValues(n.pick(e,t),Number)}function _(e){var t={};return n.forEach(e,function(e,r){t[r.toLowerCase()]=e}),t}},66613:(e,t,r)=>{var n=r(8665);e.exports=function(e){return n(this,e).get(e)}},67007:(e,t,r)=>{e.exports=r(14532)},67070:(e,t,r)=>{var n=r(77651),i=r(24837);e.exports=function(e,t){t=n(t,e);for(var r=0,o=t.length;null!=e&&r<o;)e=e[i(t[r++])];return r&&r==o?e:void 0}},67819:(e,t,r)=>{var n=r(43188),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,s,a){var l=1&r,c=n(e),u=c.length;if(u!=n(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:i.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++d<u;){var y=e[h=c[d]],b=t[h];if(o)var v=l?o(b,y,h,t,e,a):o(y,b,h,e,t,a);if(!(void 0===v?y===b||s(y,b,r,o,a):v)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var k=e.constructor,x=t.constructor;k!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof k&&k instanceof k&&"function"==typeof x&&x instanceof x)&&(m=!1)}return a.delete(e),a.delete(t),m}},68105:(e,t,r)=>{var n=r(12814);e.exports=function(e,t,r){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(void 0===l?a==a&&!n(a):r(a,l)))var l=a,c=s}return c}},68584:(e,t,r)=>{var n=r(88463),i=r(56222);e.exports={write:function(e){var t,r,i={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e,n.map(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),o={v:e};return n.isUndefined(r)||(o.value=r),n.isUndefined(i)||(o.parent=i),o})),edges:(r=e,n.map(r.edges(),function(e){var t=r.edge(e),i={v:e.v,w:e.w};return n.isUndefined(e.name)||(i.name=e.name),n.isUndefined(t)||(i.value=t),i}))};return n.isUndefined(e.graph())||(i.value=n.clone(e.graph())),i},read:function(e){var t=new i(e.options).setGraph(e.value);return n.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),n.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},68591:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},69048:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},69239:(e,t,r)=>{var n=r(96348),i=r(69048);e.exports=function(e,t,r){(void 0===r||i(e[t],r))&&(void 0!==r||t in e)||n(e,t,r)}},70345:(e,t,r)=>{var n=r(30727);e.exports=function(e){return n(this.__data__,e)>-1}},70501:e=>{e.exports=function(e,t){return e>t}},71097:(e,t,r)=>{"use strict";var n=r(11581);e.exports=function(e,t){var r={};return n.forEach(e,function(e,t){var i=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};n.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),n.forEach(t.edges(),function(e){var t=r[e.v],i=r[e.w];n.isUndefined(t)||n.isUndefined(i)||(i.indegree++,t.out.push(r[e.w]))}),function(e){for(var t=[];e.length;){var r=e.pop();t.push(r),n.forEach(r.in.reverse(),function(e){return function(t){!t.merged&&(n.isUndefined(t.barycenter)||n.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),n.forEach(r.out,function(t){return function(r){r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return n.map(n.filter(t,function(e){return!e.merged}),function(e){return n.pick(e,["vs","i","barycenter","weight"])})}(n.filter(r,function(e){return!e.indegree}))}},71559:(e,t,r)=>{e.exports=r(72615)("length")},71633:e=>{e.exports=function(e){return function(t,r,n){for(var i=-1,o=Object(t),s=n(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===r(o[l],l,o))break}return t}}},72043:(e,t,r)=>{var n=r(96348),i=r(69048),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&i(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},72615:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},72657:e=>{e.exports=function(e){return function(t){return e(t)}}},72821:(e,t,r)=>{var n=r(78591),i=r(17021),o=r(56513),s=r(77664),a=r(88981);e.exports=function(e,t,r){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,r);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},73838:e=>{e.exports=function(e){return void 0===e}},74166:(e,t,r)=>{var n=r(19916);e.exports=function(e,t){return n(e,t,"pre")}},74205:(e,t,r)=>{e.exports=r(32771)(Object.getPrototypeOf,Object)},74249:(e,t,r)=>{var n=r(88463);e.exports=function(e){var t,r={},i=[];return n.each(e.nodes(),function(o){t=[],function i(o){n.has(r,o)||(r[o]=!0,t.push(o),n.each(e.successors(o),i),n.each(e.predecessors(o),i))}(o),t.length&&i.push(t)}),i}},75197:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},75552:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},76111:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(66206).A)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]])},76827:e=>{e.exports=function(e){return e!=e}},77078:(e,t,r)=>{var n=r(29974),i=r(65409),o=r(63120);e.exports=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o},77185:(e,t,r)=>{var n=r(19916);e.exports=function(e,t){return n(e,t,"post")}},77220:(e,t,r)=>{var n=r(10548),i=r(84039);e.exports=function e(t,r,o,s,a){var l=-1,c=t.length;for(o||(o=i),a||(a=[]);++l<c;){var u=t[l];r>0&&o(u)?r>1?e(u,r-1,o,s,a):n(a,u):s||(a[a.length]=u)}return a}},77512:(e,t,r)=>{var n=r(2598),i=0;e.exports=function(e){var t=++i;return n(e)+t}},77599:(e,t,r)=>{var n=r(59745),i=r(49717),o=r(95285);e.exports=function(e){return n(e,o,i)}},77651:(e,t,r)=>{var n=r(91347),i=r(36942),o=r(89176),s=r(2598);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(s(e))}},77664:(e,t,r)=>{var n=r(98175),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},78414:(e,t,r)=>{var n=r(59919),i=r(6164),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},78591:(e,t,r)=>{var n=r(55746);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},78815:(e,t,r)=>{var n=r(72615),i=r(53901),o=r(36942),s=r(24837);e.exports=function(e){return o(e)?n(s(e)):i(e)}},78928:(e,t,r)=>{"use strict";var n=r(11581),i=r(33405),o=r(33499).slack,s=r(33499).longestPath,a=r(143).alg.preorder,l=r(143).alg.postorder,c=r(32724).simplify;function u(e){s(e=c(e));var t,r,n=i(e);for(p(n),d(n,e);t=f(n);)r=m(n,e,t),g(n,e,t,r)}function d(e,t){var r=l(e,e.nodes());r=r.slice(0,r.length-1),n.forEach(r,function(r){var n,i,o,s;n=e,i=t,o=r,s=n.node(o).parent,n.edge(o,s).cutvalue=h(n,i,o)})}function h(e,t,r){var i=e.node(r).parent,o=!0,s=t.edge(r,i),a=0;return s||(o=!1,s=t.edge(i,r)),a=s.weight,n.forEach(t.nodeEdges(r),function(n){var s=n.v===r,l=s?n.w:n.v;if(l!==i){var c,u,d,h=s===o,p=t.edge(n).weight;if(a+=h?p:-p,c=e,u=r,d=l,c.hasEdge(u,d)){var f=e.edge(r,l).cutvalue;a+=h?-f:f}}}),a}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,i,o,s){var a=i,l=t.node(o);return r[o]=!0,n.forEach(t.neighbors(o),function(s){n.has(r,s)||(i=e(t,r,i,s,o))}),l.low=a,l.lim=i++,s?l.parent=s:delete l.parent,i}(e,{},1,t)}function f(e){return n.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function m(e,t,r){var i=r.v,s=r.w;t.hasEdge(i,s)||(i=r.w,s=r.v);var a=e.node(i),l=e.node(s),c=a,u=!1;a.lim>l.lim&&(c=l,u=!0);var d=n.filter(t.edges(),function(t){return u===y(e,e.node(t.v),c)&&u!==y(e,e.node(t.w),c)});return n.minBy(d,function(e){return o(t,e)})}function g(e,t,r,i){var o,s,l,c,u=r.v,h=r.w;e.removeEdge(u,h),e.setEdge(i.v,i.w,{}),p(e),d(e,t),o=e,s=t,l=n.find(o.nodes(),function(e){return!s.node(e).parent}),c=(c=a(o,l)).slice(1),n.forEach(c,function(e){var t=o.node(e).parent,r=s.edge(e,t),n=!1;r||(r=s.edge(t,e),n=!0),s.node(e).rank=s.node(t).rank+(n?r.minlen:-r.minlen)})}function y(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}e.exports=u,u.initLowLimValues=p,u.initCutValues=d,u.calcCutValue=h,u.leaveEdge=f,u.enterEdge=m,u.exchangeEdges=g},78968:(e,t,r)=>{var n=r(10338),i=r(96928),o=r(2627),s=r(91347);e.exports=function(e,t){return(s(e)?n:i)(e,o(t,3))}},80041:(e,t,r)=>{var n=r(84364),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},80791:e=>{e.exports=function(){return[]}},81543:(e,t,r)=>{var n=r(86366),i=r(91347),o=r(88046);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==n(e)}},81597:(e,t,r)=>{"use strict";r.d(t,{sG:()=>h});var n=r(1856),i=r.t(n,2);r(38129);var o=r(34124),s=r(90508),a=Symbol.for("react.lazy"),l=i[" use ".trim().toString()];function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var u=Symbol("radix.slottable");function d(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}var h=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=function(e){let t=function(e){let t=n.forwardRef((e,t)=>{let{children:r,...i}=e;if(c(r)&&"function"==typeof l&&(r=l(r._payload)),n.isValidElement(r)){var s;let e,a,l=(s=r,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),c=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(i,r.props);return r.type!==n.Fragment&&(c.ref=t?(0,o.t)(t,l):l),n.cloneElement(r,c)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=n.forwardRef((e,r)=>{let{children:i,...o}=e;c(i)&&"function"==typeof l&&(i=l(i._payload));let a=n.Children.toArray(i),u=a.find(d);if(u){let e=u.props.children,i=a.map(t=>t!==u?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...o,ref:r,children:n.isValidElement(e)?n.cloneElement(e,void 0,i):null})}return(0,s.jsx)(t,{...o,ref:r,children:i})});return r.displayName=`${e}.Slot`,r}(`Primitive.${t}`),i=n.forwardRef((e,n)=>{let{asChild:i,...o}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(i?r:t,{...o,ref:n})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{})},81895:(e,t,r)=>{e.exports=r(11254)(r(99083),"Map")},82517:(e,t,r)=>{var n=r(67070),i=r(54546),o=r(77651);e.exports=function(e,t,r){for(var s=-1,a=t.length,l={};++s<a;){var c=t[s],u=n(e,c);r(u,c)&&i(l,o(c,e),u)}return l}},82685:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},84039:(e,t,r)=>{var n=r(98175),i=r(96830),o=r(91347),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},84223:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},84364:(e,t,r)=>{e.exports=r(11254)(Object,"create")},84756:(e,t,r)=>{"use strict";var n=r(11581),i=r(20423);e.exports={run:function(e){var t,r,o,s,a,l="greedy"===e.graph().acyclicer?i(e,(t=e,function(e){return t.edge(e).weight})):(r=e,o=[],s={},a={},n.forEach(r.nodes(),function e(t){n.has(a,t)||(a[t]=!0,s[t]=!0,n.forEach(r.outEdges(t),function(t){n.has(s,t.w)?o.push(t):e(t.w)}),delete s[t])}),o);n.forEach(l,function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n.uniqueId("rev"))})},undo:function(e){n.forEach(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}},85068:(e,t,r)=>{var n=r(65273),i=r(37291),o=r(43240),s=r(67819),a=r(20243),l=r(91347),c=r(61288),u=r(52791),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,y){var b=l(e),v=l(t),k=b?h:a(e),x=v?h:a(t);k=k==d?p:k,x=x==d?p:x;var w=k==p,C=x==p,S=k==x;if(S&&c(e)){if(!c(t))return!1;b=!0,w=!1}if(S&&!w)return y||(y=new n),b||u(e)?i(e,t,r,m,g,y):o(e,t,k,r,m,g,y);if(!(1&r)){var E=w&&f.call(e,"__wrapped__"),_=C&&f.call(t,"__wrapped__");if(E||_){var A=E?e.value():e,N=_?t.value():t;return y||(y=new n),g(A,N,r,m,y)}}return!!S&&(y||(y=new n),s(e,t,r,m,g,y))}},85655:(e,t,r)=>{var n=r(77220),i=r(91267),o=r(30004),s=r(34370);e.exports=o(function(e,t){if(null==e)return[];var r=t.length;return r>1&&s(e,t[0],t[1])?t=[]:r>2&&s(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])})},85783:(e,t,r)=>{"use strict";r.d(t,{A:()=>rl});var n=r(17749),i=(e,t)=>{if("slot"===e)return 0;if(e instanceof Function)return e(t);let{children:r,...n}=null!=t?t:{};if("svg"===e)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,n,r]},o=/^\s*>\s$/,s=n.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return i("blockquote",{...(0,n.KV)(this.options.HTMLAttributes,e),children:i("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let r=[];return e.content.forEach(e=>{let n=t.renderChildren([e]).split("\n").map(e=>""===e.trim()?">":`> ${e}`);r.push(n.join("\n"))}),r.join(`
|
|
139
139
|
>
|
|
140
140
|
`)},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,n.tG)({find:o,type:this.type})]}}),a=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,c=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,u=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,d=n.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,n.KV)(this.options.HTMLAttributes,e),children:i("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),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,n.OX)({find:a,type:this.type}),(0,n.OX)({find:c,type:this.type})]},addPasteRules(){return[(0,n.Zc)({find:l,type:this.type}),(0,n.Zc)({find:u,type:this.type})]}}),h=/(^|[^`])`([^`]+)`(?!`)$/,p=/(^|[^`])`([^`]+)`(?!`)/g,f=n.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,n.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,n.OX)({find:h,type:this.type})]},addPasteRules(){return[(0,n.Zc)({find:p,type:this.type})]}}),m=r(32603),g=/^```([a-z]+)?[\s\n]$/,y=/^~~~([a-z]+)?[\s\n]$/,b=n.bP.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:r}=this.options;if(!r)return null;let n=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(r)).map(e=>e.replace(r,""))[0];return n||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,n.KV)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var r;return(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 r;let n=(null==(r=e.attrs)?void 0:r.language)||"";return e.content?[`\`\`\`${n}`,t.renderChildren(e.content),"```"].join("\n"):`\`\`\`${n}
|
|
141
141
|
|