@dooc-dev/dooc 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +16 -18
- package/dist/client.global.js +1 -0
- package/dist/code-worker.global.js +11 -11
- package/dist/code.global.js +75 -75
- package/dist/edit.global.js +234 -231
- package/dist/{compiler → engine/compiler}/bundle-urls.js +1 -4
- package/dist/{compiler → engine/compiler}/check-prose.d.ts +1 -1
- package/dist/{compiler → engine/compiler}/check-prose.js +1 -1
- package/dist/{compiler → engine/compiler}/check.js +15 -27
- package/dist/{compiler → engine/compiler}/code-blocks.js +3 -1
- package/dist/{compiler → engine/compiler}/code-languages.js +1 -2
- package/dist/{compiler → engine/compiler}/compile.d.ts +5 -4
- package/dist/{compiler → engine/compiler}/compile.js +91 -32
- package/dist/{compiler → engine/compiler}/config.js +1 -3
- package/dist/{compiler → engine/compiler}/dialect.d.ts +1 -3
- package/dist/{compiler → engine/compiler}/dialect.js +8 -52
- package/dist/{compiler → engine/compiler}/dxf.js +1 -1
- package/dist/{compiler → engine/compiler}/export.js +15 -8
- package/dist/{compiler → engine/compiler}/figures.js +26 -22
- package/dist/{compiler → engine/compiler}/file-cache.d.ts +1 -2
- package/dist/{compiler → engine/compiler}/file-cache.js +8 -15
- package/dist/{compiler → engine/compiler}/files.js +49 -38
- package/dist/{compiler → engine/compiler}/fonts.js +1 -3
- package/dist/{compiler → engine/compiler}/from-mdast.js +1 -1
- package/dist/engine/compiler/host.d.ts +10 -0
- package/dist/engine/compiler/host.js +16 -0
- package/dist/{compiler → engine/compiler}/icons.d.ts +3 -0
- package/dist/{compiler → engine/compiler}/icons.js +28 -10
- package/dist/{compiler → engine/compiler}/ignored-files.d.ts +2 -0
- package/dist/{compiler → engine/compiler}/ignored-files.js +12 -3
- package/dist/{compiler → engine/compiler}/locales.js +2 -8
- package/dist/{compiler → engine/compiler}/manifest.d.ts +3 -2
- package/dist/engine/compiler/manifest.js +46 -0
- package/dist/{compiler → engine/compiler}/ops.d.ts +4 -1
- package/dist/{compiler → engine/compiler}/ops.js +36 -21
- package/dist/engine/compiler/schema-file-references.d.ts +2 -0
- package/dist/engine/compiler/schema-file-references.js +82 -0
- package/dist/engine/compiler/serialize.d.ts +2 -0
- package/dist/engine/compiler/serialize.js +5 -0
- package/dist/{compiler → engine/compiler}/subformat-schema.js +1 -3
- package/dist/{compiler → engine/compiler}/subformats.d.ts +10 -0
- package/dist/{compiler → engine/compiler}/subformats.js +122 -18
- package/dist/{compiler → engine/compiler}/textfile-remote.js +1 -2
- package/dist/{compiler → engine/compiler}/textfile.js +4 -6
- package/dist/{compiler → engine/compiler}/theme-variants.js +1 -1
- package/dist/{compiler → engine/compiler}/zip.js +1 -1
- package/dist/{core → engine/core}/blocks.d.ts +6 -4
- package/dist/{core → engine/core}/content-metadata.d.ts +6 -1
- package/dist/{core → engine/core}/content-metadata.js +84 -18
- package/dist/{core → engine/core}/content-types.d.ts +4 -2
- package/dist/{core → engine/core}/html.d.ts +7 -0
- package/dist/{core → engine/core}/html.js +44 -3
- package/dist/{core → engine/core}/icons.d.ts +3 -0
- package/dist/engine/core/icons.js +20 -0
- package/dist/{core → engine/core}/routing.d.ts +2 -0
- package/dist/{core → engine/core}/routing.js +9 -0
- package/dist/{core → engine/core}/schema-refs.d.ts +1 -1
- package/dist/{core → engine/core}/schema-refs.js +3 -1
- package/dist/engine/core/subformat-references.d.ts +5 -0
- package/dist/engine/core/subformat-references.js +33 -0
- package/dist/{core → engine/core}/subformats.d.ts +7 -0
- package/dist/{core → engine/core}/subformats.js +5 -1
- package/dist/{core → engine/core}/taxonomy.d.ts +2 -3
- package/dist/{core → engine/core}/taxonomy.js +1 -5
- package/dist/flow.global.js +306 -306
- package/dist/frontend/application-request.d.ts +14 -0
- package/dist/frontend/application-request.js +36 -0
- package/dist/frontend/document-application.d.ts +200 -0
- package/dist/{viewer/serve.js → frontend/document-application.js} +1611 -1670
- package/dist/frontend/figure-preview.d.ts +4 -0
- package/dist/{viewer → frontend}/figure-preview.js +4 -4
- package/dist/{viewer → frontend}/file-references.d.ts +1 -1
- package/dist/{viewer → frontend}/file-references.js +3 -3
- package/dist/{viewer → frontend}/font-picker.d.ts +1 -1
- package/dist/{viewer → frontend}/font-settings.d.ts +1 -1
- package/dist/{viewer → frontend}/language-picker.js +112 -18
- package/dist/{viewer → frontend}/locales/eng.json +16 -2
- package/dist/{viewer → frontend}/locales/jpn.json +16 -2
- package/dist/{viewer → frontend}/locales/zho.json +16 -2
- package/dist/{viewer → frontend}/nav-focus.js +2 -0
- package/dist/{viewer → frontend}/plugin-blocks.js +2 -2
- package/dist/{viewer → frontend}/resize.js +14 -2
- package/dist/frontend/resource-download.d.ts +2 -0
- package/dist/frontend/resource-download.js +43 -0
- package/dist/{viewer → frontend}/resource-library.d.ts +9 -2
- package/dist/{viewer → frontend}/resource-library.js +133 -37
- package/dist/{core → frontend}/schema-graph-flow.d.ts +1 -1
- package/dist/{core → frontend}/schema-graph-flow.js +1 -1
- package/dist/{viewer → frontend}/search.d.ts +2 -2
- package/dist/{viewer → frontend}/search.js +26 -8
- package/dist/graph/schema-graph-global.js +17 -17
- package/dist/install.sh +68 -0
- package/dist/plugins.global.js +62 -62
- package/dist/{viewer → server}/assets.d.ts +2 -0
- package/dist/server/assets.js +7 -0
- package/dist/{viewer → server}/build-plugins.js +4 -4
- package/dist/{viewer → server}/build.d.ts +2 -1
- package/dist/{viewer → server}/build.js +31 -15
- package/dist/{cli.js → server/cli.js} +199 -66
- package/dist/server/editor-tools.d.ts +1 -0
- package/dist/server/editor-tools.js +1 -0
- package/dist/{viewer → server}/extension-pack.js +2 -2
- package/dist/{viewer → server}/extensions.d.ts +1 -1
- package/dist/{viewer → server}/extensions.js +3 -3
- package/dist/server/git-diff.d.ts +10 -0
- package/dist/{viewer → server}/git-diff.js +45 -10
- package/dist/server/git-origin.d.ts +4 -0
- package/dist/server/git-origin.js +103 -0
- package/dist/server/git.d.ts +9 -0
- package/dist/{viewer → server}/git.js +50 -6
- package/dist/server/history.d.ts +14 -0
- package/dist/server/history.js +205 -0
- package/dist/{viewer → server}/hmr.d.ts +0 -22
- package/dist/server/hmr.js +168 -0
- package/dist/server/index.d.ts +17 -0
- package/dist/{index.js → server/index.js} +16 -16
- package/dist/{viewer → server}/ja-lint.d.ts +1 -1
- package/dist/{viewer → server}/languages.d.ts +1 -1
- package/dist/{viewer → server}/languages.js +3 -3
- package/dist/{mcp.d.ts → server/mcp.d.ts} +2 -2
- package/dist/{mcp.js → server/mcp.js} +60 -21
- package/dist/{viewer → server}/plugin-config.d.ts +2 -2
- package/dist/{viewer → server}/plugin-config.js +2 -2
- package/dist/{plugins → server/plugins}/local-storage.d.ts +1 -1
- package/dist/{plugins → server/plugins}/local-storage.js +1 -1
- package/dist/{plugins → server/plugins}/runtime.d.ts +4 -4
- package/dist/{plugins → server/plugins}/runtime.js +4 -4
- package/dist/{viewer → server}/plugins.d.ts +3 -3
- package/dist/{viewer → server}/plugins.js +14 -13
- package/dist/server/resource-library.d.ts +1 -0
- package/dist/server/resource-library.js +1 -0
- package/dist/server/self.d.ts +5 -0
- package/dist/server/self.js +98 -0
- package/dist/server/serve.d.ts +61 -0
- package/dist/server/serve.js +503 -0
- package/dist/server/static-client.d.ts +4 -0
- package/dist/server/static-client.js +117 -0
- package/dist/server/workspace-server.d.ts +16 -0
- package/dist/server/workspace-server.js +266 -0
- package/dist/{viewer → server}/workspace.d.ts +6 -1
- package/dist/{viewer → server}/workspace.js +46 -0
- package/dist/subformats.global.js +92 -6
- package/dist/ui.global.js +85 -72
- package/dist/workspace/client.d.ts +13 -0
- package/dist/workspace/client.js +114 -0
- package/dist/{viewer → workspace}/code-file.d.ts +1 -1
- package/dist/{viewer → workspace}/code-file.js +7 -7
- package/dist/workspace/connection.d.ts +27 -0
- package/dist/workspace/connection.js +38 -0
- package/dist/{viewer → workspace}/editor-tools.d.ts +7 -1
- package/dist/{viewer → workspace}/editor-tools.js +12 -9
- package/dist/{viewer → workspace}/git-types.d.ts +7 -0
- package/dist/workspace/github.d.ts +4 -0
- package/dist/workspace/github.js +99 -0
- package/dist/workspace/history.d.ts +46 -0
- package/dist/workspace/history.js +86 -0
- package/dist/workspace/protocol.d.ts +38 -0
- package/dist/workspace/protocol.js +20 -0
- package/dist/workspace/resource-download.d.ts +1 -0
- package/dist/workspace/resource-download.js +8 -0
- package/dist/workspace/server.d.ts +9 -0
- package/dist/workspace/server.js +48 -0
- package/dist/{viewer → workspace}/site-icon.js +9 -10
- package/dist/{viewer → workspace}/site-title.js +6 -7
- package/dist/{viewer → workspace}/textfile.d.ts +1 -1
- package/dist/{viewer → workspace}/textfile.js +5 -5
- package/dist/workspace-worker.global.js +2859 -0
- package/package.json +35 -20
- package/dist/compiler/manifest.js +0 -37
- package/dist/compiler/serialize.d.ts +0 -3
- package/dist/compiler/serialize.js +0 -16
- package/dist/core/icons.js +0 -5
- package/dist/index.d.ts +0 -17
- package/dist/viewer/assets.js +0 -3
- package/dist/viewer/figure-preview.d.ts +0 -4
- package/dist/viewer/git-diff.d.ts +0 -6
- package/dist/viewer/git.d.ts +0 -5
- package/dist/viewer/hmr.js +0 -341
- package/dist/viewer/serve.d.ts +0 -216
- /package/dist/{compiler → engine/compiler}/asset-references.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/asset-references.js +0 -0
- /package/dist/{compiler → engine/compiler}/bundle-urls.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/check-types.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/check-types.js +0 -0
- /package/dist/{compiler → engine/compiler}/check.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/code-blocks.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/code-languages.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/config.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/drawio.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/drawio.js +0 -0
- /package/dist/{compiler → engine/compiler}/dxf.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/export.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/figures.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/files.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/fonts.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/format.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/format.js +0 -0
- /package/dist/{compiler → engine/compiler}/from-mdast.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/language-codes.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/language-codes.js +0 -0
- /package/dist/{compiler → engine/compiler}/locales.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/public-file.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/public-file.js +0 -0
- /package/dist/{compiler → engine/compiler}/subformat-schema.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/terms.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/terms.js +0 -0
- /package/dist/{compiler → engine/compiler}/textfile-remote.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/textfile.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/theme-variants.d.ts +0 -0
- /package/dist/{compiler → engine/compiler}/zip.d.ts +0 -0
- /package/dist/{core → engine/core}/blocks.js +0 -0
- /package/dist/{core → engine/core}/code-file.d.ts +0 -0
- /package/dist/{core → engine/core}/code-file.js +0 -0
- /package/dist/{core → engine/core}/code-grammars.d.ts +0 -0
- /package/dist/{core → engine/core}/code-grammars.js +0 -0
- /package/dist/{core → engine/core}/content-types.js +0 -0
- /package/dist/{core → engine/core}/escape-html.d.ts +0 -0
- /package/dist/{core → engine/core}/escape-html.js +0 -0
- /package/dist/{core → engine/core}/extension-package.d.ts +0 -0
- /package/dist/{core → engine/core}/extension-package.js +0 -0
- /package/dist/{core → engine/core}/figure-frame.d.ts +0 -0
- /package/dist/{core → engine/core}/figure-frame.js +0 -0
- /package/dist/{core → engine/core}/file-embed.d.ts +0 -0
- /package/dist/{core → engine/core}/file-embed.js +0 -0
- /package/dist/{core → engine/core}/files.d.ts +0 -0
- /package/dist/{core → engine/core}/files.js +0 -0
- /package/dist/{core → engine/core}/graph-common.d.ts +0 -0
- /package/dist/{core → engine/core}/graph-common.js +0 -0
- /package/dist/{core → engine/core}/graph.d.ts +0 -0
- /package/dist/{core → engine/core}/graph.js +0 -0
- /package/dist/{core → engine/core}/inline.d.ts +0 -0
- /package/dist/{core → engine/core}/inline.js +0 -0
- /package/dist/{core → engine/core}/json-tools.d.ts +0 -0
- /package/dist/{core → engine/core}/json-tools.js +0 -0
- /package/dist/{core → engine/core}/language.d.ts +0 -0
- /package/dist/{core → engine/core}/language.js +0 -0
- /package/dist/{core → engine/core}/languages/ja.d.ts +0 -0
- /package/dist/{core → engine/core}/languages/ja.js +0 -0
- /package/dist/{core → engine/core}/markdown.d.ts +0 -0
- /package/dist/{core → engine/core}/markdown.js +0 -0
- /package/dist/{core → engine/core}/previewers.d.ts +0 -0
- /package/dist/{core → engine/core}/previewers.js +0 -0
- /package/dist/{core → engine/core}/schema-comments.d.ts +0 -0
- /package/dist/{core → engine/core}/schema-comments.js +0 -0
- /package/dist/{core → engine/core}/schema-fields.d.ts +0 -0
- /package/dist/{core → engine/core}/schema-fields.js +0 -0
- /package/dist/{core → engine/core}/schema-graph.d.ts +0 -0
- /package/dist/{core → engine/core}/schema-graph.js +0 -0
- /package/dist/{core → engine/core}/subformat-record.d.ts +0 -0
- /package/dist/{core → engine/core}/subformat-record.js +0 -0
- /package/dist/{core → engine/core}/term-reference.d.ts +0 -0
- /package/dist/{core → engine/core}/term-reference.js +0 -0
- /package/dist/{core → engine/core}/textfile.d.ts +0 -0
- /package/dist/{core → engine/core}/textfile.js +0 -0
- /package/dist/{core → engine/core}/theme-variants.d.ts +0 -0
- /package/dist/{core → engine/core}/theme-variants.js +0 -0
- /package/dist/{core → engine/core}/workspace.d.ts +0 -0
- /package/dist/{core → engine/core}/workspace.js +0 -0
- /package/dist/{viewer → frontend}/bundle-network.d.ts +0 -0
- /package/dist/{viewer → frontend}/bundle-network.js +0 -0
- /package/dist/{core → frontend}/flow-base-css.generated.d.ts +0 -0
- /package/dist/{core → frontend}/flow-base-css.generated.js +0 -0
- /package/dist/{core → frontend}/flow-css.d.ts +0 -0
- /package/dist/{core → frontend}/flow-css.js +0 -0
- /package/dist/{viewer → frontend}/font-picker.js +0 -0
- /package/dist/{viewer → frontend}/font-settings.js +0 -0
- /package/dist/{viewer → frontend}/i18n.d.ts +0 -0
- /package/dist/{viewer → frontend}/i18n.js +0 -0
- /package/dist/{viewer → frontend}/language-picker.d.ts +0 -0
- /package/dist/{viewer → frontend}/lazy-preview.d.ts +0 -0
- /package/dist/{viewer → frontend}/lazy-preview.js +0 -0
- /package/dist/{viewer → frontend}/nav-focus.d.ts +0 -0
- /package/dist/{viewer → frontend}/nav-update.d.ts +0 -0
- /package/dist/{viewer → frontend}/nav-update.js +0 -0
- /package/dist/{viewer → frontend}/plugin-blocks.d.ts +0 -0
- /package/dist/{viewer → frontend}/plugin-style.d.ts +0 -0
- /package/dist/{viewer → frontend}/plugin-style.js +0 -0
- /package/dist/{viewer → frontend}/plugin-view.d.ts +0 -0
- /package/dist/{viewer → frontend}/plugin-view.js +0 -0
- /package/dist/{viewer → frontend}/resize.d.ts +0 -0
- /package/dist/{core → frontend}/schema-graph-mount.d.ts +0 -0
- /package/dist/{core → frontend}/schema-graph-mount.js +0 -0
- /package/dist/{core → frontend}/table-ui.d.ts +0 -0
- /package/dist/{core → frontend}/table-ui.js +0 -0
- /package/dist/{core → frontend}/terms-ui.d.ts +0 -0
- /package/dist/{core → frontend}/terms-ui.js +0 -0
- /package/dist/{viewer → frontend}/theme-picker.d.ts +0 -0
- /package/dist/{viewer → frontend}/theme-picker.js +0 -0
- /package/dist/{core → frontend}/toc-ui.d.ts +0 -0
- /package/dist/{core → frontend}/toc-ui.js +0 -0
- /package/dist/{core → frontend}/video-ui.d.ts +0 -0
- /package/dist/{core → frontend}/video-ui.js +0 -0
- /package/dist/{viewer → server}/build-plugins.d.ts +0 -0
- /package/dist/{cli.d.ts → server/cli.d.ts} +0 -0
- /package/dist/{viewer → server}/extension-pack.d.ts +0 -0
- /package/dist/{viewer → server}/fonts/LICENSE.txt +0 -0
- /package/dist/{viewer → server}/fonts/udev-gothic-regular.woff2 +0 -0
- /package/dist/{viewer → server}/fonts.d.ts +0 -0
- /package/dist/{viewer → server}/fonts.js +0 -0
- /package/dist/{viewer → server}/ja-lint.js +0 -0
- /package/dist/{viewer → workspace}/git-types.js +0 -0
- /package/dist/{viewer → workspace}/site-icon.d.ts +0 -0
- /package/dist/{viewer → workspace}/site-title.d.ts +0 -0
package/dist/code.global.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
"use strict";(()=>{var Dl=Object.defineProperty;var ko=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var jr=(t,e)=>{for(var n in e)Dl(t,n,{get:e[n],enumerable:!0})};var Ll={};jr(Ll,{default:()=>dh});var dh,Bl=ko(()=>{dh=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#fff","activityBar.border":"#e1e4e8","activityBar.foreground":"#2f363d","activityBar.inactiveForeground":"#959da5","activityBarBadge.background":"#2188ff","activityBarBadge.foreground":"#fff","badge.background":"#dbedff","badge.foreground":"#005cc5","breadcrumb.activeSelectionForeground":"#586069","breadcrumb.focusForeground":"#2f363d","breadcrumb.foreground":"#6a737d","breadcrumbPicker.background":"#fafbfc","button.background":"#159739","button.foreground":"#fff","button.hoverBackground":"#138934","button.secondaryBackground":"#e1e4e8","button.secondaryForeground":"#1b1f23","button.secondaryHoverBackground":"#d1d5da","checkbox.background":"#fafbfc","checkbox.border":"#d1d5da","debugToolBar.background":"#fff","descriptionForeground":"#6a737d","diffEditor.insertedTextBackground":"#34d05822","diffEditor.removedTextBackground":"#d73a4922","dropdown.background":"#fafbfc","dropdown.border":"#e1e4e8","dropdown.foreground":"#2f363d","dropdown.listBackground":"#fff","editor.background":"#fff","editor.findMatchBackground":"#ffdf5d","editor.findMatchHighlightBackground":"#ffdf5d66","editor.focusedStackFrameHighlightBackground":"#28a74525","editor.foldBackground":"#d1d5da11","editor.foreground":"#24292e","editor.inactiveSelectionBackground":"#0366d611","editor.lineHighlightBackground":"#f6f8fa","editor.linkedEditingBackground":"#0366d611","editor.selectionBackground":"#0366d625","editor.selectionHighlightBackground":"#34d05840","editor.selectionHighlightBorder":"#34d05800","editor.stackFrameHighlightBackground":"#ffd33d33","editor.wordHighlightBackground":"#34d05800","editor.wordHighlightBorder":"#24943e99","editor.wordHighlightStrongBackground":"#34d05800","editor.wordHighlightStrongBorder":"#24943e50","editorBracketHighlight.foreground1":"#005cc5","editorBracketHighlight.foreground2":"#e36209","editorBracketHighlight.foreground3":"#5a32a3","editorBracketHighlight.foreground4":"#005cc5","editorBracketHighlight.foreground5":"#e36209","editorBracketHighlight.foreground6":"#5a32a3","editorBracketMatch.background":"#34d05840","editorBracketMatch.border":"#34d05800","editorCursor.foreground":"#044289","editorError.foreground":"#cb2431","editorGroup.border":"#e1e4e8","editorGroupHeader.tabsBackground":"#f6f8fa","editorGroupHeader.tabsBorder":"#e1e4e8","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#d73a49","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#d7dbe0","editorIndentGuide.background":"#eff2f6","editorLineNumber.activeForeground":"#24292e","editorLineNumber.foreground":"#1b1f234d","editorOverviewRuler.border":"#fff","editorWarning.foreground":"#f9c513","editorWhitespace.foreground":"#d1d5da","editorWidget.background":"#f6f8fa","errorForeground":"#cb2431","focusBorder":"#2188ff","foreground":"#444d56","gitDecoration.addedResourceForeground":"#28a745","gitDecoration.conflictingResourceForeground":"#e36209","gitDecoration.deletedResourceForeground":"#d73a49","gitDecoration.ignoredResourceForeground":"#959da5","gitDecoration.modifiedResourceForeground":"#005cc5","gitDecoration.submoduleResourceForeground":"#959da5","gitDecoration.untrackedResourceForeground":"#28a745","input.background":"#fafbfc","input.border":"#e1e4e8","input.foreground":"#2f363d","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#e2e5e9","list.activeSelectionForeground":"#2f363d","list.focusBackground":"#cce5ff","list.hoverBackground":"#ebf0f4","list.hoverForeground":"#2f363d","list.inactiveFocusBackground":"#dbedff","list.inactiveSelectionBackground":"#e8eaed","list.inactiveSelectionForeground":"#2f363d","notificationCenterHeader.background":"#e1e4e8","notificationCenterHeader.foreground":"#6a737d","notifications.background":"#fafbfc","notifications.border":"#e1e4e8","notifications.foreground":"#2f363d","notificationsErrorIcon.foreground":"#d73a49","notificationsInfoIcon.foreground":"#005cc5","notificationsWarningIcon.foreground":"#e36209","panel.background":"#f6f8fa","panel.border":"#e1e4e8","panelInput.border":"#e1e4e8","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#2f363d","panelTitle.inactiveForeground":"#6a737d","pickerGroup.border":"#e1e4e8","pickerGroup.foreground":"#2f363d","progressBar.background":"#2188ff","quickInput.background":"#fafbfc","quickInput.foreground":"#2f363d","scrollbar.shadow":"#6a737d33","scrollbarSlider.activeBackground":"#959da588","scrollbarSlider.background":"#959da533","scrollbarSlider.hoverBackground":"#959da544","settings.headerForeground":"#2f363d","settings.modifiedItemIndicator":"#2188ff","sideBar.background":"#f6f8fa","sideBar.border":"#e1e4e8","sideBar.foreground":"#586069","sideBarSectionHeader.background":"#f6f8fa","sideBarSectionHeader.border":"#e1e4e8","sideBarSectionHeader.foreground":"#2f363d","sideBarTitle.foreground":"#2f363d","statusBar.background":"#fff","statusBar.border":"#e1e4e8","statusBar.debuggingBackground":"#f9826c","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#586069","statusBar.noFolderBackground":"#fff","statusBarItem.prominentBackground":"#e8eaed","statusBarItem.remoteBackground":"#fff","statusBarItem.remoteForeground":"#586069","tab.activeBackground":"#fff","tab.activeBorder":"#fff","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#2f363d","tab.border":"#e1e4e8","tab.hoverBackground":"#fff","tab.inactiveBackground":"#f6f8fa","tab.inactiveForeground":"#6a737d","tab.unfocusedActiveBorder":"#fff","tab.unfocusedActiveBorderTop":"#e1e4e8","tab.unfocusedHoverBackground":"#fff","terminal.ansiBlack":"#24292e","terminal.ansiBlue":"#0366d6","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#005cc5","terminal.ansiBrightCyan":"#3192aa","terminal.ansiBrightGreen":"#22863a","terminal.ansiBrightMagenta":"#5a32a3","terminal.ansiBrightRed":"#cb2431","terminal.ansiBrightWhite":"#d1d5da","terminal.ansiBrightYellow":"#b08800","terminal.ansiCyan":"#1b7c83","terminal.ansiGreen":"#28a745","terminal.ansiMagenta":"#5a32a3","terminal.ansiRed":"#d73a49","terminal.ansiWhite":"#6a737d","terminal.ansiYellow":"#dbab09","terminal.foreground":"#586069","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#d1d5da","terminalCursor.foreground":"#005cc5","textBlockQuote.background":"#fafbfc","textBlockQuote.border":"#e1e4e8","textCodeBlock.background":"#f6f8fa","textLink.activeForeground":"#005cc5","textLink.foreground":"#0366d6","textPreformat.foreground":"#586069","textSeparator.foreground":"#d1d5da","titleBar.activeBackground":"#fff","titleBar.activeForeground":"#2f363d","titleBar.border":"#e1e4e8","titleBar.inactiveBackground":"#f6f8fa","titleBar.inactiveForeground":"#6a737d","tree.indentGuidesStroke":"#e1e4e8","welcomePage.buttonBackground":"#f6f8fa","welcomePage.buttonHoverBackground":"#e1e4e8"},"displayName":"GitHub Light","name":"github-light","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#005cc5"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#6f42c1"}},{"scope":"variable.parameter.function","settings":{"foreground":"#24292e"}},{"scope":"entity.name.tag","settings":{"foreground":"#22863a"}},{"scope":"keyword","settings":{"foreground":"#d73a49"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#d73a49"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#24292e"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#032f62"}},{"scope":"support","settings":{"foreground":"#005cc5"}},{"scope":"meta.property-name","settings":{"foreground":"#005cc5"}},{"scope":"variable","settings":{"foreground":"#e36209"}},{"scope":"variable.other","settings":{"foreground":"#24292e"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"carriage-return","settings":{"background":"#d73a49","content":"^M","fontStyle":"italic underline","foreground":"#fafbfc"}},{"scope":"message.error","settings":{"foreground":"#b31d28"}},{"scope":"string variable","settings":{"foreground":"#005cc5"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#032f62"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#032f62"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#22863a"}},{"scope":"support.constant","settings":{"foreground":"#005cc5"}},{"scope":"support.variable","settings":{"foreground":"#005cc5"}},{"scope":"meta.module-reference","settings":{"foreground":"#005cc5"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#e36209"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"markup.quote","settings":{"foreground":"#22863a"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#24292e"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#24292e"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#005cc5"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#ffeef0","foreground":"#b31d28"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#f0fff4","foreground":"#22863a"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#ffebda","foreground":"#e36209"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#005cc5","foreground":"#f6f8fa"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#6f42c1"}},{"scope":"meta.diff.header","settings":{"foreground":"#005cc5"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"meta.output","settings":{"foreground":"#005cc5"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#586069"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#b31d28"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#032f62"}}],"type":"light"}'))});var Rl={};jr(Rl,{default:()=>hh});var hh,Ol=ko(()=>{hh=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#24292e","activityBar.border":"#1b1f23","activityBar.foreground":"#e1e4e8","activityBar.inactiveForeground":"#6a737d","activityBarBadge.background":"#0366d6","activityBarBadge.foreground":"#fff","badge.background":"#044289","badge.foreground":"#c8e1ff","breadcrumb.activeSelectionForeground":"#d1d5da","breadcrumb.focusForeground":"#e1e4e8","breadcrumb.foreground":"#959da5","breadcrumbPicker.background":"#2b3036","button.background":"#176f2c","button.foreground":"#dcffe4","button.hoverBackground":"#22863a","button.secondaryBackground":"#444d56","button.secondaryForeground":"#fff","button.secondaryHoverBackground":"#586069","checkbox.background":"#444d56","checkbox.border":"#1b1f23","debugToolBar.background":"#2b3036","descriptionForeground":"#959da5","diffEditor.insertedTextBackground":"#28a74530","diffEditor.removedTextBackground":"#d73a4930","dropdown.background":"#2f363d","dropdown.border":"#1b1f23","dropdown.foreground":"#e1e4e8","dropdown.listBackground":"#24292e","editor.background":"#24292e","editor.findMatchBackground":"#ffd33d44","editor.findMatchHighlightBackground":"#ffd33d22","editor.focusedStackFrameHighlightBackground":"#2b6a3033","editor.foldBackground":"#58606915","editor.foreground":"#e1e4e8","editor.inactiveSelectionBackground":"#3392FF22","editor.lineHighlightBackground":"#2b3036","editor.linkedEditingBackground":"#3392FF22","editor.selectionBackground":"#3392FF44","editor.selectionHighlightBackground":"#17E5E633","editor.selectionHighlightBorder":"#17E5E600","editor.stackFrameHighlightBackground":"#C6902625","editor.wordHighlightBackground":"#17E5E600","editor.wordHighlightBorder":"#17E5E699","editor.wordHighlightStrongBackground":"#17E5E600","editor.wordHighlightStrongBorder":"#17E5E666","editorBracketHighlight.foreground1":"#79b8ff","editorBracketHighlight.foreground2":"#ffab70","editorBracketHighlight.foreground3":"#b392f0","editorBracketHighlight.foreground4":"#79b8ff","editorBracketHighlight.foreground5":"#ffab70","editorBracketHighlight.foreground6":"#b392f0","editorBracketMatch.background":"#17E5E650","editorBracketMatch.border":"#17E5E600","editorCursor.foreground":"#c8e1ff","editorError.foreground":"#f97583","editorGroup.border":"#1b1f23","editorGroupHeader.tabsBackground":"#1f2428","editorGroupHeader.tabsBorder":"#1b1f23","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#ea4a5a","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#444d56","editorIndentGuide.background":"#2f363d","editorLineNumber.activeForeground":"#e1e4e8","editorLineNumber.foreground":"#444d56","editorOverviewRuler.border":"#1b1f23","editorWarning.foreground":"#ffea7f","editorWhitespace.foreground":"#444d56","editorWidget.background":"#1f2428","errorForeground":"#f97583","focusBorder":"#005cc5","foreground":"#d1d5da","gitDecoration.addedResourceForeground":"#34d058","gitDecoration.conflictingResourceForeground":"#ffab70","gitDecoration.deletedResourceForeground":"#ea4a5a","gitDecoration.ignoredResourceForeground":"#6a737d","gitDecoration.modifiedResourceForeground":"#79b8ff","gitDecoration.submoduleResourceForeground":"#6a737d","gitDecoration.untrackedResourceForeground":"#34d058","input.background":"#2f363d","input.border":"#1b1f23","input.foreground":"#e1e4e8","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#39414a","list.activeSelectionForeground":"#e1e4e8","list.focusBackground":"#044289","list.hoverBackground":"#282e34","list.hoverForeground":"#e1e4e8","list.inactiveFocusBackground":"#1d2d3e","list.inactiveSelectionBackground":"#282e34","list.inactiveSelectionForeground":"#e1e4e8","notificationCenterHeader.background":"#24292e","notificationCenterHeader.foreground":"#959da5","notifications.background":"#2f363d","notifications.border":"#1b1f23","notifications.foreground":"#e1e4e8","notificationsErrorIcon.foreground":"#ea4a5a","notificationsInfoIcon.foreground":"#79b8ff","notificationsWarningIcon.foreground":"#ffab70","panel.background":"#1f2428","panel.border":"#1b1f23","panelInput.border":"#2f363d","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#e1e4e8","panelTitle.inactiveForeground":"#959da5","peekViewEditor.background":"#1f242888","peekViewEditor.matchHighlightBackground":"#ffd33d33","peekViewResult.background":"#1f2428","peekViewResult.matchHighlightBackground":"#ffd33d33","pickerGroup.border":"#444d56","pickerGroup.foreground":"#e1e4e8","progressBar.background":"#0366d6","quickInput.background":"#24292e","quickInput.foreground":"#e1e4e8","scrollbar.shadow":"#0008","scrollbarSlider.activeBackground":"#6a737d88","scrollbarSlider.background":"#6a737d33","scrollbarSlider.hoverBackground":"#6a737d44","settings.headerForeground":"#e1e4e8","settings.modifiedItemIndicator":"#0366d6","sideBar.background":"#1f2428","sideBar.border":"#1b1f23","sideBar.foreground":"#d1d5da","sideBarSectionHeader.background":"#1f2428","sideBarSectionHeader.border":"#1b1f23","sideBarSectionHeader.foreground":"#e1e4e8","sideBarTitle.foreground":"#e1e4e8","statusBar.background":"#24292e","statusBar.border":"#1b1f23","statusBar.debuggingBackground":"#931c06","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#d1d5da","statusBar.noFolderBackground":"#24292e","statusBarItem.prominentBackground":"#282e34","statusBarItem.remoteBackground":"#24292e","statusBarItem.remoteForeground":"#d1d5da","tab.activeBackground":"#24292e","tab.activeBorder":"#24292e","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#e1e4e8","tab.border":"#1b1f23","tab.hoverBackground":"#24292e","tab.inactiveBackground":"#1f2428","tab.inactiveForeground":"#959da5","tab.unfocusedActiveBorder":"#24292e","tab.unfocusedActiveBorderTop":"#1b1f23","tab.unfocusedHoverBackground":"#24292e","terminal.ansiBlack":"#586069","terminal.ansiBlue":"#2188ff","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#79b8ff","terminal.ansiBrightCyan":"#56d4dd","terminal.ansiBrightGreen":"#85e89d","terminal.ansiBrightMagenta":"#b392f0","terminal.ansiBrightRed":"#f97583","terminal.ansiBrightWhite":"#fafbfc","terminal.ansiBrightYellow":"#ffea7f","terminal.ansiCyan":"#39c5cf","terminal.ansiGreen":"#34d058","terminal.ansiMagenta":"#b392f0","terminal.ansiRed":"#ea4a5a","terminal.ansiWhite":"#d1d5da","terminal.ansiYellow":"#ffea7f","terminal.foreground":"#d1d5da","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#586069","terminalCursor.foreground":"#79b8ff","textBlockQuote.background":"#24292e","textBlockQuote.border":"#444d56","textCodeBlock.background":"#2f363d","textLink.activeForeground":"#c8e1ff","textLink.foreground":"#79b8ff","textPreformat.foreground":"#d1d5da","textSeparator.foreground":"#586069","titleBar.activeBackground":"#24292e","titleBar.activeForeground":"#e1e4e8","titleBar.border":"#1b1f23","titleBar.inactiveBackground":"#1f2428","titleBar.inactiveForeground":"#959da5","tree.indentGuidesStroke":"#2f363d","welcomePage.buttonBackground":"#2f363d","welcomePage.buttonHoverBackground":"#444d56"},"displayName":"GitHub Dark","name":"github-dark","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#79b8ff"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#b392f0"}},{"scope":"variable.parameter.function","settings":{"foreground":"#e1e4e8"}},{"scope":"entity.name.tag","settings":{"foreground":"#85e89d"}},{"scope":"keyword","settings":{"foreground":"#f97583"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#f97583"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#e1e4e8"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#9ecbff"}},{"scope":"support","settings":{"foreground":"#79b8ff"}},{"scope":"meta.property-name","settings":{"foreground":"#79b8ff"}},{"scope":"variable","settings":{"foreground":"#ffab70"}},{"scope":"variable.other","settings":{"foreground":"#e1e4e8"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"carriage-return","settings":{"background":"#f97583","content":"^M","fontStyle":"italic underline","foreground":"#24292e"}},{"scope":"message.error","settings":{"foreground":"#fdaeb7"}},{"scope":"string variable","settings":{"foreground":"#79b8ff"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#dbedff"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#dbedff"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#85e89d"}},{"scope":"support.constant","settings":{"foreground":"#79b8ff"}},{"scope":"support.variable","settings":{"foreground":"#79b8ff"}},{"scope":"meta.module-reference","settings":{"foreground":"#79b8ff"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#ffab70"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"markup.quote","settings":{"foreground":"#85e89d"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#e1e4e8"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#e1e4e8"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#79b8ff"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#86181d","foreground":"#fdaeb7"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#144620","foreground":"#85e89d"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#c24e00","foreground":"#ffab70"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#79b8ff","foreground":"#2f363d"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#b392f0"}},{"scope":"meta.diff.header","settings":{"foreground":"#79b8ff"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"meta.output","settings":{"foreground":"#79b8ff"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#d1d5da"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#fdaeb7"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#dbedff"}}],"type":"dark"}'))});var Sn=Symbol.for("yaml.alias"),Cn=Symbol.for("yaml.document"),ce=Symbol.for("yaml.map"),Ur=Symbol.for("yaml.pair"),ee=Symbol.for("yaml.scalar"),Ne=Symbol.for("yaml.seq"),Y=Symbol.for("yaml.node.type"),ue=t=>!!t&&typeof t=="object"&&t[Y]===Sn,be=t=>!!t&&typeof t=="object"&&t[Y]===Cn,fe=t=>!!t&&typeof t=="object"&&t[Y]===ce,L=t=>!!t&&typeof t=="object"&&t[Y]===Ur,I=t=>!!t&&typeof t=="object"&&t[Y]===ee,te=t=>!!t&&typeof t=="object"&&t[Y]===Ne;function B(t){if(t&&typeof t=="object")switch(t[Y]){case ce:case Ne:return!0}return!1}function T(t){if(t&&typeof t=="object")switch(t[Y]){case Sn:case ce:case ee:case Ne:return!0}return!1}var _n=t=>(I(t)||B(t))&&!!t.anchor;var Q=Symbol("break visit"),So=Symbol("skip children"),we=Symbol("remove node");function se(t,e){let n=Co(e);be(t)?ft(null,t.contents,n,Object.freeze([t]))===we&&(t.contents=null):ft(null,t,n,Object.freeze([]))}se.BREAK=Q;se.SKIP=So;se.REMOVE=we;function ft(t,e,n,r){let s=_o(t,e,n,r);if(T(s)||L(s))return vo(t,r,s),ft(t,s,n,r);if(typeof s!="symbol"){if(B(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){let i=ft(o,e.items[o],n,r);if(typeof i=="number")o=i-1;else{if(i===Q)return Q;i===we&&(e.items.splice(o,1),o-=1)}}}else if(L(e)){r=Object.freeze(r.concat(e));let o=ft("key",e.key,n,r);if(o===Q)return Q;o===we&&(e.key=null);let i=ft("value",e.value,n,r);if(i===Q)return Q;i===we&&(e.value=null)}}return s}async function vn(t,e){let n=Co(e);be(t)?await dt(null,t.contents,n,Object.freeze([t]))===we&&(t.contents=null):await dt(null,t,n,Object.freeze([]))}vn.BREAK=Q;vn.SKIP=So;vn.REMOVE=we;async function dt(t,e,n,r){let s=await _o(t,e,n,r);if(T(s)||L(s))return vo(t,r,s),dt(t,s,n,r);if(typeof s!="symbol"){if(B(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){let i=await dt(o,e.items[o],n,r);if(typeof i=="number")o=i-1;else{if(i===Q)return Q;i===we&&(e.items.splice(o,1),o-=1)}}}else if(L(e)){r=Object.freeze(r.concat(e));let o=await dt("key",e.key,n,r);if(o===Q)return Q;o===we&&(e.key=null);let i=await dt("value",e.value,n,r);if(i===Q)return Q;i===we&&(e.value=null)}}return s}function Co(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function _o(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(fe(e))return n.Map?.(t,e,r);if(te(e))return n.Seq?.(t,e,r);if(L(e))return n.Pair?.(t,e,r);if(I(e))return n.Scalar?.(t,e,r);if(ue(e))return n.Alias?.(t,e,r)}function vo(t,e,n){let r=e[e.length-1];if(B(r))r.items[t]=n;else if(L(r))t==="key"?r.key=n:r.value=n;else if(be(r))r.contents=n;else{let s=ue(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}var Gl={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},jl=t=>t.replace(/[!,[\]{}]/g,e=>Gl[e]),ke=class t{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,n)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[o,i]=r;return this.tags[o]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let i=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,i),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let i=e.slice(2,-1);return i==="!"||i==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),i)}let[,r,s]=e.match(/^(.*!)([^!]*)$/s);s||n(`The ${e} tag has no suffix`);let o=this.tags[r];if(o)try{return o+decodeURIComponent(s)}catch(i){return n(String(i)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+jl(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),s;if(e&&r.length>0&&T(e.contents)){let o={};se(e.contents,(i,a)=>{T(a)&&a.tag&&(o[a.tag]=!0)}),s=Object.keys(o)}else s=[];for(let[o,i]of r)o==="!!"&&i==="tag:yaml.org,2002:"||(!e||s.some(a=>a.startsWith(i)))&&n.push(`%TAG ${o} ${i}`);return n.join(`
|
|
2
|
-
`)}};ke.defaultYaml={explicit:!1,version:"1.2"};ke.defaultTags={"!!":"tag:yaml.org,2002:"};function
|
|
1
|
+
"use strict";(()=>{var jl=Object.defineProperty;var Co=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Ur=(t,e)=>{for(var n in e)jl(t,n,{get:e[n],enumerable:!0})};var Ol={};Ur(Ol,{default:()=>gh});var gh,Pl=Co(()=>{gh=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#fff","activityBar.border":"#e1e4e8","activityBar.foreground":"#2f363d","activityBar.inactiveForeground":"#959da5","activityBarBadge.background":"#2188ff","activityBarBadge.foreground":"#fff","badge.background":"#dbedff","badge.foreground":"#005cc5","breadcrumb.activeSelectionForeground":"#586069","breadcrumb.focusForeground":"#2f363d","breadcrumb.foreground":"#6a737d","breadcrumbPicker.background":"#fafbfc","button.background":"#159739","button.foreground":"#fff","button.hoverBackground":"#138934","button.secondaryBackground":"#e1e4e8","button.secondaryForeground":"#1b1f23","button.secondaryHoverBackground":"#d1d5da","checkbox.background":"#fafbfc","checkbox.border":"#d1d5da","debugToolBar.background":"#fff","descriptionForeground":"#6a737d","diffEditor.insertedTextBackground":"#34d05822","diffEditor.removedTextBackground":"#d73a4922","dropdown.background":"#fafbfc","dropdown.border":"#e1e4e8","dropdown.foreground":"#2f363d","dropdown.listBackground":"#fff","editor.background":"#fff","editor.findMatchBackground":"#ffdf5d","editor.findMatchHighlightBackground":"#ffdf5d66","editor.focusedStackFrameHighlightBackground":"#28a74525","editor.foldBackground":"#d1d5da11","editor.foreground":"#24292e","editor.inactiveSelectionBackground":"#0366d611","editor.lineHighlightBackground":"#f6f8fa","editor.linkedEditingBackground":"#0366d611","editor.selectionBackground":"#0366d625","editor.selectionHighlightBackground":"#34d05840","editor.selectionHighlightBorder":"#34d05800","editor.stackFrameHighlightBackground":"#ffd33d33","editor.wordHighlightBackground":"#34d05800","editor.wordHighlightBorder":"#24943e99","editor.wordHighlightStrongBackground":"#34d05800","editor.wordHighlightStrongBorder":"#24943e50","editorBracketHighlight.foreground1":"#005cc5","editorBracketHighlight.foreground2":"#e36209","editorBracketHighlight.foreground3":"#5a32a3","editorBracketHighlight.foreground4":"#005cc5","editorBracketHighlight.foreground5":"#e36209","editorBracketHighlight.foreground6":"#5a32a3","editorBracketMatch.background":"#34d05840","editorBracketMatch.border":"#34d05800","editorCursor.foreground":"#044289","editorError.foreground":"#cb2431","editorGroup.border":"#e1e4e8","editorGroupHeader.tabsBackground":"#f6f8fa","editorGroupHeader.tabsBorder":"#e1e4e8","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#d73a49","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#d7dbe0","editorIndentGuide.background":"#eff2f6","editorLineNumber.activeForeground":"#24292e","editorLineNumber.foreground":"#1b1f234d","editorOverviewRuler.border":"#fff","editorWarning.foreground":"#f9c513","editorWhitespace.foreground":"#d1d5da","editorWidget.background":"#f6f8fa","errorForeground":"#cb2431","focusBorder":"#2188ff","foreground":"#444d56","gitDecoration.addedResourceForeground":"#28a745","gitDecoration.conflictingResourceForeground":"#e36209","gitDecoration.deletedResourceForeground":"#d73a49","gitDecoration.ignoredResourceForeground":"#959da5","gitDecoration.modifiedResourceForeground":"#005cc5","gitDecoration.submoduleResourceForeground":"#959da5","gitDecoration.untrackedResourceForeground":"#28a745","input.background":"#fafbfc","input.border":"#e1e4e8","input.foreground":"#2f363d","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#e2e5e9","list.activeSelectionForeground":"#2f363d","list.focusBackground":"#cce5ff","list.hoverBackground":"#ebf0f4","list.hoverForeground":"#2f363d","list.inactiveFocusBackground":"#dbedff","list.inactiveSelectionBackground":"#e8eaed","list.inactiveSelectionForeground":"#2f363d","notificationCenterHeader.background":"#e1e4e8","notificationCenterHeader.foreground":"#6a737d","notifications.background":"#fafbfc","notifications.border":"#e1e4e8","notifications.foreground":"#2f363d","notificationsErrorIcon.foreground":"#d73a49","notificationsInfoIcon.foreground":"#005cc5","notificationsWarningIcon.foreground":"#e36209","panel.background":"#f6f8fa","panel.border":"#e1e4e8","panelInput.border":"#e1e4e8","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#2f363d","panelTitle.inactiveForeground":"#6a737d","pickerGroup.border":"#e1e4e8","pickerGroup.foreground":"#2f363d","progressBar.background":"#2188ff","quickInput.background":"#fafbfc","quickInput.foreground":"#2f363d","scrollbar.shadow":"#6a737d33","scrollbarSlider.activeBackground":"#959da588","scrollbarSlider.background":"#959da533","scrollbarSlider.hoverBackground":"#959da544","settings.headerForeground":"#2f363d","settings.modifiedItemIndicator":"#2188ff","sideBar.background":"#f6f8fa","sideBar.border":"#e1e4e8","sideBar.foreground":"#586069","sideBarSectionHeader.background":"#f6f8fa","sideBarSectionHeader.border":"#e1e4e8","sideBarSectionHeader.foreground":"#2f363d","sideBarTitle.foreground":"#2f363d","statusBar.background":"#fff","statusBar.border":"#e1e4e8","statusBar.debuggingBackground":"#f9826c","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#586069","statusBar.noFolderBackground":"#fff","statusBarItem.prominentBackground":"#e8eaed","statusBarItem.remoteBackground":"#fff","statusBarItem.remoteForeground":"#586069","tab.activeBackground":"#fff","tab.activeBorder":"#fff","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#2f363d","tab.border":"#e1e4e8","tab.hoverBackground":"#fff","tab.inactiveBackground":"#f6f8fa","tab.inactiveForeground":"#6a737d","tab.unfocusedActiveBorder":"#fff","tab.unfocusedActiveBorderTop":"#e1e4e8","tab.unfocusedHoverBackground":"#fff","terminal.ansiBlack":"#24292e","terminal.ansiBlue":"#0366d6","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#005cc5","terminal.ansiBrightCyan":"#3192aa","terminal.ansiBrightGreen":"#22863a","terminal.ansiBrightMagenta":"#5a32a3","terminal.ansiBrightRed":"#cb2431","terminal.ansiBrightWhite":"#d1d5da","terminal.ansiBrightYellow":"#b08800","terminal.ansiCyan":"#1b7c83","terminal.ansiGreen":"#28a745","terminal.ansiMagenta":"#5a32a3","terminal.ansiRed":"#d73a49","terminal.ansiWhite":"#6a737d","terminal.ansiYellow":"#dbab09","terminal.foreground":"#586069","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#d1d5da","terminalCursor.foreground":"#005cc5","textBlockQuote.background":"#fafbfc","textBlockQuote.border":"#e1e4e8","textCodeBlock.background":"#f6f8fa","textLink.activeForeground":"#005cc5","textLink.foreground":"#0366d6","textPreformat.foreground":"#586069","textSeparator.foreground":"#d1d5da","titleBar.activeBackground":"#fff","titleBar.activeForeground":"#2f363d","titleBar.border":"#e1e4e8","titleBar.inactiveBackground":"#f6f8fa","titleBar.inactiveForeground":"#6a737d","tree.indentGuidesStroke":"#e1e4e8","welcomePage.buttonBackground":"#f6f8fa","welcomePage.buttonHoverBackground":"#e1e4e8"},"displayName":"GitHub Light","name":"github-light","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#005cc5"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#6f42c1"}},{"scope":"variable.parameter.function","settings":{"foreground":"#24292e"}},{"scope":"entity.name.tag","settings":{"foreground":"#22863a"}},{"scope":"keyword","settings":{"foreground":"#d73a49"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#d73a49"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#24292e"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#032f62"}},{"scope":"support","settings":{"foreground":"#005cc5"}},{"scope":"meta.property-name","settings":{"foreground":"#005cc5"}},{"scope":"variable","settings":{"foreground":"#e36209"}},{"scope":"variable.other","settings":{"foreground":"#24292e"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"carriage-return","settings":{"background":"#d73a49","content":"^M","fontStyle":"italic underline","foreground":"#fafbfc"}},{"scope":"message.error","settings":{"foreground":"#b31d28"}},{"scope":"string variable","settings":{"foreground":"#005cc5"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#032f62"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#032f62"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#22863a"}},{"scope":"support.constant","settings":{"foreground":"#005cc5"}},{"scope":"support.variable","settings":{"foreground":"#005cc5"}},{"scope":"meta.module-reference","settings":{"foreground":"#005cc5"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#e36209"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"markup.quote","settings":{"foreground":"#22863a"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#24292e"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#24292e"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#005cc5"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#ffeef0","foreground":"#b31d28"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#f0fff4","foreground":"#22863a"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#ffebda","foreground":"#e36209"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#005cc5","foreground":"#f6f8fa"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#6f42c1"}},{"scope":"meta.diff.header","settings":{"foreground":"#005cc5"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"meta.output","settings":{"foreground":"#005cc5"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#586069"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#b31d28"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#032f62"}}],"type":"light"}'))});var Ml={};Ur(Ml,{default:()=>mh});var mh,$l=Co(()=>{mh=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#24292e","activityBar.border":"#1b1f23","activityBar.foreground":"#e1e4e8","activityBar.inactiveForeground":"#6a737d","activityBarBadge.background":"#0366d6","activityBarBadge.foreground":"#fff","badge.background":"#044289","badge.foreground":"#c8e1ff","breadcrumb.activeSelectionForeground":"#d1d5da","breadcrumb.focusForeground":"#e1e4e8","breadcrumb.foreground":"#959da5","breadcrumbPicker.background":"#2b3036","button.background":"#176f2c","button.foreground":"#dcffe4","button.hoverBackground":"#22863a","button.secondaryBackground":"#444d56","button.secondaryForeground":"#fff","button.secondaryHoverBackground":"#586069","checkbox.background":"#444d56","checkbox.border":"#1b1f23","debugToolBar.background":"#2b3036","descriptionForeground":"#959da5","diffEditor.insertedTextBackground":"#28a74530","diffEditor.removedTextBackground":"#d73a4930","dropdown.background":"#2f363d","dropdown.border":"#1b1f23","dropdown.foreground":"#e1e4e8","dropdown.listBackground":"#24292e","editor.background":"#24292e","editor.findMatchBackground":"#ffd33d44","editor.findMatchHighlightBackground":"#ffd33d22","editor.focusedStackFrameHighlightBackground":"#2b6a3033","editor.foldBackground":"#58606915","editor.foreground":"#e1e4e8","editor.inactiveSelectionBackground":"#3392FF22","editor.lineHighlightBackground":"#2b3036","editor.linkedEditingBackground":"#3392FF22","editor.selectionBackground":"#3392FF44","editor.selectionHighlightBackground":"#17E5E633","editor.selectionHighlightBorder":"#17E5E600","editor.stackFrameHighlightBackground":"#C6902625","editor.wordHighlightBackground":"#17E5E600","editor.wordHighlightBorder":"#17E5E699","editor.wordHighlightStrongBackground":"#17E5E600","editor.wordHighlightStrongBorder":"#17E5E666","editorBracketHighlight.foreground1":"#79b8ff","editorBracketHighlight.foreground2":"#ffab70","editorBracketHighlight.foreground3":"#b392f0","editorBracketHighlight.foreground4":"#79b8ff","editorBracketHighlight.foreground5":"#ffab70","editorBracketHighlight.foreground6":"#b392f0","editorBracketMatch.background":"#17E5E650","editorBracketMatch.border":"#17E5E600","editorCursor.foreground":"#c8e1ff","editorError.foreground":"#f97583","editorGroup.border":"#1b1f23","editorGroupHeader.tabsBackground":"#1f2428","editorGroupHeader.tabsBorder":"#1b1f23","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#ea4a5a","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#444d56","editorIndentGuide.background":"#2f363d","editorLineNumber.activeForeground":"#e1e4e8","editorLineNumber.foreground":"#444d56","editorOverviewRuler.border":"#1b1f23","editorWarning.foreground":"#ffea7f","editorWhitespace.foreground":"#444d56","editorWidget.background":"#1f2428","errorForeground":"#f97583","focusBorder":"#005cc5","foreground":"#d1d5da","gitDecoration.addedResourceForeground":"#34d058","gitDecoration.conflictingResourceForeground":"#ffab70","gitDecoration.deletedResourceForeground":"#ea4a5a","gitDecoration.ignoredResourceForeground":"#6a737d","gitDecoration.modifiedResourceForeground":"#79b8ff","gitDecoration.submoduleResourceForeground":"#6a737d","gitDecoration.untrackedResourceForeground":"#34d058","input.background":"#2f363d","input.border":"#1b1f23","input.foreground":"#e1e4e8","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#39414a","list.activeSelectionForeground":"#e1e4e8","list.focusBackground":"#044289","list.hoverBackground":"#282e34","list.hoverForeground":"#e1e4e8","list.inactiveFocusBackground":"#1d2d3e","list.inactiveSelectionBackground":"#282e34","list.inactiveSelectionForeground":"#e1e4e8","notificationCenterHeader.background":"#24292e","notificationCenterHeader.foreground":"#959da5","notifications.background":"#2f363d","notifications.border":"#1b1f23","notifications.foreground":"#e1e4e8","notificationsErrorIcon.foreground":"#ea4a5a","notificationsInfoIcon.foreground":"#79b8ff","notificationsWarningIcon.foreground":"#ffab70","panel.background":"#1f2428","panel.border":"#1b1f23","panelInput.border":"#2f363d","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#e1e4e8","panelTitle.inactiveForeground":"#959da5","peekViewEditor.background":"#1f242888","peekViewEditor.matchHighlightBackground":"#ffd33d33","peekViewResult.background":"#1f2428","peekViewResult.matchHighlightBackground":"#ffd33d33","pickerGroup.border":"#444d56","pickerGroup.foreground":"#e1e4e8","progressBar.background":"#0366d6","quickInput.background":"#24292e","quickInput.foreground":"#e1e4e8","scrollbar.shadow":"#0008","scrollbarSlider.activeBackground":"#6a737d88","scrollbarSlider.background":"#6a737d33","scrollbarSlider.hoverBackground":"#6a737d44","settings.headerForeground":"#e1e4e8","settings.modifiedItemIndicator":"#0366d6","sideBar.background":"#1f2428","sideBar.border":"#1b1f23","sideBar.foreground":"#d1d5da","sideBarSectionHeader.background":"#1f2428","sideBarSectionHeader.border":"#1b1f23","sideBarSectionHeader.foreground":"#e1e4e8","sideBarTitle.foreground":"#e1e4e8","statusBar.background":"#24292e","statusBar.border":"#1b1f23","statusBar.debuggingBackground":"#931c06","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#d1d5da","statusBar.noFolderBackground":"#24292e","statusBarItem.prominentBackground":"#282e34","statusBarItem.remoteBackground":"#24292e","statusBarItem.remoteForeground":"#d1d5da","tab.activeBackground":"#24292e","tab.activeBorder":"#24292e","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#e1e4e8","tab.border":"#1b1f23","tab.hoverBackground":"#24292e","tab.inactiveBackground":"#1f2428","tab.inactiveForeground":"#959da5","tab.unfocusedActiveBorder":"#24292e","tab.unfocusedActiveBorderTop":"#1b1f23","tab.unfocusedHoverBackground":"#24292e","terminal.ansiBlack":"#586069","terminal.ansiBlue":"#2188ff","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#79b8ff","terminal.ansiBrightCyan":"#56d4dd","terminal.ansiBrightGreen":"#85e89d","terminal.ansiBrightMagenta":"#b392f0","terminal.ansiBrightRed":"#f97583","terminal.ansiBrightWhite":"#fafbfc","terminal.ansiBrightYellow":"#ffea7f","terminal.ansiCyan":"#39c5cf","terminal.ansiGreen":"#34d058","terminal.ansiMagenta":"#b392f0","terminal.ansiRed":"#ea4a5a","terminal.ansiWhite":"#d1d5da","terminal.ansiYellow":"#ffea7f","terminal.foreground":"#d1d5da","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#586069","terminalCursor.foreground":"#79b8ff","textBlockQuote.background":"#24292e","textBlockQuote.border":"#444d56","textCodeBlock.background":"#2f363d","textLink.activeForeground":"#c8e1ff","textLink.foreground":"#79b8ff","textPreformat.foreground":"#d1d5da","textSeparator.foreground":"#586069","titleBar.activeBackground":"#24292e","titleBar.activeForeground":"#e1e4e8","titleBar.border":"#1b1f23","titleBar.inactiveBackground":"#1f2428","titleBar.inactiveForeground":"#959da5","tree.indentGuidesStroke":"#2f363d","welcomePage.buttonBackground":"#2f363d","welcomePage.buttonHoverBackground":"#444d56"},"displayName":"GitHub Dark","name":"github-dark","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#79b8ff"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#b392f0"}},{"scope":"variable.parameter.function","settings":{"foreground":"#e1e4e8"}},{"scope":"entity.name.tag","settings":{"foreground":"#85e89d"}},{"scope":"keyword","settings":{"foreground":"#f97583"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#f97583"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#e1e4e8"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#9ecbff"}},{"scope":"support","settings":{"foreground":"#79b8ff"}},{"scope":"meta.property-name","settings":{"foreground":"#79b8ff"}},{"scope":"variable","settings":{"foreground":"#ffab70"}},{"scope":"variable.other","settings":{"foreground":"#e1e4e8"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"carriage-return","settings":{"background":"#f97583","content":"^M","fontStyle":"italic underline","foreground":"#24292e"}},{"scope":"message.error","settings":{"foreground":"#fdaeb7"}},{"scope":"string variable","settings":{"foreground":"#79b8ff"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#dbedff"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#dbedff"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#85e89d"}},{"scope":"support.constant","settings":{"foreground":"#79b8ff"}},{"scope":"support.variable","settings":{"foreground":"#79b8ff"}},{"scope":"meta.module-reference","settings":{"foreground":"#79b8ff"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#ffab70"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"markup.quote","settings":{"foreground":"#85e89d"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#e1e4e8"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#e1e4e8"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#79b8ff"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#86181d","foreground":"#fdaeb7"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#144620","foreground":"#85e89d"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#c24e00","foreground":"#ffab70"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#79b8ff","foreground":"#2f363d"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#b392f0"}},{"scope":"meta.diff.header","settings":{"foreground":"#79b8ff"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"meta.output","settings":{"foreground":"#79b8ff"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#d1d5da"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#fdaeb7"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#dbedff"}}],"type":"dark"}'))});var Ul=()=>globalThis.__doocConnections??={active:"local",items:new Map},ft=()=>Ul().active;function _o(t,e,n){let r=globalThis.__doocConnections,s=r?.items.get(n??r.active);return s?s.fetch(t,e):fetch(t,e)}var Cn=Symbol.for("yaml.alias"),_n=Symbol.for("yaml.document"),ce=Symbol.for("yaml.map"),qr=Symbol.for("yaml.pair"),ee=Symbol.for("yaml.scalar"),Ne=Symbol.for("yaml.seq"),Y=Symbol.for("yaml.node.type"),ue=t=>!!t&&typeof t=="object"&&t[Y]===Cn,be=t=>!!t&&typeof t=="object"&&t[Y]===_n,fe=t=>!!t&&typeof t=="object"&&t[Y]===ce,L=t=>!!t&&typeof t=="object"&&t[Y]===qr,I=t=>!!t&&typeof t=="object"&&t[Y]===ee,te=t=>!!t&&typeof t=="object"&&t[Y]===Ne;function R(t){if(t&&typeof t=="object")switch(t[Y]){case ce:case Ne:return!0}return!1}function T(t){if(t&&typeof t=="object")switch(t[Y]){case Cn:case ce:case ee:case Ne:return!0}return!1}var vn=t=>(I(t)||R(t))&&!!t.anchor;var Q=Symbol("break visit"),vo=Symbol("skip children"),we=Symbol("remove node");function se(t,e){let n=Eo(e);be(t)?dt(null,t.contents,n,Object.freeze([t]))===we&&(t.contents=null):dt(null,t,n,Object.freeze([]))}se.BREAK=Q;se.SKIP=vo;se.REMOVE=we;function dt(t,e,n,r){let s=Ao(t,e,n,r);if(T(s)||L(s))return No(t,r,s),dt(t,s,n,r);if(typeof s!="symbol"){if(R(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){let i=dt(o,e.items[o],n,r);if(typeof i=="number")o=i-1;else{if(i===Q)return Q;i===we&&(e.items.splice(o,1),o-=1)}}}else if(L(e)){r=Object.freeze(r.concat(e));let o=dt("key",e.key,n,r);if(o===Q)return Q;o===we&&(e.key=null);let i=dt("value",e.value,n,r);if(i===Q)return Q;i===we&&(e.value=null)}}return s}async function En(t,e){let n=Eo(e);be(t)?await ht(null,t.contents,n,Object.freeze([t]))===we&&(t.contents=null):await ht(null,t,n,Object.freeze([]))}En.BREAK=Q;En.SKIP=vo;En.REMOVE=we;async function ht(t,e,n,r){let s=await Ao(t,e,n,r);if(T(s)||L(s))return No(t,r,s),ht(t,s,n,r);if(typeof s!="symbol"){if(R(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){let i=await ht(o,e.items[o],n,r);if(typeof i=="number")o=i-1;else{if(i===Q)return Q;i===we&&(e.items.splice(o,1),o-=1)}}}else if(L(e)){r=Object.freeze(r.concat(e));let o=await ht("key",e.key,n,r);if(o===Q)return Q;o===we&&(e.key=null);let i=await ht("value",e.value,n,r);if(i===Q)return Q;i===we&&(e.value=null)}}return s}function Eo(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Ao(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(fe(e))return n.Map?.(t,e,r);if(te(e))return n.Seq?.(t,e,r);if(L(e))return n.Pair?.(t,e,r);if(I(e))return n.Scalar?.(t,e,r);if(ue(e))return n.Alias?.(t,e,r)}function No(t,e,n){let r=e[e.length-1];if(R(r))r.items[t]=n;else if(L(r))t==="key"?r.key=n:r.value=n;else if(be(r))r.contents=n;else{let s=ue(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}var ql={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Hl=t=>t.replace(/[!,[\]{}]/g,e=>ql[e]),ke=class t{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,n)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[o,i]=r;return this.tags[o]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let i=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,i),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let i=e.slice(2,-1);return i==="!"||i==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),i)}let[,r,s]=e.match(/^(.*!)([^!]*)$/s);s||n(`The ${e} tag has no suffix`);let o=this.tags[r];if(o)try{return o+decodeURIComponent(s)}catch(i){return n(String(i)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+Hl(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),s;if(e&&r.length>0&&T(e.contents)){let o={};se(e.contents,(i,a)=>{T(a)&&a.tag&&(o[a.tag]=!0)}),s=Object.keys(o)}else s=[];for(let[o,i]of r)o==="!!"&&i==="tag:yaml.org,2002:"||(!e||s.some(a=>a.startsWith(i)))&&n.push(`%TAG ${o} ${i}`);return n.join(`
|
|
2
|
+
`)}};ke.defaultYaml={explicit:!1,version:"1.2"};ke.defaultTags={"!!":"tag:yaml.org,2002:"};function An(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Hr(t){let e=new Set;return se(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Wr(t,e){for(let n=1;;++n){let r=`${t}${n}`;if(!e.has(r))return r}}function xo(t,e){let n=[],r=new Map,s=null;return{onAnchor:o=>{n.push(o),s??(s=Hr(t));let i=Wr(e,s);return s.add(i),i},setAnchors:()=>{for(let o of n){let i=r.get(o);if(typeof i=="object"&&i.anchor&&(I(i.node)||R(i.node)))i.node.anchor=i.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:r}}function Ge(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,o=r.length;s<o;++s){let i=r[s],a=Ge(t,r,String(s),i);a===void 0?delete r[s]:a!==i&&(r[s]=a)}else if(r instanceof Map)for(let s of Array.from(r.keys())){let o=r.get(s),i=Ge(t,r,s,o);i===void 0?r.delete(s):i!==o&&r.set(s,i)}else if(r instanceof Set)for(let s of Array.from(r)){let o=Ge(t,r,s,s);o===void 0?r.delete(s):o!==s&&(r.delete(s),r.add(o))}else for(let[s,o]of Object.entries(r)){let i=Ge(t,r,s,o);i===void 0?delete r[s]:i!==o&&(r[s]=i)}return t.call(e,n,r)}function q(t,e,n){if(Array.isArray(t))return t.map((r,s)=>q(r,String(s),n));if(t&&typeof t.toJSON=="function"){if(!n||!vn(t))return t.toJSON(e,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=o=>{r.res=o,delete n.onCreate};let s=t.toJSON(e,n);return n.onCreate&&n.onCreate(s),s}return typeof t=="bigint"&&!n?.keep?Number(t):t}var je=class{constructor(e){Object.defineProperty(this,Y,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:o}={}){if(!be(e))throw new TypeError("A document argument is required");let i={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=q(this,"",i);if(typeof s=="function")for(let{count:l,res:c}of i.anchors.values())s(c,l);return typeof o=="function"?Ge(o,{"":a},"",a):a}};var xe=class extends je{constructor(e){super(Cn),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],se(e,{Node:(o,i)=>{(ue(i)||vn(i))&&r.push(i)}}),n&&(n.aliasResolveCache=r));let s;for(let o of r){if(o===this)break;o.anchor===this.source&&(s=o)}if(s&&n){let{anchors:o,doc:i,maxAliasCount:a}=n,l=o.get(s);if(l||(q(s,null,n),l=o.get(s)),l?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Nn(i,s,o)),l.count*l.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}}return s}toJSON(e,n){if(!n)return{source:this.source};let r=this.resolve(n.doc,n);if(!r){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(s)}return n.anchors.get(r).res}toString(e,n,r){let s=`*${this.source}`;if(e){if(An(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${s} `}return s}};function Nn(t,e,n){if(ue(e)){let r=e.resolve(t),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(R(e)){let r=0;for(let s of e.items){let o=Nn(t,s,n);o>r&&(r=o)}return r}else if(L(e)){let r=Nn(t,e.key,n),s=Nn(t,e.value,n);return Math.max(r,s)}return 1}var xn=t=>!t||typeof t!="function"&&typeof t!="object",v=class extends je{constructor(e){super(ee),this.value=e}toJSON(e,n){return n?.keep?this.value:q(this.value,e,n)}toString(){return String(this.value)}};v.BLOCK_FOLDED="BLOCK_FOLDED";v.BLOCK_LITERAL="BLOCK_LITERAL";v.PLAIN="PLAIN";v.QUOTE_DOUBLE="QUOTE_DOUBLE";v.QUOTE_SINGLE="QUOTE_SINGLE";var Wl="tag:yaml.org,2002:";function Kl(t,e,n){if(e){let r=n.filter(o=>o.tag===e),s=r.find(o=>!o.format)??r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>r.identify?.(t)&&!r.format)}function Ie(t,e,n){if(be(t)&&(t=t.contents),T(t))return t;if(L(t)){let f=n.schema[ce].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:r,onAnchor:s,onTagObj:o,schema:i,sourceObjects:a}=n,l;if(r&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=s(t)),new xe(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=Wl+e.slice(2));let c=Kl(t,e,i.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new v(t);return l&&(l.node=f),f}c=t instanceof Map?i[ce]:Symbol.iterator in Object(t)?i[Ne]:i[ce]}o&&(o(c),delete n.onTagObj);let u=c?.createNode?c.createNode(n.schema,t,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,t,n):new v(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function Ot(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let o=e[s];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let i=[];i[o]=r,r=i}else r=new Map([[o,r]])}return Ie(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var gt=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,pt=class extends je{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>T(r)||L(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(gt(e))this.add(n);else{let[r,...s]=e,o=this.get(r,!0);if(R(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(r,Ot(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(e){let[n,...r]=e;if(r.length===0)return this.delete(n);let s=this.get(n,!0);if(R(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){let[r,...s]=e,o=this.get(r,!0);return s.length===0?!n&&I(o)?o.value:o:R(o)?o.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!L(n))return!1;let r=n.value;return r==null||e&&I(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[n,...r]=e;if(r.length===0)return this.has(n);let s=this.get(n,!0);return R(s)?s.hasIn(r):!1}setIn(e,n){let[r,...s]=e;if(s.length===0)this.set(r,n);else{let o=this.get(r,!0);if(R(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(r,Ot(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}};var Io=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function oe(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Se=(t,e,n)=>t.endsWith(`
|
|
3
3
|
`)?oe(n,e):n.includes(`
|
|
4
4
|
`)?`
|
|
5
|
-
`+oe(n,e):(t.endsWith(" ")?"":" ")+n;var
|
|
6
|
-
`)n===
|
|
5
|
+
`+oe(n,e):(t.endsWith(" ")?"":" ")+n;var Kr="flow",In="block",Pt="quoted";function Mt(t,e,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:o=20,onFold:i,onOverflow:a}={}){if(!s||s<0)return t;s<o&&(o=0);let l=Math.max(1+o,1+s-e.length);if(t.length<=l)return t;let c=[],u={},f=s-e.length;typeof r=="number"&&(r>s-Math.max(2,o)?c.push(0):f=s-r);let d,h,p=!1,g=-1,m=-1,y=-1;n===In&&(g=To(t,g,e.length),g!==-1&&(f=g+l));for(let w;w=t[g+=1];){if(n===Pt&&w==="\\"){switch(m=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if(w===`
|
|
6
|
+
`)n===In&&(g=To(t,g,e.length)),f=g+e.length+l,d=void 0;else{if(w===" "&&h&&h!==" "&&h!==`
|
|
7
7
|
`&&h!==" "){let S=t[g+1];S&&S!==" "&&S!==`
|
|
8
|
-
`&&S!==" "&&(d=g)}if(g>=f)if(d)c.push(d),f=d+l,d=void 0;else if(n===
|
|
9
|
-
${e}${t.slice(0,C)}`:(n===
|
|
10
|
-
${e}${t.slice(S+1,C)}`)}return b}function
|
|
11
|
-
`);r=e,s=e+1,o=t[s]}return r}var
|
|
12
|
-
`){if(o-i>r)return!0;if(i=o+1,s-i<=r)return!1}return!0}function $t(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=e,s=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(
|
|
8
|
+
`&&S!==" "&&(d=g)}if(g>=f)if(d)c.push(d),f=d+l,d=void 0;else if(n===Pt){for(;h===" "||h===" ";)h=w,w=t[g+=1],p=!0;let S=g>y+1?g-2:m-1;if(u[S])return t;c.push(S),u[S]=!0,f=S+l,d=void 0}else p=!0}h=w}if(p&&a&&a(),c.length===0)return t;i&&i();let b=t.slice(0,c[0]);for(let w=0;w<c.length;++w){let S=c[w],C=c[w+1]||t.length;S===0?b=`
|
|
9
|
+
${e}${t.slice(0,C)}`:(n===Pt&&u[S]&&(b+=`${t[S]}\\`),b+=`
|
|
10
|
+
${e}${t.slice(S+1,C)}`)}return b}function To(t,e,n){let r=e,s=e+1,o=t[s];for(;o===" "||o===" ";)if(e<s+n)o=t[++e];else{do o=t[++e];while(o&&o!==`
|
|
11
|
+
`);r=e,s=e+1,o=t[s]}return r}var Ln=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Rn=t=>/^(%|---|\.\.\.)/m.test(t);function Vl(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let o=0,i=0;o<s;++o)if(t[o]===`
|
|
12
|
+
`){if(o-i>r)return!0;if(i=o+1,s-i<=r)return!1}return!0}function $t(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=e,s=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Rn(t)?" ":""),i="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(i+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{i+=n.slice(a,l);let u=n.substr(l+2,4);switch(u){case"0000":i+="\\0";break;case"0007":i+="\\a";break;case"000b":i+="\\v";break;case"001b":i+="\\e";break;case"0085":i+="\\N";break;case"00a0":i+="\\_";break;case"2028":i+="\\L";break;case"2029":i+="\\P";break;default:u.substr(0,2)==="00"?i+="\\x"+u.substr(2):i+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||n[l+2]==='"'||n.length<s)l+=1;else{for(i+=n.slice(a,l)+`
|
|
13
13
|
|
|
14
14
|
`;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)i+=`
|
|
15
|
-
`,l+=2;i+=o,n[l+2]===" "&&(i+="\\"),l+=1,a=l+1}break;default:l+=1}return i=a?i+n.slice(a):n,r?i:
|
|
16
|
-
`)||/[ \t]\n|\n[ \t]/.test(t))return $t(t,e);let n=e.indent||(
|
|
17
|
-
${n}`)+"'";return e.implicitKey?r:
|
|
15
|
+
`,l+=2;i+=o,n[l+2]===" "&&(i+="\\"),l+=1,a=l+1}break;default:l+=1}return i=a?i+n.slice(a):n,r?i:Mt(i,o,Pt,Ln(e,!1))}function Vr(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
16
|
+
`)||/[ \t]\n|\n[ \t]/.test(t))return $t(t,e);let n=e.indent||(Rn(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
17
|
+
${n}`)+"'";return e.implicitKey?r:Mt(r,n,Kr,Ln(e,!1))}function mt(t,e){let{singleQuote:n}=e.options,r;if(n===!1)r=$t;else{let s=t.includes('"'),o=t.includes("'");s&&!o?r=Vr:o&&!s?r=$t:r=n?Vr:$t}return r(t,e)}var zr;try{zr=new RegExp(`(^|(?<!
|
|
18
18
|
))
|
|
19
19
|
+(?!
|
|
20
|
-
|$)`,"g")}catch{
|
|
20
|
+
|$)`,"g")}catch{zr=/\n+(?!\n|$)/g}function Tn({comment:t,type:e,value:n},r,s,o){let{blockQuote:i,commentString:a,lineWidth:l}=r.options;if(!i||/\n[\t ]+$/.test(n))return mt(n,r);let c=r.indent||(r.forceBlockIndent||Rn(n)?" ":""),u=i==="literal"?!0:i==="folded"||e===v.BLOCK_FOLDED?!1:e===v.BLOCK_LITERAL?!0:!Vl(n,l,c.length);if(!n)return u?`|
|
|
21
21
|
`:`>
|
|
22
22
|
`;let f,d;for(d=n.length;d>0;--d){let C=n[d-1];if(C!==`
|
|
23
23
|
`&&C!==" "&&C!==" ")break}let h=n.substring(d),p=h.indexOf(`
|
|
24
24
|
`);p===-1?f="-":n===h||p!==h.length-1?(f="+",o&&o()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
|
|
25
|
-
`&&(h=h.slice(0,-1)),h=h.replace(
|
|
25
|
+
`&&(h=h.slice(0,-1)),h=h.replace(zr,`$&${c}`));let g=!1,m,y=-1;for(m=0;m<n.length;++m){let C=n[m];if(C===" ")g=!0;else if(C===`
|
|
26
26
|
`)y=m;else break}let b=n.substring(0,y<m?y+1:m);b&&(n=n.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let S=(g?c?"2":"1":"")+f;if(t&&(S+=" "+a(t.replace(/ ?[\r\n]+/g," ")),s&&s()),!u){let C=n.replace(/\n+/g,`
|
|
27
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),E=!1,x=
|
|
27
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),E=!1,x=Ln(r,!0);i!=="folded"&&e!==v.BLOCK_FOLDED&&(x.onOverflow=()=>{E=!0});let _=Mt(`${b}${C}${h}`,c,In,x);if(!E)return`>${S}
|
|
28
28
|
${c}${_}`}return n=n.replace(/\n+/g,`$&${c}`),`|${S}
|
|
29
|
-
${c}${b}${n}${h}`}function
|
|
30
|
-
`)||u&&/[[\]{},]/.test(o))return
|
|
31
|
-
`)?
|
|
32
|
-
`))return
|
|
33
|
-
${l}`);if(i){let d=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(f),{compat:h,tags:p}=e.doc.schema;if(p.some(d)||h?.some(d))return
|
|
34
|
-
${e.indent}${a}`:a}function
|
|
29
|
+
${c}${b}${n}${h}`}function zl(t,e,n,r){let{type:s,value:o}=t,{actualString:i,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&o.includes(`
|
|
30
|
+
`)||u&&/[[\]{},]/.test(o))return mt(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes(`
|
|
31
|
+
`)?mt(o,e):Tn(t,e,n,r);if(!a&&!u&&s!==v.PLAIN&&o.includes(`
|
|
32
|
+
`))return Tn(t,e,n,r);if(Rn(o)){if(l==="")return e.forceBlockIndent=!0,Tn(t,e,n,r);if(a&&l===c)return mt(o,e)}let f=o.replace(/\n+/g,`$&
|
|
33
|
+
${l}`);if(i){let d=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(f),{compat:h,tags:p}=e.doc.schema;if(p.some(d)||h?.some(d))return mt(o,e)}return a?f:Mt(f,l,Kr,Ln(e,!1))}function Xe(t,e,n,r){let{implicitKey:s,inFlow:o}=e,i=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==v.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(i.value)&&(a=v.QUOTE_DOUBLE);let l=u=>{switch(u){case v.BLOCK_FOLDED:case v.BLOCK_LITERAL:return s||o?mt(i.value,e):Tn(i,e,n,r);case v.QUOTE_DOUBLE:return $t(i.value,e);case v.QUOTE_SINGLE:return Vr(i.value,e);case v.PLAIN:return zl(i,e,n,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=s&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function Bn(t,e){let n=Object.assign({blockQuote:!0,commentString:Io,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function Jl(t,e){if(e.tag){let s=t.filter(o=>o.tag===e.tag);if(s.length>0)return s.find(o=>o.format===e.format)??s[0]}let n,r;if(I(e)){r=e.value;let s=t.filter(o=>o.identify?.(r));if(s.length>1){let o=s.filter(i=>i.test);o.length>0&&(s=o)}n=s.find(o=>o.format===e.format)??s.find(o=>!o.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function Yl(t,e,{anchors:n,doc:r}){if(!r.directives)return"";let s=[],o=(I(t)||R(t))&&t.anchor;o&&An(o)&&(n.add(o),s.push(`&${o}`));let i=t.tag??(e.default?null:e.tag);return i&&s.push(r.directives.tagString(i)),s.join(" ")}function Te(t,e,n,r){if(L(t))return t.toString(e,n,r);if(ue(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let s,o=T(t)?t:e.doc.createNode(t,{onTagObj:l=>s=l});s??(s=Jl(e.doc.schema.tags,o));let i=Yl(o,s,e);i.length>0&&(e.indentAtStart=(e.indentAtStart??0)+i.length+1);let a=typeof s.stringify=="function"?s.stringify(o,e,n,r):I(o)?Xe(o,e,n,r):o.toString(e,n,r);return i?I(o)||a[0]==="{"||a[0]==="["?`${i} ${a}`:`${i}
|
|
34
|
+
${e.indent}${a}`:a}function Lo({key:t,value:e},n,r,s){let{allNullValues:o,doc:i,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n,d=T(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(R(t)||!T(t)&&typeof t=="object"){let x="With simple keys, collection cannot be used as a key value";throw new Error(x)}}let h=!f&&(!t||d&&e==null&&!n.inFlow||R(t)||(I(t)?t.type===v.BLOCK_FOLDED||t.type===v.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!o),indent:a+l});let p=!1,g=!1,m=Te(t,n,()=>p=!0,()=>g=!0);if(!h&&!n.inFlow&&m.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(o||e==null)return p&&r&&r(),m===""?"?":h?`? ${m}`:m}else if(o&&!f||e==null&&h)return m=`? ${m}`,d&&!p?m+=Se(m,n.indent,c(d)):g&&s&&s(),m;p&&(d=null),h?(d&&(m+=Se(m,n.indent,c(d))),m=`? ${m}
|
|
35
35
|
${a}:`):(m=`${m}:`,d&&(m+=Se(m,n.indent,c(d))));let y,b,w;T(e)?(y=!!e.spaceBefore,b=e.commentBefore,w=e.comment):(y=!1,b=null,w=null,e&&typeof e=="object"&&(e=i.createNode(e))),n.implicitKey=!1,!h&&!d&&I(e)&&(n.indentAtStart=m.length+1),g=!1,!u&&l.length>=2&&!n.inFlow&&!h&&te(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let S=!1,C=Te(e,n,()=>S=!0,()=>g=!0),E=" ";if(d||y||b){if(E=y?`
|
|
36
36
|
`:"",b){let x=c(b);E+=`
|
|
37
37
|
${oe(x,n.indent)}`}C===""&&!n.inFlow?E===`
|
|
38
38
|
`&&w&&(E=`
|
|
39
39
|
|
|
40
40
|
`):E+=`
|
|
41
|
-
${n.indent}`}else if(!h&&
|
|
42
|
-
`)
|
|
41
|
+
${n.indent}`}else if(!h&&R(e)){let x=C[0],_=C.indexOf(`
|
|
42
|
+
`),M=_!==-1,re=n.inFlow??e.flow??e.items.length===0;if(M||!re){let ye=!1;if(M&&(x==="&"||x==="!")){let B=C.indexOf(" ");x==="&"&&B!==-1&&B<_&&C[B+1]==="!"&&(B=C.indexOf(" ",B+1)),(B===-1||_<B)&&(ye=!0)}ye||(E=`
|
|
43
43
|
${n.indent}`)}}else(C===""||C[0]===`
|
|
44
|
-
`)&&(E="");return m+=E+C,n.inFlow?S&&r&&r():w&&!S?m+=Se(m,n.indent,c(w)):g&&s&&s(),m}function
|
|
44
|
+
`)&&(E="");return m+=E+C,n.inFlow?S&&r&&r():w&&!S?m+=Se(m,n.indent,c(w)):g&&s&&s(),m}function Jr(t,e){(t==="debug"||t==="warn")&&console.warn(e)}var On="<<",de={identify:t=>t===On||typeof t=="symbol"&&t.description===On,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new v(Symbol(On)),{addToJSMap:Qr}),stringify:()=>On},Ro=(t,e)=>(de.identify(e)||I(e)&&(!e.type||e.type===v.PLAIN)&&de.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===de.tag&&n.default);function Qr(t,e,n){let r=Bo(t,n);if(te(r))for(let s of r.items)Yr(t,e,s);else if(Array.isArray(r))for(let s of r)Yr(t,e,s);else Yr(t,e,r)}function Yr(t,e,n){let r=Bo(t,n);if(!fe(r))throw new Error("Merge sources must be maps or map aliases");let s=r.toJSON(null,t,Map);for(let[o,i]of s)e instanceof Map?e.has(o)||e.set(o,i):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0});return e}function Bo(t,e){return t&&ue(e)?e.resolve(t.doc,t):e}function Pn(t,e,{key:n,value:r}){if(T(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(Ro(t,n))Qr(t,e,r);else{let s=q(n,"",t);if(e instanceof Map)e.set(s,q(r,s,t));else if(e instanceof Set)e.add(s);else{let o=Ql(n,s,t),i=q(r,o,t);o in e?Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0}):e[o]=i}}return e}function Ql(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(T(t)&&n?.doc){let r=Bn(n.doc,{});r.anchors=new Set;for(let o of n.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;let s=t.toString(r);if(!n.mapKeyWarned){let o=JSON.stringify(s);o.length>40&&(o=o.substring(0,36)+'..."'),Jr(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(e)}function yt(t,e,n){let r=Ie(t,void 0,n),s=Ie(e,void 0,n);return new $(r,s)}var $=class t{constructor(e,n=null){Object.defineProperty(this,Y,{value:qr}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return T(n)&&(n=n.clone(e)),T(r)&&(r=r.clone(e)),new t(n,r)}toJSON(e,n){let r=n?.mapAsMap?new Map:{};return Pn(n,r,this)}toString(e,n,r){return e?.doc?Lo(this,e,n,r):JSON.stringify(this)}};function $n(t,e,n){return(e.inFlow??t.flow?Zl:Xl)(t,e,n)}function Xl({comment:t,items:e},n,{blockItemPrefix:r,flowChars:s,itemIndent:o,onChompKeep:i,onComment:a}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:o,type:null}),f=!1,d=[];for(let p=0;p<e.length;++p){let g=e[p],m=null;if(T(g))!f&&g.spaceBefore&&d.push(""),Mn(n,d,g.commentBefore,f),g.comment&&(m=g.comment);else if(L(g)){let b=T(g.key)?g.key:null;b&&(!f&&b.spaceBefore&&d.push(""),Mn(n,d,b.commentBefore,f))}f=!1;let y=Te(g,u,()=>m=null,()=>f=!0);m&&(y+=Se(y,o,c(m))),f&&m&&(f=!1),d.push(r+y)}let h;if(d.length===0)h=s.start+s.end;else{h=d[0];for(let p=1;p<d.length;++p){let g=d[p];h+=g?`
|
|
45
45
|
${l}${g}`:`
|
|
46
46
|
`}}return t?(h+=`
|
|
47
|
-
`+oe(c(t),l),a&&a()):f&&i&&i(),h}function
|
|
47
|
+
`+oe(c(t),l),a&&a()):f&&i&&i(),h}function Zl({items:t},e,{flowChars:n,itemIndent:r}){let{indent:s,indentStep:o,flowCollectionPadding:i,options:{commentString:a}}=e;r+=o;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let p=0;p<t.length;++p){let g=t[p],m=null;if(T(g))g.spaceBefore&&f.push(""),Mn(e,f,g.commentBefore,!1),g.comment&&(m=g.comment);else if(L(g)){let b=T(g.key)?g.key:null;b&&(b.spaceBefore&&f.push(""),Mn(e,f,b.commentBefore,!1),b.comment&&(c=!0));let w=T(g.value)?g.value:null;w?(w.comment&&(m=w.comment),w.commentBefore&&(c=!0)):g.value==null&&b?.comment&&(m=b.comment)}m&&(c=!0);let y=Te(g,l,()=>m=null);c||(c=f.length>u||y.includes(`
|
|
48
48
|
`)),p<t.length-1?y+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((b,w)=>b+w.length+2,2)+(y.length+2)>e.options.lineWidth)),c&&(y+=",")),m&&(y+=Se(y,r,a(m))),f.push(y),u=f.length}let{start:d,end:h}=n;if(f.length===0)return d+h;if(!c){let p=f.reduce((g,m)=>g+m.length+2,2);c=e.options.lineWidth>0&&p>e.options.lineWidth}if(c){let p=d;for(let g of f)p+=g?`
|
|
49
49
|
${o}${s}${g}`:`
|
|
50
50
|
`;return`${p}
|
|
51
|
-
${s}${h}`}else return`${d}${i}${f.join(" ")}${i}${h}`}function
|
|
52
|
-
`:" ")}return Xe({comment:t,type:e,value:a},r,s,o)}};function
|
|
51
|
+
${s}${h}`}else return`${d}${i}${f.join(" ")}${i}${h}`}function Mn({indent:t,options:{commentString:e}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){let o=oe(e(r),t);n.push(o.trimStart())}}function Ue(t,e){let n=I(e)?e.value:e;for(let r of t)if(L(r)&&(r.key===e||r.key===n||I(r.key)&&r.key.value===n))return r}var D=class extends pt{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ce,e),this.items=[]}static from(e,n,r){let{keepUndefined:s,replacer:o}=r,i=new this(e),a=(l,c)=>{if(typeof o=="function")c=o.call(n,l,c);else if(Array.isArray(o)&&!o.includes(l))return;(c!==void 0||s)&&i.items.push(yt(l,c,r))};if(n instanceof Map)for(let[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&i.items.sort(e.sortMapEntries),i}add(e,n){let r;L(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new $(e,e?.value):r=new $(e.key,e.value);let s=Ue(this.items,r.key),o=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);I(s.value)&&xn(r.value)?s.value.value=r.value:s.value=r.value}else if(o){let i=this.items.findIndex(a=>o(r,a)<0);i===-1?this.items.push(r):this.items.splice(i,0,r)}else this.items.push(r)}delete(e){let n=Ue(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let s=Ue(this.items,e)?.value;return(!n&&I(s)?s.value:s)??void 0}has(e){return!!Ue(this.items,e)}set(e,n){this.add(new $(e,n),!0)}toJSON(e,n,r){let s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(let o of this.items)Pn(n,s,o);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!L(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),$n(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}};var he={collection:"map",default:!0,nodeClass:D,tag:"tag:yaml.org,2002:map",resolve(t,e){return fe(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>D.from(t,e,n)};var V=class extends pt{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ne,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=Fn(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Fn(e);if(typeof r!="number")return;let s=this.items[r];return!n&&I(s)?s.value:s}has(e){let n=Fn(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=Fn(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let s=this.items[r];I(s)&&xn(n)?s.value=n:this.items[r]=n}toJSON(e,n){let r=[];n?.onCreate&&n.onCreate(r);let s=0;for(let o of this.items)r.push(q(o,String(s++),n));return r}toString(e,n,r){return e?$n(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){let{replacer:s}=r,o=new this(e);if(n&&Symbol.iterator in Object(n)){let i=0;for(let a of n){if(typeof s=="function"){let l=n instanceof Set?a:String(i++);a=s.call(n,l,a)}o.items.push(Ie(a,void 0,r))}}return o}};function Fn(t){let e=I(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var pe={collection:"seq",default:!0,nodeClass:V,tag:"tag:yaml.org,2002:seq",resolve(t,e){return te(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>V.from(t,e,n)};var qe={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Xe(t,e,n,r)}};var Ze={identify:t=>t==null,createNode:()=>new v(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new v(null),stringify:({source:t},e)=>typeof t=="string"&&Ze.test.test(t)?t:e.options.nullStr};var Ft={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new v(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Ft.test.test(t)){let r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function z({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);let s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let i=o.indexOf(".");i<0&&(i=o.length,o+=".");let a=e-(o.length-i-1);for(;a-- >0;)o+="0"}return o}var Dn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z},Gn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():z(t)}},jn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new v(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:z};var Un=t=>typeof t=="bigint"||Number.isInteger(t),Xr=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function Oo(t,e,n){let{value:r}=t;return Un(r)&&r>=0?n+r.toString(e):z(t)}var qn={identify:t=>Un(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Xr(t,2,8,n),stringify:t=>Oo(t,8,"0o")},Hn={identify:Un,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Xr(t,0,10,n),stringify:z},Wn={identify:t=>Un(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Xr(t,2,16,n),stringify:t=>Oo(t,16,"0x")};var Po=[he,pe,qe,Ze,Ft,qn,Hn,Wn,Dn,Gn,jn];function Mo(t){return typeof t=="bigint"||Number.isInteger(t)}var Kn=({value:t})=>JSON.stringify(t),ec=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Kn},{identify:t=>t==null,createNode:()=>new v(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Kn},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Kn},{identify:Mo,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Mo(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Kn}],tc={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},$o=[he,pe].concat(ec,tc);var Dt={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){let n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s<n.length;++s)r[s]=n.charCodeAt(s);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,s,o){if(!n)return"";let i=n,a;if(typeof btoa=="function"){let l="";for(let c=0;c<i.length;++c)l+=String.fromCharCode(i[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=v.BLOCK_LITERAL),e!==v.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,d=0;f<c;++f,d+=l)u[f]=a.substr(d,l);a=u.join(e===v.BLOCK_LITERAL?`
|
|
52
|
+
`:" ")}return Xe({comment:t,type:e,value:a},r,s,o)}};function Zr(t,e){if(te(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!L(r)){if(fe(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");let s=r.items[0]||new $(new v(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
|
|
53
53
|
${s.key.commentBefore}`:r.commentBefore),r.comment){let o=s.value??s.key;o.comment=o.comment?`${r.comment}
|
|
54
|
-
${o.comment}`:r.comment}r=s}t.items[n]=L(r)?r:new
|
|
54
|
+
${o.comment}`:r.comment}r=s}t.items[n]=L(r)?r:new $(r)}}else e("Expected a sequence for this tag");return t}function es(t,e,n){let{replacer:r}=n,s=new V(t);s.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let i of e){typeof r=="function"&&(i=r.call(e,String(o++),i));let a,l;if(Array.isArray(i))if(i.length===2)a=i[0],l=i[1];else throw new TypeError(`Expected [key, value] tuple: ${i}`);else if(i&&i instanceof Object){let c=Object.keys(i);if(c.length===1)a=c[0],l=i[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=i;s.items.push(yt(a,l,n))}return s}var Gt={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Zr,createNode:es};var bt=class t extends V{constructor(){super(),this.add=D.prototype.add.bind(this),this.delete=D.prototype.delete.bind(this),this.get=D.prototype.get.bind(this),this.has=D.prototype.has.bind(this),this.set=D.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let r=new Map;n?.onCreate&&n.onCreate(r);for(let s of this.items){let o,i;if(L(s)?(o=q(s.key,"",n),i=q(s.value,o,n)):o=q(s,"",n),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,i)}return r}static from(e,n,r){let s=es(e,n,r),o=new this;return o.items=s.items,o}};bt.tag="tag:yaml.org,2002:omap";var jt={collection:"seq",identify:t=>t instanceof Map,nodeClass:bt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=Zr(t,e),r=[];for(let{key:s}of n.items)I(s)&&(r.includes(s.value)?e(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new bt,n)},createNode:(t,e,n)=>bt.from(t,e,n)};function Fo({value:t,source:e},n){return e&&(t?ts:ns).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var ts={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new v(!0),stringify:Fo},ns={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new v(!1),stringify:Fo};var Do={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z},Go={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():z(t)}},jo={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new v(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:z};var Ut=t=>typeof t=="bigint"||Number.isInteger(t);function Vn(t,e,n,{intAsBigInt:r}){let s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let i=BigInt(t);return s==="-"?BigInt(-1)*i:i}let o=parseInt(t,n);return s==="-"?-1*o:o}function rs(t,e,n){let{value:r}=t;if(Ut(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return z(t)}var Uo={identify:Ut,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Vn(t,2,2,n),stringify:t=>rs(t,2,"0b")},qo={identify:Ut,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Vn(t,1,8,n),stringify:t=>rs(t,8,"0")},Ho={identify:Ut,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Vn(t,0,10,n),stringify:z},Wo={identify:Ut,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Vn(t,2,16,n),stringify:t=>rs(t,16,"0x")};var wt=class t extends D{constructor(e){super(e),this.tag=t.tag}add(e){let n;L(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new $(e.key,null):n=new $(e,null),Ue(this.items,n.key)||this.items.push(n)}get(e,n){let r=Ue(this.items,e);return!n&&L(r)?I(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=Ue(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new $(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){let{replacer:s}=r,o=new this(e);if(n&&Symbol.iterator in Object(n))for(let i of n)typeof s=="function"&&(i=s.call(n,i,i)),o.items.push(yt(i,null,r));return o}};wt.tag="tag:yaml.org,2002:set";var qt={collection:"map",identify:t=>t instanceof Set,nodeClass:wt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>wt.from(t,e,n),resolve(t,e){if(fe(t)){if(t.hasAllNullValues(!0))return Object.assign(new wt,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function ss(t,e){let n=t[0],r=n==="-"||n==="+"?t.substring(1):t,s=i=>e?BigInt(i):Number(i),o=r.replace(/_/g,"").split(":").reduce((i,a)=>i*s(60)+s(a),s(0));return n==="-"?s(-1)*o:o}function Ko(t){let{value:e}=t,n=i=>i;if(typeof e=="bigint")n=i=>BigInt(i);else if(isNaN(e)||!isFinite(e))return z(t);let r="";e<0&&(r="-",e*=n(-1));let s=n(60),o=[e%s];return e<60?o.unshift(0):(e=(e-o[0])/s,o.unshift(e%s),e>=60&&(e=(e-o[0])/s,o.unshift(e))),r+o.map(i=>String(i).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var zn={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>ss(t,n),stringify:Ko},Jn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>ss(t,!1),stringify:Ko},kt={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(kt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,s,o,i,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(n,r-1,s,o||0,i||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=ss(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var os=[he,pe,qe,Ze,ts,ns,Uo,qo,Ho,Wo,Do,Go,jo,Dt,de,jt,Gt,qt,zn,Jn,kt];var Vo=new Map([["core",Po],["failsafe",[he,pe,qe]],["json",$o],["yaml11",os],["yaml-1.1",os]]),zo={binary:Dt,bool:Ft,float:jn,floatExp:Gn,floatNaN:Dn,floatTime:Jn,int:Hn,intHex:Wn,intOct:qn,intTime:zn,map:he,merge:de,null:Ze,omap:jt,pairs:Gt,seq:pe,set:qt,timestamp:kt},Jo={"tag:yaml.org,2002:binary":Dt,"tag:yaml.org,2002:merge":de,"tag:yaml.org,2002:omap":jt,"tag:yaml.org,2002:pairs":Gt,"tag:yaml.org,2002:set":qt,"tag:yaml.org,2002:timestamp":kt};function Yn(t,e,n){let r=Vo.get(e);if(r&&!t)return n&&!r.includes(de)?r.concat(de):r.slice();let s=r;if(!s)if(Array.isArray(t))s=[];else{let o=Array.from(Vo.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(t))for(let o of t)s=s.concat(o);else typeof t=="function"&&(s=t(s.slice()));return n&&(s=s.concat(de)),s.reduce((o,i)=>{let a=typeof i=="string"?zo[i]:i;if(!a){let l=JSON.stringify(i),c=Object.keys(zo).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return o.includes(a)||o.push(a),o},[])}var nc=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,Ht=class t{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:s,schema:o,sortMapEntries:i,toStringDefaults:a}){this.compat=Array.isArray(e)?Yn(e,"compat"):e?Yn(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=s?Jo:{},this.tags=Yn(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,ce,{value:he}),Object.defineProperty(this,ee,{value:qe}),Object.defineProperty(this,Ne,{value:pe}),this.sortMapEntries=typeof i=="function"?i:i===!0?nc:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Yo(t,e){let n=[],r=e.directives===!0;if(e.directives!==!1&&t.directives){let l=t.directives.toString(t);l?(n.push(l),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");let s=Bn(t,e),{commentString:o}=s.options;if(t.commentBefore){n.length!==1&&n.unshift("");let l=o(t.commentBefore);n.unshift(oe(l,""))}let i=!1,a=null;if(t.contents){if(T(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){let u=o(t.contents.commentBefore);n.push(oe(u,""))}s.forceBlockIndent=!!t.comment,a=t.contents.comment}let l=a?void 0:()=>i=!0,c=Te(t.contents,s,()=>a=null,l);a&&(c+=Se(c,"",o(a))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Te(t.contents,s));if(t.directives?.docEnd)if(t.comment){let l=o(t.comment);l.includes(`
|
|
55
55
|
`)?(n.push("..."),n.push(oe(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&i&&(l=l.replace(/^\n+/,"")),l&&((!i||a)&&n[n.length-1]!==""&&n.push(""),n.push(oe(o(l),"")))}return n.join(`
|
|
56
56
|
`)+`
|
|
57
|
-
`}var He=class t{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Y,{value:
|
|
57
|
+
`}var He=class t{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Y,{value:_n});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:i}=o;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new ke({version:i}),this.setSchema(i,r),this.contents=e===void 0?null:this.createNode(e,s,r)}clone(){let e=Object.create(t.prototype,{[Y]:{value:_n}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=T(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){St(this.contents)&&this.contents.add(e)}addIn(e,n){St(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let r=Hr(this);e.anchor=!n||r.has(n)?Wr(n||"a",r):n}return new xe(e.anchor)}createNode(e,n,r){let s;if(typeof n=="function")e=n.call({"":e},"",e),s=n;else if(Array.isArray(n)){let m=b=>typeof b=="number"||b instanceof String||b instanceof Number,y=n.filter(m).map(String);y.length>0&&(n=n.concat(y)),s=n}else r===void 0&&n&&(r=n,n=void 0);let{aliasDuplicateObjects:o,anchorPrefix:i,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=xo(this,i||"a"),p={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:h},g=Ie(e,u,p);return a&&R(g)&&(g.flow=!0),d(),g}createPair(e,n,r={}){let s=this.createNode(e,null,r),o=this.createNode(n,null,r);return new $(s,o)}delete(e){return St(this.contents)?this.contents.delete(e):!1}deleteIn(e){return gt(e)?this.contents==null?!1:(this.contents=null,!0):St(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return R(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return gt(e)?!n&&I(this.contents)?this.contents.value:this.contents:R(this.contents)?this.contents.getIn(e,n):void 0}has(e){return R(this.contents)?this.contents.has(e):!1}hasIn(e){return gt(e)?this.contents!==void 0:R(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Ot(this.schema,[e],n):St(this.contents)&&this.contents.set(e,n)}setIn(e,n){gt(e)?this.contents=n:this.contents==null?this.contents=Ot(this.schema,Array.from(e),n):St(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ke({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ke({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let s=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new Ht(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:o,reviver:i}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=q(this.contents,n??"",a);if(typeof o=="function")for(let{count:c,res:u}of a.anchors.values())o(u,c);return typeof i=="function"?Ge(i,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Yo(this,e)}};function St(t){if(R(t))return!0;throw new Error("Expected a YAML collection as document contents")}var Wt=class extends Error{constructor(e,n,r,s){super(),this.name=e,this.code=r,this.message=s,this.pos=n}},Ce=class extends Wt{constructor(e,n,r){super("YAMLParseError",e,n,r)}},Kt=class extends Wt{constructor(e,n,r){super("YAMLWarning",e,n,r)}},is=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));let{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let o=s-1,i=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&i.length>80){let a=Math.min(o-39,i.length-79);i="\u2026"+i.substring(a),o-=a-1}if(i.length>80&&(i=i.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(i.substring(0,o))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
58
58
|
`),i=a+i}if(/[^ ]/.test(i)){let a=1,l=n.linePos[1];l?.line===r&&l.col>s&&(a=Math.max(1,Math.min(l.col-s,80-o)));let c=" ".repeat(o)+"^".repeat(a);n.message+=`:
|
|
59
59
|
|
|
60
60
|
${i}
|
|
61
61
|
${c}
|
|
62
|
-
`}};function _e(t,{flow:e,indicator:n,next:r,offset:s,onError:o,parentIndent:i,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",h=!1,p=!1,g=null,m=null,y=null,b=null,w=null,S=null,C=null;for(let _ of t)switch(p&&(_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&o(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),g&&(c&&_.type!=="comment"&&_.type!=="newline"&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),_.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&_.source.includes(" ")&&(g=_),u=!0;break;case"comment":{u||o(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let
|
|
63
|
-
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(We(e.key)||We(e.value))return!0}return!1;default:return!0}}function
|
|
64
|
-
`+g.comment:a.comment=g.comment);continue}(g.newlineAfterProp||We(d))&&s(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==r.indent&&s(l,"BAD_INDENT",
|
|
65
|
-
`+w.comment:b.comment=w.comment);let S=new
|
|
62
|
+
`}};function _e(t,{flow:e,indicator:n,next:r,offset:s,onError:o,parentIndent:i,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",h=!1,p=!1,g=null,m=null,y=null,b=null,w=null,S=null,C=null;for(let _ of t)switch(p&&(_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&o(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),g&&(c&&_.type!=="comment"&&_.type!=="newline"&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),_.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&_.source.includes(" ")&&(g=_),u=!0;break;case"comment":{u||o(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let M=_.source.substring(1)||" ";f?f+=d+M:f=M,d="",c=!1;break}case"newline":c?f?f+=_.source:(!S||n!=="seq-item-ind")&&(l=!0):d+=_.source,c=!0,h=!0,(m||y)&&(b=_),u=!0;break;case"anchor":m&&o(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&o(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=_,C??(C=_.offset),c=!1,u=!1,p=!0;break;case"tag":{y&&o(_,"MULTIPLE_TAGS","A node can have at most one tag"),y=_,C??(C=_.offset),c=!1,u=!1,p=!0;break}case n:(m||y)&&o(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),S&&o(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${e??"collection"}`),S=_,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(e){w&&o(_,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=_,c=!1,u=!1;break}default:o(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),c=!1,u=!1}let E=t[t.length-1],x=E?E.offset+E.source.length:s;return p&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(c&&g.indent<=i||r?.type==="block-map"||r?.type==="block-seq")&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:S,spaceBefore:l,comment:f,hasNewline:h,anchor:m,tag:y,newlineAfterProp:b,end:x,start:C??x}}function We(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
63
|
+
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(We(e.key)||We(e.value))return!0}return!1;default:return!0}}function Vt(t,e,n){if(e?.type==="flow-collection"){let r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&We(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Qn(t,e,n){let{uniqueKeys:r}=t.options;if(r===!1)return!1;let s=typeof r=="function"?r:(o,i)=>o===i||I(o)&&I(i)&&o.value===i.value;return e.some(o=>s(o.key,n))}var Qo="All mapping items must start at the same column";function Xo({composeNode:t,composeEmptyNode:e},n,r,s,o){let i=o?.nodeClass??D,a=new i(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,c=null;for(let u of r.items){let{start:f,key:d,sep:h,value:p}=u,g=_e(f,{indicator:"explicit-key-ind",next:d??h?.[0],offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0}),m=!g.found;if(m){if(d&&(d.type==="block-seq"?s(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&s(l,"BAD_INDENT",Qo)),!g.anchor&&!g.tag&&!h){c=g.end,g.comment&&(a.comment?a.comment+=`
|
|
64
|
+
`+g.comment:a.comment=g.comment);continue}(g.newlineAfterProp||We(d))&&s(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==r.indent&&s(l,"BAD_INDENT",Qo);n.atKey=!0;let y=g.end,b=d?t(n,d,g,s):e(n,y,f,null,g,s);n.schema.compat&&Vt(r.indent,d,s),n.atKey=!1,Qn(n,a.items,b)&&s(y,"DUPLICATE_KEY","Map keys must be unique");let w=_e(h??[],{indicator:"map-value-ind",next:p,offset:b.range[2],onError:s,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=w.end,w.found){m&&(p?.type==="block-map"&&!w.hasNewline&&s(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&g.start<w.found.offset-1024&&s(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=p?t(n,p,w,s):e(n,l,h,null,w,s);n.schema.compat&&Vt(r.indent,p,s),l=S.range[2];let C=new $(b,S);n.options.keepSourceTokens&&(C.srcToken=u),a.items.push(C)}else{m&&s(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(b.comment?b.comment+=`
|
|
65
|
+
`+w.comment:b.comment=w.comment);let S=new $(b);n.options.keepSourceTokens&&(S.srcToken=u),a.items.push(S)}}return c&&c<l&&s(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c??l],a}function Zo({composeNode:t,composeEmptyNode:e},n,r,s,o){let i=o?.nodeClass??V,a=new i(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,c=null;for(let{start:u,value:f}of r.items){let d=_e(u,{indicator:"seq-item-ind",next:f,offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f?.type==="block-seq"?s(d.end,"BAD_INDENT","All sequence items must start at the same column"):s(l,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}let h=f?t(n,f,d,s):e(n,d.end,u,null,d,s);n.schema.compat&&Vt(r.indent,f,s),l=h.range[2],a.items.push(h)}return a.range=[r.offset,l,c??l],a}function ve(t,e,n,r){let s="";if(t){let o=!1,i="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";s?s+=i+u:s=u,i="";break}case"newline":s&&(i+=l),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:s,offset:e}}var as="Block collections are not allowed within flow collections",ls=t=>t&&(t.type==="block-map"||t.type==="block-seq");function ei({composeNode:t,composeEmptyNode:e},n,r,s,o){let i=r.start.source==="{",a=i?"flow map":"flow sequence",l=o?.nodeClass??(i?D:V),c=new l(n.schema);c.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let m=0;m<r.items.length;++m){let y=r.items[m],{start:b,key:w,sep:S,value:C}=y,E=_e(b,{flow:a,indicator:"explicit-key-ind",next:w??S?.[0],offset:f,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!C){m===0&&E.comma?s(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):m<r.items.length-1&&s(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),E.comment&&(c.comment?c.comment+=`
|
|
66
66
|
`+E.comment:c.comment=E.comment),f=E.end;continue}!i&&n.options.strict&&We(w)&&s(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)E.comma&&s(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||s(E.start,"MISSING_CHAR",`Missing , between ${a} items`),E.comment){let x="";e:for(let _ of b)switch(_.type){case"comma":case"space":break;case"comment":x=_.source.substring(1);break e;default:break e}if(x){let _=c.items[c.items.length-1];L(_)&&(_=_.value??_.key),_.comment?_.comment+=`
|
|
67
|
-
`+x:_.comment=x,E.comment=E.comment.substring(x.length+1)}}if(!i&&!S&&!E.found){let x=C?t(n,C,E,s):e(n,E.end,S,null,E,s);c.items.push(x),f=x.range[2],
|
|
68
|
-
|
|
69
|
-
`+m.comment:c.comment=m.comment),c.range=[r.offset,g,m.offset]}else c.range=[r.offset,g,g];return c}function
|
|
67
|
+
`+x:_.comment=x,E.comment=E.comment.substring(x.length+1)}}if(!i&&!S&&!E.found){let x=C?t(n,C,E,s):e(n,E.end,S,null,E,s);c.items.push(x),f=x.range[2],ls(C)&&s(x.range,"BLOCK_IN_FLOW",as)}else{n.atKey=!0;let x=E.end,_=w?t(n,w,E,s):e(n,x,b,null,E,s);ls(w)&&s(_.range,"BLOCK_IN_FLOW",as),n.atKey=!1;let M=_e(S??[],{flow:a,indicator:"map-value-ind",next:C,offset:_.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if(M.found){if(!i&&!E.found&&n.options.strict){if(S)for(let B of S){if(B===M.found)break;if(B.type==="newline"){s(B,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<M.found.offset-1024&&s(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&C.source?.[0]===":"?s(C,"MISSING_CHAR",`Missing space after : in ${a}`):s(M.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let re=C?t(n,C,M,s):M.found?e(n,M.end,S,null,M,s):null;re?ls(C)&&s(re.range,"BLOCK_IN_FLOW",as):M.comment&&(_.comment?_.comment+=`
|
|
68
|
+
`+M.comment:_.comment=M.comment);let ye=new $(_,re);if(n.options.keepSourceTokens&&(ye.srcToken=y),i){let B=c;Qn(n,B.items,_)&&s(x,"DUPLICATE_KEY","Map keys must be unique"),B.items.push(ye)}else{let B=new D(n.schema);B.flow=!0,B.items.push(ye);let Bt=(re??_).range;B.range=[_.range[0],Bt[1],Bt[2]],c.items.push(B)}f=re?re.range[2]:M.end}}let d=i?"}":"]",[h,...p]=r.end,g=f;if(h?.source===d)g=h.offset+h.source.length;else{let m=a[0].toUpperCase()+a.substring(1),y=u?`${m} must end with a ${d}`:`${m} in block collection must be sufficiently indented and end with a ${d}`;s(f,u?"MISSING_CHAR":"BAD_INDENT",y),h&&h.source.length!==1&&p.unshift(h)}if(p.length>0){let m=ve(p,g,n.options.strict,s);m.comment&&(c.comment?c.comment+=`
|
|
69
|
+
`+m.comment:c.comment=m.comment),c.range=[r.offset,g,m.offset]}else c.range=[r.offset,g,g];return c}function cs(t,e,n,r,s,o){let i=n.type==="block-map"?Xo(t,e,n,r,o):n.type==="block-seq"?Zo(t,e,n,r,o):ei(t,e,n,r,o),a=i.constructor;return s==="!"||s===a.tagName?(i.tag=a.tagName,i):(s&&(i.tag=s),i)}function ti(t,e,n,r,s){let o=r.tag,i=o?e.directives.tagName(o.source,d=>s(o,"TAG_RESOLVE_FAILED",d)):null;if(n.type==="block-seq"){let{anchor:d,newlineAfterProp:h}=r,p=d&&o?d.offset>o.offset?d:o:d??o;p&&(!h||h.offset<p.offset)&&s(p,"MISSING_CHAR","Missing newline after block sequence props")}let a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!i||i==="!"||i===D.tagName&&a==="map"||i===V.tagName&&a==="seq")return cs(t,e,n,s,i);let l=e.schema.tags.find(d=>d.tag===i&&d.collection===a);if(!l){let d=e.schema.knownTags[i];if(d?.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?s(o,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,!0),cs(t,e,n,s,i)}let c=cs(t,e,n,s,i,l),u=l.resolve?.(c,d=>s(o,"TAG_RESOLVE_FAILED",d),e.options)??c,f=T(u)?u:new v(u);return f.range=c.range,f.tag=i,l?.format&&(f.format=l.format),f}function us(t,e,n){let r=e.offset,s=rc(e,t.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};let o=s.mode===">"?v.BLOCK_FOLDED:v.BLOCK_LITERAL,i=e.source?sc(e.source):[],a=i.length;for(let g=i.length-1;g>=0;--g){let m=i[g][1];if(m===""||m==="\r")a=g;else break}if(a===0){let g=s.chomp==="+"&&i.length>0?`
|
|
70
70
|
`.repeat(Math.max(1,i.length-1)):"",m=r+s.length;return e.source&&(m+=e.source.length),{value:g,type:o,comment:s.comment,range:[r,m,m]}}let l=e.indent+s.indent,c=e.offset+s.length,u=0;for(let g=0;g<a;++g){let[m,y]=i[g];if(y===""||y==="\r")s.indent===0&&m.length>l&&(l=m.length);else{m.length<l&&n(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(l=m.length),u=g,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+y.length+1}for(let g=i.length-1;g>=a;--g)i[g][0].length>l&&(a=g+1);let f="",d="",h=!1;for(let g=0;g<u;++g)f+=i[g][0].slice(l)+`
|
|
71
71
|
`;for(let g=u;g<a;++g){let[m,y]=i[g];c+=m.length+y.length+1;let b=y[y.length-1]==="\r";if(b&&(y=y.slice(0,-1)),y&&m.length<l){let S=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(c-y.length-(b?2:1),"BAD_INDENT",S),m=""}o===v.BLOCK_LITERAL?(f+=d+m.slice(l)+y,d=`
|
|
72
72
|
`):m.length>l||y[0]===" "?(d===" "?d=`
|
|
@@ -81,58 +81,58 @@ ${c}
|
|
|
81
81
|
`+i[g][0].slice(l);f[f.length-1]!==`
|
|
82
82
|
`&&(f+=`
|
|
83
83
|
`);break;default:f+=`
|
|
84
|
-
`}let p=r+s.length+e.source.length;return{value:f,type:o,comment:s.comment,range:[r,p,p]}}function
|
|
84
|
+
`}let p=r+s.length+e.source.length;return{value:f,type:o,comment:s.comment,range:[r,p,p]}}function rc({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=e[0],o=s[0],i=0,a="",l=-1;for(let d=1;d<s.length;++d){let h=s[d];if(!a&&(h==="-"||h==="+"))a=h;else{let p=Number(h);!i&&p?i=p:l===-1&&(l=t+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",f=s.length;for(let d=1;d<e.length;++d){let h=e[d];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":n&&!c&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":r(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let p=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",p);let g=h.source;g&&typeof g=="string"&&(f+=g.length)}}}return{mode:o,indent:i,chomp:a,comment:u,length:f}}function sc(t){let e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),o=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let i=1;i<e.length;i+=2)o.push([e[i],e[i+1]]);return o}function fs(t,e,n){let{offset:r,type:s,source:o,end:i}=t,a,l,c=(d,h,p)=>n(r+d,h,p);switch(s){case"scalar":a=v.PLAIN,l=oc(o,c);break;case"single-quoted-scalar":a=v.QUOTE_SINGLE,l=ic(o,c);break;case"double-quoted-scalar":a=v.QUOTE_DOUBLE,l=ac(o,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}let u=r+o.length,f=ve(i,u,e,n);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function oc(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),ni(t)}function ic(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),ni(t.slice(1,-1)).replace(/''/g,"'")}function ni(t){let e=/(.*?)\r?\n/sy,n=e.exec(t);if(!n)return t;let r,s;try{r=new RegExp("(?<![ ])[ ]+$"),s=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{r=/[ \t]+$/,s=/^[ \t]+|[ \t]+$/g}let o=n[1].replace(r,""),i=" ",a=e.lastIndex;for(;n=e.exec(t);){let c=n[1].replace(s,"");c===""?i===`
|
|
85
85
|
`?o+=i:i=`
|
|
86
|
-
`:(o+=i+c,i=" "),a=e.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,n=l.exec(t),o+i+(n?.[1]??"")}function
|
|
86
|
+
`:(o+=i+c,i=" "),a=e.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,n=l.exec(t),o+i+(n?.[1]??"")}function ac(t,e){let n="";for(let r=1;r<t.length-1;++r){let s=t[r];if(!(s==="\r"&&t[r+1]===`
|
|
87
87
|
`))if(s===`
|
|
88
|
-
`){let{fold:o,offset:i}=
|
|
88
|
+
`){let{fold:o,offset:i}=lc(t,r);n+=o,r=i}else if(s==="\\"){let o=t[++r],i=cc[o];if(i)n+=i;else if(o===`
|
|
89
89
|
`)for(o=t[r+1];o===" "||o===" ";)o=t[++r+1];else if(o==="\r"&&t[r+1]===`
|
|
90
|
-
`)for(o=t[++r+1];o===" "||o===" ";)o=t[++r+1];else if(o==="x"||o==="u"||o==="U"){let a=o==="x"?2:o==="u"?4:8;n+=
|
|
90
|
+
`)for(o=t[++r+1];o===" "||o===" ";)o=t[++r+1];else if(o==="x"||o==="u"||o==="U"){let a=o==="x"?2:o==="u"?4:8;n+=uc(t,r+1,a,e),r+=a}else{let a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(s===" "||s===" "){let o=r,i=t[r+1];for(;i===" "||i===" ";)i=t[++r+1];i!==`
|
|
91
91
|
`&&!(i==="\r"&&t[r+2]===`
|
|
92
|
-
`)&&(n+=r>o?t.slice(o,r+1):s)}else n+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function
|
|
92
|
+
`)&&(n+=r>o?t.slice(o,r+1):s)}else n+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function lc(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
|
|
93
93
|
`||r==="\r")&&!(r==="\r"&&t[e+2]!==`
|
|
94
94
|
`);)r===`
|
|
95
95
|
`&&(n+=`
|
|
96
|
-
`),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}var
|
|
97
|
-
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function
|
|
96
|
+
`),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}var cc={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
97
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function uc(t,e,n,r){let s=t.substr(e,n),i=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(i)}catch{let a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function ds(t,e,n,r){let{value:s,type:o,comment:i,range:a}=e.type==="block-scalar"?us(t,e,r):fs(e,t.options.strict,r),l=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[ee]:l?c=fc(t.schema,s,l,n,r):e.type==="scalar"?c=dc(t,s,e,r):c=t.schema[ee];let u;try{let f=c.resolve(s,d=>r(n??e,"TAG_RESOLVE_FAILED",d),t.options);u=I(f)?f:new v(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",d),u=new v(s)}return u.range=a,u.source=s,o&&(u.type=o),l&&(u.tag=l),c.format&&(u.format=c.format),i&&(u.comment=i),u}function fc(t,e,n,r,s){if(n==="!")return t[ee];let o=[];for(let a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(e))return a;let i=t.knownTags[n];return i&&!i.collection?(t.tags.push(Object.assign({},i,{default:!1,test:void 0})),i):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[ee])}function dc({atKey:t,directives:e,schema:n},r,s,o){let i=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[ee];if(n.compat){let a=n.compat.find(l=>l.default&&l.test?.test(r))??n[ee];if(i.tag!==a.tag){let l=e.tagString(i.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;o(s,"TAG_RESOLVE_FAILED",u,!0)}}return i}function ri(t,e,n){if(e){n??(n=e.length);for(let r=n-1;r>=0;--r){let s=e[r];switch(s.type){case"space":case"comment":case"newline":t-=s.source.length;continue}for(s=e[++r];s?.type==="space";)t+=s.source.length,s=e[++r];break}}return t}var hc={composeNode:hs,composeEmptyNode:Xn};function hs(t,e,n,r){let s=t.atKey,{spaceBefore:o,comment:i,anchor:a,tag:l}=n,c,u=!0;switch(e.type){case"alias":c=pc(t,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=ds(t,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=ti(hc,t,e,n,r),a&&(c.anchor=a.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);r(e,"RESOURCE_EXHAUSTION",d)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=!1}}return c??(c=Xn(t,e.offset,void 0,null,n,r)),a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),s&&t.options.stringKeys&&(!I(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(c.spaceBefore=!0),i&&(e.type==="scalar"&&e.source===""?c.comment=i:c.commentBefore=i),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Xn(t,e,n,r,{spaceBefore:s,comment:o,anchor:i,tag:a,end:l},c){let u={type:"scalar",offset:ri(e,n,r),indent:-1,source:""},f=ds(t,u,a,c);return i&&(f.anchor=i.source.substring(1),f.anchor===""&&c(i,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(f.spaceBefore=!0),o&&(f.comment=o,f.range[2]=l),f}function pc({options:t},{offset:e,source:n,end:r},s){let o=new xe(n.substring(1));o.source===""&&s(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&s(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let i=e+n.length,a=ve(r,i,t.strict,s);return o.range=[e,i,a.offset],a.comment&&(o.comment=a.comment),o}function si(t,e,{offset:n,start:r,value:s,end:o},i){let a=Object.assign({_directives:e},t),l=new He(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=_e(r,{indicator:"doc-start",next:s??o?.[0],offset:n,onError:i,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!u.hasNewline&&i(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=s?hs(c,s,u,i):Xn(c,u.end,r,null,u,i);let f=l.contents.range[2],d=ve(o,f,!1,i);return d.comment&&(l.comment=d.comment),l.range=[n,f,d.offset],l}function zt(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function oi(t){let e="",n=!1,r=!1;for(let s=0;s<t.length;++s){let o=t[s];switch(o[0]){case"#":e+=(e===""?"":r?`
|
|
98
98
|
|
|
99
99
|
`:`
|
|
100
|
-
`)+(o.substring(1)||" "),n=!0,r=!1;break;case"%":t[s+1]?.[0]!=="#"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}var
|
|
101
|
-
${r}`:r;else if(s||e.directives.docStart||!o)e.commentBefore=r;else if(
|
|
100
|
+
`)+(o.substring(1)||" "),n=!0,r=!1;break;case"%":t[s+1]?.[0]!=="#"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}var Jt=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,s,o)=>{let i=zt(n);o?this.warnings.push(new Kt(i,r,s)):this.errors.push(new Ce(i,r,s))},this.directives=new ke({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:r,afterEmptyLine:s}=oi(this.prelude);if(r){let o=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
|
101
|
+
${r}`:r;else if(s||e.directives.docStart||!o)e.commentBefore=r;else if(R(o)&&!o.flow&&o.items.length>0){let i=o.items[0];L(i)&&(i=i.key);let a=i.commentBefore;i.commentBefore=a?`${r}
|
|
102
102
|
${a}`:r}else{let i=o.commentBefore;o.commentBefore=i?`${r}
|
|
103
|
-
${i}`:r}}if(n){for(let o=0;o<this.errors.length;++o)e.errors.push(this.errors[o]);for(let o=0;o<this.warnings.length;++o)e.warnings.push(this.warnings[o])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:
|
|
104
|
-
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ce(
|
|
103
|
+
${i}`:r}}if(n){for(let o=0;o<this.errors.length;++o)e.errors.push(this.errors[o]);for(let o=0;o<this.warnings.length;++o)e.warnings.push(this.warnings[o])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:oi(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(let s of e)yield*this.next(s);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,s)=>{let o=zt(e);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",r,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let n=si(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ce(zt(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Ce(zt(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let n=ve(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|
104
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ce(zt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),s=new He(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}};var ps=Symbol("break visit"),gc=Symbol("skip children"),ii=Symbol("remove item");function et(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),ai(Object.freeze([]),t,e)}et.BREAK=ps;et.SKIP=gc;et.REMOVE=ii;et.itemAtPath=(t,e)=>{let n=t;for(let[r,s]of e){let o=n?.[r];if(o&&"items"in o)n=o.items[s];else return}return n};et.parentCollection=(t,e)=>{let n=et.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],s=n?.[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function ai(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(let s of["key","value"]){let o=e[s];if(o&&"items"in o){for(let i=0;i<o.items.length;++i){let a=ai(Object.freeze(t.concat([[s,i]])),o.items[i],n);if(typeof a=="number")i=a-1;else{if(a===ps)return ps;a===ii&&(o.items.splice(i,1),i-=1)}}typeof r=="function"&&s==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}var gs="\uFEFF",ms="",ys="",Zn="";function li(t){switch(t){case gs:return"byte-order-mark";case ms:return"doc-mode";case ys:return"flow-error-end";case Zn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
105
105
|
`:case`\r
|
|
106
106
|
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function ge(t){switch(t){case void 0:case" ":case`
|
|
107
|
-
`:case"\r":case" ":return!0;default:return!1}}var
|
|
108
|
-
\r `),
|
|
107
|
+
`:case"\r":case" ":return!0;default:return!1}}var ci=new Set("0123456789ABCDEFabcdef"),yc=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),er=new Set(",[]{}"),bc=new Set(` ,[]{}
|
|
108
|
+
\r `),bs=t=>!t||bc.has(t),Yt=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
|
109
109
|
`?!0:n==="\r"?this.buffer[e+1]===`
|
|
110
110
|
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){let s=this.buffer[r+e+1];if(s===`
|
|
111
111
|
`||!s&&!this.atEnd)return e+r+1}return n===`
|
|
112
112
|
`||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&ge(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
113
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===
|
|
113
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===gs&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){let o=e[r-1];if(o===" "||o===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let o=e[n-1];if(o===" "||o===" ")n-=1;else break}let s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield ms,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&ge(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ge(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ge(n)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(bs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);let s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&s[0]!=="#"||r===0&&(s.startsWith("---")||s.startsWith("..."))&&ge(s[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield ys,yield*this.parseLineStart();let o=0;for(;s[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),s[o]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(bs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let i=this.charAt(1);if(this.flowKey||ge(i)||i===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}let r=this.buffer.substring(0,n),s=r.indexOf(`
|
|
114
114
|
`,this.pos);if(s!==-1){for(;s!==-1;){let o=this.continueScalar(s+1);if(o===-1)break;s=r.indexOf(`
|
|
115
115
|
`,o)}s!==-1&&(n=s-(r[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>ge(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":n+=1;break;case`
|
|
116
116
|
`:e=o,n=0;break;case"\r":{let i=this.buffer[o+1];if(!i&&!this.atEnd)return this.setNext("block-scalar");if(i===`
|
|
117
117
|
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
|
|
118
118
|
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
119
119
|
`;)r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let o=e-1,i=this.buffer[o];i==="\r"&&(i=this.buffer[--o]);let a=o;for(;i===" ";)i=this.buffer[--o];if(i===`
|
|
120
|
-
`&&o>=this.pos&&o+1+n>a)e=o;else break}while(!0);return yield
|
|
120
|
+
`&&o>=this.pos&&o+1+n>a)e=o;else break}while(!0);return yield Zn,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){let o=this.buffer[r+1];if(ge(o)||e&&er.has(o))break;n=r}else if(ge(s)){let o=this.buffer[r+1];if(s==="\r"&&(o===`
|
|
121
121
|
`?(r+=1,s=`
|
|
122
|
-
`,o=this.buffer[r+1]):n=r),o==="#"||e&&
|
|
123
|
-
`){let i=this.continueScalar(r+1);if(i===-1)break;r=Math.max(r,i-2)}}else{if(e&&
|
|
122
|
+
`,o=this.buffer[r+1]):n=r),o==="#"||e&&er.has(o))break;if(s===`
|
|
123
|
+
`){let i=this.continueScalar(r+1);if(i===-1)break;r=Math.max(r,i-2)}}else{if(e&&er.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield Zn,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(bs),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,r=this.charAt(1);if(ge(r)||n&&er.has(r)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!ge(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(yc.has(n))n=this.buffer[++e];else if(n==="%"&&ci.has(this.buffer[e+1])&&ci.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
124
124
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
125
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");let s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};var
|
|
125
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");let s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};var Qt=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){let o=n+r>>1;this.lineStarts[o]<e?n=o+1:r=o}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let s=this.lineStarts[n-1];return{line:n,col:e-s+1}}}};function Ke(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function ui(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function di(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function tr(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Ct(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function nr(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let n=0;n<e.length;++n)t.push(e[n])}function fi(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Ke(e.start,"explicit-key-ind")&&!Ke(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,di(e.value)?e.value.end?nr(e.value.end,e.sep):e.value.end=e.sep:nr(e.start,e.sep),delete e.sep)}var Xt=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Yt,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let n=li(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&fi(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{let s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{let s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{let s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&ui(s.start)===-1&&(n.indent===0||s.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(r.type==="document"?r.end=s.start:r.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{ui(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let n=tr(this.peek(2)),r=Ct(n),s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
126
126
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
127
|
-
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){
|
|
127
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){nr(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&n.sep&&!n.value){let i=[];for(let a=0;a<n.sep.length;++a){let l=n.sep[a];switch(l.type){case"newline":i.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(i.length=0);break;default:i.length=0}}i.length>=2&&(o=n.sep.splice(i[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ke(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(di(n.key)&&!Ke(n.sep,"newline")){let i=Ct(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:a,sep:l}]})}else o.length>0?n.sep=n.sep.concat(o,this.sourceToken):n.sep.push(this.sourceToken);else if(Ke(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let i=Ct(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Ke(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);s||n.value?(e.items.push({start:o,key:i,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(i):(Object.assign(n,{key:i,sep:[]}),this.onKeyLine=!0);return}default:{let i=this.startBlockValue(e);if(i){if(i.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Ke(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:o});this.stack.push(i);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){nr(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Ke(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let s=tr(r),o=Ct(s);fi(e);let i=e.end.splice(1,e.end.length);i.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
|
|
128
128
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
129
|
-
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=
|
|
129
|
+
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=tr(e),r=Ct(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=tr(e),r=Ct(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function wc(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Qt||null,prettyErrors:e}}function ws(t,e={}){let{lineCounter:n,prettyErrors:r}=wc(e),s=new Xt(n?.addNewLine),o=new Jt(e),i=Array.from(o.compose(s.parse(t)));if(r&&n)for(let a of i)a.errors.forEach(is(t,n)),a.warnings.forEach(is(t,n));return i.length>0?i:Object.assign([],{empty:!0},o.streamInfo())}var Sc=(t,e)=>{let n=new Map;if(t.length>1e5)return n;let r=t.split(`
|
|
130
130
|
`),s=(o,i)=>{for(;i>o&&!r[i]?.trim();)i--;i>o&&n.set(o,Math.max(i,n.get(o)??0))};if(e==="json"||e==="yaml"||e==="yml"){let o=[0];for(let l=0;l<t.length;l++)t[l]===`
|
|
131
|
-
`&&o.push(l+1);let i=l=>{let c=0,u=o.length;for(;c+1<u;){let f=c+u>>>1;(o[f]??0)<=l?c=f:u=f}return c},a=(l,c)=>{let u=i(c-1),f=r[u]?.slice(c-(o[u]??0))??"";s(i(l),/^[\s,}\]]*(?:#.*)?$/.test(f)?u:u-1)};for(let l of
|
|
131
|
+
`&&o.push(l+1);let i=l=>{let c=0,u=o.length;for(;c+1<u;){let f=c+u>>>1;(o[f]??0)<=l?c=f:u=f}return c},a=(l,c)=>{let u=i(c-1),f=r[u]?.slice(c-(o[u]??0))??"";s(i(l),/^[\s,}\]]*(?:#.*)?$/.test(f)?u:u-1)};for(let l of ws(t))l.errors.length||se(l,(c,u)=>{if(L(u)&&T(u.key)&&T(u.value)?u.key.range&&u.value.range&&a(u.key.range[0],u.value.range[1]):R(u)&&u.flow&&u.range&&a(u.range[0],u.range[1]),te(u)&&!u.flow)for(let f of u.items)T(f)&&f.range&&a(f.range[0],f.range[1])})}else if(e==="toml"){let o=[],i=[],a="",l=0;r.forEach((c,u)=>{let f=!!a,d="";for(let h=0;h<c.length;h++){let p=c[h]??"";if(a)a[0]==='"'&&p==="\\"?h++:c.slice(h,h+a.length)===a&&(a.length===3&&s(l,u),h+=a.length-1,a="");else{if(p==="#")break;p==='"'||p==="'"?(a=c.slice(h,h+3)===p.repeat(3)?p.repeat(3):p,l=u,h+=a.length-1,d+="x"):d+=p}}if(!f&&!i.length&&/^\s*\[\[?.+\]\]?\s*$/.test(d)){o.push(u);return}for(let h of d)if(h==="["||h==="{")i.push({char:h,line:u});else if(h==="]"||h==="}"){let p=i.pop();p&&(p.char==="["?h==="]":h==="}")&&s(p.line,u)}}),o.forEach((c,u)=>{s(c,(o[u+1]??r.length)-1)})}return n},hi=new WeakMap,pi=(t,e,n,r)=>{let s=Sc(e,n);if(!r.length&&!s.size)return;let o=hi.get(t);(!o||o.source!==e||o.language!==n)&&(o={source:e,language:n,folded:new Set},hi.set(t,o));let i=o.folded,a=e.split(`
|
|
132
132
|
`),l=[],c=[],u=()=>{let f=-1;c.forEach((d,h)=>{d.hidden=h<=f,d.classList.toggle("code-line-folded",i.has(h));let p=d.querySelector("button");if(p){let g=i.has(h)?"Expand section":"Collapse section",m=window.__docsTranslate;p.setAttribute("aria-expanded",String(!i.has(h))),p.setAttribute("aria-label",m?.(g)??g),p.title=p.getAttribute("aria-label")??g,p.dataset.i18nTitle=g,p.dataset.i18nAriaLabel=g}i.has(h)&&(f=Math.max(f,s.get(h)??h))})};a.forEach((f,d)=>{let h=document.createElement("span");h.className="code-line";let p=document.createElement("span");p.className="code-line-text";let g=r[d];for(let m of g?.map(y=>y.content).join("")===f?g:[{content:f}]){let y=document.createElement("span");m.color&&(y.style.color=m.color),y.textContent=m.content,p.append(y)}if(s.has(d)){let m=document.createElement("button");m.type="button",m.className="code-section-fold",m.innerHTML='<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4 6 4 4 4-4"/></svg>',m.addEventListener("click",()=>{i.delete(d)||i.add(d),u()}),h.append(m)}h.append(p),d<a.length-1&&h.append(document.createTextNode(`
|
|
133
|
-
`)),c.push(h),l.push(h)}),t.classList.toggle("code-foldable",s.size>0),t.replaceChildren(...l),u()};var P=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function wc(t){return xs(t)}function xs(t){return Array.isArray(t)?kc(t):t instanceof RegExp?t:typeof t=="object"?Sc(t):t}function kc(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=xs(t[n]);return e}function Sc(t){let e={};for(let n in t)e[n]=xs(t[n]);return e}function ki(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Si(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Si(t.substring(0,t.length-1)):t.substr(~e+1)}var ws=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,nr=class{static hasCaptures(t){return t===null?!1:(ws.lastIndex=0,ws.test(t))}static replaceCaptures(t,e,n){return t.replace(ws,(r,s,o,i)=>{let a=n[parseInt(s||o,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(i){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Ci(t,e){return t<e?-1:t>e?1:0}function _i(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Ci(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function di(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function vi(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ei=class{constructor(t){this.fn=t}fn;cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},en=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}_colorMap;_defaults;_root;static createFromRawTheme(t,e){return this.createFromParsedTheme(vc(t),e)}static createFromParsedTheme(t,e){return Ac(t,e)}_cachedMatchRoot=new Ei(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Cc(t.parent,s.parentScopes));return r?new Ai(r.fontStyle,r.foreground,r.background):null}},ks=class rr{constructor(e,n){this.parent=e,this.scopeName=n}parent;scopeName;static push(e,n){for(let r of n)e=new rr(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new rr(n,e[r]);return n}push(e){return new rr(this,e)}getSegments(){let e=this,n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Cc(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!_c(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function _c(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ai=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}fontStyle;foregroundId;backgroundId};function vc(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let a;if(typeof i.scope=="string"){let f=i.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),a=f.split(",")}else Array.isArray(i.scope)?a=i.scope:a=[""];let l=-1;if(typeof i.settings.fontStyle=="string"){l=0;let f=i.settings.fontStyle.split(" ");for(let d=0,h=f.length;d<h;d++)switch(f[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof i.settings.foreground=="string"&&di(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&di(i.settings.background)&&(u=i.settings.background);for(let f=0,d=a.length;f<d;f++){let p=a[f].trim().split(" "),g=p[p.length-1],m=null;p.length>1&&(m=p.slice(0,p.length-1),m.reverse()),n[r++]=new Ec(g,m,s,l,c,u)}}return n}var Ec=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}scope;parentScopes;index;fontStyle;foreground;background},K=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(K||{});function Ac(t,e){t.sort((l,c)=>{let u=Ci(l.scope,c.scope);return u!==0||(u=_i(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(s=l.background)}let o=new Nc(e),i=new Ai(n,o.getId(r),o.getId(s)),a=new Ic(new Cs(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];a.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new en(o,i,a)}var Nc=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},xc=Object.freeze([]),Cs=class Ni{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||xc,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ni(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Ic=class _s{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_mainRule;_children;_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){let o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(_s._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new _s(this._mainRule.clone(),Cs.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,a=this._rulesWithParentScopes.length;i<a;i++){let l=this._rulesWithParentScopes[i];if(_i(l.parentScopes,n)===0){l.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Cs(e,n,r,s,o))}},Ve=class ie{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=ie.getLanguageId(e),r=ie.getTokenType(e),s=ie.getFontStyle(e),o=ie.getForeground(e),i=ie.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,a){let l=ie.getLanguageId(e),c=ie.getTokenType(e),u=ie.containsBalancedBrackets(e)?1:0,f=ie.getFontStyle(e),d=ie.getForeground(e),h=ie.getBackground(e);return n!==0&&(l=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(f=o),i!==0&&(d=i),a!==0&&(h=a),(l<<0|c<<8|u<<10|f<<11|d<<15|h<<24)>>>0}};function or(t,e){let n=[],r=Tc(t),s=r.next();for(;s!==null;){let l=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:l}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();let l=o();return c=>!!l&&!l(c)}if(s==="("){s=r.next();let l=a();return s===")"&&(s=r.next()),l}if(hi(s)){let l=[];do l.push(s),s=r.next();while(hi(s));return c=>e(l,c)}return null}function i(){let l=[],c=o();for(;c;)l.push(c),c=o();return u=>l.every(f=>f(u))}function a(){let l=[],c=i();for(;c&&(l.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>l.some(f=>f(u))}}function hi(t){return!!t&&!!t.match(/[\w\.:]+/)}function Tc(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function xi(t){typeof t.dispose=="function"&&t.dispose()}var tn=class{constructor(t){this.scopeName=t}scopeName;toKey(){return this.scopeName}},Lc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;toKey(){return`${this.scopeName}#${this.ruleName}`}},Bc=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Rc=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new tn(this.initialScopeName)]}repo;initialScopeName;seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new Bc;for(let n of t)Oc(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof tn){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Oc(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}let o=n.lookup(e);t instanceof tn?sr({baseGrammar:o,selfGrammar:s},r):vs(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);let i=n.injections(t.scopeName);if(i)for(let a of i)r.add(new tn(a))}function vs(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];ir([r],e,n)}}function sr(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ir(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ir(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ir(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?ki({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&ir(r.patterns,{...e,repository:s},n);let o=r.include;if(!o)continue;let i=Ii(o);switch(i.kind){case 0:sr({...e,selfGrammar:e.baseGrammar},n);break;case 1:sr(e,n);break;case 2:vs(i.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};i.kind===4?vs(i.ruleName,l,n):sr(l,n)}else i.kind===4?n.add(new Lc(i.scopeName,i.ruleName)):n.add(new tn(i.scopeName));break}}}var Pc=class{kind=0},$c=class{kind=1},Mc=class{constructor(t){this.ruleName=t}ruleName;kind=2},Fc=class{constructor(t){this.scopeName=t}scopeName;kind=3},Dc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;kind=4};function Ii(t){if(t==="$base")return new Pc;if(t==="$self")return new $c;let e=t.indexOf("#");if(e===-1)return new Fc(t);if(e===0)return new Mc(t.substring(1));{let n=t.substring(0,e),r=t.substring(e+1);return new Dc(n,r)}}var Gc=/\\(\d+)/,pi=/\\(\d+)/g,jc=-1,Ti=-2;var sn=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=nr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=nr.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Si(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:nr.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:nr.replaceCaptures(this._contentName,t,e)}},Uc=class extends sn{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},qc=class extends sn{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new nn(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rn,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gi=class extends sn{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rn,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Es=class extends sn{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,a,l,c){super(t,e,n,r),this._begin=new nn(s,this.id),this.beginCaptures=o,this._end=new nn(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rn;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},ar=class extends sn{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,a,l){super(t,e,n,r),this._begin=new nn(s,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new nn(i,Ti),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(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rn;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new rn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"\uFFFF"),this._cachedCompiledWhilePatterns}},Li=class J{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Uc(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new qc(e.$vscodeTextmateLocation,e.id,e.name,e.match,J._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=ki({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gi(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,J._compilePatterns(o,n,r))}return e.while?new ar(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,J._compileCaptures(e.whileCaptures||e.captures,n,r),J._compilePatterns(e.patterns,n,r)):new Es(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,J._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,J._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(let i in e){if(i==="$vscodeTextmateLocation")continue;let a=parseInt(i,10);a>o&&(o=a)}for(let i=0;i<=o;i++)s[i]=null;for(let i in e){if(i==="$vscodeTextmateLocation")continue;let a=parseInt(i,10),l=0;e[i].patterns&&(l=J.getCompiledRuleId(e[i],n,r)),s[a]=J.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,l)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){let a=e[o],l=-1;if(a.include){let c=Ii(a.include);switch(c.kind){case 0:case 1:l=J.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=J.getCompiledRuleId(u,n,r));break;case 3:case 4:let f=c.scopeName,d=c.kind===4?c.ruleName:null,h=n.getExternalGrammar(f,r);if(h)if(d){let p=h.repository[d];p&&(l=J.getCompiledRuleId(p,n,h.repository))}else l=J.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=J.getCompiledRuleId(a,n,r);if(l!==-1){let c=n.getRule(l),u=!1;if((c instanceof gi||c instanceof Es||c instanceof ar)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(l)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},nn=class Bi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){let r=e.length,s=0,o=[],i=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){let c=e.charAt(a+1);c==="z"?(o.push(e.substring(s,a)),o.push("$(?!\\n)(?<!\\n)"),s=a+2):(c==="A"||c==="G")&&(i=!0),a++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Gc.test(this.source):this.hasBackReferences=!1}clone(){return new Bi(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return pi.lastIndex=0,this.source.replace(pi,(s,o)=>vi(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,a,l;for(o=0,i=this.source.length;o<i;o++)a=this.source.charAt(o),e[o]=a,n[o]=a,r[o]=a,s[o]=a,a==="\\"&&o+1<i&&(l=this.source.charAt(o+1),l==="A"?(e[o+1]="\uFFFF",n[o+1]="\uFFFF",r[o+1]="A",s[o+1]="A"):l==="G"?(e[o+1]="\uFFFF",n[o+1]="G",r[o+1]="\uFFFF",s[o+1]="G"):(e[o+1]=l,n[o+1]=l,r[o+1]=l,s[o+1]=l),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},rn=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new mi(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new mi(t,r,this._items.map(s=>s.ruleId))}},mi=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}regExps;rules;scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
134
|
-
`)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},
|
|
135
|
-
`;let o=this.createOnigString(t),i=o.content.length,a=new nu(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Oi(this,o,s,0,e,a,!0,r);return xi(o),{lineLength:i,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function wi(t,e){return t=wc(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var Zt=class Ee{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}parent;scopePath;tokenAttributes;static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let o of n)s=ks.push(s,o.scopeNames),r=new Ee(r,s,o.encodedTokenAttributes);return r}static createRoot(e,n){return new Ee(null,new ks(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),o=new ks(null,e),i=r.themeProvider.themeMatch(o),a=Ee.mergeAttributes(n,s,i);return new Ee(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Ee.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,o=0,i=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,i=r.backgroundId),Ve.set(e,n.languageId,n.tokenType,null,s,o,i)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return Ee._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let o of r)s=Ee._pushAttributed(s,o,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),o=e.scopePath.push(n),i=r.themeProvider.themeMatch(o),a=Ee.mergeAttributes(e.tokenAttributes,s,i);return new Ee(e,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Ns=class tt{constructor(e,n,r,s,o,i,a,l){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}parent;ruleId;beginRuleCapturedEOL;endRule;nameScopesList;contentNameScopesList;_stackElementBrand=void 0;static NULL=new tt(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:tt._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?Zt.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){tt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,s,o,i,a){return new tt(this,e,n,r,s,o,i,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new tt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=Zt.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new tt(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Zt.fromExtension(r,n.contentNameScopesList))}},tu=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):or(n,lr).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>or(n,lr).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},nu=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}balancedBracketSelectors;_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let o=t?.getScopeNames()??[];for(let i of this._tokenTypeOverrides)i.matcher(o)&&(r=Ve.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(r=Ve.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},ru=class{constructor(t,e){this._onigLib=e,this._theme=t}_onigLib;_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,Xc(t,o,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},Mi=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new ru(en.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(en.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new tu(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let o=new Rc(this._syncRegistry,t);for(;o.Q.length>0;)o.Q.map(i=>this._loadSingleGrammar(i.scopeName)),o.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},cr=Ns.NULL;function an(t,e){let n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(let[s,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function Le(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Ui(t){return Array.isArray(t)?t:[t]}async function Is(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ln(t){return!t||["plaintext","txt","text","plain"].includes(t)}function qi(t){return t==="ansi"||ln(t)}function cn(t){return t==="none"}function Hi(t){return cn(t)}var su=/(\r?\n)/g;function Ct(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(su),r=0,s=[];for(let o=0;o<n.length;o+=2){let i=e?n[o]+(n[o+1]||""):n[o];s.push([i,r]),r+=n[o].length,r+=n[o+1]?.length||0}return s}var Fi={light:"#333333",dark:"#bbbbbb"},Di={light:"#fffffe",dark:"#1e1e1e"},Gi="__shiki_resolved";function ur(t){if(t?.[Gi])return t;let e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let a=e.settings?e.settings.find(l=>!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Fi.light:Fi.dark),n||(n=e.type==="light"?Di.light:Di.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,o=new Map;function i(a){if(o.has(a))return o.get(a);s+=1;let l=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${l}`]?i(a):(o.set(a,l),l)}e.settings=e.settings.map(a=>{let l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),c=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!c)return a;let u={...a,settings:{...a.settings}};if(l){let f=i(a.settings.foreground);e.colorReplacements[f]=a.settings.foreground,u.settings.foreground=f}if(c){let f=i(a.settings.background);e.colorReplacements[f]=a.settings.background,u.settings.background=f}return u});for(let a of Object.keys(e.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!e.colors[a]?.startsWith("#")){let l=i(e.colors[a]);e.colorReplacements[l]=e.colors[a],e.colors[a]=l}return Object.defineProperty(e,Gi,{enumerable:!1,writable:!1,value:!0}),e}async function Wi(t){return[...new Set((await Promise.all(t.filter(e=>!qi(e)).map(async e=>await Is(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Ki(t){return(await Promise.all(t.map(async e=>Hi(e)?null:ur(await Is(e))))).filter(e=>!!e)}function Vi(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new P(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var ou=class extends Mi{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){let e=ur(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=en.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Vi(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,e.size)for(let s of e)this._syncRegistry?._grammars?.get(s.scopeName)?.dispose(),this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(i=>n.map(([a])=>a).includes(i)):!1).filter(s=>!n.includes(s));throw new P(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},iu=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).includes(t.scopeName)||this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},on=0;function Ts(t){on+=1,t.warnings!==!1&&on>=10&&on%10===0&&console.warn(`[Shiki] ${on} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new P("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(ur),s=new ou(new iu(t.engine,n),r,n,t.langAlias),o;function i(b){return Vi(b,t.langAlias)}function a(b){m();let w=s.getGrammar(typeof b=="string"?b:b.name);if(!w)throw new P(`Language \`${b}\` not found, you may need to load it first`);return w}function l(b){if(b==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};m();let w=s.getTheme(b);if(!w)throw new P(`Theme \`${b}\` not found, you may need to load it first`);return w}function c(b){m();let w=l(b);return o!==b&&(s.setTheme(w),o=b),{theme:w,colorMap:s.getColorMap()}}function u(){return m(),s.getLoadedThemes()}function f(){return m(),s.getLoadedLanguages()}function d(...b){m(),s.loadLanguages(b.flat(1))}async function h(...b){return d(await Wi(b))}function p(...b){m();for(let w of b.flat(1))s.loadTheme(w)}async function g(...b){return m(),p(await Ki(b))}function m(){if(e)throw new P("Shiki instance has been disposed")}function y(){e||(e=!0,s.dispose(),on-=1)}return{setTheme:c,getTheme:l,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:f,resolveLangAlias:i,loadLanguage:h,loadLanguageSync:d,loadTheme:g,loadThemeSync:p,dispose:y,[Symbol.dispose]:y}}async function Ls(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([Ki(t.themes||[]),Wi(t.langs||[]),t.engine]);return Ts({...t,themes:e,langs:n,engine:r})}var zi=new WeakMap;function un(t,e){zi.set(t,e)}function _t(t){return zi.get(t)}var fr=class Ji{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Ji(Object.fromEntries(Ui(n).map(r=>[r,cr])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return au(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function au(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let o=s?.nameScopesList?.scopeName;o&&e.push(o),s.parent&&r(s.parent)}return r(t),e}function lu(t,e){if(!(t instanceof fr))throw new P("Invalid grammar state");return t.getInternalStack(e)}var cu=/,/,uu=/ /;function Bs(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(ln(t.resolveLangAlias(n.lang||"text"))||cn(r))return Ct(e).map(a=>[{content:a[0],offset:a[1]}]);let{theme:s,colorMap:o}=t.setTheme(r),i=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new P(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(s.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Qi(e,i,s,o,n)}function Yi(...t){if(t.length===2)return _t(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:o=e.getLoadedThemes()[0]}=r;if(ln(s)||cn(o))throw new P("Plain language does not have grammar state");if(s==="ansi")throw new P("ANSI language does not have grammar state");let{theme:i,colorMap:a}=e.setTheme(o),l=e.getLanguage(s);return new fr(Rs(n,l,i,a,r).stateStack,l.name,i.name)}function Qi(t,e,n,r,s){let o=Rs(t,e,n,r,s),i=new fr(o.stateStack,e.name,n.name);return un(o.tokens,i),o.tokens}function Rs(t,e,n,r,s){let o=an(n,s),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=s,c=Ct(t),u=s.grammarState?lu(s.grammarState,n.name)??cr:s.grammarContextCode!=null?Rs(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:cr,f=[],d=[];for(let h=0,p=c.length;h<p;h++){let[g,m]=c[h];if(g===""){f=[],d.push([]);continue}if(i>0&&g.length>=i){f=[],d.push([{content:g,offset:m,color:"",fontStyle:0}]);continue}let y,b,w;l&&l!=="tokenType"&&(y=e.tokenizeLine(g,u,a),b=y.tokens,w=0);let S=e.tokenizeLine2(g,u,a),C=S.tokens.length/2;for(let E=0;E<C;E++){let x=S.tokens[2*E],_=E+1<C?S.tokens[2*E+2]:g.length;if(x===_)continue;let $=S.tokens[2*E+1],re=Le(r[Ve.getForeground($)],o),ye=Ve.getFontStyle($),R={content:g.substring(x,_),offset:m+x,color:re,fontStyle:ye};if(l==="tokenType")R.type=Ve.getTokenType($);else if(l){let Bt=[];if(l!=="scopeName")for(let Ae of n.settings){let ut;switch(typeof Ae.scope){case"string":ut=Ae.scope.split(cu).map(Gr=>Gr.trim());break;case"object":ut=Ae.scope;break;default:continue}Bt.push({settings:Ae,selectors:ut.map(Gr=>Gr.split(uu))})}R.explanation=[];let wo=0;for(;x+wo<_;){let Ae=b[w],ut=g.substring(Ae.startIndex,Ae.endIndex);wo+=ut.length,R.explanation.push({content:ut,scopes:l==="scopeName"?fu(Ae.scopes):du(Bt,Ae.scopes)}),w+=1}}f.push(R)}d.push(f),f=[],u=S.ruleStack}return{tokens:d,stateStack:u}}function fu(t){return t.map(e=>({scopeName:e}))}function du(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let o=e[r];n[r]={scopeName:o,themeMatches:pu(t,o,e.slice(0,r))}}return n}function ji(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function hu(t,e,n){if(!ji(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;for(;r>=0&&s>=0;)ji(t[r],n[s])&&(r-=1),s-=1;return r===-1}function pu(t,e,n){let r=[];for(let{selectors:s,settings:o}of t)for(let i of s)if(hu(i,e,n)){r.push(o);break}return r}function dr(t,e,n,r=Bs){let s=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),o=s.map(c=>{let u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:_t(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=gu(...o.map(c=>c.tokens)),a=i[0].map((c,u)=>c.map((f,d)=>{let h={content:f.content,variants:{},offset:f.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=f.explanation),i.forEach((p,g)=>{let{content:m,explanation:y,offset:b,...w}=p[u][d];h.variants[s[g].color]=w}),h})),l=o[0].state?new fr(Object.fromEntries(o.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),o[0].state.lang):void 0;return l&&un(a,l),a}function gu(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map(l=>l[r]),o=e.map(()=>[]);e.forEach((l,c)=>l.push(o[c]));let i=s.map(()=>0),a=s.map(l=>l[0]);for(;a.every(l=>l);){let l=Math.min(...a.map(c=>c.content.length));for(let c=0;c<n;c++){let u=a[c];u.content.length===l?(o[c].push(u),i[c]+=1,a[c]=s[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,l)}),a[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return e}var Xi=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Be=class{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}};Be.prototype.normal={};Be.prototype.property={};Be.prototype.space=void 0;function Os(t,e){let n={},r={};for(let s of t)Object.assign(n,s.property),Object.assign(r,s.normal);return new Be(n,r,e)}function fn(t){return t.toLowerCase()}var W=class{constructor(e,n){this.attribute=n,this.property=e}};W.prototype.attribute="";W.prototype.booleanish=!1;W.prototype.boolean=!1;W.prototype.commaOrSpaceSeparated=!1;W.prototype.commaSeparated=!1;W.prototype.defined=!1;W.prototype.mustUseProperty=!1;W.prototype.number=!1;W.prototype.overloadedBoolean=!1;W.prototype.property="";W.prototype.spaceSeparated=!1;W.prototype.space=void 0;var dn={};jr(dn,{boolean:()=>A,booleanish:()=>F,commaOrSpaceSeparated:()=>X,commaSeparated:()=>Re,number:()=>k,overloadedBoolean:()=>hr,spaceSeparated:()=>O});var mu=0,A=nt(),F=nt(),hr=nt(),k=nt(),O=nt(),Re=nt(),X=nt();function nt(){return 2**++mu}var Ps=Object.keys(dn),rt=class extends W{constructor(e,n,r,s){let o=-1;if(super(e,n),Zi(this,"space",s),typeof r=="number")for(;++o<Ps.length;){let i=Ps[o];Zi(this,Ps[o],(r&dn[i])===dn[i])}}};rt.prototype.defined=!0;function Zi(t,e,n){n&&(t[e]=n)}function ae(t){let e={},n={};for(let[r,s]of Object.entries(t.properties)){let o=new rt(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[fn(r)]=r,n[fn(o.attribute)]=r}return new Be(e,n,t.space)}var $s=ae({properties:{ariaActiveDescendant:null,ariaAtomic:F,ariaAutoComplete:null,ariaBusy:F,ariaChecked:F,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:O,ariaCurrent:null,ariaDescribedBy:O,ariaDetails:null,ariaDisabled:F,ariaDropEffect:O,ariaErrorMessage:null,ariaExpanded:F,ariaFlowTo:O,ariaGrabbed:F,ariaHasPopup:null,ariaHidden:F,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:O,ariaLevel:k,ariaLive:null,ariaModal:F,ariaMultiLine:F,ariaMultiSelectable:F,ariaOrientation:null,ariaOwns:O,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:F,ariaReadOnly:F,ariaRelevant:null,ariaRequired:F,ariaRoleDescription:O,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:F,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function pr(t,e){return e in t?t[e]:e}function gr(t,e){return pr(t,e.toLowerCase())}var ea=ae({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Re,acceptCharset:O,accessKey:O,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alpha:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:O,autoFocus:A,autoPlay:A,blocking:O,capture:null,charSet:null,checked:A,cite:null,className:O,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:F,controls:A,controlsList:O,coords:k|Re,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:hr,draggable:F,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:O,height:k,hidden:hr,high:k,href:null,hrefLang:null,htmlFor:O,httpEquiv:O,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:O,itemRef:O,itemScope:A,itemType:O,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:A,optimum:k,pattern:null,ping:O,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:O,required:A,reversed:A,rows:k,rowSpan:k,sandbox:O,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootCustomElementRegistry:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shadowRootSerializable:A,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:F,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:F,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:O,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:F,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:A,disablePictureInPicture:A,disableRemotePlayback:A,exportParts:Re,part:O,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:gr});var ta=ae({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:X,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:O,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Re,g2:Re,glyphName:Re,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:X,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:O,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:X,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:X,rev:X,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:X,requiredFeatures:X,requiredFonts:X,requiredFormats:X,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:X,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:X,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:X,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pr});var Ms=ae({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}});var Fs=ae({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:gr});var Ds=ae({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var yu=/[A-Z]/g,na=/-[a-z]/g,bu=/^data[-\w.:]+$/i;function Gs(t,e){let n=fn(e),r=e,s=W;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bu.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(na,ku);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!na.test(o)){let i=o.replace(yu,wu);i.charAt(0)!=="-"&&(i="-"+i),e="data"+i}}s=rt}return new s(r,e)}function wu(t){return"-"+t.toLowerCase()}function ku(t){return t.charAt(1).toUpperCase()}var mr=Os([$s,ea,Ms,Fs,Ds],"html"),yr=Os([$s,ta,Ms,Fs,Ds],"svg");var ra={}.hasOwnProperty;function sa(t,e){let n=e||{};function r(s,...o){let i=r.invalid,a=r.handlers;if(s&&ra.call(s,t)){let l=String(s[t]);i=ra.call(a,l)?a[l]:r.unknown}if(i)return i.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Su=/["&'<>`]/g,Cu=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_u=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,vu=/[|\\{}()[\]^$+*?.]/g,oa=new WeakMap;function ia(t,e){if(t=t.replace(e.subset?Eu(e.subset):Su,r),e.subset||e.escapeOnly)return t;return t.replace(Cu,n).replace(_u,r);function n(s,o,i){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),e)}function r(s,o,i){return e.format(s.charCodeAt(0),i.charCodeAt(o+1),e)}}function Eu(t){let e=oa.get(t);return e||(e=Au(t),oa.set(t,e)),e}function Au(t){let e=[],n=-1;for(;++n<t.length;)e.push(t[n].replace(vu,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var Nu=/[\dA-Fa-f]/;function aa(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Nu.test(String.fromCharCode(e))?r:r+";"}var xu=/\d/;function la(t,e,n){let r="&#"+String(t);return n&&e&&!xu.test(String.fromCharCode(e))?r:r+";"}var ca=["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"];var br={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var ua=["cent","copy","divide","gt","lt","not","para","times"];var fa={}.hasOwnProperty,js={},wr;for(wr in br)fa.call(br,wr)&&(js[br[wr]]=wr);var Iu=/[^\dA-Za-z]/;function da(t,e,n,r){let s=String.fromCharCode(t);if(fa.call(js,s)){let o=js[s],i="&"+o;return n&&ca.includes(o)&&!ua.includes(o)&&(!r||e&&e!==61&&Iu.test(String.fromCharCode(e)))?i:i+";"}return""}function ha(t,e,n){let r=aa(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=da(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){let o=la(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function Oe(t,e){return ia(t,Object.assign({format:ha},e))}var Tu=/^>|^->|<!--|-->|--!>|<!-$/g,Lu=[">"],Bu=["<",">"];function pa(t,e,n,r){return r.settings.bogusComments?"<?"+Oe(t.value,Object.assign({},r.settings.characterReferences,{subset:Lu}))+">":"<!--"+t.value.replace(Tu,s)+"-->";function s(o){return Oe(o,Object.assign({},r.settings.characterReferences,{subset:Bu}))}}function ga(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Us(t,e){let n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(e);for(;s!==-1;)r++,s=n.indexOf(e,s+e.length);return r}function ma(t,e){let n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ya(t){return t.join(" ").trim()}var Ru=/[ \t\n\f\r]/g;function st(t){return typeof t=="object"?t.type==="text"?ba(t.value):!1:ba(t)}function ba(t){return t.replace(Ru,"")===""}var G=wa(1),qs=wa(-1),Ou=[];function wa(t){return e;function e(n,r,s){let o=n?n.children:Ou,i=(r||0)+t,a=o[i];if(!s)for(;a&&st(a);)i+=t,a=o[i];return a}}var Pu={}.hasOwnProperty;function kr(t){return e;function e(n,r,s){return Pu.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var hn=kr({body:Mu,caption:Hs,colgroup:Hs,dd:ju,dt:Gu,head:Hs,html:$u,li:Du,optgroup:Uu,option:qu,p:Fu,rp:ka,rt:ka,tbody:Wu,td:Sa,tfoot:Ku,th:Sa,thead:Hu,tr:Vu});function Hs(t,e,n){let r=G(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&st(r.value.charAt(0)))}function $u(t,e,n){let r=G(n,e);return!r||r.type!=="comment"}function Mu(t,e,n){let r=G(n,e);return!r||r.type!=="comment"}function Fu(t,e,n){let r=G(n,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"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"||n.tagName.includes("-")))}function Du(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Gu(t,e,n){let r=G(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ju(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ka(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Uu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function qu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Hu(t,e,n){let r=G(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Wu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Ku(t,e,n){return!G(n,e)}function Vu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Sa(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var Ca=kr({body:Yu,colgroup:Qu,head:Ju,html:zu,tbody:Xu});function zu(t){let e=G(t,-1);return!e||e.type!=="comment"}function Ju(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function Yu(t){let e=G(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&st(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Qu(t,e,n){let r=qs(n,e);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&hn(r,n.children.indexOf(r),n))return!1;let s=G(t,-1,!0);return!!(s&&s.type==="element"&&s.tagName==="col")}function Xu(t,e,n){let r=qs(n,e);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&hn(r,n.children.indexOf(r),n))return!1;let s=G(t,-1);return!!(s&&s.type==="element"&&s.tagName==="tr")}var Sr={name:[[`
|
|
133
|
+
`)),c.push(h),l.push(h)}),t.classList.toggle("code-foldable",s.size>0),t.replaceChildren(...l),u()};var P=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Cc(t){return Is(t)}function Is(t){return Array.isArray(t)?_c(t):t instanceof RegExp?t:typeof t=="object"?vc(t):t}function _c(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Is(t[n]);return e}function vc(t){let e={};for(let n in t)e[n]=Is(t[n]);return e}function _i(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function vi(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?vi(t.substring(0,t.length-1)):t.substr(~e+1)}var ks=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,rr=class{static hasCaptures(t){return t===null?!1:(ks.lastIndex=0,ks.test(t))}static replaceCaptures(t,e,n){return t.replace(ks,(r,s,o,i)=>{let a=n[parseInt(s||o,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(i){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Ei(t,e){return t<e?-1:t>e?1:0}function Ai(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Ei(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function gi(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Ni(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var xi=class{constructor(t){this.fn=t}fn;cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},tn=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}_colorMap;_defaults;_root;static createFromRawTheme(t,e){return this.createFromParsedTheme(Nc(t),e)}static createFromParsedTheme(t,e){return Ic(t,e)}_cachedMatchRoot=new xi(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Ec(t.parent,s.parentScopes));return r?new Ii(r.fontStyle,r.foreground,r.background):null}},Ss=class sr{constructor(e,n){this.parent=e,this.scopeName=n}parent;scopeName;static push(e,n){for(let r of n)e=new sr(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new sr(n,e[r]);return n}push(e){return new sr(this,e)}getSegments(){let e=this,n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Ec(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!Ac(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Ac(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ii=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}fontStyle;foregroundId;backgroundId};function Nc(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let a;if(typeof i.scope=="string"){let f=i.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),a=f.split(",")}else Array.isArray(i.scope)?a=i.scope:a=[""];let l=-1;if(typeof i.settings.fontStyle=="string"){l=0;let f=i.settings.fontStyle.split(" ");for(let d=0,h=f.length;d<h;d++)switch(f[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof i.settings.foreground=="string"&&gi(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&gi(i.settings.background)&&(u=i.settings.background);for(let f=0,d=a.length;f<d;f++){let p=a[f].trim().split(" "),g=p[p.length-1],m=null;p.length>1&&(m=p.slice(0,p.length-1),m.reverse()),n[r++]=new xc(g,m,s,l,c,u)}}return n}var xc=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}scope;parentScopes;index;fontStyle;foreground;background},K=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(K||{});function Ic(t,e){t.sort((l,c)=>{let u=Ei(l.scope,c.scope);return u!==0||(u=Ai(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(s=l.background)}let o=new Tc(e),i=new Ii(n,o.getId(r),o.getId(s)),a=new Rc(new _s(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];a.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new tn(o,i,a)}var Tc=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Lc=Object.freeze([]),_s=class Ti{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||Lc,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ti(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Rc=class vs{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_mainRule;_children;_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){let o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(vs._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new vs(this._mainRule.clone(),_s.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,a=this._rulesWithParentScopes.length;i<a;i++){let l=this._rulesWithParentScopes[i];if(Ai(l.parentScopes,n)===0){l.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new _s(e,n,r,s,o))}},Ve=class ie{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=ie.getLanguageId(e),r=ie.getTokenType(e),s=ie.getFontStyle(e),o=ie.getForeground(e),i=ie.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,a){let l=ie.getLanguageId(e),c=ie.getTokenType(e),u=ie.containsBalancedBrackets(e)?1:0,f=ie.getFontStyle(e),d=ie.getForeground(e),h=ie.getBackground(e);return n!==0&&(l=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(f=o),i!==0&&(d=i),a!==0&&(h=a),(l<<0|c<<8|u<<10|f<<11|d<<15|h<<24)>>>0}};function ir(t,e){let n=[],r=Bc(t),s=r.next();for(;s!==null;){let l=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:l}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();let l=o();return c=>!!l&&!l(c)}if(s==="("){s=r.next();let l=a();return s===")"&&(s=r.next()),l}if(mi(s)){let l=[];do l.push(s),s=r.next();while(mi(s));return c=>e(l,c)}return null}function i(){let l=[],c=o();for(;c;)l.push(c),c=o();return u=>l.every(f=>f(u))}function a(){let l=[],c=i();for(;c&&(l.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>l.some(f=>f(u))}}function mi(t){return!!t&&!!t.match(/[\w\.:]+/)}function Bc(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function Li(t){typeof t.dispose=="function"&&t.dispose()}var nn=class{constructor(t){this.scopeName=t}scopeName;toKey(){return this.scopeName}},Oc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;toKey(){return`${this.scopeName}#${this.ruleName}`}},Pc=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Mc=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new nn(this.initialScopeName)]}repo;initialScopeName;seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new Pc;for(let n of t)$c(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof nn){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function $c(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}let o=n.lookup(e);t instanceof nn?or({baseGrammar:o,selfGrammar:s},r):Es(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);let i=n.injections(t.scopeName);if(i)for(let a of i)r.add(new nn(a))}function Es(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];ar([r],e,n)}}function or(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ar(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ar(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ar(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?_i({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&ar(r.patterns,{...e,repository:s},n);let o=r.include;if(!o)continue;let i=Ri(o);switch(i.kind){case 0:or({...e,selfGrammar:e.baseGrammar},n);break;case 1:or(e,n);break;case 2:Es(i.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};i.kind===4?Es(i.ruleName,l,n):or(l,n)}else i.kind===4?n.add(new Oc(i.scopeName,i.ruleName)):n.add(new nn(i.scopeName));break}}}var Fc=class{kind=0},Dc=class{kind=1},Gc=class{constructor(t){this.ruleName=t}ruleName;kind=2},jc=class{constructor(t){this.scopeName=t}scopeName;kind=3},Uc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;kind=4};function Ri(t){if(t==="$base")return new Fc;if(t==="$self")return new Dc;let e=t.indexOf("#");if(e===-1)return new jc(t);if(e===0)return new Gc(t.substring(1));{let n=t.substring(0,e),r=t.substring(e+1);return new Uc(n,r)}}var qc=/\\(\d+)/,yi=/\\(\d+)/g,Hc=-1,Bi=-2;var on=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=rr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=rr.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${vi(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:rr.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:rr.replaceCaptures(this._contentName,t,e)}},Wc=class extends on{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Kc=class extends on{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new rn(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sn,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},bi=class extends on{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sn,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},As=class extends on{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,a,l,c){super(t,e,n,r),this._begin=new rn(s,this.id),this.beginCaptures=o,this._end=new rn(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sn;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},lr=class extends on{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,a,l){super(t,e,n,r),this._begin=new rn(s,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new rn(i,Bi),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(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sn;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"\uFFFF"),this._cachedCompiledWhilePatterns}},Oi=class J{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Wc(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Kc(e.$vscodeTextmateLocation,e.id,e.name,e.match,J._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=_i({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new bi(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,J._compilePatterns(o,n,r))}return e.while?new lr(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,J._compileCaptures(e.whileCaptures||e.captures,n,r),J._compilePatterns(e.patterns,n,r)):new As(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,J._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,J._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(let i in e){if(i==="$vscodeTextmateLocation")continue;let a=parseInt(i,10);a>o&&(o=a)}for(let i=0;i<=o;i++)s[i]=null;for(let i in e){if(i==="$vscodeTextmateLocation")continue;let a=parseInt(i,10),l=0;e[i].patterns&&(l=J.getCompiledRuleId(e[i],n,r)),s[a]=J.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,l)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){let a=e[o],l=-1;if(a.include){let c=Ri(a.include);switch(c.kind){case 0:case 1:l=J.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=J.getCompiledRuleId(u,n,r));break;case 3:case 4:let f=c.scopeName,d=c.kind===4?c.ruleName:null,h=n.getExternalGrammar(f,r);if(h)if(d){let p=h.repository[d];p&&(l=J.getCompiledRuleId(p,n,h.repository))}else l=J.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=J.getCompiledRuleId(a,n,r);if(l!==-1){let c=n.getRule(l),u=!1;if((c instanceof bi||c instanceof As||c instanceof lr)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(l)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},rn=class Pi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){let r=e.length,s=0,o=[],i=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){let c=e.charAt(a+1);c==="z"?(o.push(e.substring(s,a)),o.push("$(?!\\n)(?<!\\n)"),s=a+2):(c==="A"||c==="G")&&(i=!0),a++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=qc.test(this.source):this.hasBackReferences=!1}clone(){return new Pi(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return yi.lastIndex=0,this.source.replace(yi,(s,o)=>Ni(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,a,l;for(o=0,i=this.source.length;o<i;o++)a=this.source.charAt(o),e[o]=a,n[o]=a,r[o]=a,s[o]=a,a==="\\"&&o+1<i&&(l=this.source.charAt(o+1),l==="A"?(e[o+1]="\uFFFF",n[o+1]="\uFFFF",r[o+1]="A",s[o+1]="A"):l==="G"?(e[o+1]="\uFFFF",n[o+1]="G",r[o+1]="\uFFFF",s[o+1]="G"):(e[o+1]=l,n[o+1]=l,r[o+1]=l,s[o+1]=l),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},sn=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new wi(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new wi(t,r,this._items.map(s=>s.ruleId))}},wi=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}regExps;rules;scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
134
|
+
`)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Cs=class{constructor(t,e){this.languageId=t,this.tokenType=e}languageId;tokenType},Vc=class Ns{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Cs(e,8),this._embeddedLanguagesMatcher=new zc(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Ns._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Cs(0,0);_getBasicScopeAttributes=new xi(e=>{let n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Cs(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let n=e.match(Ns.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},zc=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);let e=t.map(([n,r])=>Ni(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;let e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},uw={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},Mi=!1,ki=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}stack;stoppedEarly};function $i(t,e,n,r,s,o,i,a){let l=e.content.length,c=!1,u=-1;if(i){let h=Jc(t,e,n,r,s,o);s=h.stack,r=h.linePos,n=h.isFirstLine,u=h.anchorPosition}let f=Date.now();for(;!c;){if(a!==0&&Date.now()-f>a)return new ki(s,!0);d()}return new ki(s,!1);function d(){let h=Yc(t,e,n,r,s,u);if(!h){o.produce(s,l),c=!0;return}let p=h.captureIndices,g=h.matchedRuleId,m=p&&p.length>0?p[0].end>r:!1;if(g===Hc){let y=s.getRule(t);o.produce(s,p[0].start),s=s.withContentNameScopesList(s.nameScopesList),Zt(t,e,n,s,o,y.endCaptures,p),o.produce(s,p[0].end);let b=s;if(s=s.parent,u=b.getAnchorPos(),!m&&b.getEnterPos()===r){s=b,o.produce(s,l),c=!0;return}}else{let y=t.getRule(g);o.produce(s,p[0].start);let b=s,w=y.getName(e.content,p),S=s.contentNameScopesList.pushAttributed(w,t);if(s=s.push(g,r,u,p[0].end===l,null,S,S),y instanceof As){let C=y;Zt(t,e,n,s,o,C.beginCaptures,p),o.produce(s,p[0].end),u=p[0].end;let E=C.getContentName(e.content,p),x=S.pushAttributed(E,t);if(s=s.withContentNameScopesList(x),C.endHasBackReferences&&(s=s.withEndRule(C.getEndWithResolvedBackReferences(e.content,p))),!m&&b.hasSameRuleAs(s)){s=s.pop(),o.produce(s,l),c=!0;return}}else if(y instanceof lr){let C=y;Zt(t,e,n,s,o,C.beginCaptures,p),o.produce(s,p[0].end),u=p[0].end;let E=C.getContentName(e.content,p),x=S.pushAttributed(E,t);if(s=s.withContentNameScopesList(x),C.whileHasBackReferences&&(s=s.withEndRule(C.getWhileWithResolvedBackReferences(e.content,p))),!m&&b.hasSameRuleAs(s)){s=s.pop(),o.produce(s,l),c=!0;return}}else if(Zt(t,e,n,s,o,y.captures,p),o.produce(s,p[0].end),s=s.pop(),!m){s=s.safePop(),o.produce(s,l),c=!0;return}}p[0].end>r&&(r=p[0].end,n=!1)}}function Jc(t,e,n,r,s,o){let i=s.beginRuleCapturedEOL?0:-1,a=[];for(let l=s;l;l=l.pop()){let c=l.getRule(t);c instanceof lr&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){let{ruleScanner:c,findOptions:u}=Zc(l.rule,t,l.stack.endRule,n,r===i),f=c.findNextMatchSync(e,r,u);if(f){if(f.ruleId!==Bi){s=l.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(o.produce(l.stack,f.captureIndices[0].start),Zt(t,e,n,l.stack,o,l.rule.whileCaptures,f.captureIndices),o.produce(l.stack,f.captureIndices[0].end),i=f.captureIndices[0].end,f.captureIndices[0].end>r&&(r=f.captureIndices[0].end,n=!1))}else{s=l.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:i,isFirstLine:n}}function Yc(t,e,n,r,s,o){let i=Qc(t,e,n,r,s,o),a=t.getInjections();if(a.length===0)return i;let l=Xc(a,t,e,n,r,s,o);if(!l)return i;if(!i)return l;let c=i.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:i}function Qc(t,e,n,r,s,o){let i=s.getRule(t),{ruleScanner:a,findOptions:l}=Fi(i,t,s.endRule,n,r===o),c=a.findNextMatchSync(e,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Xc(t,e,n,r,s,o,i){let a=Number.MAX_VALUE,l=null,c,u=0,f=o.contentNameScopesList.getScopeNames();for(let d=0,h=t.length;d<h;d++){let p=t[d];if(!p.matcher(f))continue;let g=e.getRule(p.ruleId),{ruleScanner:m,findOptions:y}=Fi(g,e,null,r,s===i),b=m.findNextMatchSync(n,s,y);if(!b)continue;let w=b.captureIndices[0].start;if(!(w>=a)&&(a=w,l=b.captureIndices,c=b.ruleId,u=p.priority,a===s))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function Fi(t,e,n,r,s){if(Mi){let i=t.compile(e,n),a=Di(r,s);return{ruleScanner:i,findOptions:a}}return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function Zc(t,e,n,r,s){if(Mi){let i=t.compileWhile(e,n),a=Di(r,s);return{ruleScanner:i,findOptions:a}}return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function Di(t,e){let n=0;return t||(n|=1),e||(n|=4),n}function Zt(t,e,n,r,s,o,i){if(o.length===0)return;let a=e.content,l=Math.min(o.length,i.length),c=[],u=i[0].end;for(let f=0;f<l;f++){let d=o[f];if(d===null)continue;let h=i[f];if(h.length===0)continue;if(h.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=h.start;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,h.start):s.produce(r,h.start),d.retokenizeCapturedWithRuleId){let g=d.getName(a,i),m=r.contentNameScopesList.pushAttributed(g,t),y=d.getContentName(a,i),b=m.pushAttributed(y,t),w=r.push(d.retokenizeCapturedWithRuleId,h.start,-1,!1,null,m,b),S=t.createOnigString(a.substring(0,h.end));$i(t,S,n&&h.start===0,h.start,w,s,!1,0),Li(S);continue}let p=d.getName(a,i);if(p!==null){let m=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,t);c.push(new eu(m,h.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var eu=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function tu(t,e,n,r,s,o,i,a){return new ru(t,e,n,r,s,o,i,a)}function Si(t,e,n,r,s){let o=ir(e,cr),i=Oi.getCompiledRuleId(n,r,s.repository);for(let a of o)t.push({debugSelector:e,matcher:a.matcher,ruleId:i,grammar:s,priority:a.priority})}function cr(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let s=n;s<e.length;s++)if(nu(e[s],r))return n=s+1,!0;return!1})}function nu(t,e){if(!t)return!1;if(t===e)return!0;let n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var ru=class{constructor(t,e,n,r,s,o,i,a){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Vc(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=Ci(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(let l of Object.keys(s)){let c=ir(l,cr);for(let u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[l]})}}_rootScopeName;balancedBracketSelectors;_onigLib;_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){let t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){let s=r.injections;if(s)for(let i in s)Si(e,i,s[i],this,r);let o=this._grammarRepository.injections(n);o&&o.forEach(i=>{let a=this.getExternalGrammar(i);if(a){let l=a.injectionSelector;l&&Si(e,l,a,this,a)}})}return e.sort((s,o)=>s.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){let e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){let n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Ci(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){let r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){let r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Oi.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===xs.NULL){s=!0;let c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),f=Ve.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null),h;d?h=en.createRootAndLookUpScopeName(d,f,this):h=en.createRoot("unknown",f),e=new xs(null,this._rootId,-1,-1,!1,null,h,h)}else s=!1,e.reset();t=t+`
|
|
135
|
+
`;let o=this.createOnigString(t),i=o.content.length,a=new ou(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=$i(this,o,s,0,e,a,!0,r);return Li(o),{lineLength:i,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Ci(t,e){return t=Cc(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var en=class Ee{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}parent;scopePath;tokenAttributes;static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let o of n)s=Ss.push(s,o.scopeNames),r=new Ee(r,s,o.encodedTokenAttributes);return r}static createRoot(e,n){return new Ee(null,new Ss(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),o=new Ss(null,e),i=r.themeProvider.themeMatch(o),a=Ee.mergeAttributes(n,s,i);return new Ee(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Ee.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,o=0,i=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,i=r.backgroundId),Ve.set(e,n.languageId,n.tokenType,null,s,o,i)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return Ee._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let o of r)s=Ee._pushAttributed(s,o,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),o=e.scopePath.push(n),i=r.themeProvider.themeMatch(o),a=Ee.mergeAttributes(e.tokenAttributes,s,i);return new Ee(e,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},xs=class tt{constructor(e,n,r,s,o,i,a,l){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}parent;ruleId;beginRuleCapturedEOL;endRule;nameScopesList;contentNameScopesList;_stackElementBrand=void 0;static NULL=new tt(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:tt._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?en.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){tt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,s,o,i,a){return new tt(this,e,n,r,s,o,i,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new tt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=en.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new tt(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,en.fromExtension(r,n.contentNameScopesList))}},su=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ir(n,cr).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ir(n,cr).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},ou=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}balancedBracketSelectors;_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let o=t?.getScopeNames()??[];for(let i of this._tokenTypeOverrides)i.matcher(o)&&(r=Ve.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(r=Ve.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},iu=class{constructor(t,e){this._onigLib=e,this._theme=t}_onigLib;_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,tu(t,o,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},Gi=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new iu(tn.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(tn.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new su(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let o=new Mc(this._syncRegistry,t);for(;o.Q.length>0;)o.Q.map(i=>this._loadSingleGrammar(i.scopeName)),o.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},ur=xs.NULL;function ln(t,e){let n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(let[s,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function Le(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Wi(t){return Array.isArray(t)?t:[t]}async function Ts(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function cn(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Ki(t){return t==="ansi"||cn(t)}function un(t){return t==="none"}function Vi(t){return un(t)}var au=/(\r?\n)/g;function _t(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(au),r=0,s=[];for(let o=0;o<n.length;o+=2){let i=e?n[o]+(n[o+1]||""):n[o];s.push([i,r]),r+=n[o].length,r+=n[o+1]?.length||0}return s}var ji={light:"#333333",dark:"#bbbbbb"},Ui={light:"#fffffe",dark:"#1e1e1e"},qi="__shiki_resolved";function fr(t){if(t?.[qi])return t;let e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let a=e.settings?e.settings.find(l=>!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?ji.light:ji.dark),n||(n=e.type==="light"?Ui.light:Ui.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,o=new Map;function i(a){if(o.has(a))return o.get(a);s+=1;let l=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${l}`]?i(a):(o.set(a,l),l)}e.settings=e.settings.map(a=>{let l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),c=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!c)return a;let u={...a,settings:{...a.settings}};if(l){let f=i(a.settings.foreground);e.colorReplacements[f]=a.settings.foreground,u.settings.foreground=f}if(c){let f=i(a.settings.background);e.colorReplacements[f]=a.settings.background,u.settings.background=f}return u});for(let a of Object.keys(e.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!e.colors[a]?.startsWith("#")){let l=i(e.colors[a]);e.colorReplacements[l]=e.colors[a],e.colors[a]=l}return Object.defineProperty(e,qi,{enumerable:!1,writable:!1,value:!0}),e}async function zi(t){return[...new Set((await Promise.all(t.filter(e=>!Ki(e)).map(async e=>await Ts(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Ji(t){return(await Promise.all(t.map(async e=>Vi(e)?null:fr(await Ts(e))))).filter(e=>!!e)}function Yi(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new P(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var lu=class extends Gi{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){let e=fr(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=tn.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Yi(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,e.size)for(let s of e)this._syncRegistry?._grammars?.get(s.scopeName)?.dispose(),this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(i=>n.map(([a])=>a).includes(i)):!1).filter(s=>!n.includes(s));throw new P(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},cu=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).includes(t.scopeName)||this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},an=0;function Ls(t){an+=1,t.warnings!==!1&&an>=10&&an%10===0&&console.warn(`[Shiki] ${an} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new P("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(fr),s=new lu(new cu(t.engine,n),r,n,t.langAlias),o;function i(b){return Yi(b,t.langAlias)}function a(b){m();let w=s.getGrammar(typeof b=="string"?b:b.name);if(!w)throw new P(`Language \`${b}\` not found, you may need to load it first`);return w}function l(b){if(b==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};m();let w=s.getTheme(b);if(!w)throw new P(`Theme \`${b}\` not found, you may need to load it first`);return w}function c(b){m();let w=l(b);return o!==b&&(s.setTheme(w),o=b),{theme:w,colorMap:s.getColorMap()}}function u(){return m(),s.getLoadedThemes()}function f(){return m(),s.getLoadedLanguages()}function d(...b){m(),s.loadLanguages(b.flat(1))}async function h(...b){return d(await zi(b))}function p(...b){m();for(let w of b.flat(1))s.loadTheme(w)}async function g(...b){return m(),p(await Ji(b))}function m(){if(e)throw new P("Shiki instance has been disposed")}function y(){e||(e=!0,s.dispose(),an-=1)}return{setTheme:c,getTheme:l,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:f,resolveLangAlias:i,loadLanguage:h,loadLanguageSync:d,loadTheme:g,loadThemeSync:p,dispose:y,[Symbol.dispose]:y}}async function Rs(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([Ji(t.themes||[]),zi(t.langs||[]),t.engine]);return Ls({...t,themes:e,langs:n,engine:r})}var Qi=new WeakMap;function fn(t,e){Qi.set(t,e)}function vt(t){return Qi.get(t)}var dr=class Xi{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Xi(Object.fromEntries(Wi(n).map(r=>[r,ur])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return uu(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function uu(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let o=s?.nameScopesList?.scopeName;o&&e.push(o),s.parent&&r(s.parent)}return r(t),e}function fu(t,e){if(!(t instanceof dr))throw new P("Invalid grammar state");return t.getInternalStack(e)}var du=/,/,hu=/ /;function Bs(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(cn(t.resolveLangAlias(n.lang||"text"))||un(r))return _t(e).map(a=>[{content:a[0],offset:a[1]}]);let{theme:s,colorMap:o}=t.setTheme(r),i=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new P(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(s.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return ea(e,i,s,o,n)}function Zi(...t){if(t.length===2)return vt(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:o=e.getLoadedThemes()[0]}=r;if(cn(s)||un(o))throw new P("Plain language does not have grammar state");if(s==="ansi")throw new P("ANSI language does not have grammar state");let{theme:i,colorMap:a}=e.setTheme(o),l=e.getLanguage(s);return new dr(Os(n,l,i,a,r).stateStack,l.name,i.name)}function ea(t,e,n,r,s){let o=Os(t,e,n,r,s),i=new dr(o.stateStack,e.name,n.name);return fn(o.tokens,i),o.tokens}function Os(t,e,n,r,s){let o=ln(n,s),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=s,c=_t(t),u=s.grammarState?fu(s.grammarState,n.name)??ur:s.grammarContextCode!=null?Os(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:ur,f=[],d=[];for(let h=0,p=c.length;h<p;h++){let[g,m]=c[h];if(g===""){f=[],d.push([]);continue}if(i>0&&g.length>=i){f=[],d.push([{content:g,offset:m,color:"",fontStyle:0}]);continue}let y,b,w;l&&l!=="tokenType"&&(y=e.tokenizeLine(g,u,a),b=y.tokens,w=0);let S=e.tokenizeLine2(g,u,a),C=S.tokens.length/2;for(let E=0;E<C;E++){let x=S.tokens[2*E],_=E+1<C?S.tokens[2*E+2]:g.length;if(x===_)continue;let M=S.tokens[2*E+1],re=Le(r[Ve.getForeground(M)],o),ye=Ve.getFontStyle(M),B={content:g.substring(x,_),offset:m+x,color:re,fontStyle:ye};if(l==="tokenType")B.type=Ve.getTokenType(M);else if(l){let Bt=[];if(l!=="scopeName")for(let Ae of n.settings){let ut;switch(typeof Ae.scope){case"string":ut=Ae.scope.split(du).map(jr=>jr.trim());break;case"object":ut=Ae.scope;break;default:continue}Bt.push({settings:Ae,selectors:ut.map(jr=>jr.split(hu))})}B.explanation=[];let So=0;for(;x+So<_;){let Ae=b[w],ut=g.substring(Ae.startIndex,Ae.endIndex);So+=ut.length,B.explanation.push({content:ut,scopes:l==="scopeName"?pu(Ae.scopes):gu(Bt,Ae.scopes)}),w+=1}}f.push(B)}d.push(f),f=[],u=S.ruleStack}return{tokens:d,stateStack:u}}function pu(t){return t.map(e=>({scopeName:e}))}function gu(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let o=e[r];n[r]={scopeName:o,themeMatches:yu(t,o,e.slice(0,r))}}return n}function Hi(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function mu(t,e,n){if(!Hi(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;for(;r>=0&&s>=0;)Hi(t[r],n[s])&&(r-=1),s-=1;return r===-1}function yu(t,e,n){let r=[];for(let{selectors:s,settings:o}of t)for(let i of s)if(mu(i,e,n)){r.push(o);break}return r}function hr(t,e,n,r=Bs){let s=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),o=s.map(c=>{let u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:vt(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=bu(...o.map(c=>c.tokens)),a=i[0].map((c,u)=>c.map((f,d)=>{let h={content:f.content,variants:{},offset:f.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=f.explanation),i.forEach((p,g)=>{let{content:m,explanation:y,offset:b,...w}=p[u][d];h.variants[s[g].color]=w}),h})),l=o[0].state?new dr(Object.fromEntries(o.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),o[0].state.lang):void 0;return l&&fn(a,l),a}function bu(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map(l=>l[r]),o=e.map(()=>[]);e.forEach((l,c)=>l.push(o[c]));let i=s.map(()=>0),a=s.map(l=>l[0]);for(;a.every(l=>l);){let l=Math.min(...a.map(c=>c.content.length));for(let c=0;c<n;c++){let u=a[c];u.content.length===l?(o[c].push(u),i[c]+=1,a[c]=s[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,l)}),a[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return e}var ta=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Re=class{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}};Re.prototype.normal={};Re.prototype.property={};Re.prototype.space=void 0;function Ps(t,e){let n={},r={};for(let s of t)Object.assign(n,s.property),Object.assign(r,s.normal);return new Re(n,r,e)}function dn(t){return t.toLowerCase()}var W=class{constructor(e,n){this.attribute=n,this.property=e}};W.prototype.attribute="";W.prototype.booleanish=!1;W.prototype.boolean=!1;W.prototype.commaOrSpaceSeparated=!1;W.prototype.commaSeparated=!1;W.prototype.defined=!1;W.prototype.mustUseProperty=!1;W.prototype.number=!1;W.prototype.overloadedBoolean=!1;W.prototype.property="";W.prototype.spaceSeparated=!1;W.prototype.space=void 0;var hn={};Ur(hn,{boolean:()=>A,booleanish:()=>F,commaOrSpaceSeparated:()=>X,commaSeparated:()=>Be,number:()=>k,overloadedBoolean:()=>pr,spaceSeparated:()=>O});var wu=0,A=nt(),F=nt(),pr=nt(),k=nt(),O=nt(),Be=nt(),X=nt();function nt(){return 2**++wu}var Ms=Object.keys(hn),rt=class extends W{constructor(e,n,r,s){let o=-1;if(super(e,n),na(this,"space",s),typeof r=="number")for(;++o<Ms.length;){let i=Ms[o];na(this,Ms[o],(r&hn[i])===hn[i])}}};rt.prototype.defined=!0;function na(t,e,n){n&&(t[e]=n)}function ae(t){let e={},n={};for(let[r,s]of Object.entries(t.properties)){let o=new rt(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[dn(r)]=r,n[dn(o.attribute)]=r}return new Re(e,n,t.space)}var $s=ae({properties:{ariaActiveDescendant:null,ariaAtomic:F,ariaAutoComplete:null,ariaBusy:F,ariaChecked:F,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:O,ariaCurrent:null,ariaDescribedBy:O,ariaDetails:null,ariaDisabled:F,ariaDropEffect:O,ariaErrorMessage:null,ariaExpanded:F,ariaFlowTo:O,ariaGrabbed:F,ariaHasPopup:null,ariaHidden:F,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:O,ariaLevel:k,ariaLive:null,ariaModal:F,ariaMultiLine:F,ariaMultiSelectable:F,ariaOrientation:null,ariaOwns:O,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:F,ariaReadOnly:F,ariaRelevant:null,ariaRequired:F,ariaRoleDescription:O,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:F,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function gr(t,e){return e in t?t[e]:e}function mr(t,e){return gr(t,e.toLowerCase())}var ra=ae({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Be,acceptCharset:O,accessKey:O,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alpha:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:O,autoFocus:A,autoPlay:A,blocking:O,capture:null,charSet:null,checked:A,cite:null,className:O,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:F,controls:A,controlsList:O,coords:k|Be,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:pr,draggable:F,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:O,height:k,hidden:pr,high:k,href:null,hrefLang:null,htmlFor:O,httpEquiv:O,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:O,itemRef:O,itemScope:A,itemType:O,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:A,optimum:k,pattern:null,ping:O,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:O,required:A,reversed:A,rows:k,rowSpan:k,sandbox:O,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootCustomElementRegistry:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shadowRootSerializable:A,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:F,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:F,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:O,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:F,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:A,disablePictureInPicture:A,disableRemotePlayback:A,exportParts:Be,part:O,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:mr});var sa=ae({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:X,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:O,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Be,g2:Be,glyphName:Be,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:X,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:O,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:X,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:X,rev:X,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:X,requiredFeatures:X,requiredFonts:X,requiredFormats:X,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:X,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:X,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:X,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gr});var Fs=ae({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}});var Ds=ae({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mr});var Gs=ae({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var ku=/[A-Z]/g,oa=/-[a-z]/g,Su=/^data[-\w.:]+$/i;function js(t,e){let n=dn(e),r=e,s=W;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Su.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(oa,_u);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!oa.test(o)){let i=o.replace(ku,Cu);i.charAt(0)!=="-"&&(i="-"+i),e="data"+i}}s=rt}return new s(r,e)}function Cu(t){return"-"+t.toLowerCase()}function _u(t){return t.charAt(1).toUpperCase()}var yr=Ps([$s,ra,Fs,Ds,Gs],"html"),br=Ps([$s,sa,Fs,Ds,Gs],"svg");var ia={}.hasOwnProperty;function aa(t,e){let n=e||{};function r(s,...o){let i=r.invalid,a=r.handlers;if(s&&ia.call(s,t)){let l=String(s[t]);i=ia.call(a,l)?a[l]:r.unknown}if(i)return i.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var vu=/["&'<>`]/g,Eu=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Au=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Nu=/[|\\{}()[\]^$+*?.]/g,la=new WeakMap;function ca(t,e){if(t=t.replace(e.subset?xu(e.subset):vu,r),e.subset||e.escapeOnly)return t;return t.replace(Eu,n).replace(Au,r);function n(s,o,i){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),e)}function r(s,o,i){return e.format(s.charCodeAt(0),i.charCodeAt(o+1),e)}}function xu(t){let e=la.get(t);return e||(e=Iu(t),la.set(t,e)),e}function Iu(t){let e=[],n=-1;for(;++n<t.length;)e.push(t[n].replace(Nu,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var Tu=/[\dA-Fa-f]/;function ua(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Tu.test(String.fromCharCode(e))?r:r+";"}var Lu=/\d/;function fa(t,e,n){let r="&#"+String(t);return n&&e&&!Lu.test(String.fromCharCode(e))?r:r+";"}var da=["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"];var wr={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var ha=["cent","copy","divide","gt","lt","not","para","times"];var pa={}.hasOwnProperty,Us={},kr;for(kr in wr)pa.call(wr,kr)&&(Us[wr[kr]]=kr);var Ru=/[^\dA-Za-z]/;function ga(t,e,n,r){let s=String.fromCharCode(t);if(pa.call(Us,s)){let o=Us[s],i="&"+o;return n&&da.includes(o)&&!ha.includes(o)&&(!r||e&&e!==61&&Ru.test(String.fromCharCode(e)))?i:i+";"}return""}function ma(t,e,n){let r=ua(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=ga(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){let o=fa(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function Oe(t,e){return ca(t,Object.assign({format:ma},e))}var Bu=/^>|^->|<!--|-->|--!>|<!-$/g,Ou=[">"],Pu=["<",">"];function ya(t,e,n,r){return r.settings.bogusComments?"<?"+Oe(t.value,Object.assign({},r.settings.characterReferences,{subset:Ou}))+">":"<!--"+t.value.replace(Bu,s)+"-->";function s(o){return Oe(o,Object.assign({},r.settings.characterReferences,{subset:Pu}))}}function ba(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function qs(t,e){let n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(e);for(;s!==-1;)r++,s=n.indexOf(e,s+e.length);return r}function wa(t,e){let n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ka(t){return t.join(" ").trim()}var Mu=/[ \t\n\f\r]/g;function st(t){return typeof t=="object"?t.type==="text"?Sa(t.value):!1:Sa(t)}function Sa(t){return t.replace(Mu,"")===""}var G=Ca(1),Hs=Ca(-1),$u=[];function Ca(t){return e;function e(n,r,s){let o=n?n.children:$u,i=(r||0)+t,a=o[i];if(!s)for(;a&&st(a);)i+=t,a=o[i];return a}}var Fu={}.hasOwnProperty;function Sr(t){return e;function e(n,r,s){return Fu.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var pn=Sr({body:Gu,caption:Ws,colgroup:Ws,dd:Hu,dt:qu,head:Ws,html:Du,li:Uu,optgroup:Wu,option:Ku,p:ju,rp:_a,rt:_a,tbody:zu,td:va,tfoot:Ju,th:va,thead:Vu,tr:Yu});function Ws(t,e,n){let r=G(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&st(r.value.charAt(0)))}function Du(t,e,n){let r=G(n,e);return!r||r.type!=="comment"}function Gu(t,e,n){let r=G(n,e);return!r||r.type!=="comment"}function ju(t,e,n){let r=G(n,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"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"||n.tagName.includes("-")))}function Uu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="li"}function qu(t,e,n){let r=G(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Hu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function _a(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Wu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Ku(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Vu(t,e,n){let r=G(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function zu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Ju(t,e,n){return!G(n,e)}function Yu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function va(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var Ea=Sr({body:Zu,colgroup:ef,head:Xu,html:Qu,tbody:tf});function Qu(t){let e=G(t,-1);return!e||e.type!=="comment"}function Xu(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function Zu(t){let e=G(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&st(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function ef(t,e,n){let r=Hs(n,e);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&pn(r,n.children.indexOf(r),n))return!1;let s=G(t,-1,!0);return!!(s&&s.type==="element"&&s.tagName==="col")}function tf(t,e,n){let r=Hs(n,e);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&pn(r,n.children.indexOf(r),n))return!1;let s=G(t,-1);return!!(s&&s.type==="element"&&s.tagName==="tr")}var Cr={name:[[`
|
|
136
136
|
\f\r &/=>`.split(""),`
|
|
137
137
|
\f\r "&'/=>\``.split("")],[`\0
|
|
138
138
|
\f\r "&'/<=>`.split(""),`\0
|
|
@@ -140,10 +140,10 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
140
140
|
\f\r &>`.split(""),`\0
|
|
141
141
|
\f\r "&'<=>\``.split("")],[`\0
|
|
142
142
|
\f\r "&'<=>\``.split(""),`\0
|
|
143
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},Zu=new Set(["desc","foreignObject","title"]);function _a(t,e,n,r){let{schema:s}=r,o=s.space==="svg"?!1:r.settings.omitOptionalTags,i=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase()),a=[];s.space==="html"&&t.tagName==="svg"&&(r.schema=yr);let l=ef(r,t.properties);r.schema.space==="svg"&&Zu.has(t.tagName)&&(r.schema=mr);let c=r.all(s.space==="html"&&t.tagName==="template"?t.content:t);if(r.schema=s,c&&(i=!1),l||!o||!Ca(t,e,n)){if(a.push("<",t.tagName,l?" "+l:""),i&&(s.space==="svg"||r.settings.closeSelfClosing)){let u=l.charAt(l.length-1);(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&a.push(" "),a.push("/")}a.push(">")}return a.push(c),!i&&(!o||!hn(t,e,n))&&a.push("</"+t.tagName+">"),a.join("")}function ef(t,e){let n=[],r=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){let o=tf(t,s,e[s]);o&&n.push(o)}}for(;++r<n.length;){let o=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function tf(t,e,n){let r=Gs(t.schema,e),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,o=t.settings.allowDangerousCharacters?0:1;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";let i=Oe(r.attribute,Object.assign({},t.settings.characterReferences,{subset:Sr.name[s][o]}));if(n===!0||(n=Array.isArray(n)?(r.commaSeparated?ma:ya)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n))return i;let a;if(t.settings.preferUnquoted&&(a=Oe(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Sr.unquoted[s][o]}))),a!==n){let{quote:l}=t;t.settings.quoteSmart&&Us(n,l)>Us(n,t.alternative)&&(l=t.alternative),a=l+Oe(n,Object.assign({},t.settings.characterReferences,{subset:(l==="'"?Sr.single:Sr.double)[s][o],attribute:!0}))+l}return i+(a&&"="+a)}var nf=["<","&"];function Cr(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Oe(t.value,Object.assign({},r.settings.characterReferences,{subset:nf}))}function va(t,e,n,r){return r.settings.allowDangerousHtml?t.value:Cr(t,e,n,r)}function Ea(t,e,n,r){return r.all(t)}var Aa=sa("type",{invalid:rf,unknown:sf,handlers:{comment:pa,doctype:ga,element:_a,raw:va,root:Ea,text:Cr}});function rf(t){throw new Error("Expected node, not `"+t+"`")}function sf(t){let e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}var of={},af={},lf=[];function Ws(t,e){let n=e||of,r=n.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");let s=r==='"'?"'":'"';return{one:cf,all:uf,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Xi,characterReferences:n.characterReferences||af,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?yr:mr,quote:r,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function cf(t,e,n){return Aa(t,e,n,this)}function uf(t){let e=[],n=t&&t.children||lf,r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}var Na=/\s+/g;function Ta(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(Na)),Array.isArray(t.properties.class)||(t.properties.class=[]);let n=Array.isArray(e)?e:e.split(Na);for(let r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function ff(t){let e=Ct(t,!0).map(([s])=>s);function n(s){if(s===t.length)return{line:e.length-1,character:e.at(-1).length};let o=s,i=0;for(let a of e){if(o<a.length)break;o-=a.length,i++}return{line:i,character:o}}function r(s,o){let i=0;for(let a=0;a<s;a++)i+=e[a].length;return i+=o,i}return{lines:e,indexToPos:n,posToIndex:r}}var df=["color","background-color"];function hf(t,e){let n=0,r=[];for(let s of e)s>n&&r.push({...t,content:t.content.slice(n,s),offset:t.offset+n}),n=s;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function pf(t,e){let n=0,r=t.length;for(;n<r;){let s=n+(r-n>>1);t[s]<=e?n=s+1:r=s}return n}function gf(t,e){let n=[...e instanceof Set?e:new Set(e)].sort((r,s)=>r-s);return n.length?t.map(r=>r.flatMap(s=>{let o=s.offset+s.content.length,i=pf(n,s.offset),a=i;for(;a<n.length&&n[a]<o;)a++;if(i===a)return s;let l=n.slice(i,a);for(let c=0;c<l.length;c++)l[c]-=s.offset;return hf(s,l)})):t}function mf(t,e,n,r,s="css-vars"){let o={content:t.content,explanation:t.explanation,offset:t.offset},i=e.map(u=>_r(t.variants[u])),a=new Set(i.flatMap(u=>Object.keys(u))),l={},c=(u,f)=>{let d=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+e[u]+(f==="color"?"":d)};return i.forEach((u,f)=>{for(let d of a){let h=u[d]||"inherit";if(f===0&&r&&df.includes(d))if(r==="light-dark()"&&i.length>1){let p=e.findIndex(b=>b==="light"),g=e.findIndex(b=>b==="dark");if(p===-1||g===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let m=i[p][d]||"inherit",y=i[g][d]||"inherit";l[d]=`light-dark(${m}, ${y})`,s==="css-vars"&&(l[c(f,d)]=h)}else l[d]=h;else s==="css-vars"&&(l[c(f,d)]=h)}}),o.htmlStyle=l,o}function _r(t){let e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&K.Italic&&(e["font-style"]="italic"),t.fontStyle&K.Bold&&(e["font-weight"]="bold");let n=[];t.fontStyle&K.Underline&&n.push("underline"),t.fontStyle&K.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function Vs(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function yf(){let t=new WeakMap;function e(n){if(!t.has(n.meta)){let s=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new P(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...r.indexToPos(i),offset:i}}else{let a=r.lines[i.line];if(a===void 0)throw new P(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${r.lines.length}`);let l=i.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new P(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${a.length}`);return{...i,character:l,offset:r.posToIndex(i.line,l)}}},r=ff(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));bf(o),t.set(n.meta,{decorations:o,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return gf(n,e(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;let r=e(this),s=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new P(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(u,f,d,h){let p=s[u],g="",m=-1,y=-1;if(f===0&&(m=0),d===0&&(y=0),d===Number.POSITIVE_INFINITY&&(y=p.children.length),m===-1||y===-1)for(let w=0;w<p.children.length;w++)g+=La(p.children[w]),m===-1&&g.length===f&&(m=w+1),y===-1&&g.length===d&&(y=w+1);if(m===-1)throw new P(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(y===-1)throw new P(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);let b=p.children.slice(m,y);if(!h.alwaysWrap&&b.length===p.children.length)a(p,h,"line");else if(!h.alwaysWrap&&b.length===1&&b[0].type==="element")a(b[0],h,"token");else{let w={type:"element",tagName:"span",properties:{},children:b};a(w,h,"wrapper"),p.children.splice(m,b.length,w)}}function i(u,f){s[u]=a(s[u],f,"line")}function a(u,f,d){let h=f.properties||{},p=f.transform||(g=>g);return u.tagName=f.tagName||"span",u.properties={...u.properties,...h,class:u.properties.class},f.properties?.class&&Ta(u,f.properties.class),u=p(u,d)||u,u}let l=[],c=r.decorations.sort((u,f)=>f.start.offset-u.start.offset||u.end.offset-f.end.offset);for(let u of c){let{start:f,end:d}=u;if(f.line===d.line)o(f.line,f.character,d.character,u);else if(f.line<d.line){o(f.line,f.character,Number.POSITIVE_INFINITY,u);for(let h=f.line+1;h<d.line;h++)l.unshift(()=>i(h,u));o(d.line,0,d.character,u)}}l.forEach(u=>u())}}}function bf(t){for(let e=0;e<t.length;e++){let n=t[e];if(n.start.offset>n.end.offset)throw new P(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){let s=t[r],o=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,i=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,a=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,l=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(o||i||a||l){if(o&&i||a&&l||a&&n.start.offset===n.end.offset||i&&s.start.offset===s.end.offset)continue;throw new P(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function La(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(La).join(""):""}var wf=[yf()];function vr(t){let e=kf(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...wf]}function kf(t){let e=[],n=[],r=[];for(let s of t)switch(s.enforce){case"pre":e.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:e,post:n,normal:r}}var ot=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ks={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Sf(t,e){let n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){let r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function xa(t){let e=t.shift();if(e==="2"){let n=t.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){let n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Cf(t){let e=[];for(;t.length>0;){let n=t.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Ks[r]&&e.push({type:"setDecoration",value:Ks[r]});else if(r<=29){let s=Ks[r-20];s&&(e.push({type:"resetDecoration",value:s}),s==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:ot[r-30]}});else if(r===38){let s=xa(t);s&&e.push({type:"setForegroundColor",value:s})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:ot[r-40]}});else if(r===48){let s=xa(t);s&&e.push({type:"setBackgroundColor",value:s})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:ot[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:ot[r-100+8]}})}return e}function _f(){let t=null,e=null,n=new Set;return{parse(r){let s=[],o=0;do{let i=Sf(r,o),a=i.sequence?r.substring(o,i.startPosition):r.substring(o);if(a.length>0&&s.push({value:a,foreground:t,background:e,decorations:new Set(n)}),i.sequence){let l=Cf(i.sequence);for(let c of l)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(let c of l)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}o=i.position}while(o<r.length);return s}}}var vf={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Ef(t=vf){function e(a){return t[a]}function n(a){return`#${a.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let c=0;c<ot.length;c++)r.push(e(ot[c]));let a=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let f=0;f<6;f++)r.push(n([a[c],a[u],a[f]]));let l=8;for(let c=0;c<24;c++,l+=10)r.push(n([l,l,l]));return r}function o(a){return s()[a]}function i(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return o(a.index)}}return{value:i}}var Af=/#([0-9a-f]{3,8})/i,Nf=/var\((--[\w-]+-ansi-[\w-]+)\)/,xf={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function If(t,e,n){let r=an(t,n),s=Ct(e),o=Ef(Object.fromEntries(ot.map(a=>{let l=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,t.colors?.[l]||xf[a]]}))),i=_f();return s.map(a=>i.parse(a[0]).map(l=>{let c,u;l.decorations.has("reverse")?(c=l.background?o.value(l.background):t.bg,u=l.foreground?o.value(l.foreground):t.fg):(c=l.foreground?o.value(l.foreground):t.fg,u=l.background?o.value(l.background):void 0),c=Le(c,r),u=Le(u,r),l.decorations.has("dim")&&(c=Tf(c));let f=K.None;return l.decorations.has("bold")&&(f|=K.Bold),l.decorations.has("italic")&&(f|=K.Italic),l.decorations.has("underline")&&(f|=K.Underline),l.decorations.has("strikethrough")&&(f|=K.Strikethrough),{content:l.value,offset:a[1],color:c,bgColor:u,fontStyle:f}}))}function Tf(t){let e=t.match(Af);if(e){let r=e[1];if(r.length===8){let s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){let s=r[0],o=r[1],i=r[2],a=r[3];return`#${s}${s}${o}${o}${i}${i}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){let s=r[0],o=r[1],i=r[2];return`#${s}${s}${o}${o}${i}${i}80`}}}let n=t.match(Nf);return n?`var(${n[1]}-dim)`:t}function zs(t,e,n={}){let r=t.resolveLangAlias(n.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=n;if(!ln(r)&&!cn(s)&&r==="ansi"){let{theme:o}=t.setTheme(s);return If(o,e,n)}return Bs(t,e,n)}function Er(t,e,n){let r,s,o,i,a,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,d=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,b)=>y.color===c?-1:b.color===c?1:0);if(d.length===0)throw new P("`themes` option must not be empty");let h=dr(t,e,n,zs);if(l=_t(h),c&&c!=="light-dark()"&&!d.some(y=>y.color===c))throw new P(`\`themes\` option must contain the defaultColor key \`${c}\``);let p=d.map(y=>t.getTheme(y.theme)),g=d.map(y=>y.color);o=h.map(y=>y.map(b=>mf(b,g,u,c,f))),l&&un(o,l);let m=d.map(y=>an(y.theme,n));s=Ia(d,p,m,u,c,"fg",f),r=Ia(d,p,m,u,c,"bg",f),i=`shiki-themes ${p.map(y=>y.name).join(" ")}`,a=c?void 0:[s,r].join(";")}else if("theme"in n){let c=an(n.theme,n);o=zs(t,e,n);let u=t.getTheme(n.theme);r=Le(u.bg,c),s=Le(u.fg,c),i=u.name,l=_t(o)}else throw new P("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:s,bg:r,themeName:i,rootStyle:a,grammarState:l}}function Ia(t,e,n,r,s,o,i){return t.map((a,l)=>{let c=Le(e[l][o],n[l])||"inherit",u=`${r+a.color}${o==="bg"?"-bg":""}:${c}`;if(l===0&&s){if(s==="light-dark()"&&t.length>1){let f=t.findIndex(h=>h.color==="light"),d=t.findIndex(h=>h.color==="dark");if(f===-1||d===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Le(e[f][o],n[f])||"inherit"}, ${Le(e[d][o],n[d])||"inherit"});${u}`}return c}return i==="css-vars"?u:null}).filter(a=>!!a).join(";")}var Ba=/^\s+$/,Lf=/^(\s*)(.*?)(\s*)$/;function Ar(t,e,n,r={meta:{},options:n,codeToHast:(s,o)=>Ar(t,s,o),codeToTokens:(s,o)=>Er(t,s,o)}){let s=e;for(let p of vr(n))s=p.preprocess?.call(r,s,n)||s;let{tokens:o,fg:i,bg:a,themeName:l,rootStyle:c,grammarState:u}=Er(t,s,n),{mergeWhitespaces:f=!0,mergeSameStyleTokens:d=!1}=n;f===!0?o=Rf(o):f==="never"&&(o=Of(o)),d&&(o=Pf(o));let h={...r,get source(){return s}};for(let p of vr(n))o=p.tokens?.call(h,o)||o;return Bf(o,{...n,fg:i,bg:a,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},h,u)}function Bf(t,e,n,r=_t(t)){let s=vr(e),o=[],i={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(let[g,m]of Object.entries(e.meta||{}))g.startsWith("_")||(c[g]=m);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},f={type:"element",tagName:"code",properties:{},children:o},d=[],h={...n,structure:a,addClassToHast:Ta,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return i},get pre(){return u},get code(){return f},get lines(){return d}};if(t.forEach((g,m)=>{m&&(a==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&o.push({type:"text",value:`
|
|
144
|
-
`}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(let w of g){let S={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]},C=
|
|
143
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},nf=new Set(["desc","foreignObject","title"]);function Aa(t,e,n,r){let{schema:s}=r,o=s.space==="svg"?!1:r.settings.omitOptionalTags,i=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase()),a=[];s.space==="html"&&t.tagName==="svg"&&(r.schema=br);let l=rf(r,t.properties);r.schema.space==="svg"&&nf.has(t.tagName)&&(r.schema=yr);let c=r.all(s.space==="html"&&t.tagName==="template"?t.content:t);if(r.schema=s,c&&(i=!1),l||!o||!Ea(t,e,n)){if(a.push("<",t.tagName,l?" "+l:""),i&&(s.space==="svg"||r.settings.closeSelfClosing)){let u=l.charAt(l.length-1);(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&a.push(" "),a.push("/")}a.push(">")}return a.push(c),!i&&(!o||!pn(t,e,n))&&a.push("</"+t.tagName+">"),a.join("")}function rf(t,e){let n=[],r=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){let o=sf(t,s,e[s]);o&&n.push(o)}}for(;++r<n.length;){let o=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function sf(t,e,n){let r=js(t.schema,e),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,o=t.settings.allowDangerousCharacters?0:1;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";let i=Oe(r.attribute,Object.assign({},t.settings.characterReferences,{subset:Cr.name[s][o]}));if(n===!0||(n=Array.isArray(n)?(r.commaSeparated?wa:ka)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n))return i;let a;if(t.settings.preferUnquoted&&(a=Oe(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Cr.unquoted[s][o]}))),a!==n){let{quote:l}=t;t.settings.quoteSmart&&qs(n,l)>qs(n,t.alternative)&&(l=t.alternative),a=l+Oe(n,Object.assign({},t.settings.characterReferences,{subset:(l==="'"?Cr.single:Cr.double)[s][o],attribute:!0}))+l}return i+(a&&"="+a)}var of=["<","&"];function _r(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Oe(t.value,Object.assign({},r.settings.characterReferences,{subset:of}))}function Na(t,e,n,r){return r.settings.allowDangerousHtml?t.value:_r(t,e,n,r)}function xa(t,e,n,r){return r.all(t)}var Ia=aa("type",{invalid:af,unknown:lf,handlers:{comment:ya,doctype:ba,element:Aa,raw:Na,root:xa,text:_r}});function af(t){throw new Error("Expected node, not `"+t+"`")}function lf(t){let e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}var cf={},uf={},ff=[];function Ks(t,e){let n=e||cf,r=n.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");let s=r==='"'?"'":'"';return{one:df,all:hf,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ta,characterReferences:n.characterReferences||uf,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?br:yr,quote:r,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function df(t,e,n){return Ia(t,e,n,this)}function hf(t){let e=[],n=t&&t.children||ff,r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}var Ta=/\s+/g;function Ba(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(Ta)),Array.isArray(t.properties.class)||(t.properties.class=[]);let n=Array.isArray(e)?e:e.split(Ta);for(let r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function pf(t){let e=_t(t,!0).map(([s])=>s);function n(s){if(s===t.length)return{line:e.length-1,character:e.at(-1).length};let o=s,i=0;for(let a of e){if(o<a.length)break;o-=a.length,i++}return{line:i,character:o}}function r(s,o){let i=0;for(let a=0;a<s;a++)i+=e[a].length;return i+=o,i}return{lines:e,indexToPos:n,posToIndex:r}}var gf=["color","background-color"];function mf(t,e){let n=0,r=[];for(let s of e)s>n&&r.push({...t,content:t.content.slice(n,s),offset:t.offset+n}),n=s;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function yf(t,e){let n=0,r=t.length;for(;n<r;){let s=n+(r-n>>1);t[s]<=e?n=s+1:r=s}return n}function bf(t,e){let n=[...e instanceof Set?e:new Set(e)].sort((r,s)=>r-s);return n.length?t.map(r=>r.flatMap(s=>{let o=s.offset+s.content.length,i=yf(n,s.offset),a=i;for(;a<n.length&&n[a]<o;)a++;if(i===a)return s;let l=n.slice(i,a);for(let c=0;c<l.length;c++)l[c]-=s.offset;return mf(s,l)})):t}function wf(t,e,n,r,s="css-vars"){let o={content:t.content,explanation:t.explanation,offset:t.offset},i=e.map(u=>vr(t.variants[u])),a=new Set(i.flatMap(u=>Object.keys(u))),l={},c=(u,f)=>{let d=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+e[u]+(f==="color"?"":d)};return i.forEach((u,f)=>{for(let d of a){let h=u[d]||"inherit";if(f===0&&r&&gf.includes(d))if(r==="light-dark()"&&i.length>1){let p=e.findIndex(b=>b==="light"),g=e.findIndex(b=>b==="dark");if(p===-1||g===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let m=i[p][d]||"inherit",y=i[g][d]||"inherit";l[d]=`light-dark(${m}, ${y})`,s==="css-vars"&&(l[c(f,d)]=h)}else l[d]=h;else s==="css-vars"&&(l[c(f,d)]=h)}}),o.htmlStyle=l,o}function vr(t){let e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&K.Italic&&(e["font-style"]="italic"),t.fontStyle&K.Bold&&(e["font-weight"]="bold");let n=[];t.fontStyle&K.Underline&&n.push("underline"),t.fontStyle&K.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function zs(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function kf(){let t=new WeakMap;function e(n){if(!t.has(n.meta)){let s=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new P(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...r.indexToPos(i),offset:i}}else{let a=r.lines[i.line];if(a===void 0)throw new P(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${r.lines.length}`);let l=i.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new P(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${a.length}`);return{...i,character:l,offset:r.posToIndex(i.line,l)}}},r=pf(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));Sf(o),t.set(n.meta,{decorations:o,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return bf(n,e(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;let r=e(this),s=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new P(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(u,f,d,h){let p=s[u],g="",m=-1,y=-1;if(f===0&&(m=0),d===0&&(y=0),d===Number.POSITIVE_INFINITY&&(y=p.children.length),m===-1||y===-1)for(let w=0;w<p.children.length;w++)g+=Oa(p.children[w]),m===-1&&g.length===f&&(m=w+1),y===-1&&g.length===d&&(y=w+1);if(m===-1)throw new P(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(y===-1)throw new P(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);let b=p.children.slice(m,y);if(!h.alwaysWrap&&b.length===p.children.length)a(p,h,"line");else if(!h.alwaysWrap&&b.length===1&&b[0].type==="element")a(b[0],h,"token");else{let w={type:"element",tagName:"span",properties:{},children:b};a(w,h,"wrapper"),p.children.splice(m,b.length,w)}}function i(u,f){s[u]=a(s[u],f,"line")}function a(u,f,d){let h=f.properties||{},p=f.transform||(g=>g);return u.tagName=f.tagName||"span",u.properties={...u.properties,...h,class:u.properties.class},f.properties?.class&&Ba(u,f.properties.class),u=p(u,d)||u,u}let l=[],c=r.decorations.sort((u,f)=>f.start.offset-u.start.offset||u.end.offset-f.end.offset);for(let u of c){let{start:f,end:d}=u;if(f.line===d.line)o(f.line,f.character,d.character,u);else if(f.line<d.line){o(f.line,f.character,Number.POSITIVE_INFINITY,u);for(let h=f.line+1;h<d.line;h++)l.unshift(()=>i(h,u));o(d.line,0,d.character,u)}}l.forEach(u=>u())}}}function Sf(t){for(let e=0;e<t.length;e++){let n=t[e];if(n.start.offset>n.end.offset)throw new P(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){let s=t[r],o=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,i=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,a=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,l=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(o||i||a||l){if(o&&i||a&&l||a&&n.start.offset===n.end.offset||i&&s.start.offset===s.end.offset)continue;throw new P(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function Oa(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(Oa).join(""):""}var Cf=[kf()];function Er(t){let e=_f(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...Cf]}function _f(t){let e=[],n=[],r=[];for(let s of t)switch(s.enforce){case"pre":e.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:e,post:n,normal:r}}var ot=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Vs={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function vf(t,e){let n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){let r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function La(t){let e=t.shift();if(e==="2"){let n=t.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){let n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Ef(t){let e=[];for(;t.length>0;){let n=t.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Vs[r]&&e.push({type:"setDecoration",value:Vs[r]});else if(r<=29){let s=Vs[r-20];s&&(e.push({type:"resetDecoration",value:s}),s==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:ot[r-30]}});else if(r===38){let s=La(t);s&&e.push({type:"setForegroundColor",value:s})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:ot[r-40]}});else if(r===48){let s=La(t);s&&e.push({type:"setBackgroundColor",value:s})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:ot[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:ot[r-100+8]}})}return e}function Af(){let t=null,e=null,n=new Set;return{parse(r){let s=[],o=0;do{let i=vf(r,o),a=i.sequence?r.substring(o,i.startPosition):r.substring(o);if(a.length>0&&s.push({value:a,foreground:t,background:e,decorations:new Set(n)}),i.sequence){let l=Ef(i.sequence);for(let c of l)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(let c of l)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}o=i.position}while(o<r.length);return s}}}var Nf={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function xf(t=Nf){function e(a){return t[a]}function n(a){return`#${a.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let c=0;c<ot.length;c++)r.push(e(ot[c]));let a=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let f=0;f<6;f++)r.push(n([a[c],a[u],a[f]]));let l=8;for(let c=0;c<24;c++,l+=10)r.push(n([l,l,l]));return r}function o(a){return s()[a]}function i(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return o(a.index)}}return{value:i}}var If=/#([0-9a-f]{3,8})/i,Tf=/var\((--[\w-]+-ansi-[\w-]+)\)/,Lf={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Rf(t,e,n){let r=ln(t,n),s=_t(e),o=xf(Object.fromEntries(ot.map(a=>{let l=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,t.colors?.[l]||Lf[a]]}))),i=Af();return s.map(a=>i.parse(a[0]).map(l=>{let c,u;l.decorations.has("reverse")?(c=l.background?o.value(l.background):t.bg,u=l.foreground?o.value(l.foreground):t.fg):(c=l.foreground?o.value(l.foreground):t.fg,u=l.background?o.value(l.background):void 0),c=Le(c,r),u=Le(u,r),l.decorations.has("dim")&&(c=Bf(c));let f=K.None;return l.decorations.has("bold")&&(f|=K.Bold),l.decorations.has("italic")&&(f|=K.Italic),l.decorations.has("underline")&&(f|=K.Underline),l.decorations.has("strikethrough")&&(f|=K.Strikethrough),{content:l.value,offset:a[1],color:c,bgColor:u,fontStyle:f}}))}function Bf(t){let e=t.match(If);if(e){let r=e[1];if(r.length===8){let s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){let s=r[0],o=r[1],i=r[2],a=r[3];return`#${s}${s}${o}${o}${i}${i}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){let s=r[0],o=r[1],i=r[2];return`#${s}${s}${o}${o}${i}${i}80`}}}let n=t.match(Tf);return n?`var(${n[1]}-dim)`:t}function Js(t,e,n={}){let r=t.resolveLangAlias(n.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=n;if(!cn(r)&&!un(s)&&r==="ansi"){let{theme:o}=t.setTheme(s);return Rf(o,e,n)}return Bs(t,e,n)}function Ar(t,e,n){let r,s,o,i,a,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,d=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,b)=>y.color===c?-1:b.color===c?1:0);if(d.length===0)throw new P("`themes` option must not be empty");let h=hr(t,e,n,Js);if(l=vt(h),c&&c!=="light-dark()"&&!d.some(y=>y.color===c))throw new P(`\`themes\` option must contain the defaultColor key \`${c}\``);let p=d.map(y=>t.getTheme(y.theme)),g=d.map(y=>y.color);o=h.map(y=>y.map(b=>wf(b,g,u,c,f))),l&&fn(o,l);let m=d.map(y=>ln(y.theme,n));s=Ra(d,p,m,u,c,"fg",f),r=Ra(d,p,m,u,c,"bg",f),i=`shiki-themes ${p.map(y=>y.name).join(" ")}`,a=c?void 0:[s,r].join(";")}else if("theme"in n){let c=ln(n.theme,n);o=Js(t,e,n);let u=t.getTheme(n.theme);r=Le(u.bg,c),s=Le(u.fg,c),i=u.name,l=vt(o)}else throw new P("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:s,bg:r,themeName:i,rootStyle:a,grammarState:l}}function Ra(t,e,n,r,s,o,i){return t.map((a,l)=>{let c=Le(e[l][o],n[l])||"inherit",u=`${r+a.color}${o==="bg"?"-bg":""}:${c}`;if(l===0&&s){if(s==="light-dark()"&&t.length>1){let f=t.findIndex(h=>h.color==="light"),d=t.findIndex(h=>h.color==="dark");if(f===-1||d===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Le(e[f][o],n[f])||"inherit"}, ${Le(e[d][o],n[d])||"inherit"});${u}`}return c}return i==="css-vars"?u:null}).filter(a=>!!a).join(";")}var Pa=/^\s+$/,Of=/^(\s*)(.*?)(\s*)$/;function Nr(t,e,n,r={meta:{},options:n,codeToHast:(s,o)=>Nr(t,s,o),codeToTokens:(s,o)=>Ar(t,s,o)}){let s=e;for(let p of Er(n))s=p.preprocess?.call(r,s,n)||s;let{tokens:o,fg:i,bg:a,themeName:l,rootStyle:c,grammarState:u}=Ar(t,s,n),{mergeWhitespaces:f=!0,mergeSameStyleTokens:d=!1}=n;f===!0?o=Mf(o):f==="never"&&(o=$f(o)),d&&(o=Ff(o));let h={...r,get source(){return s}};for(let p of Er(n))o=p.tokens?.call(h,o)||o;return Pf(o,{...n,fg:i,bg:a,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},h,u)}function Pf(t,e,n,r=vt(t)){let s=Er(e),o=[],i={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(let[g,m]of Object.entries(e.meta||{}))g.startsWith("_")||(c[g]=m);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},f={type:"element",tagName:"code",properties:{},children:o},d=[],h={...n,structure:a,addClassToHast:Ba,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return i},get pre(){return u},get code(){return f},get lines(){return d}};if(t.forEach((g,m)=>{m&&(a==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&o.push({type:"text",value:`
|
|
144
|
+
`}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(let w of g){let S={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]},C=zs(w.htmlStyle||vr(w));C&&(S.properties.style=C);for(let E of s)S=E?.span?.call(h,S,m+1,b,y,w)||S;a==="inline"?i.children.push(S):a==="classic"&&y.children.push(S),b+=w.content.length}if(a==="classic"){for(let w of s)y=w?.line?.call(h,y,m+1)||y;d.push(y),o.push(y)}else a==="inline"&&d.push(y)}),a==="classic"){for(let g of s)f=g?.code?.call(h,f)||f;u.children.push(f);for(let g of s)u=g?.pre?.call(h,u)||u;i.children.push(u)}else if(a==="inline"){let g=[],m={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let b of i.children)b.type==="element"&&b.tagName==="br"?(g.push(m),m={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(b.type==="element"||b.type==="text")&&m.children.push(b);g.push(m);let y={type:"element",tagName:"code",properties:{},children:g};for(let b of s)y=b?.code?.call(h,y)||y;i.children=[];for(let b=0;b<y.children.length;b++){b>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});let w=y.children[b];w.type==="element"&&i.children.push(...w.children)}}let p=i;for(let g of s)p=g?.root?.call(h,p)||p;return r&&fn(p,r),p}function Mf(t){return t.map(e=>{let n=[],r="",s;return e.forEach((o,i)=>{let a=!(o.fontStyle&&(o.fontStyle&K.Underline||o.fontStyle&K.Strikethrough));a&&Pa.test(o.content)&&e[i+1]?(s===void 0&&(s=o.offset),r+=o.content):r?(a?n.push({...o,offset:s,content:r+o.content}):n.push({content:r,offset:s},o),s=void 0,r=""):n.push(o)}),n})}function $f(t){return t.map(e=>e.flatMap(n=>{if(Pa.test(n.content))return n;let r=n.content.match(Of);if(!r)return n;let[,s,o,i]=r;if(!s&&!i)return n;let a=[{...n,offset:n.offset+s.length,content:o}];return s&&a.unshift({content:s,offset:n.offset}),i&&a.push({content:i,offset:n.offset+s.length+o.length}),a}))}function Ff(t){return t.map(e=>{let n=[];for(let r of e){if(n.length===0){n.push({...r});continue}let s=n.at(-1),o=zs(s.htmlStyle||vr(s)),i=zs(r.htmlStyle||vr(r)),a=s.fontStyle&&(s.fontStyle&K.Underline||s.fontStyle&K.Strikethrough),l=r.fontStyle&&(r.fontStyle&K.Underline||r.fontStyle&K.Strikethrough);!a&&!l&&o===i?s.content+=r.content:n.push({...r})}return n})}var Df=Ks;function Gf(t,e,n){let r={meta:{},options:n,codeToHast:(o,i)=>Nr(t,o,i),codeToTokens:(o,i)=>Ar(t,o,i)},s=Df(Nr(t,e,n,r));for(let o of Er(n))s=o.postprocess?.call(r,s,n)||s;return s}async function Ma(t){let e=await Rs(t);return{getLastGrammarState:(...n)=>Zi(e,...n),codeToTokensBase:(n,r)=>Js(e,n,r),codeToTokensWithThemes:(n,r)=>hr(e,n,r),codeToTokens:(n,r)=>Ar(e,n,r),codeToHast:(n,r)=>Nr(e,n,r),codeToHtml:(n,r)=>Gf(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function jf(t){return!t.sticky&&!t.rawOptions?.strategy}function $a(t,e){return{index:t,captureIndices:e.map(n=>n==null?{start:4294967295,end:4294967295,length:0}:{start:n[0],end:n[1],length:n[1]-n[0]})}}var Fa=class{patterns;options;regexps;lastSearches;constructor(t,e={}){this.patterns=t,this.options=e;let{forgiving:n=!1,cache:r,regexConstructor:s}=e;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(o=>{if(typeof o!="string")return o;let i=r?.get(o);if(i){if(i instanceof RegExp)return i;if(n)return null;throw i}try{let a=s(o);return r?.set(o,a),a}catch(a){if(r?.set(o,a),n)return null;throw a}}),this.lastSearches=this.regexps.map(o=>o&&jf(o)?{strId:0,searchedFrom:0,matchIndex:-1,indices:null}:null)}findNextMatchSync(t,e,n){let r=typeof t=="string"?t:t.content,s=typeof t=="string"?0:t.id||0,o=-1,i=0,a=null;for(let l=0;l<this.regexps.length;l++){let c=this.regexps[l];if(c)try{let u=s?this.lastSearches[l]:null,f,d;if(u&&u.strId===s&&u.searchedFrom<=e&&(u.matchIndex===-1||u.matchIndex>=e))f=u.matchIndex,d=u.indices;else{c.lastIndex=e;let h=c.exec(r);f=h?h.index:-1,d=h?h.indices:null,u&&(u.strId=s,u.searchedFrom=e,u.matchIndex=f,u.indices=d)}if(f===-1)continue;if(f===e)return $a(l,d);(o===-1||f<i)&&(o=l,i=f,a=d)}catch(u){if(this.options.forgiving)continue;throw u}}return o===-1?null:$a(o,a)}},Uf=0;function Da(t){return{content:t,id:++Uf}}function ze(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function Ga(t,e,n){return t.has(e)||t.set(e,n),t.get(e)}var gn=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),U=String.raw;function Pe(t,e){if(t==null)throw new Error(e??"Value expected");return t}var Ka=U`\[\^?`,Va=`c.? | C(?:-.?)?|${U`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${U`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${U`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${U`o\{[^\}]*\}?`}|${U`\d{1,3}`}`,Qs=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,xr=new RegExp(U`
|
|
145
145
|
\\ (?:
|
|
146
|
-
${
|
|
146
|
+
${Va}
|
|
147
147
|
| [gk]<[^>]*>?
|
|
148
148
|
| [gk]'[^']*'?
|
|
149
149
|
| .
|
|
@@ -160,20 +160,20 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
160
160
|
)?
|
|
161
161
|
| \*[^\)]*\)?
|
|
162
162
|
)?
|
|
163
|
-
| (?:${
|
|
164
|
-
| ${
|
|
163
|
+
| (?:${Qs.source})+
|
|
164
|
+
| ${Ka}
|
|
165
165
|
| .
|
|
166
|
-
`.replace(/\s+/g,""),"gsu"),
|
|
166
|
+
`.replace(/\s+/g,""),"gsu"),Ys=new RegExp(U`
|
|
167
167
|
\\ (?:
|
|
168
|
-
${
|
|
168
|
+
${Va}
|
|
169
169
|
| .
|
|
170
170
|
)
|
|
171
171
|
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
172
|
-
| ${
|
|
172
|
+
| ${Ka}
|
|
173
173
|
| &&
|
|
174
174
|
| .
|
|
175
|
-
`.replace(/\s+/g,""),"gsu");function
|
|
176
|
-
`,r);return{lastIndex:i===-1?e.length:i}}if(/^\s$/.test(n)){let i=/\s+/y;return i.lastIndex=r,{lastIndex:i.exec(e)?i.lastIndex:r}}}if(n===".")return{token:it("dot",n)};if(n==="^"||n==="$"){let i=t.singleline?{"^":U`\A`,$:U`\Z`}[n]:n;return{token:Fa(i,n)}}return n==="|"?{token:qf(n)}:Ys.test(n)?{tokens:ad(n)}:{token:$e(ze(n),n)}}function jf(t,e,n){let r=[Da(e[1]==="^",e)],s=1,o;for(Js.lastIndex=n;o=Js.exec(t);){let i=o[0];if(i[0]==="["&&i[1]!==":")s++,r.push(Da(i[1]==="^",i));else if(i==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push($e(93,i));else if(s--,r.push(Hf(i)),!s)break}else{let a=Uf(i);Array.isArray(a)?r.push(...a):r.push(a)}}return{tokens:r,lastIndex:Js.lastIndex||t.length}}function Uf(t){if(t[0]==="\\")return Ka(t,{inCharClass:!0});if(t[0]==="["){let e=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!e||!pn.has(e.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return it("posix",t,{value:e.groups.name,negate:!!e.groups.negate})}return t==="-"?Wf(t):t==="&&"?Kf(t):$e(ze(t),t)}function Ka(t,{inCharClass:e}){let n=t[1];if(n==="c"||n==="C")return Zf(t);if("dDhHsSwW".includes(n))return nd(t);if(t.startsWith(U`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return rd(t)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(t))try{let r=t.split(/\\x/).slice(1).map(i=>parseInt(i,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...s].map(i=>{let a=[...o.encode(i)].map(l=>`\\x${l.toString(16)}`).join("");return $e(ze(i),a)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return $e(od(t),t);if(Ga.has(n))return $e(Ga.get(n),t);if(/\d/.test(n))return Vf(e,t);if(t==="\\")throw new Error(U`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return $e(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function qf(t){return{type:"Alternator",raw:t}}function Fa(t,e){return{type:"Assertion",kind:t,raw:e}}function Va(t){return{type:"Backreference",raw:t}}function $e(t,e){return{type:"Character",value:t,raw:e}}function Hf(t){return{type:"CharacterClassClose",raw:t}}function Wf(t){return{type:"CharacterClassHyphen",raw:t}}function Kf(t){return{type:"CharacterClassIntersector",raw:t}}function Da(t,e){return{type:"CharacterClassOpen",negate:t,raw:e}}function it(t,e,n={}){return{type:"CharacterSet",kind:t,...n,raw:e}}function za(t,e,n={}){return t==="keep"?{type:"Directive",kind:t,raw:e}:{type:"Directive",kind:t,flags:Pe(n.flags),raw:e}}function Vf(t,e){return{type:"EscapedNumber",inCharClass:t,raw:e}}function zf(t){return{type:"GroupClose",raw:t}}function vt(t,e,n={}){return{type:"GroupOpen",kind:t,...n,raw:e}}function Jf(t,e,n,r){return{type:"NamedCallout",kind:t,tag:e,arguments:n,raw:r}}function Yf(t,e,n,r){return{type:"Quantifier",kind:t,min:e,max:n,raw:r}}function Qf(t){return{type:"Subroutine",raw:t}}var Xf=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Ga=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Zf(t){let e=t[1]==="c"?t[2]:t[3];if(!e||!/[A-Za-z]/.test(e))throw new Error(`Unsupported control character "${t}"`);return $e(ze(e.toUpperCase())-64,t)}function ed(t,e){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;r??="";let s=(e.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=Ua(n),i=Ua(r),a={};if(o&&(a.enable=o),i&&(a.disable=i),t.endsWith(")"))return e.replaceCurrentModX(s),za("flags",t,{flags:a});if(t.endsWith(":"))return e.pushModX(s),e.numOpenGroups++,vt("group",t,{...(o||i)&&{flags:a}});throw new Error(`Unexpected flag modifier "${t}"`)}function td(t){let e=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!e)throw new Error(`Incomplete or invalid named callout "${t}"`);let{name:n,tag:r,args:s}=e.groups;if(!n)throw new Error(`Invalid named callout "${t}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);let o=s?s.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[i,a,l]=o,c=Xf.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof i=="string")throw new Error(`Named callout argument must be a number "${i}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(o.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${i}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Jf(c,r??null,s?.split(",")??null,t)}function ja(t){let e=null,n,r;if(t[0]==="{"){let{minStr:s,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,i=1e5;if(+s>i||o&&+o>i)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+s,r=o===void 0?+s:o===""?1/0:+o,n>r&&(e="possessive",[n,r]=[r,n]),t.endsWith("?")){if(e==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');e="lazy"}else e||(e="greedy")}else n=t[0]==="+"?1:0,r=t[0]==="?"?1:1/0,e=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return Yf(e,n,r,t)}function nd(t){let e=t[1].toLowerCase();return it({d:"digit",h:"hex",s:"space",w:"word"}[e],t,{negate:t[1]!==e})}function rd(t){let{p:e,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return it("property",t,{value:r,negate:e==="P"&&!n||e==="p"&&!!n})}function Ua(t){let e={};return t.includes("i")&&(e.ignoreCase=!0),t.includes("m")&&(e.dotAll=!0),t.includes("x")&&(e.extended=!0),Object.keys(e).length?e:null}function sd(t){let e={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<t.length;n++){let r=t[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(t.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');e.textSegmentMode=t[n+2]==="g"?"grapheme":"word",n+=3;continue}e[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return e}function od(t){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t))throw new Error(`Incomplete or invalid escape "${t}"`);let e=t[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex:t.slice(2);return parseInt(e,16)}function id(t,e){let{raw:n,inCharClass:r}=t,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=e))return[Va(n)];let o=[],i=s.match(/^[0-7]+|\d/g);for(let a=0;a<i.length;a++){let l=i[a],c;if(a===0&&l!=="8"&&l!=="9"){if(c=parseInt(l,8),c>127)throw new Error(U`Octal encoded byte above 177 unsupported "${n}"`)}else c=ze(l);o.push($e(c,(a===0?"\\":"")+l))}return o}function ad(t){let e=[],n=new RegExp(Ys,"gy"),r;for(;r=n.exec(t);){let s=r[0];if(s[0]==="{"){let o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(o){let{min:i,max:a}=o.groups;if(+i>+a&&s.endsWith("?")){n.lastIndex--,e.push(ja(s.slice(0,-1)));continue}}}e.push(ja(s))}return e}function xr(t,e){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;let n=t.body[0];return!e||Object.keys(e).every(r=>e[r]===n[r])}function Ja(t){return ld.has(t.type)}var ld=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Tr(t,e={}){let n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e,rules:{captureGroup:!1,singleline:!1,...e.rules}},r=Wa(t,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),s=(d,h)=>{let p=r.tokens[o.nextIndex];switch(o.parent=d,o.nextIndex++,p.type){case"Alternator":return Me();case"Assertion":return cd(p);case"Backreference":return ud(p,o);case"Character":return Et(p.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return fd(p,o,h);case"CharacterClassOpen":return dd(p,o,h);case"CharacterSet":return hd(p,o);case"Directive":return wd(p.kind,{flags:p.flags});case"GroupOpen":return pd(p,o,h);case"NamedCallout":return Sd(p.kind,p.tag,p.arguments);case"Quantifier":return gd(p,o);case"Subroutine":return md(p,o);default:throw new Error(`Unexpected token type "${p.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:s},i=_d(kd(r.flags)),a=i.body[0];for(;o.nextIndex<r.tokens.length;){let d=s(a,{});d.type==="Alternative"?(i.body.push(d),a=d):a.body.push(d)}let{capturingGroups:l,hasNumberedRef:c,namedGroupsByName:u,subroutines:f}=o;if(c&&u.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:d}of f)if(typeof d=="number"){if(d>l.length)throw new Error("Subroutine uses a group number that's not defined");d&&(l[d-1].isSubroutined=!0)}else if(u.has(d)){if(u.get(d).length>1)throw new Error(U`Subroutine uses a duplicate group name "\g<${d}>"`);u.get(d)[0].isSubroutined=!0}else throw new Error(U`Subroutine uses a group name that's not defined "\g<${d}>"`);return i}function cd({kind:t}){return Lr(Pe({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[t],`Unexpected assertion kind "${t}"`),{negate:t===U`\B`||t===U`\Y`})}function ud({raw:t},e){let n=/^\\k[<']/.test(t),r=n?t.slice(3,-1):t.slice(1),s=(o,i=!1)=>{let a=e.capturingGroups.length,l=!1;if(o>a)if(e.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,Ir(i?a+1-o:o,{orphan:l})};if(n){let o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return s(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${t}"`);return Ir(r)}return s(+r)}function fd(t,e,n){let{tokens:r,walk:s}=e,o=e.parent,i=o.body.at(-1),a=r[e.nextIndex];if(!n.isCheckingRangeEnd&&i&&i.type!=="CharacterClass"&&i.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){let l=s(o,{...n,isCheckingRangeEnd:!0});if(i.type==="Character"&&l.type==="Character")return o.body.pop(),bd(i,l);throw new Error("Invalid character class range")}return Et(ze("-"))}function dd({negate:t},e,n){let{tokens:r,walk:s}=e,o=[gn()],i=r[e.nextIndex],a=Xa(i);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")o.push(gn()),e.nextIndex++;else{let c=o.at(-1);c.body.push(s(c,n))}a=Xa(r[e.nextIndex],i)}let l=gn({negate:t});return o.length===1?l.body=o[0].body:(l.kind="intersection",l.body=o.map(c=>c.body.length===1?c.body[0]:c)),e.nextIndex++,l}function hd({kind:t,negate:e,value:n},r){let{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:i}=r;if(t==="property"){let a=At(n);if(pn.has(a)&&!i?.has(a))t="posix",n=a;else return at(n,{negate:e,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:i})}return t==="posix"?Cd(n,{negate:e}):Br(t,{negate:e})}function pd(t,e,n){let{tokens:r,capturingGroups:s,namedGroupsByName:o,skipLookbehindValidation:i,walk:a}=e,l=vd(t),c=l.type==="AbsenceFunction",u=Qa(l),f=u&&l.negate;if(l.type==="CapturingGroup"&&(s.push(l),l.name&&Ma(o,l.name,[]).push(l)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=Za(r[e.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")l.body.push(Me()),e.nextIndex++;else{let h=l.body.at(-1),p=a(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||f});if(h.body.push(p),(u||n.isInLookbehind)&&!i){let g="Lookbehind includes a pattern not allowed by Oniguruma";if(f||n.isInNegLookbehind){if(Ya(p)||p.type==="CapturingGroup")throw new Error(g)}else if(Ya(p)||Qa(p)&&p.negate)throw new Error(g)}}d=Za(r[e.nextIndex])}return e.nextIndex++,l}function gd({kind:t,min:e,max:n},r){let s=r.parent,o=s.body.at(-1);if(!o||!Ja(o))throw new Error("Quantifier requires a repeatable token");let i=Xs(t,e,n,o);return s.body.pop(),i}function md({raw:t},e){let{capturingGroups:n,subroutines:r}=e,s=t.slice(3,-1),o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(o){let a=+o.groups.num,l=n.length;if(e.hasNumberedRef=!0,s={"":a,"+":l+a,"-":l+1-a}[o.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);let i=Zs(s);return r.push(i),i}function yd(t,e){if(t!=="repeater")throw new Error(`Unexpected absence function kind "${t}"`);return{type:"AbsenceFunction",kind:t,body:mn(e?.body)}}function Me(t){return{type:"Alternative",body:el(t?.body)}}function Lr(t,e){let n={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(n.negate=!!e?.negate),n}function Ir(t,e){let n=!!e?.orphan;return{type:"Backreference",ref:t,...n&&{orphan:n}}}function Qs(t,e){let n={name:void 0,isSubroutined:!1,...e};if(n.name!==void 0&&!Ed(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:mn(e?.body)}}function Et(t,e){let n={useLastValid:!1,...e};if(t>1114111){let r=t.toString(16);if(n.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:t}}function gn(t){let e={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:e.kind,negate:e.negate,body:el(t?.body)}}function bd(t,e){if(e.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:e}}function Br(t,e){let n=!!e?.negate,r={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(r.negate=n),(t==="text_segment"||t==="newline"&&!n)&&(r.variableLength=!0),r}function wd(t,e={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:Pe(e.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function kd(t){return{type:"Flags",...t}}function ne(t){let e=t?.atomic,n=t?.flags;if(e&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...e&&{atomic:e},...n&&{flags:n},body:mn(t?.body)}}function Je(t){let e={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:e.behind?"lookbehind":"lookahead",negate:e.negate,body:mn(t?.body)}}function Sd(t,e,n){return{type:"NamedCallout",kind:t,tag:e,arguments:n}}function Cd(t,e){let n=!!e?.negate;if(!pn.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:n}}function Xs(t,e,n,r){if(e>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:e,max:n,body:r}}function _d(t,e){return{type:"Regex",body:mn(e?.body),flags:t}}function Zs(t){return{type:"Subroutine",ref:t}}function at(t,e){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e},r=n.unicodePropertyMap?.get(At(t));if(!r){if(n.normalizeUnknownPropertyNames)r=Ad(t);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(U`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:r??t,negate:n.negate}}function vd({flags:t,kind:e,name:n,negate:r,number:s}){switch(e){case"absence_repeater":return yd("repeater");case"atomic":return ne({atomic:!0});case"capturing":return Qs(s,{name:n});case"group":return ne({flags:t});case"lookahead":case"lookbehind":return Je({behind:e==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${e}"`)}}function mn(t){if(t===void 0)t=[Me()];else if(!Array.isArray(t)||!t.length||!t.every(e=>e.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function el(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return t}function Ya(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function Qa(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function Ed(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function Ad(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function At(t){return t.replace(/[- _]+/g,"").toLowerCase()}function Xa(t,e){let n=e;return Pe(t,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function Za(t){return Pe(t,"Unclosed group")}function lt(t,e,n=null){function r(o,i){for(let a=0;a<o.length;a++){let l=s(o[a],i,a,o);a=Math.max(-1,a+l)}}function s(o,i=null,a=null,l=null){let c=0,u=!1,f={node:o,parent:i,key:a,container:l,root:t,remove(){Rr(l).splice(Math.max(0,Nt(a)+c),1),c--,u=!0},removeAllNextSiblings(){return Rr(l).splice(Nt(a)+1)},removeAllPrevSiblings(){let y=Nt(a)+c;return c-=y,Rr(l).splice(0,Math.max(0,y))},replaceWith(y,b={}){let w=!!b.traverse;l?l[Math.max(0,Nt(a)+c)]=y:Pe(i,"Can't replace root node")[a]=y,w&&s(y,i,a,l),u=!0},replaceWithMultiple(y,b={}){let w=!!b.traverse;if(Rr(l).splice(Math.max(0,Nt(a)+c),1,...y),c+=y.length-1,w){let S=0;for(let C=0;C<y.length;C++)S+=s(y[C],i,Nt(a)+C+S,l)}u=!0},skip(){u=!0}},{type:d}=o,h=e["*"],p=e[d],g=typeof h=="function"?h:h?.enter,m=typeof p=="function"?p:p?.enter;if(g?.(f,n),m?.(f,n),!u)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(o.min,o,"min"),s(o.max,o,"max");break;case"Quantifier":s(o.body,o,"body");break;case"Regex":r(o.body,o),s(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return p?.exit?.(f,n),h?.exit?.(f,n),c}return s(t),t}function Rr(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function Nt(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}var tl=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function nl(t,e){for(let n=0;n<t.length;n++)t[n]>=e&&t[n]++}function rl(t,e,n,r){return t.slice(0,e)+r+t.slice(e+n.length)}var Z=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function yn(t,e,n,r){let s=new RegExp(String.raw`${e}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1],i=0,a="";for(let l of t.matchAll(s)){let{0:c,groups:{$skip:u}}=l;if(!u&&(!r||r===Z.DEFAULT==!i)){n instanceof Function?a+=n(l,{context:i?Z.CHAR_CLASS:Z.DEFAULT,negated:o[o.length-1]}):a+=n;continue}c[0]==="["?(i++,o.push(c[1]==="^")):c==="]"&&i&&(i--,o.pop()),a+=c}return a}function eo(t,e,n,r){yn(t,e,n,r)}function Nd(t,e,n=0,r){if(!new RegExp(e,"su").test(t))return null;let s=new RegExp(`${e}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let o=0,i;for(;i=s.exec(t);){let{0:a,groups:{$skip:l}}=i;if(!l&&(!r||r===Z.DEFAULT==!o))return i;a==="["?o++:a==="]"&&o&&o--,s.lastIndex==i.index&&s.lastIndex++}return null}function bn(t,e,n){return!!Nd(t,e,0,n)}function sl(t,e){let n=/\\?./gsu;n.lastIndex=e;let r=t.length,s=0,o=1,i;for(;i=n.exec(t);){let[a]=i;if(a==="[")s++;else if(s)a==="]"&&s--;else if(a==="(")o++;else if(a===")"&&(o--,!o)){r=i.index;break}}return t.slice(e,r)}var ol=new RegExp(String.raw`(?<noncapturingStart>${tl})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function no(t,e){let n=e?.hiddenCaptures??[],r=e?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:r,hiddenCaptures:n};let s="(?>",o="(?:(?=(",i=[0],a=[],l=0,c=0,u=NaN,f;do{f=!1;let d=0,h=0,p=!1,g;for(ol.lastIndex=Number.isNaN(u)?0:u+o.length;g=ol.exec(t);){let{0:m,index:y,groups:{capturingStart:b,noncapturingStart:w}}=g;if(m==="[")d++;else if(d)m==="]"&&d--;else if(m===s&&!p)u=y,p=!0;else if(p&&w)h++;else if(b)p?h++:(l++,i.push(l+c));else if(m===")"&&p){if(!h){c++;let S=l+c;if(t=`${t.slice(0,u)}${o}${t.slice(u+s.length,y)}))<$$${S}>)${t.slice(y+1)}`,f=!0,a.push(S),nl(n,S),r.size){let C=new Map;r.forEach((E,x)=>{C.set(x>=S?x+1:x,E.map(_=>_>=S?_+1:_))}),r=C}break}h--}}}while(f);return n.push(...a),t=yn(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:p}})=>{if(h){let g=+h;if(g>i.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${i[g]}`}return`\\${p}`},Z.DEFAULT),{pattern:t,captureTransfers:r,hiddenCaptures:n}}var il=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,to=new RegExp(String.raw`
|
|
175
|
+
`.replace(/\s+/g,""),"gsu");function za(t,e={}){let n={flags:"",...e,rules:{captureGroup:!1,singleline:!1,...e.rules}};if(typeof t!="string")throw new Error("String expected as pattern");let r=ad(n.flags),s=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(f){s.push(f)},replaceCurrentModX(f){s[s.length-1]=f},singleline:n.rules.singleline},i=[],a;for(xr.lastIndex=0;a=xr.exec(t);){let f=qf(o,t,a[0],xr.lastIndex);f.tokens?i.push(...f.tokens):f.token&&i.push(f.token),f.lastIndex!==void 0&&(xr.lastIndex=f.lastIndex)}let l=[],c=0;i.filter(f=>f.type==="GroupOpen").forEach(f=>{f.kind==="capturing"?f.number=++c:f.raw==="("&&l.push(f)}),c||l.forEach((f,d)=>{f.kind="capturing",f.number=d+1});let u=c||l.length;return{tokens:i.map(f=>f.type==="EscapedNumber"?cd(f,u):f).flat(),flags:r}}function qf(t,e,n,r){let[s,o]=n;if(n==="["||n==="[^"){let i=Hf(e,n,r);return{tokens:i.tokens,lastIndex:i.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(o))return{token:ja(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:ed(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Ya(n)}}if(o==="K")return{token:Qa("keep",n)};if(o==="N"||o==="R")return{token:it("newline",n,{negate:o==="N"})};if(o==="O")return{token:it("any",n)};if(o==="X")return{token:it("text_segment",n)};let i=Ja(n,{inCharClass:!1});return Array.isArray(i)?{tokens:i}:{token:i}}if(s==="("){if(o==="*")return{token:sd(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(e[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:rd(n,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,n==="("&&!t.captureGroup||n==="(?:")return{token:Et("group",n)};if(n==="(?>")return{token:Et("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Et(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&t.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Et("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Et("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Qf(n)}}if(t.getCurrentModX()){if(n==="#"){let i=e.indexOf(`
|
|
176
|
+
`,r);return{lastIndex:i===-1?e.length:i}}if(/^\s$/.test(n)){let i=/\s+/y;return i.lastIndex=r,{lastIndex:i.exec(e)?i.lastIndex:r}}}if(n===".")return{token:it("dot",n)};if(n==="^"||n==="$"){let i=t.singleline?{"^":U`\A`,$:U`\Z`}[n]:n;return{token:ja(i,n)}}return n==="|"?{token:Kf(n)}:Qs.test(n)?{tokens:ud(n)}:{token:Me(ze(n),n)}}function Hf(t,e,n){let r=[Ua(e[1]==="^",e)],s=1,o;for(Ys.lastIndex=n;o=Ys.exec(t);){let i=o[0];if(i[0]==="["&&i[1]!==":")s++,r.push(Ua(i[1]==="^",i));else if(i==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Me(93,i));else if(s--,r.push(Vf(i)),!s)break}else{let a=Wf(i);Array.isArray(a)?r.push(...a):r.push(a)}}return{tokens:r,lastIndex:Ys.lastIndex||t.length}}function Wf(t){if(t[0]==="\\")return Ja(t,{inCharClass:!0});if(t[0]==="["){let e=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!e||!gn.has(e.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return it("posix",t,{value:e.groups.name,negate:!!e.groups.negate})}return t==="-"?zf(t):t==="&&"?Jf(t):Me(ze(t),t)}function Ja(t,{inCharClass:e}){let n=t[1];if(n==="c"||n==="C")return nd(t);if("dDhHsSwW".includes(n))return od(t);if(t.startsWith(U`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return id(t)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(t))try{let r=t.split(/\\x/).slice(1).map(i=>parseInt(i,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...s].map(i=>{let a=[...o.encode(i)].map(l=>`\\x${l.toString(16)}`).join("");return Me(ze(i),a)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Me(ld(t),t);if(qa.has(n))return Me(qa.get(n),t);if(/\d/.test(n))return Yf(e,t);if(t==="\\")throw new Error(U`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return Me(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function Kf(t){return{type:"Alternator",raw:t}}function ja(t,e){return{type:"Assertion",kind:t,raw:e}}function Ya(t){return{type:"Backreference",raw:t}}function Me(t,e){return{type:"Character",value:t,raw:e}}function Vf(t){return{type:"CharacterClassClose",raw:t}}function zf(t){return{type:"CharacterClassHyphen",raw:t}}function Jf(t){return{type:"CharacterClassIntersector",raw:t}}function Ua(t,e){return{type:"CharacterClassOpen",negate:t,raw:e}}function it(t,e,n={}){return{type:"CharacterSet",kind:t,...n,raw:e}}function Qa(t,e,n={}){return t==="keep"?{type:"Directive",kind:t,raw:e}:{type:"Directive",kind:t,flags:Pe(n.flags),raw:e}}function Yf(t,e){return{type:"EscapedNumber",inCharClass:t,raw:e}}function Qf(t){return{type:"GroupClose",raw:t}}function Et(t,e,n={}){return{type:"GroupOpen",kind:t,...n,raw:e}}function Xf(t,e,n,r){return{type:"NamedCallout",kind:t,tag:e,arguments:n,raw:r}}function Zf(t,e,n,r){return{type:"Quantifier",kind:t,min:e,max:n,raw:r}}function ed(t){return{type:"Subroutine",raw:t}}var td=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),qa=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function nd(t){let e=t[1]==="c"?t[2]:t[3];if(!e||!/[A-Za-z]/.test(e))throw new Error(`Unsupported control character "${t}"`);return Me(ze(e.toUpperCase())-64,t)}function rd(t,e){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;r??="";let s=(e.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=Wa(n),i=Wa(r),a={};if(o&&(a.enable=o),i&&(a.disable=i),t.endsWith(")"))return e.replaceCurrentModX(s),Qa("flags",t,{flags:a});if(t.endsWith(":"))return e.pushModX(s),e.numOpenGroups++,Et("group",t,{...(o||i)&&{flags:a}});throw new Error(`Unexpected flag modifier "${t}"`)}function sd(t){let e=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!e)throw new Error(`Incomplete or invalid named callout "${t}"`);let{name:n,tag:r,args:s}=e.groups;if(!n)throw new Error(`Invalid named callout "${t}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);let o=s?s.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[i,a,l]=o,c=td.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof i=="string")throw new Error(`Named callout argument must be a number "${i}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(o.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${i}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Xf(c,r??null,s?.split(",")??null,t)}function Ha(t){let e=null,n,r;if(t[0]==="{"){let{minStr:s,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,i=1e5;if(+s>i||o&&+o>i)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+s,r=o===void 0?+s:o===""?1/0:+o,n>r&&(e="possessive",[n,r]=[r,n]),t.endsWith("?")){if(e==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');e="lazy"}else e||(e="greedy")}else n=t[0]==="+"?1:0,r=t[0]==="?"?1:1/0,e=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return Zf(e,n,r,t)}function od(t){let e=t[1].toLowerCase();return it({d:"digit",h:"hex",s:"space",w:"word"}[e],t,{negate:t[1]!==e})}function id(t){let{p:e,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return it("property",t,{value:r,negate:e==="P"&&!n||e==="p"&&!!n})}function Wa(t){let e={};return t.includes("i")&&(e.ignoreCase=!0),t.includes("m")&&(e.dotAll=!0),t.includes("x")&&(e.extended=!0),Object.keys(e).length?e:null}function ad(t){let e={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<t.length;n++){let r=t[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(t.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');e.textSegmentMode=t[n+2]==="g"?"grapheme":"word",n+=3;continue}e[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return e}function ld(t){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t))throw new Error(`Incomplete or invalid escape "${t}"`);let e=t[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex:t.slice(2);return parseInt(e,16)}function cd(t,e){let{raw:n,inCharClass:r}=t,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=e))return[Ya(n)];let o=[],i=s.match(/^[0-7]+|\d/g);for(let a=0;a<i.length;a++){let l=i[a],c;if(a===0&&l!=="8"&&l!=="9"){if(c=parseInt(l,8),c>127)throw new Error(U`Octal encoded byte above 177 unsupported "${n}"`)}else c=ze(l);o.push(Me(c,(a===0?"\\":"")+l))}return o}function ud(t){let e=[],n=new RegExp(Qs,"gy"),r;for(;r=n.exec(t);){let s=r[0];if(s[0]==="{"){let o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(o){let{min:i,max:a}=o.groups;if(+i>+a&&s.endsWith("?")){n.lastIndex--,e.push(Ha(s.slice(0,-1)));continue}}}e.push(Ha(s))}return e}function Ir(t,e){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;let n=t.body[0];return!e||Object.keys(e).every(r=>e[r]===n[r])}function Xa(t){return fd.has(t.type)}var fd=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Lr(t,e={}){let n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e,rules:{captureGroup:!1,singleline:!1,...e.rules}},r=za(t,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),s=(d,h)=>{let p=r.tokens[o.nextIndex];switch(o.parent=d,o.nextIndex++,p.type){case"Alternator":return $e();case"Assertion":return dd(p);case"Backreference":return hd(p,o);case"Character":return At(p.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return pd(p,o,h);case"CharacterClassOpen":return gd(p,o,h);case"CharacterSet":return md(p,o);case"Directive":return Cd(p.kind,{flags:p.flags});case"GroupOpen":return yd(p,o,h);case"NamedCallout":return vd(p.kind,p.tag,p.arguments);case"Quantifier":return bd(p,o);case"Subroutine":return wd(p,o);default:throw new Error(`Unexpected token type "${p.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:s},i=Ad(_d(r.flags)),a=i.body[0];for(;o.nextIndex<r.tokens.length;){let d=s(a,{});d.type==="Alternative"?(i.body.push(d),a=d):a.body.push(d)}let{capturingGroups:l,hasNumberedRef:c,namedGroupsByName:u,subroutines:f}=o;if(c&&u.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:d}of f)if(typeof d=="number"){if(d>l.length)throw new Error("Subroutine uses a group number that's not defined");d&&(l[d-1].isSubroutined=!0)}else if(u.has(d)){if(u.get(d).length>1)throw new Error(U`Subroutine uses a duplicate group name "\g<${d}>"`);u.get(d)[0].isSubroutined=!0}else throw new Error(U`Subroutine uses a group name that's not defined "\g<${d}>"`);return i}function dd({kind:t}){return Rr(Pe({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[t],`Unexpected assertion kind "${t}"`),{negate:t===U`\B`||t===U`\Y`})}function hd({raw:t},e){let n=/^\\k[<']/.test(t),r=n?t.slice(3,-1):t.slice(1),s=(o,i=!1)=>{let a=e.capturingGroups.length,l=!1;if(o>a)if(e.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,Tr(i?a+1-o:o,{orphan:l})};if(n){let o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return s(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${t}"`);return Tr(r)}return s(+r)}function pd(t,e,n){let{tokens:r,walk:s}=e,o=e.parent,i=o.body.at(-1),a=r[e.nextIndex];if(!n.isCheckingRangeEnd&&i&&i.type!=="CharacterClass"&&i.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){let l=s(o,{...n,isCheckingRangeEnd:!0});if(i.type==="Character"&&l.type==="Character")return o.body.pop(),Sd(i,l);throw new Error("Invalid character class range")}return At(ze("-"))}function gd({negate:t},e,n){let{tokens:r,walk:s}=e,o=[mn()],i=r[e.nextIndex],a=tl(i);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")o.push(mn()),e.nextIndex++;else{let c=o.at(-1);c.body.push(s(c,n))}a=tl(r[e.nextIndex],i)}let l=mn({negate:t});return o.length===1?l.body=o[0].body:(l.kind="intersection",l.body=o.map(c=>c.body.length===1?c.body[0]:c)),e.nextIndex++,l}function md({kind:t,negate:e,value:n},r){let{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:i}=r;if(t==="property"){let a=Nt(n);if(gn.has(a)&&!i?.has(a))t="posix",n=a;else return at(n,{negate:e,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:i})}return t==="posix"?Ed(n,{negate:e}):Br(t,{negate:e})}function yd(t,e,n){let{tokens:r,capturingGroups:s,namedGroupsByName:o,skipLookbehindValidation:i,walk:a}=e,l=Nd(t),c=l.type==="AbsenceFunction",u=el(l),f=u&&l.negate;if(l.type==="CapturingGroup"&&(s.push(l),l.name&&Ga(o,l.name,[]).push(l)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=nl(r[e.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")l.body.push($e()),e.nextIndex++;else{let h=l.body.at(-1),p=a(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||f});if(h.body.push(p),(u||n.isInLookbehind)&&!i){let g="Lookbehind includes a pattern not allowed by Oniguruma";if(f||n.isInNegLookbehind){if(Za(p)||p.type==="CapturingGroup")throw new Error(g)}else if(Za(p)||el(p)&&p.negate)throw new Error(g)}}d=nl(r[e.nextIndex])}return e.nextIndex++,l}function bd({kind:t,min:e,max:n},r){let s=r.parent,o=s.body.at(-1);if(!o||!Xa(o))throw new Error("Quantifier requires a repeatable token");let i=Zs(t,e,n,o);return s.body.pop(),i}function wd({raw:t},e){let{capturingGroups:n,subroutines:r}=e,s=t.slice(3,-1),o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(o){let a=+o.groups.num,l=n.length;if(e.hasNumberedRef=!0,s={"":a,"+":l+a,"-":l+1-a}[o.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);let i=eo(s);return r.push(i),i}function kd(t,e){if(t!=="repeater")throw new Error(`Unexpected absence function kind "${t}"`);return{type:"AbsenceFunction",kind:t,body:yn(e?.body)}}function $e(t){return{type:"Alternative",body:rl(t?.body)}}function Rr(t,e){let n={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(n.negate=!!e?.negate),n}function Tr(t,e){let n=!!e?.orphan;return{type:"Backreference",ref:t,...n&&{orphan:n}}}function Xs(t,e){let n={name:void 0,isSubroutined:!1,...e};if(n.name!==void 0&&!xd(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:yn(e?.body)}}function At(t,e){let n={useLastValid:!1,...e};if(t>1114111){let r=t.toString(16);if(n.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:t}}function mn(t){let e={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:e.kind,negate:e.negate,body:rl(t?.body)}}function Sd(t,e){if(e.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:e}}function Br(t,e){let n=!!e?.negate,r={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(r.negate=n),(t==="text_segment"||t==="newline"&&!n)&&(r.variableLength=!0),r}function Cd(t,e={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:Pe(e.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function _d(t){return{type:"Flags",...t}}function ne(t){let e=t?.atomic,n=t?.flags;if(e&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...e&&{atomic:e},...n&&{flags:n},body:yn(t?.body)}}function Je(t){let e={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:e.behind?"lookbehind":"lookahead",negate:e.negate,body:yn(t?.body)}}function vd(t,e,n){return{type:"NamedCallout",kind:t,tag:e,arguments:n}}function Ed(t,e){let n=!!e?.negate;if(!gn.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:n}}function Zs(t,e,n,r){if(e>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:e,max:n,body:r}}function Ad(t,e){return{type:"Regex",body:yn(e?.body),flags:t}}function eo(t){return{type:"Subroutine",ref:t}}function at(t,e){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e},r=n.unicodePropertyMap?.get(Nt(t));if(!r){if(n.normalizeUnknownPropertyNames)r=Id(t);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(U`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:r??t,negate:n.negate}}function Nd({flags:t,kind:e,name:n,negate:r,number:s}){switch(e){case"absence_repeater":return kd("repeater");case"atomic":return ne({atomic:!0});case"capturing":return Xs(s,{name:n});case"group":return ne({flags:t});case"lookahead":case"lookbehind":return Je({behind:e==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${e}"`)}}function yn(t){if(t===void 0)t=[$e()];else if(!Array.isArray(t)||!t.length||!t.every(e=>e.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function rl(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return t}function Za(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function el(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function xd(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function Id(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function Nt(t){return t.replace(/[- _]+/g,"").toLowerCase()}function tl(t,e){let n=e;return Pe(t,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function nl(t){return Pe(t,"Unclosed group")}function lt(t,e,n=null){function r(o,i){for(let a=0;a<o.length;a++){let l=s(o[a],i,a,o);a=Math.max(-1,a+l)}}function s(o,i=null,a=null,l=null){let c=0,u=!1,f={node:o,parent:i,key:a,container:l,root:t,remove(){Or(l).splice(Math.max(0,xt(a)+c),1),c--,u=!0},removeAllNextSiblings(){return Or(l).splice(xt(a)+1)},removeAllPrevSiblings(){let y=xt(a)+c;return c-=y,Or(l).splice(0,Math.max(0,y))},replaceWith(y,b={}){let w=!!b.traverse;l?l[Math.max(0,xt(a)+c)]=y:Pe(i,"Can't replace root node")[a]=y,w&&s(y,i,a,l),u=!0},replaceWithMultiple(y,b={}){let w=!!b.traverse;if(Or(l).splice(Math.max(0,xt(a)+c),1,...y),c+=y.length-1,w){let S=0;for(let C=0;C<y.length;C++)S+=s(y[C],i,xt(a)+C+S,l)}u=!0},skip(){u=!0}},{type:d}=o,h=e["*"],p=e[d],g=typeof h=="function"?h:h?.enter,m=typeof p=="function"?p:p?.enter;if(g?.(f,n),m?.(f,n),!u)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(o.min,o,"min"),s(o.max,o,"max");break;case"Quantifier":s(o.body,o,"body");break;case"Regex":r(o.body,o),s(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return p?.exit?.(f,n),h?.exit?.(f,n),c}return s(t),t}function Or(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function xt(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}var sl=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function ol(t,e){for(let n=0;n<t.length;n++)t[n]>=e&&t[n]++}function il(t,e,n,r){return t.slice(0,e)+r+t.slice(e+n.length)}var Z=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function bn(t,e,n,r){let s=new RegExp(String.raw`${e}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1],i=0,a="";for(let l of t.matchAll(s)){let{0:c,groups:{$skip:u}}=l;if(!u&&(!r||r===Z.DEFAULT==!i)){n instanceof Function?a+=n(l,{context:i?Z.CHAR_CLASS:Z.DEFAULT,negated:o[o.length-1]}):a+=n;continue}c[0]==="["?(i++,o.push(c[1]==="^")):c==="]"&&i&&(i--,o.pop()),a+=c}return a}function to(t,e,n,r){bn(t,e,n,r)}function Td(t,e,n=0,r){if(!new RegExp(e,"su").test(t))return null;let s=new RegExp(`${e}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let o=0,i;for(;i=s.exec(t);){let{0:a,groups:{$skip:l}}=i;if(!l&&(!r||r===Z.DEFAULT==!o))return i;a==="["?o++:a==="]"&&o&&o--,s.lastIndex==i.index&&s.lastIndex++}return null}function wn(t,e,n){return!!Td(t,e,0,n)}function al(t,e){let n=/\\?./gsu;n.lastIndex=e;let r=t.length,s=0,o=1,i;for(;i=n.exec(t);){let[a]=i;if(a==="[")s++;else if(s)a==="]"&&s--;else if(a==="(")o++;else if(a===")"&&(o--,!o)){r=i.index;break}}return t.slice(e,r)}var ll=new RegExp(String.raw`(?<noncapturingStart>${sl})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function ro(t,e){let n=e?.hiddenCaptures??[],r=e?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:r,hiddenCaptures:n};let s="(?>",o="(?:(?=(",i=[0],a=[],l=0,c=0,u=NaN,f;do{f=!1;let d=0,h=0,p=!1,g;for(ll.lastIndex=Number.isNaN(u)?0:u+o.length;g=ll.exec(t);){let{0:m,index:y,groups:{capturingStart:b,noncapturingStart:w}}=g;if(m==="[")d++;else if(d)m==="]"&&d--;else if(m===s&&!p)u=y,p=!0;else if(p&&w)h++;else if(b)p?h++:(l++,i.push(l+c));else if(m===")"&&p){if(!h){c++;let S=l+c;if(t=`${t.slice(0,u)}${o}${t.slice(u+s.length,y)}))<$$${S}>)${t.slice(y+1)}`,f=!0,a.push(S),ol(n,S),r.size){let C=new Map;r.forEach((E,x)=>{C.set(x>=S?x+1:x,E.map(_=>_>=S?_+1:_))}),r=C}break}h--}}}while(f);return n.push(...a),t=bn(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:p}})=>{if(h){let g=+h;if(g>i.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${i[g]}`}return`\\${p}`},Z.DEFAULT),{pattern:t,captureTransfers:r,hiddenCaptures:n}}var cl=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,no=new RegExp(String.raw`
|
|
177
177
|
\\(?: \d+
|
|
178
178
|
| c[A-Za-z]
|
|
179
179
|
| [gk]<[^>]+>
|
|
@@ -186,9 +186,9 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
186
186
|
| [A-Za-z\-]+:
|
|
187
187
|
| \(DEFINE\)
|
|
188
188
|
))?
|
|
189
|
-
| (?<qBase>${
|
|
189
|
+
| (?<qBase>${cl})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
190
190
|
| \\?.
|
|
191
|
-
`.replace(/\s+/g,""),"gsu");function
|
|
191
|
+
`.replace(/\s+/g,""),"gsu");function so(t){if(!new RegExp(`${cl}\\+`).test(t))return{pattern:t};let e=[],n=null,r=null,s="",o=0,i;for(no.lastIndex=0;i=no.exec(t);){let{0:a,index:l,groups:{qBase:c,qMod:u,invalidQ:f}}=i;if(a==="[")o||(r=l),o++;else if(a==="]")o?o--:r=null;else if(!o)if(u==="+"&&s&&!s.startsWith("(")){if(f)throw new Error(`Invalid quantifier "${a}"`);let d=-1;if(/^\{\d+\}$/.test(c))t=il(t,l+c.length,u,"");else{if(s===")"||s==="]"){let h=s===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${s}"`);t=`${t.slice(0,h)}(?>${t.slice(h,l)}${c})${t.slice(l+a.length)}`}else t=`${t.slice(0,l-s.length)}(?>${s}${c})${t.slice(l+a.length)}`;d+=4}no.lastIndex+=d}else a[0]==="("?e.push(l):a===")"&&(n=e.length?e.pop():null);s=a}return{pattern:t}}var le=String.raw,Ld=le`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,io=le`\(\?R=(?<rDepth>[^\)]+)\)|${Ld}`,Pr=le`\(\?<(?![=!])(?<captureName>[^>]+)>`,pl=le`${Pr}|(?<unnamed>\()(?!\?)`,ct=new RegExp(le`${Pr}|${io}|\(\?|\\?.`,"gsu"),oo="Cannot use multiple overlapping recursions";function gl(t,e){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...e},s=e?.captureTransfers??new Map;if(!new RegExp(io,"su").test(t))return{pattern:t,captureTransfers:s,hiddenCaptures:n};if(r==="plugin"&&wn(t,le`\(\?\(DEFINE\)`,Z.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");let o=[],i=wn(t,le`\\[1-9]`,Z.DEFAULT),a=new Map,l=[],c=!1,u=0,f=0,d;for(ct.lastIndex=0;d=ct.exec(t);){let{0:h,groups:{captureName:p,rDepth:g,gRNameOrNum:m,gRDepth:y}}=d;if(h==="[")u++;else if(u)h==="]"&&u--;else if(g){if(ul(g),c)throw new Error(oo);if(i)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let b=t.slice(0,d.index),w=t.slice(ct.lastIndex);if(wn(w,io,Z.DEFAULT))throw new Error(oo);let S=+g-1;t=fl(b,w,S,!1,n,o,f),s=hl(s,b,S,o.length,0,f);break}else if(m){ul(y);let b=!1;for(let B of l)if(B.name===m||B.num===+m){if(b=!0,B.hasRecursedWithin)throw new Error(oo);break}if(!b)throw new Error(le`Recursive \g cannot be used outside the referenced group "${r==="external"?m:le`\g<${m}&R=${y}>`}"`);let w=a.get(m),S=al(t,w);if(i&&wn(S,le`${Pr}|\((?!\?)`,Z.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let C=t.slice(w,d.index),E=S.slice(C.length+h.length),x=o.length,_=+y-1,M=fl(C,E,_,!0,n,o,f);s=hl(s,C,_,o.length-x,x,f);let re=t.slice(0,w),ye=t.slice(w+S.length);t=`${re}${M}${ye}`,ct.lastIndex+=M.length-h.length-C.length-E.length,l.forEach(B=>B.hasRecursedWithin=!0),c=!0}else if(p)f++,a.set(String(f),ct.lastIndex),a.set(p,ct.lastIndex),l.push({num:f,name:p});else if(h[0]==="("){let b=h==="(";b&&(f++,a.set(String(f),ct.lastIndex)),l.push(b?{num:f}:{})}else h===")"&&l.pop()}return n.push(...o),{pattern:t,captureTransfers:s,hiddenCaptures:n}}function ul(t){let e=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(e);if(t=+t,t<2||t>100)throw new Error(e)}function fl(t,e,n,r,s,o,i){let a=new Set;r&&to(t+e,Pr,({groups:{captureName:c}})=>{a.add(c)},Z.DEFAULT);let l=[n,r?a:null,s,o,i];return`${t}${dl(`(?:${t}`,"forward",...l)}(?:)${dl(`${e})`,"backward",...l)}${e}`}function dl(t,e,n,r,s,o,i){let l=u=>e==="forward"?u+2:n-u+2-1,c="";for(let u=0;u<n;u++){let f=l(u);c+=bn(t,le`${pl}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:h,unnamed:p,backref:g}})=>{if(g&&r&&!r.has(g))return d;let m=`_$${f}`;if(p||h){let y=i+o.length+1;return o.push(y),Rd(s,y),p?d:`(?<${h}${m}>`}return le`\k<${g}${m}>`},Z.DEFAULT)}return c}function Rd(t,e){for(let n=0;n<t.length;n++)t[n]>=e&&t[n]++}function hl(t,e,n,r,s,o){if(t.size&&r){let i=0;to(e,pl,()=>i++,Z.DEFAULT);let a=o-i+s,l=new Map;return t.forEach((c,u)=>{let f=(r-i*n)/n,d=i*n,h=u>a+i?u+r:u,p=[];for(let g of c)if(g<=a)p.push(g);else if(g>a+i+f)p.push(g+r);else if(g<=a+i)for(let m=0;m<=n;m++)p.push(g+i*m);else for(let m=0;m<=n;m++)p.push(g+d+f*m);l.set(h,p)}),l}return t}var H=String.fromCodePoint,N=String.raw,me={},$r=globalThis.RegExp;me.flagGroups=(()=>{try{new $r("(?i:)")}catch{return!1}return!0})();me.unicodeSets=(()=>{try{new $r("[[]]","v")}catch{return!1}return!0})();me.bugFlagVLiteralHyphenIsRange=me.unicodeSets?(()=>{try{new $r(N`[\d\-a]`,"v")}catch{return!0}return!1})():!1;me.bugNestedClassIgnoresNegation=me.unicodeSets&&new $r("[[^a]]","v").test("a");function Mr(t,{enable:e,disable:n}){return{dotAll:!n?.dotAll&&!!(e?.dotAll||t.dotAll),ignoreCase:!n?.ignoreCase&&!!(e?.ignoreCase||t.ignoreCase)}}function kn(t,e,n){return t.has(e)||t.set(e,n),t.get(e)}function fo(t,e){return ml[t]>=ml[e]}function Bd(t,e){if(t==null)throw new Error(e??"Value expected");return t}var ml={ES2025:2025,ES2024:2024,ES2018:2018},Od={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function Sl(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!Od[t.target])throw new Error(`Unexpected target "${t.target}"`);let e={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return e.target==="auto"&&(e.target=me.flagGroups?"ES2025":me.unicodeSets?"ES2024":"ES2018"),e}var Pd="[ -\r ]",Md=new Set([H(304),H(305)]),Fe=N`[\p{L}\p{M}\p{N}\p{Pc}]`;function Cl(t){if(Md.has(t))return[t];let e=new Set,n=t.toLowerCase(),r=n.toUpperCase(),s=Dd.get(n),o=$d.get(n),i=Fd.get(n);return[...r].length===1&&e.add(r),i&&e.add(i),s&&e.add(s),e.add(n),o&&e.add(o),[...e]}var po=new Map(`C Other
|
|
192
192
|
Cc Control cntrl
|
|
193
193
|
Cf Format
|
|
194
194
|
Cn Unassigned
|
|
@@ -278,8 +278,8 @@ Uppercase Upper
|
|
|
278
278
|
Variation_Selector VS
|
|
279
279
|
White_Space space
|
|
280
280
|
XID_Continue XIDC
|
|
281
|
-
XID_Start XIDS`.split(/\s/).map(t=>[
|
|
281
|
+
XID_Start XIDS`.split(/\s/).map(t=>[Nt(t),t])),$d=new Map([["s",H(383)],[H(383),"s"]]),Fd=new Map([[H(223),H(7838)],[H(107),H(8490)],[H(229),H(8491)],[H(969),H(8486)]]),Dd=new Map([Ye(453),Ye(456),Ye(459),Ye(498),...ao(8072,8079),...ao(8088,8095),...ao(8104,8111),Ye(8124),Ye(8140),Ye(8188)]),Gd=new Map([["alnum",N`[\p{Alpha}\p{Nd}]`],["alpha",N`\p{Alpha}`],["ascii",N`\p{ASCII}`],["blank",N`[\p{Zs}\t]`],["cntrl",N`\p{Cc}`],["digit",N`\p{Nd}`],["graph",N`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",N`\p{Lower}`],["print",N`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",N`[\p{P}\p{S}]`],["space",N`\p{space}`],["upper",N`\p{Upper}`],["word",N`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",N`\p{AHex}`]]);function jd(t,e){let n=[];for(let r=t;r<=e;r++)n.push(r);return n}function Ye(t){let e=H(t);return[e.toLowerCase(),e]}function ao(t,e){return jd(t,e).map(n=>Ye(n))}var _l=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Ud(t,e){let n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...e};vl(t);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:fo(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};lt(t,qd,r);let s={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},o={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};lt(t,Hd,o);let i={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return lt(t,Wd,i),t._originMap=o.groupOriginByCopy,t._strategy=r.strategy,t}var qd={AbsenceFunction({node:t,parent:e,replaceWith:n}){let{body:r,kind:s}=t;if(s==="repeater"){let o=ne();o.body[0].body.push(Je({negate:!0,body:r}),at("Any"));let i=ne();i.body[0].body.push(Zs("greedy",0,1/0,o)),n(j(i,e),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:e,key:n},{flagDirectivesByAlt:r}){let s=t.body.filter(o=>o.kind==="flags");for(let o=n+1;o<e.body.length;o++){let i=e.body[o];kn(r,i,[]).push(...s)}},exit({node:t},{flagDirectivesByAlt:e}){if(e.get(t)?.length){let n=Al(e.get(t));if(n){let r=ne({flags:n});r.body[0].body=t.body,t.body=[j(r,t)]}}}},Assertion({node:t,parent:e,key:n,container:r,root:s,remove:o,replaceWith:i},a){let{kind:l,negate:c}=t,{asciiWordBoundaries:u,avoidSubclass:f,supportedGNodes:d,wordIsAscii:h}=a;if(l==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(l==="line_end")i(j(Je({body:[$e({body:[Rr("string_end")]}),$e({body:[At(10)]})]}),e));else if(l==="line_start")i(j(De(N`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),e));else if(l==="search_start")if(d.has(t))s.flags.sticky=!0,o();else{let p=r[n-1];if(p&&Qd(p))i(j(Je({negate:!0}),e));else{if(f)throw new Error(N`Uses "\G" in a way that requires a subclass`);i(Qe(Rr("string_start"),e)),a.strategy="clip_search"}}else if(!(l==="string_end"||l==="string_start"))if(l==="string_end_newline")i(j(De(N`(?=\n?\z)`),e));else if(l==="word_boundary"){if(!h&&!u){let p=`(?:(?<=${Fe})(?!${Fe})|(?<!${Fe})(?=${Fe}))`,g=`(?:(?<=${Fe})(?=${Fe})|(?<!${Fe})(?!${Fe}))`;i(j(De(c?g:p),e))}}else throw new Error(`Unexpected assertion kind "${l}"`)},Backreference({node:t},{jsGroupNameMap:e}){let{ref:n}=t;typeof n=="string"&&!co(n)&&(n=lo(n,e),t.ref=n)},CapturingGroup({node:t},{jsGroupNameMap:e,subroutineRefMap:n}){let{name:r}=t;r&&!co(r)&&(r=lo(r,e),t.name=r),n.set(t.number,t),r&&n.set(r,t)},CharacterClassRange({node:t,parent:e,replaceWith:n}){if(e.kind==="intersection"){let r=mn({body:[t]});n(j(r,e),{traverse:!0})}},CharacterSet({node:t,parent:e,replaceWith:n},{accuracy:r,minTargetEs2024:s,digitIsAscii:o,spaceIsAscii:i,wordIsAscii:a}){let{kind:l,negate:c,value:u}=t;if(o&&(l==="digit"||u==="digit")){n(Qe(Br("digit",{negate:c}),e));return}if(i&&(l==="space"||u==="space")){n(j(uo(De(Pd),c),e));return}if(a&&(l==="word"||u==="word")){n(Qe(Br("word",{negate:c}),e));return}if(l==="any")n(Qe(at("Any"),e));else if(l==="digit")n(Qe(at("Nd",{negate:c}),e));else if(l!=="dot")if(l==="text_segment"){if(r==="strict")throw new Error(N`Use of "\X" requires non-strict accuracy`);let f="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=N`\p{RI}{2}|${f}(?:\u200D${f})*`;n(j(De(N`(?>\r\n|${s?N`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),e))}else if(l==="hex")n(Qe(at("AHex",{negate:c}),e));else if(l==="newline")n(j(De(c?`[^
|
|
282
282
|
]`:`(?>\r
|
|
283
283
|
?|[
|
|
284
|
-
\v\f\x85\u2028\u2029])`),e));else if(l==="posix")if(!s&&(u==="graph"||u==="print")){if(r==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let f={graph:"!-~",print:" -~"}[u];c&&(f=`\0-${H(f.codePointAt(0)-1)}${H(f.codePointAt(2)+1)}-\u{10FFFF}`),n(j(De(`[${f}]`),e))}else n(j(co(De(Md.get(u)),c),e));else if(l==="property")ho.has(At(u))||(t.key="sc");else if(l==="space")n(Qe(at("space",{negate:c}),e));else if(l==="word")n(j(co(De(Fe),c),e));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:t,parent:e,root:n,remove:r,replaceWith:s,removeAllPrevSiblings:o,removeAllNextSiblings:i}){let{kind:a,flags:l}=t;if(a==="flags")if(!l.enable&&!l.disable)r();else{let c=ne({flags:l});c.body[0].body=i(),s(j(c,e),{traverse:!0})}else if(a==="keep"){let c=n.body[0],f=n.body.length===1&&xr(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(e.parent!==f||f.body.length>1)throw new Error(N`Uses "\K" in a way that's unsupported`);let d=Je({behind:!0});d.body[0].body=o(),s(j(d,e))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:t,parent:e}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete t[n]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),e.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;let{enable:e,disable:n}=t.flags;e?.extended&&delete e.extended,n?.extended&&delete n.extended,e?.dotAll&&n?.dotAll&&delete e.dotAll,e?.ignoreCase&&n?.ignoreCase&&delete e.ignoreCase,e&&!Object.keys(e).length&&delete t.flags.enable,n&&!Object.keys(n).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},e){let{kind:n}=t;n==="lookbehind"&&(e.passedLookbehind=!0)},NamedCallout({node:t,parent:e,replaceWith:n}){let{kind:r}=t;if(r==="fail")n(j(Je({negate:!0}),e));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){let e=ne();e.body[0].body.push(t.body),t.body=j(e,t)}},Regex:{enter({node:t},{supportedGNodes:e}){let n=[],r=!1,s=!1;for(let o of t.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{let i=El(o.body);i?(r=!0,Array.isArray(i)?n.push(...i):n.push(i)):s=!0}r&&!s&&n.forEach(o=>e.add(o))},exit(t,{accuracy:e,passedLookbehind:n,strategy:r}){if(e==="strict"&&n&&r)throw new Error(N`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:e}){let{ref:n}=t;typeof n=="string"&&!lo(n)&&(n=ao(n,e),t.ref=n)}},jd={Backreference({node:t},{multiplexCapturesToLeftByRef:e,reffedNodesByReferencer:n}){let{orphan:r,ref:s}=t;r||n.set(t,[...e.get(s).map(({node:o})=>o)])},CapturingGroup:{enter({node:t,parent:e,replaceWith:n,skip:r},{groupOriginByCopy:s,groupsByName:o,multiplexCapturesToLeftByRef:i,openRefs:a,reffedNodesByReferencer:l}){let c=s.get(t);if(c&&a.has(t.number)){let f=Qe(pl(t.number),e);l.set(f,a.get(t.number)),n(f);return}a.set(t.number,t),i.set(t.number,[]),t.name&&wn(i,t.name,[]);let u=i.get(t.name??t.number);for(let f=0;f<u.length;f++){let d=u[f];if(c===d.node||c&&c===d.origin||t===d.origin){u.splice(f,1);break}}if(i.get(t.number).push({node:t,origin:c}),t.name&&i.get(t.name).push({node:t,origin:c}),t.name){let f=wn(o,t.name,new Map),d=!1;if(c)d=!0;else for(let h of f.values())if(!h.hasDuplicateNameToRemove){d=!0;break}o.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:d})}},exit({node:t},{openRefs:e}){e.get(t.number)===t&&e.delete(t.number)}},Group:{enter({node:t},e){e.prevFlags=e.currentFlags,t.flags&&(e.currentFlags=Pr(e.currentFlags,t.flags))},exit(t,e){e.currentFlags=e.prevFlags}},Subroutine({node:t,parent:e,replaceWith:n},r){let{isRecursive:s,ref:o}=t;if(s){let u=e;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===o||u.number===o)););r.reffedNodesByReferencer.set(t,u);return}let i=r.subroutineRefMap.get(o),a=o===0,l=a?pl(0):Cl(i,r.groupOriginByCopy,null),c=l;if(!a){let u=_l(Wd(i,d=>d.type==="Group"&&!!d.flags)),f=u?Pr(r.globalFlags,u):r.globalFlags;qd(f,r.currentFlags)||(c=ne({flags:Kd(f)}),c.body[0].body.push(l))}n(j(c,e),{traverse:!a})}},Ud={Backreference({node:t,parent:e,replaceWith:n},r){if(t.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,t.ref);return}let o=r.reffedNodesByReferencer.get(t).filter(i=>Hd(i,t));if(!o.length)n(j(Je({negate:!0}),e));else if(o.length>1){let i=ne({atomic:!0,body:o.reverse().map(a=>Me({body:[Ir(a.number)]}))});n(j(i,e))}else t.ref=o[0].number},CapturingGroup({node:t},e){t.number=++e.numCapturesToLeft,t.name&&e.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},e){let n=Math.max(e.highestOrphanBackref-e.numCapturesToLeft,0);for(let r=0;r<n;r++){let s=Qs();t.body.at(-1).body.push(s)}}},Subroutine({node:t},e){!t.isRecursive||t.ref===0||(t.ref=e.reffedNodesByReferencer.get(t).number)}};function Sl(t){lt(t,{"*"({node:e,parent:n}){e.parent=n}})}function qd(t,e){return t.dotAll===e.dotAll&&t.ignoreCase===e.ignoreCase}function Hd(t,e){let n=e;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===t)return!1;let r=vl(n.parent);for(let s of r){if(s===n)break;if(s===t||Al(s,t))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Cl(t,e,n,r){let s=Array.isArray(t)?[]:{};for(let[o,i]of Object.entries(t))o==="parent"?s.parent=Array.isArray(n)?r:n:i&&typeof i=="object"?s[o]=Cl(i,e,s,n):(o==="type"&&i==="CapturingGroup"&&e.set(s,e.get(t)??t),s[o]=i);return s}function pl(t){let e=Zs(t);return e.isRecursive=!0,e}function Wd(t,e){let n=[];for(;t=t.parent;)(!e||e(t))&&n.push(t);return n}function ao(t,e){if(e.has(t))return e.get(t);let n=`$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return e.set(t,n),n}function _l(t){let e=["dotAll","ignoreCase"],n={enable:{},disable:{}};return t.forEach(({flags:r})=>{e.forEach(s=>{r.enable?.[s]&&(delete n.disable[s],n.enable[s]=!0),r.disable?.[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Kd({dotAll:t,ignoreCase:e}){let n={};return(t||e)&&(n.enable={},t&&(n.enable.dotAll=!0),e&&(n.enable.ignoreCase=!0)),(!t||!e)&&(n.disable={},!t&&(n.disable.dotAll=!0),!e&&(n.disable.ignoreCase=!0)),n}function vl(t){if(!t)throw new Error("Node expected");let{body:e}=t;return Array.isArray(e)?e:e?[e]:null}function El(t){let e=t.find(n=>n.kind==="search_start"||Jd(n,{negate:!1})||!Vd(n));if(!e)return null;if(e.kind==="search_start")return e;if(e.type==="LookaroundAssertion")return e.body[0].body[0];if(e.type==="CapturingGroup"||e.type==="Group"){let n=[];for(let r of e.body){let s=El(r.body);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function Al(t,e){let n=vl(t)??[];for(let r of n)if(r===e||Al(r,e))return!0;return!1}function Vd({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function zd(t){let e=["Character","CharacterClass","CharacterSet"];return e.includes(t.type)||t.type==="Quantifier"&&t.min&&e.includes(t.body.type)}function Jd(t,e){let n={negate:null,...e};return t.type==="LookaroundAssertion"&&(n.negate===null||t.negate===n.negate)&&t.body.length===1&&xr(t.body[0],{type:"Assertion",kind:"search_start"})}function lo(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function De(t,e){let r=Tr(t,{...e,unicodePropertyMap:ho}).body;return r.length>1||r[0].body.length>1?ne({body:r}):r[0].body[0]}function co(t,e){return t.negate=e,t}function Qe(t,e){return t.parent=e,t}function j(t,e){return Sl(t),t.parent=e,t}function Yd(t,e){let n=bl(e),r=uo(n.target,"ES2024"),s=uo(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let i=null,a=null;if(!s){let h=[t.flags.ignoreCase];lt(t,Qd,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(p){h.push(p)},setHasCasedChar(){h.at(-1)?i=!0:a=!0}})}let l={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||i)&&!a)},c=t,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:t._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!s&&i&&a),useFlagMods:s,useFlagV:r,verbose:n.verbose};function f(h){return u.lastNode=c,c=h,Td(Xd[h.type],`Unexpected node type "${h.type}"`)(h,u,f)}let d={pattern:t.body.map(f).join("|"),flags:f(t.flags),options:{...t.options}};return r||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],u.captureMap.forEach((h,p)=>{h.hidden&&d._hiddenCaptures.push(p),h.transferTo&&wn(d._captureTransfers,h.transferTo,[]).push(p)}),d}var Qd={"*":{enter({node:t},e){if(ml(t)){let n=e.getCurrentModI();e.pushModI(t.flags?Pr({ignoreCase:n},t.flags).ignoreCase:n)}},exit({node:t},e){ml(t)&&e.popModI()}},Backreference(t,e){e.setHasCasedChar()},Character({node:t},e){po(H(t.value))&&e.setHasCasedChar()},CharacterClassRange({node:t,skip:e},n){e(),Nl(t,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:t},e){t.kind==="property"&&kl.has(t.value)&&e.setHasCasedChar()}},Xd={Alternative({body:t},e,n){return t.map(n).join("")},Assertion({kind:t,negate:e}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return e?N`\B`:N`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},e){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!e.useFlagMods&&e.accuracy==="strict"&&e.currentFlags.ignoreCase&&!e.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,e,n){let{body:r,name:s,number:o}=t,i={ignoreCase:e.currentFlags.ignoreCase},a=e.originMap.get(t);return a&&(i.hidden=!0,o>a.number&&(i.transferTo=a.number)),e.captureMap.set(o,i),`(${s?`?<${s}>`:""}${r.map(n).join("|")})`},Character({value:t},e){let n=H(t),r=xt(t,{escDigit:e.lastNode.type==="Backreference",inCharClass:e.inCharClass,useFlagV:e.useFlagV});if(r!==n)return r;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase&&po(n)){let s=wl(n);return e.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return n},CharacterClass(t,e,n){let{kind:r,negate:s,parent:o}=t,{body:i}=t;if(r==="intersection"&&!e.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");me.bugFlagVLiteralHyphenIsRange&&e.useFlagV&&i.some(yl)&&(i=[Et(45),...i.filter(c=>!yl(c))]);let a=()=>`[${s?"^":""}${i.map(n).join(r==="intersection"?"&&":"")}]`;if(!e.inCharClass){if((!e.useFlagV||me.bugNestedClassIgnoresNegation)&&!s){let u=i.filter(f=>f.type==="CharacterClass"&&f.kind==="union"&&f.negate);if(u.length){let f=ne(),d=f.body[0];return f.parent=o,d.parent=f,i=i.filter(h=>!u.includes(h)),t.body=i,i.length?(t.parent=d,d.body.push(t)):f.body.pop(),u.forEach(h=>{let p=Me({body:[h]});h.parent=p,p.parent=f,f.body.push(p)}),n(f)}}e.inCharClass=!0;let c=a();return e.inCharClass=!1,c}let l=i[0];if(r==="union"&&!s&&l&&((!e.useFlagV||!e.verbose)&&o.kind==="union"&&!(me.bugFlagVLiteralHyphenIsRange&&e.useFlagV)||!e.verbose&&o.kind==="intersection"&&i.length===1&&l.type!=="CharacterClassRange"))return i.map(n).join("");if(!e.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(t,e){let n=t.min.value,r=t.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:e.useFlagV},o=xt(n,s),i=xt(r,s),a=new Set;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase){let l=Nl(t);rh(l).forEach(u=>{a.add(Array.isArray(u)?`${xt(u[0],s)}-${xt(u[1],s)}`:xt(u,s))})}return`${o}-${i}${[...a].join("")}`},CharacterSet({kind:t,negate:e,value:n,key:r},s){if(t==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":N`[^\n]`;if(t==="digit")return e?N`\D`:N`\d`;if(t==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&kl.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${e?N`\P`:N`\p`}{${r?`${r}=`:""}${n}}`}if(t==="word")return e?N`\W`:N`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,e){return(e.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:e,flags:n,parent:r},s,o){let i=s.currentFlags;n&&(s.currentFlags=Pr(i,n));let a=e.map(o).join("|"),l=!s.verbose&&e.length===1&&r.type!=="Quantifier"&&!t&&(!s.useFlagMods||!n)?a:`(?${sh(t,n,s.useFlagMods)}${a})`;return s.currentFlags=i,l},LookaroundAssertion({body:t,kind:e,negate:n},r,s){return`(?${`${e==="lookahead"?"":"<"}${n?"!":"="}`}${t.map(s).join("|")})`},Quantifier(t,e,n){return n(t.body)+oh(t)},Subroutine({isRecursive:t,ref:e},n){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return e===0?`(?R=${r})`:N`\g<${e}&R=${r}>`}},Zd=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),eh=new Set(["-","\\","]","^","["]),th=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),gl=new Map([[9,N`\t`],[10,N`\n`],[11,N`\v`],[12,N`\f`],[13,N`\r`],[8232,N`\u2028`],[8233,N`\u2029`],[65279,N`\uFEFF`]]),nh=/^\p{Cased}$/u;function po(t){return nh.test(t)}function Nl(t,e){let n=!!e?.firstOnly,r=t.min.value,s=t.max.value,o=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return o;for(let i=r;i<=s;i++){let a=H(i);if(!po(a))continue;let l=wl(a).filter(c=>{let u=c.codePointAt(0);return u<r||u>s});if(l.length&&(o.push(...l),n))break}return o}function xt(t,{escDigit:e,inCharClass:n,useFlagV:r}){if(gl.has(t))return gl.get(t);if(t<32||t>126&&t<160||t>262143||e&&ih(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;let s=n?r?th:eh:Zd,o=H(t);return(s.has(o)?"\\":"")+o}function rh(t){let e=t.map(s=>s.codePointAt(0)).sort((s,o)=>s-o),n=[],r=null;for(let s=0;s<e.length;s++)e[s+1]===e[s]+1?r??=e[s]:r===null?n.push(e[s]):(n.push([r,e[s]]),r=null);return n}function sh(t,e,n){if(t)return">";let r="";if(e&&n){let{enable:s,disable:o}=e;r=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${r}:`}function oh({kind:t,max:e,min:n}){let r;return!n&&e===1?r="?":!n&&e===1/0?r="*":n===1&&e===1/0?r="+":n===e?r=`{${n}}`:r=`{${n},${e===1/0?"":e}}`,r+{greedy:"",lazy:"?",possessive:"+"}[t]}function ml({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function ih(t){return t>47&&t<58}function yl({type:t,value:e}){return t==="Character"&&e===45}var ah=class fo extends RegExp{#t=new Map;#e=null;#r;#n=null;#s=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(e,n,r){let s=!!r?.lazyCompile;if(e instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");let o=e;super(o,n),this.#r=o.source,o instanceof fo&&(this.#t=o.#t,this.#n=o.#n,this.#s=o.#s,this.rawOptions=o.rawOptions)}else{let o={hiddenCaptures:[],strategy:null,transfers:[],...r};super(s?"":e,n),this.#r=e,this.#t=ch(o.hiddenCaptures,o.transfers),this.#s=o.strategy,this.rawOptions=r??{}}s||(this.#e=this)}exec(e){if(!this.#e){let{lazyCompile:s,...o}=this.rawOptions;this.#e=new fo(this.#r,this.flags,o)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#s==="clip_search"&&n&&r){this.lastIndex=0;let s=this.#o(e.slice(r));return s&&(lh(s,r,e,this.hasIndices),this.lastIndex+=r),s}return this.#o(e)}#o(e){this.#e.lastIndex=this.lastIndex;let n=super.exec.call(this.#e,e);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;let r=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);let o=[0];for(let i=1;i<r.length;i++){let{hidden:a,transferTo:l}=this.#t.get(i)??{};if(a?o.push(null):(o.push(n.length),n.push(r[i]),this.hasIndices&&n.indices.push(s[i])),l&&r[i]!==void 0){let c=o[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(n[c]=r[i],this.hasIndices&&(n.indices[c]=s[i]),n.groups){this.#n||(this.#n=uh(this.source));let u=this.#n.get(l);u&&(n.groups[u]=r[i],this.hasIndices&&(n.indices.groups[u]=s[i]))}}}return n}};function lh(t,e,n,r){if(t.index+=e,t.input=n,r){let s=t.indices;for(let i=0;i<s.length;i++){let a=s[i];a&&(s[i]=[a[0]+e,a[1]+e])}let o=s.groups;o&&Object.keys(o).forEach(i=>{let a=o[i];a&&(o[i]=[a[0]+e,a[1]+e])})}}function ch(t,e){let n=new Map;for(let r of t)n.set(r,{hidden:!0});for(let[r,s]of e)for(let o of s)wn(n,o,{}).transferTo=r;return n}function uh(t){let e=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,s=0,o;for(;o=e.exec(t);){let{0:i,groups:{capture:a,name:l}}=o;i==="["?r++:r?i==="]"&&r--:a&&(s++,l&&n.set(s,l))}return n}function xl(t,e){let n=fh(t,e);return n.options?new ah(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function fh(t,e){let n=bl(e),r=Tr(t,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:ho}),s=Dd(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Yd(s,n),i=dl(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),a=ro(i.pattern),l=no(a.pattern,{captureTransfers:i.captureTransfers,hiddenCaptures:i.hiddenCaptures}),c={pattern:l.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{let u=l.hiddenCaptures.sort((p,g)=>p-g),f=Array.from(l.captureTransfers),d=s._strategy,h=c.pattern.length>=n.lazyCompileLength;(u.length||f.length||d||h)&&(c.options={...u.length&&{hiddenCaptures:u},...f.length&&{transfers:f},...d&&{strategy:d},...h&&{lazyCompile:h}})}return c}function Il(t,e){return xl(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...e})}function go(t={}){let e={target:"auto",cache:new Map,...t};return e.regexConstructor||=n=>Il(n,{target:e.target}),{createScanner(n){return new Pa(n,e)},createString:$a}}var Tl=(t,e)=>{let n=new Set,r=s=>{if(n.has(s))return;n.add(s);let o=new Set(s.embeddedLangs??[]);for(let i of JSON.stringify(s).matchAll(/"include":"([^"#$][^"]*)"/g))o.add((i[1]??"").split("#")[0]??"");for(let i of t)(o.has(i.name)||o.has(i.scopeName))&&r(i)};for(let s of e){let o=t.find(i=>i.name===s||i.aliases?.includes(s));o&&r(o)}return[...n]};var $l,Mr=new Map,Pl,It,Fr,ph=0,Tt=new Map,gh=t=>{if(Fr)return Promise.reject(Fr);It||(It=new Worker("/assets/code-worker.js"),It.onmessage=({data:n})=>{let r=Tt.get(n.id);Tt.delete(n.id),n.error?r?.reject(new Error(n.error)):r?.resolve(n.tokens??[])},It.onerror=()=>{Fr=new Error("Could not highlight code");for(let n of Tt.values())n.reject(Fr);Tt.clear(),It?.terminate()});let e=++ph;return new Promise((n,r)=>{Tt.set(e,{resolve:n,reject:r});try{It?.postMessage({...t,id:e})}catch(s){Tt.delete(e),r(s)}})},mo=()=>$l??=JSON.parse(document.getElementById("code-grammars")?.textContent??"[]"),Dr=t=>mo().find(e=>e.name===t||e.aliases?.includes(t)),mh=async t=>{let e=document.getElementById("code-grammars")?.dataset.src;if(!(!e||Dr(t))){if(!Mr.has(t)){let n=new URL(e,location.href);n.searchParams.set("language",t),Mr.set(t,fetch(n).then(async r=>{if(!r.ok)throw new Error("Could not load code languages");let s=await r.json();$l=[...new Map([...mo(),...s].map(o=>[o.name,o])).values()]}).catch(r=>{throw Mr.delete(t),r}))}await Mr.get(t)}},yo=t=>{let e=t?.closest("#panel")?document.documentElement.dataset.editorTheme:t?.closest("[data-theme]")?.dataset.theme??document.documentElement.dataset.theme;return e==="dark"||(!e||e==="auto")&&matchMedia("(prefers-color-scheme: dark)").matches?"github-dark":"github-light"},Ml=async(t,e,n)=>{if(t.length>1e5||t.split(`
|
|
285
|
-
`).some(
|
|
284
|
+
\v\f\x85\u2028\u2029])`),e));else if(l==="posix")if(!s&&(u==="graph"||u==="print")){if(r==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let f={graph:"!-~",print:" -~"}[u];c&&(f=`\0-${H(f.codePointAt(0)-1)}${H(f.codePointAt(2)+1)}-\u{10FFFF}`),n(j(De(`[${f}]`),e))}else n(j(uo(De(Gd.get(u)),c),e));else if(l==="property")po.has(Nt(u))||(t.key="sc");else if(l==="space")n(Qe(at("space",{negate:c}),e));else if(l==="word")n(j(uo(De(Fe),c),e));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:t,parent:e,root:n,remove:r,replaceWith:s,removeAllPrevSiblings:o,removeAllNextSiblings:i}){let{kind:a,flags:l}=t;if(a==="flags")if(!l.enable&&!l.disable)r();else{let c=ne({flags:l});c.body[0].body=i(),s(j(c,e),{traverse:!0})}else if(a==="keep"){let c=n.body[0],f=n.body.length===1&&Ir(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(e.parent!==f||f.body.length>1)throw new Error(N`Uses "\K" in a way that's unsupported`);let d=Je({behind:!0});d.body[0].body=o(),s(j(d,e))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:t,parent:e}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete t[n]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),e.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;let{enable:e,disable:n}=t.flags;e?.extended&&delete e.extended,n?.extended&&delete n.extended,e?.dotAll&&n?.dotAll&&delete e.dotAll,e?.ignoreCase&&n?.ignoreCase&&delete e.ignoreCase,e&&!Object.keys(e).length&&delete t.flags.enable,n&&!Object.keys(n).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},e){let{kind:n}=t;n==="lookbehind"&&(e.passedLookbehind=!0)},NamedCallout({node:t,parent:e,replaceWith:n}){let{kind:r}=t;if(r==="fail")n(j(Je({negate:!0}),e));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){let e=ne();e.body[0].body.push(t.body),t.body=j(e,t)}},Regex:{enter({node:t},{supportedGNodes:e}){let n=[],r=!1,s=!1;for(let o of t.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{let i=xl(o.body);i?(r=!0,Array.isArray(i)?n.push(...i):n.push(i)):s=!0}r&&!s&&n.forEach(o=>e.add(o))},exit(t,{accuracy:e,passedLookbehind:n,strategy:r}){if(e==="strict"&&n&&r)throw new Error(N`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:e}){let{ref:n}=t;typeof n=="string"&&!co(n)&&(n=lo(n,e),t.ref=n)}},Hd={Backreference({node:t},{multiplexCapturesToLeftByRef:e,reffedNodesByReferencer:n}){let{orphan:r,ref:s}=t;r||n.set(t,[...e.get(s).map(({node:o})=>o)])},CapturingGroup:{enter({node:t,parent:e,replaceWith:n,skip:r},{groupOriginByCopy:s,groupsByName:o,multiplexCapturesToLeftByRef:i,openRefs:a,reffedNodesByReferencer:l}){let c=s.get(t);if(c&&a.has(t.number)){let f=Qe(yl(t.number),e);l.set(f,a.get(t.number)),n(f);return}a.set(t.number,t),i.set(t.number,[]),t.name&&kn(i,t.name,[]);let u=i.get(t.name??t.number);for(let f=0;f<u.length;f++){let d=u[f];if(c===d.node||c&&c===d.origin||t===d.origin){u.splice(f,1);break}}if(i.get(t.number).push({node:t,origin:c}),t.name&&i.get(t.name).push({node:t,origin:c}),t.name){let f=kn(o,t.name,new Map),d=!1;if(c)d=!0;else for(let h of f.values())if(!h.hasDuplicateNameToRemove){d=!0;break}o.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:d})}},exit({node:t},{openRefs:e}){e.get(t.number)===t&&e.delete(t.number)}},Group:{enter({node:t},e){e.prevFlags=e.currentFlags,t.flags&&(e.currentFlags=Mr(e.currentFlags,t.flags))},exit(t,e){e.currentFlags=e.prevFlags}},Subroutine({node:t,parent:e,replaceWith:n},r){let{isRecursive:s,ref:o}=t;if(s){let u=e;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===o||u.number===o)););r.reffedNodesByReferencer.set(t,u);return}let i=r.subroutineRefMap.get(o),a=o===0,l=a?yl(0):El(i,r.groupOriginByCopy,null),c=l;if(!a){let u=Al(zd(i,d=>d.type==="Group"&&!!d.flags)),f=u?Mr(r.globalFlags,u):r.globalFlags;Kd(f,r.currentFlags)||(c=ne({flags:Jd(f)}),c.body[0].body.push(l))}n(j(c,e),{traverse:!a})}},Wd={Backreference({node:t,parent:e,replaceWith:n},r){if(t.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,t.ref);return}let o=r.reffedNodesByReferencer.get(t).filter(i=>Vd(i,t));if(!o.length)n(j(Je({negate:!0}),e));else if(o.length>1){let i=ne({atomic:!0,body:o.reverse().map(a=>$e({body:[Tr(a.number)]}))});n(j(i,e))}else t.ref=o[0].number},CapturingGroup({node:t},e){t.number=++e.numCapturesToLeft,t.name&&e.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},e){let n=Math.max(e.highestOrphanBackref-e.numCapturesToLeft,0);for(let r=0;r<n;r++){let s=Xs();t.body.at(-1).body.push(s)}}},Subroutine({node:t},e){!t.isRecursive||t.ref===0||(t.ref=e.reffedNodesByReferencer.get(t).number)}};function vl(t){lt(t,{"*"({node:e,parent:n}){e.parent=n}})}function Kd(t,e){return t.dotAll===e.dotAll&&t.ignoreCase===e.ignoreCase}function Vd(t,e){let n=e;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===t)return!1;let r=Nl(n.parent);for(let s of r){if(s===n)break;if(s===t||Il(s,t))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function El(t,e,n,r){let s=Array.isArray(t)?[]:{};for(let[o,i]of Object.entries(t))o==="parent"?s.parent=Array.isArray(n)?r:n:i&&typeof i=="object"?s[o]=El(i,e,s,n):(o==="type"&&i==="CapturingGroup"&&e.set(s,e.get(t)??t),s[o]=i);return s}function yl(t){let e=eo(t);return e.isRecursive=!0,e}function zd(t,e){let n=[];for(;t=t.parent;)(!e||e(t))&&n.push(t);return n}function lo(t,e){if(e.has(t))return e.get(t);let n=`$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return e.set(t,n),n}function Al(t){let e=["dotAll","ignoreCase"],n={enable:{},disable:{}};return t.forEach(({flags:r})=>{e.forEach(s=>{r.enable?.[s]&&(delete n.disable[s],n.enable[s]=!0),r.disable?.[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Jd({dotAll:t,ignoreCase:e}){let n={};return(t||e)&&(n.enable={},t&&(n.enable.dotAll=!0),e&&(n.enable.ignoreCase=!0)),(!t||!e)&&(n.disable={},!t&&(n.disable.dotAll=!0),!e&&(n.disable.ignoreCase=!0)),n}function Nl(t){if(!t)throw new Error("Node expected");let{body:e}=t;return Array.isArray(e)?e:e?[e]:null}function xl(t){let e=t.find(n=>n.kind==="search_start"||Xd(n,{negate:!1})||!Yd(n));if(!e)return null;if(e.kind==="search_start")return e;if(e.type==="LookaroundAssertion")return e.body[0].body[0];if(e.type==="CapturingGroup"||e.type==="Group"){let n=[];for(let r of e.body){let s=xl(r.body);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function Il(t,e){let n=Nl(t)??[];for(let r of n)if(r===e||Il(r,e))return!0;return!1}function Yd({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function Qd(t){let e=["Character","CharacterClass","CharacterSet"];return e.includes(t.type)||t.type==="Quantifier"&&t.min&&e.includes(t.body.type)}function Xd(t,e){let n={negate:null,...e};return t.type==="LookaroundAssertion"&&(n.negate===null||t.negate===n.negate)&&t.body.length===1&&Ir(t.body[0],{type:"Assertion",kind:"search_start"})}function co(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function De(t,e){let r=Lr(t,{...e,unicodePropertyMap:po}).body;return r.length>1||r[0].body.length>1?ne({body:r}):r[0].body[0]}function uo(t,e){return t.negate=e,t}function Qe(t,e){return t.parent=e,t}function j(t,e){return vl(t),t.parent=e,t}function Zd(t,e){let n=Sl(e),r=fo(n.target,"ES2024"),s=fo(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let i=null,a=null;if(!s){let h=[t.flags.ignoreCase];lt(t,eh,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(p){h.push(p)},setHasCasedChar(){h.at(-1)?i=!0:a=!0}})}let l={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||i)&&!a)},c=t,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:t._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!s&&i&&a),useFlagMods:s,useFlagV:r,verbose:n.verbose};function f(h){return u.lastNode=c,c=h,Bd(th[h.type],`Unexpected node type "${h.type}"`)(h,u,f)}let d={pattern:t.body.map(f).join("|"),flags:f(t.flags),options:{...t.options}};return r||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],u.captureMap.forEach((h,p)=>{h.hidden&&d._hiddenCaptures.push(p),h.transferTo&&kn(d._captureTransfers,h.transferTo,[]).push(p)}),d}var eh={"*":{enter({node:t},e){if(wl(t)){let n=e.getCurrentModI();e.pushModI(t.flags?Mr({ignoreCase:n},t.flags).ignoreCase:n)}},exit({node:t},e){wl(t)&&e.popModI()}},Backreference(t,e){e.setHasCasedChar()},Character({node:t},e){go(H(t.value))&&e.setHasCasedChar()},CharacterClassRange({node:t,skip:e},n){e(),Tl(t,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:t},e){t.kind==="property"&&_l.has(t.value)&&e.setHasCasedChar()}},th={Alternative({body:t},e,n){return t.map(n).join("")},Assertion({kind:t,negate:e}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return e?N`\B`:N`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},e){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!e.useFlagMods&&e.accuracy==="strict"&&e.currentFlags.ignoreCase&&!e.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,e,n){let{body:r,name:s,number:o}=t,i={ignoreCase:e.currentFlags.ignoreCase},a=e.originMap.get(t);return a&&(i.hidden=!0,o>a.number&&(i.transferTo=a.number)),e.captureMap.set(o,i),`(${s?`?<${s}>`:""}${r.map(n).join("|")})`},Character({value:t},e){let n=H(t),r=It(t,{escDigit:e.lastNode.type==="Backreference",inCharClass:e.inCharClass,useFlagV:e.useFlagV});if(r!==n)return r;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase&&go(n)){let s=Cl(n);return e.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return n},CharacterClass(t,e,n){let{kind:r,negate:s,parent:o}=t,{body:i}=t;if(r==="intersection"&&!e.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");me.bugFlagVLiteralHyphenIsRange&&e.useFlagV&&i.some(kl)&&(i=[At(45),...i.filter(c=>!kl(c))]);let a=()=>`[${s?"^":""}${i.map(n).join(r==="intersection"?"&&":"")}]`;if(!e.inCharClass){if((!e.useFlagV||me.bugNestedClassIgnoresNegation)&&!s){let u=i.filter(f=>f.type==="CharacterClass"&&f.kind==="union"&&f.negate);if(u.length){let f=ne(),d=f.body[0];return f.parent=o,d.parent=f,i=i.filter(h=>!u.includes(h)),t.body=i,i.length?(t.parent=d,d.body.push(t)):f.body.pop(),u.forEach(h=>{let p=$e({body:[h]});h.parent=p,p.parent=f,f.body.push(p)}),n(f)}}e.inCharClass=!0;let c=a();return e.inCharClass=!1,c}let l=i[0];if(r==="union"&&!s&&l&&((!e.useFlagV||!e.verbose)&&o.kind==="union"&&!(me.bugFlagVLiteralHyphenIsRange&&e.useFlagV)||!e.verbose&&o.kind==="intersection"&&i.length===1&&l.type!=="CharacterClassRange"))return i.map(n).join("");if(!e.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(t,e){let n=t.min.value,r=t.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:e.useFlagV},o=It(n,s),i=It(r,s),a=new Set;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase){let l=Tl(t);ih(l).forEach(u=>{a.add(Array.isArray(u)?`${It(u[0],s)}-${It(u[1],s)}`:It(u,s))})}return`${o}-${i}${[...a].join("")}`},CharacterSet({kind:t,negate:e,value:n,key:r},s){if(t==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":N`[^\n]`;if(t==="digit")return e?N`\D`:N`\d`;if(t==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&_l.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${e?N`\P`:N`\p`}{${r?`${r}=`:""}${n}}`}if(t==="word")return e?N`\W`:N`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,e){return(e.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:e,flags:n,parent:r},s,o){let i=s.currentFlags;n&&(s.currentFlags=Mr(i,n));let a=e.map(o).join("|"),l=!s.verbose&&e.length===1&&r.type!=="Quantifier"&&!t&&(!s.useFlagMods||!n)?a:`(?${ah(t,n,s.useFlagMods)}${a})`;return s.currentFlags=i,l},LookaroundAssertion({body:t,kind:e,negate:n},r,s){return`(?${`${e==="lookahead"?"":"<"}${n?"!":"="}`}${t.map(s).join("|")})`},Quantifier(t,e,n){return n(t.body)+lh(t)},Subroutine({isRecursive:t,ref:e},n){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return e===0?`(?R=${r})`:N`\g<${e}&R=${r}>`}},nh=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),rh=new Set(["-","\\","]","^","["]),sh=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),bl=new Map([[9,N`\t`],[10,N`\n`],[11,N`\v`],[12,N`\f`],[13,N`\r`],[8232,N`\u2028`],[8233,N`\u2029`],[65279,N`\uFEFF`]]),oh=/^\p{Cased}$/u;function go(t){return oh.test(t)}function Tl(t,e){let n=!!e?.firstOnly,r=t.min.value,s=t.max.value,o=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return o;for(let i=r;i<=s;i++){let a=H(i);if(!go(a))continue;let l=Cl(a).filter(c=>{let u=c.codePointAt(0);return u<r||u>s});if(l.length&&(o.push(...l),n))break}return o}function It(t,{escDigit:e,inCharClass:n,useFlagV:r}){if(bl.has(t))return bl.get(t);if(t<32||t>126&&t<160||t>262143||e&&ch(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;let s=n?r?sh:rh:nh,o=H(t);return(s.has(o)?"\\":"")+o}function ih(t){let e=t.map(s=>s.codePointAt(0)).sort((s,o)=>s-o),n=[],r=null;for(let s=0;s<e.length;s++)e[s+1]===e[s]+1?r??=e[s]:r===null?n.push(e[s]):(n.push([r,e[s]]),r=null);return n}function ah(t,e,n){if(t)return">";let r="";if(e&&n){let{enable:s,disable:o}=e;r=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${r}:`}function lh({kind:t,max:e,min:n}){let r;return!n&&e===1?r="?":!n&&e===1/0?r="*":n===1&&e===1/0?r="+":n===e?r=`{${n}}`:r=`{${n},${e===1/0?"":e}}`,r+{greedy:"",lazy:"?",possessive:"+"}[t]}function wl({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function ch(t){return t>47&&t<58}function kl({type:t,value:e}){return t==="Character"&&e===45}var uh=class ho extends RegExp{#t=new Map;#e=null;#r;#n=null;#s=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(e,n,r){let s=!!r?.lazyCompile;if(e instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");let o=e;super(o,n),this.#r=o.source,o instanceof ho&&(this.#t=o.#t,this.#n=o.#n,this.#s=o.#s,this.rawOptions=o.rawOptions)}else{let o={hiddenCaptures:[],strategy:null,transfers:[],...r};super(s?"":e,n),this.#r=e,this.#t=dh(o.hiddenCaptures,o.transfers),this.#s=o.strategy,this.rawOptions=r??{}}s||(this.#e=this)}exec(e){if(!this.#e){let{lazyCompile:s,...o}=this.rawOptions;this.#e=new ho(this.#r,this.flags,o)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#s==="clip_search"&&n&&r){this.lastIndex=0;let s=this.#o(e.slice(r));return s&&(fh(s,r,e,this.hasIndices),this.lastIndex+=r),s}return this.#o(e)}#o(e){this.#e.lastIndex=this.lastIndex;let n=super.exec.call(this.#e,e);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;let r=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);let o=[0];for(let i=1;i<r.length;i++){let{hidden:a,transferTo:l}=this.#t.get(i)??{};if(a?o.push(null):(o.push(n.length),n.push(r[i]),this.hasIndices&&n.indices.push(s[i])),l&&r[i]!==void 0){let c=o[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(n[c]=r[i],this.hasIndices&&(n.indices[c]=s[i]),n.groups){this.#n||(this.#n=hh(this.source));let u=this.#n.get(l);u&&(n.groups[u]=r[i],this.hasIndices&&(n.indices.groups[u]=s[i]))}}}return n}};function fh(t,e,n,r){if(t.index+=e,t.input=n,r){let s=t.indices;for(let i=0;i<s.length;i++){let a=s[i];a&&(s[i]=[a[0]+e,a[1]+e])}let o=s.groups;o&&Object.keys(o).forEach(i=>{let a=o[i];a&&(o[i]=[a[0]+e,a[1]+e])})}}function dh(t,e){let n=new Map;for(let r of t)n.set(r,{hidden:!0});for(let[r,s]of e)for(let o of s)kn(n,o,{}).transferTo=r;return n}function hh(t){let e=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,s=0,o;for(;o=e.exec(t);){let{0:i,groups:{capture:a,name:l}}=o;i==="["?r++:r?i==="]"&&r--:a&&(s++,l&&n.set(s,l))}return n}function Ll(t,e){let n=ph(t,e);return n.options?new uh(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function ph(t,e){let n=Sl(e),r=Lr(t,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:po}),s=Ud(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Zd(s,n),i=gl(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),a=so(i.pattern),l=ro(a.pattern,{captureTransfers:i.captureTransfers,hiddenCaptures:i.hiddenCaptures}),c={pattern:l.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{let u=l.hiddenCaptures.sort((p,g)=>p-g),f=Array.from(l.captureTransfers),d=s._strategy,h=c.pattern.length>=n.lazyCompileLength;(u.length||f.length||d||h)&&(c.options={...u.length&&{hiddenCaptures:u},...f.length&&{transfers:f},...d&&{strategy:d},...h&&{lazyCompile:h}})}return c}function Rl(t,e){return Ll(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...e})}function mo(t={}){let e={target:"auto",cache:new Map,...t};return e.regexConstructor||=n=>Rl(n,{target:e.target}),{createScanner(n){return new Fa(n,e)},createString:Da}}var Bl=(t,e)=>{let n=new Set,r=s=>{if(n.has(s))return;n.add(s);let o=new Set(s.embeddedLangs??[]);for(let i of JSON.stringify(s).matchAll(/"include":"([^"#$][^"]*)"/g))o.add((i[1]??"").split("#")[0]??"");for(let i of t)(o.has(i.name)||o.has(i.scopeName))&&r(i)};for(let s of e){let o=t.find(i=>i.name===s||i.aliases?.includes(s));o&&r(o)}return[...n]};var yh=ft(),yo=new Map,Fr=new Map,Fl=new Map,Tt,Dr,bh=0,Lt=new Map,wh=t=>{if(Dr)return Promise.reject(Dr);Tt||(Tt=new Worker("/assets/code-worker.js"),Tt.onmessage=({data:n})=>{let r=Lt.get(n.id);Lt.delete(n.id),n.error?r?.reject(new Error(n.error)):r?.resolve(n.tokens??[])},Tt.onerror=()=>{Dr=new Error("Could not highlight code");for(let n of Lt.values())n.reject(Dr);Lt.clear(),Tt?.terminate()});let e=++bh;return new Promise((n,r)=>{Lt.set(e,{resolve:n,reject:r});try{Tt?.postMessage({...t,id:e})}catch(s){Lt.delete(e),r(s)}})},bo=t=>{let e=yo.get(t);return e||(e=t===yh?JSON.parse(document.getElementById("code-grammars")?.textContent??"[]"):[],yo.set(t,e)),e},Gr=(t,e=ft())=>bo(e).find(n=>n.name===t||n.aliases?.includes(t)),kh=async(t,e)=>{let n=document.getElementById("code-grammars")?.dataset.src;if(!n||Gr(t,e))return;let r=JSON.stringify([e,t]);if(!Fr.has(r)){let s=new URL(n,location.href);s.searchParams.set("language",t),Fr.set(r,_o(s,void 0,e).then(async o=>{if(!o.ok)throw new Error("Could not load code languages");let i=await o.json();yo.set(e,[...new Map([...bo(e),...i].map(a=>[a.name,a])).values()])}).catch(o=>{throw Fr.delete(r),o}))}await Fr.get(r)},wo=t=>{let e=t?.closest("#panel")?document.documentElement.dataset.editorTheme:t?.closest("[data-theme]")?.dataset.theme??document.documentElement.dataset.theme;return e==="dark"||(!e||e==="auto")&&matchMedia("(prefers-color-scheme: dark)").matches?"github-dark":"github-light"},Dl=async(t,e,n,r=ft())=>{if(t.length>1e5||t.split(`
|
|
285
|
+
`).some(i=>i.length>1e4))return[];await kh(e,r);let s=Gr(e,r);if(!s)return[];let o={source:t,language:s.name,theme:n??wo(),grammars:Bl(bo(r),[s.name]),workspace:r};return typeof Worker<"u"&&document.getElementById("code-grammars")?.dataset.src?wh(o):Sh(o)},Sh=async t=>{let e=t.workspace??"local",n=Fl.get(e);n||(n=Ma({langs:[],themes:[Promise.resolve().then(()=>(Pl(),Ol)),Promise.resolve().then(()=>($l(),Ml))],engine:mo()}),Fl.set(e,n));let r=await n;return r.getLoadedLanguages().includes(t.language)||await r.loadLanguage(...t.grammars),r.codeToTokens(t.source,{lang:t.language,theme:t.theme}).tokens};var ko=new WeakMap,Rt=new Map,Gl=new IntersectionObserver(t=>{for(let e of t)Rt.set(e.target,e.isIntersecting);Sn()},{rootMargin:"200px"}),Sn=()=>{for(let t of Rt.keys())t.isConnected||(Gl.unobserve(t),Rt.delete(t));for(let t of document.querySelectorAll(".codeblk")){if(Rt.has(t)||(Rt.set(t,!1),Gl.observe(t)),!Rt.get(t))continue;let e=wo(t),n=t.closest("[data-workspace]")?.dataset.workspace??ft(),r=t.querySelector("pre code"),s=t.getAttribute("data-lang")??t.querySelector(".codeblk-lang")?.textContent??"";if(!r)continue;let o=r.textContent??"",i=`${n}\0${e}\0${s}\0${o}`;ko.get(r)!==i&&(ko.set(r,i),Dl(o,s,e,n).then(a=>{!r.isConnected||ko.get(r)!==i||pi(r,o,Gr(s,n)?.name??s,a)}).catch(()=>{}))}};new MutationObserver(Sn).observe(document.body,{childList:!0,subtree:!0});new MutationObserver(Sn).observe(document.documentElement,{attributeFilter:["data-theme"],subtree:!0});matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Sn);Sn();})();
|