remote-codex 0.11.44 → 0.11.49
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/README.md +84 -5
- package/apps/relay-server/dist/index.js +18 -2
- package/apps/supervisor-api/dist/index.js +10034 -2782
- package/apps/supervisor-web/dist/assets/c-BIGW1oBm.js +1 -0
- package/apps/supervisor-web/dist/assets/{core-DODVy7wn.js → core-B0prQzhr.js} +1 -1
- package/apps/supervisor-web/dist/assets/cpp-DIPi6g--.js +1 -0
- package/apps/supervisor-web/dist/assets/csharp-DSvCPggb.js +1 -0
- package/apps/supervisor-web/dist/assets/go-C27-OAKa.js +1 -0
- package/apps/supervisor-web/dist/assets/index-DZI1aSXo.js +22 -0
- package/apps/supervisor-web/dist/assets/index-Dy8PgXgw.css +1 -0
- package/apps/supervisor-web/dist/assets/java-CylS5w8V.js +1 -0
- package/apps/supervisor-web/dist/assets/{markdown-vendor-RZk8L7-L.js → markdown-vendor-BG6PurxI.js} +33 -33
- package/apps/supervisor-web/dist/assets/ruby-B6AkvBWc.js +1 -0
- package/apps/supervisor-web/dist/assets/rust-B1yitclQ.js +1 -0
- package/apps/supervisor-web/dist/assets/{shellscript-CEILq0vU.js → shellscript-DfDnw5Jg.js} +1 -1
- package/apps/supervisor-web/dist/assets/thread-ui-gcslNXur.js +3968 -0
- package/apps/supervisor-web/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/apps/supervisor-web/dist/index.html +4 -4
- package/bin/remote-codex.mjs +426 -35
- package/docs/windows-device-manager.zh.md +143 -0
- package/docs/windows-device-setup.zh.md +263 -0
- package/docs/windows-one-click-installer-research.zh.md +481 -0
- package/docs/windows.md +87 -0
- package/package.json +20 -4
- package/packages/acp/src/agent-catalog.test.ts +57 -0
- package/packages/acp/src/agent-catalog.ts +361 -0
- package/packages/acp/src/catalog-runtime.test.ts +99 -0
- package/packages/acp/src/catalog-runtime.ts +507 -0
- package/packages/acp/src/codex-environment.test.ts +58 -0
- package/packages/acp/src/codex-environment.ts +33 -0
- package/packages/acp/src/index.ts +5 -0
- package/packages/acp/src/item-mapper.test.ts +137 -0
- package/packages/acp/src/item-mapper.ts +473 -0
- package/packages/acp/src/runtimeAdapter.test.ts +79 -0
- package/packages/acp/src/runtimeAdapter.ts +1193 -0
- package/packages/acp/src/terminal-service.test.ts +31 -0
- package/packages/acp/src/terminal-service.ts +137 -0
- package/packages/agent-runtime/src/runtime-errors.ts +1 -0
- package/packages/agent-runtime/src/types.ts +8 -0
- package/packages/claude/src/runtimeAdapter.test.ts +2 -2
- package/packages/claude/src/runtimeAdapter.ts +10 -19
- package/packages/codex/src/appServerManager.test.ts +47 -0
- package/packages/codex/src/appServerManager.ts +6 -2
- package/packages/codex/src/runtimeAdapter.test.ts +9 -2
- package/packages/db/migrations/0030_thread_agent_id.sql +9 -0
- package/packages/db/src/repositories.ts +3 -0
- package/packages/db/src/schema.ts +1 -0
- package/packages/opencode/src/historyItems.ts +7 -6
- package/packages/opencode/src/runtimeAdapter.ts +7 -11
- package/packages/process-runtime/src/index.test.ts +132 -0
- package/packages/process-runtime/src/index.ts +253 -0
- package/packages/shared/src/agent-providers.ts +10 -1
- package/packages/shared/src/index.ts +36 -0
- package/scripts/service-manager.mjs +112 -4
- package/scripts/verify-relay-supervisor-smoke.mjs +262 -0
- package/scripts/windows/build-device-manager.ps1 +64 -0
- package/scripts/windows/install-relay-supervisor-task.ps1 +44 -0
- package/scripts/windows/relay-smoke.ps1 +16 -0
- package/scripts/windows/uninstall-relay-supervisor-task.ps1 +27 -0
- package/scripts/windows/validate-real-codex.mjs +680 -0
- package/apps/supervisor-web/dist/assets/index-BcCLYWAf.css +0 -1
- package/apps/supervisor-web/dist/assets/index-CO8cU7a0.js +0 -21
- package/apps/supervisor-web/dist/assets/thread-ui-Dmrigdek.js +0 -3714
|
@@ -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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ht=Object.defineProperty;var zt=(n,e,t)=>e in n?Ht(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var d=(n,e,t)=>zt(n,typeof e!="symbol"?e+"":e,t);import{w as Ge,s as ot,f as Ut,c as Kt,d as Yt,e as Fe,z as Vt,h as Jt}from"./markdown-vendor-RZk8L7-L.js";import"./react-vendor-Dfg_6BLf.js";var R=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function Qt(n){return Be(n)}function Be(n){return Array.isArray(n)?Xt(n):n instanceof RegExp?n:typeof n=="object"?Zt(n):n}function Xt(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=Be(n[t]);return e}function Zt(n){let e={};for(let t in n)e[t]=Be(n[t]);return e}function ct(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function lt(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?lt(n.substring(0,n.length-1)):n.substr(~e+1)}var Se=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ee=class{static hasCaptures(n){return n===null?!1:(Se.lastIndex=0,Se.test(n))}static replaceCaptures(n,e,t){return n.replace(Se,(r,s,i,a)=>{let o=t[parseInt(s||i,10)];if(o){let c=e.substring(o.start,o.end);for(;c[0]===".";)c=c.substring(1);switch(a){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function ut(n,e){return n<e?-1:n>e?1:0}function ht(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let s=0;s<t;s++){let i=ut(n[s],e[s]);if(i!==0)return i}return 0}return t-r}function qe(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))}function ft(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var dt=class{constructor(n){d(this,"cache",new Map);this.fn=n}get(n){if(this.cache.has(n))return this.cache.get(n);const e=this.fn(n);return this.cache.set(n,e),e}},ie=class{constructor(n,e,t){d(this,"_cachedMatchRoot",new dt(n=>this._root.match(n)));this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(nn(n),e)}static createFromParsedTheme(n,e){return sn(n,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(n){if(n===null)return this._defaults;const e=n.scopeName,r=this._cachedMatchRoot.get(e).find(s=>en(n.parent,s.parentScopes));return r?new gt(r.fontStyle,r.foreground,r.background):null}},Ce=class re{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new re(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new re(t,e[r]);return t}push(e){return new re(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}};function en(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let r=e[t],s=!1;if(r===">"){if(t===e.length-1)return!1;r=e[++t],s=!0}for(;n&&!tn(n.scopeName,r);){if(s)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function tn(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var gt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function nn(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],r=0;for(let s=0,i=e.length;s<i;s++){let a=e[s];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let u=a.scope;u=u.replace(/^[,]+/,""),u=u.replace(/[,]+$/,""),o=u.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let c=-1;if(typeof a.settings.fontStyle=="string"){c=0;let u=a.settings.fontStyle.split(" ");for(let f=0,g=u.length;f<g;f++)switch(u[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 a.settings.foreground=="string"&&qe(a.settings.foreground)&&(l=a.settings.foreground);let h=null;typeof a.settings.background=="string"&&qe(a.settings.background)&&(h=a.settings.background);for(let u=0,f=o.length;u<f;u++){let m=o[u].trim().split(" "),S=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),t[r++]=new rn(S,b,s,c,l,h)}}return t}var rn=class{constructor(n,e,t,r,s,i){this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=r,this.foreground=s,this.background=i}},T=(n=>(n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline",n[n.Strikethrough=8]="Strikethrough",n))(T||{});function sn(n,e){n.sort((c,l)=>{let h=ut(c.scope,l.scope);return h!==0||(h=ht(c.parentScopes,l.parentScopes),h!==0)?h:c.index-l.index});let t=0,r="#000000",s="#ffffff";for(;n.length>=1&&n[0].scope==="";){let c=n.shift();c.fontStyle!==-1&&(t=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(s=c.background)}let i=new an(e),a=new gt(t,i.getId(r),i.getId(s)),o=new cn(new ve(0,null,-1,0,0),[]);for(let c=0,l=n.length;c<l;c++){let h=n[c];o.insert(0,h.scope,h.parentScopes,h.fontStyle,i.getId(h.foreground),i.getId(h.background))}return new ie(i,a,o)}var an=class{constructor(n){d(this,"_isFrozen");d(this,"_lastColorId");d(this,"_id2color");d(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(n)){this._isFrozen=!0;for(let e=0,t=n.length;e<t;e++)this._color2id[n[e]]=e,this._id2color[e]=n[e]}else this._isFrozen=!1}getId(n){if(n===null)return 0;n=n.toUpperCase();let e=this._color2id[n];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${n}`);return e=++this._lastColorId,this._color2id[n]=e,this._id2color[e]=n,e}getColorMap(){return this._id2color.slice(0)}},on=Object.freeze([]),ve=class mt{constructor(e,t,r,s,i){d(this,"scopeDepth");d(this,"parentScopes");d(this,"fontStyle");d(this,"foreground");d(this,"background");this.scopeDepth=e,this.parentScopes=t||on,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new mt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,s=e.length;r<s;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},cn=class Te{constructor(e,t=[],r={}){d(this,"_rulesWithParentScopes");this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,t.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=t.parentScopes.length);){const i=t.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1?(s=e,i=""):(s=e.substring(0,r),i=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(Te._cmpBySpecificity),t}insert(e,t,r,s,i,a){if(t===""){this._doInsertHere(e,r,s,i,a);return}let o=t.indexOf("."),c,l;o===-1?(c=t,l=""):(c=t.substring(0,o),l=t.substring(o+1));let h;this._children.hasOwnProperty(c)?h=this._children[c]:(h=new Te(this._mainRule.clone(),ve.cloneArr(this._rulesWithParentScopes)),this._children[c]=h),h.insert(e+1,l,r,s,i,a)}_doInsertHere(e,t,r,s,i){if(t===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let c=this._rulesWithParentScopes[a];if(ht(c.parentScopes,t)===0){c.acceptOverwrite(e,r,s,i);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ve(e,t,r,s,i))}},F=class E{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=E.getLanguageId(e),r=E.getTokenType(e),s=E.getFontStyle(e),i=E.getForeground(e),a=E.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:s,foreground:i,background:a})}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,t,r,s,i,a,o){let c=E.getLanguageId(e),l=E.getTokenType(e),h=E.containsBalancedBrackets(e)?1:0,u=E.getFontStyle(e),f=E.getForeground(e),g=E.getBackground(e);return t!==0&&(c=t),r!==8&&(l=r),s!==null&&(h=s?1:0),i!==-1&&(u=i),a!==0&&(f=a),o!==0&&(g=o),(c<<0|l<<8|h<<10|u<<11|f<<15|g<<24)>>>0}};function ae(n,e){const t=[],r=ln(n);let s=r.next();for(;s!==null;){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=a();if(t.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return t;function i(){if(s==="-"){s=r.next();const c=i();return l=>!!c&&!c(l)}if(s==="("){s=r.next();const c=o();return s===")"&&(s=r.next()),c}if(He(s)){const c=[];do c.push(s),s=r.next();while(He(s));return l=>e(c,l)}return null}function a(){const c=[];let l=i();for(;l;)c.push(l),l=i();return h=>c.every(u=>u(h))}function o(){const c=[];let l=a();for(;l&&(c.push(l),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");l=a()}return h=>c.some(u=>u(h))}}function He(n){return!!n&&!!n.match(/[\w\.:]+/)}function ln(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function pt(n){typeof n.dispose=="function"&&n.dispose()}var K=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},un=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},hn=class{constructor(){d(this,"_references",[]);d(this,"_seenReferenceKeys",new Set);d(this,"visitedRule",new Set)}get references(){return this._references}add(n){const e=n.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(n))}},fn=class{constructor(n,e){d(this,"seenFullScopeRequests",new Set);d(this,"seenPartialScopeRequests",new Set);d(this,"Q");this.repo=n,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new K(this.initialScopeName)]}processQueue(){const n=this.Q;this.Q=[];const e=new hn;for(const t of n)dn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof K){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function dn(n,e,t,r){const s=t.lookup(n.scopeName);if(!s){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=t.lookup(e);n instanceof K?se({baseGrammar:i,selfGrammar:s},r):Ae(n.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);const a=t.injections(n.scopeName);if(a)for(const o of a)r.add(new K(o))}function Ae(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];oe([r],e,t)}}function se(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&oe(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&oe(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function oe(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const s=r.repository?ct({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&oe(r.patterns,{...e,repository:s},t);const i=r.include;if(!i)continue;const a=_t(i);switch(a.kind){case 0:se({...e,selfGrammar:e.baseGrammar},t);break;case 1:se(e,t);break;case 2:Ae(a.ruleName,{...e,repository:s},t);break;case 3:case 4:const o=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(o){const c={baseGrammar:e.baseGrammar,selfGrammar:o,repository:s};a.kind===4?Ae(a.ruleName,c,t):se(c,t)}else a.kind===4?t.add(new un(a.scopeName,a.ruleName)):t.add(new K(a.scopeName));break}}}var gn=class{constructor(){d(this,"kind",0)}},mn=class{constructor(){d(this,"kind",1)}},pn=class{constructor(n){d(this,"kind",2);this.ruleName=n}},_n=class{constructor(n){d(this,"kind",3);this.scopeName=n}},yn=class{constructor(n,e){d(this,"kind",4);this.scopeName=n,this.ruleName=e}};function _t(n){if(n==="$base")return new gn;if(n==="$self")return new mn;const e=n.indexOf("#");if(e===-1)return new _n(n);if(e===0)return new pn(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new yn(t,r)}}var bn=/\\(\d+)/,ze=/\\(\d+)/g,Sn=-1,yt=-2;var Z=class{constructor(n,e,t,r){d(this,"$location");d(this,"id");d(this,"_nameIsCapturing");d(this,"_name");d(this,"_contentNameIsCapturing");d(this,"_contentName");this.$location=n,this.id=e,this._name=t||null,this._nameIsCapturing=ee.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ee.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${lt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${n}`}getName(n,e){return!this._nameIsCapturing||this._name===null||n===null||e===null?this._name:ee.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ee.replaceCaptures(this._contentName,n,e)}},Cn=class extends Z{constructor(e,t,r,s,i){super(e,t,r,s);d(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,s){throw new Error("Not supported!")}},wn=class extends Z{constructor(e,t,r,s,i){super(e,t,r,null);d(this,"_match");d(this,"captures");d(this,"_cachedCompiledPatterns");this._match=new Y(s,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new V,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ue=class extends Z{constructor(e,t,r,s,i){super(e,t,r,s);d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new V,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ie=class extends Z{constructor(e,t,r,s,i,a,o,c,l,h){super(e,t,r,s);d(this,"_begin");d(this,"beginCaptures");d(this,"_end");d(this,"endHasBackReferences");d(this,"endCaptures");d(this,"applyEndPatternLast");d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");this._begin=new Y(i,this.id),this.beginCaptures=a,this._end=new Y(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=l||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ce=class extends Z{constructor(e,t,r,s,i,a,o,c,l){super(e,t,r,s);d(this,"_begin");d(this,"beginCaptures");d(this,"whileCaptures");d(this,"_while");d(this,"whileHasBackReferences");d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");d(this,"_cachedCompiledWhilePatterns");this._begin=new Y(i,this.id),this.beginCaptures=a,this.whileCaptures=c,this._while=new Y(o,yt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new V,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},bt=class v{static createCaptureRule(e,t,r,s,i){return e.registerRule(a=>new Cn(t,a,r,s,i))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(s=>{if(e.id=s,e.match)return new wn(e.$vscodeTextmateLocation,e.id,e.name,e.match,v._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=ct({},r,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,v._compilePatterns(i,t,r))}return e.while?new ce(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,v._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,v._compileCaptures(e.whileCaptures||e.captures,t,r),v._compilePatterns(e.patterns,t,r)):new Ie(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,v._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,v._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,v._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let s=[];if(e){let i=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>i&&(i=o)}for(let a=0;a<=i;a++)s[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let c=0;e[a].patterns&&(c=v.getCompiledRuleId(e[a],t,r)),s[o]=v.createCaptureRule(t,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,c)}}return s}static _compilePatterns(e,t,r){let s=[];if(e)for(let i=0,a=e.length;i<a;i++){const o=e[i];let c=-1;if(o.include){const l=_t(o.include);switch(l.kind){case 0:case 1:c=v.getCompiledRuleId(r[o.include],t,r);break;case 2:let h=r[l.ruleName];h&&(c=v.getCompiledRuleId(h,t,r));break;case 3:case 4:const u=l.scopeName,f=l.kind===4?l.ruleName:null,g=t.getExternalGrammar(u,r);if(g)if(f){let m=g.repository[f];m&&(c=v.getCompiledRuleId(m,t,g.repository))}else c=v.getCompiledRuleId(g.repository.$self,t,g.repository);break}}else c=v.getCompiledRuleId(o,t,r);if(c!==-1){const l=t.getRule(c);let h=!1;if((l instanceof Ue||l instanceof Ie||l instanceof ce)&&l.hasMissingPatterns&&l.patterns.length===0&&(h=!0),h)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},Y=class St{constructor(e,t){d(this,"source");d(this,"ruleId");d(this,"hasAnchor");d(this,"hasBackReferences");d(this,"_anchorCache");if(e&&typeof e=="string"){const r=e.length;let s=0,i=[],a=!1;for(let o=0;o<r;o++)if(e.charAt(o)==="\\"&&o+1<r){const l=e.charAt(o+1);l==="z"?(i.push(e.substring(s,o)),i.push("$(?!\\n)(?<!\\n)"),s=o+2):(l==="A"||l==="G")&&(a=!0),o++}this.hasAnchor=a,s===0?this.source=e:(i.push(e.substring(s,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=bn.test(this.source):this.hasBackReferences=!1}clone(){return new St(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=t.map(s=>e.substring(s.start,s.end));return ze.lastIndex=0,this.source.replace(ze,(s,i)=>ft(r[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=[],t=[],r=[],s=[],i,a,o,c;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,r[i]=o,s[i]=o,o==="\\"&&i+1<a&&(c=this.source.charAt(i+1),c==="A"?(e[i+1]="",t[i+1]="",r[i+1]="A",s[i+1]="A"):c==="G"?(e[i+1]="",t[i+1]="G",r[i+1]="",s[i+1]="G"):(e[i+1]=c,t[i+1]=c,r[i+1]=c,s[i+1]=c),i++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},V=class{constructor(){d(this,"_items");d(this,"_hasAnchors");d(this,"_cached");d(this,"_anchorCache");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(n){this._items.push(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}unshift(n){this._items.unshift(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}length(){return this._items.length}setSource(n,e){this._items[n].source!==e&&(this._disposeCaches(),this._items[n].setSource(e))}compile(n){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new Ke(n,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(n,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G0):this.compile(n)}_resolveAnchors(n,e,t){let r=this._items.map(s=>s.resolveAnchors(e,t));return new Ke(n,r,this._items.map(s=>s.ruleId))}},Ke=class{constructor(n,e,t){d(this,"scanner");this.regExps=e,this.rules=t,this.scanner=n.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const n=[];for(let e=0,t=this.rules.length;e<t;e++)n.push(" - "+this.rules[e]+": "+this.regExps[e]);return n.join(`
|
|
1
|
+
var Ht=Object.defineProperty;var zt=(n,e,t)=>e in n?Ht(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var d=(n,e,t)=>zt(n,typeof e!="symbol"?e+"":e,t);import{w as Ge,s as ot,f as Ut,c as Kt,d as Yt,e as Fe,z as Vt,h as Jt}from"./markdown-vendor-BG6PurxI.js";import"./react-vendor-Dfg_6BLf.js";var R=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function Qt(n){return Be(n)}function Be(n){return Array.isArray(n)?Xt(n):n instanceof RegExp?n:typeof n=="object"?Zt(n):n}function Xt(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=Be(n[t]);return e}function Zt(n){let e={};for(let t in n)e[t]=Be(n[t]);return e}function ct(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function lt(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?lt(n.substring(0,n.length-1)):n.substr(~e+1)}var Se=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ee=class{static hasCaptures(n){return n===null?!1:(Se.lastIndex=0,Se.test(n))}static replaceCaptures(n,e,t){return n.replace(Se,(r,s,i,a)=>{let o=t[parseInt(s||i,10)];if(o){let c=e.substring(o.start,o.end);for(;c[0]===".";)c=c.substring(1);switch(a){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function ut(n,e){return n<e?-1:n>e?1:0}function ht(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let s=0;s<t;s++){let i=ut(n[s],e[s]);if(i!==0)return i}return 0}return t-r}function qe(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))}function ft(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var dt=class{constructor(n){d(this,"cache",new Map);this.fn=n}get(n){if(this.cache.has(n))return this.cache.get(n);const e=this.fn(n);return this.cache.set(n,e),e}},ie=class{constructor(n,e,t){d(this,"_cachedMatchRoot",new dt(n=>this._root.match(n)));this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(nn(n),e)}static createFromParsedTheme(n,e){return sn(n,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(n){if(n===null)return this._defaults;const e=n.scopeName,r=this._cachedMatchRoot.get(e).find(s=>en(n.parent,s.parentScopes));return r?new gt(r.fontStyle,r.foreground,r.background):null}},Ce=class re{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new re(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new re(t,e[r]);return t}push(e){return new re(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}};function en(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let r=e[t],s=!1;if(r===">"){if(t===e.length-1)return!1;r=e[++t],s=!0}for(;n&&!tn(n.scopeName,r);){if(s)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function tn(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var gt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function nn(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],r=0;for(let s=0,i=e.length;s<i;s++){let a=e[s];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let u=a.scope;u=u.replace(/^[,]+/,""),u=u.replace(/[,]+$/,""),o=u.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let c=-1;if(typeof a.settings.fontStyle=="string"){c=0;let u=a.settings.fontStyle.split(" ");for(let f=0,g=u.length;f<g;f++)switch(u[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 a.settings.foreground=="string"&&qe(a.settings.foreground)&&(l=a.settings.foreground);let h=null;typeof a.settings.background=="string"&&qe(a.settings.background)&&(h=a.settings.background);for(let u=0,f=o.length;u<f;u++){let m=o[u].trim().split(" "),S=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),t[r++]=new rn(S,b,s,c,l,h)}}return t}var rn=class{constructor(n,e,t,r,s,i){this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=r,this.foreground=s,this.background=i}},T=(n=>(n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline",n[n.Strikethrough=8]="Strikethrough",n))(T||{});function sn(n,e){n.sort((c,l)=>{let h=ut(c.scope,l.scope);return h!==0||(h=ht(c.parentScopes,l.parentScopes),h!==0)?h:c.index-l.index});let t=0,r="#000000",s="#ffffff";for(;n.length>=1&&n[0].scope==="";){let c=n.shift();c.fontStyle!==-1&&(t=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(s=c.background)}let i=new an(e),a=new gt(t,i.getId(r),i.getId(s)),o=new cn(new ve(0,null,-1,0,0),[]);for(let c=0,l=n.length;c<l;c++){let h=n[c];o.insert(0,h.scope,h.parentScopes,h.fontStyle,i.getId(h.foreground),i.getId(h.background))}return new ie(i,a,o)}var an=class{constructor(n){d(this,"_isFrozen");d(this,"_lastColorId");d(this,"_id2color");d(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(n)){this._isFrozen=!0;for(let e=0,t=n.length;e<t;e++)this._color2id[n[e]]=e,this._id2color[e]=n[e]}else this._isFrozen=!1}getId(n){if(n===null)return 0;n=n.toUpperCase();let e=this._color2id[n];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${n}`);return e=++this._lastColorId,this._color2id[n]=e,this._id2color[e]=n,e}getColorMap(){return this._id2color.slice(0)}},on=Object.freeze([]),ve=class mt{constructor(e,t,r,s,i){d(this,"scopeDepth");d(this,"parentScopes");d(this,"fontStyle");d(this,"foreground");d(this,"background");this.scopeDepth=e,this.parentScopes=t||on,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new mt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,s=e.length;r<s;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},cn=class Te{constructor(e,t=[],r={}){d(this,"_rulesWithParentScopes");this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,t.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=t.parentScopes.length);){const i=t.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1?(s=e,i=""):(s=e.substring(0,r),i=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(Te._cmpBySpecificity),t}insert(e,t,r,s,i,a){if(t===""){this._doInsertHere(e,r,s,i,a);return}let o=t.indexOf("."),c,l;o===-1?(c=t,l=""):(c=t.substring(0,o),l=t.substring(o+1));let h;this._children.hasOwnProperty(c)?h=this._children[c]:(h=new Te(this._mainRule.clone(),ve.cloneArr(this._rulesWithParentScopes)),this._children[c]=h),h.insert(e+1,l,r,s,i,a)}_doInsertHere(e,t,r,s,i){if(t===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let c=this._rulesWithParentScopes[a];if(ht(c.parentScopes,t)===0){c.acceptOverwrite(e,r,s,i);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ve(e,t,r,s,i))}},F=class E{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=E.getLanguageId(e),r=E.getTokenType(e),s=E.getFontStyle(e),i=E.getForeground(e),a=E.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:s,foreground:i,background:a})}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,t,r,s,i,a,o){let c=E.getLanguageId(e),l=E.getTokenType(e),h=E.containsBalancedBrackets(e)?1:0,u=E.getFontStyle(e),f=E.getForeground(e),g=E.getBackground(e);return t!==0&&(c=t),r!==8&&(l=r),s!==null&&(h=s?1:0),i!==-1&&(u=i),a!==0&&(f=a),o!==0&&(g=o),(c<<0|l<<8|h<<10|u<<11|f<<15|g<<24)>>>0}};function ae(n,e){const t=[],r=ln(n);let s=r.next();for(;s!==null;){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=a();if(t.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return t;function i(){if(s==="-"){s=r.next();const c=i();return l=>!!c&&!c(l)}if(s==="("){s=r.next();const c=o();return s===")"&&(s=r.next()),c}if(He(s)){const c=[];do c.push(s),s=r.next();while(He(s));return l=>e(c,l)}return null}function a(){const c=[];let l=i();for(;l;)c.push(l),l=i();return h=>c.every(u=>u(h))}function o(){const c=[];let l=a();for(;l&&(c.push(l),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");l=a()}return h=>c.some(u=>u(h))}}function He(n){return!!n&&!!n.match(/[\w\.:]+/)}function ln(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function pt(n){typeof n.dispose=="function"&&n.dispose()}var K=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},un=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},hn=class{constructor(){d(this,"_references",[]);d(this,"_seenReferenceKeys",new Set);d(this,"visitedRule",new Set)}get references(){return this._references}add(n){const e=n.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(n))}},fn=class{constructor(n,e){d(this,"seenFullScopeRequests",new Set);d(this,"seenPartialScopeRequests",new Set);d(this,"Q");this.repo=n,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new K(this.initialScopeName)]}processQueue(){const n=this.Q;this.Q=[];const e=new hn;for(const t of n)dn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof K){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function dn(n,e,t,r){const s=t.lookup(n.scopeName);if(!s){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=t.lookup(e);n instanceof K?se({baseGrammar:i,selfGrammar:s},r):Ae(n.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);const a=t.injections(n.scopeName);if(a)for(const o of a)r.add(new K(o))}function Ae(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];oe([r],e,t)}}function se(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&oe(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&oe(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function oe(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const s=r.repository?ct({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&oe(r.patterns,{...e,repository:s},t);const i=r.include;if(!i)continue;const a=_t(i);switch(a.kind){case 0:se({...e,selfGrammar:e.baseGrammar},t);break;case 1:se(e,t);break;case 2:Ae(a.ruleName,{...e,repository:s},t);break;case 3:case 4:const o=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(o){const c={baseGrammar:e.baseGrammar,selfGrammar:o,repository:s};a.kind===4?Ae(a.ruleName,c,t):se(c,t)}else a.kind===4?t.add(new un(a.scopeName,a.ruleName)):t.add(new K(a.scopeName));break}}}var gn=class{constructor(){d(this,"kind",0)}},mn=class{constructor(){d(this,"kind",1)}},pn=class{constructor(n){d(this,"kind",2);this.ruleName=n}},_n=class{constructor(n){d(this,"kind",3);this.scopeName=n}},yn=class{constructor(n,e){d(this,"kind",4);this.scopeName=n,this.ruleName=e}};function _t(n){if(n==="$base")return new gn;if(n==="$self")return new mn;const e=n.indexOf("#");if(e===-1)return new _n(n);if(e===0)return new pn(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new yn(t,r)}}var bn=/\\(\d+)/,ze=/\\(\d+)/g,Sn=-1,yt=-2;var Z=class{constructor(n,e,t,r){d(this,"$location");d(this,"id");d(this,"_nameIsCapturing");d(this,"_name");d(this,"_contentNameIsCapturing");d(this,"_contentName");this.$location=n,this.id=e,this._name=t||null,this._nameIsCapturing=ee.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ee.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${lt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${n}`}getName(n,e){return!this._nameIsCapturing||this._name===null||n===null||e===null?this._name:ee.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ee.replaceCaptures(this._contentName,n,e)}},Cn=class extends Z{constructor(e,t,r,s,i){super(e,t,r,s);d(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,s){throw new Error("Not supported!")}},wn=class extends Z{constructor(e,t,r,s,i){super(e,t,r,null);d(this,"_match");d(this,"captures");d(this,"_cachedCompiledPatterns");this._match=new Y(s,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new V,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ue=class extends Z{constructor(e,t,r,s,i){super(e,t,r,s);d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new V,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ie=class extends Z{constructor(e,t,r,s,i,a,o,c,l,h){super(e,t,r,s);d(this,"_begin");d(this,"beginCaptures");d(this,"_end");d(this,"endHasBackReferences");d(this,"endCaptures");d(this,"applyEndPatternLast");d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");this._begin=new Y(i,this.id),this.beginCaptures=a,this._end=new Y(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=l||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ce=class extends Z{constructor(e,t,r,s,i,a,o,c,l){super(e,t,r,s);d(this,"_begin");d(this,"beginCaptures");d(this,"whileCaptures");d(this,"_while");d(this,"whileHasBackReferences");d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");d(this,"_cachedCompiledWhilePatterns");this._begin=new Y(i,this.id),this.beginCaptures=a,this.whileCaptures=c,this._while=new Y(o,yt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new V,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},bt=class v{static createCaptureRule(e,t,r,s,i){return e.registerRule(a=>new Cn(t,a,r,s,i))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(s=>{if(e.id=s,e.match)return new wn(e.$vscodeTextmateLocation,e.id,e.name,e.match,v._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=ct({},r,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,v._compilePatterns(i,t,r))}return e.while?new ce(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,v._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,v._compileCaptures(e.whileCaptures||e.captures,t,r),v._compilePatterns(e.patterns,t,r)):new Ie(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,v._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,v._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,v._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let s=[];if(e){let i=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>i&&(i=o)}for(let a=0;a<=i;a++)s[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let c=0;e[a].patterns&&(c=v.getCompiledRuleId(e[a],t,r)),s[o]=v.createCaptureRule(t,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,c)}}return s}static _compilePatterns(e,t,r){let s=[];if(e)for(let i=0,a=e.length;i<a;i++){const o=e[i];let c=-1;if(o.include){const l=_t(o.include);switch(l.kind){case 0:case 1:c=v.getCompiledRuleId(r[o.include],t,r);break;case 2:let h=r[l.ruleName];h&&(c=v.getCompiledRuleId(h,t,r));break;case 3:case 4:const u=l.scopeName,f=l.kind===4?l.ruleName:null,g=t.getExternalGrammar(u,r);if(g)if(f){let m=g.repository[f];m&&(c=v.getCompiledRuleId(m,t,g.repository))}else c=v.getCompiledRuleId(g.repository.$self,t,g.repository);break}}else c=v.getCompiledRuleId(o,t,r);if(c!==-1){const l=t.getRule(c);let h=!1;if((l instanceof Ue||l instanceof Ie||l instanceof ce)&&l.hasMissingPatterns&&l.patterns.length===0&&(h=!0),h)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},Y=class St{constructor(e,t){d(this,"source");d(this,"ruleId");d(this,"hasAnchor");d(this,"hasBackReferences");d(this,"_anchorCache");if(e&&typeof e=="string"){const r=e.length;let s=0,i=[],a=!1;for(let o=0;o<r;o++)if(e.charAt(o)==="\\"&&o+1<r){const l=e.charAt(o+1);l==="z"?(i.push(e.substring(s,o)),i.push("$(?!\\n)(?<!\\n)"),s=o+2):(l==="A"||l==="G")&&(a=!0),o++}this.hasAnchor=a,s===0?this.source=e:(i.push(e.substring(s,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=bn.test(this.source):this.hasBackReferences=!1}clone(){return new St(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=t.map(s=>e.substring(s.start,s.end));return ze.lastIndex=0,this.source.replace(ze,(s,i)=>ft(r[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=[],t=[],r=[],s=[],i,a,o,c;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,r[i]=o,s[i]=o,o==="\\"&&i+1<a&&(c=this.source.charAt(i+1),c==="A"?(e[i+1]="",t[i+1]="",r[i+1]="A",s[i+1]="A"):c==="G"?(e[i+1]="",t[i+1]="G",r[i+1]="",s[i+1]="G"):(e[i+1]=c,t[i+1]=c,r[i+1]=c,s[i+1]=c),i++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},V=class{constructor(){d(this,"_items");d(this,"_hasAnchors");d(this,"_cached");d(this,"_anchorCache");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(n){this._items.push(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}unshift(n){this._items.unshift(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}length(){return this._items.length}setSource(n,e){this._items[n].source!==e&&(this._disposeCaches(),this._items[n].setSource(e))}compile(n){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new Ke(n,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(n,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G0):this.compile(n)}_resolveAnchors(n,e,t){let r=this._items.map(s=>s.resolveAnchors(e,t));return new Ke(n,r,this._items.map(s=>s.ruleId))}},Ke=class{constructor(n,e,t){d(this,"scanner");this.regExps=e,this.rules=t,this.scanner=n.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const n=[];for(let e=0,t=this.rules.length;e<t;e++)n.push(" - "+this.rules[e]+": "+this.regExps[e]);return n.join(`
|
|
2
2
|
`)}findNextMatchSync(n,e,t){const r=this.scanner.findNextMatchSync(n,e,t);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},we=class{constructor(n,e){this.languageId=n,this.tokenType=e}},G,kn=(G=class{constructor(e,t){d(this,"_defaultAttributes");d(this,"_embeddedLanguagesMatcher");d(this,"_getBasicScopeAttributes",new dt(e=>{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new we(t,r)}));this._defaultAttributes=new we(e,8),this._embeddedLanguagesMatcher=new Rn(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?G._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(G.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[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!")}},d(G,"_NULL_SCOPE_METADATA",new we(0,0)),d(G,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),G),Rn=class{constructor(n){d(this,"values");d(this,"scopesRegExp");if(n.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(n);const e=n.map(([t,r])=>ft(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(n){if(!this.scopesRegExp)return;const e=n.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Ye=class{constructor(n,e){this.stack=n,this.stoppedEarly=e}};function Ct(n,e,t,r,s,i,a,o){const c=e.content.length;let l=!1,h=-1;if(a){const g=Nn(n,e,t,r,s,i);s=g.stack,r=g.linePos,t=g.isFirstLine,h=g.anchorPosition}const u=Date.now();for(;!l;){if(o!==0&&Date.now()-u>o)return new Ye(s,!0);f()}return new Ye(s,!1);function f(){const g=vn(n,e,t,r,s,h);if(!g){i.produce(s,c),l=!0;return}const m=g.captureIndices,S=g.matchedRuleId,b=m&&m.length>0?m[0].end>r:!1;if(S===Sn){const _=s.getRule(n);i.produce(s,m[0].start),s=s.withContentNameScopesList(s.nameScopesList),z(n,e,t,s,i,_.endCaptures,m),i.produce(s,m[0].end);const p=s;if(s=s.parent,h=p.getAnchorPos(),!b&&p.getEnterPos()===r){s=p,i.produce(s,c),l=!0;return}}else{const _=n.getRule(S);i.produce(s,m[0].start);const p=s,y=_.getName(e.content,m),w=s.contentNameScopesList.pushAttributed(y,n);if(s=s.push(S,r,h,m[0].end===c,null,w,w),_ instanceof Ie){const C=_;z(n,e,t,s,i,C.beginCaptures,m),i.produce(s,m[0].end),h=m[0].end;const k=C.getContentName(e.content,m),A=w.pushAttributed(k,n);if(s=s.withContentNameScopesList(A),C.endHasBackReferences&&(s=s.withEndRule(C.getEndWithResolvedBackReferences(e.content,m))),!b&&p.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(_ instanceof ce){const C=_;z(n,e,t,s,i,C.beginCaptures,m),i.produce(s,m[0].end),h=m[0].end;const k=C.getContentName(e.content,m),A=w.pushAttributed(k,n);if(s=s.withContentNameScopesList(A),C.whileHasBackReferences&&(s=s.withEndRule(C.getWhileWithResolvedBackReferences(e.content,m))),!b&&p.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(z(n,e,t,s,i,_.captures,m),i.produce(s,m[0].end),s=s.pop(),!b){s=s.safePop(),i.produce(s,c),l=!0;return}}m[0].end>r&&(r=m[0].end,t=!1)}}function Nn(n,e,t,r,s,i){let a=s.beginRuleCapturedEOL?0:-1;const o=[];for(let c=s;c;c=c.pop()){const l=c.getRule(n);l instanceof ce&&o.push({rule:l,stack:c})}for(let c=o.pop();c;c=o.pop()){const{ruleScanner:l,findOptions:h}=In(c.rule,n,c.stack.endRule,t,r===a),u=l.findNextMatchSync(e,r,h);if(u){if(u.ruleId!==yt){s=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(i.produce(c.stack,u.captureIndices[0].start),z(n,e,t,c.stack,i,c.rule.whileCaptures,u.captureIndices),i.produce(c.stack,u.captureIndices[0].end),a=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,t=!1))}else{s=c.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:a,isFirstLine:t}}function vn(n,e,t,r,s,i){const a=Tn(n,e,t,r,s,i),o=n.getInjections();if(o.length===0)return a;const c=An(o,n,e,t,r,s,i);if(!c)return a;if(!a)return c;const l=a.captureIndices[0].start,h=c.captureIndices[0].start;return h<l||c.priorityMatch&&h===l?c:a}function Tn(n,e,t,r,s,i){const a=s.getRule(n),{ruleScanner:o,findOptions:c}=wt(a,n,s.endRule,t,r===i),l=o.findNextMatchSync(e,r,c);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function An(n,e,t,r,s,i,a){let o=Number.MAX_VALUE,c=null,l,h=0;const u=i.contentNameScopesList.getScopeNames();for(let f=0,g=n.length;f<g;f++){const m=n[f];if(!m.matcher(u))continue;const S=e.getRule(m.ruleId),{ruleScanner:b,findOptions:_}=wt(S,e,null,r,s===a),p=b.findNextMatchSync(t,s,_);if(!p)continue;const y=p.captureIndices[0].start;if(!(y>=o)&&(o=y,c=p.captureIndices,l=p.ruleId,h=m.priority,o===s))break}return c?{priorityMatch:h===-1,captureIndices:c,matchedRuleId:l}:null}function wt(n,e,t,r,s){return{ruleScanner:n.compileAG(e,t,r,s),findOptions:0}}function In(n,e,t,r,s){return{ruleScanner:n.compileWhileAG(e,t,r,s),findOptions:0}}function z(n,e,t,r,s,i,a){if(i.length===0)return;const o=e.content,c=Math.min(i.length,a.length),l=[],h=a[0].end;for(let u=0;u<c;u++){const f=i[u];if(f===null)continue;const g=a[u];if(g.length===0)continue;if(g.start>h)break;for(;l.length>0&&l[l.length-1].endPos<=g.start;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?s.produceFromScopes(l[l.length-1].scopes,g.start):s.produce(r,g.start),f.retokenizeCapturedWithRuleId){const S=f.getName(o,a),b=r.contentNameScopesList.pushAttributed(S,n),_=f.getContentName(o,a),p=b.pushAttributed(_,n),y=r.push(f.retokenizeCapturedWithRuleId,g.start,-1,!1,null,b,p),w=n.createOnigString(o.substring(0,g.end));Ct(n,w,t&&g.start===0,g.start,y,s,!1,0),pt(w);continue}const m=f.getName(o,a);if(m!==null){const b=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(m,n);l.push(new En(b,g.end))}}for(;l.length>0;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var En=class{constructor(n,e){d(this,"scopes");d(this,"endPos");this.scopes=n,this.endPos=e}};function xn(n,e,t,r,s,i,a,o){return new Pn(n,e,t,r,s,i,a,o)}function Ve(n,e,t,r,s){const i=ae(e,le),a=bt.getCompiledRuleId(t,r,s.repository);for(const o of i)n.push({debugSelector:e,matcher:o.matcher,ruleId:a,grammar:s,priority:o.priority})}function le(n,e){if(e.length<n.length)return!1;let t=0;return n.every(r=>{for(let s=t;s<e.length;s++)if(Ln(e[s],r))return t=s+1,!0;return!1})}function Ln(n,e){if(!n)return!1;if(n===e)return!0;const t=e.length;return n.length>t&&n.substr(0,t)===e&&n[t]==="."}var Pn=class{constructor(n,e,t,r,s,i,a,o){d(this,"_rootId");d(this,"_lastRuleId");d(this,"_ruleId2desc");d(this,"_includedGrammars");d(this,"_grammarRepository");d(this,"_grammar");d(this,"_injections");d(this,"_basicScopeAttributesProvider");d(this,"_tokenTypeMatchers");if(this._rootScopeName=n,this.balancedBracketSelectors=i,this._onigLib=o,this._basicScopeAttributesProvider=new kn(t,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=Je(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const c of Object.keys(s)){const l=ae(c,le);for(const h of l)this._tokenTypeMatchers.push({matcher:h.matcher,type:s[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const n of this._ruleId2desc)n&&n.dispose()}createOnigScanner(n){return this._onigLib.createOnigScanner(n)}createOnigString(n){return this._onigLib.createOnigString(n)}getMetadataForScope(n){return this._basicScopeAttributesProvider.getBasicScopeAttributes(n)}_collectInjections(){const n={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],t=this._rootScopeName,r=n.lookup(t);if(r){const s=r.injections;if(s)for(let a in s)Ve(e,a,s[a],this,r);const i=this._grammarRepository.injections(t);i&&i.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const c=o.injectionSelector;c&&Ve(e,c,o,this,o)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(n){const e=++this._lastRuleId,t=n(e);return this._ruleId2desc[e]=t,t}getRule(n){return this._ruleId2desc[n]}getExternalGrammar(n,e){if(this._includedGrammars[n])return this._includedGrammars[n];if(this._grammarRepository){const t=this._grammarRepository.lookup(n);if(t)return this._includedGrammars[n]=Je(t,e&&e.$base),this._includedGrammars[n]}}tokenizeLine(n,e,t=0){const r=this._tokenize(n,e,!1,t);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(n,e,t=0){const r=this._tokenize(n,e,!0,t);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(n,e,t,r){this._rootId===-1&&(this._rootId=bt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===Ee.NULL){s=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),u=F.set(0,l.languageId,l.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),f=this.getRule(this._rootId).getName(null,null);let g;f?g=U.createRootAndLookUpScopeName(f,u,this):g=U.createRoot("unknown",u),e=new Ee(null,this._rootId,-1,-1,!1,null,g,g)}else s=!1,e.reset();n=n+`
|
|
3
3
|
`;const i=this.createOnigString(n),a=i.content.length,o=new Bn(t,n,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Ct(this,i,s,0,e,o,!0,r);return pt(i),{lineLength:a,lineTokens:o,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Je(n,e){return n=Qt(n),n.repository=n.repository||{},n.repository.$self={$vscodeTextmateLocation:n.$vscodeTextmateLocation,patterns:n.patterns,name:n.scopeName},n.repository.$base=e||n.repository.$self,n}var U=class L{constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(e,t){let r=e,s=(e==null?void 0:e.scopePath)??null;for(const i of t)s=Ce.push(s,i.scopeNames),r=new L(r,s,i.encodedTokenAttributes);return r}static createRoot(e,t){return new L(null,new Ce(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const s=r.getMetadataForScope(e),i=new Ce(null,e),a=r.themeProvider.themeMatch(i),o=L.mergeAttributes(t,s,a);return new L(null,i,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return L.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,r){let s=-1,i=0,a=0;return r!==null&&(s=r.fontStyle,i=r.foregroundId,a=r.backgroundId),F.set(e,t.languageId,t.tokenType,null,s,i,a)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return L._pushAttributed(this,e,t);const r=e.split(/ /g);let s=this;for(const i of r)s=L._pushAttributed(s,i,t);return s}static _pushAttributed(e,t,r){const s=r.getMetadataForScope(t),i=e.scopePath.push(t),a=r.themeProvider.themeMatch(i),o=L.mergeAttributes(e.tokenAttributes,s,a);return new L(e,i,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var s;const t=[];let r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((s=r.parent)==null?void 0:s.scopePath)??null)}),r=r.parent;return r===e?t.reverse():void 0}},x,Ee=(x=class{constructor(e,t,r,s,i,a,o,c){d(this,"_stackElementBrand");d(this,"_enterPos");d(this,"_anchorPos");d(this,"depth");this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}equals(e){return e===null?!1:x._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?U.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}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,t,r,s,i,a,o){return new x(this,e,t,r,s,i,a,o)}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,t){var r,s;return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(s=this.contentNameScopesList)==null?void 0:s.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(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 t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){var e,t,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((t=this.nameScopesList)==null?void 0:t.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,t){const r=U.fromExtension((e==null?void 0:e.nameScopesList)??null,t.nameScopesList);return new x(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,r,U.fromExtension(r,t.contentNameScopesList))}},d(x,"NULL",new x(null,0,0,0,!1,null,null,null)),x),Gn=class{constructor(n,e){d(this,"balancedBracketScopes");d(this,"unbalancedBracketScopes");d(this,"allowAny",!1);this.balancedBracketScopes=n.flatMap(t=>t==="*"?(this.allowAny=!0,[]):ae(t,le).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>ae(t,le).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(n){for(const e of this.unbalancedBracketScopes)if(e(n))return!1;for(const e of this.balancedBracketScopes)if(e(n))return!0;return this.allowAny}},Bn=class{constructor(n,e,t,r){d(this,"_emitBinaryTokens");d(this,"_lineText");d(this,"_tokens");d(this,"_binaryTokens");d(this,"_lastTokenEndIndex");d(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=n,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(n,e){this.produceFromScopes(n.contentNameScopesList,e)}produceFromScopes(n,e){var r;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let s=(n==null?void 0:n.tokenAttributes)??0,i=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(n==null?void 0:n.getScopeNames())??[];for(const o of this._tokenTypeOverrides)o.matcher(a)&&(s=F.set(s,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(a))}if(i&&(s=F.set(s,0,8,i,-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 t=(n==null?void 0:n.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(n,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(n,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(n,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(n,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)t[r]=this._binaryTokens[r];return t}},On=class{constructor(n,e){d(this,"_grammars",new Map);d(this,"_rawGrammars",new Map);d(this,"_injectionGrammars",new Map);d(this,"_theme");this._onigLib=e,this._theme=n}dispose(){for(const n of this._grammars.values())n.dispose()}setTheme(n){this._theme=n}getColorMap(){return this._theme.getColorMap()}addGrammar(n,e){this._rawGrammars.set(n.scopeName,n),e&&this._injectionGrammars.set(n.scopeName,e)}lookup(n){return this._rawGrammars.get(n)}injections(n){return this._injectionGrammars.get(n)}getDefaults(){return this._theme.getDefaults()}themeMatch(n){return this._theme.match(n)}grammarForScopeName(n,e,t,r,s){if(!this._grammars.has(n)){let i=this._rawGrammars.get(n);if(!i)return null;this._grammars.set(n,xn(n,i,e,t,r,s,this,this._onigLib))}return this._grammars.get(n)}},$n=class{constructor(e){d(this,"_options");d(this,"_syncRegistry");d(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new On(ie.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(ie.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new Gn(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,s,i){const a=new fn(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,r,s,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,s=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,s)}_grammarForScopeName(e,t=0,r=null,s=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,r,s,i)}},xe=Ee.NULL;function ue(n,e){const t=typeof n=="string"?{}:{...n.colorReplacements},r=typeof n=="string"?n:n.name;for(const[s,i]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof i=="string"?t[s]=i:s===r&&Object.assign(t,i);return t}function O(n,e){return n&&((e==null?void 0:e[n==null?void 0:n.toLowerCase()])||n)}function Mn(n){return Array.isArray(n)?n:[n]}async function kt(n){return Promise.resolve(typeof n=="function"?n():n).then(e=>e.default||e)}function ge(n){return!n||["plaintext","txt","text","plain"].includes(n)}function Rt(n){return n==="ansi"||ge(n)}function me(n){return n==="none"}function Nt(n){return me(n)}const jn=/(\r?\n)/g;function pe(n,e=!1){var i;if(n.length===0)return[["",0]];const t=n.split(jn);let r=0;const s=[];for(let a=0;a<t.length;a+=2){const o=e?t[a]+(t[a+1]||""):t[a];s.push([o,r]),r+=t[a].length,r+=((i=t[a+1])==null?void 0:i.length)||0}return s}const Qe={light:"#333333",dark:"#bbbbbb"},Xe={light:"#fffffe",dark:"#1e1e1e"},Ze="__shiki_resolved";function Oe(n){var o,c,l,h,u;if(n!=null&&n[Ze])return n;const e={...n};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:t,fg:r}=e;if(!t||!r){const f=e.settings?e.settings.find(g=>!g.name&&!g.scope):void 0;(o=f==null?void 0:f.settings)!=null&&o.foreground&&(r=f.settings.foreground),(c=f==null?void 0:f.settings)!=null&&c.background&&(t=f.settings.background),!r&&((l=e==null?void 0:e.colors)!=null&&l["editor.foreground"])&&(r=e.colors["editor.foreground"]),!t&&((h=e==null?void 0:e.colors)!=null&&h["editor.background"])&&(t=e.colors["editor.background"]),r||(r=e.type==="light"?Qe.light:Qe.dark),t||(t=e.type==="light"?Xe.light:Xe.dark),e.fg=r,e.bg=t}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0;const i=new Map;function a(f){var m;if(i.has(f))return i.get(f);s+=1;const g=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return(m=e.colorReplacements)!=null&&m[`#${g}`]?a(f):(i.set(f,g),g)}e.settings=e.settings.map(f=>{var b,_;const g=((b=f.settings)==null?void 0:b.foreground)&&!f.settings.foreground.startsWith("#"),m=((_=f.settings)==null?void 0:_.background)&&!f.settings.background.startsWith("#");if(!g&&!m)return f;const S={...f,settings:{...f.settings}};if(g){const p=a(f.settings.foreground);e.colorReplacements[p]=f.settings.foreground,S.settings.foreground=p}if(m){const p=a(f.settings.background);e.colorReplacements[p]=f.settings.background,S.settings.background=p}return S});for(const f of Object.keys(e.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!((u=e.colors[f])!=null&&u.startsWith("#"))){const g=a(e.colors[f]);e.colorReplacements[g]=e.colors[f],e.colors[f]=g}return Object.defineProperty(e,Ze,{enumerable:!1,writable:!1,value:!0}),e}async function vt(n){return[...new Set((await Promise.all(n.filter(e=>!Rt(e)).map(async e=>await kt(e).then(t=>Array.isArray(t)?t:[t])))).flat())]}async function Tt(n){return(await Promise.all(n.map(async e=>Nt(e)?null:Oe(await kt(e))))).filter(e=>!!e)}function At(n,e){if(!e)return n;if(e[n]){const t=new Set([n]);for(;e[n];){if(n=e[n],t.has(n))throw new R(`Circular alias \`${[...t].join(" -> ")} -> ${n}\``);t.add(n)}}return n}var Wn=class extends $n{constructor(e,t,r,s={}){super(e);d(this,"_resolver");d(this,"_themes");d(this,"_langs");d(this,"_alias");d(this,"_resolvedThemes",new Map);d(this,"_resolvedGrammars",new Map);d(this,"_langMap",new Map);d(this,"_langGraph",new Map);d(this,"_textmateThemeCache",new WeakMap);d(this,"_loadedThemesCache",null);d(this,"_loadedLanguagesCache",null);this._resolver=e,this._themes=t,this._langs=r,this._alias=s,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=Oe(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=ie.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=At(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){var i,a,o,c;if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(l=>{var h;return(h=l.embeddedLangsLazy)==null?void 0:h.includes(e.name)}));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const s=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(s.name=e.name,this._resolvedGrammars.set(e.name,s),e.aliases&&e.aliases.forEach(l=>{this._alias[l]=e.name}),this._loadedLanguagesCache=null,t.size)for(const l of t)this._resolvedGrammars.delete(l.name),this._loadedLanguagesCache=null,(a=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||a.delete(l.scopeName),(c=(o=this._syncRegistry)==null?void 0:o._grammars)==null||c.delete(l.scopeName),this.loadLanguage(this._langMap.get(l.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const s of e)this.resolveEmbeddedLanguages(s);const t=[...this._langGraph.entries()],r=t.filter(([s,i])=>!i);if(r.length){const s=t.filter(([i,a])=>{var o;return a?(o=a.embeddedLanguages||a.embeddedLangs)==null?void 0:o.some(c=>r.map(([l])=>l).includes(c)):!1}).filter(i=>!r.includes(i));throw new R(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${s.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[s,i]of t)this._resolver.addLanguage(i);for(const[s,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const r of t)this._langGraph.set(r,this._langMap.get(r))}},Dn=class{constructor(n,e){d(this,"_langs",new Map);d(this,"_scopeToLang",new Map);d(this,"_injections",new Map);d(this,"_onigLib");this._onigLib={createOnigScanner:t=>n.createScanner(t),createOnigString:t=>n.createString(t)},e.forEach(t=>this.addLanguage(t))}get onigLib(){return this._onigLib}getLangRegistration(n){return this._langs.get(n)}loadGrammar(n){return this._scopeToLang.get(n)}addLanguage(n){this._langs.set(n.name,n),n.aliases&&n.aliases.forEach(e=>{this._langs.set(e,n)}),this._scopeToLang.set(n.scopeName,n),n.injectTo&&n.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(n.scopeName)})}getInjections(n){const e=n.split(".");let t=[];for(let r=1;r<=e.length;r++){const s=e.slice(0,r).join(".");t=[...t,...this._injections.get(s)||[]]}return t}};let H=0;function $e(n){H+=1,n.warnings!==!1&&H>=10&&H%10===0&&console.warn(`[Shiki] ${H} 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(!n.engine)throw new R("`engine` option is required for synchronous mode");const t=(n.langs||[]).flat(1),r=(n.themes||[]).flat(1).map(Oe),s=new Wn(new Dn(n.engine,t),r,t,n.langAlias);let i;function a(p){return At(p,n.langAlias)}function o(p){b();const y=s.getGrammar(typeof p=="string"?p:p.name);if(!y)throw new R(`Language \`${p}\` not found, you may need to load it first`);return y}function c(p){if(p==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const y=s.getTheme(p);if(!y)throw new R(`Theme \`${p}\` not found, you may need to load it first`);return y}function l(p){b();const y=c(p);return i!==p&&(s.setTheme(y),i=p),{theme:y,colorMap:s.getColorMap()}}function h(){return b(),s.getLoadedThemes()}function u(){return b(),s.getLoadedLanguages()}function f(...p){b(),s.loadLanguages(p.flat(1))}async function g(...p){return f(await vt(p))}function m(...p){b();for(const y of p.flat(1))s.loadTheme(y)}async function S(...p){return b(),m(await Tt(p))}function b(){if(e)throw new R("Shiki instance has been disposed")}function _(){e||(e=!0,s.dispose(),H-=1)}return{setTheme:l,getTheme:c,getLanguage:o,getLoadedThemes:h,getLoadedLanguages:u,resolveLangAlias:a,loadLanguage:g,loadLanguageSync:f,loadTheme:S,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}const Os=$e;async function It(n){n.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,t,r]=await Promise.all([Tt(n.themes||[]),vt(n.langs||[]),n.engine]);return $e({...n,themes:e,langs:t,engine:r})}const $s=It,Et=new WeakMap;function _e(n,e){Et.set(n,e)}function J(n){return Et.get(n)}var ye=class xt{constructor(...e){d(this,"_stacks",{});d(this,"lang");if(e.length===2){const[t,r]=e;this.lang=r,this._stacks=t}else{const[t,r,s]=e;this.lang=r,this._stacks={[s]:t}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new xt(Object.fromEntries(Mn(t).map(r=>[r,xe])),e)}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Fn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Fn(n){const e=[],t=new Set;function r(s){var a;if(t.has(s))return;t.add(s);const i=(a=s==null?void 0:s.nameScopesList)==null?void 0:a.scopeName;i&&e.push(i),s.parent&&r(s.parent)}return r(n),e}function qn(n,e){if(!(n instanceof ye))throw new R("Invalid grammar state");return n.getInternalStack(e)}const Hn=/,/,zn=/ /;function Lt(n,e,t={}){const{theme:r=n.getLoadedThemes()[0]}=t;if(ge(n.resolveLangAlias(t.lang||"text"))||me(r))return pe(e).map(o=>[{content:o[0],offset:o[1]}]);const{theme:s,colorMap:i}=n.setTheme(r),a=n.getLanguage(t.lang||"text");if(t.grammarState){if(t.grammarState.lang!==a.name)throw new R(`Grammar state language "${t.grammarState.lang}" does not match highlight language "${a.name}"`);if(!t.grammarState.themes.includes(s.name))throw new R(`Grammar state themes "${t.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Un(e,a,s,i,t)}function Pt(...n){if(n.length===2)return J(n[1]);const[e,t,r={}]=n,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=r;if(ge(s)||me(i))throw new R("Plain language does not have grammar state");if(s==="ansi")throw new R("ANSI language does not have grammar state");const{theme:a,colorMap:o}=e.setTheme(i),c=e.getLanguage(s);return new ye(Me(t,c,a,o,r).stateStack,c.name,a.name)}function Un(n,e,t,r,s){const i=Me(n,e,t,r,s),a=new ye(i.stateStack,e.name,t.name);return _e(i.tokens,a),i.tokens}function Me(n,e,t,r,s){const i=ue(t,s),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=s,c=pe(n);let l=s.grammarState?qn(s.grammarState,t.name)??xe:s.grammarContextCode!=null?Me(s.grammarContextCode,e,t,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:xe,h=[];const u=[];for(let f=0,g=c.length;f<g;f++){const[m,S]=c[f];if(m===""){h=[],u.push([]);continue}if(a>0&&m.length>=a){h=[],u.push([{content:m,offset:S,color:"",fontStyle:0}]);continue}let b,_,p;s.includeExplanation&&(b=e.tokenizeLine(m,l,o),_=b.tokens,p=0);const y=e.tokenizeLine2(m,l,o),w=y.tokens.length/2;for(let C=0;C<w;C++){const k=y.tokens[2*C],A=C+1<w?y.tokens[2*C+2]:m.length;if(k===A)continue;const q=y.tokens[2*C+1],I=O(r[F.getForeground(q)],i),B=F.getFontStyle(q),M={content:m.substring(k,A),offset:S+k,color:I,fontStyle:B};if(s.includeExplanation){const j=[];if(s.includeExplanation!=="scopeName")for(const P of t.settings){let W;switch(typeof P.scope){case"string":W=P.scope.split(Hn).map(be=>be.trim());break;case"object":W=P.scope;break;default:continue}j.push({settings:P,selectors:W.map(be=>be.split(zn))})}M.explanation=[];let De=0;for(;k+De<A;){const P=_[p],W=m.substring(P.startIndex,P.endIndex);De+=W.length,M.explanation.push({content:W,scopes:s.includeExplanation==="scopeName"?Kn(P.scopes):Yn(j,P.scopes)}),p+=1}}h.push(M)}u.push(h),h=[],l=y.ruleStack}return{tokens:u,stateStack:l}}function Kn(n){return n.map(e=>({scopeName:e}))}function Yn(n,e){const t=[];for(let r=0,s=e.length;r<s;r++){const i=e[r];t[r]={scopeName:i,themeMatches:Jn(n,i,e.slice(0,r))}}return t}function et(n,e){return n===e||e.substring(0,n.length)===n&&e[n.length]==="."}function Vn(n,e,t){if(!et(n.at(-1),e))return!1;let r=n.length-2,s=t.length-1;for(;r>=0&&s>=0;)et(n[r],t[s])&&(r-=1),s-=1;return r===-1}function Jn(n,e,t){const r=[];for(const{selectors:s,settings:i}of n)for(const a of s)if(Vn(a,e,t)){r.push(i);break}return r}function je(n,e,t,r=Lt){const s=Object.entries(t.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=s.map(l=>{const h=r(n,e,{...t,theme:l.theme});return{tokens:h,state:J(h),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),a=Qn(...i.map(l=>l.tokens)),o=a[0].map((l,h)=>l.map((u,f)=>{const g={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in t&&t.includeExplanation&&(g.explanation=u.explanation),a.forEach((m,S)=>{const{content:b,explanation:_,offset:p,...y}=m[h][f];g.variants[s[S].color]=y}),g})),c=i[0].state?new ye(Object.fromEntries(i.map(l=>{var h;return[l.theme,(h=l.state)==null?void 0:h.getInternalStack(l.theme)]})),i[0].state.lang):void 0;return c&&_e(o,c),o}function Qn(...n){const e=n.map(()=>[]),t=n.length;for(let r=0;r<n[0].length;r++){const s=n.map(c=>c[r]),i=e.map(()=>[]);e.forEach((c,l)=>c.push(i[l]));const a=s.map(()=>0),o=s.map(c=>c[0]);for(;o.every(c=>c);){const c=Math.min(...o.map(l=>l.content.length));for(let l=0;l<t;l++){const h=o[l];h.content.length===c?(i[l].push(h),a[l]+=1,o[l]=s[l][a[l]]):(i[l].push({...h,content:h.content.slice(0,c)}),o[l]={...h,content:h.content.slice(c),offset:h.offset+c})}}}return e}const Xn=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Zn=/["&'<>`]/g,er=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,nr=/[|\\{}()[\]^$+*?.]/g,tt=new WeakMap;function rr(n,e){if(n=n.replace(e.subset?sr(e.subset):Zn,r),e.subset||e.escapeOnly)return n;return n.replace(er,t).replace(tr,r);function t(s,i,a){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),e)}function r(s,i,a){return e.format(s.charCodeAt(0),a.charCodeAt(i+1),e)}}function sr(n){let e=tt.get(n);return e||(e=ir(n),tt.set(n,e)),e}function ir(n){const e=[];let t=-1;for(;++t<n.length;)e.push(n[t].replace(nr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const ar=/[\dA-Fa-f]/;function or(n,e,t){const r="&#x"+n.toString(16).toUpperCase();return t&&e&&!ar.test(String.fromCharCode(e))?r:r+";"}const cr=/\d/;function lr(n,e,t){const r="&#"+String(n);return t&&e&&!cr.test(String.fromCharCode(e))?r:r+";"}const ur=["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"],ke={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:"€"},hr=["cent","copy","divide","gt","lt","not","para","times"],Gt={}.hasOwnProperty,Le={};let te;for(te in ke)Gt.call(ke,te)&&(Le[ke[te]]=te);const fr=/[^\dA-Za-z]/;function dr(n,e,t,r){const s=String.fromCharCode(n);if(Gt.call(Le,s)){const i=Le[s],a="&"+i;return t&&ur.includes(i)&&!hr.includes(i)&&(!r||e&&e!==61&&fr.test(String.fromCharCode(e)))?a:a+";"}return""}function gr(n,e,t){let r=or(n,e,t.omitOptionalSemicolons),s;if((t.useNamedReferences||t.useShortestReferences)&&(s=dr(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!s)&&t.useShortestReferences){const i=lr(n,e,t.omitOptionalSemicolons);i.length<r.length&&(r=i)}return s&&(!t.useShortestReferences||s.length<r.length)?s:r}function D(n,e){return rr(n,Object.assign({format:gr},e))}const mr=/^>|^->|<!--|-->|--!>|<!-$/g,pr=[">"],_r=["<",">"];function yr(n,e,t,r){return r.settings.bogusComments?"<?"+D(n.value,Object.assign({},r.settings.characterReferences,{subset:pr}))+">":"<!--"+n.value.replace(mr,s)+"-->";function s(i){return D(i,Object.assign({},r.settings.characterReferences,{subset:_r}))}}function br(n,e,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const N=Ot(1),Bt=Ot(-1),Sr=[];function Ot(n){return e;function e(t,r,s){const i=t?t.children:Sr;let a=(r||0)+n,o=i[a];if(!s)for(;o&&Ge(o);)a+=n,o=i[a];return o}}const Cr={}.hasOwnProperty;function $t(n){return e;function e(t,r,s){return Cr.call(n,t.tagName)&&n[t.tagName](t,r,s)}}const We=$t({body:kr,caption:Re,colgroup:Re,dd:Tr,dt:vr,head:Re,html:wr,li:Nr,optgroup:Ar,option:Ir,p:Rr,rp:nt,rt:nt,tbody:xr,td:rt,tfoot:Lr,th:rt,thead:Er,tr:Pr});function Re(n,e,t){const r=N(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Ge(r.value.charAt(0)))}function wr(n,e,t){const r=N(t,e);return!r||r.type!=="comment"}function kr(n,e,t){const r=N(t,e);return!r||r.type!=="comment"}function Rr(n,e,t){const r=N(t,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function Nr(n,e,t){const r=N(t,e);return!r||r.type==="element"&&r.tagName==="li"}function vr(n,e,t){const r=N(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Tr(n,e,t){const r=N(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function nt(n,e,t){const r=N(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Ar(n,e,t){const r=N(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Ir(n,e,t){const r=N(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Er(n,e,t){const r=N(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function xr(n,e,t){const r=N(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Lr(n,e,t){return!N(t,e)}function Pr(n,e,t){const r=N(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function rt(n,e,t){const r=N(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Gr=$t({body:$r,colgroup:Mr,head:Or,html:Br,tbody:jr});function Br(n){const e=N(n,-1);return!e||e.type!=="comment"}function Or(n){const e=new Set;for(const r of n.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const t=n.children[0];return!t||t.type==="element"}function $r(n){const e=N(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Ge(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Mr(n,e,t){const r=Bt(t,e),s=N(n,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&We(r,t.children.indexOf(r),t)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function jr(n,e,t){const r=Bt(t,e),s=N(n,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&We(r,t.children.indexOf(r),t)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const ne={name:[[`
|
|
4
4
|
\f\r &/=>`.split(""),`
|