diff --git a/src/components/BootstrapBlazor.CodeEditor/.gitignore b/src/components/BootstrapBlazor.CodeEditor/.gitignore new file mode 100644 index 00000000..3189f954 --- /dev/null +++ b/src/components/BootstrapBlazor.CodeEditor/.gitignore @@ -0,0 +1 @@ +!package-lock.json diff --git a/src/components/BootstrapBlazor.CodeEditor/BootstrapBlazor.CodeEditor.csproj b/src/components/BootstrapBlazor.CodeEditor/BootstrapBlazor.CodeEditor.csproj index 10d27bb9..781f9334 100644 --- a/src/components/BootstrapBlazor.CodeEditor/BootstrapBlazor.CodeEditor.csproj +++ b/src/components/BootstrapBlazor.CodeEditor/BootstrapBlazor.CodeEditor.csproj @@ -1,5 +1,9 @@  + + 10.0.1 + + Bootstrap Blazor WebAssembly wasm UI Components Bootstrap UI components extensions of monaco-editor diff --git a/src/components/BootstrapBlazor.CodeEditor/Components/CodeEditor/CodeEditor.razor.cs b/src/components/BootstrapBlazor.CodeEditor/Components/CodeEditor/CodeEditor.razor.cs index 17691c82..ef131584 100644 --- a/src/components/BootstrapBlazor.CodeEditor/Components/CodeEditor/CodeEditor.razor.cs +++ b/src/components/BootstrapBlazor.CodeEditor/Components/CodeEditor/CodeEditor.razor.cs @@ -1,4 +1,4 @@ -// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Website: https://www.blazor.zone or https://argozhang.github.io/ @@ -7,52 +7,62 @@ namespace BootstrapBlazor.Components; /// -/// +/// 代码编辑器组件 +/// Code editor component /// public partial class CodeEditor { - private const string MONACO_VS_PATH = "/_content/BootstrapBlazor.CodeEditor/monaco-editor/min/vs"; + private const string MonacoStylePath = "_content/BootstrapBlazor.CodeEditor/monaco-editor/monaco.css"; + + private const string CodeEditorStylePath = "_content/BootstrapBlazor.CodeEditor/code-editor.bundle.css"; /// - /// Language used by the editor: csharp, javascript, ... + /// 获得/设置 编辑器语言 + /// Gets or sets the editor language /// [Parameter] [NotNull] public string? Language { get; set; } /// - /// Theme of the editor. + /// 获得/设置 编辑器主题 + /// Gets or sets the editor theme /// [Parameter] [NotNull] public string? Theme { get; set; } /// - /// Gets or sets the value of the input. This should be used with two-way binding. + /// 获得/设置 输入的值。应与双向绑定一起使用。 + /// Gets or sets the value of the input. This should be used with two-way binding. /// [Parameter] public string? Value { get; set; } /// - /// Gets or sets a callback that updates the bound value. + /// 获得/设置 更新绑定值的回调。 + /// Gets or sets a callback that updates the bound value. /// [Parameter] public EventCallback ValueChanged { get; set; } /// - /// Gets or sets a callback that updates the bound value. + /// 获得/设置 更新绑定值的回调。 + /// Gets or sets a callback that updates the bound value. /// [Parameter] public Func? OnValueChanged { get; set; } /// - /// 获得/设置 是否显示行号 默认 false + /// 获得/设置 是否显示行号 默认 false + /// Gets or sets whether to show line numbers. Default is false. /// [Parameter] public bool ShowLineNo { get; set; } /// - /// 获得/设置 是否显示只读 默认 false + /// 获得/设置 是否显示只读 默认 false + /// Gets or sets whether to show read-only. Default is false. /// [Parameter] public bool IsReadonly { get; set; } @@ -98,30 +108,46 @@ protected override async Task InvokeInitAsync() Value, Language, Theme, - Path = MONACO_VS_PATH, LineNumbers = ShowLineNo, ReadOnly = IsReadonly, + StyleSheets = new List() + { +#if NET9_0_OR_GREATER + Assets[MonacoStylePath], + Assets[CodeEditorStylePath] +#else + MonacoStylePath, + CodeEditorStylePath +#endif + } }; await InvokeVoidAsync("init", Id, Interop, options); } /// - /// + /// 使代码编辑器获得焦点。 + /// Sets focus to the code editor. /// - /// public async Task Focus() => await InvokeVoidAsync("focus"); /// - /// + /// 重新计算代码编辑器的布局。 + /// Recalculates the layout of the code editor. /// - /// public async Task Resize() => await InvokeVoidAsync("resize"); /// - /// + /// 在当前光标位置插入文本,替换当前选定内容。 + /// Inserts text at the current cursor position, replacing the current selection. /// - /// - /// + /// + public async Task InsertTextAsync(string data) => await InvokeVoidAsync("insertText", Id, data); + + /// + /// 更新编辑器值并通知值变更回调。 + /// Updates the editor value and notifies the value change callbacks. + /// + /// The updated editor value. [JSInvokable] public async Task UpdateValueAsync(string value) { diff --git a/src/components/BootstrapBlazor.CodeEditor/Components/CodeEditor/CodeEditor.razor.js b/src/components/BootstrapBlazor.CodeEditor/Components/CodeEditor/CodeEditor.razor.js index 91a6761e..2de1cdfe 100644 --- a/src/components/BootstrapBlazor.CodeEditor/Components/CodeEditor/CodeEditor.razor.js +++ b/src/components/BootstrapBlazor.CodeEditor/Components/CodeEditor/CodeEditor.razor.js @@ -1,27 +1,27 @@ -import { addLink, addScript } from '../../../BootstrapBlazor/modules/utility.js' +import { addLink } from '../../../BootstrapBlazor/modules/utility.js' import Data from '../../../BootstrapBlazor/modules/data.js' import EventHandler from "../../../BootstrapBlazor/modules/event-handler.js" +let monacoLoader; + +const loadMonaco = () => { + monacoLoader ??= import('../../monaco-editor/monaco.js'); + return monacoLoader; +} + export async function init(id, interop, options) { const editor = {}; Data.set(id, editor); - await addLink('_content/BootstrapBlazor.CodeEditor/code-editor.bundle.css'); - await addScript('_content/BootstrapBlazor.CodeEditor/monaco-editor/min/vs/loader.js'); + const [module] = await Promise.all([ + loadMonaco(), + ...options.styleSheets.map(styleSheet => addLink(styleSheet)) + ]); + editor.monaco = module.monaco; const init = container => { - - // Hide the Progress Ring - monaco.editor.onDidCreateEditor((e) => { - const progress = container.querySelector(".spinner"); - if (progress && progress.style) { - progress.style.display = "none"; - } - }); - - // Create the Monaco Editor const body = container.querySelector(".code-editor-body"); - editor.editor = monaco.editor.create(body, { + editor.editor = editor.monaco.editor.create(body, { ariaLabel: "online code editor", value: options.value, language: options.language, @@ -30,14 +30,16 @@ export async function init(id, interop, options) { readOnly: options.readOnly, }); - // Catch when the editor lost the focus (didType to immediate) + const progress = container.querySelector(".spinner"); + if (progress) { + progress.style.display = "none"; + } + editor.editor.onDidBlurEditorText((e) => { const code = editor.editor.getValue(); interop.invokeMethodAsync("UpdateValueAsync", code); }); - monaco.editor.setModelLanguage(monaco.editor.getModels()[0], options.language) - editor.editor.layout(); EventHandler.on(window, "resize", () => { @@ -45,47 +47,48 @@ export async function init(id, interop, options) { }); } - const protocol = window.location.protocol; - const host = window.location.hostname; - const port = window.location.port; - let fullDomain = ""; - - if (port === "80" && protocol === "http:") { - fullDomain = `${protocol}//${host}`; - } else if (port === "443" && protocol === "https:") { - fullDomain = `${protocol}//${host}`; - } else { - fullDomain = `${protocol}//${host}:${port}`; - } - - // require is provided by loader.min.js. - require.config({ - paths: {'vs': `${fullDomain}${options.path}`} - }); + editor.handler = setInterval(() => { + const container = document.getElementById(id); + if (container?.offsetHeight > 0) { + clearInterval(editor.handler); + init(container); + editor.handler = null; + delete editor.handler; + } + }, 50); +} - require(["vs/editor/editor.main"], () => { - editor.handler = setInterval(() => { - var container = document.getElementById(id); - if (container.offsetHeight > 0) { - clearInterval(editor.handler); - init(container); - editor.handler = null; - delete editor.handler; - } - }, 50); - }); +export function insertText(id, insertData) { + const wrapper = Data.get(id); + if (!wrapper) return; + + const editor = wrapper.editor; + const selection = editor.getSelection(); + editor.executeEdits('insert-custom-text', [ + { + range: selection, + text: insertData, + forceMoveMarkers: true + } + ]); + editor.focus(); } -// Update the editor options export function monacoSetOptions(id, options) { - var editor = Data.get(id); - if (editor) { - editor.editor.setValue(options.value); - editor.editor.updateOptions({ + const wrapper = Data.get(id); + if (wrapper?.editor) { + const value = options.value ?? ''; + if (wrapper.editor.getValue() !== value) { + wrapper.editor.setValue(value); + } + wrapper.editor.updateOptions({ language: options.language, theme: options.theme }); - monaco.editor.setModelLanguage(monaco.editor.getModels()[0], options.language) + const model = wrapper.editor.getModel(); + if (model) { + wrapper.monaco.editor.setModelLanguage(model, options.language); + } } } diff --git a/src/components/BootstrapBlazor.CodeEditor/package-lock.json b/src/components/BootstrapBlazor.CodeEditor/package-lock.json new file mode 100644 index 00000000..316836c0 --- /dev/null +++ b/src/components/BootstrapBlazor.CodeEditor/package-lock.json @@ -0,0 +1,540 @@ +{ + "name": "bootstrapblazor-code-editor-assets", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bootstrapblazor-code-editor-assets", + "devDependencies": { + "esbuild": "0.28.2", + "monaco-editor": "0.56.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/dompurify": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.14.tgz", + "integrity": "sha512-dVoH9z+MY+C9IilgGCk3YfFqjLi3fChm2OiKJMzh6axrJ5qwxqWaZamgmHrpv22CN/KdbZJuGEGgfQoL00LTdg==", + "dev": true, + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/marked": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz", + "integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/monaco-editor": { + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.56.0.tgz", + "integrity": "sha512-sXboRm3BeBeLm938eaiyLMe0OxzfXIlZvbv4ir/jVgQy1zDhWjgmny0WoN45fuDKhCCQsYMbBJrv/A6jd8aCUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dompurify": "3.4.8", + "marked": "14.0.0" + } + } + } +} diff --git a/src/components/BootstrapBlazor.CodeEditor/package.json b/src/components/BootstrapBlazor.CodeEditor/package.json new file mode 100644 index 00000000..7648753a --- /dev/null +++ b/src/components/BootstrapBlazor.CodeEditor/package.json @@ -0,0 +1,14 @@ +{ + "name": "bootstrapblazor-code-editor-assets", + "private": true, + "scripts": { + "build": "node ./scripts/build-monaco.mjs" + }, + "devDependencies": { + "esbuild": "0.28.2", + "monaco-editor": "0.56.0" + }, + "overrides": { + "dompurify": "3.4.14" + } +} diff --git a/src/components/BootstrapBlazor.CodeEditor/scripts/build-monaco.mjs b/src/components/BootstrapBlazor.CodeEditor/scripts/build-monaco.mjs new file mode 100644 index 00000000..df15975a --- /dev/null +++ b/src/components/BootstrapBlazor.CodeEditor/scripts/build-monaco.mjs @@ -0,0 +1,41 @@ +import { rm } from "node:fs/promises"; +import { fileURLToPath } from "node:url"; +import path from "node:path"; +import { build } from "esbuild"; + +const projectDirectory = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const outputDirectory = path.join(projectDirectory, "wwwroot", "monaco-editor"); +const monacoDirectory = path.join(projectDirectory, "node_modules", "monaco-editor", "esm", "vs"); + +await rm(outputDirectory, { recursive: true, force: true }); + +const commonOptions = { + bundle: true, + format: "esm", + minify: true, + target: "es2022", + legalComments: "eof", + logLevel: "info" +}; + +await build({ + ...commonOptions, + entryPoints: [path.join(projectDirectory, "scripts", "monaco-entry.js")], + outfile: path.join(outputDirectory, "monaco.js"), + assetNames: "[name]", + loader: { + ".ttf": "file" + } +}); + +await build({ + ...commonOptions, + entryPoints: { + "editor.worker": path.join(monacoDirectory, "editor", "editor.worker.js"), + "json.worker": path.join(monacoDirectory, "language", "json", "json.worker.js"), + "css.worker": path.join(monacoDirectory, "language", "css", "css.worker.js"), + "html.worker": path.join(monacoDirectory, "language", "html", "html.worker.js"), + "ts.worker": path.join(monacoDirectory, "language", "typescript", "ts.worker.js") + }, + outdir: outputDirectory +}); diff --git a/src/components/BootstrapBlazor.CodeEditor/scripts/monaco-entry.js b/src/components/BootstrapBlazor.CodeEditor/scripts/monaco-entry.js new file mode 100644 index 00000000..ac271c83 --- /dev/null +++ b/src/components/BootstrapBlazor.CodeEditor/scripts/monaco-entry.js @@ -0,0 +1,22 @@ +import * as monaco from "monaco-editor"; + +const workerUrls = { + editorWorkerService: new URL("./editor.worker.js", import.meta.url), + json: new URL("./json.worker.js", import.meta.url), + css: new URL("./css.worker.js", import.meta.url), + scss: new URL("./css.worker.js", import.meta.url), + less: new URL("./css.worker.js", import.meta.url), + html: new URL("./html.worker.js", import.meta.url), + handlebars: new URL("./html.worker.js", import.meta.url), + razor: new URL("./html.worker.js", import.meta.url), + typescript: new URL("./ts.worker.js", import.meta.url), + javascript: new URL("./ts.worker.js", import.meta.url) +}; + +globalThis.MonacoEnvironment = { + getWorker(_, label) { + return new Worker(workerUrls[label] ?? workerUrls.editorWorkerService, { type: "module" }); + } +}; + +export { monaco }; diff --git a/src/components/BootstrapBlazor.CodeEditor/wwwroot/monaco-editor/codicon.ttf b/src/components/BootstrapBlazor.CodeEditor/wwwroot/monaco-editor/codicon.ttf new file mode 100644 index 00000000..aa9046c7 Binary files /dev/null and b/src/components/BootstrapBlazor.CodeEditor/wwwroot/monaco-editor/codicon.ttf differ diff --git a/src/components/BootstrapBlazor.CodeEditor/wwwroot/monaco-editor/css.worker.js b/src/components/BootstrapBlazor.CodeEditor/wwwroot/monaco-editor/css.worker.js new file mode 100644 index 00000000..c5714f84 --- /dev/null +++ b/src/components/BootstrapBlazor.CodeEditor/wwwroot/monaco-editor/css.worker.js @@ -0,0 +1,97 @@ +var Eo=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?gr.isErrorNoTelemetry(e)?new gr(e.message+` + +`+e.stack):new Error(e.message+` + +`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Gl=new Eo;function en(t){Ro(t)||Gl.onUnexpectedError(t)}function Jl(t){Ro(t)||Gl.onUnexpectedExternalError(t)}function pi(t){if(t instanceof Error){let{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:gr.isErrorNoTelemetry(t),cause:r?pi(r):void 0,code:t.code}}return t}var Fo="Canceled";function Ro(t){return t instanceof fr?!0:t instanceof Error&&t.name===Fo&&t.message===Fo}var fr=class extends Error{constructor(){super(Fo),this.name=this.message}};var gr=class t extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let n=new t;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},oe=class t extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}};function Kl(t,e="Unreachable"){throw new Error(e)}function Lo(t,e="unexpected state"){if(!t)throw typeof e=="string"?new oe(`Assertion Failed: ${e}`):e}function dt(t){if(!t()){debugger;t(),en(new oe("Assertion Failed"))}}function _n(t,e){let n=0;for(;n=0;R--)yield N[R]}t.reverse=a;function l(N){return!N||N[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(N){return N[Symbol.iterator]().next().value}t.first=c;function d(N,R){let P=0;for(let B of N)if(R(B,P++))return!0;return!1}t.some=d;function u(N,R){let P=0;for(let B of N)if(!R(B,P++))return!1;return!0}t.every=u;function m(N,R){for(let P of N)if(R(P))return P}t.find=m;function*f(N,R){for(let P of N)R(P)&&(yield P)}t.filter=f;function*g(N,R){let P=0;for(let B of N)yield R(B,P++)}t.map=g;function*b(N,R){let P=0;for(let B of N)yield*R(B,P++)}t.flatMap=b;function*_(...N){for(let R of N)Ql(R)?yield*R:yield R}t.concat=_;function F(N,R,P){let B=P;for(let D of N)B=R(B,D);return B}t.reduce=F;function L(N){let R=0;for(let P of N)R++;return R}t.length=L;function*k(N,R,P=N.length){for(R<-N.length&&(R=0),R<0&&(R+=N.length),P<0?P+=N.length:P>N.length&&(P=N.length);R1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Yl(...t){return ut(()=>No(t))}var Io=class{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}};function ut(t){return new Io(t)}var tn=class t{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{No(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===$e.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}},$e=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new tn,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};var ce=class t{static{this.Undefined=new t(void 0)}constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}},br=class{constructor(){this._first=ce.Undefined,this._last=ce.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ce.Undefined}clear(){let e=this._first;for(;e!==ce.Undefined;){let n=e.next;e.prev=ce.Undefined,e.next=ce.Undefined,e=n}this._first=ce.Undefined,this._last=ce.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){let r=new ce(e);if(this._first===ce.Undefined)this._first=r,this._last=r;else if(n){let s=this._last;this._last=r,r.prev=s,s.next=r}else{let s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==ce.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==ce.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==ce.Undefined&&e.next!==ce.Undefined){let n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===ce.Undefined&&e.next===ce.Undefined?(this._first=ce.Undefined,this._last=ce.Undefined):e.next===ce.Undefined?(this._last=this._last.prev,this._last.next=ce.Undefined):e.prev===ce.Undefined&&(this._first=this._first.next,this._first.prev=ce.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==ce.Undefined;)yield e.element,e=e.next}};function Ip(){return globalThis._VSCODE_NLS_MESSAGES}function Do(){return globalThis._VSCODE_NLS_LANGUAGE}var Np=Do()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Zl(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0],o=e[s],a=r;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),Np&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function G(t,e,...n){return Zl(typeof t=="number"?Dp(t,e):e,n)}function Dp(t,e){let n=Ip()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}var nn="en",gi=!1,bi=!1,fi=!1,tc=!1,zo=!1,Mp=!1,Ap=!1,mi,Mo=nn,ec=nn,zp,pt,mt=globalThis,De;typeof mt.vscode<"u"&&typeof mt.vscode.process<"u"?De=mt.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(De=process);var Pp=typeof De?.versions?.electron=="string",Tp=Pp&&De?.type==="renderer";if(typeof De=="object"){gi=De.platform==="win32",bi=De.platform==="darwin",fi=De.platform==="linux",fi&&De.env.SNAP&&De.env.SNAP_REVISION,De.env.CI||De.env.BUILD_ARTIFACTSTAGINGDIRECTORY||De.env.GITHUB_WORKSPACE,mi=nn,Mo=nn;let t=De.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t);mi=e.userLocale,ec=e.osLocale,Mo=e.resolvedLanguage||nn,zp=e.languagePack?.translationsConfigFile}catch{}tc=!0}else typeof navigator=="object"&&!Tp?(pt=navigator.userAgent,gi=pt.indexOf("Windows")>=0,bi=pt.indexOf("Macintosh")>=0,Mp=(pt.indexOf("Macintosh")>=0||pt.indexOf("iPad")>=0||pt.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,fi=pt.indexOf("Linux")>=0,Ap=pt?.indexOf("Mobi")>=0,zo=!0,Mo=Do()||nn,mi=navigator.language.toLowerCase(),ec=mi):console.error("Unable to resolve platform.");var Ao=0;bi?Ao=1:gi?Ao=3:fi&&(Ao=2);var rn=gi,nc=bi;var rc=tc,Po=zo,Op=zo&&typeof mt.importScripts=="function",ic=Op?mt.origin:void 0;var Qe=pt;var Wp=typeof mt.postMessage=="function"&&!mt.importScripts,sc=(()=>{if(Wp){let t=[];mt.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=t.length;r{let r=++e;t.push({id:r,callback:n}),mt.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})();var Up=!!(Qe&&Qe.indexOf("Chrome")>=0),L1=!!(Qe&&Qe.indexOf("Firefox")>=0),I1=!!(!Up&&Qe&&Qe.indexOf("Safari")>=0),N1=!!(Qe&&Qe.indexOf("Edg/")>=0),D1=!!(Qe&&Qe.indexOf("Android")>=0);var En,To=globalThis.vscode;if(typeof To<"u"&&typeof To.process<"u"){let t=To.process;En={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?En={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:En={get platform(){return rn?"win32":nc?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var wr=En.cwd,wi=En.env,oc=En.platform;var Vp=globalThis.performance.now.bind(globalThis.performance),Fn=class t{static create(e){return new t(e)}constructor(e){this._now=e===!1?Date.now:Vp,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var $p=100,ac=6e4;function lc(){return!!wi.VSCODE_DEV}var vi;(function(t){t.None=()=>$e.None;function e(I,E,z){return m(I,()=>{},0,void 0,E??!0,void 0,z)}t.defer=e;function n(I){return(E,z=null,M)=>{let A=!1,V;return V=I(q=>{if(!A)return V?V.dispose():A=!0,E.call(z,q)},null,M),A&&V.dispose(),V}}t.once=n;function r(I,E){return t.once(t.filter(I,E))}t.onceIf=r;function i(I,E,z){return d((M,A=null,V)=>I(q=>M.call(A,E(q)),null,V),z)}t.map=i;function s(I,E,z){return d((M,A=null,V)=>I(q=>{E(q),M.call(A,q)},null,V),z)}t.forEach=s;function o(I,E,z){return d((M,A=null,V)=>I(q=>E(q)&&M.call(A,q),null,V),z)}t.filter=o;function a(I){return I}t.signal=a;function l(...I){return(E,z=null,M)=>{let A=Yl(...I.map(V=>V(q=>E.call(z,q))));return u(A,M)}}t.any=l;function c(I,E,z,M){let A=z;return i(I,V=>(A=E(A,V),A),M)}t.reduce=c;function d(I,E){let z,M={onWillAddFirstListener(){z=I(A.fire,A)},onDidRemoveLastListener(){z?.dispose()}},A=new Ce(M);return E?.add(A),A.event}function u(I,E){return E instanceof Array?E.push(I):E&&E.add(I),I}function m(I,E,z=100,M=!1,A=!1,V,q){let Y,ne,ve,fe=0,Re,ht={leakWarningThreshold:V,onWillAddFirstListener(){Y=I(Rp=>{fe++,ne=E(ne,Rp),M&&!ve&&(Cn.fire(ne),ne=void 0),Re=()=>{let Lp=ne;ne=void 0,ve=void 0,(!M||fe>1)&&Cn.fire(Lp),fe=0},typeof z=="number"?(ve&&clearTimeout(ve),ve=setTimeout(Re,z)):ve===void 0&&(ve=null,queueMicrotask(Re))})},onWillRemoveListener(){A&&fe>0&&Re?.()},onDidRemoveLastListener(){Re=void 0,Y.dispose()}},Cn=new Ce(ht);return q?.add(Cn),Cn.event}t.debounce=m;function f(I,E=0,z,M){return t.debounce(I,(A,V)=>A?(A.push(V),A):[V],E,void 0,z??!0,void 0,M)}t.accumulate=f;function g(I,E,z=100,M=!0,A=!0,V,q){let Y,ne,ve,fe=0,Re={leakWarningThreshold:V,onWillAddFirstListener(){Y=I(Cn=>{fe++,ne=E(ne,Cn),ve===void 0&&(M&&(ht.fire(ne),ne=void 0,fe=0),typeof z=="number"?ve=setTimeout(()=>{A&&fe>0&&ht.fire(ne),ne=void 0,ve=void 0,fe=0},z):(ve=0,queueMicrotask(()=>{A&&fe>0&&ht.fire(ne),ne=void 0,ve=void 0,fe=0})))})},onDidRemoveLastListener(){Y.dispose()}},ht=new Ce(Re);return q?.add(ht),ht.event}t.throttle=g;function b(I,E=(M,A)=>M===A,z){let M=!0,A;return o(I,V=>{let q=M||!E(V,A);return M=!1,A=V,q},z)}t.latch=b;function _(I,E,z){return[t.filter(I,E,z),t.filter(I,M=>!E(M),z)]}t.split=_;function F(I,E,z=!1,M=[],A){let V=M.slice(),q;lc()&&(q={stack:yi.create(),timerId:setTimeout(()=>{V&&V.length>0&&q&&!q.warned&&(q.warned=!0,console.warn(`[Event.buffer][${E}] potential LEAK detected: ${V.length} events buffered for ${ac/1e3}s without being consumed. Buffered here:`),q.stack.print())},ac),warned:!1},A&&A.add(ut(()=>clearTimeout(q.timerId))));let Y=()=>{q&&clearTimeout(q.timerId)},ne=I(Re=>{V?(V.push(Re),lc()&&q&&!q.warned&&V.length>=$p&&(q.warned=!0,console.warn(`[Event.buffer][${E}] potential LEAK detected: ${V.length} events buffered without being consumed. Buffered here:`),q.stack.print())):fe.fire(Re)});A&&A.add(ne);let ve=()=>{V?.forEach(Re=>fe.fire(Re)),V=null,Y()},fe=new Ce({onWillAddFirstListener(){ne||(ne=I(Re=>fe.fire(Re)),A&&A.add(ne))},onDidAddFirstListener(){V&&(z?setTimeout(ve):ve())},onDidRemoveLastListener(){ne&&ne.dispose(),ne=null,Y()}});return A&&A.add(fe),fe.event}t.buffer=F;function L(I,E){return(M,A,V)=>{let q=E(new T);return I(function(Y){let ne=q.evaluate(Y);ne!==k&&M.call(A,ne)},void 0,V)}}t.chain=L;let k=Symbol("HaltChainable");class T{constructor(){this.steps=[]}map(E){return this.steps.push(E),this}forEach(E){return this.steps.push(z=>(E(z),z)),this}filter(E){return this.steps.push(z=>E(z)?z:k),this}reduce(E,z){let M=z;return this.steps.push(A=>(M=E(M,A),M)),this}latch(E=(z,M)=>z===M){let z=!0,M;return this.steps.push(A=>{let V=z||!E(A,M);return z=!1,M=A,V?A:k}),this}evaluate(E){for(let z of this.steps)if(E=z(E),E===k)break;return E}}function W(I,E,z=M=>M){let M=(...Y)=>q.fire(z(...Y)),A=()=>I.on(E,M),V=()=>I.removeListener(E,M),q=new Ce({onWillAddFirstListener:A,onDidRemoveLastListener:V});return q.event}t.fromNodeEventEmitter=W;function $(I,E,z=M=>M){let M=(...Y)=>q.fire(z(...Y)),A=()=>I.addEventListener(E,M),V=()=>I.removeEventListener(E,M),q=new Ce({onWillAddFirstListener:A,onDidRemoveLastListener:V});return q.event}t.fromDOMEventEmitter=$;function N(I,E){let z,M,A=new Promise(V=>{M=n(I)(V),$o(M,E),z=()=>{cc(M,E)}});return A.cancel=z,E&&A.finally(()=>cc(M,E)),A}t.toPromise=N;function R(I,E){return I(z=>E.fire(z))}t.forward=R;function P(I,E,z){return E(z),I(M=>E(M))}t.runAndSubscribe=P;class B{constructor(E,z){this._observable=E,this._counter=0,this._hasChanged=!1;let M={onWillAddFirstListener:()=>{E.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{E.removeObserver(this)}};this.emitter=new Ce(M),z&&z.add(this.emitter)}beginUpdate(E){this._counter++}handlePossibleChange(E){}handleChange(E,z){this._hasChanged=!0}endUpdate(E){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function D(I,E){return new B(I,E).emitter.event}t.fromObservable=D;function C(I){return(E,z,M)=>{let A=0,V=!1,q={beginUpdate(){A++},endUpdate(){A--,A===0&&(I.reportChanges(),V&&(V=!1,E.call(z)))},handlePossibleChange(){},handleChange(){V=!0}};I.addObserver(q),I.reportChanges();let Y={dispose(){I.removeObserver(q)}};return $o(Y,M),Y}}t.fromObservableLight=C})(vi||(vi={}));var Oo=class t{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${t._idPool++}`,t.all.add(this)}start(e){this._stopWatch=new Fn,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},Bp=-1,Wo=class t{static{this._idPool=1}constructor(e,n,r=(t._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,n){let r=this.threshold;if(r<=0||n.3?"dominated":"popular",d=new xi(c,l,s,n,a);this._errorHandler(d)}return()=>{let s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,n=0;for(let[r,i]of this._stacks)(!e||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=l[1]/this._size>.3?"dominated":"popular",d=new Uo(c,`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||en)(d),$e.None}if(this._disposed)return $e.None;n&&(e=e.bind(n));let i=new vr(e),s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=yi.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof vr?(this._deliveryQueue??=new Vo,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let o=ut(()=>{s?.(),this._removeListener(i)});return $o(o,r),o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;let i=this._deliveryQueue.current===this;if(this._size*qp<=n.length){let s=0;for(let o=0;o0}};var Vo=class{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function $o(t,e){e instanceof tn?e.add(t):Array.isArray(e)&&e.push(t)}function cc(t,e){if(e instanceof tn)e.delete(t);else if(Array.isArray(e)){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}function jp(t){return t}var Si=class{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=jp):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){let n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}};var sn;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(sn||(sn={}));var Mt=class{constructor(e){this.executor=e,this._state=sn.Uninitialized}get value(){if(this._state===sn.Uninitialized){this._state=sn.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=sn.Completed}}else if(this._state===sn.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function dc(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function uc(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function pc(t){return t.split(/\r\n|\r|\n/)}function mc(t){for(let e=0,n=t.length;e=0;n--){let r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function Bo(t){return t>=65&&t<=90}function yr(t,e){let n=Math.min(t.length,e.length),r;for(r=0;rn[3*i+1])i=2*i+1;else return n[3*i+2];return 0}};function Gp(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}var Rn=class t{static{this.ambiguousCharacterData=new Mt(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))}static{this.cache=new Si(e=>{let n=e.split(",");function r(u){let m=new Map;for(let f=0;f!u.startsWith("_")&&Object.hasOwn(o,u));a.length===0&&(a=["_default"]);let l;for(let u of a){let m=r(o[u]);l=s(l,m)}let c=r(o._common),d=i(c,l);return new t(d)})}static getInstance(e){return t.cache.get(Array.from(e).join(","))}static{this._locales=new Mt(()=>Object.keys(t.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return t._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},Ln=class t{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static{this._data=void 0}static getData(){return this._data||(this._data=new Set([...Object.values(t.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return t.getData().has(e)}static get codePoints(){return t.getData()}};var jo="default",Jp="$initialize";var Ho=class{constructor(e,n,r,i,s){this.vsWorker=e,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}},_i=class{constructor(e,n,r,i){this.vsWorker=e,this.seq=n,this.res=r,this.err=i,this.type=1}},Go=class{constructor(e,n,r,i,s){this.vsWorker=e,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}},Jo=class{constructor(e,n,r){this.vsWorker=e,this.req=n,this.event=r,this.type=3}},Ko=class{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}},Xo=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,n,r){let i=String(++this._lastSentReq);return new Promise((s,o)=>{this._pendingReplies[i]={resolve:s,reject:o},this._send(new Ho(this._workerId,i,e,n,r))})}listen(e,n,r){let i=null,s=new Ce({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new Go(this._workerId,i,e,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new Ko(this._workerId,i)),i=null}});return s.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,n){let r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(vc(s)?i[s]=o=>this.listen(e,s,o):wc(s)?i[s]=this.listen(e,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...o)=>(await n?.(),this.sendMessage(e,s,o)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}let n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let r=e.err;if(e.err.$isError){let i=new Error;i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack,r=i}n.reject(r);return}n.resolve(e.res)}_handleRequestMessage(e){let n=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(i=>{this._send(new _i(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=pi(i.detail)),this._send(new _i(this._workerId,n,void 0,pi(i)))})}_handleSubscribeEventMessage(e){let n=e.req,r=this._handler.handleEvent(e.channel,e.eventName,e.arg)(i=>{this._send(new Jo(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(e){let n=this._pendingEmitters.get(e.req);if(n===void 0){console.warn("Got event for unknown req");return}n.fire(e.event)}_handleUnsubscribeEventMessage(e){let n=this._pendingEvents.get(e.req);if(n===void 0){console.warn("Got unsubscribe for unknown req");return}n.dispose(),this._pendingEvents.delete(e.req)}_send(e){let n=[];if(e.type===0)for(let r=0;r{e(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)}),this.requestHandler=n(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n,r){if(e===jo&&n===Jp)return this.initialize(r[0]);let i=e===jo?this.requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));let s=i[n];if(typeof s!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${e}`));try{return Promise.resolve(s.apply(i,r))}catch(o){return Promise.reject(o)}}_handleEvent(e,n,r){let i=e===jo?this.requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(vc(n)){let s=i[n];if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);let o=s.call(i,r);if(typeof o!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return o}if(wc(n)){let s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(e){let n=this._remoteChannels.get(e);return n===void 0&&(n=this._protocol.createProxyToRemoteChannel(e),this._remoteChannels.set(e,n)),n}async initialize(e){this._protocol.setWorkerId(e)}};var yc=!1;function xc(t){if(yc)throw new Error("WebWorker already initialized!");yc=!0;let e=new ki(n=>globalThis.postMessage(n),n=>t(n));return globalThis.onmessage=n=>{e.onmessage(n.data)},e}var Be=class{constructor(e,n,r,i){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};var Sc=typeof Buffer<"u";new Mt(()=>new Uint8Array(256));var Qo,Ei=class t{static wrap(e){return Sc&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new t(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return Sc?this.buffer.toString():(Qo||(Qo=new TextDecoder(void 0,{ignoreBOM:!0})),Qo.decode(this.buffer))}};var Cc="0123456789abcdef";function _c({buffer:t}){let e="";for(let n=0;n>>4],e+=Cc[r&15]}return e}function kc(t,e){return(e<<5)-e+t|0}function Fc(t,e){e=kc(149417,e);for(let n=0,r=t.length;n>>r)>>>0}function Sr(t,e=32){return t instanceof ArrayBuffer?_c(Ei.wrap(new Uint8Array(t))):(t>>>0).toString(16).padStart(e/4,"0")}var Ec=class t{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let n=e.length;if(n===0)return;let r=this._buff,i=this._buffLen,s=this._leftoverHighSurrogate,o,a;for(s!==0?(o=s,a=-1,s=0):(o=e.charCodeAt(0),a=0);;){let l=o;if(In(o))if(a+1>>6,e[n++]=128|(r&63)>>>0):r<65536?(e[n++]=224|(r&61440)>>>12,e[n++]=128|(r&4032)>>>6,e[n++]=128|(r&63)>>>0):(e[n++]=240|(r&1835008)>>>18,e[n++]=128|(r&258048)>>>12,e[n++]=128|(r&4032)>>>6,e[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Sr(this._h0)+Sr(this._h1)+Sr(this._h2)+Sr(this._h3)+Sr(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=t._bigBlock32,n=this._buffDV;for(let u=0;u<64;u+=4)e.setUint32(u,n.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,Yo(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,o=this._h3,a=this._h4,l,c,d;for(let u=0;u<80;u++)u<20?(l=i&s|~i&o,c=1518500249):u<40?(l=i^s^o,c=1859775393):u<60?(l=i&s|i&o|s&o,c=2400959708):(l=i^s^o,c=3395469782),d=Yo(r,5)+l+a+c+e.getUint32(u*4,!1)&4294967295,a=o,o=s,s=Yo(i,30),i=r,r=d;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};var Fi=class{constructor(e){this.source=e}getElements(){let e=this.source,n=new Int32Array(e.length);for(let r=0,i=e.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new Be(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},Cr=class t{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;let[i,s,o]=t._getElements(e),[a,l,c]=t._getElements(n);this._hasStrings=o&&c,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){let n=e.getElements();if(t._isStringArray(n)){let r=new Int32Array(n.length);for(let i=0,s=n.length;i=e&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(e>n||r>i){let u;return r<=i?(At.Assert(e===n+1,"originalStart should only be one more than originalEnd"),u=[new Be(e,0,r,i-r+1)]):e<=n?(At.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new Be(e,n-e+1,r,0)]):(At.Assert(e===n+1,"originalStart should only be one more than originalEnd"),At.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}let o=[0],a=[0],l=this.ComputeRecursionPoint(e,n,r,i,o,a,s),c=o[0],d=a[0];if(l!==null)return l;if(!s[0]){let u=this.ComputeDiffRecursive(e,c,r,d,s),m=[];return s[0]?m=[new Be(c+1,n-(c+1)+1,d+1,i-(d+1)+1)]:m=this.ComputeDiffRecursive(c+1,n,d+1,i,s),this.ConcatenateChanges(u,m)}return[new Be(e,n-e+1,r,i-r+1)]}WALKTRACE(e,n,r,i,s,o,a,l,c,d,u,m,f,g,b,_,F,L){let k=null,T=null,W=new Ri,$=n,N=r,R=f[0]-_[0]-i,P=-1073741824,B=this.m_forwardHistory.length-1;do{let D=R+e;D===$||D=0&&(c=this.m_forwardHistory[B],e=c[0],$=1,N=c.length-1)}while(--B>=-1);if(k=W.getReverseChanges(),L[0]){let D=f[0]+1,C=_[0]+1;if(k!==null&&k.length>0){let I=k[k.length-1];D=Math.max(D,I.getOriginalEnd()),C=Math.max(C,I.getModifiedEnd())}T=[new Be(D,m-D+1,C,b-C+1)]}else{W=new Ri,$=o,N=a,R=f[0]-_[0]-l,P=1073741824,B=F?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let D=R+s;D===$||D=d[D+1]?(u=d[D+1]-1,g=u-R-l,u>P&&W.MarkNextChange(),P=u+1,W.AddOriginalElement(u+1,g+1),R=D+1-s):(u=d[D-1],g=u-R-l,u>P&&W.MarkNextChange(),P=u,W.AddModifiedElement(u+1,g+1),R=D-1-s),B>=0&&(d=this.m_reverseHistory[B],s=d[0],$=1,N=d.length-1)}while(--B>=-1);T=W.getChanges()}return this.ConcatenateChanges(k,T)}ComputeRecursionPoint(e,n,r,i,s,o,a){let l=0,c=0,d=0,u=0,m=0,f=0;e--,r--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let g=n-e+(i-r),b=g+1,_=new Int32Array(b),F=new Int32Array(b),L=i-r,k=n-e,T=e-r,W=n-i,N=(k-L)%2===0;_[L]=e,F[k]=n,a[0]=!1;for(let R=1;R<=g/2+1;R++){let P=0,B=0;d=this.ClipDiagonalBound(L-R,R,L,b),u=this.ClipDiagonalBound(L+R,R,L,b);for(let C=d;C<=u;C+=2){C===d||CP+B&&(P=l,B=c),!N&&Math.abs(C-k)<=R-1&&l>=F[C])return s[0]=l,o[0]=c,I<=F[C]&&R<=1448?this.WALKTRACE(L,d,u,T,k,m,f,W,_,F,l,n,s,c,i,o,N,a):null}let D=(P-e+(B-r)-R)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(P,D))return a[0]=!0,s[0]=P,o[0]=B,D>0&&R<=1448?this.WALKTRACE(L,d,u,T,k,m,f,W,_,F,l,n,s,c,i,o,N,a):(e++,r++,[new Be(e,n-e+1,r,i-r+1)]);m=this.ClipDiagonalBound(k-R,R,k,b),f=this.ClipDiagonalBound(k+R,R,k,b);for(let C=m;C<=f;C+=2){C===m||C=F[C+1]?l=F[C+1]-1:l=F[C-1],c=l-(C-k)-W;let I=l;for(;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(F[C]=l,N&&Math.abs(C-L)<=R&&l<=_[C])return s[0]=l,o[0]=c,I>=_[C]&&R<=1448?this.WALKTRACE(L,d,u,T,k,m,f,W,_,F,l,n,s,c,i,o,N,a):null}if(R<=1447){let C=new Int32Array(u-d+2);C[0]=L-d+1,zt.Copy2(_,d,C,1,u-d+1),this.m_forwardHistory.push(C),C=new Int32Array(f-m+2),C[0]=k-m+1,zt.Copy2(F,m,C,1,f-m+1),this.m_reverseHistory.push(C)}}return this.WALKTRACE(L,d,u,T,k,m,f,W,_,F,l,n,s,c,i,o,N,a)}PrettifyChanges(e){for(let n=0;n0,a=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){let r=e[n],i=0,s=0;if(n>0){let u=e[n-1];i=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}let o=r.originalLength>0,a=r.modifiedLength>0,l=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let u=1;;u++){let m=r.originalStart-u,f=r.modifiedStart-u;if(mc&&(c=b,l=u)}r.originalStart-=l,r.modifiedStart-=l;let d=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],d)){e[n-1]=d[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&f>l&&(l=f,c=u,d=m)}return l>0?[c,d]:null}_contiguousSequenceScore(e,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){let r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){let r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,i){let s=this._OriginalRegionIsBoundary(e,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+o}ConcatenateChanges(e,n){let r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){let i=new Array(e.length+n.length-1);return zt.Copy(e,0,i,0,e.length-1),i[e.length-1]=r[0],zt.Copy(n,1,i,e.length,n.length-1),i}else{let i=new Array(e.length+n.length);return zt.Copy(e,0,i,0,e.length),zt.Copy(n,0,i,e.length,n.length),i}}ChangesOverlap(e,n,r){if(At.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),At.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){let i=e.originalStart,s=e.originalLength,o=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(a=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new Be(i,s,o,a),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,i){if(e>=0&&er||e===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return t.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return t.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return t.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return t.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return t.plusRange(this,e)}static plusRange(e,n){let r,i,s,o;return n.startLineNumbere.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===e.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new t(r,i,s,o)}intersectRanges(e){return t.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,d=n.endColumn;return rc?(s=c,o=d):s===c&&(o=Math.min(o,d)),r>s||r===s&&i>o?null:new t(r,i,s,o)}equalsRange(e){return t.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return t.getEndPosition(this)}static getEndPosition(e){return new X(e.endLineNumber,e.endColumn)}getStartPosition(){return t.getStartPosition(this)}static getStartPosition(e){return new X(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new t(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new t(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return t.collapseToStart(this)}static collapseToStart(e){return new t(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return t.collapseToEnd(this)}static collapseToEnd(e){return new t(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new t(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,n=e){return new t(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};function Zo(t){return t<0?0:t>255?255:t|0}function on(t){return t<0?0:t>4294967295?4294967295:t|0}var _r=class t{constructor(e){let n=Zo(e);this._defaultValue=n,this._asciiMap=t._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){let n=new Uint8Array(256);return n.fill(e),n}set(e,n){let r=Zo(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}};var ta=class{constructor(e,n,r){let i=new Uint8Array(e*n);for(let s=0,o=e*n;sn&&(n=l),a>r&&(r=a),c>r&&(r=c)}n++,r++;let i=new ta(r,n,0);for(let s=0,o=e.length;s=this._maxCharCode?0:this._states.get(e,n)}},ea=null;function Kp(){return ea===null&&(ea=new na([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),ea}var kr=null;function Xp(){if(kr===null){kr=new _r(0);let t=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026|`;for(let n=0;ni);if(i>0){let a=n.charCodeAt(i-1),l=n.charCodeAt(o);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(e,n=Kp()){let r=Xp(),i=[];for(let s=1,o=e.getLineCount();s<=o;s++){let a=e.getLineContent(s),l=a.length,c=0,d=0,u=0,m=1,f=!1,g=!1,b=!1,_=!1;for(;c=0?(i+=r?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}};var Ic=Object.freeze(function(t,e){let n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}}),Ii;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof Nn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:vi.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ic})})(Ii||(Ii={}));var Nn=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Ic:(this._emitter||(this._emitter=new Ce),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Er=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Nn),this._token}cancel(){this._token?this._token instanceof Nn&&this._token.cancel():this._token=Ii.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Nn&&this._token.dispose():this._token=Ii.None}};var Fr=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Ni=new Fr,ia=new Fr,sa=new Fr,Qp=new Array(230),Yp=Object.create(null),Zp=Object.create(null),Dc=[];for(let t=0;t<=193;t++)Dc[t]=-1;(function(){let e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Del",46,"VK_DELETE","Delete",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(let i of e){let[s,o,a,l,c,d,u,m,f]=i;if(r[o]||(r[o]=!0,Yp[a]=o,Zp[a.toLowerCase()]=o,s&&(Dc[o]=l)),!n[l]){if(n[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);Ni.define(l,c),ia.define(l,m||c),sa.define(l,f||m||c)}d&&(Qp[d]=l)}})();var Nc;(function(t){function e(a){return Ni.keyCodeToStr(a)}t.toString=e;function n(a){return Ni.strToKeyCode(a)}t.fromString=n;function r(a){return ia.keyCodeToStr(a)}t.toUserSettingsUS=r;function i(a){return sa.keyCodeToStr(a)}t.toUserSettingsGeneral=i;function s(a){return ia.strToKeyCode(a)||sa.strToKeyCode(a)}t.fromUserSettings=s;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right";case 20:return"Delete"}return Ni.keyCodeToStr(a)}t.toElectronAccelerator=o})(Nc||(Nc={}));function Mc(t,e){let n=(e&65535)<<16>>>0;return(t|n)>>>0}var em=65,tm=97,nm=90,rm=122,an=46,ye=47,Me=92,ft=58,im=63,Di=class extends Error{constructor(e,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";let s=e.indexOf(".")!==-1?"property":"argument",o=`The "${e}" ${s} ${i} of type ${n}`;o+=`. Received type ${typeof r}`,super(o),this.code="ERR_INVALID_ARG_TYPE"}};function sm(t,e){if(t===null||typeof t!="object")throw new Di(e,"Object",t)}function de(t,e){if(typeof t!="string")throw new Di(e,"string",t)}var bt=oc==="win32";function te(t){return t===ye||t===Me}function oa(t){return t===ye}function gt(t){return t>=em&&t<=nm||t>=tm&&t<=rm}function Mi(t,e,n,r){let i="",s=0,o=-1,a=0,l=0;for(let c=0;c<=t.length;++c){if(c2){let d=i.lastIndexOf(n);d===-1?(i="",s=0):(i=i.slice(0,d),s=i.length-1-i.lastIndexOf(n)),o=c,a=0;continue}else if(i.length!==0){i="",s=0,o=c,a=0;continue}}e&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${t.slice(o+1,c)}`:i=t.slice(o+1,c),s=c-o-1;o=c,a=0}else l===an&&a!==-1?++a:a=-1}return i}function om(t){return t?`${t[0]==="."?"":"."}${t}`:""}function Ac(t,e){sm(e,"pathObject");let n=e.dir||e.root,r=e.base||`${e.name||""}${om(e.ext)}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}var _e={resolve(...t){let e="",n="",r=!1;for(let i=t.length-1;i>=-1;i--){let s;if(i>=0){if(s=t[i],de(s,`paths[${i}]`),s.length===0)continue}else e.length===0?s=wr():(s=wi[`=${e}`]||wr(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===Me)&&(s=`${e}\\`));let o=s.length,a=0,l="",c=!1,d=s.charCodeAt(0);if(o===1)te(d)&&(a=1,c=!0);else if(te(d))if(c=!0,te(s.charCodeAt(1))){let u=2,m=u;for(;u2&&te(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(r){if(e.length>0)break}else if(n=`${s.slice(a)}\\${n}`,r=c,c&&e.length>0)break}return n=Mi(n,!r,"\\",te),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){de(t,"path");let e=t.length;if(e===0)return".";let n=0,r,i=!1,s=t.charCodeAt(0);if(e===1)return oa(s)?"\\":t;if(te(s))if(i=!0,te(t.charCodeAt(1))){let a=2,l=a;for(;a2&&te(t.charCodeAt(2))&&(i=!0,n=3));let o=n0&&te(t.charCodeAt(e-1))&&(o+="\\"),!i&&r===void 0&&t.includes(":")){if(o.length>=2&>(o.charCodeAt(0))&&o.charCodeAt(1)===ft)return`.\\${o}`;let a=t.indexOf(":");do if(a===e-1||te(t.charCodeAt(a+1)))return`.\\${o}`;while((a=t.indexOf(":",a+1))!==-1)}return r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(t){de(t,"path");let e=t.length;if(e===0)return!1;let n=t.charCodeAt(0);return te(n)||e>2&>(n)&&t.charCodeAt(1)===ft&&te(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let s=0;s0&&(e===void 0?e=n=o:e+=`\\${o}`)}if(e===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&te(n.charCodeAt(0))){++i;let s=n.length;s>1&&te(n.charCodeAt(1))&&(++i,s>2&&(te(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(e=`\\${e.slice(i)}`)}return _e.normalize(e)},relative(t,e){if(de(t,"from"),de(e,"to"),t===e)return"";let n=_e.resolve(t),r=_e.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";if(n.length!==t.length||r.length!==e.length){let g=n.split("\\"),b=r.split("\\");g[g.length-1]===""&&g.pop(),b[b.length-1]===""&&b.pop();let _=g.length,F=b.length,L=_L?b.slice(k).join("\\"):_>L?"..\\".repeat(_-1-k)+"..":"":"..\\".repeat(_-k)+b.slice(k).join("\\")}let i=0;for(;ii&&t.charCodeAt(s-1)===Me;)s--;let o=s-i,a=0;for(;aa&&e.charCodeAt(l-1)===Me;)l--;let c=l-a,d=od){if(e.charCodeAt(a+m)===Me)return r.slice(a+m+1);if(m===2)return r.slice(a+m)}o>d&&(t.charCodeAt(i+m)===Me?u=m:m===2&&(u=3)),u===-1&&(u=0)}let f="";for(m=i+u+1;m<=s;++m)(m===s||t.charCodeAt(m)===Me)&&(f+=f.length===0?"..":"\\..");return a+=u,f.length>0?`${f}${r.slice(a,l)}`:(r.charCodeAt(a)===Me&&++a,r.slice(a,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=_e.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===Me){if(e.charCodeAt(1)===Me){let n=e.charCodeAt(2);if(n!==im&&n!==an)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(gt(e.charCodeAt(0))&&e.charCodeAt(1)===ft&&e.charCodeAt(2)===Me)return`\\\\?\\${e}`;return e},dirname(t){de(t,"path");let e=t.length;if(e===0)return".";let n=-1,r=0,i=t.charCodeAt(0);if(e===1)return te(i)?t:".";if(te(i)){if(n=r=1,te(t.charCodeAt(1))){let a=2,l=a;for(;a2&&te(t.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let a=e-1;a>=r;--a)if(te(t.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(s===-1){if(n===-1)return".";s=n}return t.slice(0,s)},basename(t,e){e!==void 0&&de(e,"suffix"),de(t,"path");let n=0,r=-1,i=!0,s;if(t.length>=2&>(t.charCodeAt(0))&&t.charCodeAt(1)===ft&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let o=e.length-1,a=-1;for(s=t.length-1;s>=n;--s){let l=t.charCodeAt(s);if(te(l)){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=n;--s)if(te(t.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){de(t,"path");let e=0,n=-1,r=0,i=-1,s=!0,o=0;t.length>=2&&t.charCodeAt(1)===ft&>(t.charCodeAt(0))&&(e=r=2);for(let a=t.length-1;a>=e;--a){let l=t.charCodeAt(a);if(te(l)){if(!s){r=a+1;break}continue}i===-1&&(s=!1,i=a+1),l===an?n===-1?n=a:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:Ac.bind(null,"\\"),parse(t){de(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let n=t.length,r=0,i=t.charCodeAt(0);if(n===1)return te(i)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(te(i)){if(r=1,te(t.charCodeAt(1))){let u=2,m=u;for(;u0&&(e.root=t.slice(0,r));let s=-1,o=r,a=-1,l=!0,c=t.length-1,d=0;for(;c>=r;--c){if(i=t.charCodeAt(c),te(i)){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),i===an?s===-1?s=c:d!==1&&(d=1):s!==-1&&(d=-1)}return a!==-1&&(s===-1||d===0||d===1&&s===a-1&&s===o+1?e.base=e.name=t.slice(o,a):(e.name=t.slice(o,s),e.base=t.slice(o,a),e.ext=t.slice(s,a))),o>0&&o!==r?e.dir=t.slice(0,o-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},am=(()=>{if(bt){let t=/\\/g;return()=>{let e=wr().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>wr()})(),xe={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=0&&!n;r--){let i=t[r];de(i,`paths[${r}]`),i.length!==0&&(e=`${i}/${e}`,n=i.charCodeAt(0)===ye)}if(!n){let r=am();e=`${r}/${e}`,n=r.charCodeAt(0)===ye}return e=Mi(e,!n,"/",oa),n?`/${e}`:e.length>0?e:"."},normalize(t){if(de(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===ye,n=t.charCodeAt(t.length-1)===ye;return t=Mi(t,!e,"/",oa),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return de(t,"path"),t.length>0&&t.charCodeAt(0)===ye},join(...t){if(t.length===0)return".";let e=[];for(let n=0;n0&&e.push(r)}return e.length===0?".":xe.normalize(e.join("/"))},relative(t,e){if(de(t,"from"),de(e,"to"),t===e||(t=xe.resolve(t),e=xe.resolve(e),t===e))return"";let n=1,r=t.length,i=r-n,s=1,o=e.length-s,a=ia){if(e.charCodeAt(s+c)===ye)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else i>a&&(t.charCodeAt(n+c)===ye?l=c:c===0&&(l=0));let d="";for(c=n+l+1;c<=r;++c)(c===r||t.charCodeAt(c)===ye)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(s+l)}`},toNamespacedPath(t){return t},dirname(t){if(de(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===ye,n=-1,r=!0;for(let i=t.length-1;i>=1;--i)if(t.charCodeAt(i)===ye){if(!r){n=i;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&de(e,"suffix"),de(t,"path");let n=0,r=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let o=e.length-1,a=-1;for(s=t.length-1;s>=0;--s){let l=t.charCodeAt(s);if(l===ye){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===ye){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){de(t,"path");let e=-1,n=0,r=-1,i=!0,s=0;for(let o=t.length-1;o>=0;--o){let a=t[o];if(a==="/"){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),a==="."?e===-1?e=o:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||r===-1||s===0||s===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:Ac.bind(null,"/"),parse(t){de(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let n=t.charCodeAt(0)===ye,r;n?(e.root="/",r=1):r=0;let i=-1,s=0,o=-1,a=!0,l=t.length-1,c=0;for(;l>=r;--l){let d=t.charCodeAt(l);if(d===ye){if(!a){s=l+1;break}continue}o===-1&&(a=!1,o=l+1),d===an?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}if(o!==-1){let d=s===0&&n?1:s;i===-1||c===0||c===1&&i===o-1&&i===s+1?e.base=e.name=t.slice(d,o):(e.name=t.slice(d,i),e.base=t.slice(d,o),e.ext=t.slice(i,o))}return s>0?e.dir=t.slice(0,s-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};xe.win32=_e.win32=_e;xe.posix=_e.posix=xe;var Eg=bt?_e.normalize:xe.normalize,zc=bt?_e.join:xe.join,Fg=bt?_e.resolve:xe.resolve,Rg=bt?_e.relative:xe.relative,Lg=bt?_e.dirname:xe.dirname,Ig=bt?_e.basename:xe.basename,Ng=bt?_e.extname:xe.extname,Dg=bt?_e.sep:xe.sep;var lm=/^\w[\w\d+.-]*$/,cm=/^\//,hm=/^\/\//;function dm(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!lm.test(t.scheme)){let n=[...t.scheme.matchAll(/[^\w\d+.-]/gu)],r=n.length>0?` Found '${n[0][0]}' at index ${n[0].index} (${n.length} total)`:"";throw new Error(`[UriError]: Scheme contains illegal characters.${r} (len:${t.scheme.length})`)}if(t.path){if(t.authority){if(!cm.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(hm.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function um(t,e){return!t&&!e?"file":t}function pm(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==qe&&(e=qe+e):e=qe;break}return e}var ae="",qe="/",mm=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Le=class t{static isUri(e){return e instanceof t?!0:!e||typeof e!="object"?!1:typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function"}constructor(e,n,r,i,s,o=!1){typeof e=="object"?(this.scheme=e.scheme||ae,this.authority=e.authority||ae,this.path=e.path||ae,this.query=e.query||ae,this.fragment=e.fragment||ae):(this.scheme=um(e,o),this.authority=n||ae,this.path=pm(this.scheme,r||ae),this.query=i||ae,this.fragment=s||ae,dm(this,o))}get fsPath(){return aa(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:i,query:s,fragment:o}=e;return n===void 0?n=this.scheme:n===null&&(n=ae),r===void 0?r=this.authority:r===null&&(r=ae),i===void 0?i=this.path:i===null&&(i=ae),s===void 0?s=this.query:s===null&&(s=ae),o===void 0?o=this.fragment:o===null&&(o=ae),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new Pt(n,r,i,s,o)}static parse(e,n=!1){let r=mm.exec(e);return r?new Pt(r[2]||ae,Ai(r[4]||ae),Ai(r[5]||ae),Ai(r[7]||ae),Ai(r[9]||ae),n):new Pt(ae,ae,ae,ae,ae)}static file(e){let n=ae;if(rn&&(e=e.replace(/\\/g,qe)),e[0]===qe&&e[1]===qe){let r=e.indexOf(qe,2);r===-1?(n=e.substring(2),e=qe):(n=e.substring(2,r),e=e.substring(r)||qe)}return new Pt("file",n,e,ae,ae)}static from(e,n){return new Pt(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error(`[UriError]: cannot call joinPath on URI without path: ${e.toString()}`);let r;return rn&&e.scheme==="file"?r=t.file(_e.join(aa(e,!0),...n)).path:r=xe.join(e.path,...n),e.with({path:r})}toString(e=!1){return la(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof t)return e;{let n=new Pt(e);return n._formatted=e.external??null,n._fsPath=e._sep===Oc?e.fsPath??null:null,n}}else return e}},Oc=rn?1:void 0,Pt=class extends Le{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=aa(this,!1)),this._fsPath}toString(e=!1){return e?la(this,!0):(this._formatted||(this._formatted=la(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Oc),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Wc={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Pc(t,e,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||e&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r!==void 0&&(r+=t.charAt(s));else{r===void 0&&(r=t.substr(0,s));let a=Wc[o];a!==void 0?(i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r+=a):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(t.substring(i))),r!==void 0?r:t}function fm(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,rn&&(n=n.replace(/\//g,"\\")),n}function la(t,e){let n=e?fm:Pc,r="",{scheme:i,authority:s,path:o,query:a,fragment:l}=t;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=qe,r+=qe),s){let c=s.indexOf("@");if(c!==-1){let d=s.substr(0,c);s=s.substr(c+1),c=d.lastIndexOf(":"),c===-1?r+=n(d,!1,!1):(r+=n(d.substr(0,c),!1,!1),r+=":",r+=n(d.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let c=o.charCodeAt(1);c>=65&&c<=90&&(o=`/${String.fromCharCode(c+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let c=o.charCodeAt(0);c>=65&&c<=90&&(o=`${String.fromCharCode(c+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),l&&(r+="#",r+=e?l:Pc(l,!1,!1)),r}function Uc(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+Uc(t.substr(3)):t}}var Tc=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ai(t){return t.match(Tc)?t.replace(Tc,e=>Uc(e)):t}var zi=class t extends U{constructor(e,n,r,i){super(e,n,r,i),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return t.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new X(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new X(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new t(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new t(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,i=e.length;r{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){this._factories.get(e)?.dispose();let r=new ca(this,e,n);return this._factories.set(e,r),ut(()=>{let i=this._factories.get(e);!i||i!==r||(this._factories.delete(e),i.dispose())})}async getOrCreate(e){let n=this.get(e);if(n)return n;let r=this._factories.get(e);return!r||r.isResolved?null:(await r.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;let r=this._factories.get(e);return!!(!r||r.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},ca=class extends $e{get isResolved(){return this._isResolved}constructor(e,n,r){super(),this._registry=e,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}};var Ti=class{constructor(e,n,r){this.offset=e,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};var Bc;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(Bc||(Bc={}));var qc;(function(t){let e=new Map;e.set(0,j.symbolMethod),e.set(1,j.symbolFunction),e.set(2,j.symbolConstructor),e.set(3,j.symbolField),e.set(4,j.symbolVariable),e.set(5,j.symbolClass),e.set(6,j.symbolStruct),e.set(7,j.symbolInterface),e.set(8,j.symbolModule),e.set(9,j.symbolProperty),e.set(10,j.symbolEvent),e.set(11,j.symbolOperator),e.set(12,j.symbolUnit),e.set(13,j.symbolValue),e.set(15,j.symbolEnum),e.set(14,j.symbolConstant),e.set(15,j.symbolEnum),e.set(16,j.symbolEnumMember),e.set(17,j.symbolKeyword),e.set(28,j.symbolSnippet),e.set(18,j.symbolText),e.set(19,j.symbolColor),e.set(20,j.symbolFile),e.set(21,j.symbolReference),e.set(22,j.symbolCustomColor),e.set(23,j.symbolFolder),e.set(24,j.symbolTypeParameter),e.set(25,j.account),e.set(26,j.issues),e.set(27,j.tools);function n(o){let a=e.get(o);return a||(console.info("No codicon found for CompletionItemKind "+o),a=j.symbolProperty),a}t.toIcon=n;function r(o){switch(o){case 0:return G(763,"Method");case 1:return G(764,"Function");case 2:return G(765,"Constructor");case 3:return G(766,"Field");case 4:return G(767,"Variable");case 5:return G(768,"Class");case 6:return G(769,"Struct");case 7:return G(770,"Interface");case 8:return G(771,"Module");case 9:return G(772,"Property");case 10:return G(773,"Event");case 11:return G(774,"Operator");case 12:return G(775,"Unit");case 13:return G(776,"Value");case 14:return G(777,"Constant");case 15:return G(778,"Enum");case 16:return G(779,"Enum Member");case 17:return G(780,"Keyword");case 18:return G(781,"Text");case 19:return G(782,"Color");case 20:return G(783,"File");case 21:return G(784,"Reference");case 22:return G(785,"Custom Color");case 23:return G(786,"Folder");case 24:return G(787,"Type Parameter");case 25:return G(788,"User");case 26:return G(789,"Issue");case 27:return G(790,"Tool");case 28:return G(791,"Snippet");default:return""}}t.toLabel=r;let i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",28),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),i.set("tool",27);function s(o,a){let l=i.get(o);return typeof l>"u"&&!a&&(l=9),l}t.fromString=s})(qc||(qc={}));var jc;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(jc||(jc={}));var Hc;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(Hc||(Hc={}));var Gc;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(Gc||(Gc={}));var Jc;(function(t){t[t.Automatic=0]="Automatic",t[t.PasteAs=1]="PasteAs"})(Jc||(Jc={}));var Kc;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Kc||(Kc={}));var Xc;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Xc||(Xc={}));var tb={17:G(792,"array"),16:G(793,"boolean"),4:G(794,"class"),13:G(795,"constant"),8:G(796,"constructor"),9:G(797,"enumeration"),21:G(798,"enumeration member"),23:G(799,"event"),7:G(800,"field"),0:G(801,"file"),11:G(802,"function"),10:G(803,"interface"),19:G(804,"key"),5:G(805,"method"),1:G(806,"module"),2:G(807,"namespace"),20:G(808,"null"),15:G(809,"number"),18:G(810,"object"),24:G(811,"operator"),3:G(812,"package"),6:G(813,"property"),14:G(814,"string"),22:G(815,"struct"),25:G(816,"type parameter"),12:G(817,"variable")};var Qc;(function(t){let e=new Map;e.set(0,j.symbolFile),e.set(1,j.symbolModule),e.set(2,j.symbolNamespace),e.set(3,j.symbolPackage),e.set(4,j.symbolClass),e.set(5,j.symbolMethod),e.set(6,j.symbolProperty),e.set(7,j.symbolField),e.set(8,j.symbolConstructor),e.set(9,j.symbolEnum),e.set(10,j.symbolInterface),e.set(11,j.symbolFunction),e.set(12,j.symbolVariable),e.set(13,j.symbolConstant),e.set(14,j.symbolString),e.set(15,j.symbolNumber),e.set(16,j.symbolBoolean),e.set(17,j.symbolArray),e.set(18,j.symbolObject),e.set(19,j.symbolKey),e.set(20,j.symbolNull),e.set(21,j.symbolEnumMember),e.set(22,j.symbolStruct),e.set(23,j.symbolEvent),e.set(24,j.symbolOperator),e.set(25,j.symbolTypeParameter);function n(s){let o=e.get(s);return o||(console.info("No codicon found for SymbolKind "+s),o=j.symbolProperty),o}t.toIcon=n;let r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function i(s){let o=r.get(s);return o===void 0&&(console.info("No completion kind found for SymbolKind "+s),o=20),o}t.toCompletionKind=i})(Qc||(Qc={}));var Yc=class t{static{this.Comment=new t("comment")}static{this.Imports=new t("imports")}static{this.Region=new t("region")}static fromValue(e){switch(e){case"comment":return t.Comment;case"imports":return t.Imports;case"region":return t.Region}return new t(e)}constructor(e){this.value=e}},Zc;(function(t){t[t.AIGenerated=1]="AIGenerated"})(Zc||(Zc={}));var eh;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(eh||(eh={}));var th;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(th||(th={}));var nh;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(nh||(nh={}));var nb=new Pi;var rh;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(rh||(rh={}));var ih;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(ih||(ih={}));var sh;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(sh||(sh={}));var oh;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Tool=27]="Tool",t[t.Snippet=28]="Snippet"})(oh||(oh={}));var ah;(function(t){t[t.Deprecated=1]="Deprecated"})(ah||(ah={}));var lh;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(lh||(lh={}));var ch;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(ch||(ch={}));var hh;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(hh||(hh={}));var dh;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(dh||(dh={}));var uh;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(uh||(uh={}));var ph;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(ph||(ph={}));var mh;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.allowOverflow=4]="allowOverflow",t[t.allowVariableLineHeights=5]="allowVariableLineHeights",t[t.allowVariableFonts=6]="allowVariableFonts",t[t.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",t[t.ariaLabel=8]="ariaLabel",t[t.ariaRequired=9]="ariaRequired",t[t.autoClosingBrackets=10]="autoClosingBrackets",t[t.autoClosingComments=11]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=13]="autoClosingDelete",t[t.autoClosingOvertype=14]="autoClosingOvertype",t[t.autoClosingQuotes=15]="autoClosingQuotes",t[t.autoIndent=16]="autoIndent",t[t.autoIndentOnPaste=17]="autoIndentOnPaste",t[t.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",t[t.automaticLayout=19]="automaticLayout",t[t.autoSurround=20]="autoSurround",t[t.bracketPairColorization=21]="bracketPairColorization",t[t.guides=22]="guides",t[t.codeLens=23]="codeLens",t[t.codeLensFontFamily=24]="codeLensFontFamily",t[t.codeLensFontSize=25]="codeLensFontSize",t[t.colorDecorators=26]="colorDecorators",t[t.colorDecoratorsLimit=27]="colorDecoratorsLimit",t[t.columnSelection=28]="columnSelection",t[t.comments=29]="comments",t[t.contextmenu=30]="contextmenu",t[t.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",t[t.cursorBlinking=32]="cursorBlinking",t[t.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",t[t.cursorStyle=34]="cursorStyle",t[t.cursorSurroundingLines=35]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",t[t.cursorWidth=37]="cursorWidth",t[t.cursorHeight=38]="cursorHeight",t[t.disableLayerHinting=39]="disableLayerHinting",t[t.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",t[t.domReadOnly=41]="domReadOnly",t[t.dragAndDrop=42]="dragAndDrop",t[t.dropIntoEditor=43]="dropIntoEditor",t[t.editContext=44]="editContext",t[t.emptySelectionClipboard=45]="emptySelectionClipboard",t[t.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",t[t.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",t[t.extraEditorClassName=48]="extraEditorClassName",t[t.fastScrollSensitivity=49]="fastScrollSensitivity",t[t.find=50]="find",t[t.fixedOverflowWidgets=51]="fixedOverflowWidgets",t[t.folding=52]="folding",t[t.foldingStrategy=53]="foldingStrategy",t[t.foldingHighlight=54]="foldingHighlight",t[t.foldingImportsByDefault=55]="foldingImportsByDefault",t[t.foldingMaximumRegions=56]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=58]="fontFamily",t[t.fontInfo=59]="fontInfo",t[t.fontLigatures=60]="fontLigatures",t[t.fontSize=61]="fontSize",t[t.fontWeight=62]="fontWeight",t[t.fontVariations=63]="fontVariations",t[t.formatOnPaste=64]="formatOnPaste",t[t.formatOnType=65]="formatOnType",t[t.glyphMargin=66]="glyphMargin",t[t.gotoLocation=67]="gotoLocation",t[t.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",t[t.hover=69]="hover",t[t.inDiffEditor=70]="inDiffEditor",t[t.inlineSuggest=71]="inlineSuggest",t[t.letterSpacing=72]="letterSpacing",t[t.lightbulb=73]="lightbulb",t[t.lineDecorationsWidth=74]="lineDecorationsWidth",t[t.lineHeight=75]="lineHeight",t[t.lineNumbers=76]="lineNumbers",t[t.lineNumbersMinChars=77]="lineNumbersMinChars",t[t.linkedEditing=78]="linkedEditing",t[t.links=79]="links",t[t.matchBrackets=80]="matchBrackets",t[t.minimap=81]="minimap",t[t.mouseStyle=82]="mouseStyle",t[t.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=84]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",t[t.multiCursorModifier=86]="multiCursorModifier",t[t.mouseMiddleClickAction=87]="mouseMiddleClickAction",t[t.multiCursorPaste=88]="multiCursorPaste",t[t.multiCursorLimit=89]="multiCursorLimit",t[t.occurrencesHighlight=90]="occurrencesHighlight",t[t.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",t[t.overtypeCursorStyle=92]="overtypeCursorStyle",t[t.overtypeOnPaste=93]="overtypeOnPaste",t[t.overviewRulerBorder=94]="overviewRulerBorder",t[t.overviewRulerLanes=95]="overviewRulerLanes",t[t.padding=96]="padding",t[t.pasteAs=97]="pasteAs",t[t.parameterHints=98]="parameterHints",t[t.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",t[t.placeholder=100]="placeholder",t[t.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",t[t.quickSuggestions=102]="quickSuggestions",t[t.quickSuggestionsDelay=103]="quickSuggestionsDelay",t[t.readOnly=104]="readOnly",t[t.readOnlyMessage=105]="readOnlyMessage",t[t.renameOnType=106]="renameOnType",t[t.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",t[t.renderControlCharacters=108]="renderControlCharacters",t[t.renderFinalNewline=109]="renderFinalNewline",t[t.renderLineHighlight=110]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=112]="renderValidationDecorations",t[t.renderWhitespace=113]="renderWhitespace",t[t.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",t[t.roundedSelection=115]="roundedSelection",t[t.rulers=116]="rulers",t[t.scrollbar=117]="scrollbar",t[t.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=119]="scrollBeyondLastLine",t[t.scrollPredominantAxis=120]="scrollPredominantAxis",t[t.selectionClipboard=121]="selectionClipboard",t[t.selectionHighlight=122]="selectionHighlight",t[t.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",t[t.selectionHighlightMultiline=124]="selectionHighlightMultiline",t[t.selectOnLineNumbers=125]="selectOnLineNumbers",t[t.showFoldingControls=126]="showFoldingControls",t[t.showUnused=127]="showUnused",t[t.snippetSuggestions=128]="snippetSuggestions",t[t.smartSelect=129]="smartSelect",t[t.smoothScrolling=130]="smoothScrolling",t[t.stickyScroll=131]="stickyScroll",t[t.stickyTabStops=132]="stickyTabStops",t[t.stopRenderingLineAfter=133]="stopRenderingLineAfter",t[t.suggest=134]="suggest",t[t.suggestFontSize=135]="suggestFontSize",t[t.suggestLineHeight=136]="suggestLineHeight",t[t.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",t[t.suggestSelection=138]="suggestSelection",t[t.tabCompletion=139]="tabCompletion",t[t.tabIndex=140]="tabIndex",t[t.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",t[t.unicodeHighlighting=142]="unicodeHighlighting",t[t.unusualLineTerminators=143]="unusualLineTerminators",t[t.useShadowDOM=144]="useShadowDOM",t[t.useTabStops=145]="useTabStops",t[t.wordBreak=146]="wordBreak",t[t.wordSegmenterLocales=147]="wordSegmenterLocales",t[t.wordSeparators=148]="wordSeparators",t[t.wordWrap=149]="wordWrap",t[t.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=152]="wordWrapColumn",t[t.wordWrapOverride1=153]="wordWrapOverride1",t[t.wordWrapOverride2=154]="wordWrapOverride2",t[t.wrappingIndent=155]="wrappingIndent",t[t.wrappingStrategy=156]="wrappingStrategy",t[t.showDeprecated=157]="showDeprecated",t[t.inertialScroll=158]="inertialScroll",t[t.inlayHints=159]="inlayHints",t[t.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",t[t.effectiveCursorStyle=161]="effectiveCursorStyle",t[t.editorClassName=162]="editorClassName",t[t.pixelRatio=163]="pixelRatio",t[t.tabFocusMode=164]="tabFocusMode",t[t.layoutInfo=165]="layoutInfo",t[t.wrappingInfo=166]="wrappingInfo",t[t.defaultColorDecorators=167]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",t[t.effectiveEditContext=170]="effectiveEditContext",t[t.scrollOnMiddleClick=171]="scrollOnMiddleClick",t[t.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts",t[t.doubleClickSelectsBlock=173]="doubleClickSelectsBlock"})(mh||(mh={}));var fh;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(fh||(fh={}));var gh;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(gh||(gh={}));var bh;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(bh||(bh={}));var wh;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(wh||(wh={}));var vh;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(vh||(vh={}));var yh;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(yh||(yh={}));var xh;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(xh||(xh={}));var Sh;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(Sh||(Sh={}));var Ch;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(Ch||(Ch={}));var _h;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(_h||(_h={}));var Oi;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(Oi||(Oi={}));var Wi;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(Wi||(Wi={}));var Ui;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(Ui||(Ui={}));var kh;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(kh||(kh={}));var Eh;(function(t){t[t.Normal=1]="Normal",t[t.Underlined=2]="Underlined"})(Eh||(Eh={}));var Fh;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Fh||(Fh={}));var Rh;(function(t){t[t.AIGenerated=1]="AIGenerated"})(Rh||(Rh={}));var Lh;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(Lh||(Lh={}));var Ih;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(Ih||(Ih={}));var Nh;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Nh||(Nh={}));var Dh;(function(t){t[t.Word=0]="Word",t[t.Line=1]="Line",t[t.Suggest=2]="Suggest"})(Dh||(Dh={}));var Mh;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(Mh||(Mh={}));var Ah;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(Ah||(Ah={}));var zh;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(zh||(zh={}));var Ph;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(Ph||(Ph={}));var Th;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(Th||(Th={}));var Vi;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(Vi||(Vi={}));var Oh;(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(Oh||(Oh={}));var Wh;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Wh||(Wh={}));var Uh;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(Uh||(Uh={}));var Vh;(function(t){t[t.Deprecated=1]="Deprecated"})(Vh||(Vh={}));var $h;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})($h||($h={}));var Bh;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(Bh||(Bh={}));var qh;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(qh||(qh={}));var jh;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(jh||(jh={}));var Hh;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(Hh||(Hh={}));var ha=class{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,n){return Mc(e,n)}};function Gh(){return{editor:void 0,languages:void 0,CancellationTokenSource:Er,Emitter:Ce,KeyCode:Oi,KeyMod:ha,Position:X,Range:U,Selection:zi,SelectionDirection:Vi,MarkerSeverity:Wi,MarkerTag:Ui,Uri:Le,Token:Ti}}var Jh,Kh,Xh,da=class{constructor(e,n){this.uri=e,this.value=n}};function bm(t){return Array.isArray(t)}var $i=class t{static{this.defaultToKey=e=>e.toString()}constructor(e,n){if(this[Jh]="ResourceMap",e instanceof t)this.map=new Map(e.map),this.toKey=n??t.defaultToKey;else if(bm(e)){this.map=new Map,this.toKey=n??t.defaultToKey;for(let[r,i]of e)this.set(r,i)}else this.map=new Map,this.toKey=e??t.defaultToKey}set(e,n){return this.map.set(this.toKey(e),new da(e,n)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,n){typeof n<"u"&&(e=e.bind(n));for(let[r,i]of this.map)e(i.value,i.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(Jh=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}},Qh=class{constructor(e,n){this[Kh]="ResourceSet",!e||typeof e=="function"?this._map=new $i(e):(this._map=new $i(n),e.forEach(this.add,this))}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,n){this._map.forEach((r,i)=>e.call(n,i,i,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(Kh=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},ua=class{constructor(){this[Xh]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=0){let r=this._map.get(e);if(r)return n!==0&&this.touch(r,n),r.value}set(e,n,r=0){let i=this._map.get(e);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){let r=this._state,i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){let e=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){let e=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(Xh=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}},pa=class extends ua{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,n=2){return super.get(e,n)}peek(e){return super.get(e,0)}set(e,n){return super.set(e,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},Bi=class extends pa{constructor(e,n=1){super(e,n)}trim(e){this.trimOld(e)}set(e,n){return super.set(e,n),this.checkTrim(),this}};var qi=class{constructor(){this.map=new Map}add(e,n){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(n)}delete(e,n){let r=this.map.get(e);r&&(r.delete(n),r.size===0&&this.map.delete(e))}forEach(e,n){let r=this.map.get(e);r&&r.forEach(n)}};var Cb=new Bi(10);var Yh;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Yh||(Yh={}));var Zh;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(Zh||(Zh={}));var ed;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(ed||(ed={}));var td;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(td||(td={}));function nd(t){if(!t||t.length===0)return!1;for(let e=0,n=t.length;e=n)break;let i=t.charCodeAt(e);if(i===110||i===114||i===87)return!0}}return!1}function wm(t,e,n,r,i){if(r===0)return!0;let s=e.charCodeAt(r-1);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=e.charCodeAt(r);if(t.get(o)!==0)return!0}return!1}function vm(t,e,n,r,i){if(r+i===n)return!0;let s=e.charCodeAt(r+i);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=e.charCodeAt(r+i-1);if(t.get(o)!==0)return!0}return!1}function ym(t,e,n,r,i){return wm(t,e,n,r,i)&&vm(t,e,n,r,i)}var ji=class{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let n=e.length,r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(e),!r))return null;let i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){gc(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||ym(this._wordSeparators,e,n,i,s))return r}while(r);return null}};var xm="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Sm(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let n of xm)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}var ma=Sm();function fa(t){let e=ma;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}var rd=new br;rd.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Rr(t,e,n,r,i){if(e=fa(e),i||(i=kn.first(rd)),n.length>i.maxLen){let c=t-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,t+i.maxLen/2),Rr(t,e,n,r,i)}let s=Date.now(),o=t-1-r,a=-1,l=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){let d=o-i.windowSize*c;e.lastIndex=Math.max(0,d);let u=Cm(e,n,o,a);if(!u&&l||(l=u,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function Cm(t,e,n,r){let i;for(;i=t.exec(e);){let s=i.index||0;if(s<=n&&t.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}var Hi=class{static computeUnicodeHighlights(e,n,r){let i=r?r.startLineNumber:1,s=r?r.endLineNumber:e.getLineCount(),o=new Gi(n),a=o.getCandidateCodePoints(),l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${_m(Array.from(a))}`,"g");let c=new ji(null,l),d=[],u=!1,m,f=0,g=0,b=0;e:for(let _=i,F=s;_<=F;_++){let L=e.getLineContent(_),k=L.length;c.reset(0);do if(m=c.next(L),m){let T=m.index,W=m.index+m[0].length;if(T>0){let P=L.charCodeAt(T-1);In(P)&&T--}if(W+1=1e3){u=!0;break e}d.push(new U(_,T+1,_,W+1))}}while(m)}return{ranges:d,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,n){let r=new Gi(n);switch(r.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{let s=e.codePointAt(0),o=r.ambiguousCharacters.getPrimaryConfusable(s),a=Rn.getLocales().filter(l=>!Rn.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};function _m(t,e){return`[${dc(t.map(r=>String.fromCodePoint(r)).join(""))}]`}var Gi=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Rn.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let n of Ln.codePoints)id(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(let n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(let n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){let r=e.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(let o of n){let a=o.codePointAt(0),l=bc(o);i=i||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Ln.isInvisibleCharacter(a)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!id(e)&&Ln.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}};function id(t){return t===" "||t===` +`||t===" "}var Ye=class{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}},Dn=class{constructor(e,n){this.lineRangeMapping=e,this.changes=n}};function od(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(ga||(ga={}));function wt(t,e){return(n,r)=>e(t(n),t(r))}var ln=(t,e)=>t-e;function dd(t){return(e,n)=>-t(e,n)}var sd=class t{static{this.empty=new t(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new t(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new t(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||ga.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};var J=class t{static fromTo(e,n){return new t(e,n)}static addRange(e,n){let r=0;for(;rn))return new t(e,n)}static ofLength(e){return new t(0,e)}static ofStartAndLength(e,n){return new t(e,e+n)}static emptyAt(e){return new t(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new oe(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new t(this.start+e,this.endExclusive+e)}deltaStart(e){return new t(this.start+e,this.endExclusive)}deltaEnd(e){return new t(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new oe(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new oe(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;ne.startLineNumber,ln)}static joinMany(e){if(e.length===0)return[];let n=new cn(e[0].slice());for(let r=1;rn)throw new oe(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&ei.endLineNumberExclusive>=e.startLineNumber),r=yt(this._normalizedRanges,i=>i.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,e);else if(n===r-1){let i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(e)}else{let i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(e);this._normalizedRanges.splice(n,r-n,i)}}contains(e){let n=vt(this._normalizedRanges,r=>r.startLineNumber<=e);return!!n&&n.endLineNumberExclusive>e}intersects(e){let n=vt(this._normalizedRanges,r=>r.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let n=[],r=0,i=0,s=null;for(;r=o.startLineNumber?s=new Z(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(n.push(s),s=o)}return s!==null&&n.push(s),new t(n)}subtractFrom(e){let n=Ji(this._normalizedRanges,o=>o.endLineNumberExclusive>=e.startLineNumber),r=yt(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)return new t([e]);let i=[],s=e.startLineNumber;for(let o=n;os&&i.push(new Z(s,a.startLineNumber)),s=a.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){let n=[],r=0,i=0;for(;rn.delta(e)))}};var je=class t{static{this.zero=new t(0,0)}static betweenPositions(e,n){return e.lineNumber===n.lineNumber?new t(0,n.column-e.column):new t(n.lineNumber-e.lineNumber,n.column-1)}static fromPosition(e){return new t(e.lineNumber-1,e.column-1)}static ofRange(e){return t.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let n=0,r=0;for(let i of e)i===` +`?(n++,r=0):r++;return new t(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new t(this.lineCount,this.columnCount+e.columnCount):new t(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new U(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new U(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new U(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Z.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new X(e.lineNumber,e.column+this.columnCount):new X(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var Ki=class{getOffsetRange(e){return new J(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return U.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new hn.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new hn.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){let n=e.replacements.map(r=>this.getTextReplacement(r));return new hn.deps.TextEdit(n)}},hn=class{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};function pd(t){hn._deps=t}var Mn=class extends Ki{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){let n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new X(1,1);let n=this.textLength.lineCount+1;if(e.lineNumber>n){let i=this.getLineLength(n);return new X(n,i+1)}if(e.column<1)return new X(e.lineNumber,1);let r=this.getLineLength(e.lineNumber);return e.column-1>r?new X(e.lineNumber,r+1):e}getPosition(e){let n=yt(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new X(r,i)}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new hn.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}};var Xi=class{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new X(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new U(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Mn(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new U(e,1,e,Number.MAX_SAFE_INTEGER))}},ba=class extends Xi{constructor(e,n){Lo(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;re[n-1],e.length)}},Tt=class extends Xi{constructor(e){super(),this.value=e,this._t=new Mn(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}};var Yi=class t{static fromStringEdit(e,n){let r=e.replacements.map(i=>Ot.fromStringReplacement(i,n));return new t(r)}static fromParallelReplacementsUnsorted(e){let n=e.slice().sort(wt(r=>r.range,U.compareRangesUsingStarts));return new t(n)}constructor(e){this.replacements=e,dt(()=>_n(e,(n,r)=>n.range.getEndPosition().isBeforeOrEqual(r.range.getStartPosition())))}mapPosition(e){let n=0,r=0,i=0;for(let s of this.replacements){let o=s.range.getStartPosition();if(e.isBeforeOrEqual(o))break;let a=s.range.getEndPosition(),l=je.ofText(s.text);if(e.isBefore(a)){let c=new X(o.lineNumber+n,o.column+(o.lineNumber+n===r?i:0)),d=l.addToPosition(c);return Qi(c,d)}o.lineNumber+n!==r&&(i=0),n+=l.lineCount-(s.range.endLineNumber-s.range.startLineNumber),l.lineCount===0?a.lineNumber!==o.lineNumber?i+=l.columnCount-(a.column-1):i+=l.columnCount-(a.column-o.column):i=l.columnCount,r=a.lineNumber+n}return new X(e.lineNumber+n,e.column+(e.lineNumber+n===r?i:0))}mapRange(e){function n(o){return o instanceof X?o:o.getStartPosition()}function r(o){return o instanceof X?o:o.getEndPosition()}let i=n(this.mapPosition(e.getStartPosition())),s=r(this.mapPosition(e.getEndPosition()));return Qi(i,s)}apply(e){let n="",r=new X(1,1);for(let s of this.replacements){let o=s.range,a=o.getStartPosition(),l=o.getEndPosition(),c=Qi(r,a);c.isEmpty()||(n+=e.getValueOfRange(c)),n+=s.text,r=l}let i=Qi(r,e.endPositionExclusive);return i.isEmpty()||(n+=e.getValueOfRange(i)),n}applyToString(e){let n=new Tt(e);return this.apply(n)}getNewRanges(){let e=[],n=0,r=0,i=0;for(let s of this.replacements){let o=je.ofText(s.text),a=X.lift({lineNumber:s.range.startLineNumber+r,column:s.range.startColumn+(s.range.startLineNumber===n?i:0)}),l=o.createRange(a);e.push(l),r=l.endLineNumber-s.range.endLineNumber,i=l.endColumn-s.range.endColumn,n=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new oe;if(this.replacements.length===1)return this.replacements[0];let n=this.replacements[0].range.getStartPosition(),r=this.replacements[this.replacements.length-1].range.getEndPosition(),i="";for(let s=0;sn.toString()).join(` +`):typeof e=="string"?this.toString(new Tt(e)):this.replacements.length===0?"":this.replacements.map(n=>{let i=e.getValueOfRange(n.range),s=U.fromPositions(new X(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition()),o=e.getValueOfRange(s);o.length>10&&(o="..."+o.substring(o.length-10));let a=U.fromPositions(n.range.getEndPosition(),new X(n.range.endLineNumber+1,1)),l=e.getValueOfRange(a);l.length>10&&(l=l.substring(0,10)+"...");let c=i;if(c.length>10){let u=Math.floor(5);c=c.substring(0,u)+"..."+c.substring(c.length-u)}let d=n.text;if(d.length>10){let u=Math.floor(5);d=d.substring(0,u)+"..."+d.substring(d.length-u)}return c.length===0?`${o}\u2770${d}\u2771${l}`:`${o}\u2770${c}\u21A6${d}\u2771${l}`}).join(` +`)}},Ot=class t{static joinReplacements(e,n){if(e.length===0)throw new oe;if(e.length===1)return e[0];let r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition(),s="";for(let o=0;o ${n.lineNumber},${n.column}): "${this.text}"`}};function Qi(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return U.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new oe("start must be before end");return new U(t.lineNumber,t.column,e.lineNumber,e.column)}var Te=class t{static inverse(e,n,r){let i=[],s=1,o=1;for(let l of e){let c=new t(new Z(s,l.original.startLineNumber),new Z(o,l.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=l.original.endLineNumberExclusive,o=l.modified.endLineNumberExclusive}let a=new t(new Z(s,n+1),new Z(o,r+1));return a.modified.isEmpty||i.push(a),i}static clip(e,n,r){let i=[];for(let s of e){let o=s.original.intersect(n),a=s.modified.intersect(r);o&&!o.isEmpty&&a&&!a.isEmpty&&i.push(new t(o,a))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new t(this.modified,this.original)}join(e){return new t(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){let e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Ie(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new oe("not a valid diff");return new Ie(new U(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new U(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ie(new U(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new U(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(md(this.original.endLineNumberExclusive,e)&&md(this.modified.endLineNumberExclusive,n))return new Ie(new U(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new U(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ie(U.fromPositions(new X(this.original.startLineNumber,1),An(new X(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),U.fromPositions(new X(this.modified.startLineNumber,1),An(new X(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ie(U.fromPositions(An(new X(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),An(new X(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),U.fromPositions(An(new X(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),An(new X(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new oe}};function An(t,e){if(t.lineNumber<1)return new X(1,1);if(t.lineNumber>e.length)return new X(e.length,e[e.length-1].length+1);let n=e[t.lineNumber-1];return t.column>n.length+1?new X(t.lineNumber,n.length+1):t}function md(t,e){return t>=1&&t<=e.length}var xt=class t extends Te{static fromRangeMappings(e){let n=Z.join(e.map(i=>Z.fromRangeInclusive(i.originalRange))),r=Z.join(e.map(i=>Z.fromRangeInclusive(i.modifiedRange)));return new t(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new t(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new t(this.original,this.modified,[this.toRangeMapping()])}},Ie=class t{static fromEdit(e){let n=e.getNewRanges();return e.replacements.map((i,s)=>new t(i.range,n[s]))}static assertSorted(e){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new t(this.modifiedRange,this.originalRange)}toTextEdit(e){let n=e.getValueOfRange(this.modifiedRange);return new Ot(this.originalRange,n)}};function Ir(t,e,n,r=!1){let i=[];for(let s of ad(t.map(o=>km(o,e,n)),(o,a)=>o.original.intersectsOrTouches(a.original)||o.modified.intersectsOrTouches(a.modified))){let o=s[0],a=s[s.length-1];i.push(new xt(o.original.join(a.original),o.modified.join(a.modified),s.map(l=>l.innerChanges[0])))}return dt(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==e.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:_n(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n.getLineLength(t.modifiedRange.startLineNumber)&&t.originalRange.startColumn-1>=e.getLineLength(t.originalRange.startLineNumber)&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+i&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+i&&(r=1);let s=new Z(t.originalRange.startLineNumber+r,t.originalRange.endLineNumber+1+i),o=new Z(t.modifiedRange.startLineNumber+r,t.modifiedRange.endLineNumber+1+i);return new xt(s,o,[t])}var Em=3,Zi=class{computeDiff(e,n,r){let s=new va(e,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[],a=null;for(let l of s.changes){let c;l.originalEndLineNumber===0?c=new Z(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new Z(l.originalStartLineNumber,l.originalEndLineNumber+1);let d;l.modifiedEndLineNumber===0?d=new Z(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):d=new Z(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let u=new xt(c,d,l.charChanges?.map(m=>new Ie(new U(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new U(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===u.modified.startLineNumber||a.original.endLineNumberExclusive===u.original.startLineNumber)&&(u=new xt(a.original.join(u.original),a.modified.join(u.modified),a.innerChanges&&u.innerChanges?a.innerChanges.concat(u.innerChanges):void 0),o.pop()),o.push(u),a=u}return dt(()=>_n(o,(l,c)=>c.original.startLineNumber-l.original.endLineNumberExclusive===c.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},zn=class t{constructor(e,n,r,i,s,o,a,l){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,n,r){let i=n.getStartLineNumber(e.originalStart),s=n.getStartColumn(e.originalStart),o=n.getEndLineNumber(e.originalStart+e.originalLength-1),a=n.getEndColumn(e.originalStart+e.originalLength-1),l=r.getStartLineNumber(e.modifiedStart),c=r.getStartColumn(e.modifiedStart),d=r.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=r.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new t(i,s,o,a,l,c,d,u)}};function Fm(t){if(t.length<=1)return t;let e=[t[0]],n=e[0];for(let r=1,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){let f=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(f.getElements().length>0&&g.getElements().length>0){let b=gd(f,g,s,!0).changes;a&&(b=Fm(b)),m=[];for(let _=0,F=b.length;_1&&b>1;){let _=m.charCodeAt(g-2),F=f.charCodeAt(b-2);if(_!==F)break;g--,b--}(g>1||b>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,o+1,1,b)}{let g=xa(m,1),b=xa(f,1),_=m.length+1,F=f.length+1;for(;g<_&&b!0;let e=Date.now();return()=>Date.now()-e{r.push(t.fromOffsetPairs(i?i.getEndExclusives():Ze.zero,s?s.getStarts():new Ze(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(e,n){return new t(new J(e.offset1,n.offset1),new J(e.offset2,n.offset2))}static assertSorted(e){let n;for(let r of e){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new oe("Sequence diffs must be sorted");n=r}}constructor(e,n){this.seq1Range=e,this.seq2Range=n}swap(){return new t(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new t(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new t(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new t(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new t(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){let n=this.seq1Range.intersect(e.seq1Range),r=this.seq2Range.intersect(e.seq2Range);if(!(!n||!r))return new t(n,r)}getStarts(){return new Ze(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Ze(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},Ze=class t{static{this.zero=new t(0,0)}static{this.max=new t(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,n){this.offset1=e,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new t(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}},Wt=class t{static{this.instance=new t}isValid(){return!0}},ts=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new oe("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&b>0&&o.get(g-1,b-1)===3&&(L+=a.get(g-1,b-1)),L+=i?i(g,b):1):L=-1;let k=Math.max(_,F,L);if(k===L){let T=g>0&&b>0?a.get(g-1,b-1):0;a.set(g,b,T+1),o.set(g,b,3)}else k===_?(a.set(g,b,0),o.set(g,b,1)):k===F&&(a.set(g,b,0),o.set(g,b,2));s.set(g,b,k)}let l=[],c=e.length,d=n.length;function u(g,b){(g+1!==c||b+1!==d)&&l.push(new ue(new J(g+1,c),new J(b+1,d))),c=g,d=b}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)o.get(m,f)===3?(u(m,f),m--,f--):o.get(m,f)===1?m--:f--;return u(-1,-1),l.reverse(),new et(l,!1)}};var Tn=class{compute(e,n,r=Wt.instance){if(e.length===0||n.length===0)return et.trivial(e,n);let i=e,s=n;function o(b,_){for(;bi.length||T>s.length)continue;let W=o(k,T);l.set(d,W);let $=k===F?c.get(d+1):c.get(d-1);if(c.set(d,W!==k?new rs($,k,T,W-k):$),l.get(d)===i.length&&l.get(d)-d===s.length)break e}}let u=c.get(d),m=[],f=i.length,g=s.length;for(;;){let b=u?u.x+u.length:0,_=u?u.y+u.length:0;if((b!==f||_!==g)&&m.push(new ue(new J(b,f),new J(_,g))),!u)break;f=u.x,g=u.y,u=u.prev}return m.reverse(),new et(m,!1)}},rs=class{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}},Sa=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}},Ca=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}};var Ut=class{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=e[i-1],o=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,s=s.substring(o)),this.lineStartOffsets.push(o);let a=0;if(!r){let c=s.trimStart();a=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let l=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-a,s.length):s.length;for(let c=0;cString.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let n=vd(e>0?this.elements[e-1]:-1),r=vd(es<=e),i=e-this.firstElementOffsetByLineIdx[r];return new X(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){let n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?U.fromPositions(r,r):U.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!On(this.elements[e]))return;let n=e;for(;n>0&&On(this.elements[n-1]);)n--;let r=e;for(;r=this.elements.length||!On(this.elements[e]))return;let n=e;for(;n>0&&On(this.elements[n-1])&&!bd(this.elements[n]);)n--;let r=e;for(;ri<=e.start)??0,r=ud(this.firstElementOffsetByLineIdx,i=>e.endExclusive<=i)??this.elements.length;return new J(n,r)}};function On(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}function bd(t){return t>=65&&t<=90}var Rm={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function wd(t){return Rm[t]}function vd(t){return t===10?8:t===13?7:Mr(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}function xd(t,e,n,r,i,s){let{moves:o,excludedChanges:a}=Im(t,e,n,s);if(!s.isValid())return[];let l=t.filter(d=>!a.has(d)),c=Nm(l,r,i,e,n,s);return hd(o,c),o=Dm(o),o=o.filter(d=>{let u=d.original.toOffsetRange().slice(e).map(f=>f.trim());return u.join(` +`).length>=15&&Lm(u,f=>f.length>=2)>=2}),o=Mm(t,o),o}function Lm(t,e){let n=0;for(let r of t)e(r)&&n++;return n}function Im(t,e,n,r){let i=[],s=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new Dr(l.original,e,l)),o=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new Dr(l.modified,n,l))),a=new Set;for(let l of s){let c=-1,d;for(let u of o){let m=l.computeSimilarity(u);m>c&&(c=m,d=u)}if(c>.9&&d&&(o.delete(d),i.push(new Te(l.range,d.range)),a.add(l.source),a.add(d.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}function Nm(t,e,n,r,i,s){let o=[],a=new qi;for(let m of t)for(let f=m.original.startLineNumber;fm.modified.startLineNumber,ln));for(let m of t){let f=[];for(let g=m.modified.startLineNumber;g{for(let T of f)if(T.originalLineRange.endLineNumberExclusive+1===L.endLineNumberExclusive&&T.modifiedLineRange.endLineNumberExclusive+1===_.endLineNumberExclusive){T.originalLineRange=new Z(T.originalLineRange.startLineNumber,L.endLineNumberExclusive),T.modifiedLineRange=new Z(T.modifiedLineRange.startLineNumber,_.endLineNumberExclusive),F.push(T);return}let k={modifiedLineRange:_,originalLineRange:L};l.push(k),F.push(k)}),f=F}if(!s.isValid())return[]}l.sort(dd(wt(m=>m.modifiedLineRange.length,ln)));let c=new cn,d=new cn;for(let m of l){let f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=c.subtractFrom(m.modifiedLineRange),b=d.subtractFrom(m.originalLineRange).getWithDelta(f),_=g.getIntersection(b);for(let F of _.ranges){if(F.length<3)continue;let L=F,k=F.delta(-f);o.push(new Te(k,L)),c.addRange(L),d.addRange(k)}}o.sort(wt(m=>m.original.startLineNumber,ln));let u=new Lr(t);for(let m=0;m$.original.startLineNumber<=f.original.startLineNumber),b=vt(t,$=>$.modified.startLineNumber<=f.modified.startLineNumber),_=Math.max(f.original.startLineNumber-g.original.startLineNumber,f.modified.startLineNumber-b.modified.startLineNumber),F=u.findLastMonotonous($=>$.original.startLineNumber$.modified.startLineNumberr.length||N>i.length||c.contains(N)||d.contains($)||!yd(r[$-1],i[N-1],s))break}T>0&&(d.addRange(new Z(f.original.startLineNumber-T,f.original.startLineNumber)),c.addRange(new Z(f.modified.startLineNumber-T,f.modified.startLineNumber)));let W;for(W=0;Wr.length||N>i.length||c.contains(N)||d.contains($)||!yd(r[$-1],i[N-1],s))break}W>0&&(d.addRange(new Z(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+W)),c.addRange(new Z(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+W))),(T>0||W>0)&&(o[m]=new Te(new Z(f.original.startLineNumber-T,f.original.endLineNumberExclusive+W),new Z(f.modified.startLineNumber-T,f.modified.endLineNumberExclusive+W)))}return o}function yd(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;let i=new Tn().compute(new Ut([t],new U(1,1,1,t.length),!1),new Ut([e],new U(1,1,1,e.length),!1),n),s=0,o=ue.invert(i.diffs,t.length);for(let d of o)d.seq1Range.forEach(u=>{Mr(t.charCodeAt(u))||s++});function a(d){let u=0;for(let m=0;me.length?t:e);return s/l>.6&&l>10}function Dm(t){if(t.length===0)return t;t.sort(wt(n=>n.original.startLineNumber,ln));let e=[t[0]];for(let n=1;n=0&&o>=0&&s+o<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function Mm(t,e){let n=new Lr(t);return e=e.filter(r=>{let i=n.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(c))}i.push(a)}return r.length>0&&i.push(r[r.length-1]),i}function Am(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+1=r.start&&t.seq2Range.start-o>=i.start&&n.isStronglyEqual(t.seq2Range.start-o,t.seq2Range.endExclusive-o)&&o<100;)o++;o--;let a=0;for(;t.seq1Range.start+ac&&(c=g,l=d)}return t.delta(l)}function _d(t,e,n){let r=[];for(let i of n){let s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new ue(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function ka(t,e,n,r,i=!1){let s=ue.invert(n,t.length),o=[],a=new Ze(0,0);function l(d,u){if(d.offset10;){let L=s[0];if(!(L.seq1Range.intersects(g.seq1Range)||L.seq2Range.intersects(g.seq2Range)))break;let T=r(t,L.seq1Range.start),W=r(e,L.seq2Range.start),$=new ue(T,W),N=$.intersect(L);if(_+=N.seq1Range.length,F+=N.seq2Range.length,g=g.join($),g.seq1Range.endExclusive>=L.seq1Range.endExclusive)s.shift();else break}(i&&_+F0;){let d=s.shift();d.seq1Range.isEmpty||(l(d.getStarts(),d),l(d.getEndExclusives().delta(-1),d))}return zm(n,o)}function zm(t,e){let n=[];for(;t.length>0||e.length>0;){let r=t[0],i=e[0],s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function kd(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let o=[r[0]];for(let a=1;a5||f.seq1Range.length+f.seq2Range.length>5)},l=r[a],c=o[o.length-1];d(c,l)?(s=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}r=o}while(i++<10&&s);return r}function Ed(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let a=[r[0]];for(let l=1;l5||b.length>500)return!1;let F=t.getText(b).trim();if(F.length>20||F.split(/\r\n|\r|\n/).length>1)return!1;let L=t.countLinesIn(f.seq1Range),k=f.seq1Range.length,T=e.countLinesIn(f.seq2Range),W=f.seq2Range.length,$=t.countLinesIn(g.seq1Range),N=g.seq1Range.length,R=e.countLinesIn(g.seq2Range),P=g.seq2Range.length,B=130;function D(C){return Math.min(C,B)}return Math.pow(Math.pow(D(L*40+k),1.5)+Math.pow(D(T*40+W),1.5),1.5)+Math.pow(Math.pow(D($*40+N),1.5)+Math.pow(D(R*40+P),1.5),1.5)>(B**1.5)**1.5*1.3},c=r[l],d=a[a.length-1];u(d,c)?(s=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}r=a}while(i++<10&&s);let o=[];return cd(r,(a,l,c)=>{let d=l;function u(F){return F.length>0&&F.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}let m=t.extendToFullLines(l.seq1Range),f=t.getText(new J(m.start,l.seq1Range.start));u(f)&&(d=d.deltaStart(-f.length));let g=t.getText(new J(l.seq1Range.endExclusive,m.endExclusive));u(g)&&(d=d.deltaEnd(g.length));let b=ue.fromOffsetPairs(a?a.getEndExclusives():Ze.zero,c?c.getStarts():Ze.max),_=d.intersect(b);o.length>0&&_.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(_):o.push(_)}),o}var Ar=class{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let n=e===0?0:Fd(this.lines[e-1]),r=e===this.lines.length?0:Fd(this.lines[e]);return 1e3-(n+r)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}};function Fd(t){let e=0;for(;eN===R))return new Ye([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new Ye([new xt(new Z(1,e.length+1),new Z(1,n.length+1),[new Ie(new U(1,1,e.length,e[e.length-1].length+1),new U(1,1,n.length,n[n.length-1].length+1))])],[],!1);let i=r.maxComputationTimeMs===0?Wt.instance:new ts(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,o=new Map;function a(N){let R=o.get(N);return R===void 0&&(R=o.size,o.set(N,R)),R}let l=e.map(N=>a(N.trim())),c=n.map(N=>a(N.trim())),d=new Ar(l,e),u=new Ar(c,n),m=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(N,R)=>e[N]===n[R]?n[R].length===0?.1:1+Math.log(1+n[R].length):.99):this.myersDiffingAlgorithm.compute(d,u,i),f=m.diffs,g=m.hitTimeout;f=_a(d,u,f),f=kd(d,u,f);let b=[],_=N=>{if(s)for(let R=0;RN.seq1Range.start-F===N.seq2Range.start-L);let R=N.seq1Range.start-F;_(R),F=N.seq1Range.endExclusive,L=N.seq2Range.endExclusive;let P=this.refineDiff(e,n,N,i,s,r);P.hitTimeout&&(g=!0);for(let B of P.mappings)b.push(B)}_(e.length-F);let k=new dn(e),T=new dn(n),W=Ir(b,k,T),$=[];return r.computeMoves&&($=this.computeMoves(W,e,n,l,c,i,s,r)),dt(()=>{function N(P,B){if(P.lineNumber<1||P.lineNumber>B.length)return!1;let D=B[P.lineNumber-1];return!(P.column<1||P.column>D.length+1)}function R(P,B){return!(P.startLineNumber<1||P.startLineNumber>B.length+1||P.endLineNumberExclusive<1||P.endLineNumberExclusive>B.length+1)}for(let P of W){if(!P.innerChanges)return!1;for(let B of P.innerChanges)if(!(N(B.modifiedRange.getStartPosition(),n)&&N(B.modifiedRange.getEndPosition(),n)&&N(B.originalRange.getStartPosition(),e)&&N(B.originalRange.getEndPosition(),e)))return!1;if(!R(P.modified,n)||!R(P.original,e))return!1}return!0}),new Ye(W,$,g)}computeMoves(e,n,r,i,s,o,a,l){return xd(e,n,r,i,s,o).map(u=>{let m=this.refineDiff(n,r,new ue(u.original.toOffsetRange(),u.modified.toOffsetRange()),o,a,l),f=Ir(m.mappings,new dn(n),new dn(r),!0);return new Dn(u,f)})}refineDiff(e,n,r,i,s,o){let l=Pm(r).toRangeMapping2(e,n),c=new Ut(e,l.originalRange,s),d=new Ut(n,l.modifiedRange,s),u=c.length+d.length<500?this.dynamicProgrammingDiffing.compute(c,d,i):this.myersDiffingAlgorithm.compute(c,d,i),m=u.diffs;return m=_a(c,d,m),m=ka(c,d,m,(g,b)=>g.findWordContaining(b)),o.extendToSubwords&&(m=ka(c,d,m,(g,b)=>g.findSubWordContaining(b),!0)),m=_d(c,d,m),m=Ed(c,d,m),{mappings:m.map(g=>new Ie(c.translateRange(g.seq1Range),d.translateRange(g.seq2Range))),hitTimeout:u.hitTimeout}}};function Pm(t){return new Te(new Z(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new Z(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}var Vt;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",t.vscodeNotebookMetadata="vscode-notebook-metadata",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeImageCarousel="vscode-image-carousel",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatEditor="vscode-chat-editor",t.vscodeChatInput="chatSessionInput",t.vscodeLocalChatSession="vscode-chat-session",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.vscodeBrowser="vscode-browser",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting",t.outputChannel="output",t.accessibleView="accessible-view",t.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",t.chatEditingModel="chat-editing-text-model",t.copilotPr="copilot-pr"})(Vt||(Vt={}));var Tm="tkn",Ea=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return xe.join(this._serverRootPath,Vt.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return Jl(a),e}let n=e.authority,r=this._hosts[n];r&&r.indexOf(":")!==-1&&r.indexOf("[")===-1&&(r=`[${r}]`);let i=this._ports[n],s=this._connectionTokens[n],o=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(o+=`&${Tm}=${encodeURIComponent(s)}`),Le.from({scheme:Po?this._preferredWebSchema:Vt.vscodeRemoteResource,authority:`${r}:${i}`,path:this._remoteResourcesPath,query:o})}},Om=new Ea,Ld="vs/../../node_modules",Wm="vscode-app",Fa=class t{static{this.FALLBACK_AUTHORITY=Wm}asBrowserUri(e){let n=this.toUri(e);return this.uriToBrowserUri(n)}uriToBrowserUri(e){return e.scheme===Vt.vscodeRemote?Om.rewrite(e):e.scheme===Vt.file&&(rc||ic===`${Vt.vscodeFileResource}://${t.FALLBACK_AUTHORITY}`)?e.with({scheme:Vt.vscodeFileResource,authority:e.authority||t.FALLBACK_AUTHORITY,query:null,fragment:null}):e}toUri(e){if(Le.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){let n=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(n))return Le.joinPath(Le.parse(n,!0),e);let r=zc(n,e);return Le.file(r)}throw new Error("Cannot determine URI for module id!")}},Id=new Fa,Rd;(function(t){let e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);t.CoopAndCoep=Object.freeze(e.get("3"));let n="vscode-coi";function r(s){let o;typeof s=="string"?o=new URL(s).searchParams:s instanceof URL?o=s.searchParams:Le.isUri(s)&&(o=new URL(s.toString(!0)).searchParams);let a=o?.get(n);if(a)return e.get(a)}t.getHeadersFromQuery=r;function i(s,o,a){if(!globalThis.crossOriginIsolated)return;let l=o&&a?"3":a?"2":"1";s instanceof URLSearchParams?s.set(n,l):s[n]=l}t.addSearchParam=i})(Rd||(Rd={}));function Nd(t,e){(globalThis._VSCODE_PRODUCT_JSON??globalThis.vscode?.context?.configuration()?.product)?.commit;let r=`${t}/${e}`,s=`${Ld}/${r}`;return Id.asBrowserUri(s).toString(!0)}var ss=class{constructor(e){this.replacements=e;let n=-1;for(let r of e){if(!(r.replaceRange.start>=n))throw new oe(`Edits must be disjoint and sorted. Found ${r} after ${n}`);n=r.replaceRange.endExclusive}}toString(){return`[${this.replacements.map(n=>n.toString()).join(", ")}]`}normalize(){let e=[],n;for(let r of this.replacements)if(!(r.getNewLength()===0&&r.replaceRange.length===0)){if(n&&n.replaceRange.endExclusive===r.replaceRange.start){let i=n.tryJoinTouching(r);if(i){n=i;continue}}n&&e.push(n),n=r}return n&&e.push(n),this._createNew(e)}compose(e){let n=this.normalize(),r=e.normalize();if(n.isEmpty())return r;if(r.isEmpty())return n;let i=[...n.replacements],s=[],o=0;for(let a of r.replacements){for(;;){let u=i[0];if(!u||u.replaceRange.start+o+u.getNewLength()>=a.replaceRange.start)break;i.shift(),s.push(u),o+=u.getNewLength()-u.replaceRange.length}let l=o,c,d;for(;;){let u=i[0];if(!u||u.replaceRange.start+o>a.replaceRange.endExclusive)break;c||(c=u),d=u,i.shift(),o+=u.getNewLength()-u.replaceRange.length}if(!c)s.push(a.delta(-o));else{let u=Math.min(c.replaceRange.start,a.replaceRange.start-l),m=a.replaceRange.start-(c.replaceRange.start+l);if(m>0){let _=c.slice(J.emptyAt(u),new J(0,m));s.push(_)}if(!d)throw new oe("Invariant violation: lastIntersecting is undefined");let f=d.replaceRange.endExclusive+o-a.replaceRange.endExclusive;if(f>0){let _=d.slice(J.ofStartAndLength(d.replaceRange.endExclusive,0),new J(d.getNewLength()-f,d.getNewLength()));i.unshift(_),o-=_.getNewLength()-_.replaceRange.length}let g=new J(u,a.replaceRange.endExclusive-o),b=a.slice(g,new J(0,a.getNewLength()));s.push(b)}}for(;;){let a=i.shift();if(!a)break;s.push(a)}return this._createNew(s).normalize()}getNewRanges(){let e=[],n=0;for(let r of this.replacements)e.push(J.ofStartAndLength(r.replaceRange.start+n,r.getNewLength())),n+=r.getLengthDelta();return e}isEmpty(){return this.replacements.length===0}applyToOffsetOrUndefined(e){let n=0;for(let r of this.replacements)if(r.replaceRange.start<=e){if(e ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new J(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}};var Ra=class extends ss{apply(e){let n=[],r=0;for(let i of this.replacements)n.push(e.substring(r,i.replaceRange.start)),n.push(i.newText),r=i.replaceRange.endExclusive;return n.push(e.substring(r)),n.join("")}removeCommonSuffixPrefix(e){let n=[];for(let r of this.replacements){let i=r.removeCommonSuffixPrefix(e);i.isEmpty||n.push(i)}return new zr(n)}},La=class extends os{constructor(e,n){super(e),this.newText=n}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){let n=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),r=yr(n,this.newText),i=Math.min(n.length-r,this.newText.length-r,xr(n,this.newText)),s=new J(this.replaceRange.start+r,this.replaceRange.endExclusive-i),o=this.newText.substring(r,this.newText.length-i);return new Wn(s,o)}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){let n=this.replaceRange.substring(e),r=yr(n,this.newText);return r===0?this:this.slice(this.replaceRange.deltaStart(r),new J(r,this.newText.length))}removeCommonSuffix(e){let n=this.replaceRange.substring(e),r=xr(n,this.newText);return r===0?this:this.slice(this.replaceRange.deltaEnd(-r),new J(0,this.newText.length-r))}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}},zr=class t extends Ra{static{this.empty=new t([])}static replace(e,n){return new t([new Wn(e,n)])}static compose(e){if(e.length===0)return t.empty;let n=e[0];for(let r=1;re.createDiffComputer({useWasm:!0}))),Da):(Na||(Na=Dd().then(e=>e.createDiffComputer({useWasm:!1}))),Na)}async function Aa(t){let e=await Um(t);return new Ma(e)}var Ma=class{constructor(e){this._computer=e}computeDiff(e,n,r){let i=new Tt(e.join(` +`)),s=new Tt(n.join(` +`)),o=this._computer.computeDiff(i.value,s.value,{ignoreTrimWhitespace:!0,computeMoves:r.computeMoves,extendToSubwords:r.extendToSubwords}),a=i.getTransformer(),l=s.getTransformer(),c=[],d=0;for(let f of o.edits.replacements){let g=f.range.start+d,b=g+f.newText.length,_=a.getRange(new J(f.range.start,f.range.endExclusive)),F=l.getRange(new J(g,b));c.push(new Ie(_,F)),d+=f.newText.length-(f.range.endExclusive-f.range.start)}let u=Ir(c,i,s),m=[];if(r.computeMoves)for(let f of o.moves){let g=a.getPosition(f.range.original.start),b=a.getPosition(f.range.original.endExclusive),_=l.getPosition(f.range.modified.start),F=l.getPosition(f.range.modified.endExclusive),L=new Z(g.lineNumber,b.lineNumber),k=new Z(_.lineNumber,F.lineNumber);m.push(new Dn(new Te(L,k),[]))}return new Ye(u,m,o.hitTimeout)}};var Pr={getLegacy:()=>new Zi,getDefault:()=>new is,getAdvancedExternal:()=>Aa(!1),getAdvancedWasm:()=>Aa(!0)};function $t(t,e){let n=Math.pow(10,e);return Math.round(t*n)/n}var y=class{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=$t(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}},tt=class t{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=$t(Math.max(Math.min(1,n),0),3),this.l=$t(Math.max(Math.min(1,r),0),3),this.a=$t(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){let n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,o=Math.max(n,r,i),a=Math.min(n,r,i),l=0,c=0,d=(a+o)/2,u=o-a;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),o){case n:l=(r-i)/u+(r1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){let n=e.h/360,{s:r,l:i,a:s}=e,o,a,l;if(r===0)o=a=l=i;else{let c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;o=t._hue2rgb(d,c,n+1/3),a=t._hue2rgb(d,c,n),l=t._hue2rgb(d,c,n-1/3)}return new y(Math.round(o*255),Math.round(a*255),Math.round(l*255),s)}},Un=class t{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=$t(Math.max(Math.min(1,n),0),3),this.v=$t(Math.max(Math.min(1,r),0),3),this.a=$t(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){let n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=s-o,l=s===0?0:a/s,c;return a===0?c=0:s===n?c=((r-i)/a%6+6)%6:s===r?c=(i-n)/a+2:c=(n-r)/a+4,new t(Math.round(c*60),l,s,e.a)}static toRGBA(e){let{h:n,s:r,v:i,a:s}=e,o=i*r,a=o*(1-Math.abs(n/60%2-1)),l=i-o,[c,d,u]=[0,0,0];return n<60?(c=o,d=a):n<120?(c=a,d=o):n<180?(d=o,u=a):n<240?(d=a,u=o):n<300?(c=a,u=o):n<=360&&(c=o,u=a),c=Math.round((c+l)*255),d=Math.round((d+l)*255),u=Math.round((u+l)*255),new y(c,d,u,s)}},un=class t{static fromHex(e){return t.Format.CSS.parseHex(e)||t.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:tt.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Un.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof y)this.rgba=e;else if(e instanceof tt)this._hsla=e,this.rgba=tt.toRGBA(e);else if(e instanceof Un)this._hsva=e,this.rgba=Un.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&y.equals(this.rgba,e.rgba)&&tt.equals(this.hsla,e.hsla)&&Un.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=t._relativeLuminanceForComponent(this.rgba.r),n=t._relativeLuminanceForComponent(this.rgba.g),r=t._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return $t(i,4)}static _relativeLuminanceForComponent(e){let n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){let n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){let n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>>0),this._toNumber32Bit}static getLighterColor(e,n,r){if(e.isLighterThan(n))return e;r=r||.5;let i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(s-i)/s,e.lighten(r)}static getDarkerColor(e,n,r){if(e.isDarkerThan(n))return e;r=r||.5;let i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(i-s)/i,e.darken(r)}static{this.white=new t(new y(255,255,255,1))}static{this.black=new t(new y(0,0,0,1))}static{this.red=new t(new y(255,0,0,1))}static{this.blue=new t(new y(0,0,255,1))}static{this.green=new t(new y(0,255,0,1))}static{this.cyan=new t(new y(0,255,255,1))}static{this.lightgrey=new t(new y(211,211,211,1))}static{this.transparent=new t(new y(0,0,0,0))}};(function(t){(function(e){(function(n){function r(b){return b.rgba.a===1?`rgb(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b})`:t.Format.CSS.formatRGBA(b)}n.formatRGB=r;function i(b){return`rgba(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b}, ${+b.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(b){return b.hsla.a===1?`hsl(${b.hsla.h}, ${Math.round(b.hsla.s*100)}%, ${Math.round(b.hsla.l*100)}%)`:t.Format.CSS.formatHSLA(b)}n.formatHSL=s;function o(b){return`hsla(${b.hsla.h}, ${Math.round(b.hsla.s*100)}%, ${Math.round(b.hsla.l*100)}%, ${b.hsla.a.toFixed(2)})`}n.formatHSLA=o;function a(b){let _=b.toString(16);return _.length!==2?"0"+_:_}function l(b){return`#${a(b.rgba.r)}${a(b.rgba.g)}${a(b.rgba.b)}`}n.formatHex=l;function c(b,_=!1){return _&&b.rgba.a===1?t.Format.CSS.formatHex(b):`#${a(b.rgba.r)}${a(b.rgba.g)}${a(b.rgba.b)}${a(Math.round(b.rgba.a*255))}`}n.formatHexA=c;function d(b){return b.isOpaque()?t.Format.CSS.formatHex(b):t.Format.CSS.formatRGBA(b)}n.format=d;function u(b){if(b==="transparent")return t.transparent;if(b.startsWith("#"))return f(b);if(b.startsWith("rgba(")){let _=b.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!_)throw new Error("Invalid color format "+b);let F=parseInt(_.groups?.r??"0"),L=parseInt(_.groups?.g??"0"),k=parseInt(_.groups?.b??"0"),T=parseFloat(_.groups?.a??"0");return new t(new y(F,L,k,T))}if(b.startsWith("rgb(")){let _=b.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!_)throw new Error("Invalid color format "+b);let F=parseInt(_.groups?.r??"0"),L=parseInt(_.groups?.g??"0"),k=parseInt(_.groups?.b??"0");return new t(new y(F,L,k))}return m(b)}n.parse=u;function m(b){switch(b){case"aliceblue":return new t(new y(240,248,255,1));case"antiquewhite":return new t(new y(250,235,215,1));case"aqua":return new t(new y(0,255,255,1));case"aquamarine":return new t(new y(127,255,212,1));case"azure":return new t(new y(240,255,255,1));case"beige":return new t(new y(245,245,220,1));case"bisque":return new t(new y(255,228,196,1));case"black":return new t(new y(0,0,0,1));case"blanchedalmond":return new t(new y(255,235,205,1));case"blue":return new t(new y(0,0,255,1));case"blueviolet":return new t(new y(138,43,226,1));case"brown":return new t(new y(165,42,42,1));case"burlywood":return new t(new y(222,184,135,1));case"cadetblue":return new t(new y(95,158,160,1));case"chartreuse":return new t(new y(127,255,0,1));case"chocolate":return new t(new y(210,105,30,1));case"coral":return new t(new y(255,127,80,1));case"cornflowerblue":return new t(new y(100,149,237,1));case"cornsilk":return new t(new y(255,248,220,1));case"crimson":return new t(new y(220,20,60,1));case"cyan":return new t(new y(0,255,255,1));case"darkblue":return new t(new y(0,0,139,1));case"darkcyan":return new t(new y(0,139,139,1));case"darkgoldenrod":return new t(new y(184,134,11,1));case"darkgray":return new t(new y(169,169,169,1));case"darkgreen":return new t(new y(0,100,0,1));case"darkgrey":return new t(new y(169,169,169,1));case"darkkhaki":return new t(new y(189,183,107,1));case"darkmagenta":return new t(new y(139,0,139,1));case"darkolivegreen":return new t(new y(85,107,47,1));case"darkorange":return new t(new y(255,140,0,1));case"darkorchid":return new t(new y(153,50,204,1));case"darkred":return new t(new y(139,0,0,1));case"darksalmon":return new t(new y(233,150,122,1));case"darkseagreen":return new t(new y(143,188,143,1));case"darkslateblue":return new t(new y(72,61,139,1));case"darkslategray":return new t(new y(47,79,79,1));case"darkslategrey":return new t(new y(47,79,79,1));case"darkturquoise":return new t(new y(0,206,209,1));case"darkviolet":return new t(new y(148,0,211,1));case"deeppink":return new t(new y(255,20,147,1));case"deepskyblue":return new t(new y(0,191,255,1));case"dimgray":return new t(new y(105,105,105,1));case"dimgrey":return new t(new y(105,105,105,1));case"dodgerblue":return new t(new y(30,144,255,1));case"firebrick":return new t(new y(178,34,34,1));case"floralwhite":return new t(new y(255,250,240,1));case"forestgreen":return new t(new y(34,139,34,1));case"fuchsia":return new t(new y(255,0,255,1));case"gainsboro":return new t(new y(220,220,220,1));case"ghostwhite":return new t(new y(248,248,255,1));case"gold":return new t(new y(255,215,0,1));case"goldenrod":return new t(new y(218,165,32,1));case"gray":return new t(new y(128,128,128,1));case"green":return new t(new y(0,128,0,1));case"greenyellow":return new t(new y(173,255,47,1));case"grey":return new t(new y(128,128,128,1));case"honeydew":return new t(new y(240,255,240,1));case"hotpink":return new t(new y(255,105,180,1));case"indianred":return new t(new y(205,92,92,1));case"indigo":return new t(new y(75,0,130,1));case"ivory":return new t(new y(255,255,240,1));case"khaki":return new t(new y(240,230,140,1));case"lavender":return new t(new y(230,230,250,1));case"lavenderblush":return new t(new y(255,240,245,1));case"lawngreen":return new t(new y(124,252,0,1));case"lemonchiffon":return new t(new y(255,250,205,1));case"lightblue":return new t(new y(173,216,230,1));case"lightcoral":return new t(new y(240,128,128,1));case"lightcyan":return new t(new y(224,255,255,1));case"lightgoldenrodyellow":return new t(new y(250,250,210,1));case"lightgray":return new t(new y(211,211,211,1));case"lightgreen":return new t(new y(144,238,144,1));case"lightgrey":return new t(new y(211,211,211,1));case"lightpink":return new t(new y(255,182,193,1));case"lightsalmon":return new t(new y(255,160,122,1));case"lightseagreen":return new t(new y(32,178,170,1));case"lightskyblue":return new t(new y(135,206,250,1));case"lightslategray":return new t(new y(119,136,153,1));case"lightslategrey":return new t(new y(119,136,153,1));case"lightsteelblue":return new t(new y(176,196,222,1));case"lightyellow":return new t(new y(255,255,224,1));case"lime":return new t(new y(0,255,0,1));case"limegreen":return new t(new y(50,205,50,1));case"linen":return new t(new y(250,240,230,1));case"magenta":return new t(new y(255,0,255,1));case"maroon":return new t(new y(128,0,0,1));case"mediumaquamarine":return new t(new y(102,205,170,1));case"mediumblue":return new t(new y(0,0,205,1));case"mediumorchid":return new t(new y(186,85,211,1));case"mediumpurple":return new t(new y(147,112,219,1));case"mediumseagreen":return new t(new y(60,179,113,1));case"mediumslateblue":return new t(new y(123,104,238,1));case"mediumspringgreen":return new t(new y(0,250,154,1));case"mediumturquoise":return new t(new y(72,209,204,1));case"mediumvioletred":return new t(new y(199,21,133,1));case"midnightblue":return new t(new y(25,25,112,1));case"mintcream":return new t(new y(245,255,250,1));case"mistyrose":return new t(new y(255,228,225,1));case"moccasin":return new t(new y(255,228,181,1));case"navajowhite":return new t(new y(255,222,173,1));case"navy":return new t(new y(0,0,128,1));case"oldlace":return new t(new y(253,245,230,1));case"olive":return new t(new y(128,128,0,1));case"olivedrab":return new t(new y(107,142,35,1));case"orange":return new t(new y(255,165,0,1));case"orangered":return new t(new y(255,69,0,1));case"orchid":return new t(new y(218,112,214,1));case"palegoldenrod":return new t(new y(238,232,170,1));case"palegreen":return new t(new y(152,251,152,1));case"paleturquoise":return new t(new y(175,238,238,1));case"palevioletred":return new t(new y(219,112,147,1));case"papayawhip":return new t(new y(255,239,213,1));case"peachpuff":return new t(new y(255,218,185,1));case"peru":return new t(new y(205,133,63,1));case"pink":return new t(new y(255,192,203,1));case"plum":return new t(new y(221,160,221,1));case"powderblue":return new t(new y(176,224,230,1));case"purple":return new t(new y(128,0,128,1));case"rebeccapurple":return new t(new y(102,51,153,1));case"red":return new t(new y(255,0,0,1));case"rosybrown":return new t(new y(188,143,143,1));case"royalblue":return new t(new y(65,105,225,1));case"saddlebrown":return new t(new y(139,69,19,1));case"salmon":return new t(new y(250,128,114,1));case"sandybrown":return new t(new y(244,164,96,1));case"seagreen":return new t(new y(46,139,87,1));case"seashell":return new t(new y(255,245,238,1));case"sienna":return new t(new y(160,82,45,1));case"silver":return new t(new y(192,192,192,1));case"skyblue":return new t(new y(135,206,235,1));case"slateblue":return new t(new y(106,90,205,1));case"slategray":return new t(new y(112,128,144,1));case"slategrey":return new t(new y(112,128,144,1));case"snow":return new t(new y(255,250,250,1));case"springgreen":return new t(new y(0,255,127,1));case"steelblue":return new t(new y(70,130,180,1));case"tan":return new t(new y(210,180,140,1));case"teal":return new t(new y(0,128,128,1));case"thistle":return new t(new y(216,191,216,1));case"tomato":return new t(new y(255,99,71,1));case"turquoise":return new t(new y(64,224,208,1));case"violet":return new t(new y(238,130,238,1));case"wheat":return new t(new y(245,222,179,1));case"white":return new t(new y(255,255,255,1));case"whitesmoke":return new t(new y(245,245,245,1));case"yellow":return new t(new y(255,255,0,1));case"yellowgreen":return new t(new y(154,205,50,1));default:return null}}function f(b){let _=b.length;if(_===0||b.charCodeAt(0)!==35)return null;if(_===7){let F=16*g(b.charCodeAt(1))+g(b.charCodeAt(2)),L=16*g(b.charCodeAt(3))+g(b.charCodeAt(4)),k=16*g(b.charCodeAt(5))+g(b.charCodeAt(6));return new t(new y(F,L,k,1))}if(_===9){let F=16*g(b.charCodeAt(1))+g(b.charCodeAt(2)),L=16*g(b.charCodeAt(3))+g(b.charCodeAt(4)),k=16*g(b.charCodeAt(5))+g(b.charCodeAt(6)),T=16*g(b.charCodeAt(7))+g(b.charCodeAt(8));return new t(new y(F,L,k,T/255))}if(_===4){let F=g(b.charCodeAt(1)),L=g(b.charCodeAt(2)),k=g(b.charCodeAt(3));return new t(new y(16*F+F,16*L+L,16*k+k))}if(_===5){let F=g(b.charCodeAt(1)),L=g(b.charCodeAt(2)),k=g(b.charCodeAt(3)),T=g(b.charCodeAt(4));return new t(new y(16*F+F,16*L+L,16*k+k,(16*T+T)/255))}return null}n.parseHex=f;function g(b){switch(b){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))})(un||(un={}));function zd(t){let e=[];for(let n of t){let r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&e.push(r)}return e}function za(t,e,n,r){return{red:t/255,blue:n/255,green:e/255,alpha:r}}function Tr(t,e){let n=e.index,r=e[0].length;if(n===void 0)return;let i=t.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function Vm(t,e){if(!t)return;let n=un.Format.CSS.parseHex(e);if(n)return{range:t,color:za(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function Md(t,e,n){if(!t||e.length!==1)return;let i=e[0].values(),s=zd(i);return{range:t,color:za(s[0],s[1],s[2],n?s[3]:1)}}function Ad(t,e,n){if(!t||e.length!==1)return;let i=e[0].values(),s=zd(i),o=new un(new tt(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:t,color:za(o.rgba.r,o.rgba.g,o.rgba.b,o.rgba.a)}}function Or(t,e){return typeof t=="string"?[...t.matchAll(e)]:t.findMatches(e)}function $m(t){let e=[],r=Or(t,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%\/]*\))|^(#)([A-Fa-f0-9]{3})\b|^(#)([A-Fa-f0-9]{4})\b|^(#)([A-Fa-f0-9]{6})\b|^(#)([A-Fa-f0-9]{8})\b|(?<=['"\s])(#)([A-Fa-f0-9]{3})\b|(?<=['"\s])(#)([A-Fa-f0-9]{4})\b|(?<=['"\s])(#)([A-Fa-f0-9]{6})\b|(?<=['"\s])(#)([A-Fa-f0-9]{8})\b/gm);if(r.length>0)for(let i of r){let s=i.filter(c=>c!==void 0),o=s[1],a=s[2];if(!a)continue;let l;if(o==="rgb"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=Md(Tr(t,i),Or(a,c),!1)}else if(o==="rgba"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=Md(Tr(t,i),Or(a,c),!0)}else if(o==="hsl"){let c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=Ad(Tr(t,i),Or(a,c),!1)}else if(o==="hsla"){let c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;l=Ad(Tr(t,i),Or(a,c),!0)}else o==="#"&&(l=Vm(Tr(t,i),o+a));l&&e.push(l)}return e}function Pd(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:$m(t)}var Bm=/^-+|-+$/g,Td=100,qm=5;function Od(t,e){let n=[];if(e.findRegionSectionHeaders&&e.foldingRules?.markers){let r=jm(t,e);n=n.concat(r)}if(e.findMarkSectionHeaders){let r=Hm(t,e);n=n.concat(r)}return n}function jm(t,e){let n=[],r=t.getLineCount();for(let i=1;i<=r;i++){let s=t.getLineContent(i),o=s.match(e.foldingRules.markers.start);if(o){let a={startLineNumber:i,startColumn:o[0].length+1,endLineNumber:i,endColumn:s.length+1};if(a.endColumn>a.startColumn){let l={range:a,...Gm(s.substring(o[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&n.push(l)}}}return n}function Hm(t,e){let n=[],r=t.getLineCount();if(!e.markSectionHeaderRegex||e.markSectionHeaderRegex.trim()==="")return n;let i=nd(e.markSectionHeaderRegex),s=new RegExp(e.markSectionHeaderRegex,`gdm${i?"s":""}`);if(uc(s))return n;for(let o=1;o<=r;o+=Td-qm){let a=Math.min(o+Td-1,r),l=[];for(let u=o;u<=a;u++)l.push(t.getLineContent(u));let c=l.join(` +`);s.lastIndex=0;let d;for(;(d=s.exec(c))!==null;){let u=c.substring(0,d.index),m=(u.match(/\n/g)||[]).length,f=o+m,g=d[0].split(` +`),b=g.length,_=f+b-1,F=u.lastIndexOf(` +`)+1,L=d.index-F+1,k=g[g.length-1],T=b===1?L+d[0].length:k.length+1,W={startLineNumber:f,startColumn:L,endLineNumber:_,endColumn:T},$=(d.groups??{}).label??"",N=((d.groups??{}).separator??"")!=="",R={range:W,text:$,hasSeparatorLine:N,shouldBeInComments:!0};(R.text||R.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber{sc(()=>{if(i)return;let s=Date.now()+15;n(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Pa=(e,n,r)=>{let i=e.requestIdleCallback(n,typeof r=="number"?{timeout:r}:void 0),s=!1;return{dispose(){s||(s=!0,e.cancelIdleCallback(i))}}},Jm=(e,n)=>Pa(globalThis,e,n)})();var as=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new fr)}},Wd;(function(t){async function e(r){let i,s=await Promise.all(r.map(o=>o.then(a=>a,a=>{i||(i=a)})));if(typeof i<"u")throw i;return s}t.settled=e;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(o){s(o)}})}t.withAsyncBody=n})(Wd||(Wd={}));var Ta=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new oe("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{let e=new as;return this._unsatisfiedConsumers.push(e),e.p}}},Ud=class t{constructor(e,n){this._onReturn=n,this._producerConsumer=new Ta,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{let r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(let s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new t(n=>{n.emitMany(e)})}static fromPromise(e){return new t(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new t(async n=>{await Promise.all(e.map(async r=>{for await(let i of r)n.emitOne(i)}))})}static{this.EMPTY=t.fromArray([])}static map(e,n){return new t(async r=>{for await(let i of e)r.emitOne(n(i))})}static tee(e){let n,r,i=new as,s=async()=>{if(!(!n||!r))try{for await(let l of e)n.emitOne(l),r.emitOne(l)}catch(l){n.reject(l),r.reject(l)}finally{i.complete()}},o=new t(async l=>(n=l,s(),i.p)),a=new t(async l=>(r=l,s(),i.p));return[o,a]}map(e){return t.map(this,e)}static coalesce(e){return t.filter(e,n=>!!n)}coalesce(){return t.coalesce(this)}static filter(e,n){return new t(async r=>{for await(let i of e)n(i)&&r.emitOne(i)})}filter(e){return t.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};var ls=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=on(e);let r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=on(e),n=on(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;let s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=on(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,o=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],o=s-this.values[i],e=s)n=i+1;else break;return new Oa(i,e-o)}};var Oa=class{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}};var cs=class{constructor(e,n,r,i){this._uri=e,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let n=e.changes;for(let r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new X(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;ie.push(this._models[n])),e}$acceptNewModel(e){this._models[e.url]=new Wa(Le.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},Wa=class extends cs{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:e}};var ds=class t{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new hs}dispose(){}async $ping(){return"pong"}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,n){this._workerTextModelSyncServer.$acceptModelChanged(e,n)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,n,r){let i=this._getModel(e);return i?Hi.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,n){let r=this._getModel(e);return r?Od(r,n):[]}async $computeDiff(e,n,r,i){let s=this._getModel(e),o=this._getModel(n);if(!s||!o)return null;let a=await Km(i);return t.computeDiff(s,o,r,a)}static computeDiff(e,n,r,i){let s=e.getLinesContent(),o=n.getLinesContent(),a=i.computeDiff(s,o,r),l=a.changes.length>0?!1:this._modelsAreIdentical(e,n);function c(d){return d.map(u=>[u.original.startLineNumber,u.original.endLineNumberExclusive,u.modified.startLineNumber,u.modified.endLineNumberExclusive,u.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:l,quitEarly:a.hitTimeout,changes:c(a.changes),moves:a.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,c(d.changes)])}}static _modelsAreIdentical(e,n){let r=e.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){let o=e.getLineContent(s),a=n.getLineContent(s);if(o!==a)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,n,r){let i=this._getModel(e);if(!i)return n;let s=[],o;n=n.slice(0).sort((l,c)=>{if(l.range&&c.range)return U.compareRangesUsingStarts(l.range,c.range);let d=l.range?0:1,u=c.range?0:1;return d-u});let a=0;for(let l=1;lt._diffLimit){s.push({range:l,text:c});continue}let m=Rc(u,c,r),f=i.offsetAt(U.lift(l).getStartPosition());for(let g of m){let b=i.positionAt(f+g.originalStart),_=i.positionAt(f+g.originalStart+g.originalLength),F={text:c.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:b.lineNumber,startColumn:b.column,endLineNumber:_.lineNumber,endColumn:_.column}};i.getValueInRange(F.range)!==F.text&&s.push(F)}}return typeof o=="number"&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(e){let n=this._getModel(e);return n?Lc(n):null}async $computeDefaultDocumentColors(e){let n=this._getModel(e);return n?Pd(n):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,n,r,i){let s=new Fn,o=new RegExp(r,i),a=new Set;e:for(let l of e){let c=this._getModel(l);if(c){for(let d of c.words(o))if(!(d===n||!isNaN(Number(d)))&&(a.add(d),a.size>t._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}}async $computeWordRanges(e,n,r,i){let s=this._getModel(e);if(!s)return Object.create(null);let o=new RegExp(r,i),a=Object.create(null);for(let l=n.startLineNumber;l{let i=us.getChannel(r),o={host:new Proxy({},{get(a,l,c){if(l!=="then"){if(typeof l!="string")throw new Error("Not supported");return(...d)=>i.$fhr(l,d)}}}),getMirrorModels:()=>n.requestHandler.getModels()};return e=t(o),new ds(e)});return e}var Xm=!1;function $d(t){Xm=!0,self.onmessage=e=>{Vd(n=>t(n,e.data))}}var p;(function(t){t[t.Ident=0]="Ident",t[t.AtKeyword=1]="AtKeyword",t[t.String=2]="String",t[t.BadString=3]="BadString",t[t.UnquotedString=4]="UnquotedString",t[t.Hash=5]="Hash",t[t.Num=6]="Num",t[t.Percentage=7]="Percentage",t[t.Dimension=8]="Dimension",t[t.UnicodeRange=9]="UnicodeRange",t[t.CDO=10]="CDO",t[t.CDC=11]="CDC",t[t.Colon=12]="Colon",t[t.SemiColon=13]="SemiColon",t[t.CurlyL=14]="CurlyL",t[t.CurlyR=15]="CurlyR",t[t.ParenthesisL=16]="ParenthesisL",t[t.ParenthesisR=17]="ParenthesisR",t[t.BracketL=18]="BracketL",t[t.BracketR=19]="BracketR",t[t.Whitespace=20]="Whitespace",t[t.Includes=21]="Includes",t[t.Dashmatch=22]="Dashmatch",t[t.SubstringOperator=23]="SubstringOperator",t[t.PrefixOperator=24]="PrefixOperator",t[t.SuffixOperator=25]="SuffixOperator",t[t.Delim=26]="Delim",t[t.EMS=27]="EMS",t[t.EXS=28]="EXS",t[t.Length=29]="Length",t[t.Angle=30]="Angle",t[t.Time=31]="Time",t[t.Freq=32]="Freq",t[t.Exclamation=33]="Exclamation",t[t.Resolution=34]="Resolution",t[t.Comma=35]="Comma",t[t.Charset=36]="Charset",t[t.EscapedJavaScript=37]="EscapedJavaScript",t[t.BadEscapedJavaScript=38]="BadEscapedJavaScript",t[t.Comment=39]="Comment",t[t.SingleLineComment=40]="SingleLineComment",t[t.EOF=41]="EOF",t[t.ContainerQueryLength=42]="ContainerQueryLength",t[t.CustomToken=43]="CustomToken"})(p||(p={}));var fs=class{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,n=this.position){return this.source.substring(e,n)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let n=0;for(;nn&&r===Jd?(e=!0,!1):(n=r===Ua,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,n;return this.stream.peekChar()===Qd&&(e=1),n=this.stream.peekChar(e),n>=Wr&&n<=Ur?(this.stream.advance(e+1),this.stream.advanceWhileChar(r=>r>=Wr&&r<=Ur||e===0&&r===Qd),!0):!1}_newline(e){let n=this.stream.peekChar();switch(n){case $n:case $r:case Vn:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===$n&&this.stream.advanceIfChar(Vn)&&e.push(` +`),!0}return!1}_escape(e,n){let r=this.stream.peekChar();if(r===Va){this.stream.advance(1),r=this.stream.peekChar();let i=0;for(;i<6&&(r>=Wr&&r<=Ur||r>=ps&&r<=Bd||r>=ms&&r<=jd);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{let s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===$a||r===Ba?this.stream.advance(1):this._newline([]),!0}if(r!==$n&&r!==$r&&r!==Vn)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1}_stringChar(e,n){let r=this.stream.peekChar();return r!==0&&r!==e&&r!==Va&&r!==$n&&r!==$r&&r!==Vn?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1}_string(e){if(this.stream.peekChar()===Xd||this.stream.peekChar()===Kd){let n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null}_unquotedChar(e){let n=this.stream.peekChar();return n!==0&&n!==Va&&n!==Xd&&n!==Kd&&n!==Zd&&n!==eu&&n!==$a&&n!==Ba&&n!==Vn&&n!==$r&&n!==$n?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unquotedString(e){let n=!1;for(;this._unquotedChar(e)||this._escape(e);)n=!0;return n}_whitespace(){return this.stream.advanceWhileChar(n=>n===$a||n===Ba||n===Vn||n===$r||n===$n)>0}_name(e){let n=!1;for(;this._identChar(e)||this._escape(e);)n=!0;return n}ident(e){let n=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1}_identFirstChar(e){let n=this.stream.peekChar();return n===Gd||n>=ps&&n<=qd||n>=ms&&n<=Hd||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_minus(e){let n=this.stream.peekChar();return n===pn?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_identChar(e){let n=this.stream.peekChar();return n===Gd||n===pn||n>=ps&&n<=qd||n>=ms&&n<=Hd||n>=Wr&&n<=Ur||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(ff)){let e=r=>r>=Wr&&r<=Ur||r>=ps&&r<=Bd||r>=ms&&r<=jd,n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(r=>r===mf);if(n>=1&&n<=6)if(this.stream.advanceIfChar(pn)){let r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1}};function he(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function tu(t,e,n=4){let r=Math.abs(t.length-e.length);if(r>n)return 0;let i=[],s=[],o,a;for(o=0;o0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t[t.SelectorPlaceholder=42]="SelectorPlaceholder",t[t.Debug=43]="Debug",t[t.If=44]="If",t[t.Else=45]="Else",t[t.For=46]="For",t[t.Each=47]="Each",t[t.While=48]="While",t[t.MixinContentReference=49]="MixinContentReference",t[t.MixinContentDeclaration=50]="MixinContentDeclaration",t[t.Media=51]="Media",t[t.Keyframe=52]="Keyframe",t[t.FontFace=53]="FontFace",t[t.Import=54]="Import",t[t.Namespace=55]="Namespace",t[t.Invocation=56]="Invocation",t[t.FunctionDeclaration=57]="FunctionDeclaration",t[t.ReturnStatement=58]="ReturnStatement",t[t.MediaQuery=59]="MediaQuery",t[t.MediaCondition=60]="MediaCondition",t[t.MediaFeature=61]="MediaFeature",t[t.FunctionParameter=62]="FunctionParameter",t[t.FunctionArgument=63]="FunctionArgument",t[t.KeyframeSelector=64]="KeyframeSelector",t[t.ViewPort=65]="ViewPort",t[t.Document=66]="Document",t[t.AtApplyRule=67]="AtApplyRule",t[t.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",t[t.CustomPropertySet=69]="CustomPropertySet",t[t.ListEntry=70]="ListEntry",t[t.Supports=71]="Supports",t[t.SupportsCondition=72]="SupportsCondition",t[t.NamespacePrefix=73]="NamespacePrefix",t[t.GridLine=74]="GridLine",t[t.Plugin=75]="Plugin",t[t.UnknownAtRule=76]="UnknownAtRule",t[t.Use=77]="Use",t[t.ModuleConfiguration=78]="ModuleConfiguration",t[t.Forward=79]="Forward",t[t.ForwardVisibility=80]="ForwardVisibility",t[t.Module=81]="Module",t[t.UnicodeRange=82]="UnicodeRange",t[t.Layer=83]="Layer",t[t.LayerNameList=84]="LayerNameList",t[t.LayerName=85]="LayerName",t[t.PropertyAtRule=86]="PropertyAtRule",t[t.Container=87]="Container"})(v||(v={}));var ee;(function(t){t[t.Mixin=0]="Mixin",t[t.Rule=1]="Rule",t[t.Variable=2]="Variable",t[t.Function=3]="Function",t[t.Keyframe=4]="Keyframe",t[t.Unknown=5]="Unknown",t[t.Module=6]="Module",t[t.Forward=7]="Forward",t[t.ForwardVisibility=8]="ForwardVisibility",t[t.Property=9]="Property"})(ee||(ee={}));function Ks(t,e){let n=null;return!t||et.end?null:(t.accept(r=>r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(n?r.length<=n.length&&(n=r):n=r,!0):!1),n)}function Qn(t,e){let n=Ks(t,e),r=[];for(;n;)r.unshift(n),n=n.parent;return r}function ru(t){let e=t.findParent(v.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}var O=class{get end(){return this.offset+this.length}constructor(e=-1,n=-1,r){this.parent=null,this.offset=e,this.length=n,r&&(this.nodeType=r)}set type(e){this.nodeType=e}get type(){return this.nodeType||v.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(let n of this.children)n.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,n=-1){if(e.parent&&e.parent.children){let i=e.parent.children.indexOf(e);i>=0&&e.parent.children.splice(i,1)}e.parent=this;let r=this.children;return r||(r=this.children=[]),n!==-1?r.splice(n,0,e):r.push(e),e}attachTo(e,n=-1){return e&&e.adoptChild(this,n),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(n=>n.getRule()===e)}isErroneous(e=!1){return this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(n=>n.isErroneous(!0))}setNode(e,n,r=-1){return n?(n.attachTo(this,r),this[e]=n,!0):!1}addChild(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1}updateOffsetAndLength(e){(e.offsetthis.end||this.length===-1)&&(this.length=n-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e=0;r--)if(n=this.children[r],n.offset<=e)return n}return null}findChildAtOffset(e,n){let r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?n&&r.findChildAtOffset(e,!0)||r:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof we;)e=e.parent;return e}findParent(e){let n=this;for(;n&&n.type!==e;)n=n.parent;return n}findAParent(...e){let n=this;for(;n&&!e.some(r=>n.type===r);)n=n.parent;return n}setData(e,n){this.options||(this.options={}),this.options[e]=n}getData(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]}},we=class extends O{constructor(e,n=-1){super(-1,-1),this.attachTo(e,n),this.offset=-1,this.length=-1}},bs=class extends O{constructor(e,n){super(e,n)}get type(){return v.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}},ge=class extends O{constructor(e,n){super(e,n),this.isCustomProperty=!1}get type(){return v.Identifier}containsInterpolation(){return this.hasChildren()}},ws=class extends O{constructor(e,n){super(e,n)}get type(){return v.Stylesheet}},mn=class extends O{constructor(e,n){super(e,n)}get type(){return v.Declarations}},se=class extends O{constructor(e,n){super(e,n)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}},ze=class extends se{constructor(e,n){super(e,n)}get type(){return v.Ruleset}getSelectors(){return this.selectors||(this.selectors=new we(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(v.Declarations)!==null}},We=class extends O{constructor(e,n){super(e,n)}get type(){return v.Selector}},Ue=class extends O{constructor(e,n){super(e,n)}get type(){return v.SimpleSelector}},Bn=class extends O{constructor(e,n){super(e,n)}},vs=class extends se{constructor(e,n){super(e,n)}get type(){return v.CustomPropertySet}},Se=class t extends Bn{constructor(e,n){super(e,n),this.property=null}get type(){return v.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){let e=this.property?this.property.getName():"unknown";if(this.parent instanceof mn&&this.parent.getParent()instanceof Br){let n=this.parent.getParent().getParent();if(n instanceof t)return n.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){let e=this.getFullPropertyName();if(e&&e.charAt(0)==="-"){let n=e.indexOf("-",1);if(n!==-1)return e.substring(n+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}},ys=class extends Se{constructor(e,n){super(e,n)}get type(){return v.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}},Bt=class extends O{constructor(e,n){super(e,n)}get type(){return v.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return nu(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}},Ha=class extends O{constructor(e,n){super(e,n)}get type(){return v.Invocation}getArguments(){return this.arguments||(this.arguments=new we(this)),this.arguments}},He=class extends Ha{constructor(e,n){super(e,n)}get type(){return v.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},rt=class extends O{constructor(e,n){super(e,n)}get type(){return v.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}},Pe=class extends O{constructor(e,n){super(e,n)}get type(){return v.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}},xs=class extends se{constructor(e,n){super(e,n)}get type(){return v.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}},Ss=class extends se{constructor(e,n){super(e,n)}get type(){return v.For}setVariable(e){return this.setNode("variable",e,0)}},Cs=class extends se{constructor(e,n){super(e,n)}get type(){return v.Each}getVariables(){return this.variables||(this.variables=new we(this)),this.variables}},_s=class extends se{constructor(e,n){super(e,n)}get type(){return v.While}},ks=class extends se{constructor(e,n){super(e,n)}get type(){return v.Else}},St=class extends se{constructor(e,n){super(e,n)}get type(){return v.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new we(this)),this.parameters}},Es=class extends se{constructor(e,n){super(e,n)}get type(){return v.ViewPort}},qn=class extends se{constructor(e,n){super(e,n)}get type(){return v.FontFace}},Br=class extends se{constructor(e,n){super(e,n)}get type(){return v.NestedProperties}},jn=class extends se{constructor(e,n){super(e,n)}get type(){return v.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},qr=class extends se{constructor(e,n){super(e,n)}get type(){return v.KeyframeSelector}},qt=class extends O{constructor(e,n){super(e,n)}get type(){return v.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}},Fs=class extends O{get type(){return v.Use}getParameters(){return this.parameters||(this.parameters=new we(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Rs=class extends O{get type(){return v.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}},Ls=class extends O{get type(){return v.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new we(this)),this.members}getParameters(){return this.parameters||(this.parameters=new we(this)),this.parameters}},Is=class extends O{get type(){return v.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Ns=class extends O{constructor(e,n){super(e,n)}get type(){return v.Namespace}},jt=class extends se{constructor(e,n){super(e,n)}get type(){return v.Media}},fn=class extends se{constructor(e,n){super(e,n)}get type(){return v.Supports}},Ds=class extends se{constructor(e,n){super(e,n)}get type(){return v.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}},Ms=class extends se{constructor(e,n){super(e,n)}get type(){return v.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}},As=class extends se{constructor(e,n){super(e,n)}get type(){return v.Document}},zs=class extends se{constructor(e,n){super(e,n)}get type(){return v.Container}},Hn=class extends O{constructor(e,n){super(e,n)}},Gn=class extends O{constructor(e,n){super(e,n)}get type(){return v.MediaQuery}},Ps=class extends O{constructor(e,n){super(e,n)}get type(){return v.MediaCondition}},Ts=class extends O{constructor(e,n){super(e,n)}get type(){return v.MediaFeature}},Ct=class extends O{constructor(e,n){super(e,n)}get type(){return v.SupportsCondition}},Os=class extends se{constructor(e,n){super(e,n)}get type(){return v.Page}},Ws=class extends se{constructor(e,n){super(e,n)}get type(){return v.PageBoxMarginBox}},Jn=class extends O{constructor(e,n){super(e,n)}get type(){return v.Expression}},Ht=class extends O{constructor(e,n){super(e,n)}get type(){return v.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}},Us=class extends O{constructor(e,n){super(e,n)}get type(){return v.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}},Vs=class extends O{constructor(e,n){super(e,n)}get type(){return v.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}},gn=class extends O{constructor(e,n){super(e,n)}get type(){return v.HexColorValue}},$s=class extends O{constructor(e,n){super(e,n)}get type(){return v.RatioValue}},gf=46,bf=48,wf=57,bn=class extends O{constructor(e,n){super(e,n)}get type(){return v.NumericValue}getValue(){let e=this.getText(),n=0,r;for(let i=0,s=e.length;i0&&(n+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),i=e.args??{};return yf(r,i)}var vf=/{([^}]+)}/g;function yf(t,e){return Object.keys(e).length===0?t:t.replace(vf,(n,r)=>e[r]??n)}var re=class{constructor(e,n){this.id=e,this.message=n}},x={NumberExpected:new re("css-numberexpected",w("number expected")),ConditionExpected:new re("css-conditionexpected",w("condition expected")),RuleOrSelectorExpected:new re("css-ruleorselectorexpected",w("at-rule or selector expected")),DotExpected:new re("css-dotexpected",w("dot expected")),ColonExpected:new re("css-colonexpected",w("colon expected")),SemiColonExpected:new re("css-semicolonexpected",w("semi-colon expected")),TermExpected:new re("css-termexpected",w("term expected")),ExpressionExpected:new re("css-expressionexpected",w("expression expected")),OperatorExpected:new re("css-operatorexpected",w("operator expected")),IdentifierExpected:new re("css-identifierexpected",w("identifier expected")),PercentageExpected:new re("css-percentageexpected",w("percentage expected")),URIOrStringExpected:new re("css-uriorstringexpected",w("uri or string expected")),URIExpected:new re("css-uriexpected",w("URI expected")),VariableNameExpected:new re("css-varnameexpected",w("variable name expected")),VariableValueExpected:new re("css-varvalueexpected",w("variable value expected")),PropertyValueExpected:new re("css-propertyvalueexpected",w("property value expected")),LeftCurlyExpected:new re("css-lcurlyexpected",w("{ expected")),RightCurlyExpected:new re("css-rcurlyexpected",w("} expected")),LeftSquareBracketExpected:new re("css-rbracketexpected",w("[ expected")),RightSquareBracketExpected:new re("css-lbracketexpected",w("] expected")),LeftParenthesisExpected:new re("css-lparentexpected",w("( expected")),RightParenthesisExpected:new re("css-rparentexpected",w(") expected")),CommaExpected:new re("css-commaexpected",w("comma expected")),PageDirectiveOrDeclarationExpected:new re("css-pagedirordeclexpected",w("page directive or declaraton expected")),UnknownAtRule:new re("css-unknownatrule",w("at-rule unknown")),UnknownKeyword:new re("css-unknownkeyword",w("unknown keyword")),SelectorExpected:new re("css-selectorexpected",w("selector expected")),StringLiteralExpected:new re("css-stringliteralexpected",w("string literal expected")),WhitespaceExpected:new re("css-whitespaceexpected",w("whitespace expected")),MediaQueryExpected:new re("css-mediaqueryexpected",w("media query expected")),IdentifierOrWildcardExpected:new re("css-idorwildcardexpected",w("identifier or wildcard expected")),WildcardExpected:new re("css-wildcardexpected",w("wildcard expected")),IdentifierOrVariableExpected:new re("css-idorvarexpected",w("identifier or variable expected"))};var Ga;(function(t){function e(n){return typeof n=="string"}t.is=e})(Ga||(Ga={}));var Ja;(function(t){function e(n){return typeof n=="string"}t.is=e})(Ja||(Ja={}));var iu;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(iu||(iu={}));var Xs;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(Xs||(Xs={}));var be;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=Xs.MAX_VALUE),i===Number.MAX_VALUE&&(i=Xs.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&S.uinteger(i.line)&&S.uinteger(i.character)}t.is=n})(be||(be={}));var Q;(function(t){function e(r,i,s,o){if(S.uinteger(r)&&S.uinteger(i)&&S.uinteger(s)&&S.uinteger(o))return{start:be.create(r,i),end:be.create(s,o)};if(be.is(r)&&be.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${o}]`)}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&be.is(i.start)&&be.is(i.end)}t.is=n})(Q||(Q={}));var vn;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&Q.is(i.range)&&(S.string(i.uri)||S.undefined(i.uri))}t.is=n})(vn||(vn={}));var su;(function(t){function e(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&Q.is(i.targetRange)&&S.string(i.targetUri)&&Q.is(i.targetSelectionRange)&&(Q.is(i.originSelectionRange)||S.undefined(i.originSelectionRange))}t.is=n})(su||(su={}));var Qs;(function(t){function e(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&S.numberRange(i.red,0,1)&&S.numberRange(i.green,0,1)&&S.numberRange(i.blue,0,1)&&S.numberRange(i.alpha,0,1)}t.is=n})(Qs||(Qs={}));var Ka;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&Q.is(i.range)&&Qs.is(i.color)}t.is=n})(Ka||(Ka={}));var Xa;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&S.string(i.label)&&(S.undefined(i.textEdit)||K.is(i))&&(S.undefined(i.additionalTextEdits)||S.typedArray(i.additionalTextEdits,K.is))}t.is=n})(Xa||(Xa={}));var Qa;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Qa||(Qa={}));var Ya;(function(t){function e(r,i,s,o,a,l){let c={startLine:r,endLine:i};return S.defined(s)&&(c.startCharacter=s),S.defined(o)&&(c.endCharacter=o),S.defined(a)&&(c.kind=a),S.defined(l)&&(c.collapsedText=l),c}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&S.uinteger(i.startLine)&&S.uinteger(i.startLine)&&(S.undefined(i.startCharacter)||S.uinteger(i.startCharacter))&&(S.undefined(i.endCharacter)||S.uinteger(i.endCharacter))&&(S.undefined(i.kind)||S.string(i.kind))}t.is=n})(Ya||(Ya={}));var Za;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return S.defined(i)&&vn.is(i.location)&&S.string(i.message)}t.is=n})(Za||(Za={}));var Yn;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Yn||(Yn={}));var ou;(function(t){t.Unnecessary=1,t.Deprecated=2})(ou||(ou={}));var au;(function(t){function e(n){let r=n;return S.objectLiteral(r)&&S.string(r.href)}t.is=e})(au||(au={}));var Hr;(function(t){function e(r,i,s,o,a,l){let c={range:r,message:i};return S.defined(s)&&(c.severity=s),S.defined(o)&&(c.code=o),S.defined(a)&&(c.source=a),S.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i;let s=r;return S.defined(s)&&Q.is(s.range)&&S.string(s.message)&&(S.number(s.severity)||S.undefined(s.severity))&&(S.integer(s.code)||S.string(s.code)||S.undefined(s.code))&&(S.undefined(s.codeDescription)||S.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(S.string(s.source)||S.undefined(s.source))&&(S.undefined(s.relatedInformation)||S.typedArray(s.relatedInformation,Za.is))}t.is=n})(Hr||(Hr={}));var kt;(function(t){function e(r,i,...s){let o={title:r,command:i};return S.defined(s)&&s.length>0&&(o.arguments=s),o}t.create=e;function n(r){let i=r;return S.defined(i)&&S.string(i.title)&&S.string(i.command)}t.is=n})(kt||(kt={}));var K;(function(t){function e(s,o){return{range:s,newText:o}}t.replace=e;function n(s,o){return{range:{start:s,end:s},newText:o}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){let o=s;return S.objectLiteral(o)&&S.string(o.newText)&&Q.is(o.range)}t.is=i})(K||(K={}));var el;(function(t){function e(r,i,s){let o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&S.string(i.label)&&(S.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(S.string(i.description)||i.description===void 0)}t.is=n})(el||(el={}));var Zn;(function(t){function e(n){let r=n;return S.string(r)}t.is=e})(Zn||(Zn={}));var lu;(function(t){function e(s,o,a){return{range:s,newText:o,annotationId:a}}t.replace=e;function n(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}t.insert=n;function r(s,o){return{range:s,newText:"",annotationId:o}}t.del=r;function i(s){let o=s;return K.is(o)&&(el.is(o.annotationId)||Zn.is(o.annotationId))}t.is=i})(lu||(lu={}));var er;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return S.defined(i)&&il.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(er||(er={}));var tl;(function(t){function e(r,i,s){let o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&S.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||S.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||S.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Zn.is(i.annotationId))}t.is=n})(tl||(tl={}));var nl;(function(t){function e(r,i,s,o){let a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&S.string(i.oldUri)&&S.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||S.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||S.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Zn.is(i.annotationId))}t.is=n})(nl||(nl={}));var rl;(function(t){function e(r,i,s){let o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&S.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||S.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||S.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Zn.is(i.annotationId))}t.is=n})(rl||(rl={}));var Ys;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>S.string(i.kind)?tl.is(i)||nl.is(i)||rl.is(i):er.is(i)))}t.is=e})(Ys||(Ys={}));var cu;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return S.defined(i)&&S.string(i.uri)}t.is=n})(cu||(cu={}));var Gr;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return S.defined(i)&&S.string(i.uri)&&S.integer(i.version)}t.is=n})(Gr||(Gr={}));var il;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return S.defined(i)&&S.string(i.uri)&&(i.version===null||S.integer(i.version))}t.is=n})(il||(il={}));var hu;(function(t){function e(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}t.create=e;function n(r){let i=r;return S.defined(i)&&S.string(i.uri)&&S.string(i.languageId)&&S.integer(i.version)&&S.string(i.text)}t.is=n})(hu||(hu={}));var Ae;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){let r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(Ae||(Ae={}));var tr;(function(t){function e(n){let r=n;return S.objectLiteral(n)&&Ae.is(r.kind)&&S.string(r.value)}t.is=e})(tr||(tr={}));var H;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(H||(H={}));var Ee;(function(t){t.PlainText=1,t.Snippet=2})(Ee||(Ee={}));var Et;(function(t){t.Deprecated=1})(Et||(Et={}));var du;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){let i=r;return i&&S.string(i.newText)&&Q.is(i.insert)&&Q.is(i.replace)}t.is=n})(du||(du={}));var uu;(function(t){t.asIs=1,t.adjustIndentation=2})(uu||(uu={}));var pu;(function(t){function e(n){let r=n;return r&&(S.string(r.detail)||r.detail===void 0)&&(S.string(r.description)||r.description===void 0)}t.is=e})(pu||(pu={}));var sl;(function(t){function e(n){return{label:n}}t.create=e})(sl||(sl={}));var ol;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(ol||(ol={}));var Jr;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){let i=r;return S.string(i)||S.objectLiteral(i)&&S.string(i.language)&&S.string(i.value)}t.is=n})(Jr||(Jr={}));var al;(function(t){function e(n){let r=n;return!!r&&S.objectLiteral(r)&&(tr.is(r.contents)||Jr.is(r.contents)||S.typedArray(r.contents,Jr.is))&&(n.range===void 0||Q.is(n.range))}t.is=e})(al||(al={}));var mu;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(mu||(mu={}));var fu;(function(t){function e(n,r,...i){let s={label:n};return S.defined(r)&&(s.documentation=r),S.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(fu||(fu={}));var Jt;(function(t){t.Text=1,t.Read=2,t.Write=3})(Jt||(Jt={}));var ll;(function(t){function e(n,r){let i={range:n};return S.number(r)&&(i.kind=r),i}t.create=e})(ll||(ll={}));var Je;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Je||(Je={}));var gu;(function(t){t.Deprecated=1})(gu||(gu={}));var cl;(function(t){function e(n,r,i,s,o){let a={name:n,kind:r,location:{uri:s,range:i}};return o&&(a.containerName=o),a}t.create=e})(cl||(cl={}));var bu;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(bu||(bu={}));var hl;(function(t){function e(r,i,s,o,a,l){let c={name:r,detail:i,kind:s,range:o,selectionRange:a};return l!==void 0&&(c.children=l),c}t.create=e;function n(r){let i=r;return i&&S.string(i.name)&&S.number(i.kind)&&Q.is(i.range)&&Q.is(i.selectionRange)&&(i.detail===void 0||S.string(i.detail))&&(i.deprecated===void 0||S.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(hl||(hl={}));var Kr;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Kr||(Kr={}));var Zs;(function(t){t.Invoked=1,t.Automatic=2})(Zs||(Zs={}));var dl;(function(t){function e(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}t.create=e;function n(r){let i=r;return S.defined(i)&&S.typedArray(i.diagnostics,Hr.is)&&(i.only===void 0||S.typedArray(i.only,S.string))&&(i.triggerKind===void 0||i.triggerKind===Zs.Invoked||i.triggerKind===Zs.Automatic)}t.is=n})(dl||(dl={}));var Xr;(function(t){function e(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):kt.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.kind=s),o}t.create=e;function n(r){let i=r;return i&&S.string(i.title)&&(i.diagnostics===void 0||S.typedArray(i.diagnostics,Hr.is))&&(i.kind===void 0||S.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||kt.is(i.command))&&(i.isPreferred===void 0||S.boolean(i.isPreferred))&&(i.edit===void 0||Ys.is(i.edit))}t.is=n})(Xr||(Xr={}));var wu;(function(t){function e(r,i){let s={range:r};return S.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return S.defined(i)&&Q.is(i.range)&&(S.undefined(i.command)||kt.is(i.command))}t.is=n})(wu||(wu={}));var vu;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return S.defined(i)&&S.uinteger(i.tabSize)&&S.boolean(i.insertSpaces)}t.is=n})(vu||(vu={}));var ul;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return S.defined(i)&&Q.is(i.range)&&(S.undefined(i.target)||S.string(i.target))}t.is=n})(ul||(ul={}));var nr;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&Q.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(nr||(nr={}));var yu;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(yu||(yu={}));var xu;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(xu||(xu={}));var Su;(function(t){function e(n){let r=n;return S.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(Su||(Su={}));var Cu;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){let i=r;return i!=null&&Q.is(i.range)&&S.string(i.text)}t.is=n})(Cu||(Cu={}));var _u;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){let i=r;return i!=null&&Q.is(i.range)&&S.boolean(i.caseSensitiveLookup)&&(S.string(i.variableName)||i.variableName===void 0)}t.is=n})(_u||(_u={}));var ku;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){let i=r;return i!=null&&Q.is(i.range)&&(S.string(i.expression)||i.expression===void 0)}t.is=n})(ku||(ku={}));var Eu;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){let i=r;return S.defined(i)&&Q.is(r.stoppedLocation)}t.is=n})(Eu||(Eu={}));var pl;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(pl||(pl={}));var ml;(function(t){function e(r){return{value:r}}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&(i.tooltip===void 0||S.string(i.tooltip)||tr.is(i.tooltip))&&(i.location===void 0||vn.is(i.location))&&(i.command===void 0||kt.is(i.command))}t.is=n})(ml||(ml={}));var Fu;(function(t){function e(r,i,s){let o={position:r,label:i};return s!==void 0&&(o.kind=s),o}t.create=e;function n(r){let i=r;return S.objectLiteral(i)&&be.is(i.position)&&(S.string(i.label)||S.typedArray(i.label,ml.is))&&(i.kind===void 0||pl.is(i.kind))&&i.textEdits===void 0||S.typedArray(i.textEdits,K.is)&&(i.tooltip===void 0||S.string(i.tooltip)||tr.is(i.tooltip))&&(i.paddingLeft===void 0||S.boolean(i.paddingLeft))&&(i.paddingRight===void 0||S.boolean(i.paddingRight))}t.is=n})(Fu||(Fu={}));var Ru;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(Ru||(Ru={}));var Lu;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(Lu||(Lu={}));var Iu;(function(t){function e(n){return{items:n}}t.create=e})(Iu||(Iu={}));var Nu;(function(t){t.Invoked=0,t.Automatic=1})(Nu||(Nu={}));var Du;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(Du||(Du={}));var Mu;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(Mu||(Mu={}));var Au;(function(t){function e(n){let r=n;return S.objectLiteral(r)&&Ja.is(r.uri)&&S.string(r.name)}t.is=e})(Au||(Au={}));var zu;(function(t){function e(s,o,a,l){return new fl(s,o,a,l)}t.create=e;function n(s){let o=s;return!!(S.defined(o)&&S.string(o.uri)&&(S.undefined(o.languageId)||S.string(o.languageId))&&S.uinteger(o.lineCount)&&S.func(o.getText)&&S.func(o.positionAt)&&S.func(o.offsetAt))}t.is=n;function r(s,o){let a=s.getText(),l=i(o,(d,u)=>{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),c=a.length;for(let d=l.length-1;d>=0;d--){let u=l[d],m=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)a=a.substring(0,m)+u.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=m}return a}t.applyEdits=r;function i(s,o){if(s.length<=1)return s;let a=s.length/2|0,l=s.slice(0,a),c=s.slice(a);i(l,o),i(c,o);let d=0,u=0,m=0;for(;d0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return be.create(0,e);for(;re?i=o:r=o+1}let s=r-1;return be.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(f){return f===!0||f===!1}t.boolean=i;function s(f){return e.call(f)==="[object String]"}t.string=s;function o(f){return e.call(f)==="[object Number]"}t.number=o;function a(f,g,b){return e.call(f)==="[object Number]"&&g<=f&&f<=b}t.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=c;function d(f){return e.call(f)==="[object Function]"}t.func=d;function u(f){return f!==null&&typeof f=="object"}t.objectLiteral=u;function m(f,g){return Array.isArray(f)&&f.every(g)}t.typedArray=m})(S||(S={}));var eo=class t{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(t.isIncremental(r)){let i=Tu(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let a=Math.max(i.start.line,0),l=Math.max(i.end.line,0),c=this._lineOffsets,d=Pu(r.text,!1,s);if(l-a===d.length)for(let m=0,f=d.length;me?i=o:r=o+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),l=0,c=[];for(let d of a){let u=i.offsetAt(d.range.start);if(ul&&c.push(o.substring(l,u)),d.newText.length&&c.push(d.newText),l=i.offsetAt(d.range.end)}return c.push(o.substr(l)),c.join("")}t.applyEdits=r})(Qr||(Qr={}));function gl(t,e){if(t.length<=1)return t;let n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);gl(r,e),gl(i,e);let s=0,o=0,a=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function xf(t){let e=Tu(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var bl;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ae.Markdown,Ae.PlainText]}},hover:{contentFormat:[Ae.Markdown,Ae.PlainText]}}}})(bl||(bl={}));var Kt;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(Kt||(Kt={}));var Sf=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,Vu=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:w("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:w("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:w("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:w("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:w("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:w("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:w("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:w("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:w("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:w("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a polar color space.")}],Cf=/^(rgb|rgba|hsl|hsla|hwb)$/i,Yr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_f=new RegExp(`^(${Object.keys(Yr).join("|")})$`,"i"),no={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},kf=new RegExp(`^(${Object.keys(no).join("|")})$`,"i");function Xt(t,e){let r=t.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);let i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function Ou(t){let e=t.getText(),n=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof n[2]>"u")return parseFloat(e)%360}throw new Error}function $u(t){let e=t.getName();return e?Cf.test(e):!1}function wl(t){return Sf.test(t)||_f.test(t)||kf.test(t)}var Wu=48,Ef=57,Ff=65,to=97,Rf=102;function pe(t){return t=to&&t<=Rf?t-to+10:0)}function Uu(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:pe(t.charCodeAt(1))*17/255,green:pe(t.charCodeAt(2))*17/255,blue:pe(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:pe(t.charCodeAt(1))*17/255,green:pe(t.charCodeAt(2))*17/255,blue:pe(t.charCodeAt(3))*17/255,alpha:pe(t.charCodeAt(4))*17/255};case 7:return{red:(pe(t.charCodeAt(1))*16+pe(t.charCodeAt(2)))/255,green:(pe(t.charCodeAt(3))*16+pe(t.charCodeAt(4)))/255,blue:(pe(t.charCodeAt(5))*16+pe(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(pe(t.charCodeAt(1))*16+pe(t.charCodeAt(2)))/255,green:(pe(t.charCodeAt(3))*16+pe(t.charCodeAt(4)))/255,blue:(pe(t.charCodeAt(5))*16+pe(t.charCodeAt(6)))/255,alpha:(pe(t.charCodeAt(7))*16+pe(t.charCodeAt(8)))/255}}return null}function Bu(t,e,n,r=1){if(t=t/60,e===0)return{red:n,green:n,blue:n,alpha:r};{let i=(a,l,c)=>{for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-a)*c+a:c<3?l:c<4?(l-a)*(4-c)+a:a},s=n<=.5?n*(e+1):n+e-n*e,o=n*2-s;return{red:i(o,s,t+2),green:i(o,s,t),blue:i(o,s,t-2),alpha:r}}}function vl(t){let e=t.red,n=t.green,r=t.blue,i=t.alpha,s=Math.max(e,n,r),o=Math.min(e,n,r),a=0,l=0,c=(o+s)/2,d=s-o;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case e:a=(n-r)/d+(n=1){let l=e/(e+n);return{red:l,green:l,blue:l,alpha:r}}let i=Bu(t,1,.5,r),s=i.red;s*=1-e-n,s+=e;let o=i.green;o*=1-e-n,o+=e;let a=i.blue;return a*=1-e-n,a+=e,{red:s,green:o,blue:a,alpha:r}}function qu(t){let e=vl(t),n=Math.min(t.red,t.green,t.blue),r=1-Math.max(t.red,t.green,t.blue);return{h:e.h,w:n,b:r,a:e.a}}function ju(t){if(t.type===v.HexColorValue){let e=t.getText();return Uu(e)}else if(t.type===v.Function){let e=t,n=e.getName(),r=e.getArguments().getChildren();if(r.length===1){let i=r[0].getChildren();if(i.length===1&&i[0].type===v.Expression&&(r=i[0].getChildren(),r.length===3)){let s=r[2];if(s instanceof Ht){let o=s.getLeft(),a=s.getRight(),l=s.getOperator();o&&a&&l&&l.matches("/")&&(r=[r[0],r[1],o,a])}}}if(!n||r.length<3||r.length>4)return null;try{let i=r.length===4?Xt(r[3],1):1;if(n==="rgb"||n==="rgba")return{red:Xt(r[0],255),green:Xt(r[1],255),blue:Xt(r[2],255),alpha:i};if(n==="hsl"||n==="hsla"){let s=Ou(r[0]),o=Xt(r[1],100),a=Xt(r[2],100);return Bu(s,o,a,i)}else if(n==="hwb"){let s=Ou(r[0]),o=Xt(r[1],100),a=Xt(r[2],100);return Lf(s,o,a,i)}}catch{return null}}else if(t.type===v.Identifier){if(t.parent&&t.parent.type!==v.Term)return null;let e=t.parent;if(e&&e.parent&&e.parent.type===v.BinaryExpression){let i=e.parent;if(i.parent&&i.parent.type===v.ListEntry&&i.parent.key===i)return null}let n=t.getText().toLowerCase();if(n==="none")return null;let r=Yr[n];if(r)return Uu(r)}return null}var yl={bottom:"Computes to \u2018100%\u2019 for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.",left:"Computes to \u20180%\u2019 for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to \u2018100%\u2019 for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},xl={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to \u2018repeat no-repeat\u2019.","repeat-y":"Computes to \u2018no-repeat repeat\u2019.",round:"Repeated as often as will fit within the background positioning area. If it doesn\u2019t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},Sl={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as \u2018none\u2019, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},Hu=["medium","thick","thin"],Cl={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},_l={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},kl={initial:"Represents the value specified as the property\u2019s initial value.",inherit:"Represents the computed value of the property on the element\u2019s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},El={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},Fl={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position."},Rl={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value \u201Cstart\u201D or \u201Cend\u201D.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},Ll={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},ro={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Gu=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],Ju=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],Ku=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function Zr(t){return Object.keys(t).map(e=>t[e])}function Ne(t){return typeof t<"u"}var ot=class{constructor(e=new Oe){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:p.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return p.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return p.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return p.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return e.indexOf(this.token.type)!==-1}peekRegExp(e,n){return e!==this.token.type?!1:n.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){let e=this.scanner.tryScanUnicode();return e?(this.prevToken=e,this.token=this.scanner.scan(),!0):!1}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){let n=this.mark(),r=e();return r||(this.restoreAtMark(n),null)}acceptOneKeyword(e){if(p.AtKeyword===this.token.type){for(let n of e)if(n.length===this.token.text.length&&n===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1}accept(e){return e===this.token.type?(this.consumeToken(),!0):!1}acceptIdent(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1}acceptKeyword(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1}acceptDelim(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1}acceptRegexp(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1}_parseRegexp(e){let n=this.createNode(v.Identifier);do;while(this.acceptRegexp(e));return this.finish(n)}acceptUnquotedString(){let e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);let n=this.scanner.scanUnquotedString();return n?(this.token=n,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,n){for(;;){if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;if(n&&n.indexOf(this.token.type)!==-1)return!0;if(this.token.type===p.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new O(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,n,r,i){if(!(e instanceof we)&&(n&&this.markError(e,n,r,i),this.prevToken)){let s=this.prevToken.offset+this.prevToken.len;e.length=s>e.offset?s-e.offset:0}return e}markError(e,n,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new Xn(e,n,ke.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)}parseStylesheet(e){let n=e.version,r=e.getText(),i=(s,o)=>{if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,o)};return this.internalParse(r,this._parseStylesheet,i)}internalParse(e,n,r){this.scanner.setSource(e),this.token=this.scanner.scan();let i=n.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=(s,o)=>e.substr(s,o)),i}_parseStylesheet(){let e=this.create(ws);for(;e.addChild(this._parseStylesheetStart()););let n=!1;do{let r=!1;do{r=!1;let i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,n=!1,!this.peek(p.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(p.SemiColon)&&this.markError(e,x.SemiColonExpected));this.accept(p.SemiColon)||this.accept(p.CDO)||this.accept(p.CDC);)r=!0,n=!1}while(r);if(this.peek(p.EOF))break;n||(this.peek(p.AtKeyword)?this.markError(e,x.UnknownAtRule):this.markError(e,x.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(p.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){let n=this.mark();if(this._parseSelector(e)){for(;this.accept(p.Comma)&&this._parseSelector(e););if(this.accept(p.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null}_parseRuleset(e=!1){let n=this.create(ze),r=n.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(n,x.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(p.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case v.Keyframe:case v.ViewPort:case v.Media:case v.Ruleset:case v.Namespace:case v.If:case v.For:case v.Each:case v.While:case v.MixinDeclaration:case v.FunctionDeclaration:case v.MixinContentDeclaration:return!1;case v.ExtendsReference:case v.MixinContentReference:case v.ReturnStatement:case v.MediaQuery:case v.Debug:case v.Import:case v.AtApplyRule:case v.CustomPropertyDeclaration:return!0;case v.VariableDeclaration:return e.needsSemicolon;case v.MixinReference:return!e.getContent();case v.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){let n=this.create(mn);if(!this.accept(p.CurlyL))return null;let r=e();for(;n.addChild(r)&&!this.peek(p.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(p.SemiColon))return this.finish(n,x.SemiColonExpected,[p.SemiColon,p.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===p.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(p.SemiColon););r=e()}return this.accept(p.CurlyR)?this.finish(n):this.finish(n,x.RightCurlyExpected,[p.CurlyR,p.SemiColon])}_parseBody(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,x.LeftCurlyExpected,[p.CurlyR,p.SemiColon])}_parseSelector(e){let n=this.create(We),r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)r=!0,n.addChild(this._parseCombinator());return r?this.finish(n):null}_parseDeclaration(e){let n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;let r=this.create(Se);return r.setProperty(this._parseProperty())?this.accept(p.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,x.PropertyValueExpected)):this.finish(r,x.ColonExpected,[p.Colon],e||[p.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(p.Ident,/^--/))return null;let n=this.create(ys);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,x.ColonExpected,[p.Colon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);let r=this.mark();if(this.peek(p.CurlyL)){let s=this.create(vs),o=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(s.setDeclarations(o)&&!o.isErroneous(!0)&&(s.addChild(this._parsePrio()),this.peek(p.SemiColon)))return this.finish(s),n.setPropertySet(s),n.semicolonPosition=this.token.offset,this.finish(n);this.restoreAtMark(r)}let i=this._parseExpr();return i&&!i.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],p.SemiColon,p.EOF))?(n.setValue(i),this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):(this.restoreAtMark(r),n.addChild(this._parseCustomPropertyValue(e)),n.addChild(this._parsePrio()),Ne(n.colonPosition)&&this.token.offset===n.colonPosition+1?this.finish(n,x.PropertyValueExpected):this.finish(n))}_parseCustomPropertyValue(e=[p.CurlyR]){let n=this.create(O),r=()=>s===0&&o===0&&a===0,i=()=>e.indexOf(this.token.type)!==-1,s=0,o=0,a=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(r())break e;break;case p.Exclamation:if(r())break e;break;case p.CurlyL:s++;break;case p.CurlyR:if(s--,s<0){if(i()&&o===0&&a===0)break e;return this.finish(n,x.LeftCurlyExpected)}break;case p.ParenthesisL:o++;break;case p.ParenthesisR:if(o--,o<0){if(i()&&a===0&&s===0)break e;return this.finish(n,x.LeftParenthesisExpected)}break;case p.BracketL:a++;break;case p.BracketR:if(a--,a<0)return this.finish(n,x.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:let l=x.RightCurlyExpected;return a>0?l=x.RightSquareBracketExpected:o>0&&(l=x.RightParenthesisExpected),this.finish(n,l)}this.consumeToken()}return this.finish(n)}_tryToParseDeclaration(e){let n=this.mark();return this._parseProperty()&&this.accept(p.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)}_parseProperty(){let e=this.create(Bt),n=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(n),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(p.Charset))return null;let e=this.create(O);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,x.SemiColonExpected):this.finish(e,x.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;let e=this.create(qt);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,x.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(p.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,x.IdentifierExpected,[p.SemiColon]);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(p.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(p.ParenthesisR))?this.finish(e,x.RightParenthesisExpected,[p.ParenthesisR],[]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;let e=this.create(Ns);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,x.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,x.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;let e=this.create(qn);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;let e=this.create(Es);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;let e=this.create(jn),n=this.create(O);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,x.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,x.IdentifierExpected,[p.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([ee.Keyframe])}_parseKeyframeSelector(){let e=this.create(qr),n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return null;for(;this.accept(p.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return this.finish(e,x.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){let e=this.create(qr),n=this.mark(),r=!1;if(e.addChild(this._parseIdent())&&(r=!0),this.accept(p.Percentage)&&(r=!0),!r)return null;for(;this.accept(p.Comma);)if(r=!1,e.addChild(this._parseIdent())&&(r=!0),this.accept(p.Percentage)&&(r=!0),!r)return this.restoreAtMark(n),null;return this.peek(p.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;let e=this.create(Ms);return this.consumeToken(),!this.peekRegExp(p.Ident,/^--/)||!e.setName(this._parseIdent([ee.Property]))?this.finish(e,x.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;let n=this.create(Ds);this.consumeToken();let r=this._parseLayerNameList();return r&&n.setNames(r),(!r||r.getChildren().length===1)&&this.peek(p.CurlyL)?this._parseBody(n,this._parseLayerDeclaration.bind(this,e)):this.accept(p.SemiColon)?this.finish(n):this.finish(n,x.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){let e=this.createNode(v.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,x.IdentifierExpected);return this.finish(e)}_parseLayerName(){let e=this.createNode(v.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,x.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;let n=this.create(fn);return this.consumeToken(),n.addChild(this._parseSupportsCondition()),this._parseBody(n,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){let e=this.create(Ct);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(p.Ident,/^(and|or)$/i)){let n=this.token.text.toLowerCase();for(;this.acceptIdent(n);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){let e=this.create(Ct);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,x.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,x.RightParenthesisExpected,[p.ParenthesisR],[]);if(this.peek(p.Ident)){let n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=1;for(;this.token.type!==p.EOF&&r!==0;)this.token.type===p.ParenthesisL?r++:this.token.type===p.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,x.LeftParenthesisExpected,[],[p.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;let n=this.create(jt);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,x.MediaQueryExpected)}_parseMediaQueryList(){let e=this.create(Hn);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,x.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,x.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){let e=this.create(Gn),n=this.mark();if(this.acceptIdent("not"),this.peek(p.ParenthesisL))this.restoreAtMark(n),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){let e=this.mark(),n=this.create($s);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(n):this.finish(n,x.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){let e=this.create(Ps);this.acceptIdent("not");let n=!0;for(;n;){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[],[p.CurlyL]);if(this.peek(p.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[],[p.CurlyL]);n=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){let e=[p.ParenthesisR],n=this.create(Ts);if(n.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,x.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,x.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,x.TermExpected,[],e)}}else if(n.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(n,x.OperatorExpected,[],e);if(!n.addChild(this._parseMediaFeatureName()))return this.finish(n,x.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,x.TermExpected,[],e)}else return this.finish(n,x.IdentifierExpected,[],e);return this.finish(n)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){let e=this.create(O);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;let e=this.create(Os);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,x.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(p.AtKeyword))return null;let e=this.create(Ws);return this.acceptOneKeyword(Ku)||this.markError(e,x.UnknownAtRule,[],[p.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(p.Ident)&&!this.peek(p.Colon))return null;let e=this.create(O);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,x.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;let e=this.create(As);return this.consumeToken(),this.resync([],[p.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;let n=this.create(zs);return this.consumeToken(),n.addChild(this._parseIdent()),n.addChild(this._parseContainerQuery()),this._parseBody(n,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){let e=this.create(O);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){let e=this.create(O);if(this.accept(p.ParenthesisL)){if(this.peekIdent("not")||this.peek(p.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[],[p.CurlyL])}else if(this.acceptIdent("style")){if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[],[p.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,x.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseStyleQuery(){let e=this.create(O);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(p.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([p.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){let e=this.create(O);if(this.accept(p.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,x.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(p.AtKeyword))return null;let e=this.create(Kn);e.addChild(this._parseUnknownAtRuleName());let n=()=>i===0&&s===0&&o===0,r=0,i=0,s=0,o=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(n())break e;break;case p.EOF:return i>0?this.finish(e,x.RightCurlyExpected):o>0?this.finish(e,x.RightSquareBracketExpected):s>0?this.finish(e,x.RightParenthesisExpected):this.finish(e);case p.CurlyL:r++,i++;break;case p.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),o>0)return this.finish(e,x.RightSquareBracketExpected);if(s>0)return this.finish(e,x.RightParenthesisExpected);break e}if(i<0){if(s===0&&o===0)break e;return this.finish(e,x.LeftCurlyExpected)}break;case p.ParenthesisL:s++;break;case p.ParenthesisR:if(s--,s<0)return this.finish(e,x.LeftParenthesisExpected);break;case p.BracketL:o++;break;case p.BracketR:if(o--,o<0)return this.finish(e,x.LeftSquareBracketExpected);break}this.consumeToken()}return e}_parseUnknownAtRuleName(){let e=this.create(O);return this.accept(p.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(p.Dashmatch)||this.peek(p.Includes)||this.peek(p.SubstringOperator)||this.peek(p.PrefixOperator)||this.peek(p.SuffixOperator)||this.peekDelim("=")){let e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}else return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;let e=this.create(O);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){let e=this.create(O);this.consumeToken();let n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=v.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){let e=this.create(O);return this.consumeToken(),e.type=v.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){let e=this.create(O);return this.consumeToken(),e.type=v.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){let e=this.create(O);this.consumeToken();let n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null}_parseSimpleSelector(){let e=this.create(Ue),n=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&n++;(n===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)n++;return n>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(v.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(p.Hash)&&!this.peekDelim("#"))return null;let e=this.createNode(v.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,x.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;let e=this.createNode(v.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,x.IdentifierExpected):this.finish(e)}_parseElementName(){let e=this.mark(),n=this.createNode(v.ElementNameSelector);return n.addChild(this._parseNamespacePrefix()),!n.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(n)}_parseNamespacePrefix(){let e=this.mark(),n=this.createNode(v.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(p.BracketL))return null;let e=this.create(Vs);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(p.BracketR)?this.finish(e):this.finish(e,x.RightSquareBracketExpected)):this.finish(e,x.IdentifierExpected)}_parsePseudo(){let e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let n=()=>{let i=this.create(O);if(!i.addChild(this._parseSelector(!0)))return null;for(;this.accept(p.Comma)&&i.addChild(this._parseSelector(!0)););return this.peek(p.ParenthesisR)?this.finish(i):null};if(!e.addChild(this.try(n))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(n)))return this.finish(e,x.SelectorExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(p.Colon))return null;let e=this.mark(),n=this.createNode(v.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(p.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,x.IdentifierExpected):this.finish(n))}_tryParsePrio(){let e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(p.Exclamation))return null;let e=this.createNode(v.Prio);return this.accept(p.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){let n=this.create(Jn);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(p.Comma)){if(e)return this.finish(n);this.consumeToken()}if(!n.addChild(this._parseBinaryExpr()))break}return this.finish(n)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;let e=this.create(bs);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(p.BracketL))return null;let e=this.createNode(v.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(p.BracketR)?this.finish(e):this.finish(e,x.RightSquareBracketExpected)}_parseBinaryExpr(e,n){let r=this.create(Ht);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(n||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,x.TermExpected);r=this.finish(r);let i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)}_parseTerm(){let e=this.create(Us);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;let e=this.create(O);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,x.RightParenthesisExpected)}_parseNumeric(){if(this.peek(p.Num)||this.peek(p.Percentage)||this.peek(p.Resolution)||this.peek(p.Length)||this.peek(p.EMS)||this.peek(p.EXS)||this.peek(p.Angle)||this.peek(p.Time)||this.peek(p.Dimension)||this.peek(p.ContainerQueryLength)||this.peek(p.Freq)){let e=this.create(bn);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(p.String)&&!this.peek(p.BadString))return null;let e=this.createNode(v.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(p.Ident,/^url(-prefix)?$/i))return null;let e=this.mark(),n=this.createNode(v.URILiteral);return this.accept(p.Ident),this.hasWhitespace()||!this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,x.RightParenthesisExpected))}_parseURLArgument(){let e=this.create(O);return!this.accept(p.String)&&!this.accept(p.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)}_parseIdent(e){if(!this.peek(p.Ident))return null;let n=this.create(ge);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(n)}_parseFunction(){let e=this.mark(),n=this.create(He);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)n.getArguments().addChild(this._parseFunctionArgument())||this.markError(n,x.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,x.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(p.Ident))return null;let e=this.create(ge);if(e.referenceTypes=[ee.Function],this.acceptIdent("progid")){if(this.accept(p.Colon))for(;this.accept(p.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){let e=this.create(Pe);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(p.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){let e=this.create(gn);return this.consumeToken(),this.finish(e)}else return null}};function Xu(t,e){let n=0,r=t.length;if(r===0)return 0;for(;ne+n||this.offset===e&&this.length===n?this.findInScope(e,n):null}findInScope(e,n=0){let r=e+n,i=Xu(this.children,o=>o.offset>r);if(i===0)return this;let s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+n?s.findInScope(e,n):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,n){for(let r=0;r/g,">")}function If(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;let n="";if(e?.documentation!==!1){t.status&&(n+=Yu(t.status)),n+=t.description;let r=Zu(t.browsers);r&&(n+=` +(`+r+")"),"syntax"in t&&(n+=` + +Syntax: ${t.syntax}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` + +`),n+=t.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),n}function Nf(t,e){if(!t.description||t.description==="")return"";let n="";if(e?.documentation!==!1){t.status&&(n+=Yu(t.status)),typeof t.description=="string"?n+=so(t.description):n+=t.description.kind===Ae.Markdown?t.description.value:so(t.description.value);let r=Zu(t.browsers);r&&(n+=` + +(`+so(r)+")"),"syntax"in t&&t.syntax&&(n+=` + +Syntax: ${so(t.syntax)}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` + +`),n+=t.references.map(r=>`[${r.name}](${r.url})`).join(" | ")),n}function Zu(t=[]){return t.length===0?null:t.map(e=>{let n="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in Qu&&(n+=Qu[i]),s&&(n+=" "+s),n}).join(", ")}var ep;(()=>{var t={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function o(l,c){for(var d,u="",m=0,f=-1,g=0,b=0;b<=l.length;++b){if(b2){var _=u.lastIndexOf("/");if(_!==u.length-1){_===-1?(u="",m=0):m=(u=u.slice(0,_)).length-1-u.lastIndexOf("/"),f=b,g=0;continue}}else if(u.length===2||u.length===1){u="",m=0,f=b,g=0;continue}}c&&(u.length>0?u+="/..":u="..",m=2)}else u.length>0?u+="/"+l.slice(f+1,b):u=l.slice(f+1,b),m=b-f-1;f=b,g=0}else d===46&&g!==-1?++g:g=-1}return u}var a={resolve:function(){for(var l,c="",d=!1,u=arguments.length-1;u>=-1&&!d;u--){var m;u>=0?m=arguments[u]:(l===void 0&&(l=process.cwd()),m=l),s(m),m.length!==0&&(c=m+"/"+c,d=m.charCodeAt(0)===47)}return c=o(c,!d),d?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(l){if(s(l),l.length===0)return".";var c=l.charCodeAt(0)===47,d=l.charCodeAt(l.length-1)===47;return(l=o(l,!c)).length!==0||c||(l="."),l.length>0&&d&&(l+="/"),c?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,c=0;c0&&(l===void 0?l=d:l+="/"+d)}return l===void 0?".":a.normalize(l)},relative:function(l,c){if(s(l),s(c),l===c||(l=a.resolve(l))===(c=a.resolve(c)))return"";for(var d=1;db){if(c.charCodeAt(f+F)===47)return c.slice(f+F+1);if(F===0)return c.slice(f+F)}else m>b&&(l.charCodeAt(d+F)===47?_=F:F===0&&(_=0));break}var L=l.charCodeAt(d+F);if(L!==c.charCodeAt(f+F))break;L===47&&(_=F)}var k="";for(F=d+_+1;F<=u;++F)F!==u&&l.charCodeAt(F)!==47||(k.length===0?k+="..":k+="/..");return k.length>0?k+c.slice(f+_):(f+=_,c.charCodeAt(f)===47&&++f,c.slice(f))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var c=l.charCodeAt(0),d=c===47,u=-1,m=!0,f=l.length-1;f>=1;--f)if((c=l.charCodeAt(f))===47){if(!m){u=f;break}}else m=!1;return u===-1?d?"/":".":d&&u===1?"//":l.slice(0,u)},basename:function(l,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');s(l);var d,u=0,m=-1,f=!0;if(c!==void 0&&c.length>0&&c.length<=l.length){if(c.length===l.length&&c===l)return"";var g=c.length-1,b=-1;for(d=l.length-1;d>=0;--d){var _=l.charCodeAt(d);if(_===47){if(!f){u=d+1;break}}else b===-1&&(f=!1,b=d+1),g>=0&&(_===c.charCodeAt(g)?--g==-1&&(m=d):(g=-1,m=b))}return u===m?m=b:m===-1&&(m=l.length),l.slice(u,m)}for(d=l.length-1;d>=0;--d)if(l.charCodeAt(d)===47){if(!f){u=d+1;break}}else m===-1&&(f=!1,m=d+1);return m===-1?"":l.slice(u,m)},extname:function(l){s(l);for(var c=-1,d=0,u=-1,m=!0,f=0,g=l.length-1;g>=0;--g){var b=l.charCodeAt(g);if(b!==47)u===-1&&(m=!1,u=g+1),b===46?c===-1?c=g:f!==1&&(f=1):c!==-1&&(f=-1);else if(!m){d=g+1;break}}return c===-1||u===-1||f===0||f===1&&c===u-1&&c===d+1?"":l.slice(c,u)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return(function(c,d){var u=d.dir||d.root,m=d.base||(d.name||"")+(d.ext||"");return u?u===d.root?u+m:u+"/"+m:m})(0,l)},parse:function(l){s(l);var c={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return c;var d,u=l.charCodeAt(0),m=u===47;m?(c.root="/",d=1):d=0;for(var f=-1,g=0,b=-1,_=!0,F=l.length-1,L=0;F>=d;--F)if((u=l.charCodeAt(F))!==47)b===-1&&(_=!1,b=F+1),u===46?f===-1?f=F:L!==1&&(L=1):f!==-1&&(L=-1);else if(!_){g=F+1;break}return f===-1||b===-1||L===0||L===1&&f===b-1&&f===g+1?b!==-1&&(c.base=c.name=g===0&&m?l.slice(1,b):l.slice(g,b)):(g===0&&m?(c.name=l.slice(1,f),c.base=l.slice(1,b)):(c.name=l.slice(g,f),c.base=l.slice(g,b)),c.ext=l.slice(f,b)),g>0?c.dir=l.slice(0,g-1):m&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,i.exports=a}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.d=(i,s)=>{for(var o in s)n.o(s,o)&&!n.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:s[o]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>m,Utils:()=>B}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//;function l(D,C){if(!D.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${D.authority}", path: "${D.path}", query: "${D.query}", fragment: "${D.fragment}"}`);if(D.scheme&&!s.test(D.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(D.path){if(D.authority){if(!o.test(D.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(D.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let c="",d="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static isUri(C){return C instanceof m||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,I,E,z,M,A=!1){typeof C=="object"?(this.scheme=C.scheme||c,this.authority=C.authority||c,this.path=C.path||c,this.query=C.query||c,this.fragment=C.fragment||c):(this.scheme=(function(V,q){return V||q?V:"file"})(C,A),this.authority=I||c,this.path=(function(V,q){switch(V){case"https":case"http":case"file":q?q[0]!==d&&(q=d+q):q=d}return q})(this.scheme,E||c),this.query=z||c,this.fragment=M||c,l(this,A))}get fsPath(){return L(this)}with(C){if(!C)return this;let{scheme:I,authority:E,path:z,query:M,fragment:A}=C;return I===void 0?I=this.scheme:I===null&&(I=c),E===void 0?E=this.authority:E===null&&(E=c),z===void 0?z=this.path:z===null&&(z=c),M===void 0?M=this.query:M===null&&(M=c),A===void 0?A=this.fragment:A===null&&(A=c),I===this.scheme&&E===this.authority&&z===this.path&&M===this.query&&A===this.fragment?this:new g(I,E,z,M,A)}static parse(C,I=!1){let E=u.exec(C);return E?new g(E[2]||c,$(E[4]||c),$(E[5]||c),$(E[7]||c),$(E[9]||c),I):new g(c,c,c,c,c)}static file(C){let I=c;if(i&&(C=C.replace(/\\/g,d)),C[0]===d&&C[1]===d){let E=C.indexOf(d,2);E===-1?(I=C.substring(2),C=d):(I=C.substring(2,E),C=C.substring(E)||d)}return new g("file",I,C,c,c)}static from(C){let I=new g(C.scheme,C.authority,C.path,C.query,C.fragment);return l(I,!0),I}toString(C=!1){return k(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof m)return C;{let I=new g(C);return I._formatted=C.external,I._fsPath=C._sep===f?C.fsPath:null,I}}return C}}let f=i?1:void 0;class g extends m{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=L(this)),this._fsPath}toString(C=!1){return C?k(this,!0):(this._formatted||(this._formatted=k(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=f),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let b={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _(D,C,I){let E,z=-1;for(let M=0;M=97&&A<=122||A>=65&&A<=90||A>=48&&A<=57||A===45||A===46||A===95||A===126||C&&A===47||I&&A===91||I&&A===93||I&&A===58)z!==-1&&(E+=encodeURIComponent(D.substring(z,M)),z=-1),E!==void 0&&(E+=D.charAt(M));else{E===void 0&&(E=D.substr(0,M));let V=b[A];V!==void 0?(z!==-1&&(E+=encodeURIComponent(D.substring(z,M)),z=-1),E+=V):z===-1&&(z=M)}}return z!==-1&&(E+=encodeURIComponent(D.substring(z))),E!==void 0?E:D}function F(D){let C;for(let I=0;I1&&D.scheme==="file"?`//${D.authority}${D.path}`:D.path.charCodeAt(0)===47&&(D.path.charCodeAt(1)>=65&&D.path.charCodeAt(1)<=90||D.path.charCodeAt(1)>=97&&D.path.charCodeAt(1)<=122)&&D.path.charCodeAt(2)===58?D.path[1].toLowerCase()+D.path.substr(2):D.path,i&&(I=I.replace(/\//g,"\\")),I}function k(D,C){let I=C?F:_,E="",{scheme:z,authority:M,path:A,query:V,fragment:q}=D;if(z&&(E+=z,E+=":"),(M||z==="file")&&(E+=d,E+=d),M){let Y=M.indexOf("@");if(Y!==-1){let ne=M.substr(0,Y);M=M.substr(Y+1),Y=ne.lastIndexOf(":"),Y===-1?E+=I(ne,!1,!1):(E+=I(ne.substr(0,Y),!1,!1),E+=":",E+=I(ne.substr(Y+1),!1,!0)),E+="@"}M=M.toLowerCase(),Y=M.lastIndexOf(":"),Y===-1?E+=I(M,!1,!0):(E+=I(M.substr(0,Y),!1,!0),E+=M.substr(Y))}if(A){if(A.length>=3&&A.charCodeAt(0)===47&&A.charCodeAt(2)===58){let Y=A.charCodeAt(1);Y>=65&&Y<=90&&(A=`/${String.fromCharCode(Y+32)}:${A.substr(3)}`)}else if(A.length>=2&&A.charCodeAt(1)===58){let Y=A.charCodeAt(0);Y>=65&&Y<=90&&(A=`${String.fromCharCode(Y+32)}:${A.substr(2)}`)}E+=I(A,!0,!1)}return V&&(E+="?",E+=I(V,!1,!1)),q&&(E+="#",E+=C?q:_(q,!1,!1)),E}function T(D){try{return decodeURIComponent(D)}catch{return D.length>3?D.substr(0,3)+T(D.substr(3)):D}}let W=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function $(D){return D.match(W)?D.replace(W,(C=>T(C))):D}var N=n(470);let R=N.posix||N,P="/";var B;(function(D){D.joinPath=function(C,...I){return C.with({path:R.join(C.path,...I)})},D.resolvePath=function(C,...I){let E=C.path,z=!1;E[0]!==P&&(E=P+E,z=!0);let M=R.resolve(E,...I);return z&&M[0]===P&&!C.authority&&(M=M.substring(1)),C.with({path:M})},D.dirname=function(C){if(C.path.length===0||C.path===P)return C;let I=R.dirname(C.path);return I.length===1&&I.charCodeAt(0)===46&&(I=""),C.with({path:I})},D.basename=function(C){return R.basename(C.path)},D.extname=function(C){return R.extname(C.path)}})(B||(B={}))})(),ep=r})();var{URI:ti,Utils:lt}=ep;function oo(t){return lt.dirname(ti.parse(t)).toString(!0)}function Qt(t,...e){return lt.joinPath(ti.parse(t),...e).toString(!0)}var lo=class{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,n){let r={items:[],isIncomplete:!1};for(let i of this.literalCompletions){let s=i.uriValue,o=Ml(s);if(o==="."||o==="..")r.isIncomplete=!0;else{let a=await this.providePathSuggestions(s,i.position,i.range,e,n);for(let l of a)r.items.push(l)}}for(let i of this.importCompletions){let s=i.pathValue,o=Ml(s);if(o==="."||o==="..")r.isIncomplete=!0;else{let a=await this.providePathSuggestions(s,i.position,i.range,e,n);e.languageId==="scss"&&a.forEach(l=>{he(l.label,"_")&&gs(l.label,".scss")&&(l.textEdit?l.textEdit.newText=l.label.slice(1,-5):l.label=l.label.slice(1,-5))});for(let l of a)r.items.push(l)}}return r}async providePathSuggestions(e,n,r,i,s){let o=Ml(e),a=he(e,"'")||he(e,'"'),l=a?o.slice(0,n.character-(r.start.character+1)):o.slice(0,n.character-r.start.character),c=i.uri,d=a?zf(r,1,-1):r,u=Mf(l,o,d),m=l.substring(0,l.lastIndexOf("/")+1),f=s.resolveReference(m||".",c);if(f)try{let g=[],b=await this.readDirectory(f);for(let[_,F]of b)_.charCodeAt(0)!==Df&&(F===Kt.Directory||Qt(f,_)!==c)&&g.push(Af(_,F===Kt.Directory,u));return g}catch{}return[]}},Df=46;function Ml(t){return he(t,"'")||he(t,'"')?t.slice(1,-1):t}function Mf(t,e,n){let r,i=t.lastIndexOf("/");if(i===-1)r=n;else{let s=e.slice(i+1),o=co(n.end,-s.length),a=s.indexOf(" "),l;a!==-1?l=co(o,a):l=n.end,r=Q.create(o,l)}return r}function Af(t,e,n){return e?(t=t+"/",{label:ao(t),kind:H.Folder,textEdit:K.replace(n,ao(t)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:ao(t),kind:H.File,textEdit:K.replace(n,ao(t))}}function ao(t){return t.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function co(t,e){return be.create(t.line,t.character+e)}function zf(t,e,n){let r=co(t.start,e),i=co(t.end,n);return Q.create(r,i)}var Ft=Ee.Snippet,tp={title:"Suggest",command:"editor.action.triggerSuggest"},ct;(function(t){t.Enums=" ",t.Normal="d",t.VendorPrefixed="x",t.Term="y",t.Variable="z"})(ct||(ct={}));var Yt=class{constructor(e=null,n,r){this.variablePrefix=e,this.lsOptions=n,this.cssDataManager=r,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new yn(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,n,r,i,s=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,n,r,s);let o=new lo(this.lsOptions.fileSystemProvider.readDirectory),a=this.completionParticipants;this.completionParticipants=[o].concat(a);let l=this.doComplete(e,n,r,s);try{let c=await o.computeCompletions(e,i);return{isIncomplete:l.isIncomplete||c.isIncomplete,itemDefaults:l.itemDefaults,items:c.items.concat(l.items)}}finally{this.completionParticipants=a}}doComplete(e,n,r,i){this.offset=e.offsetAt(n),this.position=n,this.currentWord=Tf(e,this.offset),this.defaultReplaceRange=Q.create(be.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=r,this.documentSettings=i;try{let s={isIncomplete:!1,itemDefaults:{editRange:{start:{line:n.line,character:n.character-this.currentWord.length},end:n}},items:[]};this.nodePath=Qn(this.styleSheet,this.offset);for(let o=this.nodePath.length-1;o>=0;o--){let a=this.nodePath[o];if(a instanceof Bt)this.getCompletionsForDeclarationProperty(a.getParent(),s);else if(a instanceof Jn)a.parent instanceof wn?this.getVariableProposals(null,s):this.getCompletionsForExpression(a,s);else if(a instanceof Ue){let l=a.findAParent(v.ExtendsReference,v.Ruleset);if(l)if(l.type===v.ExtendsReference)this.getCompletionsForExtendsReference(l,a,s);else{let c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(a instanceof Pe)this.getCompletionsForFunctionArgument(a,a.getParent(),s);else if(a instanceof mn)this.getCompletionsForDeclarations(a,s);else if(a instanceof it)this.getCompletionsForVariableDeclaration(a,s);else if(a instanceof ze)this.getCompletionsForRuleSet(a,s);else if(a instanceof wn)this.getCompletionsForInterpolation(a,s);else if(a instanceof St)this.getCompletionsForFunctionDeclaration(a,s);else if(a instanceof _t)this.getCompletionsForMixinReference(a,s);else if(a instanceof He)this.getCompletionsForFunctionArgument(null,a,s);else if(a instanceof fn)this.getCompletionsForSupports(a,s);else if(a instanceof Ct)this.getCompletionsForSupportsCondition(a,s);else if(a instanceof st)this.getCompletionsForExtendsReference(a,null,s);else if(a.type===v.URILiteral)this.getCompletionForUriLiteralValue(a,s);else if(a.parent===null)this.getCompletionForTopLevel(s);else if(a.type===v.StringLiteral&&this.isImportPathParent(a.parent.type))this.getCompletionForImportPath(a,s);else continue;if(s.items.length>0||this.offset>a.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===v.Import}finalize(e){return e}findInNodePath(...e){for(let n=this.nodePath.length-1;n>=0;n--){let r=this.nodePath[n];if(e.indexOf(r.type)!==-1)return r}return null}getCompletionsForDeclarationProperty(e,n){return this.getPropertyProposals(e,n)}getPropertyProposals(e,n){let r=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(o=>{let a,l,c=!1;e?(a=this.getCompletionRange(e.getProperty()),l=o.name,Ne(e.colonPosition)||(l+=": ",c=!0)):(a=this.getCompletionRange(null),l=o.name+": ",c=!0),!e&&i&&(l+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(a.end)&&(l+="$0;");let d={label:o.name,documentation:at(o,this.doesSupportMarkdown()),tags:ni(o)?[Et.Deprecated]:[],textEdit:K.replace(a,l),insertTextFormat:Ee.Snippet,kind:H.Property};o.restrictions||(c=!1),r&&c&&(d.command=tp);let m=(255-(typeof o.relevance=="number"?Math.min(Math.max(o.relevance,0),99):50)).toString(16),f=he(o.name,"-")?ct.VendorPrefixed:ct.Normal;d.sortText=f+"_"+m,n.items.push(d)}),this.completionParticipants.forEach(o=>{o.onCssProperty&&o.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),n}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,n){let r=e.getFullPropertyName(),i=this.cssDataManager.getProperty(r),s=e.getValue()||null;for(;s&&s.hasChildren();)s=s.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(o=>{o.onCssPropertyValue&&o.onCssPropertyValue({propertyName:r,propertyValue:this.currentWord,range:this.getCompletionRange(s)})}),i){if(i.restrictions)for(let o of i.restrictions)switch(o){case"color":this.getColorProposals(i,s,n);break;case"position":this.getPositionProposals(i,s,n);break;case"repeat":this.getRepeatStyleProposals(i,s,n);break;case"line-style":this.getLineStyleProposals(i,s,n);break;case"line-width":this.getLineWidthProposals(i,s,n);break;case"geometry-box":this.getGeometryBoxProposals(i,s,n);break;case"box":this.getBoxProposals(i,s,n);break;case"image":this.getImageProposals(i,s,n);break;case"timing-function":this.getTimingFunctionProposals(i,s,n);break;case"shape":this.getBasicShapeProposals(i,s,n);break}this.getValueEnumProposals(i,s,n),this.getCSSWideKeywordProposals(i,s,n),this.getUnitProposals(i,s,n)}else{let o=Pf(this.styleSheet,e);for(let a of o.getEntries())n.items.push({label:a,textEdit:K.replace(this.getCompletionRange(s),a),kind:H.Value})}return this.getVariableProposals(s,n),this.getTermProposals(i,s,n),n}getValueEnumProposals(e,n,r){if(e.values)for(let i of e.values){let s=i.name,o;if(gs(s,")")){let c=s.lastIndexOf("(");c!==-1&&(s=s.substring(0,c+1)+"$1"+s.substring(c+1),o=Ft)}let a=ct.Enums;he(i.name,"-")&&(a+=ct.VendorPrefixed);let l={label:i.name,documentation:at(i,this.doesSupportMarkdown()),tags:ni(e)?[Et.Deprecated]:[],textEdit:K.replace(this.getCompletionRange(n),s),sortText:a,kind:H.Value,insertTextFormat:o};r.items.push(l)}return r}getCSSWideKeywordProposals(e,n,r){for(let i in kl)r.items.push({label:i,documentation:kl[i],textEdit:K.replace(this.getCompletionRange(n),i),kind:H.Value});for(let i in El){let s=ir(i);r.items.push({label:i,documentation:El[i],textEdit:K.replace(this.getCompletionRange(n),s),kind:H.Function,insertTextFormat:Ft,command:he(i,"var")?tp:void 0})}return r}getCompletionsForInterpolation(e,n){return this.offset>=e.offset+2&&this.getVariableProposals(null,n),n}getVariableProposals(e,n){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,ee.Variable);for(let i of r){let s=he(i.name,"--")?`var(${i.name})`:i.name,o={label:i.name,documentation:i.value?qa(i.value):i.value,textEdit:K.replace(this.getCompletionRange(e),s),kind:H.Variable,sortText:ct.Variable};if(typeof o.documentation=="string"&&wl(o.documentation)&&(o.kind=H.Color),i.node.type===v.FunctionParameter){let a=i.node.getParent();a.type===v.MixinDeclaration&&(o.detail=w("argument from '{0}'",a.getName()))}n.items.push(o)}return n}getVariableProposalsForCSSVarFunction(e){let n=new ri;this.styleSheet.acceptVisitor(new zl(n,this.offset));let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,ee.Variable);for(let i of r){if(he(i.name,"--")){let s={label:i.name,documentation:i.value?qa(i.value):i.value,textEdit:K.replace(this.getCompletionRange(null),i.name),kind:H.Variable};typeof s.documentation=="string"&&wl(s.documentation)&&(s.kind=H.Color),e.items.push(s)}n.remove(i.name)}for(let i of n.getEntries())if(he(i,"--")){let s={label:i,textEdit:K.replace(this.getCompletionRange(null),i),kind:H.Variable};e.items.push(s)}return e}getUnitProposals(e,n,r){let i="0";if(this.currentWord.length>0){let s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(n&&n.parent&&n.parent.type===v.Term&&(n=n.getParent()),e.restrictions)for(let s of e.restrictions){let o=ro[s];if(o)for(let a of o){let l=i+a;r.items.push({label:l,textEdit:K.replace(this.getCompletionRange(n),l),kind:H.Unit})}}return r}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){let n=e.end!==-1?this.textDocument.positionAt(e.end):this.position,r=this.textDocument.positionAt(e.offset);if(r.line===n.line)return Q.create(r,n)}return this.defaultReplaceRange}getColorProposals(e,n,r){for(let s in Yr)r.items.push({label:s,documentation:Yr[s],textEdit:K.replace(this.getCompletionRange(n),s),kind:H.Color});for(let s in no)r.items.push({label:s,documentation:no[s],textEdit:K.replace(this.getCompletionRange(n),s),kind:H.Value});let i=new ri;this.styleSheet.acceptVisitor(new Al(i,this.offset));for(let s of i.getEntries())r.items.push({label:s,textEdit:K.replace(this.getCompletionRange(n),s),kind:H.Color});for(let s of Vu)r.items.push({label:s.label,detail:s.func,documentation:s.desc,textEdit:K.replace(this.getCompletionRange(n),s.insertText),insertTextFormat:Ft,kind:H.Function});return r}getPositionProposals(e,n,r){for(let i in yl)r.items.push({label:i,documentation:yl[i],textEdit:K.replace(this.getCompletionRange(n),i),kind:H.Value});return r}getRepeatStyleProposals(e,n,r){for(let i in xl)r.items.push({label:i,documentation:xl[i],textEdit:K.replace(this.getCompletionRange(n),i),kind:H.Value});return r}getLineStyleProposals(e,n,r){for(let i in Sl)r.items.push({label:i,documentation:Sl[i],textEdit:K.replace(this.getCompletionRange(n),i),kind:H.Value});return r}getLineWidthProposals(e,n,r){for(let i of Hu)r.items.push({label:i,textEdit:K.replace(this.getCompletionRange(n),i),kind:H.Value});return r}getGeometryBoxProposals(e,n,r){for(let i in _l)r.items.push({label:i,documentation:_l[i],textEdit:K.replace(this.getCompletionRange(n),i),kind:H.Value});return r}getBoxProposals(e,n,r){for(let i in Cl)r.items.push({label:i,documentation:Cl[i],textEdit:K.replace(this.getCompletionRange(n),i),kind:H.Value});return r}getImageProposals(e,n,r){for(let i in Fl){let s=ir(i);r.items.push({label:i,documentation:Fl[i],textEdit:K.replace(this.getCompletionRange(n),s),kind:H.Function,insertTextFormat:i!==s?Ft:void 0})}return r}getTimingFunctionProposals(e,n,r){for(let i in Rl){let s=ir(i);r.items.push({label:i,documentation:Rl[i],textEdit:K.replace(this.getCompletionRange(n),s),kind:H.Function,insertTextFormat:i!==s?Ft:void 0})}return r}getBasicShapeProposals(e,n,r){for(let i in Ll){let s=ir(i);r.items.push({label:i,documentation:Ll[i],textEdit:K.replace(this.getCompletionRange(n),s),kind:H.Function,insertTextFormat:i!==s?Ft:void 0})}return r}getCompletionsForStylesheet(e){let n=this.styleSheet.findFirstChildBeforeOffset(this.offset);return n?n instanceof ze?this.getCompletionsForRuleSet(n,e):n instanceof fn?this.getCompletionsForSupports(n,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(n=>{e.items.push({label:n.name,textEdit:K.replace(this.getCompletionRange(null),n.name),documentation:at(n,this.doesSupportMarkdown()),tags:ni(n)?[Et.Deprecated]:[],kind:H.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,n){let r=e.getDeclarations();return r&&r.endsWith("}")&&this.offset>=r.end?this.getCompletionForTopLevel(n):!r||this.offset<=r.offset?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)}getCompletionsForSelector(e,n,r){let i=this.findInNodePath(v.PseudoSelector,v.IdentifierSelector,v.ClassSelector,v.ElementNameSelector);if(!i&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=Q.create(be.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(c=>{let d=ir(c.name),u={label:c.name,textEdit:K.replace(this.getCompletionRange(i),d),documentation:at(c,this.doesSupportMarkdown()),tags:ni(c)?[Et.Deprecated]:[],kind:H.Function,insertTextFormat:c.name!==d?Ft:void 0};he(c.name,":-")&&(u.sortText=ct.VendorPrefixed),r.items.push(u)}),this.cssDataManager.getPseudoElements().forEach(c=>{let d=ir(c.name),u={label:c.name,textEdit:K.replace(this.getCompletionRange(i),d),documentation:at(c,this.doesSupportMarkdown()),tags:ni(c)?[Et.Deprecated]:[],kind:H.Function,insertTextFormat:c.name!==d?Ft:void 0};he(c.name,"::-")&&(u.sortText=ct.VendorPrefixed),r.items.push(u)}),!n){for(let c of Gu)r.items.push({label:c,textEdit:K.replace(this.getCompletionRange(i),c),kind:H.Keyword});for(let c of Ju)r.items.push({label:c,textEdit:K.replace(this.getCompletionRange(i),c),kind:H.Keyword})}let a={};a[this.currentWord]=!0;let l=this.textDocument.getText();if(this.styleSheet.accept(c=>{if(c.type===v.SimpleSelector&&c.length>0){let d=l.substr(c.offset,c.length);return d.charAt(0)==="."&&!a[d]&&(a[d]=!0,r.items.push({label:d,textEdit:K.replace(this.getCompletionRange(i),d),kind:H.Keyword})),!1}return!0}),e&&e.isNested()){let c=e.getSelectors().findFirstChildBeforeOffset(this.offset);c&&e.getSelectors().getChildren().indexOf(c)===0&&this.getPropertyProposals(null,r)}return r}getCompletionsForDeclarations(e,n){if(!e||this.offset===e.offset)return n;let r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,n);if(r instanceof Bn){let i=r;if(!Ne(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,n);if(Ne(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,n),n}getCompletionsForExpression(e,n){let r=e.getParent();if(r instanceof Pe)return this.getCompletionsForFunctionArgument(r,r.getParent(),n),n;let i=e.findParent(v.Declaration);if(!i)return this.getTermProposals(void 0,null,n),n;let s=e.findChildAtOffset(this.offset,!0);return s?s instanceof bn||s instanceof ge?this.getCompletionsForDeclarationValue(i,n):n:this.getCompletionsForDeclarationValue(i,n)}getCompletionsForFunctionArgument(e,n,r){let i=n.getIdentifier();return i&&i.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r}getCompletionsForFunctionDeclaration(e,n){let r=e.getDeclarations();return r&&this.offset>r.offset&&this.offset{s.onCssMixinReference&&s.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})}),n}getTermProposals(e,n,r){let i=this.getSymbolContext().findSymbolsAtOffset(this.offset,ee.Function);for(let s of i)s.node instanceof St&&r.items.push(this.makeTermProposal(s,s.node.getParameters(),n));return r}makeTermProposal(e,n,r){e.node;let i=n.getChildren().map(o=>o instanceof rt?o.getName():o.getText()),s=e.name+"("+i.map((o,a)=>"${"+(a+1)+":"+o+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+i.join(", ")+")",textEdit:K.replace(this.getCompletionRange(r),s),insertTextFormat:Ft,kind:H.Function,sortText:ct.Term}}getCompletionsForSupportsCondition(e,n){let r=e.findFirstChildBeforeOffset(this.offset);if(r){if(r instanceof Se)return!Ne(r.colonPosition)||this.offset<=r.colonPosition?this.getCompletionsForDeclarationProperty(r,n):this.getCompletionsForDeclarationValue(r,n);if(r instanceof Ct)return this.getCompletionsForSupportsCondition(r,n)}return Ne(e.lParent)&&this.offset>e.lParent&&(!Ne(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n}getCompletionsForSupports(e,n){let r=e.getDeclarations();if(!r||this.offset<=r.offset){let s=e.findFirstChildBeforeOffset(this.offset);return s instanceof Ct?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)}getCompletionsForExtendsReference(e,n,r){return r}getCompletionForUriLiteralValue(e,n){let r,i,s;if(e.hasChildren()){let o=e.getChild(0);r=o.getText(),i=this.position,s=this.getCompletionRange(o)}else{r="",i=this.position;let o=this.textDocument.positionAt(e.offset+4);s=Q.create(o,o)}return this.completionParticipants.forEach(o=>{o.onCssURILiteralValue&&o.onCssURILiteralValue({uriValue:r,position:i,range:s})}),n}getCompletionForImportPath(e,n){return this.completionParticipants.forEach(r=>{r.onCssImportPath&&r.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),n}hasCharacterAtPosition(e,n){let r=this.textDocument.getText();return e>=0&&e=0&&` +\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}var si=class t{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(let n of this.attributes)if(n.name===e)return n.value}return null}addChild(e){e instanceof t&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){let n=this.attributes[this.attributes.length-1];n.value=n.value+e}}prepend(e){if(this.attributes){let n=this.attributes[0];n.value=e+n.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof Zt);)e=e.parent;return e}removeChild(e){if(this.children){let n=this.children.indexOf(e);if(n!==-1)return this.children.splice(n,1),!0}return!1}addAttr(e,n){this.attributes||(this.attributes=[]);for(let r of this.attributes)if(r.name===e){r.value+=" "+n;return}this.attributes.push({name:e,value:n})}clone(e=!0){let n=new t;if(this.attributes){n.attributes=[];for(let r of this.attributes)n.addAttr(r.name,r.value)}if(e&&this.children){n.children=[];for(let r=0;r"),this.writeLine(n,i.join(""))}},Rt;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){let i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(Rt||(Rt={}));var ii=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function np(t,e){let n=new si;for(let r of t.getChildren())switch(r.type){case v.SelectorCombinator:if(e){let a=r.getText().split("&");if(a.length===1){n.addAttr("name",a[0]);break}n=e.cloneWithParent(),a[0]&&n.findRoot().prepend(a[0]);for(let l=1;l1){let c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(a[l])}}break;case v.SelectorPlaceholder:if(r.matches("@at-root"))return n;case v.ElementNameSelector:let i=r.getText();n.addAttr("name",i==="*"?"element":Ve(i));break;case v.ClassSelector:n.addAttr("class",Ve(r.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Ve(r.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",r.getName());break;case v.PseudoSelector:n.addAttr(Ve(r.getText()),"");break;case v.AttributeSelector:let s=r,o=s.getIdentifier();if(o){let a=s.getValue(),l=s.getOperator(),c;if(a&&l)switch(Ve(l.getText())){case"|=":c=`${Rt.remove(Ve(a.getText()))}-\u2026`;break;case"^=":c=`${Rt.remove(Ve(a.getText()))}\u2026`;break;case"$=":c=`\u2026${Rt.remove(Ve(a.getText()))}`;break;case"~=":c=` \u2026 ${Rt.remove(Ve(a.getText()))} \u2026 `;break;case"*=":c=`\u2026${Rt.remove(Ve(a.getText()))}\u2026`;break;default:c=Rt.remove(Ve(a.getText()));break}n.addAttr(Ve(o.getText()),c)}break}return n}function Ve(t){let e=new Oe;e.setSource(t);let n=e.scanUnquotedString();return n?n.text:t}var uo=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,n){let r=Wf(e);if(r){let i=new ho('"').print(r,n);return i.push(this.selectorToSpecificityMarkedString(e)),i}else return[]}simpleSelectorToMarkedString(e){let n=np(e),r=new ho('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){let n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1}selectorToSpecificityMarkedString(e){let n=s=>{let o=new ii,a=new ii;for(let l of s)for(let c of l.getChildren()){let d=r(c);if(d.id>a.id){a=d;continue}else if(d.ida.attr){a=d;continue}else if(d.attra.tag){a=d;continue}}return o.id+=a.id,o.attr+=a.attr,o.tag+=a.tag,o},r=s=>{let o=new ii;e:for(let a of s.getChildren()){switch(a.type){case v.IdentifierSelector:o.id++;break;case v.ClassSelector:case v.AttributeSelector:o.attr++;break;case v.ElementNameSelector:if(a.matches("*"))break;o.tag++;break;case v.PseudoSelector:let l=a.getText(),c=a.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&c.length>0){o.tag++;let d=n(c);o.id+=d.id,o.attr+=d.attr,o.tag+=d.tag;continue e}o.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&c.length>0){let d=n(c);o.id+=d.id,o.attr+=d.attr,o.tag+=d.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&c.length>0){o.attr++;let d=n(c);o.id+=d.id,o.attr+=d.attr,o.tag+=d.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&c.length>0){if(o.attr++,c.length===3&&c[1].type===23){let g=n(c[2].getChildren());o.id+=g.id,o.attr+=g.attr,o.tag+=g.tag;continue e}let d=new ot,u=c[1].getText();d.scanner.setSource(u);let m=d.scanner.scan(),f=d.scanner.scan();if(m.text==="n"||m.text==="-n"&&f.text==="of"){let g=[],_=u.slice(f.offset+2).split(",");for(let L of _){let k=d.internalParse(L,d._parseSelector);k&&g.push(k)}let F=n(g);o.id+=F.id,o.attr+=F.attr,o.tag+=F.tag;continue e}continue e}o.attr++;continue e}if(a.getChildren().length>0){let l=r(a);o.id+=l.id,o.attr+=l.attr,o.tag+=l.tag}}return o},i=r(e);return`[${w("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}},Pl=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let n=null;if(!(this.element instanceof Zt)&&e.getChildren().some(r=>r.hasChildren()&&r.getChild(0).type===v.SelectorCombinator)){let r=this.element.findRoot();r.parent instanceof Zt&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(let r of e.getChildren()){if(r instanceof Ue){if(this.prev instanceof Ue){let o=new oi("\u2026");this.element.addChild(o),this.element=o}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new oi("\u22EE"));let i=np(r,n),s=i.findRoot();this.element.addChild(s),this.element=i}(r instanceof Ue||r.type===v.SelectorCombinatorParent||r.type===v.SelectorCombinatorShadowPiercingDescendant||r.type===v.SelectorCombinatorSibling||r.type===v.SelectorCombinatorAllSiblings)&&(this.prev=r)}}};function Of(t){switch(t.type){case v.MixinDeclaration:case v.Stylesheet:return!0}return!1}function Wf(t){if(t.matches("@at-root"))return null;let e=new Zt,n=[],r=t.getParent();if(r instanceof ze){let s=r.getParent();for(;s&&!Of(s);){if(s instanceof ze){if(s.getSelectors().matches("@at-root"))break;n.push(s)}s=s.getParent()}}let i=new Pl(e);for(let s=n.length-1;s>=0;s--){let o=n[s].getSelectors().getChild(0);o&&i.processSelector(o)}return i.processSelector(t),e}var sr=class{constructor(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new uo(n)}configure(e){this.defaultSettings=e}doHover(e,n,r,i=this.defaultSettings){function s(d){return Q.create(e.positionAt(d.offset),e.positionAt(d.end))}let o=e.offsetAt(n),a=Qn(r,o),l=null,c;for(let d=0;dtypeof n=="string"?n:n.value):e.value}doesSupportMarkdown(){if(!Ne(this.supportsMarkdown)){if(!Ne(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;let e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&e.contentFormat.indexOf(Ae.Markdown)!==-1}return this.supportsMarkdown}};var rp=/^\w+:\/\//,ip=/^data:/,Sn=class{constructor(e,n){this.fileSystemProvider=e,this.resolveModuleReferences=n}configure(e){this.defaultSettings=e}findDefinition(e,n,r){let i=new yn(r),s=e.offsetAt(n),o=Ks(r,s);if(!o)return null;let a=i.findSymbolFromNode(o);return a?{uri:e.uri,range:Lt(a.node,e)}:null}findReferences(e,n,r){return this.findDocumentHighlights(e,n,r).map(s=>({uri:e.uri,range:s.range}))}getHighlightNode(e,n,r){let i=e.offsetAt(n),s=Ks(r,i);if(!(!s||s.type===v.Stylesheet||s.type===v.Declarations))return s.type===v.Identifier&&s.parent&&s.parent.type===v.ClassSelector&&(s=s.parent),s}findDocumentHighlights(e,n,r){let i=[],s=this.getHighlightNode(e,n,r);if(!s)return i;let o=new yn(r),a=o.findSymbolFromNode(s),l=s.getText();return r.accept(c=>{if(a){if(o.matchesSymbol(c,a))return i.push({kind:op(c),range:Lt(c,e)}),!1}else s&&s.type===c.type&&c.matches(l)&&i.push({kind:op(c),range:Lt(c,e)});return!0}),i}isRawStringDocumentLinkNode(e){return e.type===v.Import}findDocumentLinks(e,n,r){let i=this.findUnresolvedLinks(e,n),s=[];for(let o of i){let a=o.link,l=a.target;if(!(!l||ip.test(l)))if(rp.test(l))s.push(a);else{let c=r.resolveReference(l,e.uri);c&&(a.target=c),s.push(a)}}return s}async findDocumentLinks2(e,n,r){let i=this.findUnresolvedLinks(e,n),s=[];for(let o of i){let a=o.link,l=a.target;if(!(!l||ip.test(l)))if(rp.test(l))s.push(a);else{let c=await this.resolveReference(l,e.uri,r,o.isRawLink);c!==void 0&&(a.target=c,s.push(a))}}return s}findUnresolvedLinks(e,n){let r=[],i=s=>{let o=s.getText(),a=Lt(s,e);if(a.start.line===a.end.line&&a.start.character===a.end.character)return;(he(o,"'")||he(o,'"'))&&(o=o.slice(1,-1));let l=s.parent?this.isRawStringDocumentLinkNode(s.parent):!1;r.push({link:{target:o,range:a},isRawLink:l})};return n.accept(s=>{if(s.type===v.URILiteral){let o=s.getChild(0);return o&&i(o),!1}if(s.parent&&this.isRawStringDocumentLinkNode(s.parent)){let o=s.getText();return(he(o,"'")||he(o,'"'))&&i(s),!1}return!0}),r}findSymbolInformations(e,n){let r=[],i=(s,o,a)=>{let l=a instanceof O?Lt(a,e):a,c={name:s||w(""),kind:o,location:vn.create(e.uri,l)};r.push(c)};return this.collectDocumentSymbols(e,n,i),r}findDocumentSymbols(e,n){let r=[],i=[],s=(o,a,l,c,d)=>{let u=l instanceof O?Lt(l,e):l,m=c instanceof O?Lt(c,e):c;(!m||!sp(u,m))&&(m=Q.create(u.start,u.start));let f={name:o||w(""),kind:a,range:u,selectionRange:m},g=i.pop();for(;g&&!sp(g[1],u);)g=i.pop();if(g){let b=g[0];b.children||(b.children=[]),b.children.push(f),i.push(g)}else r.push(f);d&&i.push([f,Lt(d,e)])};return this.collectDocumentSymbols(e,n,s),r}collectDocumentSymbols(e,n,r){n.accept(i=>{if(i instanceof ze){for(let s of i.getSelectors().getChildren())if(s instanceof We){let o=Q.create(e.positionAt(s.offset),e.positionAt(i.end));r(s.getText(),Je.Class,o,s,i.getDeclarations())}}else if(i instanceof it)r(i.getName(),Je.Variable,i,i.getVariable(),void 0);else if(i instanceof Ge)r(i.getName(),Je.Method,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof St)r(i.getName(),Je.Function,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof jn){let s=w("@keyframes {0}",i.getName());r(s,Je.Class,i,i.getIdentifier(),i.getDeclarations())}else if(i instanceof qn){let s=w("@font-face");r(s,Je.Class,i,void 0,i.getDeclarations())}else if(i instanceof jt){let s=i.getChild(0);if(s instanceof Hn){let o="@media "+s.getText();r(o,Je.Module,i,s,i.getDeclarations())}}return!0})}findDocumentColors(e,n){let r=[];return n.accept(i=>{let s=Uf(i,e);return s&&r.push(s),!0}),r}getColorPresentations(e,n,r,i){let s=[],o=Math.round(r.red*255),a=Math.round(r.green*255),l=Math.round(r.blue*255),c;r.alpha===1?c=`rgb(${o}, ${a}, ${l})`:c=`rgba(${o}, ${a}, ${l}, ${r.alpha})`,s.push({label:c,textEdit:K.replace(i,c)}),r.alpha===1?c=`#${xn(o)}${xn(a)}${xn(l)}`:c=`#${xn(o)}${xn(a)}${xn(l)}${xn(Math.round(r.alpha*255))}`,s.push({label:c,textEdit:K.replace(i,c)});let d=vl(r);d.a===1?c=`hsl(${d.h}, ${Math.round(d.s*100)}%, ${Math.round(d.l*100)}%)`:c=`hsla(${d.h}, ${Math.round(d.s*100)}%, ${Math.round(d.l*100)}%, ${d.a})`,s.push({label:c,textEdit:K.replace(i,c)});let u=qu(r);return u.a===1?c=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}%)`:c=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}% / ${u.a})`,s.push({label:c,textEdit:K.replace(i,c)}),s}prepareRename(e,n,r){let i=this.getHighlightNode(e,n,r);if(i)return Q.create(e.positionAt(i.offset),e.positionAt(i.end))}doRename(e,n,r,i){let o=this.findDocumentHighlights(e,n,i).map(a=>K.replace(a.range,r));return{changes:{[e.uri]:o}}}async resolveModuleReference(e,n,r){if(he(n,"file://")){let i=Vf(e);if(i&&i!=="."&&i!==".."){let s=r.resolveReference("/",n),o=oo(n),a=await this.resolvePathToModule(i,o,s);if(a){let l=e.substring(i.length+1);return Qt(a,l)}}}}async mapReference(e,n){return e}async resolveReference(e,n,r,i=!1,s=this.defaultSettings){if(e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,n,r),i);let o=await this.mapReference(r.resolveReference(e,n),i);if(this.resolveModuleReferences){if(o&&await this.fileExists(o))return o;let a=await this.mapReference(await this.resolveModuleReference(e,n,r),i);if(a)return a}if(o&&!await this.fileExists(o)){let a=r.resolveReference("/",n);if(s&&a){if(e in s)return this.mapReference(Qt(a,s[e]),i);let l=e.indexOf("/"),c=`${e.substring(0,l)}/`;if(c in s){let d=s[c].slice(0,-1),u=Qt(a,d);return this.mapReference(u=Qt(u,e.substring(c.length-1)),i)}}}return o}async resolvePathToModule(e,n,r){let i=Qt(n,"node_modules",e,"package.json");if(await this.fileExists(i))return oo(i);if(r&&n.startsWith(r)&&n.length!==r.length)return this.resolvePathToModule(e,oo(n),r)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{let n=await this.fileSystemProvider.stat(e);return!(n.type===Kt.Unknown&&n.size===-1)}catch{return!1}}};function Uf(t,e){let n=ju(t);if(n){let r=Lt(t,e);return{color:n,range:r}}return null}function Lt(t,e){return Q.create(e.positionAt(t.offset),e.positionAt(t.end))}function sp(t,e){let n=e.start.line,r=e.end.line,i=t.start.line,s=t.end.line;return!(ns||r>s||n===i&&e.start.charactert.end.character)}function op(t){if(t.type===v.Selector)return Jt.Write;if(t instanceof ge&&t.parent&&t.parent instanceof Bt&&t.isCustomProperty)return Jt.Write;if(t.parent)switch(t.parent.type){case v.FunctionDeclaration:case v.MixinDeclaration:case v.Keyframe:case v.VariableDeclaration:case v.FunctionParameter:return Jt.Write}return Jt.Read}function xn(t){let e=t.toString(16);return e.length!==2?"0"+e:e}function Vf(t){let e=t.indexOf("/");if(e===-1)return"";if(t[0]==="@"){let n=t.indexOf("/",e+1);return n===-1?t:t.substring(0,n)}return t.substring(0,e)}var or=ke.Warning,ap=ke.Error,Ke=ke.Ignore,me=class{constructor(e,n,r){this.id=e,this.message=n,this.defaultValue=r}},Tl=class{constructor(e,n,r){this.id=e,this.message=n,this.defaultValue=r}},ie={AllVendorPrefixes:new me("compatibleVendorPrefixes",w("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Ke),IncludeStandardPropertyWhenUsingVendorPrefix:new me("vendorPrefix",w("When using a vendor-specific prefix also include the standard property"),or),DuplicateDeclarations:new me("duplicateProperties",w("Do not use duplicate style definitions"),Ke),EmptyRuleSet:new me("emptyRules",w("Do not use empty rulesets"),or),ImportStatemement:new me("importStatement",w("Import statements do not load in parallel"),Ke),BewareOfBoxModelSize:new me("boxModel",w("Do not use width or height when using padding or border"),Ke),UniversalSelector:new me("universalSelector",w("The universal selector (*) is known to be slow"),Ke),ZeroWithUnit:new me("zeroUnits",w("No unit for zero needed"),Ke),RequiredPropertiesForFontFace:new me("fontFaceProperties",w("@font-face rule must define 'src' and 'font-family' properties"),or),HexColorLength:new me("hexColorLength",w("Hex colors must consist of three, four, six or eight hex numbers"),ap),ArgsInColorFunction:new me("argumentsInColorFunction",w("Invalid number of parameters"),ap),UnknownProperty:new me("unknownProperties",w("Unknown property."),or),UnknownAtRules:new me("unknownAtRules",w("Unknown at-rule."),or),IEStarHack:new me("ieHack",w("IE hacks are only necessary when supporting IE7 and older"),Ke),UnknownVendorSpecificProperty:new me("unknownVendorSpecificProperties",w("Unknown vendor specific property."),Ke),PropertyIgnoredDueToDisplay:new me("propertyIgnoredDueToDisplay",w("Property is ignored due to the display."),or),AvoidImportant:new me("important",w("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Ke),AvoidFloat:new me("float",w("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Ke),AvoidIdSelector:new me("idSelector",w("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Ke)},lp={ValidProperties:new Tl("validProperties",w("A list of properties that are not validated against the `unknownProperties` rule."),[])},po=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){let n=$f(this.conf[e.id]);if(n)return n}return e.defaultValue}getSetting(e){return this.conf[e.id]}};function $f(t){switch(t){case"ignore":return ke.Ignore;case"warning":return ke.Warning;case"error":return ke.Error}return null}var ar=class{constructor(e){this.cssDataManager=e}doCodeActions(e,n,r,i){return this.doCodeActions2(e,n,r,i).map(s=>{let o=s.edit&&s.edit.documentChanges&&s.edit.documentChanges[0];return kt.create(s.title,"_css.applyCodeAction",e.uri,e.version,o&&o.edits)})}doCodeActions2(e,n,r,i){let s=[];if(r.diagnostics)for(let o of r.diagnostics)this.appendFixesForMarker(e,i,o,s);return s}getFixesForUnknownProperty(e,n,r,i){let s=n.getName(),o=[];this.cssDataManager.getProperties().forEach(l=>{let c=tu(s,l.name);c>=s.length/2&&o.push({property:l.name,score:c})}),o.sort((l,c)=>c.score-l.score||l.property.localeCompare(c.property));let a=3;for(let l of o){let c=l.property,d=w("Rename to '{0}'",c),u=K.replace(r.range,c),m=Gr.create(e.uri,e.version),f={documentChanges:[er.create(m,[u])]},g=Xr.create(d,f,Kr.QuickFix);if(g.diagnostics=[r],i.push(g),--a<=0)return}}appendFixesForMarker(e,n,r,i){if(r.code!==ie.UnknownProperty.id)return;let s=e.offsetAt(r.range.start),o=e.offsetAt(r.range.end),a=Qn(n,s);for(let l=a.length-1;l>=0;l--){let c=a[l];if(c instanceof Se){let d=c.getProperty();if(d&&d.offset===s&&d.end===o){this.getFixesForUnknownProperty(e,d,r,i);return}}}}};var mo=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}};function ai(t,e,n,r){let i=t[e];i.value=n,n&&(Il(i.properties,r)||i.properties.push(r))}function Bf(t,e,n){ai(t,"top",e,n),ai(t,"right",e,n),ai(t,"bottom",e,n),ai(t,"left",e,n)}function Fe(t,e,n,r){e==="top"||e==="right"||e==="bottom"||e==="left"?ai(t,e,n,r):Bf(t,n,r)}function Ol(t,e,n){switch(e.length){case 1:Fe(t,void 0,e[0],n);break;case 2:Fe(t,"top",e[0],n),Fe(t,"bottom",e[0],n),Fe(t,"right",e[1],n),Fe(t,"left",e[1],n);break;case 3:Fe(t,"top",e[0],n),Fe(t,"right",e[1],n),Fe(t,"left",e[1],n),Fe(t,"bottom",e[2],n);break;case 4:Fe(t,"top",e[0],n),Fe(t,"right",e[1],n),Fe(t,"bottom",e[2],n),Fe(t,"left",e[3],n);break}}function Wl(t,e){for(let n of e)if(t.matches(n))return!0;return!1}function li(t,e=!0){return e&&Wl(t,["initial","unset"])?!1:parseFloat(t.getText())!==0}function cp(t,e=!0){return t.map(n=>li(n,e))}function fo(t,e=!0){return!(Wl(t,["none","hidden"])||e&&Wl(t,["initial","unset"]))}function qf(t,e=!0){return t.map(n=>fo(n,e))}function jf(t){let e=t.getChildren();if(e.length===1){let n=e[0];return li(n)&&fo(n)}for(let n of e){let r=n;if(!li(r,!1)||!fo(r,!1))return!1}return!0}function hp(t){let e={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(let n of t){let r=n.node.value;if(!(typeof r>"u"))switch(n.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=n;break;case"height":e.height=n;break;default:let i=n.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:Fe(e,i[1],jf(r),n);break;case"width":Fe(e,i[1],li(r,!1),n);break;case"style":Fe(e,i[1],fo(r,!0),n);break}break;case"width":Ol(e,cp(r.getChildren(),!1),n);break;case"style":Ol(e,qf(r.getChildren(),!0),n);break}break;case"padding":i.length===1?Ol(e,cp(r.getChildren(),!0),n):Fe(e,i[1],li(r,!0),n);break}break}}return e}var go=class{constructor(){this.data={}}add(e,n,r){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(n),r&&i.nodes.push(r)}},ci=class t{static entries(e,n,r,i,s){let o=new t(n,r,i);return e.acceptVisitor(o),o.completeValidations(),o.getEntries(s)}constructor(e,n,r){this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new go,this.validProperties={};let i=n.getSetting(lp.ValidProperties);Array.isArray(i)&&i.forEach(s=>{if(typeof s=="string"){let o=s.trim().toLowerCase();o.length&&(this.validProperties[o]=!0)}})}isValidPropertyDeclaration(e){let n=e.fullPropertyName;return this.validProperties[n]}fetch(e,n){let r=[];for(let i of e)i.fullPropertyName===n&&r.push(i);return r}fetchWithValue(e,n,r){let i=[];for(let s of e)if(s.fullPropertyName===n){let o=s.node.getValue();o&&this.findValueInExpression(o,r)&&i.push(s)}return i}findValueInExpression(e,n){let r=!1;return e.accept(i=>(i.type===v.Identifier&&i.matches(n)&&(r=!0),!r)),r}getEntries(e=ke.Warning|ke.Error){return this.warnings.filter(n=>(n.getLevel()&e)!==0)}addEntry(e,n,r){let i=new Xn(e,n,this.settings.getRule(n),r);this.warnings.push(i)}getMissingNames(e,n){let r=e.slice(0);for(let s=0;s0){let l=this.fetch(r,"float");for(let c=0;c0){let l=this.fetch(r,"vertical-align");for(let c=0;c1)for(let m=0;mW.startsWith(T))&&g.delete(L)}}let b=[];for(let F=0,L=t.prefixes.length;Fs instanceof Ht?(i+=1,!1):!0),i!==r&&this.addEntry(e,ie.ArgsInColorFunction)),!0}};ci.prefixes=["-ms-","-moz-","-o-","-webkit-"];var lr=class{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,n,r=this.settings){if(r&&r.validate===!1)return[];let i=[];i.push.apply(i,Js.entries(n)),i.push.apply(i,ci.entries(n,e,new po(r&&r.lint),this.cssDataManager));let s=[];for(let a in ie)s.push(ie[a].id);function o(a){let l=Q.create(e.positionAt(a.getOffset()),e.positionAt(a.getOffset()+a.getLength())),c=e.languageId;return{code:a.getRule().id,source:c,message:a.getMessage(),severity:a.getLevel()===ke.Warning?Yn.Warning:Yn.Error,range:l}}return i.filter(a=>a.getLevel()!==ke.Ignore).map(o)}};var dp=47,Hf=10,Gf=13,Jf=12,Kf=36,Xf=35,Qf=123,hi=61,Yf=33,Zf=60,e1=62,Ul=46,It=p.CustomToken,bo=It++,hr=It++;It++;var Vl=It++,$l=It++,wo=It++,vo=It++,di=It++;It++;var cr=class extends Oe{scanNext(e){if(this.stream.advanceIfChar(Kf)){let n=["$"];if(this.ident(n))return this.finishToken(e,bo,n.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([Xf,Qf])?this.finishToken(e,hr):this.stream.advanceIfChars([hi,hi])?this.finishToken(e,Vl):this.stream.advanceIfChars([Yf,hi])?this.finishToken(e,$l):this.stream.advanceIfChar(Zf)?this.stream.advanceIfChar(hi)?this.finishToken(e,vo):this.finishToken(e,p.Delim):this.stream.advanceIfChar(e1)?this.stream.advanceIfChar(hi)?this.finishToken(e,wo):this.finishToken(e,p.Delim):this.stream.advanceIfChars([Ul,Ul,Ul])?this.finishToken(e,di):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([dp,dp])?(this.stream.advanceWhileChar(e=>{switch(e){case Hf:case Gf:case Jf:return!1;default:return!0}}),!0):!1}};var ui=class{constructor(e,n){this.id=e,this.message=n}},yo={FromExpected:new ui("scss-fromexpected",w("'from' expected")),ThroughOrToExpected:new ui("scss-throughexpected",w("'through' or 'to' expected")),InExpected:new ui("scss-fromexpected",w("'in' expected"))};var xo=class extends ot{constructor(){super(new cr)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;let e=this.create(qt);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,x.URIOrStringExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,x.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(bo))return null;let n=this.create(it);if(!n.setVariable(this._parseVariable()))return null;if(!this.accept(p.Colon))return this.finish(n,x.ColonExpected);if(this.prevToken&&(n.colonPosition=this.prevToken.offset),!n.setValue(this._parseExpr()))return this.finish(n,x.VariableValueExpected,[],e);for(;this.peek(p.Exclamation);)if(!n.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(p.Ident,/^(default|global)$/))return this.finish(n,x.UnknownKeyword);this.consumeToken()}return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(vo)||this.accept(wo)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(bo))return null;let e=this.create(Gt);return this.consumeToken(),e}_parseModuleMember(){let e=this.mark(),n=this.create(jr);return n.setIdentifier(this._parseIdent([ee.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):n.addChild(this._parseVariable()||this._parseFunction())?n:this.finish(n,x.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(p.Ident)&&!this.peek(hr)&&!this.peekDelim("-"))return null;let n=this.create(ge);n.referenceTypes=e,n.isCustomProperty=this.peekRegExp(p.Ident,/^--/);let r=!1,i=()=>{let s=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(s),null):this._parseInterpolation()};for(;(this.accept(p.Ident)||n.addChild(i())||r&&this.acceptRegexp(/^[\w-]/))&&(r=!0,!this.hasWhitespace()););return r?this.finish(n):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(hr)){let e=this.create(wn);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(p.CurlyR)?this.finish(e):this.finish(e,x.ExpressionExpected):this.accept(p.CurlyR)?this.finish(e):this.finish(e,x.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(Vl)||this.peek($l)||this.peek(wo)||this.peek(vo)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){let e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){let e=this.create(O);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){let n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;let r=this.create(Se);if(!r.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(r,x.ColonExpected,[p.Colon],e||[p.SemiColon]);this.prevToken&&(r.colonPosition=this.prevToken.offset);let i=!1;if(r.setValue(this._parseExpr())&&(i=!0,r.addChild(this._parsePrio())),this.peek(p.CurlyL))r.setNestedProperties(this._parseNestedProperties());else if(!i)return this.finish(r,x.PropertyValueExpected);return this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)}_parseNestedProperties(){let e=this.create(Br);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){let e=this.create(st);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,x.SelectorExpected);for(;this.accept(p.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,x.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){let e=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword("@at-root")){let e=this.createNode(v.SelectorPlaceholder);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,x.IdentifierExpected);if(!this.accept(p.Colon))return this.finish(e,x.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,x.IdentifierExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.CurlyR])}return this.finish(e)}return null}_parseElementName(){let e=this.mark(),n=super._parseElementName();return n&&!this.hasWhitespace()&&this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):n}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;let e=this.createNode(v.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(p.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){let n=this.create(xs);if(this.consumeToken(),!n.setExpression(this._parseExpr(!0)))return this.finish(n,x.ExpressionExpected);if(this._parseBody(n,e),this.acceptKeyword("@else")){if(this.peekIdent("if"))n.setElseClause(this._internalParseIfStatement(e));else if(this.peek(p.CurlyL)){let r=this.create(ks);this._parseBody(r,e),n.setElseClause(r)}}return this.finish(n)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;let n=this.create(Ss);return this.consumeToken(),n.setVariable(this._parseVariable())?this.acceptIdent("from")?n.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(n,yo.ThroughOrToExpected,[p.CurlyR]):n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,x.ExpressionExpected,[p.CurlyR]):this.finish(n,x.ExpressionExpected,[p.CurlyR]):this.finish(n,yo.FromExpected,[p.CurlyR]):this.finish(n,x.VariableNameExpected,[p.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;let n=this.create(Cs);this.consumeToken();let r=n.getVariables();if(!r.addChild(this._parseVariable()))return this.finish(n,x.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!r.addChild(this._parseVariable()))return this.finish(n,x.VariableNameExpected,[p.CurlyR]);return this.finish(r),this.acceptIdent("in")?n.addChild(this._parseExpr())?this._parseBody(n,e):this.finish(n,x.ExpressionExpected,[p.CurlyR]):this.finish(n,yo.InExpected,[p.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;let n=this.create(_s);return this.consumeToken(),n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,x.ExpressionExpected,[p.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;let e=this.create(St);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([ee.Function])))return this.finish(e,x.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[p.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,x.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,x.RightParenthesisExpected,[p.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;let e=this.createNode(v.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,x.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;let e=this.create(Ge);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([ee.Mixin])))return this.finish(e,x.IdentifierExpected,[p.CurlyR]);if(this.accept(p.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,x.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){let e=this.create(rt);return e.setIdentifier(this._parseVariable())?(this.accept(di),this.accept(p.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,x.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;let e=this.create(Bs);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,x.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;let e=this.create(_t);this.consumeToken();let n=this._parseIdent([ee.Mixin]);if(!e.setIdentifier(n))return this.finish(e,x.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){let r=this._parseIdent([ee.Mixin]);if(!r)return this.finish(e,x.IdentifierExpected,[p.CurlyR]);let i=this.create(jr);n.referenceTypes=[ee.Module],i.setIdentifier(n),e.setIdentifier(r),e.addChild(i)}if(this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,x.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){let e=this.create(qs);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[p.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,x.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.CurlyL])}return this.peek(p.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){let e=this.create(Pe),n=this.mark(),r=this._parseVariable();if(r)if(this.accept(p.Colon))e.setIdentifier(r);else{if(this.accept(di))return e.setValue(r),this.finish(e);this.restoreAtMark(n)}return e.setValue(this._parseExpr(!0))?(this.accept(di),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){let e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);let r=this.create(O);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;let e=this.create(O);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,x.RightParenthesisExpected)}_parseListElement(){let e=this.create(js),n=this._parseBinaryExpr();if(!n)return null;if(this.accept(p.Colon)){if(e.setKey(n),!e.setValue(this._parseBinaryExpr()))return this.finish(e,x.ExpressionExpected)}else e.setValue(n);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;let e=this.create(Fs);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,x.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(e,x.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([ee.Module]))&&!this.acceptDelim("*"))return this.finish(e,x.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,x.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,x.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,x.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){let e=this.create(Rs);return e.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,x.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,x.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;let e=this.create(Ls);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,x.StringLiteralExpected);if(this.acceptIdent("as")){let n=this._parseIdent([ee.Forward]);if(!e.setIdentifier(n))return this.finish(e,x.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,x.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,x.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,x.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,x.IdentifierOrVariableExpected);return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,x.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){let e=this.create(Is);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(p.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}};var Nt=w("Sass documentation"),Xe=class t extends Yt{constructor(e,n){super("$",e,n),up(t.scssModuleLoaders),up(t.scssModuleBuiltIns)}isImportPathParent(e){return e===v.Forward||e===v.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,n){let r=e.getParent().type;if(r===v.Forward||r===v.Use)for(let i of t.scssModuleBuiltIns){let s={label:i.label,documentation:i.documentation,textEdit:K.replace(this.getCompletionRange(e),`'${i.label}'`),kind:H.Module};n.items.push(s)}return super.getCompletionForImportPath(e,n)}createReplaceFunction(){let e=1;return(n,r)=>"\\"+r+": ${"+e+++":"+(t.variableDefaults[r]||"")+"}"}createFunctionProposals(e,n,r,i){for(let s of e){let o=s.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),l={label:s.func.substr(0,s.func.indexOf("(")),detail:s.func,documentation:s.desc,textEdit:K.replace(this.getCompletionRange(n),o),insertTextFormat:Ee.Snippet,kind:H.Function};r&&(l.sortText="z"),i.items.push(l)}return i}getCompletionsForSelector(e,n,r){return this.createFunctionProposals(t.selectorFuncs,null,!0,r),super.getCompletionsForSelector(e,n,r)}getTermProposals(e,n,r){let i=t.builtInFuncs;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(e,n,r)}getColorProposals(e,n,r){return this.createFunctionProposals(t.colorProposals,n,!1,r),super.getColorProposals(e,n,r)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionForAtDirectives(n),this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}getCompletionsForExtendsReference(e,n,r){let i=this.getSymbolContext().findSymbolsAtOffset(this.offset,ee.Rule);for(let s of i){let o={label:s.name,textEdit:K.replace(this.getCompletionRange(n),s.name),kind:H.Function};r.items.push(o)}return r}getCompletionForAtDirectives(e){return e.items.push(...t.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...t.scssModuleLoaders),e}};Xe.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"};Xe.colorProposals=[{func:"red($color)",desc:w("Gets the red component of a color.")},{func:"green($color)",desc:w("Gets the green component of a color.")},{func:"blue($color)",desc:w("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:w("Mixes two colors together.")},{func:"hue($color)",desc:w("Gets the hue component of a color.")},{func:"saturation($color)",desc:w("Gets the saturation component of a color.")},{func:"lightness($color)",desc:w("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:w("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:w("Makes a color lighter.")},{func:"darken($color, $amount)",desc:w("Makes a color darker.")},{func:"saturate($color, $amount)",desc:w("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:w("Makes a color less saturated.")},{func:"grayscale($color)",desc:w("Converts a color to grayscale.")},{func:"complement($color)",desc:w("Returns the complement of a color.")},{func:"invert($color)",desc:w("Returns the inverse of a color.")},{func:"alpha($color)",desc:w("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:w("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:w("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:w("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:w("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:w("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:w("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:w("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:w("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:w("Converts a color into the format understood by IE filters.")}];Xe.selectorFuncs=[{func:"selector-nest($selectors\u2026)",desc:w("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors\u2026)",desc:w("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:w("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:w("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:w("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:w("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:w("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:w("Parses a selector into the format returned by &.")}];Xe.builtInFuncs=[{func:"unquote($string)",desc:w("Removes quotes from a string.")},{func:"quote($string)",desc:w("Adds quotes to a string.")},{func:"str-length($string)",desc:w("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:w("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:w("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:w("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:w("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:w("Converts a string to lower case.")},{func:"percentage($number)",desc:w("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:w("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:w("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:w("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:w("Returns the absolute value of a number.")},{func:"min($numbers)",desc:w("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:w("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:w("Returns a random number.")},{func:"length($list)",desc:w("Returns the length of a list.")},{func:"nth($list, $n)",desc:w("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:w("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:w("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:w("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:w("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:w("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:w("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:w("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:w("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:w("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:w("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:w("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:w("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:w("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:w("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:w("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:w("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:w("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:w("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:w("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:w("Returns the type of a value.")},{func:"unit($number)",desc:w("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:w("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:w("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args\u2026)",desc:w("Dynamically calls a Sass function.")}];Xe.scssAtDirectives=[{label:"@extend",documentation:w("Inherits the styles of another selector."),kind:H.Keyword},{label:"@at-root",documentation:w("Causes one or more rules to be emitted at the root of the document."),kind:H.Keyword},{label:"@debug",documentation:w("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:H.Keyword},{label:"@warn",documentation:w("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:H.Keyword},{label:"@error",documentation:w("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:H.Keyword},{label:"@if",documentation:w("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { + $0 +}`,insertTextFormat:Ee.Snippet,kind:H.Keyword},{label:"@for",documentation:w("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:Ee.Snippet,kind:H.Keyword},{label:"@each",documentation:w("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:Ee.Snippet,kind:H.Keyword},{label:"@while",documentation:w("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} { + $0 +}`,insertTextFormat:Ee.Snippet,kind:H.Keyword},{label:"@mixin",documentation:w("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} { + $0 +}`,insertTextFormat:Ee.Snippet,kind:H.Keyword},{label:"@include",documentation:w("Includes the styles defined by another mixin into the current rule."),kind:H.Keyword},{label:"@function",documentation:w("Defines complex operations that can be re-used throughout stylesheets."),kind:H.Keyword}];Xe.scssModuleLoaders=[{label:"@use",documentation:w("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:Nt,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Ee.Snippet,kind:H.Keyword},{label:"@forward",documentation:w("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:Nt,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Ee.Snippet,kind:H.Keyword}];Xe.scssModuleBuiltIns=[{label:"sass:math",documentation:w("Provides functions that operate on numbers."),references:[{name:Nt,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:w("Makes it easy to combine, search, or split apart strings."),references:[{name:Nt,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:w("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:Nt,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:w("Lets you access and modify values in lists."),references:[{name:Nt,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:w("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:Nt,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:w("Provides access to Sass\u2019s powerful selector engine."),references:[{name:Nt,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:w("Exposes the details of Sass\u2019s inner workings."),references:[{name:Nt,url:"https://sass-lang.com/documentation/modules/meta"}]}];function up(t){t.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){let n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=` + +`,n.value+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | "),e.documentation=n}})}var pp=47,t1=10,n1=13,r1=12,Bl=96,ql=46,i1=p.CustomToken,So=i1++,dr=class extends Oe{scanNext(e){let n=this.escapedJavaScript();return n!==null?this.finishToken(e,n):this.stream.advanceIfChars([ql,ql,ql])?this.finishToken(e,So):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([pp,pp])?(this.stream.advanceWhileChar(e=>{switch(e){case t1:case n1:case r1:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===Bl?(this.stream.advance(1),this.stream.advanceWhileChar(n=>n!==Bl),this.stream.advanceIfChar(Bl)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}};var Co=class extends ot{constructor(){super(new dr)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;let e=this.create(qt);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(e,x.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,x.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;let e=this.createNode(v.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(e):this.finish(e,x.SemiColonExpected):this.finish(e,x.StringLiteralExpected)}_parseMediaQuery(){let e=super._parseMediaQuery();if(!e){let n=this.create(Gn);return n.addChild(this._parseVariable())?this.finish(n):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){let n=this.create(it),r=this.mark();if(!n.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseDetachedRuleSet()))n.needsSemicolon=!1;else if(!n.setValue(this._parseExpr()))return this.finish(n,x.VariableValueExpected,[],e);n.addChild(this._parsePrio())}else return this.restoreAtMark(r),null;return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=this.create(Ge);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,x.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(p.CurlyL))return null;let n=this.create(se);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let n=!1;for(;this.peek(p.BracketL)&&(n=!0),!!e.addChild(this._parseLookupValue());)n=!1;return!n}_parseLookupValue(){let e=this.create(O),n=this.mark();return this.accept(p.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?e:(this.restoreAtMark(n),null):(this.restoreAtMark(n),null)}_parseVariable(e=!1,n=!1){let r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(p.AtKeyword))return null;let i=this.create(Gt),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(s),null):!n&&this.peek(p.BracketL)&&!this._addLookupChildren(i)?(this.restoreAtMark(s),null):i}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){let e=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){let e=this.createNode(v.EscapedValue);return this.consumeToken(),this.accept(p.String)||this.accept(p.EscapedJavaScript)?this.finish(e):this.finish(e,x.TermExpected)}return null}_parseOperator(){let e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){let e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),e}else if(this.peekDelim("=")){let e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("<"),e}else if(this.peekDelim("<")){let e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([ee.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){let n=this.create(We),r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());){r=!0;let i=this.mark();if(n.addChild(this._parseGuard())&&this.peek(p.CurlyL))break;this.restoreAtMark(i),n.addChild(this._parseCombinator())}return r?this.finish(n):null}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;let e=this.createNode(v.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){let n=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,n))return null;let r=this.mark(),i=this.create(ge);i.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let s=!1;return e?i.isCustomProperty?s=i.addChild(this._parseIdent()):s=i.addChild(this._parseRegexp(n)):i.isCustomProperty?s=this._acceptInterpolatedIdent(i):s=this._acceptInterpolatedIdent(i,n),s?(!e&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(i)):(this.restoreAtMark(r),null)}peekInterpolatedIdent(){return this.peek(p.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,n){let r=!1,i=()=>{let o=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(o),null):this._parseInterpolation()},s=n?()=>this.acceptRegexp(n):()=>this.accept(p.Ident);for(;(s()||e.addChild(this._parseInterpolation()||this.try(i)))&&(r=!0,!this.hasWhitespace()););return r}_parseInterpolation(){let e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){let n=this.createNode(v.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.CurlyL)?(this.restoreAtMark(e),null):n.addChild(this._parseIdent())?this.accept(p.CurlyR)?this.finish(n):this.finish(n,x.RightCurlyExpected):this.finish(n,x.IdentifierExpected)}return null}_tryParseMixinDeclaration(){let e=this.mark(),n=this.create(Ge);if(!n.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)n.getParameters().addChild(this._parseMixinParameter())||this.markError(n,x.IdentifierExpected,[],[p.ParenthesisR]);return this.accept(p.ParenthesisR)?(n.setGuard(this._parseGuard()),this.peek(p.CurlyL)?this._parseBody(n,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(ge),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))e=this.create(ge),this.consumeToken();else return null;return e.referenceTypes=[ee.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(p.Colon))return null;let e=this.mark(),n=this.create(st);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(n):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;let e=this.mark(),n=this.create(st);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(e),null):this._completeExtends(n)}_completeExtends(e){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected);let n=e.getSelectors();if(!n.addChild(this._parseSelector(!0)))return this.finish(e,x.SelectorExpected);for(;this.accept(p.Comma);)if(!n.addChild(this._parseSelector(!0)))return this.finish(e,x.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,x.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(p.AtKeyword))return null;let e=this.mark(),n=this.create(_t);return n.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(p.ParenthesisL))?(this.restoreAtMark(e),null):this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,x.RightParenthesisExpected)}_tryParseMixinReference(e=!0){let n=this.mark(),r=this.create(_t),i=this._parseMixinDeclarationIdentifier();for(;i;){this.acceptDelim(">");let o=this._parseMixinDeclarationIdentifier();if(o)r.getNamespaces().addChild(i),i=o;else break}if(!r.setIdentifier(i))return this.restoreAtMark(n),null;let s=!1;if(this.accept(p.ParenthesisL)){if(s=!0,r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,x.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(r,x.RightParenthesisExpected);i.referenceTypes=[ee.Mixin]}else i.referenceTypes=[ee.Mixin,ee.Rule];return this.peek(p.BracketL)?e||this._addLookupChildren(r):r.addChild(this._parsePrio()),!s&&!this.peek(p.SemiColon)&&!this.peek(p.CurlyR)&&!this.peek(p.EOF)?(this.restoreAtMark(n),null):this.finish(r)}_parseMixinArgument(){let e=this.create(Pe),n=this.mark(),r=this._parseVariable();return r&&(this.accept(p.Colon)?e.setIdentifier(r):this.restoreAtMark(n)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(n),null)}_parseMixinParameter(){let e=this.create(rt);if(this.peekKeyword("@rest")){let r=this.create(O);return this.consumeToken(),this.accept(So)?(e.setIdentifier(this.finish(r)),this.finish(e)):this.finish(e,x.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek(So)){let r=this.create(O);return this.consumeToken(),e.setIdentifier(this.finish(r)),this.finish(e)}let n=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(p.Colon),n=!0),!e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!n?null:this.finish(e)}_parseGuard(){if(!this.peekIdent("when"))return null;let e=this.create(Hs);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,x.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,x.ConditionExpected);return this.finish(e)}_parseGuardCondition(){let e=this.create(Gs);return e.isNegated=this.acceptIdent("not"),this.accept(p.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,x.RightParenthesisExpected)):e.isNegated?this.finish(e,x.LeftParenthesisExpected):null}_parseFunction(){let e=this.mark(),n=this.create(He);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,x.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,x.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){let e=this.create(ge);return e.referenceTypes=[ee.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){let e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);let r=this.create(O);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n}};var ur=class t extends Yt{constructor(e,n){super("@",e,n)}createFunctionProposals(e,n,r,i){for(let s of e){let o={label:s.name,detail:s.example,documentation:s.description,textEdit:K.replace(this.getCompletionRange(n),s.name+"($0)"),insertTextFormat:Ee.Snippet,kind:H.Function};r&&(o.sortText="z"),i.items.push(o)}return i}getTermProposals(e,n,r){let i=t.builtInProposals;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(e,n,r)}getColorProposals(e,n,r){return this.createFunctionProposals(t.colorProposals,n,!1,r),super.getColorProposals(e,n,r)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}};ur.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:w("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:w('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:w("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:w("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:w("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:w("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:w("URL encodes a string")},{name:"e",example:"e(@string);",description:w("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:w("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:w("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:w("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:w("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:w("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:w("absolute value of a number"),example:"abs(number);"},{name:"acos",description:w("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:w("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:w("rounds up to an integer")},{name:"cos",description:w("cosine function"),example:"cos(number);"},{name:"floor",description:w("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:w("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:w("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:w("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:w("sine function"),example:"sin(number);"},{name:"tan",description:w("tangent function"),example:"tan(number);"},{name:"atan",description:w("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:w("returns pi"),example:"pi();"},{name:"pow",description:w("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:w("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:w("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:w("returns the lowest of one or more values"),example:"max(@x, @y);"}];ur.colorProposals=[{name:"argb",example:"argb(@color);",description:w("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:w("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:w("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:w("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:w("creates a color")},{name:"hue",example:"hue(@color);",description:w("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:w("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:w("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:w("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:w("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:w("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:w("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:w("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:w("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:w("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:w("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:w("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:w("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:w("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:w("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:w("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:w("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:w("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:w("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:w("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:w("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:w("return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}];function fp(t,e){let n=s1(t);return o1(n,e)}function s1(t){function e(d){return t.positionAt(d.offset).line}function n(d){return t.positionAt(d.offset+d.len).line}function r(){switch(t.languageId){case"scss":return new cr;case"less":return new dr;default:return new Oe}}function i(d,u){let m=e(d),f=n(d);return m!==f?{startLine:m,endLine:f,kind:u}:null}let s=[],o=[],a=r();a.ignoreComment=!1,a.setSource(t.getText());let l=a.scan(),c=null;for(;l.type!==p.EOF;){switch(l.type){case p.CurlyL:case hr:{o.push({line:e(l),type:"brace",isStart:!0});break}case p.CurlyR:{if(o.length!==0){let d=mp(o,"brace");if(!d)break;let u=n(l);d.type==="brace"&&(c&&n(c)!==u&&u--,d.line!==u&&s.push({startLine:d.line,endLine:u,kind:void 0}))}break}case p.Comment:{let d=f=>f==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1},m=(f=>{let g=f.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(g)return d(g[1]);if(t.languageId==="scss"||t.languageId==="less"){let b=f.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(b)return d(b[1])}return null})(l);if(m)if(m.isStart)o.push(m);else{let f=mp(o,"comment");if(!f)break;f.type==="comment"&&f.line!==m.line&&s.push({startLine:f.line,endLine:m.line,kind:"region"})}else{let f=i(l,"comment");f&&s.push(f)}break}}c=l,l=a.scan()}return s}function mp(t,e){if(t.length===0)return null;for(let n=t.length-1;n>=0;n--)if(t[n].type===e&&t[n].isStart)return t.splice(n,1)[0];return null}function o1(t,e){let n=e&&e.rangeLimit||Number.MAX_VALUE,r=t.sort((o,a)=>{let l=o.startLine-a.startLine;return l===0&&(l=o.endLine-a.endLine),l}),i=[],s=-1;return r.forEach(o=>{o.startLine=0;c--)if(this.__items[c].match(l))return!0;return!1},s.prototype.set_indent=function(l,c){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(l){this.__items.push(l);var c=l.lastIndexOf(` +`);c!==-1?this.__character_count=l.length-c:this.__character_count+=l.length},s.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function o(l,c){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),c=c||"",l.indent_level>0&&(c=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}o.prototype.get_indent_size=function(l,c){var d=this.__base_string_length;return c=c||0,l<0&&(d=0),d+=l*this.__indent_size,d+=c,d},o.prototype.get_indent_string=function(l,c){var d=this.__base_string;return c=c||0,l<0&&(l=0,d=""),c+=l*this.__indent_size,this.__ensure_cache(c),d+=this.__cache[c],d},o.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var l=this.__cache.length,c=0,d="";this.__indent_size&&l>=this.__indent_size&&(c=Math.floor(l/this.__indent_size),l-=c*this.__indent_size,d=new Array(c+1).join(this.__indent_string)),l&&(d+=new Array(l+1).join(" ")),this.__cache.push(d)};function a(l,c){this.__indent_cache=new o(l,c),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},a.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(l){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` +`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(` +`);return l!==` +`&&(d=d.replace(/[\n]/g,l)),d},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(l,c){return l=l||0,c=c||0,this.next_line.set_indent(l,c),this.__lines.length>1?(this.current_line.set_indent(l,c),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(l){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(l,c){for(var d=this.__lines.length-2;d>=0;){var u=this.__lines[d];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==c){this.__lines.splice(d+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}d--}},i.exports.Output=a}),,,,(function(i){function s(l,c){this.raw_options=o(l,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(l,c){var d=this.raw_options[l],u=c||[];return typeof d=="object"?d!==null&&typeof d.concat=="function"&&(u=d.concat()):typeof d=="string"&&(u=d.split(/[^a-zA-Z0-9_\/\-]+/)),u},s.prototype._get_boolean=function(l,c){var d=this.raw_options[l],u=d===void 0?!!c:!!d;return u},s.prototype._get_characters=function(l,c){var d=this.raw_options[l],u=c||"";return typeof d=="string"&&(u=d.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),u},s.prototype._get_number=function(l,c){var d=this.raw_options[l];c=parseInt(c,10),isNaN(c)&&(c=0);var u=parseInt(d,10);return isNaN(u)&&(u=c),u},s.prototype._get_selection=function(l,c,d){var u=this._get_selection_list(l,c,d);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values: +`+c+` +You passed in: '`+this.raw_options[l]+"'");return u[0]},s.prototype._get_selection_list=function(l,c,d){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[c[0]],!this._is_valid_selection(d,c))throw new Error("Invalid Default Value!");var u=this._get_array(l,d);if(!this._is_valid_selection(u,c))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values: +`+c+` +You passed in: '`+this.raw_options[l]+"'");return u},s.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(d){return c.indexOf(d)===-1})};function o(l,c){var d={};l=a(l);var u;for(u in l)u!==c&&(d[u]=l[u]);if(c&&l[c])for(u in l[c])d[u]=l[c][u];return d}function a(l){var c={},d;for(d in l){var u=d.replace(/-/g,"_");c[u]=l[d]}return c}i.exports.Options=s,i.exports.normalizeOpts=a,i.exports.mergeOpts=o}),,(function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function o(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position=0&&a=0&&l=a.length&&this.__input.substring(l-a.length,l).toLowerCase()===a},i.exports.InputScanner=o}),,,,,(function(i){function s(o,a){o=typeof o=="string"?o:o.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+a,"g")}s.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(o);l;)a[l[1]]=l[2],l=this.__directive_pattern.exec(o);return a},s.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s}),,(function(i,s,o){var a=o(16).Beautifier,l=o(17).Options;function c(d,u){var m=new a(d,u);return m.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}}),(function(i,s,o){var a=o(17).Options,l=o(2).Output,c=o(8).InputScanner,d=o(13).Directives,u=new d(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,g=/\s/,b=/(?:\s|\n)+/g,_=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,F=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function L(k,T){this._source_text=k||"",this._options=new a(T),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}L.prototype.eatString=function(k){var T="";for(this._ch=this._input.next();this._ch;){if(T+=this._ch,this._ch==="\\")T+=this._input.next();else if(k.indexOf(this._ch)!==-1||this._ch===` +`)break;this._ch=this._input.next()}return T},L.prototype.eatWhitespace=function(k){for(var T=g.test(this._input.peek()),W=0;g.test(this._input.peek());)this._ch=this._input.next(),k&&this._ch===` +`&&(W===0||W0&&this._indentLevel--},L.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,T=this._options.eol;T==="auto"&&(T=` +`,k&&m.test(k||"")&&(T=k.match(m)[0])),k=k.replace(f,` +`);var W=k.match(/^[\t ]*/)[0];this._output=new l(this._options,W),this._input=new c(k),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var $=0,N=!1,R=!1,P=!1,B=!1,D=!1,C=this._ch,I=!1,E,z,M;E=this._input.read(b),z=E!=="",M=C,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),C=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var A=this._input.read(_),V=u.get_directives(A);V&&V.ignore==="start"&&(A+=u.readIgnored(this._input)),this.print_string(A),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(F)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(z),this.print_string(this._ch);var q=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);q.match(/[ :]$/)&&(q=this.eatString(": ").replace(/\s+$/,""),this.print_string(q),this._output.space_before_token=!0),$===0&&q.indexOf(":")!==-1&&(R=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(z),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Y=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Y.match(/[ :]$/)&&(Y=this.eatString(": ").replace(/\s+$/,""),this.print_string(Y),this._output.space_before_token=!0),$===0&&Y.indexOf(":")!==-1?(R=!0,this.indent()):Y in this.NESTED_AT_RULE?(this._nestedLevel+=1,Y in this.CONDITIONAL_GROUP_RULE&&(P=!0)):$===0&&!R&&(B=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(z),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")R&&(R=!1,this.outdent()),B=!1,P?(P=!1,N=this._indentLevel>=this._nestedLevel):N=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&N&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(M==="("?this._output.space_before_token=!1:M!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),M==="{"&&this._output.trim(!0),R&&(this.outdent(),R=!1),this.print_string(this._ch),N=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ne=0;ne"||this._ch==="+"||this._ch==="~")&&!R&&$===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&g.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(z),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),g.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Re=M==='"'||M==="'";this.preserveSingleSpace(Re||z),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` +`&&I&&this._output.add_new_line()}var ht=this._output.get_code(T);return ht},i.exports.Beautifier=L}),(function(i,s,o){var a=o(6).Options;function l(c){a.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var d=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||d;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m0&&yp(r,u-1);)u--;u===0||vp(r,u-1)?d=u:u0){let d=n.insertSpaces?ja(" ",a*s):ja(" ",s);c=c.split(` +`).join(` +`+d),e.start.character===0&&(c=d+c)}return[{range:e,newText:c}]}function wp(t){return t.replace(/^\s+/,"")}var a1=123,l1=125;function c1(t,e){for(;e>=0;){let n=t.charCodeAt(e);if(n===a1)return!0;if(n===l1)return!1;e--}return!1}function Dt(t,e,n){if(t&&t.hasOwnProperty(e)){let r=t[e];if(r!==null)return r}return n}function h1(t,e,n){let r=e,i=0,s=n.tabSize||4;for(;r && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",browsers:["E12","FF28","S9","C29","IE11","O16"],values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | | | ? ",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],description:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",browsers:["E12","FF20","S9","C29","IE11","O16"],values:[{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | | [ ? ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","IE10","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:55,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-self"}],description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",browsers:["E12","FF20","S9","C29","IE10","O12.1"],values:[{name:"auto",description:"Computes to the value of 'align-items' on the element's parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"normal"},{name:"self-end"},{name:"self-start"},{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"safe"},{name:"unsafe"}],syntax:"auto | normal | stretch | | ? ",relevance:73,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-self"}],description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert | revert-layer",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",browsers:["E12","FF16","S9","C43","IE10","O30"],values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",browsers:["E12","FF16","S9","C43","IE10","O30"],syntax:"