@waq666/pneuma 0.0.0-stage → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +206 -3
- package/bin/dsc.js +91 -0
- package/bin/headless.cjs +40 -0
- package/lib/adapter/core-runtime.d.ts +11 -0
- package/lib/adapter/core-runtime.js +259 -0
- package/lib/adapter/host.d.ts +18 -0
- package/lib/adapter/host.js +14 -0
- package/lib/adapter/runtime.d.ts +15 -0
- package/lib/adapter/runtime.js +290 -0
- package/lib/adapter/transcript.d.ts +184 -0
- package/lib/adapter/transcript.js +605 -0
- package/lib/app/AgentsOverlay.d.ts +18 -0
- package/lib/app/AgentsOverlay.js +63 -0
- package/lib/app/App.d.ts +15 -0
- package/lib/app/App.js +1650 -0
- package/lib/app/App.js.nv-backup +1650 -0
- package/lib/app/ApprovalCard.d.ts +12 -0
- package/lib/app/ApprovalCard.js +76 -0
- package/lib/app/AskCard.d.ts +20 -0
- package/lib/app/AskCard.js +45 -0
- package/lib/app/ChatView.d.ts +63 -0
- package/lib/app/ChatView.js +310 -0
- package/lib/app/Composer.d.ts +50 -0
- package/lib/app/Composer.js +282 -0
- package/lib/app/DiffBlock.d.ts +6 -0
- package/lib/app/DiffBlock.js +37 -0
- package/lib/app/MarkdownView.d.ts +6 -0
- package/lib/app/MarkdownView.js +99 -0
- package/lib/app/ModelPicker.d.ts +7 -0
- package/lib/app/ModelPicker.js +18 -0
- package/lib/app/PlanReviewCard.d.ts +13 -0
- package/lib/app/PlanReviewCard.js +54 -0
- package/lib/app/PresetPicker.d.ts +11 -0
- package/lib/app/PresetPicker.js +19 -0
- package/lib/app/PreviewOverlay.d.ts +14 -0
- package/lib/app/PreviewOverlay.js +22 -0
- package/lib/app/SessionPicker.d.ts +43 -0
- package/lib/app/SessionPicker.js +56 -0
- package/lib/app/SettingsOverlay.d.ts +32 -0
- package/lib/app/SettingsOverlay.js +157 -0
- package/lib/app/SkillsPicker.d.ts +7 -0
- package/lib/app/SkillsPicker.js +19 -0
- package/lib/app/StatusBar.d.ts +22 -0
- package/lib/app/StatusBar.js +201 -0
- package/lib/app/TaskStrips.d.ts +13 -0
- package/lib/app/TaskStrips.js +40 -0
- package/lib/app/TimelineRail.d.ts +22 -0
- package/lib/app/TimelineRail.js +160 -0
- package/lib/app/TimelineRail.js.negbak +98 -0
- package/lib/app/TimelineRail.js.nv-backup +160 -0
- package/lib/app/ToolCard.d.ts +11 -0
- package/lib/app/ToolCard.js +64 -0
- package/lib/app/ToolCard.js.nv-backup +64 -0
- package/lib/app/TranscriptOverlay.d.ts +27 -0
- package/lib/app/TranscriptOverlay.js +36 -0
- package/lib/app/TranscriptViewport.d.ts +78 -0
- package/lib/app/TranscriptViewport.js +218 -0
- package/lib/app/Welcome.d.ts +6 -0
- package/lib/app/Welcome.js +71 -0
- package/lib/app/attach.d.ts +16 -0
- package/lib/app/attach.js +58 -0
- package/lib/app/click.d.ts +40 -0
- package/lib/app/click.js +103 -0
- package/lib/app/clipboard-image.d.ts +11 -0
- package/lib/app/clipboard-image.js +66 -0
- package/lib/app/cursor.d.ts +4 -0
- package/lib/app/cursor.js +24 -0
- package/lib/app/hello.d.ts +11 -0
- package/lib/app/hello.js +8 -0
- package/lib/app/history-store.d.ts +4 -0
- package/lib/app/history-store.js +41 -0
- package/lib/app/image-blocks.d.ts +12 -0
- package/lib/app/image-blocks.js +125 -0
- package/lib/app/keymap.d.ts +56 -0
- package/lib/app/keymap.js +56 -0
- package/lib/app/markdown.d.ts +54 -0
- package/lib/app/markdown.js +189 -0
- package/lib/app/mouse.d.ts +33 -0
- package/lib/app/mouse.js +35 -0
- package/lib/app/pointer.d.ts +16 -0
- package/lib/app/pointer.js +60 -0
- package/lib/app/scroll-model.d.ts +240 -0
- package/lib/app/scroll-model.js +347 -0
- package/lib/app/settings-model.d.ts +69 -0
- package/lib/app/settings-model.js +114 -0
- package/lib/app/snapshot-subscribe.d.ts +34 -0
- package/lib/app/snapshot-subscribe.js +110 -0
- package/lib/app/theme.d.ts +194 -0
- package/lib/app/theme.js +186 -0
- package/lib/app/ticker.d.ts +7 -0
- package/lib/app/ticker.js +53 -0
- package/lib/boot.d.ts +1 -0
- package/lib/boot.js +34 -0
- package/lib/commands.d.ts +49 -0
- package/lib/commands.js +115 -0
- package/lib/contract.d.ts +1973 -0
- package/lib/contract.js +36 -0
- package/lib/core/agent-roles.d.ts +52 -0
- package/lib/core/agent-roles.js +274 -0
- package/lib/core/approval-floor.d.ts +183 -0
- package/lib/core/approval-floor.js +679 -0
- package/lib/core/approval.d.ts +42 -0
- package/lib/core/approval.js +8 -0
- package/lib/core/audit.d.ts +61 -0
- package/lib/core/audit.js +59 -0
- package/lib/core/boot-notices.d.ts +6 -0
- package/lib/core/boot-notices.js +61 -0
- package/lib/core/cdp/actions.d.ts +182 -0
- package/lib/core/cdp/actions.js +649 -0
- package/lib/core/cdp/launch.d.ts +192 -0
- package/lib/core/cdp/launch.js +491 -0
- package/lib/core/cdp/snapshot.d.ts +139 -0
- package/lib/core/cdp/snapshot.js +316 -0
- package/lib/core/cdp/transport.d.ts +160 -0
- package/lib/core/cdp/transport.js +359 -0
- package/lib/core/command-policy.d.ts +108 -0
- package/lib/core/command-policy.js +580 -0
- package/lib/core/commands-completion.d.ts +78 -0
- package/lib/core/commands-completion.js +167 -0
- package/lib/core/compact-anchors.d.ts +76 -0
- package/lib/core/compact-anchors.js +284 -0
- package/lib/core/compact.d.ts +110 -0
- package/lib/core/compact.js +210 -0
- package/lib/core/config-store.d.ts +38 -0
- package/lib/core/config-store.js +307 -0
- package/lib/core/config.d.ts +36 -0
- package/lib/core/config.js +124 -0
- package/lib/core/connection-test.d.ts +60 -0
- package/lib/core/connection-test.js +84 -0
- package/lib/core/desktop-control.d.ts +298 -0
- package/lib/core/desktop-control.js +1311 -0
- package/lib/core/diff-text.d.ts +74 -0
- package/lib/core/diff-text.js +257 -0
- package/lib/core/dock-browser.d.ts +137 -0
- package/lib/core/dock-browser.js +146 -0
- package/lib/core/dock-ops.d.ts +59 -0
- package/lib/core/dock-ops.js +104 -0
- package/lib/core/dock-session.d.ts +39 -0
- package/lib/core/dock-session.js +28 -0
- package/lib/core/dsh-compat/hook.d.ts +18 -0
- package/lib/core/dsh-compat/hook.js +52 -0
- package/lib/core/dsh-compat/resolve-hook.d.ts +5 -0
- package/lib/core/dsh-compat/resolve-hook.js +59 -0
- package/lib/core/dsh-compat/tools-facade.d.ts +47 -0
- package/lib/core/dsh-compat/tools-facade.js +108 -0
- package/lib/core/err-text.d.ts +13 -0
- package/lib/core/err-text.js +15 -0
- package/lib/core/events.d.ts +149 -0
- package/lib/core/events.js +1 -0
- package/lib/core/git-exec.d.ts +23 -0
- package/lib/core/git-exec.js +72 -0
- package/lib/core/git-info.d.ts +47 -0
- package/lib/core/git-info.js +157 -0
- package/lib/core/goal.d.ts +89 -0
- package/lib/core/goal.js +189 -0
- package/lib/core/hooks.d.ts +272 -0
- package/lib/core/hooks.js +818 -0
- package/lib/core/host-browser-link.d.ts +59 -0
- package/lib/core/host-browser-link.js +9 -0
- package/lib/core/host-methods.d.ts +25 -0
- package/lib/core/host-methods.js +103 -0
- package/lib/core/image-diet.d.ts +77 -0
- package/lib/core/image-diet.js +127 -0
- package/lib/core/learnings/ledger.d.ts +73 -0
- package/lib/core/learnings/ledger.js +273 -0
- package/lib/core/learnings/skill-write.d.ts +250 -0
- package/lib/core/learnings/skill-write.js +854 -0
- package/lib/core/learnings/store.d.ts +102 -0
- package/lib/core/learnings/store.js +266 -0
- package/lib/core/lifecycle-hooks.d.ts +189 -0
- package/lib/core/lifecycle-hooks.js +576 -0
- package/lib/core/llm.d.ts +283 -0
- package/lib/core/llm.js +565 -0
- package/lib/core/lockfile.d.ts +17 -0
- package/lib/core/lockfile.js +110 -0
- package/lib/core/loop.d.ts +185 -0
- package/lib/core/loop.js +587 -0
- package/lib/core/lsp/client.d.ts +189 -0
- package/lib/core/lsp/client.js +690 -0
- package/lib/core/lsp/framing.d.ts +84 -0
- package/lib/core/lsp/framing.js +181 -0
- package/lib/core/lsp/line-shift.d.ts +28 -0
- package/lib/core/lsp/line-shift.js +127 -0
- package/lib/core/lsp/manager.d.ts +93 -0
- package/lib/core/lsp/manager.js +418 -0
- package/lib/core/lsp/normalize.d.ts +32 -0
- package/lib/core/lsp/normalize.js +139 -0
- package/lib/core/lsp/servers.d.ts +106 -0
- package/lib/core/lsp/servers.js +352 -0
- package/lib/core/lsp/uri.d.ts +76 -0
- package/lib/core/lsp/uri.js +179 -0
- package/lib/core/market.d.ts +51 -0
- package/lib/core/market.js +358 -0
- package/lib/core/mcp.d.ts +201 -0
- package/lib/core/mcp.js +836 -0
- package/lib/core/memory-eval.d.ts +158 -0
- package/lib/core/memory-eval.js +215 -0
- package/lib/core/memory.d.ts +266 -0
- package/lib/core/memory.js +703 -0
- package/lib/core/mention.d.ts +57 -0
- package/lib/core/mention.js +129 -0
- package/lib/core/microcompact.d.ts +48 -0
- package/lib/core/microcompact.js +79 -0
- package/lib/core/migrate.d.ts +56 -0
- package/lib/core/migrate.js +134 -0
- package/lib/core/model-caps.d.ts +83 -0
- package/lib/core/model-caps.js +150 -0
- package/lib/core/model-discovery.d.ts +19 -0
- package/lib/core/model-discovery.js +69 -0
- package/lib/core/modes.d.ts +72 -0
- package/lib/core/modes.js +152 -0
- package/lib/core/native-bridge.d.ts +135 -0
- package/lib/core/native-bridge.js +563 -0
- package/lib/core/path-policy.d.ts +32 -0
- package/lib/core/path-policy.js +248 -0
- package/lib/core/permission-presets.d.ts +67 -0
- package/lib/core/permission-presets.js +75 -0
- package/lib/core/plugin-loader.d.ts +36 -0
- package/lib/core/plugin-loader.js +294 -0
- package/lib/core/plugin-registry.d.ts +113 -0
- package/lib/core/plugin-registry.js +256 -0
- package/lib/core/prefs.d.ts +82 -0
- package/lib/core/prefs.js +372 -0
- package/lib/core/presets.d.ts +80 -0
- package/lib/core/presets.js +373 -0
- package/lib/core/pricing.d.ts +90 -0
- package/lib/core/pricing.js +126 -0
- package/lib/core/prompt.d.ts +92 -0
- package/lib/core/prompt.js +339 -0
- package/lib/core/ptc.d.ts +66 -0
- package/lib/core/ptc.js +70 -0
- package/lib/core/remote/frames.d.ts +91 -0
- package/lib/core/remote/frames.js +174 -0
- package/lib/core/remote/notify.d.ts +54 -0
- package/lib/core/remote/notify.js +77 -0
- package/lib/core/remote/owner.d.ts +32 -0
- package/lib/core/remote/owner.js +75 -0
- package/lib/core/remote/pairing.d.ts +104 -0
- package/lib/core/remote/pairing.js +261 -0
- package/lib/core/remote/push.d.ts +80 -0
- package/lib/core/remote/push.js +222 -0
- package/lib/core/remote/store.d.ts +18 -0
- package/lib/core/remote/store.js +59 -0
- package/lib/core/remote/tickets.d.ts +20 -0
- package/lib/core/remote/tickets.js +49 -0
- package/lib/core/remote/uploads.d.ts +63 -0
- package/lib/core/remote/uploads.js +161 -0
- package/lib/core/request-attribution.d.ts +26 -0
- package/lib/core/request-attribution.js +86 -0
- package/lib/core/request-invariant.d.ts +61 -0
- package/lib/core/request-invariant.js +199 -0
- package/lib/core/sandbox/backends.d.ts +64 -0
- package/lib/core/sandbox/backends.js +194 -0
- package/lib/core/sandbox/execpolicy.d.ts +93 -0
- package/lib/core/sandbox/execpolicy.js +452 -0
- package/lib/core/sandbox/net-proxy.d.ts +31 -0
- package/lib/core/sandbox/net-proxy.js +162 -0
- package/lib/core/sandbox/policy.d.ts +211 -0
- package/lib/core/sandbox/policy.js +559 -0
- package/lib/core/sandbox/win/abi.d.ts +161 -0
- package/lib/core/sandbox/win/abi.js +169 -0
- package/lib/core/sandbox/win/account.d.ts +71 -0
- package/lib/core/sandbox/win/account.js +206 -0
- package/lib/core/sandbox/win/acl.d.ts +54 -0
- package/lib/core/sandbox/win/acl.js +339 -0
- package/lib/core/sandbox/win/backend.d.ts +61 -0
- package/lib/core/sandbox/win/backend.js +249 -0
- package/lib/core/sandbox/win/doctor.d.ts +24 -0
- package/lib/core/sandbox/win/doctor.js +272 -0
- package/lib/core/sandbox/win/ffi.d.ts +107 -0
- package/lib/core/sandbox/win/ffi.js +166 -0
- package/lib/core/sandbox/win/net-abi.d.ts +154 -0
- package/lib/core/sandbox/win/net-abi.js +316 -0
- package/lib/core/sandbox/win/runner-entry.d.ts +35 -0
- package/lib/core/sandbox/win/runner-entry.js +391 -0
- package/lib/core/sandbox/win/setup.d.ts +60 -0
- package/lib/core/sandbox/win/setup.js +986 -0
- package/lib/core/sandbox/win/token.d.ts +35 -0
- package/lib/core/sandbox/win/token.js +238 -0
- package/lib/core/sandbox/win/wfp.d.ts +41 -0
- package/lib/core/sandbox/win/wfp.js +200 -0
- package/lib/core/sandbox/win/workspace-sid.d.ts +9 -0
- package/lib/core/sandbox/win/workspace-sid.js +45 -0
- package/lib/core/schedule/rule.d.ts +184 -0
- package/lib/core/schedule/rule.js +745 -0
- package/lib/core/schedule/runner.d.ts +185 -0
- package/lib/core/schedule/runner.js +678 -0
- package/lib/core/schedule/store.d.ts +182 -0
- package/lib/core/schedule/store.js +455 -0
- package/lib/core/secrets.d.ts +41 -0
- package/lib/core/secrets.js +150 -0
- package/lib/core/session-export.d.ts +18 -0
- package/lib/core/session-export.js +73 -0
- package/lib/core/session-index.d.ts +159 -0
- package/lib/core/session-index.js +683 -0
- package/lib/core/session-meta.d.ts +41 -0
- package/lib/core/session-meta.js +97 -0
- package/lib/core/session.d.ts +356 -0
- package/lib/core/session.js +998 -0
- package/lib/core/skills.d.ts +60 -0
- package/lib/core/skills.js +171 -0
- package/lib/core/spill.d.ts +159 -0
- package/lib/core/spill.js +329 -0
- package/lib/core/surface-registry.d.ts +45 -0
- package/lib/core/surface-registry.js +67 -0
- package/lib/core/team-board.d.ts +95 -0
- package/lib/core/team-board.js +316 -0
- package/lib/core/throughput.d.ts +46 -0
- package/lib/core/throughput.js +40 -0
- package/lib/core/todo-reminder.d.ts +44 -0
- package/lib/core/todo-reminder.js +55 -0
- package/lib/core/todo.d.ts +81 -0
- package/lib/core/todo.js +222 -0
- package/lib/core/token-estimate.d.ts +55 -0
- package/lib/core/token-estimate.js +82 -0
- package/lib/core/tool-guards.d.ts +103 -0
- package/lib/core/tool-guards.js +77 -0
- package/lib/core/tool-search.d.ts +152 -0
- package/lib/core/tool-search.js +311 -0
- package/lib/core/tools/bash.d.ts +281 -0
- package/lib/core/tools/bash.js +871 -0
- package/lib/core/tools/command-runner.d.ts +84 -0
- package/lib/core/tools/command-runner.js +68 -0
- package/lib/core/tools/fs-tools.d.ts +23 -0
- package/lib/core/tools/fs-tools.js +247 -0
- package/lib/core/tools/index.d.ts +8 -0
- package/lib/core/tools/index.js +4 -0
- package/lib/core/tools/sandbox-args.d.ts +51 -0
- package/lib/core/tools/sandbox-args.js +90 -0
- package/lib/core/tools/search-tools.d.ts +3 -0
- package/lib/core/tools/search-tools.js +153 -0
- package/lib/core/tools.d.ts +96 -0
- package/lib/core/tools.js +53 -0
- package/lib/core/ui-boot-source.d.ts +71 -0
- package/lib/core/ui-boot-source.js +121 -0
- package/lib/core/ui-bundles.d.ts +249 -0
- package/lib/core/ui-bundles.js +830 -0
- package/lib/core/ui-combo.d.ts +49 -0
- package/lib/core/ui-combo.js +55 -0
- package/lib/core/ui-events.d.ts +81 -0
- package/lib/core/ui-events.js +364 -0
- package/lib/core/ui-hmr.d.ts +36 -0
- package/lib/core/ui-hmr.js +128 -0
- package/lib/core/ui-methods.d.ts +69 -0
- package/lib/core/ui-methods.js +341 -0
- package/lib/core/ui-route.d.ts +69 -0
- package/lib/core/ui-route.js +122 -0
- package/lib/core/ui-server.d.ts +75 -0
- package/lib/core/ui-server.js +369 -0
- package/lib/core/ui-trust.d.ts +47 -0
- package/lib/core/ui-trust.js +164 -0
- package/lib/core/untrusted.d.ts +30 -0
- package/lib/core/untrusted.js +48 -0
- package/lib/core/update-check.d.ts +81 -0
- package/lib/core/update-check.js +177 -0
- package/lib/core/usage-log.d.ts +82 -0
- package/lib/core/usage-log.js +306 -0
- package/lib/core/version.d.ts +1 -0
- package/lib/core/version.js +37 -0
- package/lib/core/web-http.d.ts +57 -0
- package/lib/core/web-http.js +137 -0
- package/lib/core/web-static.d.ts +31 -0
- package/lib/core/web-static.js +75 -0
- package/lib/headless.d.ts +1 -0
- package/lib/headless.js +31 -0
- package/lib/host/kernel.d.ts +33 -0
- package/lib/host/kernel.js +451 -0
- package/lib/index.d.ts +41 -0
- package/lib/index.js +35 -0
- package/lib/plugins/agent.d.ts +2 -0
- package/lib/plugins/agent.js +274 -0
- package/lib/plugins/approval-floor.d.ts +2 -0
- package/lib/plugins/approval-floor.js +223 -0
- package/lib/plugins/approval.d.ts +16 -0
- package/lib/plugins/approval.js +674 -0
- package/lib/plugins/ask.d.ts +2 -0
- package/lib/plugins/ask.js +245 -0
- package/lib/plugins/browser.d.ts +68 -0
- package/lib/plugins/browser.js +1341 -0
- package/lib/plugins/commands.d.ts +23 -0
- package/lib/plugins/commands.js +498 -0
- package/lib/plugins/compact.d.ts +21 -0
- package/lib/plugins/compact.js +274 -0
- package/lib/plugins/computer-use.d.ts +47 -0
- package/lib/plugins/computer-use.js +539 -0
- package/lib/plugins/desktop-dock.d.ts +2 -0
- package/lib/plugins/desktop-dock.js +626 -0
- package/lib/plugins/dock-browser.d.ts +34 -0
- package/lib/plugins/dock-browser.js +765 -0
- package/lib/plugins/dsh-compat.d.ts +25 -0
- package/lib/plugins/dsh-compat.js +37 -0
- package/lib/plugins/file-review.d.ts +108 -0
- package/lib/plugins/file-review.js +393 -0
- package/lib/plugins/git.d.ts +26 -0
- package/lib/plugins/git.js +132 -0
- package/lib/plugins/goal.d.ts +20 -0
- package/lib/plugins/goal.js +245 -0
- package/lib/plugins/guards.d.ts +14 -0
- package/lib/plugins/guards.js +18 -0
- package/lib/plugins/hooks.d.ts +19 -0
- package/lib/plugins/hooks.js +583 -0
- package/lib/plugins/host-stdio.d.ts +88 -0
- package/lib/plugins/host-stdio.js +317 -0
- package/lib/plugins/image-diet.d.ts +17 -0
- package/lib/plugins/image-diet.js +85 -0
- package/lib/plugins/lifecycle-hooks.d.ts +26 -0
- package/lib/plugins/lifecycle-hooks.js +338 -0
- package/lib/plugins/llm.d.ts +13 -0
- package/lib/plugins/llm.js +215 -0
- package/lib/plugins/lsp.d.ts +54 -0
- package/lib/plugins/lsp.js +608 -0
- package/lib/plugins/mcp.d.ts +16 -0
- package/lib/plugins/mcp.js +673 -0
- package/lib/plugins/memory.d.ts +17 -0
- package/lib/plugins/memory.js +858 -0
- package/lib/plugins/microcompact.d.ts +18 -0
- package/lib/plugins/microcompact.js +119 -0
- package/lib/plugins/mode.d.ts +18 -0
- package/lib/plugins/mode.js +115 -0
- package/lib/plugins/permission-presets.d.ts +18 -0
- package/lib/plugins/permission-presets.js +135 -0
- package/lib/plugins/plan.d.ts +2 -0
- package/lib/plugins/plan.js +192 -0
- package/lib/plugins/plugin-manager.d.ts +2 -0
- package/lib/plugins/plugin-manager.js +165 -0
- package/lib/plugins/presets.d.ts +2 -0
- package/lib/plugins/presets.js +182 -0
- package/lib/plugins/prompt.d.ts +2 -0
- package/lib/plugins/prompt.js +264 -0
- package/lib/plugins/ptc.d.ts +2 -0
- package/lib/plugins/ptc.js +272 -0
- package/lib/plugins/remote/http.d.ts +11 -0
- package/lib/plugins/remote/http.js +11 -0
- package/lib/plugins/remote/routes.d.ts +24 -0
- package/lib/plugins/remote/routes.js +384 -0
- package/lib/plugins/remote/types.d.ts +135 -0
- package/lib/plugins/remote/types.js +87 -0
- package/lib/plugins/remote.d.ts +17 -0
- package/lib/plugins/remote.js +1028 -0
- package/lib/plugins/runtime-api.d.ts +16 -0
- package/lib/plugins/runtime-api.js +99 -0
- package/lib/plugins/runtime.d.ts +10 -0
- package/lib/plugins/runtime.js +451 -0
- package/lib/plugins/sandbox.d.ts +2 -0
- package/lib/plugins/sandbox.js +761 -0
- package/lib/plugins/schedule.d.ts +26 -0
- package/lib/plugins/schedule.js +538 -0
- package/lib/plugins/self-improve.d.ts +61 -0
- package/lib/plugins/self-improve.js +953 -0
- package/lib/plugins/session-search.d.ts +16 -0
- package/lib/plugins/session-search.js +308 -0
- package/lib/plugins/session-title.d.ts +19 -0
- package/lib/plugins/session-title.js +109 -0
- package/lib/plugins/session.d.ts +7 -0
- package/lib/plugins/session.js +296 -0
- package/lib/plugins/settings.d.ts +3 -0
- package/lib/plugins/settings.js +705 -0
- package/lib/plugins/skills.d.ts +2 -0
- package/lib/plugins/skills.js +360 -0
- package/lib/plugins/spill.d.ts +16 -0
- package/lib/plugins/spill.js +200 -0
- package/lib/plugins/subagent.d.ts +2 -0
- package/lib/plugins/subagent.js +896 -0
- package/lib/plugins/surfaces.d.ts +11 -0
- package/lib/plugins/surfaces.js +20 -0
- package/lib/plugins/team.d.ts +16 -0
- package/lib/plugins/team.js +149 -0
- package/lib/plugins/todo.d.ts +19 -0
- package/lib/plugins/todo.js +188 -0
- package/lib/plugins/tool-search.d.ts +2 -0
- package/lib/plugins/tool-search.js +434 -0
- package/lib/plugins/tool-search.js.nv-backup +434 -0
- package/lib/plugins/tools-default.d.ts +12 -0
- package/lib/plugins/tools-default.js +275 -0
- package/lib/plugins/tools.d.ts +16 -0
- package/lib/plugins/tools.js +62 -0
- package/lib/plugins/transcript.d.ts +15 -0
- package/lib/plugins/transcript.js +311 -0
- package/lib/plugins/tui.d.ts +2 -0
- package/lib/plugins/tui.js +98 -0
- package/lib/plugins/waiting.d.ts +12 -0
- package/lib/plugins/waiting.js +34 -0
- package/lib/plugins/web-search.d.ts +14 -0
- package/lib/plugins/web-search.js +263 -0
- package/lib/plugins/webserver.d.ts +48 -0
- package/lib/plugins/webserver.js +228 -0
- package/lib/remote/assets/app-DAcUCOEn.js +14 -0
- package/lib/remote/assets/icon-192.png +0 -0
- package/lib/remote/assets/icon-512.png +0 -0
- package/lib/remote/assets/index.html +34 -0
- package/lib/remote/assets/manifest.json +27 -0
- package/lib/remote/assets/style-DIB6729x.css +1 -0
- package/lib/remote/assets/sw.js +66 -0
- package/lib/services/types.d.ts +1228 -0
- package/lib/services/types.js +1 -0
- package/lib/tools/config-cli.d.ts +1 -0
- package/lib/tools/config-cli.js +89 -0
- package/lib/ui/arrival.d.ts +72 -0
- package/lib/ui/arrival.js +105 -0
- package/lib/ui/assets/app-B70nVIKd.js +69 -0
- package/lib/ui/assets/chunk-2UxHyX5q.js +1 -0
- package/lib/ui/assets/chunk-B1dDrJ26.js +1 -0
- package/lib/ui/assets/chunk-B6aJPvgy.js +1 -0
- package/lib/ui/assets/chunk-BEwlwnbL.js +1 -0
- package/lib/ui/assets/chunk-BGcgwlCI.js +12 -0
- package/lib/ui/assets/chunk-BIGW1oBm.js +1 -0
- package/lib/ui/assets/chunk-BPQ3VLAy.js +1 -0
- package/lib/ui/assets/chunk-BRH0KZbk.js +141 -0
- package/lib/ui/assets/chunk-BX6H_ySx.js +1 -0
- package/lib/ui/assets/chunk-B_P3UbPa.js +1 -0
- package/lib/ui/assets/chunk-B_TYUkTI.js +1 -0
- package/lib/ui/assets/chunk-B_vNuMnf.js +1 -0
- package/lib/ui/assets/chunk-BajyYBss.js +10 -0
- package/lib/ui/assets/chunk-BdnUsdx6.js +1 -0
- package/lib/ui/assets/chunk-Buea-lGh.js +1 -0
- package/lib/ui/assets/chunk-C0PvZCCE.js +1 -0
- package/lib/ui/assets/chunk-C0m74zRD.js +1 -0
- package/lib/ui/assets/chunk-C27-OAKa.js +1 -0
- package/lib/ui/assets/chunk-C2oV4EkX.js +1 -0
- package/lib/ui/assets/chunk-C7zT0LnQ.js +1 -0
- package/lib/ui/assets/chunk-C9GSunVT.js +1 -0
- package/lib/ui/assets/chunk-C9tS-k6U.js +1 -0
- package/lib/ui/assets/chunk-CHLpvVh8.js +1 -0
- package/lib/ui/assets/chunk-CLxacb5B.js +1 -0
- package/lib/ui/assets/chunk-COt5Ahok.js +1 -0
- package/lib/ui/assets/chunk-CPTIWCL2.js +1 -0
- package/lib/ui/assets/chunk-CQLl-L-p.js +1 -0
- package/lib/ui/assets/chunk-CUWRgxuq.js +55 -0
- package/lib/ui/assets/chunk-CWanVSXC.js +1 -0
- package/lib/ui/assets/chunk-Cf5RLm7j.js +1 -0
- package/lib/ui/assets/chunk-CickPsom.js +1 -0
- package/lib/ui/assets/chunk-Cj5Yp3dK.js +1 -0
- package/lib/ui/assets/chunk-Cmh6b_Ma.js +1 -0
- package/lib/ui/assets/chunk-Cp-IABpG.js +1 -0
- package/lib/ui/assets/chunk-CqE71os6.js +1 -0
- package/lib/ui/assets/chunk-CtKP3W-j.js +1 -0
- package/lib/ui/assets/chunk-Cvjx9yec.js +1 -0
- package/lib/ui/assets/chunk-CxGP3dtY.js +1 -0
- package/lib/ui/assets/chunk-CylS5w8V.js +1 -0
- package/lib/ui/assets/chunk-D38fbIBN.js +1 -0
- package/lib/ui/assets/chunk-D97Zzqfu.js +1 -0
- package/lib/ui/assets/chunk-DAi9KRSo.js +1 -0
- package/lib/ui/assets/chunk-DHK4yRfg.js +1 -0
- package/lib/ui/assets/chunk-DJeabLx-.js +1 -0
- package/lib/ui/assets/chunk-DNRxmY5a.js +1 -0
- package/lib/ui/assets/chunk-DNSN1z5r.js +1 -0
- package/lib/ui/assets/chunk-DNasK_ZG.js +1 -0
- package/lib/ui/assets/chunk-DPvrY3IQ.js +1 -0
- package/lib/ui/assets/chunk-DXmwc3jG.js +1 -0
- package/lib/ui/assets/chunk-Dd0kTxKP.js +1 -0
- package/lib/ui/assets/chunk-De0Btta0.js +1 -0
- package/lib/ui/assets/chunk-Des-eS-w.js +1 -0
- package/lib/ui/assets/chunk-Df6bDoY_.js +1 -0
- package/lib/ui/assets/chunk-DijEV5ha.js +1 -0
- package/lib/ui/assets/chunk-DkvoVjww.js +1 -0
- package/lib/ui/assets/chunk-DlC-OlHO.js +1 -0
- package/lib/ui/assets/chunk-DnzrXTVv.js +1 -0
- package/lib/ui/assets/chunk-Dualf0xi.js +1 -0
- package/lib/ui/assets/chunk-EXT84bkm.js +1 -0
- package/lib/ui/assets/chunk-GwR3hkPK.js +1 -0
- package/lib/ui/assets/chunk-P80f7IUj.js +1 -0
- package/lib/ui/assets/chunk-VOosw3JB.js +1 -0
- package/lib/ui/assets/chunk-YQ4lDkt_.js +140 -0
- package/lib/ui/assets/chunk-Yzrsuije.js +1 -0
- package/lib/ui/assets/chunk-Z72CF80r.js +1 -0
- package/lib/ui/assets/chunk-g9-lgVsj.js +1 -0
- package/lib/ui/assets/chunk-vGWfd6FD.js +1 -0
- package/lib/ui/assets/chunk-wDzz0qaB.js +1 -0
- package/lib/ui/assets/chunk-ySF7HWmS.js +1 -0
- package/lib/ui/assets/icon.png +0 -0
- package/lib/ui/assets/index.html +14 -0
- package/lib/ui/assets/pdf.worker.min-CjEcRF4W.mjs +28 -0
- package/lib/ui/assets/style-Bq01xH_b.css +1 -0
- package/lib/ui/frames.d.ts +67 -0
- package/lib/ui/frames.js +146 -0
- package/lib/ui/index.d.ts +59 -0
- package/lib/ui/index.js +50 -0
- package/lib/ui/manifest.d.ts +172 -0
- package/lib/ui/manifest.js +158 -0
- package/lib/ui/plugin.d.ts +161 -0
- package/lib/ui/plugin.js +7 -0
- package/lib/ui/plugins/browser/client.js +290 -0
- package/lib/ui/plugins/browser/icon.png +0 -0
- package/lib/ui/plugins/composer/client.js +1843 -0
- package/lib/ui/plugins/composer/icon.png +0 -0
- package/lib/ui/plugins/files/client.js +646 -0
- package/lib/ui/plugins/files/icon.png +0 -0
- package/lib/ui/plugins/manifest.json +107 -0
- package/lib/ui/plugins/plugins/client.js +682 -0
- package/lib/ui/plugins/plugins/icon.png +0 -0
- package/lib/ui/plugins/preview/client.js +197 -0
- package/lib/ui/plugins/preview/icon.png +0 -0
- package/lib/ui/plugins/prompt/client.js +653 -0
- package/lib/ui/plugins/prompt/icon.png +0 -0
- package/lib/ui/plugins/sessions/client.js +1577 -0
- package/lib/ui/plugins/sessions/icon.png +0 -0
- package/lib/ui/plugins/settings/client.js +5470 -0
- package/lib/ui/plugins/settings/icon.png +0 -0
- package/lib/ui/plugins/skills/client.js +485 -0
- package/lib/ui/plugins/skills/icon.png +0 -0
- package/lib/ui/plugins/status/client.js +1420 -0
- package/lib/ui/plugins/status/icon.png +0 -0
- package/lib/ui/plugins/statusbar/client.js +504 -0
- package/lib/ui/plugins/statusbar/icon.png +0 -0
- package/lib/ui/plugins/tasks/client.js +52 -0
- package/lib/ui/plugins/tasks/icon.png +0 -0
- package/lib/ui/plugins/team/client.js +527 -0
- package/lib/ui/plugins/team/icon.png +0 -0
- package/lib/ui/plugins/terminal/client.js +232 -0
- package/lib/ui/plugins/terminal/icon.png +0 -0
- package/lib/ui/plugins/trace/client.js +1376 -0
- package/lib/ui/plugins/trace/icon.png +0 -0
- package/lib/ui/plugins/transcript/client.js +2661 -0
- package/lib/ui/plugins/transcript/icon.png +0 -0
- package/lib/ui/scoped-slots.d.ts +20 -0
- package/lib/ui/scoped-slots.js +21 -0
- package/lib/ui/sdk/@dsc/ui/index.d.ts +242 -0
- package/lib/ui/sdk/@dsc/ui/package.json +16 -0
- package/lib/ui/sdk/@dsc/ui-core/contract.d.ts +1973 -0
- package/lib/ui/sdk/@dsc/ui-core/core/diff-text.d.ts +74 -0
- package/lib/ui/sdk/@dsc/ui-core/core/dock-browser.d.ts +137 -0
- package/lib/ui/sdk/@dsc/ui-core/core/dock-ops.d.ts +59 -0
- package/lib/ui/sdk/@dsc/ui-core/core/model-caps.d.ts +83 -0
- package/lib/ui/sdk/@dsc/ui-core/core/native-bridge.d.ts +135 -0
- package/lib/ui/sdk/@dsc/ui-core/core/token-estimate.d.ts +55 -0
- package/lib/ui/sdk/@dsc/ui-core/package.json +16 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/arrival.d.ts +72 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/frames.d.ts +67 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/index.d.ts +59 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/manifest.d.ts +172 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/plugin.d.ts +161 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/scoped-slots.d.ts +20 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/services-react.d.ts +27 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/services.d.ts +63 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/slots-react.d.ts +28 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/slots.d.ts +481 -0
- package/lib/ui/sdk/@dsc/ui-core/ui/store.d.ts +89 -0
- package/lib/ui/sdk/@dsc/ui-dockkit/dock-model.d.ts +238 -0
- package/lib/ui/sdk/@dsc/ui-dockkit/dock-state.d.ts +163 -0
- package/lib/ui/sdk/@dsc/ui-dockkit/dock.d.ts +24 -0
- package/lib/ui/sdk/@dsc/ui-dockkit/index.d.ts +15 -0
- package/lib/ui/sdk/@dsc/ui-dockkit/package.json +16 -0
- package/lib/ui/sdk/@dsc/ui-layout/app.d.ts +74 -0
- package/lib/ui/sdk/@dsc/ui-layout/appearance.d.ts +70 -0
- package/lib/ui/sdk/@dsc/ui-layout/host-channel.d.ts +112 -0
- package/lib/ui/sdk/@dsc/ui-layout/index.d.ts +34 -0
- package/lib/ui/sdk/@dsc/ui-layout/package.json +16 -0
- package/lib/ui/sdk/@dsc/ui-layout/page-state.d.ts +14 -0
- package/lib/ui/sdk/@dsc/ui-layout/review-pane.d.ts +21 -0
- package/lib/ui/sdk/@dsc/ui-layout/runtime-context.d.ts +44 -0
- package/lib/ui/sdk/@dsc/ui-layout/thread-view.d.ts +28 -0
- package/lib/ui/sdk/@dsc/ui-layout/update-button.d.ts +21 -0
- package/lib/ui/sdk/@dsc/ui-primitives/code-file-icon-artwork.d.ts +53 -0
- package/lib/ui/sdk/@dsc/ui-primitives/code-view.d.ts +15 -0
- package/lib/ui/sdk/@dsc/ui-primitives/compat.d.ts +27 -0
- package/lib/ui/sdk/@dsc/ui-primitives/completion-sound.d.ts +24 -0
- package/lib/ui/sdk/@dsc/ui-primitives/confirm.d.ts +33 -0
- package/lib/ui/sdk/@dsc/ui-primitives/css.d.ts +47 -0
- package/lib/ui/sdk/@dsc/ui-primitives/diff-rows.d.ts +20 -0
- package/lib/ui/sdk/@dsc/ui-primitives/file-icons.d.ts +38 -0
- package/lib/ui/sdk/@dsc/ui-primitives/file-type-classify.d.ts +66 -0
- package/lib/ui/sdk/@dsc/ui-primitives/file-type-icon.d.ts +57 -0
- package/lib/ui/sdk/@dsc/ui-primitives/highlight.d.ts +24 -0
- package/lib/ui/sdk/@dsc/ui-primitives/hover-delay.d.ts +17 -0
- package/lib/ui/sdk/@dsc/ui-primitives/icons.d.ts +109 -0
- package/lib/ui/sdk/@dsc/ui-primitives/index.d.ts +55 -0
- package/lib/ui/sdk/@dsc/ui-primitives/lang-table.d.ts +10 -0
- package/lib/ui/sdk/@dsc/ui-primitives/markdown.d.ts +20 -0
- package/lib/ui/sdk/@dsc/ui-primitives/native.d.ts +41 -0
- package/lib/ui/sdk/@dsc/ui-primitives/package.json +16 -0
- package/lib/ui/sdk/@dsc/ui-primitives/panels.d.ts +86 -0
- package/lib/ui/sdk/@dsc/ui-primitives/paths.d.ts +11 -0
- package/lib/ui/sdk/@dsc/ui-primitives/pdf-view.d.ts +13 -0
- package/lib/ui/sdk/@dsc/ui-primitives/plugin-text.d.ts +15 -0
- package/lib/ui/sdk/@dsc/ui-primitives/select.d.ts +35 -0
- package/lib/ui/sdk/@dsc/ui-primitives/table-view.d.ts +23 -0
- package/lib/ui/sdk/@dsc/ui-primitives/thread-resizer.d.ts +22 -0
- package/lib/ui/sdk/@dsc/ui-primitives/time.d.ts +33 -0
- package/lib/ui/sdk/@dsc/ui-primitives/toast.d.ts +16 -0
- package/lib/ui/sdk/@dsc/ui-primitives/tokens.d.ts +14 -0
- package/lib/ui/sdk/@dsc/ui-primitives/tool-args.d.ts +49 -0
- package/lib/ui/sdk/@dsc/ui-primitives/tool-summary.d.ts +64 -0
- package/lib/ui/sdk/@dsc/ui-renderer/boot.d.ts +121 -0
- package/lib/ui/sdk/@dsc/ui-renderer/hmr.d.ts +43 -0
- package/lib/ui/sdk/@dsc/ui-renderer/index.d.ts +20 -0
- package/lib/ui/sdk/@dsc/ui-renderer/package.json +16 -0
- package/lib/ui/sdk/@dsc/ui-slots/index.d.ts +19 -0
- package/lib/ui/sdk/@dsc/ui-slots/package.json +16 -0
- package/lib/ui/sdk/@dsc/ui-slots/slots-react.d.ts +48 -0
- package/lib/ui/sdk/@dsc/ui-slots/slots.d.ts +102 -0
- package/lib/ui/services-react.d.ts +27 -0
- package/lib/ui/services-react.js +32 -0
- package/lib/ui/services.d.ts +63 -0
- package/lib/ui/services.js +121 -0
- package/lib/ui/slots-ink.d.ts +26 -0
- package/lib/ui/slots-ink.js +78 -0
- package/lib/ui/slots-react.d.ts +28 -0
- package/lib/ui/slots-react.js +88 -0
- package/lib/ui/slots.d.ts +481 -0
- package/lib/ui/slots.js +550 -0
- package/lib/ui/store.d.ts +89 -0
- package/lib/ui/store.js +62 -0
- package/lib/ui/tui-plugin-api.d.ts +23 -0
- package/lib/ui/tui-plugin-api.js +23 -0
- package/lib/ui/tui-plugins.d.ts +47 -0
- package/lib/ui/tui-plugins.js +220 -0
- package/package.json +58 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=Object.freeze(JSON.parse(`{"displayName":"INI","name":"ini","patterns":[{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ini"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.ini"}},"end":"\\\\n","name":"comment.line.number-sign.ini"}]},{"begin":"(^[\\\\t ]+)?(?=;)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ini"}},"end":"(?!\\\\G)","patterns":[{"begin":";","beginCaptures":{"0":{"name":"punctuation.definition.comment.ini"}},"end":"\\\\n","name":"comment.line.semicolon.ini"}]},{"captures":{"1":{"name":"keyword.other.definition.ini"},"2":{"name":"punctuation.separator.key-value.ini"}},"match":"\\\\b([-.0-9A-Z_a-z]+)\\\\b\\\\s*(=)"},{"captures":{"1":{"name":"punctuation.definition.entity.ini"},"3":{"name":"punctuation.definition.entity.ini"}},"match":"^(\\\\[)(.*?)(])","name":"entity.name.section.group-title.ini"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ini"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.ini"}},"name":"string.quoted.single.ini","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.ini"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ini"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.ini"}},"name":"string.quoted.double.ini"}],"scopeName":"source.ini","aliases":["properties"]}`)),i=[n];export{i as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{w as Le,s as ot,f as zt,a as Ut,b as Kt,c as We,h as Yt}from"./app-B70nVIKd.js";const De={}.hasOwnProperty;function Vt(t,e){const n=e||{};function s(r,...i){let o=s.invalid;const a=s.handlers;if(r&&De.call(r,t)){const c=String(r[t]);o=De.call(a,c)?a[c]:s.unknown}if(o)return o.call(this,r,...i)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}var S=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Jt(t){return xe(t)}function xe(t){return Array.isArray(t)?Qt(t):t instanceof RegExp?t:typeof t=="object"?Xt(t):t}function Qt(t){let e=[];for(let n=0,s=t.length;n<s;n++)e[n]=xe(t[n]);return e}function Xt(t){let e={};for(let n in t)e[n]=xe(t[n]);return e}function at(t,...e){return e.forEach(n=>{for(let s in n)t[s]=n[s]}),t}function ct(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?ct(t.substring(0,t.length-1)):t.substr(~e+1)}var pe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Y=class{static hasCaptures(t){return t===null?!1:(pe.lastIndex=0,pe.test(t))}static replaceCaptures(t,e,n){return t.replace(pe,(s,r,i,o)=>{let a=n[parseInt(r||i,10)];if(a){let c=e.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return s})}};function lt(t,e){return t<e?-1:t>e?1:0}function ut(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,s=e.length;if(n===s){for(let r=0;r<n;r++){let i=lt(t[r],e[r]);if(i!==0)return i}return 0}return n-s}function Fe(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function ht(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ft=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Z=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(tn(t),e)}static createFromParsedTheme(t,e){return sn(t,e)}_cachedMatchRoot=new ft(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,s=this._cachedMatchRoot.get(e).find(r=>Zt(t.parent,r.parentScopes));return s?new dt(s.fontStyle,s.foreground,s.background):null}},_e=class Q{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const s of n)e=new Q(e,s);return e}static from(...e){let n=null;for(let s=0;s<e.length;s++)n=new Q(n,e[s]);return n}push(e){return new Q(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let s=this;for(;s&&s!==e;)n.push(s.scopeName),s=s.parent;return s===e?n.reverse():void 0}};function Zt(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let s=e[n],r=!1;if(s===">"){if(n===e.length-1)return!1;s=e[++n],r=!0}for(;t&&!en(t.scopeName,s);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function en(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var dt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function tn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],s=0;for(let r=0,i=e.length;r<i;r++){let o=e[r];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let f=0,d=h.length;f<d;f++)switch(h[f]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;typeof o.settings.foreground=="string"&&Fe(o.settings.foreground)&&(l=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&Fe(o.settings.background)&&(u=o.settings.background);for(let h=0,f=a.length;h<f;h++){let g=a[h].trim().split(" "),y=g[g.length-1],_=null;g.length>1&&(_=g.slice(0,g.length-1),_.reverse()),n[s++]=new nn(y,_,r,c,l,u)}}return n}var nn=class{constructor(t,e,n,s,r,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=s,this.foreground=r,this.background=i}},N=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(N||{});function sn(t,e){t.sort((c,l)=>{let u=lt(c.scope,l.scope);return u!==0||(u=ut(c.parentScopes,l.parentScopes),u!==0)?u:c.index-l.index});let n=0,s="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(s=c.foreground),c.background!==null&&(r=c.background)}let i=new rn(e),o=new dt(n,i.getId(s),i.getId(r)),a=new an(new Ce(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new Z(i,o,a)}var rn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},on=Object.freeze([]),Ce=class gt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,s,r,i){this.scopeDepth=e,this.parentScopes=n||on,this.fontStyle=s,this.foreground=r,this.background=i}clone(){return new gt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let s=0,r=e.length;s<r;s++)n[s]=e[s].clone();return n}acceptOverwrite(e,n,s,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},an=class ke{constructor(e,n=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let s=0,r=0;for(;e.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=e.parentScopes.length||r>=n.parentScopes.length);){const i=n.parentScopes[r].length-e.parentScopes[s].length;if(i!==0)return i;s++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let s=e.indexOf("."),r,i;if(s===-1?(r=e,i=""):(r=e.substring(0,s),i=e.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(ke._cmpBySpecificity),n}insert(e,n,s,r,i,o){if(n===""){this._doInsertHere(e,s,r,i,o);return}let a=n.indexOf("."),c,l;a===-1?(c=n,l=""):(c=n.substring(0,a),l=n.substring(a+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new ke(this._mainRule.clone(),Ce.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(e+1,l,s,r,i,o)}_doInsertHere(e,n,s,r,i){if(n===null){this._mainRule.acceptOverwrite(e,s,r,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(ut(c.parentScopes,n)===0){c.acceptOverwrite(e,s,r,i);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ce(e,n,s,r,i))}},G=class v{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=v.getLanguageId(e),s=v.getTokenType(e),r=v.getFontStyle(e),i=v.getForeground(e),o=v.getBackground(e);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,s,r,i,o,a){let c=v.getLanguageId(e),l=v.getTokenType(e),u=v.containsBalancedBrackets(e)?1:0,h=v.getFontStyle(e),f=v.getForeground(e),d=v.getBackground(e);return n!==0&&(c=n),s!==8&&(l=s),r!==null&&(u=r?1:0),i!==-1&&(h=i),o!==0&&(f=o),a!==0&&(d=a),(c<<0|l<<8|u<<10|h<<11|f<<15|d<<24)>>>0}};function ee(t,e){const n=[],s=cn(t);let r=s.next();for(;r!==null;){let c=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let l=o();if(n.push({matcher:l,priority:c}),r!==",")break;r=s.next()}return n;function i(){if(r==="-"){r=s.next();const c=i();return l=>!!c&&!c(l)}if(r==="("){r=s.next();const c=a();return r===")"&&(r=s.next()),c}if(qe(r)){const c=[];do c.push(r),r=s.next();while(qe(r));return l=>e(c,l)}return null}function o(){const c=[];let l=i();for(;l;)c.push(l),l=i();return u=>c.every(h=>h(u))}function a(){const c=[];let l=o();for(;l&&(c.push(l),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");l=o()}return u=>c.some(h=>h(u))}}function qe(t){return!!t&&!!t.match(/[\w\.:]+/)}function cn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const s=n[0];return n=e.exec(t),s}}}function mt(t){typeof t.dispose=="function"&&t.dispose()}var W=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},ln=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},un=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},hn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new W(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new un;for(const n of t)fn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof W){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function fn(t,e,n,s){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof W?X({baseGrammar:i,selfGrammar:r},s):Re(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},s);const o=n.injections(t.scopeName);if(o)for(const a of o)s.add(new W(a))}function Re(t,e,n){if(e.repository&&e.repository[t]){const s=e.repository[t];te([s],e,n)}}function X(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&te(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&te(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function te(t,e,n){for(const s of t){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?at({},e.repository,s.repository):e.repository;Array.isArray(s.patterns)&&te(s.patterns,{...e,repository:r},n);const i=s.include;if(!i)continue;const o=pt(i);switch(o.kind){case 0:X({...e,selfGrammar:e.baseGrammar},n);break;case 1:X(e,n);break;case 2:Re(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:r};o.kind===4?Re(o.ruleName,c,n):X(c,n)}else o.kind===4?n.add(new ln(o.scopeName,o.ruleName)):n.add(new W(o.scopeName));break}}}var dn=class{kind=0},gn=class{kind=1},mn=class{constructor(t){this.ruleName=t}kind=2},pn=class{constructor(t){this.scopeName=t}kind=3},_n=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function pt(t){if(t==="$base")return new dn;if(t==="$self")return new gn;const e=t.indexOf("#");if(e===-1)return new pn(t);if(e===0)return new mn(t.substring(1));{const n=t.substring(0,e),s=t.substring(e+1);return new _n(n,s)}}var yn=/\\(\d+)/,He=/\\(\d+)/g,bn=-1,_t=-2;var U=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,s){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=Y.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Y.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${ct(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Y.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Y.replaceCaptures(this._contentName,t,e)}},Sn=class extends U{retokenizeCapturedWithRuleId;constructor(t,e,n,s,r){super(t,e,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,s){throw new Error("Not supported!")}},wn=class extends U{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,null),this._match=new D(s,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ze=class extends U{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ne=class extends U{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r,i,o,a,c,l){super(t,e,n,s),this._begin=new D(r,this.id),this.beginCaptures=i,this._end=new D(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.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(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,s){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,s)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;for(const n of this.patterns)t.getRule(n).collectPatterns(t,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,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},ne=class extends U{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,s,r,i,o,a,c){super(t,e,n,s),this._begin=new D(r,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new D(o,_t),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.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(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,s){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,s)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new F,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},yt=class R{static createCaptureRule(e,n,s,r,i){return e.registerRule(o=>new Sn(n,o,s,r,i))}static getCompiledRuleId(e,n,s){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new wn(e.$vscodeTextmateLocation,e.id,e.name,e.match,R._compileCaptures(e.captures,n,s));if(typeof e.begin>"u"){e.repository&&(s=at({},s,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new ze(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,R._compilePatterns(i,n,s))}return e.while?new ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,R._compileCaptures(e.beginCaptures||e.captures,n,s),e.while,R._compileCaptures(e.whileCaptures||e.captures,n,s),R._compilePatterns(e.patterns,n,s)):new Ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,R._compileCaptures(e.beginCaptures||e.captures,n,s),e.end,R._compileCaptures(e.endCaptures||e.captures,n,s),e.applyEndPatternLast,R._compilePatterns(e.patterns,n,s))}),e.id}static _compileCaptures(e,n,s){let r=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>i&&(i=a)}for(let o=0;o<=i;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let c=0;e[o].patterns&&(c=R.getCompiledRuleId(e[o],n,s)),r[a]=R.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,n,s){let r=[];if(e)for(let i=0,o=e.length;i<o;i++){const a=e[i];let c=-1;if(a.include){const l=pt(a.include);switch(l.kind){case 0:case 1:c=R.getCompiledRuleId(s[a.include],n,s);break;case 2:let u=s[l.ruleName];u&&(c=R.getCompiledRuleId(u,n,s));break;case 3:case 4:const h=l.scopeName,f=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(h,s);if(d)if(f){let g=d.repository[f];g&&(c=R.getCompiledRuleId(g,n,d.repository))}else c=R.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else c=R.getCompiledRuleId(a,n,s);if(c!==-1){const l=n.getRule(c);let u=!1;if((l instanceof ze||l instanceof Ne||l instanceof ne)&&l.hasMissingPatterns&&l.patterns.length===0&&(u=!0),u)continue;r.push(c)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},D=class bt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const s=e.length;let r=0,i=[],o=!1;for(let a=0;a<s;a++)if(e.charAt(a)==="\\"&&a+1<s){const l=e.charAt(a+1);l==="z"?(i.push(e.substring(r,a)),i.push("$(?!\\n)(?<!\\n)"),r=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,r===0?this.source=e:(i.push(e.substring(r,s)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=yn.test(this.source):this.hasBackReferences=!1}clone(){return new bt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let s=n.map(r=>e.substring(r.start,r.end));return He.lastIndex=0,this.source.replace(He,(r,i)=>ht(s[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],s=[],r=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)a=this.source.charAt(i),e[i]=a,n[i]=a,s[i]=a,r[i]=a,a==="\\"&&i+1<o&&(c=this.source.charAt(i+1),c==="A"?(e[i+1]="",n[i+1]="",s[i+1]="A",r[i+1]="A"):c==="G"?(e[i+1]="",n[i+1]="G",s[i+1]="",r[i+1]="G"):(e[i+1]=c,n[i+1]=c,s[i+1]=c,r[i+1]=c),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},F=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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new Ue(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let s=this._items.map(r=>r.resolveAnchors(e,n));return new Ue(t,s,this._items.map(r=>r.ruleId))}},Ue=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
`)}findNextMatchSync(t,e,n){const s=this.scanner.findNextMatchSync(t,e,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},ye=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Cn=class Te{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new ye(e,8),this._embeddedLanguagesMatcher=new kn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Te._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new ye(0,0);_getBasicScopeAttributes=new ft(e=>{const n=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new ye(n,s)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Te.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},kn=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,s])=>ht(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Ke=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function St(t,e,n,s,r,i,o,a){const c=e.content.length;let l=!1,u=-1;if(o){const d=Rn(t,e,n,s,r,i);r=d.stack,s=d.linePos,n=d.isFirstLine,u=d.anchorPosition}const h=Date.now();for(;!l;){if(a!==0&&Date.now()-h>a)return new Ke(r,!0);f()}return new Ke(r,!1);function f(){const d=Nn(t,e,n,s,r,u);if(!d){i.produce(r,c),l=!0;return}const g=d.captureIndices,y=d.matchedRuleId,_=g&&g.length>0?g[0].end>s:!1;if(y===bn){const p=r.getRule(t);i.produce(r,g[0].start),r=r.withContentNameScopesList(r.nameScopesList),M(t,e,n,r,i,p.endCaptures,g),i.produce(r,g[0].end);const m=r;if(r=r.parent,u=m.getAnchorPos(),!_&&m.getEnterPos()===s){r=m,i.produce(r,c),l=!0;return}}else{const p=t.getRule(y);i.produce(r,g[0].start);const m=r,b=p.getName(e.content,g),w=r.contentNameScopesList.pushAttributed(b,t);if(r=r.push(y,s,u,g[0].end===c,null,w,w),p instanceof Ne){const k=p;M(t,e,n,r,i,k.beginCaptures,g),i.produce(r,g[0].end),u=g[0].end;const T=k.getContentName(e.content,g),E=w.pushAttributed(T,t);if(r=r.withContentNameScopesList(E),k.endHasBackReferences&&(r=r.withEndRule(k.getEndWithResolvedBackReferences(e.content,g))),!_&&m.hasSameRuleAs(r)){r=r.pop(),i.produce(r,c),l=!0;return}}else if(p instanceof ne){const k=p;M(t,e,n,r,i,k.beginCaptures,g),i.produce(r,g[0].end),u=g[0].end;const T=k.getContentName(e.content,g),E=w.pushAttributed(T,t);if(r=r.withContentNameScopesList(E),k.whileHasBackReferences&&(r=r.withEndRule(k.getWhileWithResolvedBackReferences(e.content,g))),!_&&m.hasSameRuleAs(r)){r=r.pop(),i.produce(r,c),l=!0;return}}else if(M(t,e,n,r,i,p.captures,g),i.produce(r,g[0].end),r=r.pop(),!_){r=r.safePop(),i.produce(r,c),l=!0;return}}g[0].end>s&&(s=g[0].end,n=!1)}}function Rn(t,e,n,s,r,i){let o=r.beginRuleCapturedEOL?0:-1;const a=[];for(let c=r;c;c=c.pop()){const l=c.getRule(t);l instanceof ne&&a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:l,findOptions:u}=An(c.rule,t,c.stack.endRule,n,s===o),h=l.findNextMatchSync(e,s,u);if(h){if(h.ruleId!==_t){r=c.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(i.produce(c.stack,h.captureIndices[0].start),M(t,e,n,c.stack,i,c.rule.whileCaptures,h.captureIndices),i.produce(c.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>s&&(s=h.captureIndices[0].end,n=!1))}else{r=c.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:o,isFirstLine:n}}function Nn(t,e,n,s,r,i){const o=Tn(t,e,n,s,r,i),a=t.getInjections();if(a.length===0)return o;const c=vn(a,t,e,n,s,r,i);if(!c)return o;if(!o)return c;const l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Tn(t,e,n,s,r,i){const o=r.getRule(t),{ruleScanner:a,findOptions:c}=wt(o,t,r.endRule,n,s===i),l=a.findNextMatchSync(e,s,c);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function vn(t,e,n,s,r,i,o){let a=Number.MAX_VALUE,c=null,l,u=0;const h=i.contentNameScopesList.getScopeNames();for(let f=0,d=t.length;f<d;f++){const g=t[f];if(!g.matcher(h))continue;const y=e.getRule(g.ruleId),{ruleScanner:_,findOptions:p}=wt(y,e,null,s,r===o),m=_.findNextMatchSync(n,r,p);if(!m)continue;const b=m.captureIndices[0].start;if(!(b>=a)&&(a=b,c=m.captureIndices,l=m.ruleId,u=g.priority,a===r))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function wt(t,e,n,s,r){return{ruleScanner:t.compileAG(e,n,s,r),findOptions:0}}function An(t,e,n,s,r){return{ruleScanner:t.compileWhileAG(e,n,s,r),findOptions:0}}function M(t,e,n,s,r,i,o){if(i.length===0)return;const a=e.content,c=Math.min(i.length,o.length),l=[],u=o[0].end;for(let h=0;h<c;h++){const f=i[h];if(f===null)continue;const d=o[h];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?r.produceFromScopes(l[l.length-1].scopes,d.start):r.produce(s,d.start),f.retokenizeCapturedWithRuleId){const y=f.getName(a,o),_=s.contentNameScopesList.pushAttributed(y,t),p=f.getContentName(a,o),m=_.pushAttributed(p,t),b=s.push(f.retokenizeCapturedWithRuleId,d.start,-1,!1,null,_,m),w=t.createOnigString(a.substring(0,d.end));St(t,w,n&&d.start===0,d.start,b,r,!1,0),mt(w);continue}const g=f.getName(a,o);if(g!==null){const _=(l.length>0?l[l.length-1].scopes:s.contentNameScopesList).pushAttributed(g,t);l.push(new In(_,d.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var In=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function En(t,e,n,s,r,i,o,a){return new xn(t,e,n,s,r,i,o,a)}function Ye(t,e,n,s,r){const i=ee(e,se),o=yt.getCompiledRuleId(n,s,r.repository);for(const a of i)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:r,priority:a.priority})}function se(t,e){if(e.length<t.length)return!1;let n=0;return t.every(s=>{for(let r=n;r<e.length;r++)if(Ln(e[r],s))return n=r+1,!0;return!1})}function Ln(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var xn=class{constructor(t,e,n,s,r,i,o,a){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new Cn(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ve(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const c of Object.keys(r)){const l=ee(c,se);for(const u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},e=[],n=this._rootScopeName,s=t.lookup(n);if(s){const r=s.injections;if(r)for(let o in r)Ye(e,o,r[o],this,s);const i=this._grammarRepository.injections(n);i&&i.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const c=a.injectionSelector;c&&Ye(e,c,a,this,a)}})}return e.sort((r,i)=>r.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Ve(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const s=this._tokenize(t,e,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(t,e,n=0){const s=this._tokenize(t,e,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(t,e,n,s){this._rootId===-1&&(this._rootId=yt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!e||e===ve.NULL){r=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=G.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let d;f?d=j.createRootAndLookUpScopeName(f,h,this):d=j.createRoot("unknown",h),e=new ve(null,this._rootId,-1,-1,!1,null,d,d)}else r=!1,e.reset();t=t+`
|
|
3
|
+
`;const i=this.createOnigString(t),o=i.content.length,a=new Gn(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=St(this,i,r,0,e,a,!0,s);return mt(i),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ve(t,e){return t=Jt(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var j=class A{constructor(e,n,s){this.parent=e,this.scopePath=n,this.tokenAttributes=s}static fromExtension(e,n){let s=e,r=e?.scopePath??null;for(const i of n)r=_e.push(r,i.scopeNames),s=new A(s,r,i.encodedTokenAttributes);return s}static createRoot(e,n){return new A(null,new _e(null,e),n)}static createRootAndLookUpScopeName(e,n,s){const r=s.getMetadataForScope(e),i=new _e(null,e),o=s.themeProvider.themeMatch(i),a=A.mergeAttributes(n,r,o);return new A(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return A.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,s){let r=-1,i=0,o=0;return s!==null&&(r=s.fontStyle,i=s.foregroundId,o=s.backgroundId),G.set(e,n.languageId,n.tokenType,null,r,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return A._pushAttributed(this,e,n);const s=e.split(/ /g);let r=this;for(const i of s)r=A._pushAttributed(r,i,n);return r}static _pushAttributed(e,n,s){const r=s.getMetadataForScope(n),i=e.scopePath.push(n),o=s.themeProvider.themeMatch(i),a=A.mergeAttributes(e.tokenAttributes,r,o);return new A(e,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let s=this;for(;s&&s!==e;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?n.reverse():void 0}},ve=class x{constructor(e,n,s,r,i,o,a,c){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new x(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:x._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?j.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){x._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,s,r,i,o,a){return new x(this,e,n,s,r,i,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new x(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.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(e,n){const s=j.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new x(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,j.fromExtension(s,n.contentNameScopesList))}},Pn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ee(n,se).map(s=>s.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ee(n,se).map(s=>s.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Gn=class{constructor(t,e,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let s=t?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=t?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(i)&&(s=G.set(s,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(i))}if(r&&(s=G.set(s,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},Bn=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,s,r){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,En(t,i,e,n,s,r,this,this._onigLib))}return this._grammars.get(t)}},On=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Bn(Z.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(Z.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,s){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(e,n,s){return this._loadGrammar(e,n,s.embeddedLanguages,s.tokenTypes,new Pn(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,s,r,i){const o=new hn(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,s,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const s=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(e,n=[],s=0,r=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,s,r)}_grammarForScopeName(e,n=0,s=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,n,s,r,i)}},Ae=ve.NULL;function re(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},s=typeof t=="string"?t:t.name;for(const[r,i]of Object.entries(e?.colorReplacements||{}))typeof i=="string"?n[r]=i:r===s&&Object.assign(n,i);return n}function L(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function $n(t){return Array.isArray(t)?t:[t]}async function Ct(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ce(t){return!t||["plaintext","txt","text","plain"].includes(t)}function kt(t){return t==="ansi"||ce(t)}function le(t){return t==="none"}function Rt(t){return le(t)}const Mn=/(\r?\n)/g;function ue(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(Mn);let s=0;const r=[];for(let i=0;i<n.length;i+=2){const o=e?n[i]+(n[i+1]||""):n[i];r.push([o,s]),s+=n[i].length,s+=n[i+1]?.length||0}return r}const Je={light:"#333333",dark:"#bbbbbb"},Qe={light:"#fffffe",dark:"#1e1e1e"},Xe="__shiki_resolved";function Pe(t){if(t?.[Xe])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:s}=e;if(!n||!s){const a=e.settings?e.settings.find(c=>!c.name&&!c.scope):void 0;a?.settings?.foreground&&(s=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!s&&e?.colors?.["editor.foreground"]&&(s=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),s||(s=e.type==="light"?Je.light:Je.dark),n||(n=e.type==="light"?Qe.light:Qe.dark),e.fg=s,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let r=0;const i=new Map;function o(a){if(i.has(a))return i.get(a);r+=1;const c=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${c}`]?o(a):(i.set(a,c),c)}e.settings=e.settings.map(a=>{const c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),l=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!l)return a;const u={...a,settings:{...a.settings}};if(c){const h=o(a.settings.foreground);e.colorReplacements[h]=a.settings.foreground,u.settings.foreground=h}if(l){const h=o(a.settings.background);e.colorReplacements[h]=a.settings.background,u.settings.background=h}return u});for(const a of Object.keys(e.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!e.colors[a]?.startsWith("#")){const c=o(e.colors[a]);e.colorReplacements[c]=e.colors[a],e.colors[a]=c}return Object.defineProperty(e,Xe,{enumerable:!1,writable:!1,value:!0}),e}async function Nt(t){return[...new Set((await Promise.all(t.filter(e=>!kt(e)).map(async e=>await Ct(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Tt(t){return(await Promise.all(t.map(async e=>Rt(e)?null:Pe(await Ct(e))))).filter(e=>!!e)}function vt(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var jn=class extends On{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,s={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=s,this._themes.map(r=>this.loadTheme(r)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=Pe(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=Z.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=vt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(r=>r.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(r=>{this._alias[r]=t.name}),this._loadedLanguagesCache=null,e.size)for(const r of e)this._syncRegistry?._grammars?.get(r.scopeName)?.dispose(),this._resolvedGrammars.delete(r.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(r.scopeName),this._syncRegistry?._grammars?.delete(r.scopeName),this.loadLanguage(this._langMap.get(r.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const e=[...this._langGraph.entries()],n=e.filter(([s,r])=>!r);if(n.length){const s=e.filter(([r,i])=>i?(i.embeddedLanguages||i.embeddedLangs)?.some(o=>n.map(([a])=>a).includes(o)):!1).filter(r=>!n.includes(r));throw new S(`Missing languages ${n.map(([r])=>`\`${r}\``).join(", ")}, required by ${s.map(([r])=>`\`${r}\``).join(", ")}`)}for(const[s,r]of e)this._resolver.addLanguage(r);for(const[s,r]of e)this.loadLanguage(r)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const e=t.embeddedLanguages??t.embeddedLangs;if(e)for(const n of e)this._langGraph.set(n,this._langMap.get(n))}},Wn=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).includes(t.scopeName)||this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let s=1;s<=e.length;s++){const r=e.slice(0,s).join(".");n=[...n,...this._injections.get(r)||[]]}return n}};let $=0;function Ge(t){$+=1,t.warnings!==!1&&$>=10&&$%10===0&&console.warn(`[Shiki] ${$} 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 e=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),s=(t.themes||[]).flat(1).map(Pe),r=new jn(new Wn(t.engine,n),s,n,t.langAlias);let i;function o(m){return vt(m,t.langAlias)}function a(m){_();const b=r.getGrammar(typeof m=="string"?m:m.name);if(!b)throw new S(`Language \`${m}\` not found, you may need to load it first`);return b}function c(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();const b=r.getTheme(m);if(!b)throw new S(`Theme \`${m}\` not found, you may need to load it first`);return b}function l(m){_();const b=c(m);return i!==m&&(r.setTheme(b),i=m),{theme:b,colorMap:r.getColorMap()}}function u(){return _(),r.getLoadedThemes()}function h(){return _(),r.getLoadedLanguages()}function f(...m){_(),r.loadLanguages(m.flat(1))}async function d(...m){return f(await Nt(m))}function g(...m){_();for(const b of m.flat(1))r.loadTheme(b)}async function y(...m){return _(),g(await Tt(m))}function _(){if(e)throw new S("Shiki instance has been disposed")}function p(){e||(e=!0,r.dispose(),$-=1)}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:o,loadLanguage:d,loadLanguageSync:f,loadTheme:y,loadThemeSync:g,dispose:p,[Symbol.dispose]:p}}const Br=Ge;async function At(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,s]=await Promise.all([Tt(t.themes||[]),Nt(t.langs||[]),t.engine]);return Ge({...t,themes:e,langs:n,engine:s})}const Or=At,It=new WeakMap;function he(t,e){It.set(t,e)}function q(t){return It.get(t)}var fe=class Et{_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,n){return new Et(Object.fromEntries($n(n).map(s=>[s,Ae])),e)}constructor(...e){if(e.length===2){const[n,s]=e;this.lang=s,this._stacks=n}else{const[n,s,r]=e;this.lang=s,this._stacks={[r]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Dn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Dn(t){const e=[],n=new Set;function s(r){if(n.has(r))return;n.add(r);const i=r?.nameScopesList?.scopeName;i&&e.push(i),r.parent&&s(r.parent)}return s(t),e}function Fn(t,e){if(!(t instanceof fe))throw new S("Invalid grammar state");return t.getInternalStack(e)}const qn=/,/,Hn=/ /;function Lt(t,e,n={}){const{theme:s=t.getLoadedThemes()[0]}=n;if(ce(t.resolveLangAlias(n.lang||"text"))||le(s))return ue(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:r,colorMap:i}=t.setTheme(s),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(r.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${r.name}"`)}return zn(e,o,r,i,n)}function xt(...t){if(t.length===2)return q(t[1]);const[e,n,s={}]=t,{lang:r="text",theme:i=e.getLoadedThemes()[0]}=s;if(ce(r)||le(i))throw new S("Plain language does not have grammar state");if(r==="ansi")throw new S("ANSI language does not have grammar state");const{theme:o,colorMap:a}=e.setTheme(i),c=e.getLanguage(r);return new fe(Be(n,c,o,a,s).stateStack,c.name,o.name)}function zn(t,e,n,s,r){const i=Be(t,e,n,s,r),o=new fe(i.stateStack,e.name,n.name);return he(i.tokens,o),i.tokens}function Be(t,e,n,s,r){const i=re(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:c=!1}=r,l=ue(t);let u=r.grammarState?Fn(r.grammarState,n.name)??Ae:r.grammarContextCode!=null?Be(r.grammarContextCode,e,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ae,h=[];const f=[];for(let d=0,g=l.length;d<g;d++){const[y,_]=l[d];if(y===""){h=[],f.push([]);continue}if(o>0&&y.length>=o){h=[],f.push([{content:y,offset:_,color:"",fontStyle:0}]);continue}let p,m,b;c&&c!=="tokenType"&&(p=e.tokenizeLine(y,u,a),m=p.tokens,b=0);const w=e.tokenizeLine2(y,u,a),k=w.tokens.length/2;for(let T=0;T<k;T++){const E=w.tokens[2*T],de=T+1<k?w.tokens[2*T+2]:y.length;if(E===de)continue;const ge=w.tokens[2*T+1],qt=L(s[G.getForeground(ge)],i),Ht=G.getFontStyle(ge),K={content:y.substring(E,de),offset:_+E,color:qt,fontStyle:Ht};if(c==="tokenType")K.type=G.getTokenType(ge);else if(c){const Me=[];if(c!=="scopeName")for(const I of n.settings){let B;switch(typeof I.scope){case"string":B=I.scope.split(qn).map(me=>me.trim());break;case"object":B=I.scope;break;default:continue}Me.push({settings:I,selectors:B.map(me=>me.split(Hn))})}K.explanation=[];let je=0;for(;E+je<de;){const I=m[b],B=y.substring(I.startIndex,I.endIndex);je+=B.length,K.explanation.push({content:B,scopes:c==="scopeName"?Un(I.scopes):Kn(Me,I.scopes)}),b+=1}}h.push(K)}f.push(h),h=[],u=w.ruleStack}return{tokens:f,stateStack:u}}function Un(t){return t.map(e=>({scopeName:e}))}function Kn(t,e){const n=[];for(let s=0,r=e.length;s<r;s++){const i=e[s];n[s]={scopeName:i,themeMatches:Vn(t,i,e.slice(0,s))}}return n}function Ze(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Yn(t,e,n){if(!Ze(t.at(-1),e))return!1;let s=t.length-2,r=n.length-1;for(;s>=0&&r>=0;)Ze(t[s],n[r])&&(s-=1),r-=1;return s===-1}function Vn(t,e,n){const s=[];for(const{selectors:r,settings:i}of t)for(const o of r)if(Yn(o,e,n)){s.push(i);break}return s}function Oe(t,e,n,s=Lt){const r=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=r.map(l=>{const u=s(t,e,{...n,theme:l.theme});return{tokens:u,state:q(u),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),o=Jn(...i.map(l=>l.tokens)),a=o[0].map((l,u)=>l.map((h,f)=>{const d={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=h.explanation),o.forEach((g,y)=>{const{content:_,explanation:p,offset:m,...b}=g[u][f];d.variants[r[y].color]=b}),d})),c=i[0].state?new fe(Object.fromEntries(i.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;return c&&he(a,c),a}function Jn(...t){const e=t.map(()=>[]),n=t.length;for(let s=0;s<t[0].length;s++){const r=t.map(c=>c[s]),i=e.map(()=>[]);e.forEach((c,l)=>c.push(i[l]));const o=r.map(()=>0),a=r.map(c=>c[0]);for(;a.every(c=>c);){const c=Math.min(...a.map(l=>l.content.length));for(let l=0;l<n;l++){const u=a[l];u.content.length===c?(i[l].push(u),o[l]+=1,a[l]=r[l][o[l]]):(i[l].push({...u,content:u.content.slice(0,c)}),a[l]={...u,content:u.content.slice(c),offset:u.offset+c})}}}return e}const Qn=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Xn=/["&'<>`]/g,Zn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,es=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ts=/[|\\{}()[\]^$+*?.]/g,et=new WeakMap;function ns(t,e){if(t=t.replace(e.subset?ss(e.subset):Xn,s),e.subset||e.escapeOnly)return t;return t.replace(Zn,n).replace(es,s);function n(r,i,o){return e.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function s(r,i,o){return e.format(r.charCodeAt(0),o.charCodeAt(i+1),e)}}function ss(t){let e=et.get(t);return e||(e=rs(t),et.set(t,e)),e}function rs(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(ts,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const is=/[\dA-Fa-f]/;function os(t,e,n){const s="&#x"+t.toString(16).toUpperCase();return n&&e&&!is.test(String.fromCharCode(e))?s:s+";"}const as=/\d/;function cs(t,e,n){const s="&#"+String(t);return n&&e&&!as.test(String.fromCharCode(e))?s:s+";"}const ls=["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"],be={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",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:"€"},us=["cent","copy","divide","gt","lt","not","para","times"],Pt={}.hasOwnProperty,Ie={};let V;for(V in be)Pt.call(be,V)&&(Ie[be[V]]=V);const hs=/[^\dA-Za-z]/;function fs(t,e,n,s){const r=String.fromCharCode(t);if(Pt.call(Ie,r)){const i=Ie[r],o="&"+i;return n&&ls.includes(i)&&!us.includes(i)&&(!s||e&&e!==61&&hs.test(String.fromCharCode(e)))?o:o+";"}return""}function ds(t,e,n){let s=os(t,e,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=fs(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const i=cs(t,e,n.omitOptionalSemicolons);i.length<s.length&&(s=i)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function O(t,e){return ns(t,Object.assign({format:ds},e))}const gs=/^>|^->|<!--|-->|--!>|<!-$/g,ms=[">"],ps=["<",">"];function _s(t,e,n,s){return s.settings.bogusComments?"<?"+O(t.value,Object.assign({},s.settings.characterReferences,{subset:ms}))+">":"<!--"+t.value.replace(gs,r)+"-->";function r(i){return O(i,Object.assign({},s.settings.characterReferences,{subset:ps}))}}function ys(t,e,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}const C=Bt(1),Gt=Bt(-1),bs=[];function Bt(t){return e;function e(n,s,r){const i=n?n.children:bs;let o=(s||0)+t,a=i[o];if(!r)for(;a&&Le(a);)o+=t,a=i[o];return a}}const Ss={}.hasOwnProperty;function Ot(t){return e;function e(n,s,r){return Ss.call(t,n.tagName)&&t[n.tagName](n,s,r)}}const $e=Ot({body:Cs,caption:Se,colgroup:Se,dd:Ts,dt:Ns,head:Se,html:ws,li:Rs,optgroup:vs,option:As,p:ks,rp:tt,rt:tt,tbody:Es,td:nt,tfoot:Ls,th:nt,thead:Is,tr:xs});function Se(t,e,n){const s=C(n,e,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&Le(s.value.charAt(0)))}function ws(t,e,n){const s=C(n,e);return!s||s.type!=="comment"}function Cs(t,e,n){const s=C(n,e);return!s||s.type!=="comment"}function ks(t,e,n){const s=C(n,e);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Rs(t,e,n){const s=C(n,e);return!s||s.type==="element"&&s.tagName==="li"}function Ns(t,e,n){const s=C(n,e);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function Ts(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function tt(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function vs(t,e,n){const s=C(n,e);return!s||s.type==="element"&&s.tagName==="optgroup"}function As(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function Is(t,e,n){const s=C(n,e);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function Es(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function Ls(t,e,n){return!C(n,e)}function xs(t,e,n){const s=C(n,e);return!s||s.type==="element"&&s.tagName==="tr"}function nt(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const Ps=Ot({body:Os,colgroup:$s,head:Bs,html:Gs,tbody:Ms});function Gs(t){const e=C(t,-1);return!e||e.type!=="comment"}function Bs(t){const e=new Set;for(const s of t.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(e.has(s.tagName))return!1;e.add(s.tagName)}const n=t.children[0];return!n||n.type==="element"}function Os(t){const e=C(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Le(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function $s(t,e,n){const s=Gt(n,e),r=C(t,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&$e(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function Ms(t,e,n){const s=Gt(n,e),r=C(t,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&$e(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const J={name:[[`
|
|
4
|
+
\f\r &/=>`.split(""),`
|
|
5
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
6
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
7
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
8
|
+
\f\r &>`.split(""),`\0
|
|
9
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
10
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
11
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function js(t,e,n,s){const r=s.schema,i=r.space==="svg"?!1:s.settings.omitOptionalTags;let o=r.space==="svg"?s.settings.closeEmptyElements:s.settings.voids.includes(t.tagName.toLowerCase());const a=[];let c;r.space==="html"&&t.tagName==="svg"&&(s.schema=ot);const l=Ws(s,t.properties),u=s.all(r.space==="html"&&t.tagName==="template"?t.content:t);return s.schema=r,u&&(o=!1),(l||!i||!Ps(t,e,n))&&(a.push("<",t.tagName,l?" "+l:""),o&&(r.space==="svg"||s.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!s.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(u),!o&&(!i||!$e(t,e,n))&&a.push("</"+t.tagName+">"),a.join("")}function Ws(t,e){const n=[];let s=-1,r;if(e){for(r in e)if(e[r]!==null&&e[r]!==void 0){const i=Ds(t,r,e[r]);i&&n.push(i)}}for(;++s<n.length;){const i=t.settings.tightAttributes?n[s].charAt(n[s].length-1):void 0;s!==n.length-1&&i!=='"'&&i!=="'"&&(n[s]+=" ")}return n.join("")}function Ds(t,e,n){const s=zt(t.schema,e),r=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,i=t.settings.allowDangerousCharacters?0:1;let o=t.quote,a;if(s.overloadedBoolean&&(n===s.attribute||n==="")?n=!0:(s.boolean||s.overloadedBoolean)&&(typeof n!="string"||n===s.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=O(s.attribute,Object.assign({},t.settings.characterReferences,{subset:J.name[r][i]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?Ut:Kt)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?c:(t.settings.preferUnquoted&&(a=O(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:J.unquoted[r][i]}))),a!==n&&(t.settings.quoteSmart&&We(n,o)>We(n,t.alternative)&&(o=t.alternative),a=o+O(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?J.single:J.double)[r][i],attribute:!0}))+o),c+(a&&"="+a))}const Fs=["<","&"];function $t(t,e,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:O(t.value,Object.assign({},s.settings.characterReferences,{subset:Fs}))}function qs(t,e,n,s){return s.settings.allowDangerousHtml?t.value:$t(t,e,n,s)}function Hs(t,e,n,s){return s.all(t)}const zs=Vt("type",{invalid:Us,unknown:Ks,handlers:{comment:_s,doctype:ys,element:js,raw:qs,root:Hs,text:$t}});function Us(t){throw new Error("Expected node, not `"+t+"`")}function Ks(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Ys={},Vs={},Js=[];function Qs(t,e){const n=e||Ys,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:Xs,all:Zs,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Qn,characterReferences:n.characterReferences||Vs,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?ot:Yt,quote:s,alternative:r}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Xs(t,e,n){return zs(t,e,n,this)}function Zs(t){const e=[],n=t&&t.children||Js;let s=-1;for(;++s<n.length;)e[s]=this.one(n[s],s,t);return e.join("")}const st=/\s+/g;function Mt(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(st)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(st);for(const s of n)s&&!t.properties.class.includes(s)&&t.properties.class.push(s);return t}const er=/:?lang=["']([^"']+)["']/g,tr=/(?:```|~~~)([\w-]+)/g,nr=/\\begin\{([\w-]+)\}/g,sr=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,rr=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function ir(t){const e=ue(t,!0).map(([r])=>r);function n(r){if(r===t.length)return{line:e.length-1,character:e.at(-1).length};let i=r,o=0;for(const a of e){if(i<a.length)break;i-=a.length,o++}return{line:o,character:i}}function s(r,i){let o=0;for(let a=0;a<r;a++)o+=e[a].length;return o+=i,o}return{lines:e,indexToPos:n,posToIndex:s}}function $r(t,e,n){const s=new Set;for(const i of t.matchAll(er)){const o=i[1].toLowerCase().trim();o&&s.add(o)}for(const i of t.matchAll(tr)){const o=i[1].toLowerCase().trim();o&&s.add(o)}for(const i of t.matchAll(nr)){const o=i[1].toLowerCase().trim();o&&s.add(o)}for(const i of t.matchAll(sr)){const o=i[1].toLowerCase().trim(),a=o.includes("/")?o.split("/").pop():o;a&&s.add(a)}if(rr.test(t)&&s.add("yaml"),!n)return[...s];const r=n.getBundledLanguages();return[...s].filter(i=>i&&r[i])}const or=["color","background-color"];function ar(t,e){let n=0;const s=[];for(const r of e)r>n&&s.push({...t,content:t.content.slice(n,r),offset:t.offset+n}),n=r;return n<t.content.length&&s.push({...t,content:t.content.slice(n),offset:t.offset+n}),s}function cr(t,e){let n=0,s=t.length;for(;n<s;){const r=n+(s-n>>1);t[r]<=e?n=r+1:s=r}return n}function lr(t,e){const n=[...e instanceof Set?e:new Set(e)].sort((s,r)=>s-r);return n.length?t.map(s=>s.flatMap(r=>{const i=r.offset+r.content.length,o=cr(n,r.offset);let a=o;for(;a<n.length&&n[a]<i;)a++;if(o===a)return r;const c=n.slice(o,a);for(let l=0;l<c.length;l++)c[l]-=r.offset;return ar(r,c)})):t}function ur(t,e,n,s,r="css-vars"){const i={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(u=>ie(t.variants[u])),a=new Set(o.flatMap(u=>Object.keys(u))),c={},l=(u,h)=>{const f=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+e[u]+(h==="color"?"":f)};return o.forEach((u,h)=>{for(const f of a){const d=u[f]||"inherit";if(h===0&&s&&or.includes(f))if(s==="light-dark()"&&o.length>1){const g=e.findIndex(m=>m==="light"),y=e.findIndex(m=>m==="dark");if(g===-1||y===-1)throw new S('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const _=o[g][f]||"inherit",p=o[y][f]||"inherit";c[f]=`light-dark(${_}, ${p})`,r==="css-vars"&&(c[l(h,f)]=d)}else c[f]=d;else r==="css-vars"&&(c[l(h,f)]=d)}}),i.htmlStyle=c,i}function ie(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&N.Italic&&(e["font-style"]="italic"),t.fontStyle&N.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&N.Underline&&n.push("underline"),t.fontStyle&N.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function Ee(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function hr(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let r=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new S(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...s.indexToPos(o),offset:o}}else{const a=s.lines[o.line];if(a===void 0)throw new S(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${s.lines.length}`);let c=o.character;if(c<0&&(c=a.length+c),c<0||c>a.length)throw new S(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:c,offset:s.posToIndex(o.line,c)}}};const s=ir(n.source),i=(n.options.decorations||[]).map(o=>({...o,start:r(o.start),end:r(o.end)}));fr(i),t.set(n.meta,{decorations:i,converter:s,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return lr(n,e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]))},code(n){if(!this.options.decorations?.length)return;const s=e(this),r=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(r.length!==s.converter.lines.length)throw new S(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function i(u,h,f,d){const g=r[u];let y="",_=-1,p=-1;if(h===0&&(_=0),f===0&&(p=0),f===Number.POSITIVE_INFINITY&&(p=g.children.length),_===-1||p===-1)for(let b=0;b<g.children.length;b++)y+=jt(g.children[b]),_===-1&&y.length===h&&(_=b+1),p===-1&&y.length===f&&(p=b+1);if(_===-1)throw new S(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);if(p===-1)throw new S(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);const m=g.children.slice(_,p);if(!d.alwaysWrap&&m.length===g.children.length)a(g,d,"line");else if(!d.alwaysWrap&&m.length===1&&m[0].type==="element")a(m[0],d,"token");else{const b={type:"element",tagName:"span",properties:{},children:m};a(b,d,"wrapper"),g.children.splice(_,m.length,b)}}function o(u,h){r[u]=a(r[u],h,"line")}function a(u,h,f){const d=h.properties||{},g=h.transform||(y=>y);return u.tagName=h.tagName||"span",u.properties={...u.properties,...d,class:u.properties.class},h.properties?.class&&Mt(u,h.properties.class),u=g(u,f)||u,u}const c=[],l=s.decorations.sort((u,h)=>h.start.offset-u.start.offset||u.end.offset-h.end.offset);for(const u of l){const{start:h,end:f}=u;if(h.line===f.line)i(h.line,h.character,f.character,u);else if(h.line<f.line){i(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let d=h.line+1;d<f.line;d++)c.unshift(()=>o(d,u));i(f.line,0,f.character,u)}}c.forEach(u=>u())}}}function fr(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new S(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let s=e+1;s<t.length;s++){const r=t[s],i=n.start.offset<=r.start.offset&&r.start.offset<n.end.offset,o=n.start.offset<r.end.offset&&r.end.offset<=n.end.offset,a=r.start.offset<=n.start.offset&&n.start.offset<r.end.offset,c=r.start.offset<n.end.offset&&n.end.offset<=r.end.offset;if(i||o||a||c){if(i&&o||a&&c||a&&n.start.offset===n.end.offset||o&&r.start.offset===r.end.offset)continue;throw new S(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function jt(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(jt).join(""):""}const dr=[hr()];function oe(t){const e=gr(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...dr]}function gr(t){const e=[],n=[],s=[];for(const r of t)switch(r.enforce){case"pre":e.push(r);break;case"post":n.push(r);break;default:s.push(r)}return{pre:e,post:n,normal:s}}var P=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],we={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function mr(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const s=t.indexOf("m",n);if(s!==-1)return{sequence:t.substring(n+2,s).split(";"),startPosition:n,position:s+1}}return{position:t.length}}function rt(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(s=>Number.parseInt(s));return n.length!==3||n.some(s=>Number.isNaN(s))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function pr(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(s===0)e.push({type:"resetAll"});else if(s<=9)we[s]&&e.push({type:"setDecoration",value:we[s]});else if(s<=29){const r=we[s-20];r&&(e.push({type:"resetDecoration",value:r}),r==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)e.push({type:"setForegroundColor",value:{type:"named",name:P[s-30]}});else if(s===38){const r=rt(t);r&&e.push({type:"setForegroundColor",value:r})}else if(s===39)e.push({type:"resetForegroundColor"});else if(s<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:P[s-40]}});else if(s===48){const r=rt(t);r&&e.push({type:"setBackgroundColor",value:r})}else s===49?e.push({type:"resetBackgroundColor"}):s===53?e.push({type:"setDecoration",value:"overline"}):s===55?e.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?e.push({type:"setForegroundColor",value:{type:"named",name:P[s-90+8]}}):s>=100&&s<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:P[s-100+8]}})}return e}function _r(){let t=null,e=null,n=new Set;return{parse(s){const r=[];let i=0;do{const o=mr(s,i),a=o.sequence?s.substring(i,o.startPosition):s.substring(i);if(a.length>0&&r.push({value:a,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const c=pr(o.sequence);for(const l of c)l.type==="resetAll"?(t=null,e=null,n.clear()):l.type==="resetForegroundColor"?t=null:l.type==="resetBackgroundColor"?e=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of c)l.type==="setForegroundColor"?t=l.value:l.type==="setBackgroundColor"?e=l.value:l.type==="setDecoration"&&n.add(l.value)}i=o.position}while(i<s.length);return r}}}var yr={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function br(t=yr){function e(a){return t[a]}function n(a){return`#${a.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let s;function r(){if(s)return s;s=[];for(let l=0;l<P.length;l++)s.push(e(P[l]));let a=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)s.push(n([a[l],a[u],a[h]]));let c=8;for(let l=0;l<24;l++,c+=10)s.push(n([c,c,c]));return s}function i(a){return r()[a]}function o(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return i(a.index)}}return{value:o}}const Sr=/#([0-9a-f]{3,8})/i,wr=/var\((--[\w-]+-ansi-[\w-]+)\)/,Cr={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 kr(t,e,n){const s=re(t,n),r=ue(e),i=br(Object.fromEntries(P.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,t.colors?.[c]||Cr[a]]}))),o=_r();return r.map(a=>o.parse(a[0]).map(c=>{let l,u;c.decorations.has("reverse")?(l=c.background?i.value(c.background):t.bg,u=c.foreground?i.value(c.foreground):t.fg):(l=c.foreground?i.value(c.foreground):t.fg,u=c.background?i.value(c.background):void 0),l=L(l,s),u=L(u,s),c.decorations.has("dim")&&(l=Rr(l));let h=N.None;return c.decorations.has("bold")&&(h|=N.Bold),c.decorations.has("italic")&&(h|=N.Italic),c.decorations.has("underline")&&(h|=N.Underline),c.decorations.has("strikethrough")&&(h|=N.Strikethrough),{content:c.value,offset:a[1],color:l,bgColor:u,fontStyle:h}}))}function Rr(t){const e=t.match(Sr);if(e){const s=e[1];if(s.length===8){const r=Math.round(Number.parseInt(s.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${s.slice(0,6)}${r}`}else{if(s.length===6)return`#${s}80`;if(s.length===4){const r=s[0],i=s[1],o=s[2],a=s[3];return`#${r}${r}${i}${i}${o}${o}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(s.length===3){const r=s[0],i=s[1],o=s[2];return`#${r}${r}${i}${i}${o}${o}80`}}}const n=t.match(wr);return n?`var(${n[1]}-dim)`:t}function ae(t,e,n={}){const s=t.resolveLangAlias(n.lang||"text"),{theme:r=t.getLoadedThemes()[0]}=n;if(!ce(s)&&!le(r)&&s==="ansi"){const{theme:i}=t.setTheme(r);return kr(i,e,n)}return Lt(t,e,n)}function H(t,e,n){let s,r,i,o,a,c;if("themes"in n){const{defaultColor:l="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=n,f=Object.entries(n.themes).filter(p=>p[1]).map(p=>({color:p[0],theme:p[1]})).sort((p,m)=>p.color===l?-1:m.color===l?1:0);if(f.length===0)throw new S("`themes` option must not be empty");const d=Oe(t,e,n,ae);if(c=q(d),l&&l!=="light-dark()"&&!f.some(p=>p.color===l))throw new S(`\`themes\` option must contain the defaultColor key \`${l}\``);const g=f.map(p=>t.getTheme(p.theme)),y=f.map(p=>p.color);i=d.map(p=>p.map(m=>ur(m,y,u,l,h))),c&&he(i,c);const _=f.map(p=>re(p.theme,n));r=it(f,g,_,u,l,"fg",h),s=it(f,g,_,u,l,"bg",h),o=`shiki-themes ${g.map(p=>p.name).join(" ")}`,a=l?void 0:[r,s].join(";")}else if("theme"in n){const l=re(n.theme,n);i=ae(t,e,n);const u=t.getTheme(n.theme);s=L(u.bg,l),r=L(u.fg,l),o=u.name,c=q(i)}else throw new S("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:r,bg:s,themeName:o,rootStyle:a,grammarState:c}}function it(t,e,n,s,r,i,o){return t.map((a,c)=>{const l=L(e[c][i],n[c])||"inherit",u=`${s+a.color}${i==="bg"?"-bg":""}:${l}`;if(c===0&&r){if(r==="light-dark()"&&t.length>1){const h=t.findIndex(d=>d.color==="light"),f=t.findIndex(d=>d.color==="dark");if(h===-1||f===-1)throw new S('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${L(e[h][i],n[h])||"inherit"}, ${L(e[f][i],n[f])||"inherit"});${u}`}return l}return o==="css-vars"?u:null}).filter(a=>!!a).join(";")}const Wt=/^\s+$/,Nr=/^(\s*)(.*?)(\s*)$/;function z(t,e,n,s={meta:{},options:n,codeToHast:(r,i)=>z(t,r,i),codeToTokens:(r,i)=>H(t,r,i)}){let r=e;for(const g of oe(n))r=g.preprocess?.call(s,r,n)||r;let{tokens:i,fg:o,bg:a,themeName:c,rootStyle:l,grammarState:u}=H(t,r,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:f=!1}=n;h===!0?i=vr(i):h==="never"&&(i=Ar(i)),f&&(i=Ir(i));const d={...s,get source(){return r}};for(const g of oe(n))i=g.tokens?.call(d,i)||i;return Tr(i,{...n,fg:o,bg:a,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},d,u)}function Tr(t,e,n,s=q(t)){const r=oe(e),i=[],o={type:"root",children:[]},{structure:a="classic",tabindex:c="0"}=e,l={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?l.style=e.rootStyle:l.style=`background-color:${e.bg};color:${e.fg}`),c!==!1&&c!=null&&(l.tabindex=c.toString());for(const[y,_]of Object.entries(e.meta||{}))y.startsWith("_")||(l[y]=_);let u={type:"element",tagName:"pre",properties:l,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:i};const f=[],d={...n,structure:a,addClassToHast:Mt,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return h},get lines(){return f}};if(t.forEach((y,_)=>{_&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&i.push({type:"text",value:`
|
|
12
|
+
`}));let p={type:"element",tagName:"span",properties:{class:"line"},children:[]},m=0;for(const b of y){let w={type:"element",tagName:"span",properties:{...b.htmlAttrs},children:[{type:"text",value:b.content}]};const k=Ee(b.htmlStyle||ie(b));k&&(w.properties.style=k);for(const T of r)w=T?.span?.call(d,w,_+1,m,p,b)||w;a==="inline"?o.children.push(w):a==="classic"&&p.children.push(w),m+=b.content.length}if(a==="classic"){for(const b of r)p=b?.line?.call(d,p,_+1)||p;f.push(p),i.push(p)}else a==="inline"&&f.push(p)}),a==="classic"){for(const y of r)h=y?.code?.call(d,h)||h;u.children.push(h);for(const y of r)u=y?.pre?.call(d,u)||u;o.children.push(u)}else if(a==="inline"){const y=[];let _={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const m of o.children)m.type==="element"&&m.tagName==="br"?(y.push(_),_={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(m.type==="element"||m.type==="text")&&_.children.push(m);y.push(_);let p={type:"element",tagName:"code",properties:{},children:y};for(const m of r)p=m?.code?.call(d,p)||p;o.children=[];for(let m=0;m<p.children.length;m++){m>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const b=p.children[m];b.type==="element"&&o.children.push(...b.children)}}let g=o;for(const y of r)g=y?.root?.call(d,g)||g;return s&&he(g,s),g}function vr(t){return t.map(e=>{const n=[];let s="",r;return e.forEach((i,o)=>{const a=!(i.fontStyle&&(i.fontStyle&N.Underline||i.fontStyle&N.Strikethrough));a&&Wt.test(i.content)&&e[o+1]?(r===void 0&&(r=i.offset),s+=i.content):s?(a?n.push({...i,offset:r,content:s+i.content}):n.push({content:s,offset:r},i),r=void 0,s=""):n.push(i)}),n})}function Ar(t){return t.map(e=>e.flatMap(n=>{if(Wt.test(n.content))return n;const s=n.content.match(Nr);if(!s)return n;const[,r,i,o]=s;if(!r&&!o)return n;const a=[{...n,offset:n.offset+r.length,content:i}];return r&&a.unshift({content:r,offset:n.offset}),o&&a.push({content:o,offset:n.offset+r.length+i.length}),a}))}function Ir(t){return t.map(e=>{const n=[];for(const s of e){if(n.length===0){n.push({...s});continue}const r=n.at(-1),i=Ee(r.htmlStyle||ie(r)),o=Ee(s.htmlStyle||ie(s)),a=r.fontStyle&&(r.fontStyle&N.Underline||r.fontStyle&N.Strikethrough),c=s.fontStyle&&(s.fontStyle&N.Underline||s.fontStyle&N.Strikethrough);!a&&!c&&i===o?r.content+=s.content:n.push({...s})}return n})}const Er=Qs;function Dt(t,e,n){const s={meta:{},options:n,codeToHast:(i,o)=>z(t,i,o),codeToTokens:(i,o)=>H(t,i,o)};let r=Er(z(t,e,n,s));for(const i of oe(n))r=i.postprocess?.call(s,r,n)||r;return r}async function Ft(t){const e=await At(t);return{getLastGrammarState:(...n)=>xt(e,...n),codeToTokensBase:(n,s)=>ae(e,n,s),codeToTokensWithThemes:(n,s)=>Oe(e,n,s),codeToTokens:(n,s)=>H(e,n,s),codeToHast:(n,s)=>z(e,n,s),codeToHtml:(n,s)=>Dt(e,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Mr(t){const e=Ge(t);return{getLastGrammarState:(...n)=>xt(e,...n),codeToTokensBase:(n,s)=>ae(e,n,s),codeToTokensWithThemes:(n,s)=>Oe(e,n,s),codeToTokens:(n,s)=>H(e,n,s),codeToHast:(n,s)=>z(e,n,s),codeToHtml:(n,s)=>Dt(e,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Lr(t){let e;async function n(s){if(e){const r=await e;return await Promise.all([r.loadTheme(...s.themes||[]),r.loadLanguage(...s.langs||[])]),r}else return e=t({...s,themes:s.themes||[],langs:s.langs||[]}),e}return n}const jr=Lr(Ft);function Wr(t){const e=t.langs,n=t.themes,s=t.engine;async function r(i){function o(h){if(typeof h=="string"){if(h=i.langAlias?.[h]||h,kt(h))return[];const f=e[h];if(!f)throw new S(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}function a(h){if(Rt(h))return"none";if(typeof h=="string"){const f=n[h];if(!f)throw new S(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}const c=(i.themes??[]).map(h=>a(h)),l=(i.langs??[]).map(h=>o(h)),u=await Ft({engine:i.engine??s(),...i,themes:c,langs:l});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(o))},loadTheme(...h){return u.loadTheme(...h.map(a))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return r}function xr(t){let e;async function n(s={}){if(e){const r=await e;return await Promise.all([r.loadTheme(...s.themes||[]),r.loadLanguage(...s.langs||[])]),r}else{e=t({...s,themes:[],langs:[]});const r=await e;return await Promise.all([r.loadTheme(...s.themes||[]),r.loadLanguage(...s.langs||[])]),r}}return n}function Dr(t,e){const n=xr(t);async function s(r,i){const o=await n({langs:[i.lang],themes:"theme"in i?[i.theme]:Object.values(i.themes)}),a=await e?.guessEmbeddedLanguages?.(r,i.lang,o);return a&&await o.loadLanguage(...a),o}return{getSingletonHighlighter(r){return n(r)},async codeToHtml(r,i){return(await s(r,i)).codeToHtml(r,i)},async codeToHast(r,i){return(await s(r,i)).codeToHast(r,i)},async codeToTokens(r,i){return(await s(r,i)).codeToTokens(r,i)},async codeToTokensBase(r,i){return(await s(r,i)).codeToTokensBase(r,i)},async codeToTokensWithThemes(r,i){return(await s(r,i)).codeToTokensWithThemes(r,i)},async getLastGrammarState(r,i){return(await n({langs:[i.lang],themes:[i.theme]})).getLastGrammarState(r,i)}}}function Fr(t={}){const{name:e="css-variables",variablePrefix:n="--shiki-",fontStyle:s=!0}=t,r=o=>t.variableDefaults?.[o]?`var(${n}${o}, ${t.variableDefaults[o]})`:`var(${n}${o})`,i={name:e,type:"dark",colors:{"editor.foreground":r("foreground"),"editor.background":r("background"),"terminal.ansiBlack":r("ansi-black"),"terminal.ansiRed":r("ansi-red"),"terminal.ansiGreen":r("ansi-green"),"terminal.ansiYellow":r("ansi-yellow"),"terminal.ansiBlue":r("ansi-blue"),"terminal.ansiMagenta":r("ansi-magenta"),"terminal.ansiCyan":r("ansi-cyan"),"terminal.ansiWhite":r("ansi-white"),"terminal.ansiBrightBlack":r("ansi-bright-black"),"terminal.ansiBrightRed":r("ansi-bright-red"),"terminal.ansiBrightGreen":r("ansi-bright-green"),"terminal.ansiBrightYellow":r("ansi-bright-yellow"),"terminal.ansiBrightBlue":r("ansi-bright-blue"),"terminal.ansiBrightMagenta":r("ansi-bright-magenta"),"terminal.ansiBrightCyan":r("ansi-bright-cyan"),"terminal.ansiBrightWhite":r("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:r("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:r("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:r("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:r("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:r("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:r("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:r("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:r("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:r("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:r("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:r("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:r("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:r("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:r("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:r("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:r("token-changed")}}]};return s||(i.tokenColors=i.tokenColors?.map(o=>(o.settings?.fontStyle&&delete o.settings.fontStyle,o))),i}export{S as ShikiError,Mt as addClassToHast,L as applyColorReplacements,z as codeToHast,Dt as codeToHtml,H as codeToTokens,ae as codeToTokensBase,Oe as codeToTokensWithThemes,Wr as createBundledHighlighter,Fr as createCssVariablesTheme,Ft as createHighlighterCore,Mr as createHighlighterCoreSync,ir as createPositionConverter,Or as createShikiInternal,Br as createShikiInternalSync,Ge as createShikiPrimitive,At as createShikiPrimitiveAsync,Dr as createSingletonShorthands,ur as flatTokenVariants,xt as getLastGrammarState,jr as getSingletonHighlighterCore,ie as getTokenStyleObject,$r as guessEmbeddedLanguages,Er as hastToHtml,le as isNoneTheme,ce as isPlainLang,kt as isSpecialLang,Rt as isSpecialTheme,xr as makeSingletonHighlighter,Lr as makeSingletonHighlighterCore,Ct as normalizeGetter,Pe as normalizeTheme,re as resolveColorReplacements,ue as splitLines,ar as splitToken,lr as splitTokens,Ee as stringifyTokenStyle,$n as toArray,kr as tokenizeAnsiWithTheme,zn as tokenizeWithTheme,Tr as tokensToHast,hr as transformerDecorations};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse(`{"displayName":"C","name":"c","patterns":[{"include":"#preprocessor-rule-enabled"},{"include":"#preprocessor-rule-disabled"},{"include":"#preprocessor-rule-conditional"},{"include":"#predefined_macros"},{"include":"#comments"},{"include":"#switch_statement"},{"include":"#anon_pattern_1"},{"include":"#storage_types"},{"include":"#anon_pattern_2"},{"include":"#anon_pattern_3"},{"include":"#anon_pattern_4"},{"include":"#anon_pattern_5"},{"include":"#anon_pattern_6"},{"include":"#anon_pattern_7"},{"include":"#operators"},{"include":"#numbers"},{"include":"#strings"},{"include":"#anon_pattern_range_1"},{"include":"#anon_pattern_range_2"},{"include":"#anon_pattern_range_3"},{"include":"#pragma-mark"},{"include":"#anon_pattern_range_4"},{"include":"#anon_pattern_range_5"},{"include":"#anon_pattern_range_6"},{"include":"#anon_pattern_8"},{"include":"#anon_pattern_9"},{"include":"#anon_pattern_10"},{"include":"#anon_pattern_11"},{"include":"#anon_pattern_12"},{"include":"#anon_pattern_13"},{"include":"#block"},{"include":"#parens"},{"include":"#anon_pattern_range_7"},{"include":"#line_continuation_character"},{"include":"#anon_pattern_range_8"},{"include":"#anon_pattern_range_9"},{"include":"#anon_pattern_14"},{"include":"#anon_pattern_15"}],"repository":{"access-method":{"begin":"([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))\\\\s*(?:(\\\\.)|(->))((?:[A-Z_a-z][0-9A-Z_a-z]*\\\\s*(?:\\\\.|->))*)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(\\\\()","beginCaptures":{"1":{"name":"variable.object.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"match":"\\\\.","name":"punctuation.separator.dot-access.c"},{"match":"->","name":"punctuation.separator.pointer-access.c"},{"match":"[A-Z_a-z][0-9A-Z_a-z]*","name":"variable.object.c"},{"match":".+","name":"everything.else.c"}]},"5":{"name":"entity.name.function.member.c"},"6":{"name":"punctuation.section.arguments.begin.bracket.round.function.member.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arguments.end.bracket.round.function.member.c"}},"name":"meta.function-call.member.c","patterns":[{"include":"#function-call-innards"}]},"anon_pattern_1":{"match":"\\\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\\\b","name":"keyword.control.c"},"anon_pattern_10":{"match":"\\\\b((?:int8|int16|int32|int64|uint8|uint16|uint32|uint64|int_least8|int_least16|int_least32|int_least64|uint_least8|uint_least16|uint_least32|uint_least64|int_fast8|int_fast16|int_fast32|int_fast64|uint_fast8|uint_fast16|uint_fast32|uint_fast64|intptr|uintptr|intmax|uintmax)_t)\\\\b","name":"support.type.stdint.c"},"anon_pattern_11":{"match":"\\\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\\\b","name":"support.constant.mac-classic.c"},"anon_pattern_12":{"match":"\\\\b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\\\\b","name":"support.type.mac-classic.c"},"anon_pattern_13":{"match":"\\\\b([0-9A-Z_a-z]+_t)\\\\b","name":"support.type.posix-reserved.c"},"anon_pattern_14":{"match":";","name":"punctuation.terminator.statement.c"},"anon_pattern_15":{"match":",","name":"punctuation.separator.delimiter.c"},"anon_pattern_2":{"match":"typedef","name":"keyword.other.typedef.c"},"anon_pattern_3":{"match":"\\\\b(const|extern|register|restrict|static|volatile|inline)\\\\b","name":"storage.modifier.c"},"anon_pattern_4":{"match":"\\\\bk[A-Z]\\\\w*\\\\b","name":"constant.other.variable.mac-classic.c"},"anon_pattern_5":{"match":"\\\\bg[A-Z]\\\\w*\\\\b","name":"variable.other.readwrite.global.mac-classic.c"},"anon_pattern_6":{"match":"\\\\bs[A-Z]\\\\w*\\\\b","name":"variable.other.readwrite.static.mac-classic.c"},"anon_pattern_7":{"match":"\\\\b(NULL|true|false|TRUE|FALSE)\\\\b","name":"constant.language.c"},"anon_pattern_8":{"match":"\\\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\\\b","name":"support.type.sys-types.c"},"anon_pattern_9":{"match":"\\\\b(pthread_(?:attr_|cond_|condattr_|mutex_|mutexattr_|once_|rwlock_|rwlockattr_||key_)t)\\\\b","name":"support.type.pthread.c"},"anon_pattern_range_1":{"begin":"((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))((#)\\\\s*define)\\\\b\\\\s+((?<!\\\\w)[A-Z_a-z]\\\\w*(?!\\\\w))(?:(\\\\()([^()\\\\\\\\]+)(\\\\)))?","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.directive.define.c"},"6":{"name":"punctuation.definition.directive.c"},"7":{"name":"entity.name.function.preprocessor.c"},"8":{"name":"punctuation.definition.parameters.begin.c"},"9":{"patterns":[{"captures":{"1":{"name":"variable.parameter.preprocessor.c"}},"match":"(?<=[(,])\\\\s*((?<!\\\\w)[A-Z_a-z]\\\\w*(?!\\\\w))\\\\s*"},{"match":",","name":"punctuation.separator.parameters.c"},{"match":"\\\\.\\\\.\\\\.","name":"ellipses.c punctuation.vararg-ellipses.variable.parameter.preprocessor.c"}]},"10":{"name":"punctuation.definition.parameters.end.c"}},"end":"(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.macro.c","patterns":[{"include":"#preprocessor-rule-define-line-contents"}]},"anon_pattern_range_2":{"begin":"^\\\\s*((#)\\\\s*(error|warning))\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.control.directive.diagnostic.$3.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.diagnostic.c","patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"[^\\"']","end":"(?<!\\\\\\\\)(?=\\\\s*\\\\n)","name":"string.unquoted.single.c","patterns":[{"include":"#line_continuation_character"},{"include":"#comments"}]}]},"anon_pattern_range_3":{"begin":"^\\\\s*((#)\\\\s*(i(?:nclude(?:_next)?|mport)))\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.control.directive.$3.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.include.c","patterns":[{"include":"#line_continuation_character"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.include.c"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.other.lt-gt.include.c"}]},"anon_pattern_range_4":{"begin":"^\\\\s*((#)\\\\s*line)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.line.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#strings"},{"include":"#numbers"},{"include":"#line_continuation_character"}]},"anon_pattern_range_5":{"begin":"^\\\\s*((#)\\\\s*undef)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.undef.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"match":"[$A-Z_a-z][$\\\\w]*","name":"entity.name.function.preprocessor.c"},{"include":"#line_continuation_character"}]},"anon_pattern_range_6":{"begin":"^\\\\s*((#)\\\\s*pragma)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.pragma.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.pragma.c","patterns":[{"include":"#strings"},{"match":"[$A-Z_a-z][-$\\\\w]*","name":"entity.other.attribute-name.pragma.preprocessor.c"},{"include":"#numbers"},{"include":"#line_continuation_character"}]},"anon_pattern_range_7":{"begin":"(?<!\\\\w)(?!\\\\s*(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|pthread_rwlock_t|atomic_uintptr_t|atomic_ptrdiff_t|atomic_uintmax_t|atomic_intmax_t|atomic_char32_t|atomic_intptr_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|uint_least8_t|int_least32_t|int_least16_t|pthread_key_t|uint_fast32_t|uint_fast64_t|uint_fast16_t|atomic_size_t|atomic_ushort|atomic_ullong|int_least64_t|atomic_ulong|int_least8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|memory_order|atomic_schar|atomic_uchar|atomic_short|atomic_llong|thread_local|atomic_bool|atomic_uint|atomic_long|int_fast8_t|suseconds_t|atomic_char|atomic_int|useconds_t|_Imaginary|uintmax_t|in_addr_t|in_port_t|_Noreturn|blksize_t|pthread_t|uintptr_t|volatile|u_quad_t|blkcnt_t|intmax_t|intptr_t|_Complex|uint16_t|uint32_t|uint64_t|_Alignof|_Alignas|continue|unsigned|restrict|intmax_t|register|int64_t|qaddr_t|segsz_t|_Atomic|alignas|default|caddr_t|nlink_t|typedef|u_short|fixpt_t|clock_t|swblk_t|ssize_t|alignof|daddr_t|int16_t|int32_t|uint8_t|struct|mode_t|size_t|time_t|ushort|u_long|u_char|int8_t|double|signed|static|extern|inline|return|switch|xor_eq|and_eq|bitand|not_eq|sizeof|quad_t|uid_t|bitor|union|off_t|key_t|ino_t|compl|u_int|short|const|false|while|float|pid_t|break|_Bool|or_eq|div_t|dev_t|gid_t|id_t|long|case|goto|else|bool|auto|id_t|enum|uint|true|NULL|void|char|for|not|int|and|xor|do|or|if)\\\\s*\\\\()(?=[A-Z_a-z]\\\\w*\\\\s*\\\\()","end":"(?!\\\\G)(?<=\\\\))","name":"meta.function.c","patterns":[{"include":"#function-innards"}]},"anon_pattern_range_8":{"begin":"([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))?(\\\\[)(?!])","beginCaptures":{"1":{"name":"variable.object.c"},"2":{"name":"punctuation.definition.begin.bracket.square.c"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.square.c"}},"name":"meta.bracket.square.access.c","patterns":[{"include":"#function-call-innards"}]},"anon_pattern_range_9":{"match":"\\\\[\\\\s*]","name":"storage.modifier.array.bracket.square.c"},"backslash_escapes":{"match":"\\\\\\\\([\\"'?\\\\\\\\abefnprtv]|[0-3][0-7]{0,2}|[4-7]\\\\d?|x\\\\h{0,2}|u\\\\h{0,4}|U\\\\h{0,8})","name":"constant.character.escape.c"},"block":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"name":"meta.block.c","patterns":[{"include":"#block_innards"}]}]},"block_comment":{"patterns":[{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"},{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"}]},"block_innards":{"patterns":[{"include":"#preprocessor-rule-enabled-block"},{"include":"#preprocessor-rule-disabled-block"},{"include":"#preprocessor-rule-conditional-block"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#c_function_call"},{"begin":"(?=\\\\s)(?<!else|new|return)(?<=\\\\w)\\\\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"variable.other.c"},"2":{"name":"punctuation.section.parens.begin.bracket.round.initialization.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.initialization.c"}},"name":"meta.initialization.c","patterns":[{"include":"#function-call-innards"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"patterns":[{"include":"#block_innards"}]},{"include":"#parens-block"},{"include":"$self"}]},"c_conditional_context":{"patterns":[{"include":"$self"},{"include":"#block_innards"}]},"c_function_call":{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\\\s*\\\\(|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[])\\\\s*\\\\()","end":"(?<=\\\\))(?!\\\\w)","name":"meta.function-call.c","patterns":[{"include":"#function-call-innards"}]},"case_statement":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)case(?!\\\\w))","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.case.c"}},"end":"(:)","endCaptures":{"1":{"name":"punctuation.separator.colon.case.c"}},"name":"meta.conditional.case.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"comments":{"patterns":[{"patterns":[{"patterns":[{"begin":"^(?>\\\\s*)(//[!/]+)","beginCaptures":{"1":{"name":"punctuation.definition.comment.documentation.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","name":"comment.line.double-slash.documentation.c","patterns":[{"include":"#line_continuation_character"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},{"captures":{"1":{"name":"punctuation.definition.comment.begin.documentation.c"},"2":{"patterns":[{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},"3":{"name":"punctuation.definition.comment.end.documentation.c"}},"match":"(/\\\\*[!*]+(?=\\\\s))(.+)([!*]*\\\\*/)","name":"comment.block.documentation.c"},{"begin":"((?>\\\\s*)/\\\\*[!*]+(?:(?:\\\\n|$)|(?=\\\\s)))","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.documentation.c"}},"end":"([!*]*\\\\*/)","endCaptures":{"1":{"name":"punctuation.definition.comment.end.documentation.c"}},"name":"comment.block.documentation.c","patterns":[{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},{"captures":{"1":{"name":"meta.toc-list.banner.block.c"}},"match":"^/\\\\* =(\\\\s*.*?)\\\\s*= \\\\*/$\\\\n?","name":"comment.block.banner.c"},{"begin":"(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"(\\\\*/)","endCaptures":{"1":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"},{"captures":{"1":{"name":"meta.toc-list.banner.line.c"}},"match":"^// =(\\\\s*.*?)\\\\s*=$\\\\n?","name":"comment.line.banner.c"},{"begin":"((?:^[\\\\t ]+)?)(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.c"}},"end":"(?!\\\\G)","patterns":[{"begin":"(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?=\\\\n)","name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]}]}]},{"include":"#block_comment"},{"include":"#line_comment"}]},{"include":"#block_comment"},{"include":"#line_comment"}]},"default_statement":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)default(?!\\\\w))","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.default.c"}},"end":"(:)","endCaptures":{"1":{"name":"punctuation.separator.colon.case.default.c"}},"name":"meta.conditional.case.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"disabled":{"begin":"^\\\\s*#\\\\s*if(n?def)?\\\\b.*$","end":"^\\\\s*#\\\\s*endif\\\\b","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},"evaluation_context":{"patterns":[{"include":"#function-call-innards"},{"include":"$self"}]},"function-call-innards":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#operators"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.arguments.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arguments.end.bracket.round.c"}},"patterns":[{"include":"#function-call-innards"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#function-call-innards"}]},{"include":"#block_innards"}]},"function-innards":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#operators"},{"include":"#vararg_ellipses"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.parameters.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parameters.end.bracket.round.c"}},"name":"meta.function.definition.parameters.c","patterns":[{"include":"#probably_a_parameter"},{"include":"#function-innards"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#function-innards"}]},{"include":"$self"}]},"inline_comment":{"patterns":[{"patterns":[{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/))"},{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"}]},{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"}]},"line_comment":{"patterns":[{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]}]},"line_continuation_character":{"patterns":[{"captures":{"1":{"name":"constant.character.escape.line-continuation.c"}},"match":"(\\\\\\\\)\\\\n"}]},"member_access":{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"include":"#member_access"},{"include":"#method_access"},{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))"}]},"5":{"name":"variable.other.member.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))((?:[A-Z_a-z]\\\\w*\\\\s*(?:\\\\.\\\\*?|->\\\\*?)\\\\s*)*)\\\\s*\\\\b((?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\\\b)[A-Z_a-z]\\\\w*\\\\b(?!\\\\())"},"method_access":{"begin":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))((?:[A-Z_a-z]\\\\w*\\\\s*(?:\\\\.\\\\*?|->\\\\*?)\\\\s*)*)\\\\s*([A-Z_a-z]\\\\w*)(\\\\()","beginCaptures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"include":"#member_access"},{"include":"#method_access"},{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))"}]},"5":{"name":"entity.name.function.member.c"},"6":{"name":"punctuation.section.arguments.begin.bracket.round.function.member.c"}},"contentName":"meta.function-call.member.c","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.function.member.c"}},"patterns":[{"include":"#function-call-innards"}]},"numbers":{"captures":{"0":{"patterns":[{"begin":"(?=.)","end":"$","patterns":[{"captures":{"1":{"name":"keyword.other.unit.hexadecimal.c"},"2":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"constant.numeric.hexadecimal.c"},"5":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"6":{"name":"punctuation.separator.constant.numeric"},"8":{"name":"keyword.other.unit.exponent.hexadecimal.c"},"9":{"name":"keyword.operator.plus.exponent.hexadecimal.c"},"10":{"name":"keyword.operator.minus.exponent.hexadecimal.c"},"11":{"name":"constant.numeric.exponent.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"12":{"name":"keyword.other.unit.suffix.floating-point.c"}},"match":"\\\\G(0[Xx])(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)?((?<=\\\\h)\\\\.|\\\\.(?=\\\\h))(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)?((?<!')([Pp])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?([FLfl](?!\\\\w))?$"},{"captures":{"2":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"constant.numeric.decimal.point.c"},"5":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"6":{"name":"punctuation.separator.constant.numeric"},"8":{"name":"keyword.other.unit.exponent.decimal.c"},"9":{"name":"keyword.operator.plus.exponent.decimal.c"},"10":{"name":"keyword.operator.minus.exponent.decimal.c"},"11":{"name":"constant.numeric.exponent.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"12":{"name":"keyword.other.unit.suffix.floating-point.c"}},"match":"\\\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)?((?<=[0-9])\\\\.|\\\\.(?=[0-9]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)?((?<!')([Ee])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?([FLfl](?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.binary.c"},"2":{"name":"constant.numeric.binary.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0[Bb])([01](?:[01]|((?<=\\\\h)'(?=\\\\h)))*)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.octal.c"},"2":{"name":"constant.numeric.octal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0)((?:[0-7]|((?<=\\\\h)'(?=\\\\h)))+)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.hexadecimal.c"},"2":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"5":{"name":"keyword.other.unit.exponent.hexadecimal.c"},"6":{"name":"keyword.operator.plus.exponent.hexadecimal.c"},"7":{"name":"keyword.operator.minus.exponent.hexadecimal.c"},"8":{"name":"constant.numeric.exponent.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"9":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0[Xx])(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)((?<!')([Pp])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"2":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"5":{"name":"keyword.other.unit.exponent.decimal.c"},"6":{"name":"keyword.operator.plus.exponent.decimal.c"},"7":{"name":"keyword.operator.minus.exponent.decimal.c"},"8":{"name":"constant.numeric.exponent.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"9":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)((?<!')([Ee])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"match":"(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])+","name":"invalid.illegal.constant.numeric"}]}]}},"match":"(?<!\\\\w)\\\\.?\\\\d(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])*"},"operators":{"patterns":[{"match":"(?<![$\\\\w])(sizeof)(?![$\\\\w])","name":"keyword.operator.sizeof.c"},{"match":"--","name":"keyword.operator.decrement.c"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.c"},{"match":"(?:[-%*+]|(?<!\\\\()/)=","name":"keyword.operator.assignment.compound.c"},{"match":"(?:[\\\\&^]|<<|>>|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.c"},{"match":"<<|>>","name":"keyword.operator.bitwise.shift.c"},{"match":"!=|<=|>=|==|[<>]","name":"keyword.operator.comparison.c"},{"match":"&&|!|\\\\|\\\\|","name":"keyword.operator.logical.c"},{"match":"[\\\\&^|~]","name":"keyword.operator.c"},{"match":"=","name":"keyword.operator.assignment.c"},{"match":"[-%*+/]","name":"keyword.operator.c"},{"begin":"(\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.c"}},"end":"(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.c"}},"patterns":[{"include":"#function-call-innards"},{"include":"$self"}]}]},"parens":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"name":"meta.parens.c","patterns":[{"include":"$self"}]},"parens-block":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"name":"meta.parens.block.c","patterns":[{"include":"#block_innards"},{"match":"(?-im:(?<!:):(?!:))","name":"punctuation.range-based.c"}]},"pragma-mark":{"captures":{"1":{"name":"meta.preprocessor.pragma.c"},"2":{"name":"keyword.control.directive.pragma.pragma-mark.c"},"3":{"name":"punctuation.definition.directive.c"},"4":{"name":"entity.name.tag.pragma-mark.c"}},"match":"^\\\\s*(((#)\\\\s*pragma\\\\s+mark)\\\\s+(.*))","name":"meta.section.c"},"predefined_macros":{"patterns":[{"captures":{"1":{"name":"entity.name.other.preprocessor.macro.predefined.$1.c"}},"match":"\\\\b(__cplusplus|__DATE__|__FILE__|__LINE__|__STDC__|__STDC_HOSTED__|__STDC_NO_COMPLEX__|__STDC_VERSION__|__STDCPP_THREADS__|__TIME__|NDEBUG|__OBJC__|__ASSEMBLER__|__ATOM__|__AVX__|__AVX2__|_CHAR_UNSIGNED|__CLR_VER|_CONTROL_FLOW_GUARD|__COUNTER__|__cplusplus_cli|__cplusplus_winrt|_CPPRTTI|_CPPUNWIND|_DEBUG|_DLL|__FUNCDNAME__|__FUNCSIG__|__FUNCTION__|_INTEGRAL_MAX_BITS|__INTELLISENSE__|_ISO_VOLATILE|_KERNEL_MODE|_M_AMD64|_M_ARM|_M_ARM_ARMV7VE|_M_ARM_FP|_M_ARM64|_M_CEE|_M_CEE_PURE|_M_CEE_SAFE|_M_FP_EXCEPT|_M_FP_FAST|_M_FP_PRECISE|_M_FP_STRICT|_M_IX86|_M_IX86_FP|_M_X64|_MANAGED|_MSC_BUILD|_MSC_EXTENSIONS|_MSC_FULL_VER|_MSC_VER|_MSVC_LANG|__MSVC_RUNTIME_CHECKS|_MT|_NATIVE_WCHAR_T_DEFINED|_OPENMP|_PREFAST|__TIMESTAMP__|_VC_NO_DEFAULTLIB|_WCHAR_T_DEFINED|_WIN32|_WIN64|_WINRT_DLL|_ATL_VER|_MFC_VER|__GFORTRAN__|__GNUC__|__GNUC_MINOR__|__GNUC_PATCHLEVEL__|__GNUG__|__STRICT_ANSI__|__BASE_FILE__|__INCLUDE_LEVEL__|__ELF__|__VERSION__|__OPTIMIZE__|__OPTIMIZE_SIZE__|__NO_INLINE__|__GNUC_STDC_INLINE__|__CHAR_UNSIGNED__|__WCHAR_UNSIGNED__|__REGISTER_PREFIX__|__SIZE_TYPE__|__PTRDIFF_TYPE__|__WCHAR_TYPE__|__WINT_TYPE__|__INTMAX_TYPE__|__UINTMAX_TYPE__|__SIG_ATOMIC_TYPE__|__INT8_TYPE__|__INT16_TYPE__|__INT32_TYPE__|__INT64_TYPE__|__UINT8_TYPE__|__UINT16_TYPE__|__UINT32_TYPE__|__UINT64_TYPE__|__INT_LEAST8_TYPE__|__INT_LEAST16_TYPE__|__INT_LEAST32_TYPE__|__INT_LEAST64_TYPE__|__UINT_LEAST8_TYPE__|__UINT_LEAST16_TYPE__|__UINT_LEAST32_TYPE__|__UINT_LEAST64_TYPE__|__INT_FAST8_TYPE__|__INT_FAST16_TYPE__|__INT_FAST32_TYPE__|__INT_FAST64_TYPE__|__UINT_FAST8_TYPE__|__UINT_FAST16_TYPE__|__UINT_FAST32_TYPE__|__UINT_FAST64_TYPE__|__INTPTR_TYPE__|__UINTPTR_TYPE__|__CHAR_BIT__|__SCHAR_MAX__|__WCHAR_MAX__|__SHRT_MAX__|__INT_MAX__|__LONG_MAX__|__LONG_LONG_MAX__|__WINT_MAX__|__SIZE_MAX__|__PTRDIFF_MAX__|__INTMAX_MAX__|__UINTMAX_MAX__|__SIG_ATOMIC_MAX__|__INT8_MAX__|__INT16_MAX__|__INT32_MAX__|__INT64_MAX__|__UINT8_MAX__|__UINT16_MAX__|__UINT32_MAX__|__UINT64_MAX__|__INT_LEAST8_MAX__|__INT_LEAST16_MAX__|__INT_LEAST32_MAX__|__INT_LEAST64_MAX__|__UINT_LEAST8_MAX__|__UINT_LEAST16_MAX__|__UINT_LEAST32_MAX__|__UINT_LEAST64_MAX__|__INT_FAST8_MAX__|__INT_FAST16_MAX__|__INT_FAST32_MAX__|__INT_FAST64_MAX__|__UINT_FAST8_MAX__|__UINT_FAST16_MAX__|__UINT_FAST32_MAX__|__UINT_FAST64_MAX__|__INTPTR_MAX__|__UINTPTR_MAX__|__WCHAR_MIN__|__WINT_MIN__|__SIG_ATOMIC_MIN__|__SCHAR_WIDTH__|__SHRT_WIDTH__|__INT_WIDTH__|__LONG_WIDTH__|__LONG_LONG_WIDTH__|__PTRDIFF_WIDTH__|__SIG_ATOMIC_WIDTH__|__SIZE_WIDTH__|__WCHAR_WIDTH__|__WINT_WIDTH__|__INT_LEAST8_WIDTH__|__INT_LEAST16_WIDTH__|__INT_LEAST32_WIDTH__|__INT_LEAST64_WIDTH__|__INT_FAST8_WIDTH__|__INT_FAST16_WIDTH__|__INT_FAST32_WIDTH__|__INT_FAST64_WIDTH__|__INTPTR_WIDTH__|__INTMAX_WIDTH__|__SIZEOF_INT__|__SIZEOF_LONG__|__SIZEOF_LONG_LONG__|__SIZEOF_SHORT__|__SIZEOF_POINTER__|__SIZEOF_FLOAT__|__SIZEOF_DOUBLE__|__SIZEOF_LONG_DOUBLE__|__SIZEOF_SIZE_T__|__SIZEOF_WCHAR_T__|__SIZEOF_WINT_T__|__SIZEOF_PTRDIFF_T__|__BYTE_ORDER__|__ORDER_LITTLE_ENDIAN__|__ORDER_BIG_ENDIAN__|__ORDER_PDP_ENDIAN__|__FLOAT_WORD_ORDER__|__DEPRECATED|__EXCEPTIONS|__GXX_RTTI|__USING_SJLJ_EXCEPTIONS__|__GXX_EXPERIMENTAL_CXX0X__|__GXX_WEAK__|__NEXT_RUNTIME__|__LP64__|_LP64|__SSP__|__SSP_ALL__|__SSP_STRONG__|__SSP_EXPLICIT__|__SANITIZE_ADDRESS__|__SANITIZE_THREAD__|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16|__HAVE_SPECULATION_SAFE_VALUE|__GCC_HAVE_DWARF2_CFI_ASM|__FP_FAST_FMAF??|__FP_FAST_FMAL|__FP_FAST_FMAF16|__FP_FAST_FMAF32|__FP_FAST_FMAF64|__FP_FAST_FMAF128|__FP_FAST_FMAF32X|__FP_FAST_FMAF64X|__FP_FAST_FMAF128X|__GCC_IEC_559|__GCC_IEC_559_COMPLEX|__NO_MATH_ERRNO__|__has_builtin|__has_feature|__has_extension|__has_cpp_attribute|__has_c_attribute|__has_attribute|__has_declspec_attribute|__is_identifier|__has_include|__has_include_next|__has_warning|__BASE_FILE__|__FILE_NAME__|__clang__|__clang_major__|__clang_minor__|__clang_patchlevel__|__clang_version__|__fp16|_Float16)\\\\b"},{"match":"\\\\b__([A-Z_]+)__\\\\b","name":"entity.name.other.preprocessor.macro.predefined.probably.$1.c"}]},"preprocessor-rule-conditional":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if(?:n?def)?)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#preprocessor-rule-enabled-elif"},{"include":"#preprocessor-rule-enabled-else"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"$self"}]},{"captures":{"0":{"name":"invalid.illegal.stray-$1.c"}},"match":"^\\\\s*#\\\\s*(e(?:lse|lif|ndif))\\\\b"}]},"preprocessor-rule-conditional-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if(?:n?def)?)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#preprocessor-rule-enabled-elif-block"},{"include":"#preprocessor-rule-enabled-else-block"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#block_innards"}]},{"captures":{"0":{"name":"invalid.illegal.stray-$1.c"}},"match":"^\\\\s*#\\\\s*(e(?:lse|lif|ndif))\\\\b"}]},"preprocessor-rule-conditional-line":{"patterns":[{"match":"\\\\bdefined\\\\b(?:\\\\s*$|(?=\\\\s*\\\\(*\\\\s*(?!defined\\\\b)[$A-Z_a-z][$\\\\w]*\\\\b\\\\s*\\\\)*\\\\s*(?:\\\\n|//|/\\\\*|[:?]|&&|\\\\|\\\\||\\\\\\\\\\\\s*\\\\n)))","name":"keyword.control.directive.conditional.c"},{"match":"\\\\bdefined\\\\b","name":"invalid.illegal.macro-name.c"},{"include":"#comments"},{"include":"#strings"},{"include":"#numbers"},{"begin":"\\\\?","beginCaptures":{"0":{"name":"keyword.operator.ternary.c"}},"end":":","endCaptures":{"0":{"name":"keyword.operator.ternary.c"}},"patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#operators"},{"match":"\\\\b(NULL|true|false|TRUE|FALSE)\\\\b","name":"constant.language.c"},{"match":"[$A-Z_a-z][$\\\\w]*","name":"entity.name.function.preprocessor.c"},{"include":"#line_continuation_character"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)|(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-conditional-line"}]}]},"preprocessor-rule-define-line-blocks":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-blocks"},{"include":"#preprocessor-rule-define-line-contents"}]},{"include":"#preprocessor-rule-define-line-contents"}]},"preprocessor-rule-define-line-contents":{"patterns":[{"include":"#vararg_ellipses"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"name":"meta.block.c","patterns":[{"include":"#preprocessor-rule-define-line-blocks"}]},{"match":"\\\\(","name":"punctuation.section.parens.begin.bracket.round.c"},{"match":"\\\\)","name":"punctuation.section.parens.end.bracket.round.c"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\\\s*\\\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\\\s*\\\\(|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[])\\\\s*\\\\()","end":"(?<=\\\\))(?!\\\\w)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","name":"meta.function.c","patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#string_escaped_char"},{"include":"#string_placeholder"},{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#string_escaped_char"},{"include":"#line_continuation_character"}]},{"include":"#method_access"},{"include":"#member_access"},{"include":"$self"}]},"preprocessor-rule-define-line-functions":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#vararg_ellipses"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#operators"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.arguments.begin.bracket.round.c"}},"end":"(\\\\))|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"(\\\\))|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"include":"#preprocessor-rule-define-line-contents"}]},"preprocessor-rule-disabled":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"include":"#preprocessor-rule-enabled-elif"},{"include":"#preprocessor-rule-enabled-else"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"$self"}]},{"begin":"\\\\n","contentName":"comment.block.preprocessor.if-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]}]},"preprocessor-rule-disabled-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"include":"#preprocessor-rule-enabled-elif-block"},{"include":"#preprocessor-rule-enabled-else-block"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#block_innards"}]},{"begin":"\\\\n","contentName":"comment.block.preprocessor.if-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]}]},"preprocessor-rule-disabled-elif":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]},"preprocessor-rule-enabled":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"},"3":{"name":"constant.numeric.preprocessor.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.else-branch.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.if-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"$self"}]}]}]},"preprocessor-rule-enabled-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.else-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.if-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#block_innards"}]}]}]},"preprocessor-rule-enabled-elif":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"^\\\\s*((#)\\\\s*(else))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*(elif))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"include":"$self"}]}]},"preprocessor-rule-enabled-elif-block":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"^\\\\s*((#)\\\\s*(else))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*(elif))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"include":"#block_innards"}]}]},"preprocessor-rule-enabled-else":{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"$self"}]},"preprocessor-rule-enabled-else-block":{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#block_innards"}]},"probably_a_parameter":{"captures":{"1":{"name":"variable.parameter.probably.c"}},"match":"(?<=[0-9A-Z_a-z] |[]\\\\&)*>])\\\\s*([A-Z_a-z]\\\\w*)\\\\s*(?=(?:\\\\[]\\\\s*)?[),])"},"static_assert":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)static_assert|_Static_assert(?!\\\\w))((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))(\\\\()","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.other.static_assert.c"},"6":{"patterns":[{"include":"#inline_comment"}]},"7":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"8":{"name":"comment.block.c"},"9":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"10":{"name":"punctuation.section.arguments.begin.bracket.round.static_assert.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.static_assert.c"}},"patterns":[{"begin":"(,)\\\\s*(?=(?:L|u8?|U\\\\s*\\")?)","beginCaptures":{"1":{"name":"punctuation.separator.delimiter.comma.c"}},"end":"(?=\\\\))","name":"meta.static_assert.message.c","patterns":[{"include":"#string_context"}]},{"include":"#evaluation_context"}]},"storage_types":{"patterns":[{"match":"(?-im:(?<!\\\\w)(?:unsigned|signed|double|_Bool|short|float|long|void|char|bool|int)(?!\\\\w))","name":"storage.type.built-in.primitive.c"},{"match":"(?-im:(?<!\\\\w)(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|pthread_rwlockattr_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_uint_fast16_t|atomic_int_least64_t|atomic_int_least32_t|atomic_int_least16_t|atomic_uint_least8_t|atomic_uint_fast8_t|atomic_int_least8_t|atomic_int_fast16_t|pthread_mutexattr_t|atomic_int_fast32_t|atomic_int_fast64_t|atomic_int_fast8_t|pthread_condattr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintptr_t|atomic_uintmax_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|int_least32_t|pthread_key_t|int_least16_t|int_least64_t|uint_least8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|atomic_ushort|atomic_ullong|atomic_size_t|int_fast16_t|int_fast64_t|uint_fast8_t|atomic_short|atomic_uchar|atomic_schar|int_least8_t|memory_order|atomic_llong|atomic_ulong|int_fast32_t|atomic_long|atomic_uint|atomic_char|int_fast8_t|suseconds_t|atomic_bool|atomic_int|_Imaginary|useconds_t|in_port_t|uintmax_t|pthread_t|blksize_t|in_addr_t|uintptr_t|blkcnt_t|uint16_t|uint32_t|uint64_t|u_quad_t|_Complex|intptr_t|intmax_t|segsz_t|u_short|nlink_t|uint8_t|int64_t|int32_t|int16_t|fixpt_t|daddr_t|caddr_t|qaddr_t|ssize_t|clock_t|swblk_t|u_long|mode_t|int8_t|time_t|ushort|u_char|quad_t|size_t|pid_t|gid_t|uid_t|dev_t|div_t|off_t|u_int|key_t|ino_t|uint|id_t)(?!\\\\w))","name":"storage.type.built-in.c"},{"match":"(?-im:\\\\b(enum|struct|union)\\\\b)","name":"storage.type.$1.c"},{"begin":"\\\\b(__asm__|asm)\\\\b\\\\s*((?:volatile)?)","beginCaptures":{"1":{"name":"storage.type.asm.c"},"2":{"name":"storage.modifier.c"}},"end":"(?!\\\\G)","name":"meta.asm.c","patterns":[{"captures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"^((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))(?:\\\\n|$)"},{"include":"#comments"},{"begin":"(((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))\\\\()","beginCaptures":{"1":{"name":"punctuation.section.parens.begin.bracket.round.assembly.c"},"2":{"patterns":[{"include":"#inline_comment"}]},"3":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"4":{"name":"comment.block.c"},"5":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.assembly.c"}},"patterns":[{"begin":"(R?)(\\")","beginCaptures":{"1":{"name":"meta.encoding.c"},"2":{"name":"punctuation.definition.string.begin.assembly.c"}},"contentName":"meta.embedded.assembly.c","end":"(\\")","endCaptures":{"1":{"name":"punctuation.definition.string.end.assembly.c"}},"name":"string.quoted.double.c","patterns":[{"include":"source.asm"},{"include":"source.x86"},{"include":"source.x86_64"},{"include":"source.arm"},{"include":"#backslash_escapes"},{"include":"#string_escaped_char"}]},{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.section.parens.begin.bracket.round.assembly.inner.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.assembly.inner.c"}},"patterns":[{"include":"#evaluation_context"}]},{"captures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"variable.other.asm.label.c"},"6":{"patterns":[{"include":"#inline_comment"}]},"7":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"8":{"name":"comment.block.c"},"9":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"\\\\[((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))([A-Z_a-z]\\\\w*)((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))]"},{"match":":","name":"punctuation.separator.delimiter.colon.assembly.c"},{"include":"#comments"}]}]}]},"string_escaped_char":{"patterns":[{"match":"\\\\\\\\([\\"'?\\\\\\\\abefnprtv]|[0-3]\\\\d{0,2}|[4-7]\\\\d?|x\\\\h{0,2}|u\\\\h{0,4}|U\\\\h{0,8})","name":"constant.character.escape.c"},{"match":"\\\\\\\\.","name":"invalid.illegal.unknown-escape.c"}]},"string_placeholder":{"patterns":[{"match":"%(\\\\d+\\\\$)?[- #'+0]*[,:;_]?((-?\\\\d+)|\\\\*(-?\\\\d+\\\\$)?)?(\\\\.((-?\\\\d+)|\\\\*(-?\\\\d+\\\\$)?)?)?(hh?|ll|[Ljlqtz]|vh|vl?|hv|hl)?[%AC-GOSUXac-ginopsux]","name":"constant.other.placeholder.c"},{"captures":{"1":{"name":"invalid.illegal.placeholder.c"}},"match":"(%)(?!\\"\\\\s*(PRI|SCN))"}]},"strings":{"patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#string_escaped_char"},{"include":"#string_placeholder"},{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#string_escaped_char"},{"include":"#line_continuation_character"}]}]},"switch_conditional_parentheses":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))(\\\\()","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"punctuation.section.parens.begin.bracket.round.conditional.switch.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.conditional.switch.c"}},"name":"meta.conditional.switch.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"switch_statement":{"begin":"(((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)switch(?!\\\\w)))","beginCaptures":{"1":{"name":"meta.head.switch.c"},"2":{"patterns":[{"include":"#inline_comment"}]},"3":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"4":{"name":"comment.block.c"},"5":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"6":{"name":"keyword.control.switch.c"}},"end":"(?<=}|%>|\\\\?\\\\?>)|(?=[];=>\\\\[])","name":"meta.block.switch.c","patterns":[{"begin":"\\\\G ?","end":"(\\\\{|<%|\\\\?\\\\?<|(?=;))","endCaptures":{"1":{"name":"punctuation.section.block.begin.bracket.curly.switch.c"}},"name":"meta.head.switch.c","patterns":[{"include":"#switch_conditional_parentheses"},{"include":"$self"}]},{"begin":"(?<=\\\\{|<%|\\\\?\\\\?<)","end":"(}|%>|\\\\?\\\\?>)","endCaptures":{"1":{"name":"punctuation.section.block.end.bracket.curly.switch.c"}},"name":"meta.body.switch.c","patterns":[{"include":"#default_statement"},{"include":"#case_statement"},{"include":"$self"},{"include":"#block_innards"}]},{"begin":"(?<=}|%>|\\\\?\\\\?>)[\\\\n\\\\s]*","end":"[\\\\n\\\\s]*(?=;)","name":"meta.tail.switch.c","patterns":[{"include":"$self"}]}]},"vararg_ellipses":{"match":"(?<!\\\\.)\\\\.\\\\.\\\\.(?!\\\\.)","name":"punctuation.vararg-ellipses.c"}},"scopeName":"source.c"}`)),n=[e];export{n as default};
|