diff --git a/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/helpers/browser.sh b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/helpers/browser.sh new file mode 100644 index 0000000000000000000000000000000000000000..f466db26a981f6dc834706fd1846206191e3455e --- /dev/null +++ b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/helpers/browser.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +ROOT="$(dirname "$(dirname "$(dirname "$(readlink -f "$0")")")")" + +APP_NAME="code" +VERSION="1.130.0" +COMMIT="1b6a188127eeaf9194f945eb6eb89a657e93c54c" +EXEC_NAME="code" +CLI_SCRIPT="$ROOT/out/server-cli.js" +"$ROOT/node" "$CLI_SCRIPT" "$APP_NAME" "$VERSION" "$COMMIT" "$EXEC_NAME" "--openExternal" "$@" diff --git a/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/helpers/check-requirements.sh b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/helpers/check-requirements.sh new file mode 100644 index 0000000000000000000000000000000000000000..8ea4c0b5adbf04d145ae81a644e5c0dbaed465cc --- /dev/null +++ b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/helpers/check-requirements.sh @@ -0,0 +1,161 @@ +#!/usr/bin/env sh +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# + +set -e + +# The script checks necessary server requirements for the classic server +# scenarios. Currently, the script can exit with any of the following +# 2 exit codes and should be handled accordingly on the extension side. +# +# 0: All requirements are met, use the default server. +# 99: Unsupported OS, abort server startup with appropriate error message. +# + +# Do not remove this check. +# Provides a way to skip the server requirements check from +# outside the install flow. A system process can create this +# file before the server is downloaded and installed. +if [ -f "/tmp/vscode-skip-server-requirements-check" ] || [ -n "$VSCODE_SERVER_CUSTOM_GLIBC_LINKER" ]; then + echo "!!! WARNING: Skipping server pre-requisite check !!!" + echo "!!! Server stability is not guaranteed. Proceed at your own risk. !!!" + exit 0 +fi + +ARCH=$(uname -m) +found_required_glibc=0 +found_required_glibcxx=0 +MIN_GLIBCXX_VERSION="3.4.25" + +# Extract the ID value from /etc/os-release +if [ -f /etc/os-release ]; then + OS_ID="$(cat /etc/os-release | grep -Eo 'ID=([^"]+)' | sed -n '1s/ID=//p')" + if [ "$OS_ID" = "nixos" ]; then + echo "Warning: NixOS detected, skipping GLIBC check" + exit 0 + fi +fi + +# Based on https://github.com/bminor/glibc/blob/520b1df08de68a3de328b65a25b86300a7ddf512/elf/cache.c#L162-L245 +case $ARCH in + x86_64) LDCONFIG_ARCH="x86-64";; + armv7l | armv8l) + MIN_GLIBCXX_VERSION="3.4.26" + LDCONFIG_ARCH="hard-float" + ;; + arm64 | aarch64) + BITNESS=$(getconf LONG_BIT) + if [ "$BITNESS" = "32" ]; then + # Can have 32-bit userland on 64-bit kernel + LDCONFIG_ARCH="hard-float" + else + LDCONFIG_ARCH="AArch64" + fi + ;; +esac + +if [ "$OS_ID" != "alpine" ]; then + if [ -f /sbin/ldconfig ]; then + # Look up path + libstdcpp_paths=$(/sbin/ldconfig -p | grep 'libstdc++.so.6') + + if [ "$(echo "$libstdcpp_paths" | wc -l)" -gt 1 ]; then + libstdcpp_path=$(echo "$libstdcpp_paths" | grep "$LDCONFIG_ARCH" | awk '{print $NF}') + else + libstdcpp_path=$(echo "$libstdcpp_paths" | awk '{print $NF}') + fi + elif [ -f /usr/lib/libstdc++.so.6 ]; then + # Typical path + libstdcpp_path='/usr/lib/libstdc++.so.6' + elif [ -f /usr/lib64/libstdc++.so.6 ]; then + # Typical path + libstdcpp_path='/usr/lib64/libstdc++.so.6' + else + echo "Warning: Can't find libstdc++.so or ldconfig, can't verify libstdc++ version" + fi + + while [ -n "$libstdcpp_path" ]; do + # Extracts the version number from the path, e.g. libstdc++.so.6.0.22 -> 6.0.22 + # which is then compared based on the fact that release versioning and symbol versioning + # are aligned for libstdc++. Refs https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html + # (i-e) GLIBCXX_3.4. is provided by libstdc++.so.6.y. + libstdcpp_path_line=$(echo "$libstdcpp_path" | head -n1) + libstdcpp_real_path=$(readlink -f "$libstdcpp_path_line") + libstdcpp_version=$(grep -ao 'GLIBCXX_[0-9]*\.[0-9]*\.[0-9]*' "$libstdcpp_real_path" | sort -V | tail -1) + libstdcpp_version_number=$(echo "$libstdcpp_version" | sed 's/GLIBCXX_//') + if [ "$(printf '%s\n' "$MIN_GLIBCXX_VERSION" "$libstdcpp_version_number" | sort -V | head -n1)" = "$MIN_GLIBCXX_VERSION" ]; then + found_required_glibcxx=1 + break + fi + libstdcpp_path=$(echo "$libstdcpp_path" | tail -n +2) # remove first line + done +else + echo "Warning: alpine distro detected, skipping GLIBCXX check" + found_required_glibcxx=1 +fi +if [ "$found_required_glibcxx" = "0" ]; then + echo "Warning: Missing GLIBCXX >= $MIN_GLIBCXX_VERSION! from $libstdcpp_real_path" +fi + +if [ "$OS_ID" = "alpine" ]; then + MUSL_RTLDLIST="/lib/ld-musl-aarch64.so.1 /lib/ld-musl-x86_64.so.1" + for rtld in ${MUSL_RTLDLIST}; do + if [ -x $rtld ]; then + musl_version=$("$rtld" --version 2>&1 | grep "Version" | awk '{print $NF}') + break + fi + done + if [ "$(printf '%s\n' "1.2.3" "$musl_version" | sort -V | head -n1)" != "1.2.3" ]; then + echo "Error: Unsupported alpine distribution. Please refer to our supported distro section https://aka.ms/vscode-remote/linux for additional information." + exit 99 + fi + found_required_glibc=1 +elif [ -z "$(ldd --version 2>&1 | grep 'musl libc')" ]; then + if [ -f /sbin/ldconfig ]; then + # Look up path + libc_paths=$(/sbin/ldconfig -p | grep 'libc.so.6') + + if [ "$(echo "$libc_paths" | wc -l)" -gt 1 ]; then + libc_path=$(echo "$libc_paths" | grep "$LDCONFIG_ARCH" | awk '{print $NF}') + else + libc_path=$(echo "$libc_paths" | awk '{print $NF}') + fi + elif [ -f /usr/lib/libc.so.6 ]; then + # Typical path + libc_path='/usr/lib/libc.so.6' + elif [ -f /lib64/libc.so.6 ]; then + # Typical path (OpenSUSE) + libc_path='/lib64/libc.so.6' + elif [ -f /usr/lib64/libc.so.6 ]; then + # Typical path + libc_path='/usr/lib64/libc.so.6' + else + echo "Warning: Can't find libc.so or ldconfig, can't verify libc version" + fi + + while [ -n "$libc_path" ]; do + # Rather than trusting the output of ldd --version (which is not always accurate) + # we instead use the version of the cached libc.so.6 file itself. + libc_path_line=$(echo "$libc_path" | head -n1) + libc_real_path=$(readlink -f "$libc_path_line") + libc_version=$(cat "$libc_real_path" | sed -n 's/.*release version \([0-9]\+\.[0-9]\+\).*/\1/p') + if [ "$(printf '%s\n' "2.28" "$libc_version" | sort -V | head -n1)" = "2.28" ]; then + found_required_glibc=1 + break + fi + libc_path=$(echo "$libc_path" | tail -n +2) # remove first line + done + if [ "$found_required_glibc" = "0" ]; then + echo "Warning: Missing GLIBC >= 2.28! from $libc_real_path" + fi +else + echo "Warning: musl detected, skipping GLIBC check" + found_required_glibc=1 +fi + +if [ "$found_required_glibc" = "0" ] || [ "$found_required_glibcxx" = "0" ]; then + echo "Error: Missing required dependencies. Please refer to our FAQ https://aka.ms/vscode-remote/faq/old-linux for additional information." + # Custom exit code based on https://tldp.org/LDP/abs/html/exitcodes.html + exit 99 +fi diff --git a/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/remote-cli/code b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/remote-cli/code new file mode 100644 index 0000000000000000000000000000000000000000..f377a4f548327e7a3edebcf0d269e1eb2af04426 --- /dev/null +++ b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/remote-cli/code @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +ROOT="$(dirname "$(dirname "$(dirname "$(readlink -f "$0")")")")" + +APP_NAME="code" +VERSION="1.130.0" +COMMIT="1b6a188127eeaf9194f945eb6eb89a657e93c54c" +EXEC_NAME="code" +CLI_SCRIPT="$ROOT/out/server-cli.js" +"$ROOT/node" "$CLI_SCRIPT" "$APP_NAME" "$VERSION" "$COMMIT" "$EXEC_NAME" "$@" diff --git a/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/client/dist/node/cssClientMain.js b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/client/dist/node/cssClientMain.js new file mode 100644 index 0000000000000000000000000000000000000000..7c320bec4918b42ee1cfb9091ae7160c2c118f7b --- /dev/null +++ b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/client/dist/node/cssClientMain.js @@ -0,0 +1,30 @@ +"use strict";var Ub=Object.create;var Qs=Object.defineProperty;var Hb=Object.getOwnPropertyDescriptor;var Wb=Object.getOwnPropertyNames;var zb=Object.getPrototypeOf,Kb=Object.prototype.hasOwnProperty;var Yh=(n,e,t)=>()=>{if(t)throw t[0];try{return n&&(e=n(n=0)),e}catch(r){throw t=[r],r}};var T=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},Ba=(n,e)=>{for(var t in e)Qs(n,t,{get:e[t],enumerable:!0})},Zh=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Wb(e))!Kb.call(n,i)&&i!==t&&Qs(n,i,{get:()=>e[i],enumerable:!(r=Hb(e,i))||r.enumerable});return n};var br=(n,e,t)=>(t=n!=null?Ub(zb(n)):{},Zh(e||!n||!n.__esModule?Qs(t,"default",{value:n,enumerable:!0}):t,n)),Yi=n=>Zh(Qs({},"__esModule",{value:!0}),n);var Qt=T(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.boolean=Bb;Jt.string=ep;Jt.number=Vb;Jt.error=Gb;Jt.func=tp;Jt.array=np;Jt.stringArray=Xb;Jt.typedArray=Jb;Jt.thenable=rp;Jt.asPromise=Qb;function Bb(n){return n===!0||n===!1}function ep(n){return typeof n=="string"||n instanceof String}function Vb(n){return typeof n=="number"||n instanceof Number}function Gb(n){return n instanceof Error}function tp(n){return typeof n=="function"}function np(n){return Array.isArray(n)}function Xb(n){return np(n)&&n.every(e=>ep(e))}function Jb(n,e){return Array.isArray(n)&&n.every(e)}function rp(n){return n&&tp(n.then)}function Qb(n){return n instanceof Promise?n:rp(n)?new Promise((e,t)=>{n.then(r=>e(r),r=>t(r))}):Promise.resolve(n)}});var fi=T(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.boolean=Yb;zn.string=ip;zn.number=Zb;zn.error=eC;zn.func=tC;zn.array=sp;zn.stringArray=nC;function Yb(n){return n===!0||n===!1}function ip(n){return typeof n=="string"||n instanceof String}function Zb(n){return typeof n=="number"||n instanceof Number}function eC(n){return n instanceof Error}function tC(n){return typeof n=="function"}function sp(n){return Array.isArray(n)}function nC(n){return sp(n)&&n.every(e=>ip(e))}});var _c=T(Z=>{"use strict";var rC=Z&&Z.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),iC=Z&&Z.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),sC=Z&&Z.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.LRUCache=wr.LinkedMap=wr.Touch=void 0;var vt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(vt||(wr.Touch=vt={}));var Ys=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){let t=this._map.get(e);return t?t.previous?.value:void 0}after(e){let t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=vt.None){let r=this._map.get(e);if(r)return t!==vt.None&&this.touch(r,t),r.value}set(e,t,r=vt.None){let i=this._map.get(e);if(i)i.value=t,r!==vt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case vt.None:this.addItemLast(i);break;case vt.First:this.addItemFirst(i);break;case vt.Last: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 t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.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,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(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._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=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 t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==vt.First&&t!==vt.Last)){if(t===vt.First){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(t===vt.Last){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((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};wr.LinkedMap=Ys;var yc=class extends Ys{_limit;_ratio;constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=vt.AsNew){return super.get(e,t)}peek(e){return super.get(e,vt.None)}set(e,t){return super.set(e,t,vt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};wr.LRUCache=yc});var cp=T(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.Disposable=void 0;var ap;(function(n){function e(t){return{dispose:t}}n.create=e})(ap||(Zs.Disposable=ap={}))});var Dr=T(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var bc;function Cc(){if(bc===void 0)throw new Error("No runtime abstraction layer installed");return bc}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");bc=t}n.install=e})(Cc||(Cc={}));wc.default=Cc});var hi=T(Sr=>{"use strict";var oC=Sr&&Sr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.Emitter=Sr.Event=void 0;var aC=oC(Dr()),up;(function(n){let e={dispose(){}};n.None=function(){return e}})(up||(Sr.Event=up={}));var Dc=class{_callbacks;_contexts;add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new Dc),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Sr.Emitter=Sc});var no=T(Mt=>{"use strict";var cC=Mt&&Mt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),uC=Mt&&Mt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),lC=Mt&&Mt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.SharedArrayReceiverStrategy=pi.SharedArraySenderStrategy=void 0;var gC=no(),Zi;(function(n){n.Continue=0,n.Cancelled=1})(Zi||(Zi={}));var Tc=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=Zi.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Zi.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};pi.SharedArraySenderStrategy=Tc;var Oc=class{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Zi.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Ec=class{token;constructor(e){this.token=new Oc(e)}cancel(){}dispose(){}},qc=class{kind="request";createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new gC.CancellationTokenSource:new Ec(t)}};pi.SharedArrayReceiverStrategy=qc});var Mc=T(gi=>{"use strict";var mC=gi&&gi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gi,"__esModule",{value:!0});gi.Semaphore=void 0;var _C=mC(Dr()),xc=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,_C.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};gi.Semaphore=xc});var fp=T(bt=>{"use strict";var yC=bt&&bt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vC=bt&&bt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bC=bt&&bt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let s=parseInt(i);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Nc.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};bt.ReadableStreamMessageReader=Fc});var _p=T(Ct=>{"use strict";var DC=Ct&&Ct.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),SC=Ct&&Ct.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),PC=Ct&&Ct.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ithis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(OC,r.byteLength.toString(),gp),i.push(gp),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};Ct.WriteableStreamMessageWriter=Ac});var yp=T(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.AbstractMessageBuffer=void 0;var EC=13,qC=10,xC=`\r +`,kc=class{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,s=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],o=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,o}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let s=this._chunks[i];if(s.byteLength>e){let o=s.slice(0,e);t.set(o,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else t.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return t}};so.AbstractMessageBuffer=kc});var wp=T(te=>{"use strict";var MC=te&&te.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),IC=te&&te.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),NC=te&&te.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{},warn:()=>{},info:()=>{},log:()=>{}});var we;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(we||(te.Trace=we={}));var zc;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(zc||(te.TraceValue=zc={}));te.TraceValues=zc;(function(n){function e(r){if(!ze.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(we||(te.Trace=we={}));var Ut;(function(n){n.Text="text",n.JSON="json"})(Ut||(te.TraceFormat=Ut={}));(function(n){function e(t){return ze.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(Ut||(te.TraceFormat=Ut={}));var Kc;(function(n){n.type=new ae.NotificationType("$/setTrace")})(Kc||(te.SetTraceNotification=Kc={}));var oo;(function(n){n.type=new ae.NotificationType("$/logTrace")})(oo||(te.LogTraceNotification=oo={}));var rs;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(rs||(te.ConnectionErrors=rs={}));var _i=class n extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};te.ConnectionError=_i;var Bc;(function(n){function e(t){let r=t;return r&&ze.func(r.cancelUndispatched)}n.is=e})(Bc||(te.ConnectionStrategy=Bc={}));var ao;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&ze.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ze.func(r.dispose))}n.is=e})(ao||(te.IdCancellationReceiverStrategy=ao={}));var Vc;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&ze.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ze.func(r.dispose))}n.is=e})(Vc||(te.RequestCancellationReceiverStrategy=Vc={}));var co;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new $c.CancellationTokenSource}});function e(t){return ao.is(t)||Vc.is(t)}n.is=e})(co||(te.CancellationReceiverStrategy=co={}));var uo;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(is.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&ze.func(r.sendCancellation)&&ze.func(r.cleanup)}n.is=e})(uo||(te.CancellationSenderStrategy=uo={}));var lo;(function(n){n.Message=Object.freeze({receiver:co.Message,sender:uo.Message});function e(t){let r=t;return r&&co.is(r.receiver)&&uo.is(r.sender)}n.is=e})(lo||(te.CancellationStrategy=lo={}));var fo;(function(n){function e(t){let r=t;return r&&ze.func(r.handleMessage)}n.is=e})(fo||(te.MessageStrategy=fo={}));var Cp;(function(n){function e(t){let r=t;return r&&(lo.is(r.cancellationStrategy)||Bc.is(r.connectionStrategy)||fo.is(r.messageStrategy)||ze.number(r.maxParallelism))}n.is=e})(Cp||(te.ConnectionOptions=Cp={}));var sn;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(sn||(sn={}));function FC(n,e,t,r){let i=t!==void 0?t:te.NullLogger,s=0,o=0,a=0,u="2.0",l=r?.maxParallelism??-1,f=0,p,h=new Map,g,_=new Map,y=new Map,D,M=new bp.LinkedMap,w=new Map,I=new Set,j=new Map,A=we.Off,de=Ut.Text,le,Pe=sn.New,Ot=new ts.Emitter,gn=new ts.Emitter,$=new ts.Emitter,O=new ts.Emitter,V=new ts.Emitter,z=r&&r.cancellationStrategy?r.cancellationStrategy:lo.Message;function R(v){}function N(){return Pe===sn.Listening}function F(){return Pe===sn.Closed}function W(){return Pe===sn.Disposed}function U(){(Pe===sn.New||Pe===sn.Listening)&&(Pe=sn.Closed,gn.fire(void 0))}function B(v){Ot.fire([v,void 0,void 0])}function ne(v){Ot.fire(v)}n.onClose(U),n.onError(B),e.onClose(U),e.onError(ne);function oe(v){if(v===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+v.toString()}function Ue(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function _e(){return"not-"+(++o).toString()}function st(v,x){ae.Message.isRequest(x)?v.set(oe(x.id),x):ae.Message.isResponse(x)?l===-1?v.set(Ue(x.id),x):gr(x):v.set(_e(),x)}function At(){D||M.size===0||l!==-1&&f>=l||(D=(0,vp.default)().timer.setImmediate(async()=>{if(D=void 0,M.size===0||l!==-1&&f>=l)return;let v=M.shift(),x;try{f++;let k=r?.messageStrategy;fo.is(k)?x=k.handleMessage(v,ai):x=ai(v)}catch(k){i.error(`Processing message queue failed: ${k.toString()}`)}finally{x instanceof Promise?x.then(()=>{f--,At()}).catch(k=>{i.error(`Processing message queue failed: ${k.toString()}`)}):f--,At()}}))}async function ai(v){return ae.Message.isRequest(v)?pr(v):ae.Message.isNotification(v)?Xi(v):ae.Message.isResponse(v)?gr(v):ci(v)}let hr=v=>{try{if(ae.Message.isNotification(v)&&v.method===is.type.method){let x=v.params.id,k=oe(x),Q=M.get(k);if(ae.Message.isRequest(Q)){let be=r?.connectionStrategy,ye=be&&be.cancelUndispatched?be.cancelUndispatched(Q,R):void 0;if(ye&&(ye.error!==void 0||ye.result!==void 0)){M.delete(k),j.delete(x),ye.id=Q.id,mr(ye,v.method,Date.now()),e.write(ye).catch(()=>i.error("Sending response for canceled message failed."));return}}let he=j.get(x);if(he!==void 0){he.cancel(),kn(v);return}else I.add(x)}st(M,v)}finally{At()}};async function pr(v){if(W())return Promise.resolve();function x(He,Ye,Oe){let Me={jsonrpc:u,id:v.id};return He instanceof ae.ResponseError?Me.error=He.toJson():Me.result=He===void 0?null:He,mr(Me,Ye,Oe),e.write(Me)}function k(He,Ye,Oe){let Me={jsonrpc:u,id:v.id,error:He.toJson()};return mr(Me,Ye,Oe),e.write(Me)}_r(v);let Q=h.get(v.method),he,be;Q&&(he=Q.type,be=Q.handler);let ye=Date.now();if(be||p){let He=v.id??String(Date.now()),Ye=ao.is(z.receiver)?z.receiver.createCancellationTokenSource(He):z.receiver.createCancellationTokenSource(v);v.id!==null&&I.has(v.id)&&Ye.cancel(),v.id!==null&&j.set(He,Ye);try{let Oe;if(be)if(v.params===void 0){if(he!==void 0&&he.numberOfParams!==0)return k(new ae.ResponseError(ae.ErrorCodes.InvalidParams,`Request ${v.method} defines ${he.numberOfParams} params but received none.`),v.method,ye);Oe=be(Ye.token)}else if(Array.isArray(v.params)){if(he!==void 0&&he.parameterStructures===ae.ParameterStructures.byName)return k(new ae.ResponseError(ae.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,ye);Oe=be(...v.params,Ye.token)}else{if(he!==void 0&&he.parameterStructures===ae.ParameterStructures.byPosition)return k(new ae.ResponseError(ae.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,ye);Oe=be(v.params,Ye.token)}else p&&(Oe=p(v.method,v.params,Ye.token));let Me=await Oe;await x(Me,v.method,ye)}catch(Oe){Oe instanceof ae.ResponseError?await x(Oe,v.method,ye):Oe&&ze.string(Oe.message)?await k(new ae.ResponseError(ae.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${Oe.message}`),v.method,ye):await k(new ae.ResponseError(ae.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,ye)}finally{j.delete(He)}}else await k(new ae.ResponseError(ae.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,ye)}function gr(v){if(!W())if(v.id===null)v.error?i.error(`Received response message without id: Error is: +${JSON.stringify(v.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let x=v.id,k=w.get(x);if(ui(v,k),k!==void 0){w.delete(x);try{if(v.error){let Q=v.error;k.reject(new ae.ResponseError(Q.code,Q.message,Q.data))}else if(v.result!==void 0)k.resolve(v.result);else throw new Error("Should never happen.")}catch(Q){Q.message?i.error(`Response handler '${k.method}' failed with message: ${Q.message}`):i.error(`Response handler '${k.method}' failed unexpectedly.`)}}}}async function Xi(v){if(W())return;let x,k;if(v.method===is.type.method){let Q=v.params.id;I.delete(Q),kn(v);return}else{let Q=_.get(v.method);Q&&(k=Q.handler,x=Q.type)}if(k||g)try{if(kn(v),k)if(v.params===void 0)x!==void 0&&x.numberOfParams!==0&&x.parameterStructures!==ae.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${x.numberOfParams} params but received none.`),await k();else if(Array.isArray(v.params)){let Q=v.params;v.method===ns.type.method&&Q.length===2&&Uc.is(Q[0])?await k({token:Q[0],value:Q[1]}):(x!==void 0&&(x.parameterStructures===ae.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),x.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${x.numberOfParams} params but received ${Q.length} arguments`)),await k(...Q))}else x!==void 0&&x.parameterStructures===ae.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),await k(v.params);else g&&await g(v.method,v.params)}catch(Q){Q.message?i.error(`Notification handler '${v.method}' failed with message: ${Q.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else $.fire(v)}function ci(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(v,null,4)}`);let x=v;if(ze.string(x.id)||ze.number(x.id)){let k=x.id,Q=w.get(k);Q&&Q.reject(new Error("The received response has neither a result nor an error property."))}}function kt(v){if(v!=null)switch(A){case we.Verbose:return JSON.stringify(v,null,4);case we.Compact:return JSON.stringify(v);default:return}}function Ji(v){if(!(A===we.Off||!le))if(de===Ut.Text){let x;(A===we.Verbose||A===we.Compact)&&v.params&&(x=`Params: ${kt(v.params)}`),le.log(`Sending request '${v.method} - (${v.id})'.`,x)}else mt("send-request",v)}function mn(v){if(!(A===we.Off||!le))if(de===Ut.Text){let x;(A===we.Verbose||A===we.Compact)&&(v.params?x=`Params: ${kt(v.params)}`:x="No parameters provided."),le.log(`Sending notification '${v.method}'.`,x)}else mt("send-notification",v)}function mr(v,x,k){if(!(A===we.Off||!le))if(de===Ut.Text){let Q;(A===we.Verbose||A===we.Compact)&&(v.error&&v.error.data?Q=`Error data: ${kt(v.error.data)}`:v.result?Q=`Result: ${kt(v.result)}`:v.error===void 0&&(Q="No result returned.")),le.log(`Sending response '${x} - (${v.id})'. Processing request took ${Date.now()-k}ms`,Q)}else mt("send-response",v)}function _r(v){if(!(A===we.Off||!le))if(de===Ut.Text){let x;(A===we.Verbose||A===we.Compact)&&v.params&&(x=`Params: ${kt(v.params)}`),le.log(`Received request '${v.method} - (${v.id})'.`,x)}else mt("receive-request",v)}function kn(v){if(!(A===we.Off||!le||v.method===oo.type.method))if(de===Ut.Text){let x;(A===we.Verbose||A===we.Compact)&&(v.params?x=`Params: ${kt(v.params)}`:x="No parameters provided."),le.log(`Received notification '${v.method}'.`,x)}else mt("receive-notification",v)}function ui(v,x){if(!(A===we.Off||!le))if(de===Ut.Text){let k;if((A===we.Verbose||A===we.Compact)&&(v.error&&v.error.data?k=`Error data: ${kt(v.error.data)}`:v.result?k=`Result: ${kt(v.result)}`:v.error===void 0&&(k="No result returned.")),x){let Q=v.error?` Request failed: ${v.error.message} (${v.error.code}).`:"";le.log(`Received response '${x.method} - (${v.id})' in ${Date.now()-x.timerStart}ms.${Q}`,k)}else le.log(`Received response ${v.id} without active response promise.`,k)}else mt("receive-response",v)}function mt(v,x){if(!le||A===we.Off)return;let k={isLSPMessage:!0,type:v,message:x,timestamp:Date.now()};le.log(k)}function rn(){if(F())throw new _i(rs.Closed,"Connection is closed.");if(W())throw new _i(rs.Disposed,"Connection is disposed.")}function _t(){if(N())throw new _i(rs.AlreadyListening,"Connection is already listening")}function Qi(){if(!N())throw new Error("Call listen() first.")}function ht(v){return v===void 0?null:v}function $n(v){if(v!==null)return v}function li(v){return v!=null&&!Array.isArray(v)&&typeof v=="object"}function Hr(v,x){switch(v){case ae.ParameterStructures.auto:return li(x)?$n(x):[ht(x)];case ae.ParameterStructures.byName:if(!li(x))throw new Error("Received parameters by name but param is not an object literal.");return $n(x);case ae.ParameterStructures.byPosition:return[ht(x)];default:throw new Error(`Unknown parameter structure ${v.toString()}`)}}function yr(v,x){let k,Q=v.numberOfParams;switch(Q){case 0:k=void 0;break;case 1:k=Hr(v.parameterStructures,x[0]);break;default:k=[];for(let he=0;he{rn();let k,Q;if(ze.string(v)){k=v;let be=x[0],ye=0,He=ae.ParameterStructures.auto;ae.ParameterStructures.is(be)&&(ye=1,He=be);let Ye=x.length,Oe=Ye-ye;switch(Oe){case 0:Q=void 0;break;case 1:Q=Hr(He,x[ye]);break;default:if(He===ae.ParameterStructures.byName)throw new Error(`Received ${Oe} parameters for 'by Name' notification parameter structure.`);Q=x.slice(ye,Ye).map(Me=>ht(Me));break}}else{let be=x;k=v.method,Q=yr(v,be)}let he={jsonrpc:u,method:k,params:Q};return mn(he),e.write(he).catch(be=>{throw i.error("Sending notification failed."),be})},onNotification:(v,x)=>{rn();let k;return ze.func(v)?g=v:x&&(ze.string(v)?(k=v,_.set(v,{type:void 0,handler:x})):(k=v.method,_.set(v.method,{type:v,handler:x}))),{dispose:()=>{k!==void 0?_.get(k)?.handler===x&&_.delete(k):g===v&&(g=void 0)}}},onProgress:(v,x,k)=>{if(y.has(x))throw new Error(`Progress handler for token ${x} already registered`);return y.set(x,k),{dispose:()=>{y.get(x)===k&&y.delete(x)}}},sendProgress:(v,x,k)=>Gt.sendNotification(ns.type,{token:x,value:k}),onUnhandledProgress:O.event,sendRequest:(v,...x)=>{rn(),Qi();function k(Me,yt){let Et=z.sender.sendCancellation(Me,yt);Et===void 0?i.log(`Received no promise from cancellation strategy when cancelling id ${yt}`):Et.catch(()=>{i.log(`Sending cancellation messages for id ${yt} failed.`)})}let Q,he,be;if(ze.string(v)){Q=v;let Me=x[0],yt=x[x.length-1],Et=0,Un=ae.ParameterStructures.auto;ae.ParameterStructures.is(Me)&&(Et=1,Un=Me);let $t=x.length;$c.CancellationToken.is(yt)&&($t=$t-1,be=yt);let qt=$t-Et;switch(qt){case 0:he=void 0;break;case 1:he=Hr(Un,x[Et]);break;default:if(Un===ae.ParameterStructures.byName)throw new Error(`Received ${qt} parameters for 'by Name' request parameter structure.`);he=x.slice(Et,$t).map(di=>ht(di));break}}else{let Me=x;Q=v.method,he=yr(v,Me);let yt=v.numberOfParams;be=$c.CancellationToken.is(Me[yt])?Me[yt]:void 0}let ye=s++,He,Ye=!1;be!==void 0&&(be.isCancellationRequested?Ye=!0:He=be.onCancellationRequested(()=>{k(Gt,ye)}));let Oe={jsonrpc:u,id:ye,method:Q,params:he};return Ji(Oe),typeof z.sender.enableCancellation=="function"&&z.sender.enableCancellation(Oe),new Promise(async(Me,yt)=>{let Et=qt=>{Me(qt),z.sender.cleanup(ye),He?.dispose()},Un=qt=>{yt(qt),z.sender.cleanup(ye),He?.dispose()},$t={method:Q,timerStart:Date.now(),resolve:Et,reject:Un};try{w.set(ye,$t),await e.write(Oe),Ye&&k(Gt,ye)}catch(qt){throw w.delete(ye),$t.reject(new ae.ResponseError(ae.ErrorCodes.MessageWriteError,qt.message?qt.message:"Unknown reason")),i.error("Sending request failed."),qt}})},onRequest:(v,x)=>{rn();let k=null;return Wc.is(v)?(k=void 0,p=v):ze.string(v)?(k=null,x!==void 0&&(k=v,h.set(v,{handler:x,type:void 0}))):x!==void 0&&(k=v.method,h.set(v.method,{type:v,handler:x})),{dispose:()=>{k!==null&&(k!==void 0?h.get(k)?.handler===x&&h.delete(k):p===v&&(p=void 0))}}},hasPendingResponse:()=>w.size>0,trace:async(v,x,k)=>{let Q=!1,he=Ut.Text;k!==void 0&&(ze.boolean(k)?Q=k:(Q=k.sendNotification||!1,he=k.traceFormat||Ut.Text)),A=v,de=he,A===we.Off?le=void 0:le=x,Q&&!F()&&!W()&&await Gt.sendNotification(Kc.type,{value:we.toString(v)})},onError:Ot.event,onClose:gn.event,onUnhandledNotification:$.event,onDispose:V.event,end:()=>{e.end()},dispose:()=>{if(W())return;Pe=sn.Disposed,V.fire(void 0);let v=new ae.ResponseError(ae.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let x of w.values())x.reject(v);w=new Map,j=new Map,I=new Set,M=new bp.LinkedMap,ze.func(e.dispose)&&e.dispose(),ze.func(n.dispose)&&n.dispose()},listen:()=>{rn(),_t(),Pe=sn.Listening,n.listen(hr)},inspect:()=>{(0,vp.default)().console.log("inspect")}};return Gt.onNotification(oo.type,v=>{if(A===we.Off||!le)return;let x=A===we.Verbose||A===we.Compact;le.log(v.message,x?v.verbose:void 0)}),Gt.onNotification(ns.type,async v=>{let x=y.get(v.token);x?await x(v.value):O.fire(v)}),Gt}});var Kn=T(P=>{"use strict";var LC=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(P,"__esModule",{value:!0});P.ProgressType=P.ProgressToken=P.createMessageConnection=P.NullLogger=P.ConnectionOptions=P.ConnectionStrategy=P.AbstractMessageBuffer=P.WriteableStreamMessageWriter=P.AbstractMessageWriter=P.MessageWriter=P.ReadableStreamMessageReader=P.AbstractMessageReader=P.MessageReader=P.SharedArrayReceiverStrategy=P.SharedArraySenderStrategy=P.CancellationToken=P.CancellationTokenSource=P.Emitter=P.Event=P.Disposable=P.LRUCache=P.Touch=P.LinkedMap=P.ParameterStructures=P.NotificationType9=P.NotificationType8=P.NotificationType7=P.NotificationType6=P.NotificationType5=P.NotificationType4=P.NotificationType3=P.NotificationType2=P.NotificationType1=P.NotificationType0=P.NotificationType=P.ErrorCodes=P.ResponseError=P.RequestType9=P.RequestType8=P.RequestType7=P.RequestType6=P.RequestType5=P.RequestType4=P.RequestType3=P.RequestType2=P.RequestType1=P.RequestType0=P.RequestType=P.Message=P.RAL=void 0;P.MessageStrategy=P.CancellationStrategy=P.CancellationSenderStrategy=P.RequestCancellationReceiverStrategy=P.IdCancellationReceiverStrategy=P.CancellationReceiverStrategy=P.ConnectionError=P.ConnectionErrors=P.LogTraceNotification=P.SetTraceNotification=P.TraceFormat=P.TraceValues=P.TraceValue=P.Trace=void 0;var Ie=_c();Object.defineProperty(P,"Message",{enumerable:!0,get:function(){return Ie.Message}});Object.defineProperty(P,"RequestType",{enumerable:!0,get:function(){return Ie.RequestType}});Object.defineProperty(P,"RequestType0",{enumerable:!0,get:function(){return Ie.RequestType0}});Object.defineProperty(P,"RequestType1",{enumerable:!0,get:function(){return Ie.RequestType1}});Object.defineProperty(P,"RequestType2",{enumerable:!0,get:function(){return Ie.RequestType2}});Object.defineProperty(P,"RequestType3",{enumerable:!0,get:function(){return Ie.RequestType3}});Object.defineProperty(P,"RequestType4",{enumerable:!0,get:function(){return Ie.RequestType4}});Object.defineProperty(P,"RequestType5",{enumerable:!0,get:function(){return Ie.RequestType5}});Object.defineProperty(P,"RequestType6",{enumerable:!0,get:function(){return Ie.RequestType6}});Object.defineProperty(P,"RequestType7",{enumerable:!0,get:function(){return Ie.RequestType7}});Object.defineProperty(P,"RequestType8",{enumerable:!0,get:function(){return Ie.RequestType8}});Object.defineProperty(P,"RequestType9",{enumerable:!0,get:function(){return Ie.RequestType9}});Object.defineProperty(P,"ResponseError",{enumerable:!0,get:function(){return Ie.ResponseError}});Object.defineProperty(P,"ErrorCodes",{enumerable:!0,get:function(){return Ie.ErrorCodes}});Object.defineProperty(P,"NotificationType",{enumerable:!0,get:function(){return Ie.NotificationType}});Object.defineProperty(P,"NotificationType0",{enumerable:!0,get:function(){return Ie.NotificationType0}});Object.defineProperty(P,"NotificationType1",{enumerable:!0,get:function(){return Ie.NotificationType1}});Object.defineProperty(P,"NotificationType2",{enumerable:!0,get:function(){return Ie.NotificationType2}});Object.defineProperty(P,"NotificationType3",{enumerable:!0,get:function(){return Ie.NotificationType3}});Object.defineProperty(P,"NotificationType4",{enumerable:!0,get:function(){return Ie.NotificationType4}});Object.defineProperty(P,"NotificationType5",{enumerable:!0,get:function(){return Ie.NotificationType5}});Object.defineProperty(P,"NotificationType6",{enumerable:!0,get:function(){return Ie.NotificationType6}});Object.defineProperty(P,"NotificationType7",{enumerable:!0,get:function(){return Ie.NotificationType7}});Object.defineProperty(P,"NotificationType8",{enumerable:!0,get:function(){return Ie.NotificationType8}});Object.defineProperty(P,"NotificationType9",{enumerable:!0,get:function(){return Ie.NotificationType9}});Object.defineProperty(P,"ParameterStructures",{enumerable:!0,get:function(){return Ie.ParameterStructures}});var Gc=vc();Object.defineProperty(P,"LinkedMap",{enumerable:!0,get:function(){return Gc.LinkedMap}});Object.defineProperty(P,"LRUCache",{enumerable:!0,get:function(){return Gc.LRUCache}});Object.defineProperty(P,"Touch",{enumerable:!0,get:function(){return Gc.Touch}});var AC=cp();Object.defineProperty(P,"Disposable",{enumerable:!0,get:function(){return AC.Disposable}});var Dp=hi();Object.defineProperty(P,"Event",{enumerable:!0,get:function(){return Dp.Event}});Object.defineProperty(P,"Emitter",{enumerable:!0,get:function(){return Dp.Emitter}});var Sp=no();Object.defineProperty(P,"CancellationTokenSource",{enumerable:!0,get:function(){return Sp.CancellationTokenSource}});Object.defineProperty(P,"CancellationToken",{enumerable:!0,get:function(){return Sp.CancellationToken}});var Pp=lp();Object.defineProperty(P,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Pp.SharedArraySenderStrategy}});Object.defineProperty(P,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Pp.SharedArrayReceiverStrategy}});var Xc=fp();Object.defineProperty(P,"MessageReader",{enumerable:!0,get:function(){return Xc.MessageReader}});Object.defineProperty(P,"AbstractMessageReader",{enumerable:!0,get:function(){return Xc.AbstractMessageReader}});Object.defineProperty(P,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Xc.ReadableStreamMessageReader}});var Jc=_p();Object.defineProperty(P,"MessageWriter",{enumerable:!0,get:function(){return Jc.MessageWriter}});Object.defineProperty(P,"AbstractMessageWriter",{enumerable:!0,get:function(){return Jc.AbstractMessageWriter}});Object.defineProperty(P,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Jc.WriteableStreamMessageWriter}});var kC=yp();Object.defineProperty(P,"AbstractMessageBuffer",{enumerable:!0,get:function(){return kC.AbstractMessageBuffer}});var et=wp();Object.defineProperty(P,"ConnectionStrategy",{enumerable:!0,get:function(){return et.ConnectionStrategy}});Object.defineProperty(P,"ConnectionOptions",{enumerable:!0,get:function(){return et.ConnectionOptions}});Object.defineProperty(P,"NullLogger",{enumerable:!0,get:function(){return et.NullLogger}});Object.defineProperty(P,"createMessageConnection",{enumerable:!0,get:function(){return et.createMessageConnection}});Object.defineProperty(P,"ProgressToken",{enumerable:!0,get:function(){return et.ProgressToken}});Object.defineProperty(P,"ProgressType",{enumerable:!0,get:function(){return et.ProgressType}});Object.defineProperty(P,"Trace",{enumerable:!0,get:function(){return et.Trace}});Object.defineProperty(P,"TraceValue",{enumerable:!0,get:function(){return et.TraceValue}});Object.defineProperty(P,"TraceFormat",{enumerable:!0,get:function(){return et.TraceFormat}});Object.defineProperty(P,"SetTraceNotification",{enumerable:!0,get:function(){return et.SetTraceNotification}});Object.defineProperty(P,"LogTraceNotification",{enumerable:!0,get:function(){return et.LogTraceNotification}});Object.defineProperty(P,"ConnectionErrors",{enumerable:!0,get:function(){return et.ConnectionErrors}});Object.defineProperty(P,"ConnectionError",{enumerable:!0,get:function(){return et.ConnectionError}});Object.defineProperty(P,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return et.CancellationReceiverStrategy}});Object.defineProperty(P,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return et.IdCancellationReceiverStrategy}});Object.defineProperty(P,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return et.RequestCancellationReceiverStrategy}});Object.defineProperty(P,"CancellationSenderStrategy",{enumerable:!0,get:function(){return et.CancellationSenderStrategy}});Object.defineProperty(P,"CancellationStrategy",{enumerable:!0,get:function(){return et.CancellationStrategy}});Object.defineProperty(P,"MessageStrategy",{enumerable:!0,get:function(){return et.MessageStrategy}});Object.defineProperty(P,"TraceValues",{enumerable:!0,get:function(){return et.TraceValues}});var $C=LC(Dr());P.RAL=$C.default});var Do={};Ba(Do,{AnnotatedTextEdit:()=>Bn,ApplyKind:()=>yu,ChangeAnnotation:()=>Pr,ChangeAnnotationIdentifier:()=>at,CodeAction:()=>Nu,CodeActionContext:()=>Iu,CodeActionKind:()=>Mu,CodeActionTag:()=>vo,CodeActionTriggerKind:()=>ds,CodeDescription:()=>ou,CodeLens:()=>ju,Color:()=>po,ColorInformation:()=>eu,ColorPresentation:()=>tu,Command:()=>zr,CompletionItem:()=>bu,CompletionItemKind:()=>hu,CompletionItemLabelDetails:()=>vu,CompletionItemTag:()=>gu,CompletionList:()=>Cu,CreateFile:()=>vi,DeleteFile:()=>Ci,Diagnostic:()=>as,DiagnosticRelatedInformation:()=>go,DiagnosticSeverity:()=>iu,DiagnosticTag:()=>su,DocumentHighlight:()=>Ru,DocumentHighlightKind:()=>Pu,DocumentLink:()=>Lu,DocumentSymbol:()=>xu,DocumentUri:()=>Qc,EOL:()=>UC,FoldingRange:()=>ru,FoldingRangeKind:()=>nu,FormattingOptions:()=>Fu,Hover:()=>wu,InlayHint:()=>Bu,InlayHintKind:()=>bo,InlayHintLabelPart:()=>Co,InlineCompletionContext:()=>Qu,InlineCompletionItem:()=>Vu,InlineCompletionList:()=>Gu,InlineCompletionTriggerKind:()=>Xu,InlineValueContext:()=>Ku,InlineValueEvaluatableExpression:()=>zu,InlineValueText:()=>Hu,InlineValueVariableLookup:()=>Wu,InsertReplaceEdit:()=>mu,InsertTextFormat:()=>pu,InsertTextMode:()=>_u,LanguageKind:()=>du,Location:()=>os,LocationLink:()=>Zc,MarkedString:()=>ls,MarkupContent:()=>Kr,MarkupKind:()=>yo,OptionalVersionedTextDocumentIdentifier:()=>us,ParameterInformation:()=>Du,Position:()=>Yt,Range:()=>Ke,RenameFile:()=>bi,SelectedCompletionInfo:()=>Ju,SelectionRange:()=>Au,SemanticTokenModifiers:()=>$u,SemanticTokenTypes:()=>ku,SemanticTokens:()=>Uu,SignatureInformation:()=>Su,SnippetTextEdit:()=>au,StringValue:()=>wo,SymbolInformation:()=>Eu,SymbolKind:()=>Tu,SymbolTag:()=>Ou,TextDocument:()=>Zu,TextDocumentEdit:()=>cs,TextDocumentIdentifier:()=>uu,TextDocumentItem:()=>fu,TextEdit:()=>_n,URI:()=>ho,VersionedTextDocumentIdentifier:()=>lu,WorkspaceChange:()=>cu,WorkspaceEdit:()=>mo,WorkspaceFolder:()=>Yu,WorkspaceSymbol:()=>qu,integer:()=>Yc,uinteger:()=>ss});var Qc,ho,Yc,ss,Yt,Ke,os,Zc,po,eu,tu,nu,ru,go,iu,su,ou,as,zr,_n,Pr,at,Bn,cs,vi,bi,Ci,mo,yi,au,_o,cu,uu,lu,us,du,fu,yo,Kr,hu,pu,gu,mu,_u,yu,vu,bu,Cu,ls,wu,Du,Su,Pu,Ru,Tu,Ou,Eu,qu,xu,Mu,ds,Iu,vo,Nu,ju,Fu,Lu,Au,ku,$u,Uu,Hu,Wu,zu,Ku,bo,Co,Bu,wo,Vu,Gu,Xu,Ju,Qu,Yu,UC,Zu,el,C,So=Yh(()=>{"use strict";(function(n){function e(t){return typeof t=="string"}n.is=e})(Qc||(Qc={}));(function(n){function e(t){return typeof t=="string"}n.is=e})(ho||(ho={}));(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Yc||(Yc={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(ss||(ss={}));(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=ss.MAX_VALUE),i===Number.MAX_VALUE&&(i=ss.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}n.is=t})(Yt||(Yt={}));(function(n){function e(r,i,s,o){if(C.uinteger(r)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(o))return{start:Yt.create(r,i),end:Yt.create(s,o)};if(Yt.is(r)&&Yt.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${o}]`)}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Yt.is(i.start)&&Yt.is(i.end)}n.is=t})(Ke||(Ke={}));(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Ke.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}n.is=t})(os||(os={}));(function(n){function e(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Ke.is(i.targetRange)&&C.string(i.targetUri)&&Ke.is(i.targetSelectionRange)&&(Ke.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}n.is=t})(Zc||(Zc={}));(function(n){function e(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}n.is=t})(po||(po={}));(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Ke.is(i.range)&&po.is(i.color)}n.is=t})(eu||(eu={}));(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.undefined(i.textEdit)||_n.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,_n.is))}n.is=t})(tu||(tu={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(nu||(nu={}));(function(n){function e(r,i,s,o,a,u){let l={startLine:r,endLine:i};return C.defined(s)&&(l.startCharacter=s),C.defined(o)&&(l.endCharacter=o),C.defined(a)&&(l.kind=a),C.defined(u)&&(l.collapsedText=u),l}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}n.is=t})(ru||(ru={}));(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&os.is(i.location)&&C.string(i.message)}n.is=t})(go||(go={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(iu||(iu={}));(function(n){n.Unnecessary=1,n.Deprecated=2})(su||(su={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&C.string(r.href)}n.is=e})(ou||(ou={}));(function(n){function e(r,i,s,o,a,u){let l={range:r,message:i};return C.defined(s)&&(l.severity=s),C.defined(o)&&(l.code=o),C.defined(a)&&(l.source=a),C.defined(u)&&(l.relatedInformation=u),l}n.create=e;function t(r){var i;let s=r;return C.defined(s)&&Ke.is(s.range)&&(C.string(s.message)||Kr.is(s.message))&&(C.number(s.severity)||C.undefined(s.severity))&&(C.integer(s.code)||C.string(s.code)||C.undefined(s.code))&&(C.undefined(s.codeDescription)||C.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(C.string(s.source)||C.undefined(s.source))&&(C.undefined(s.relatedInformation)||C.typedArray(s.relatedInformation,go.is))}n.is=t})(as||(as={}));(function(n){function e(r,i,...s){let o={title:r,command:i};return C.defined(s)&&s.length>0&&(o.arguments=s),o}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.title)&&(i.tooltip===void 0||C.string(i.tooltip))&&C.string(i.command)}n.is=t})(zr||(zr={}));(function(n){function e(s,o){return{range:s,newText:o}}n.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){let o=s;return C.objectLiteral(o)&&C.string(o.newText)&&Ke.is(o.range)}n.is=i})(_n||(_n={}));(function(n){function e(r,i,s){let o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}n.is=t})(Pr||(Pr={}));(function(n){function e(t){let r=t;return C.string(r)}n.is=e})(at||(at={}));(function(n){function e(s,o,a){return{range:s,newText:o,annotationId:a}}n.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}n.insert=t;function r(s,o){return{range:s,newText:"",annotationId:o}}n.del=r;function i(s){let o=s;return _n.is(o)&&(Pr.is(o.annotationId)||at.is(o.annotationId))}n.is=i})(Bn||(Bn={}));(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&us.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(cs||(cs={}));(function(n){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}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||at.is(i.annotationId))}n.is=t})(vi||(vi={}));(function(n){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}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||at.is(i.annotationId))}n.is=t})(bi||(bi={}));(function(n){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}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||at.is(i.annotationId))}n.is=t})(Ci||(Ci={}));(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>C.string(i.kind)?vi.is(i)||bi.is(i)||Ci.is(i):cs.is(i)))}n.is=e})(mo||(mo={}));yi=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,s;if(r===void 0?i=_n.insert(e,t):at.is(r)?(s=r,i=Bn.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=Bn.insert(e,t,s)),this.edits.push(i),s!==void 0)return s}replace(e,t,r){let i,s;if(r===void 0?i=_n.replace(e,t):at.is(r)?(s=r,i=Bn.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=Bn.replace(e,t,s)),this.edits.push(i),s!==void 0)return s}delete(e,t){let r,i;if(t===void 0?r=_n.del(e):at.is(t)?(i=t,r=Bn.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),r=Bn.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(n){function e(t){let r=t;return C.objectLiteral(r)&&Ke.is(r.range)&&wo.isSnippet(r.snippet)&&(r.annotationId===void 0||Pr.is(r.annotationId)||at.is(r.annotationId))}n.is=e})(au||(au={}));_o=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(at.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},cu=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new _o(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(cs.is(t)){let r=new yi(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new yi(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(us.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let i=[],s={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(s),r=new yi(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new yi(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new _o,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Pr.is(t)||at.is(t)?i=t:r=t;let s,o;if(i===void 0?s=vi.create(e,r):(o=at.is(i)?i:this._changeAnnotations.manage(i),s=vi.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}renameFile(e,t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;Pr.is(r)||at.is(r)?s=r:i=r;let o,a;if(s===void 0?o=bi.create(e,t,i):(a=at.is(s)?s:this._changeAnnotations.manage(s),o=bi.create(e,t,i,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Pr.is(t)||at.is(t)?i=t:r=t;let s,o;if(i===void 0?s=Ci.create(e,r):(o=at.is(i)?i:this._changeAnnotations.manage(i),s=Ci.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}};(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)}n.is=t})(uu||(uu={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}n.is=t})(lu||(lu={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}n.is=t})(us||(us={}));(function(n){n.ABAP="abap",n.WindowsBat="bat",n.BibTeX="bibtex",n.Clojure="clojure",n.Coffeescript="coffeescript",n.C="c",n.CPP="cpp",n.CSharp="csharp",n.CSS="css",n.D="d",n.Delphi="pascal",n.Diff="diff",n.Dart="dart",n.Dockerfile="dockerfile",n.Elixir="elixir",n.Erlang="erlang",n.FSharp="fsharp",n.GitCommit="git-commit",n.GitRebase="git-rebase",n.Go="go",n.Groovy="groovy",n.Handlebars="handlebars",n.Haskell="haskell",n.HTML="html",n.Ini="ini",n.Java="java",n.JavaScript="javascript",n.JavaScriptReact="javascriptreact",n.JSON="json",n.LaTeX="latex",n.Less="less",n.Lua="lua",n.Makefile="makefile",n.Markdown="markdown",n.ObjectiveC="objective-c",n.ObjectiveCPP="objective-cpp",n.Pascal="pascal",n.Perl="perl",n.Perl6="perl6",n.PHP="php",n.Plaintext="plaintext",n.Powershell="powershell",n.Pug="jade",n.Python="python",n.R="r",n.Razor="razor",n.Ruby="ruby",n.Rust="rust",n.SCSS="scss",n.SASS="sass",n.Scala="scala",n.ShaderLab="shaderlab",n.ShellScript="shellscript",n.SQL="sql",n.Swift="swift",n.TypeScript="typescript",n.TypeScriptReact="typescriptreact",n.TeX="tex",n.VisualBasic="vb",n.XML="xml",n.XSL="xsl",n.YAML="yaml"})(du||(du={}));(function(n){function e(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}n.is=t})(fu||(fu={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){let r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(yo||(yo={}));(function(n){function e(t){let r=t;return C.objectLiteral(t)&&yo.is(r.kind)&&C.string(r.value)}n.is=e})(Kr||(Kr={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(hu||(hu={}));(function(n){n.PlainText=1,n.Snippet=2})(pu||(pu={}));(function(n){n.Deprecated=1})(gu||(gu={}));(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){let i=r;return i&&C.string(i.newText)&&Ke.is(i.insert)&&Ke.is(i.replace)}n.is=t})(mu||(mu={}));(function(n){n.asIs=1,n.adjustIndentation=2})(_u||(_u={}));(function(n){n.Replace=1,n.Merge=2})(yu||(yu={}));(function(n){function e(t){let r=t;return r&&(C.string(r.detail)||r.detail===void 0)&&(C.string(r.description)||r.description===void 0)}n.is=e})(vu||(vu={}));(function(n){function e(t){return{label:t}}n.create=e})(bu||(bu={}));(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(Cu||(Cu={}));(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){let i=r;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}n.is=t})(ls||(ls={}));(function(n){function e(t){let r=t;return!!r&&C.objectLiteral(r)&&(Kr.is(r.contents)||ls.is(r.contents)||C.typedArray(r.contents,ls.is))&&(t.range===void 0||Ke.is(t.range))}n.is=e})(wu||(wu={}));(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(Du||(Du={}));(function(n){function e(t,r,...i){let s={label:t};return C.defined(r)&&(s.documentation=r),C.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(Su||(Su={}));(function(n){n.Text=1,n.Read=2,n.Write=3})(Pu||(Pu={}));(function(n){function e(t,r){let i={range:t};return C.number(r)&&(i.kind=r),i}n.create=e})(Ru||(Ru={}));(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(Tu||(Tu={}));(function(n){n.Deprecated=1})(Ou||(Ou={}));(function(n){function e(t,r,i,s,o){let a={name:t,kind:r,location:{uri:s,range:i}};return o&&(a.containerName=o),a}n.create=e})(Eu||(Eu={}));(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(qu||(qu={}));(function(n){function e(r,i,s,o,a,u){let l={name:r,detail:i,kind:s,range:o,selectionRange:a};return u!==void 0&&(l.children=u),l}n.create=e;function t(r){let i=r;return i&&C.string(i.name)&&C.number(i.kind)&&Ke.is(i.range)&&Ke.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(xu||(xu={}));(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorMove="refactor.move",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll",n.Notebook="notebook"})(Mu||(Mu={}));(function(n){n.Invoked=1,n.Automatic=2})(ds||(ds={}));(function(n){function e(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}n.create=e;function t(r){let i=r;return C.defined(i)&&C.typedArray(i.diagnostics,as.is)&&(i.only===void 0||C.typedArray(i.only,C.string))&&(i.triggerKind===void 0||i.triggerKind===ds.Invoked||i.triggerKind===ds.Automatic)}n.is=t})(Iu||(Iu={}));(function(n){n.LLMGenerated=1;function e(t){return C.defined(t)&&t===n.LLMGenerated}n.is=e})(vo||(vo={}));(function(n){function e(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):zr.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.kind=s),o}n.create=e;function t(r){let i=r;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,as.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||zr.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||mo.is(i.edit))&&(i.tags===void 0||C.typedArray(i.tags,vo.is))}n.is=t})(Nu||(Nu={}));(function(n){function e(r,i){let s={range:r};return C.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return C.defined(i)&&Ke.is(i.range)&&(C.undefined(i.command)||zr.is(i.command))}n.is=t})(ju||(ju={}));(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}n.is=t})(Fu||(Fu={}));(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return C.defined(i)&&Ke.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}n.is=t})(Lu||(Lu={}));(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Ke.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(Au||(Au={}));(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator",n.label="label"})(ku||(ku={}));(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})($u||($u={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(Uu||(Uu={}));(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){let i=r;return i!=null&&Ke.is(i.range)&&C.string(i.text)}n.is=t})(Hu||(Hu={}));(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){let i=r;return i!=null&&Ke.is(i.range)&&C.boolean(i.caseSensitiveLookup)&&(C.string(i.variableName)||i.variableName===void 0)}n.is=t})(Wu||(Wu={}));(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){let i=r;return i!=null&&Ke.is(i.range)&&(C.string(i.expression)||i.expression===void 0)}n.is=t})(zu||(zu={}));(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&Ke.is(r.stoppedLocation)}n.is=t})(Ku||(Ku={}));(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(bo||(bo={}));(function(n){function e(r){return{value:r}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&(i.tooltip===void 0||C.string(i.tooltip)||Kr.is(i.tooltip))&&(i.location===void 0||os.is(i.location))&&(i.command===void 0||zr.is(i.command))}n.is=t})(Co||(Co={}));(function(n){function e(r,i,s){let o={position:r,label:i};return s!==void 0&&(o.kind=s),o}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Yt.is(i.position)&&(C.string(i.label)||C.typedArray(i.label,Co.is))&&(i.kind===void 0||bo.is(i.kind))&&i.textEdits===void 0||C.typedArray(i.textEdits,_n.is)&&(i.tooltip===void 0||C.string(i.tooltip)||Kr.is(i.tooltip))&&(i.paddingLeft===void 0||C.boolean(i.paddingLeft))&&(i.paddingRight===void 0||C.boolean(i.paddingRight))}n.is=t})(Bu||(Bu={}));(function(n){function e(r){return{kind:"snippet",value:r}}n.createSnippet=e;function t(r){let i=r;return C.objectLiteral(i)&&i.kind==="snippet"&&C.string(i.value)}n.isSnippet=t})(wo||(wo={}));(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(Vu||(Vu={}));(function(n){function e(t){return{items:t}}n.create=e})(Gu||(Gu={}));(function(n){n.Invoked=1,n.Automatic=2})(Xu||(Xu={}));(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(Ju||(Ju={}));(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(Qu||(Qu={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&ho.is(r.uri)&&C.string(r.name)}n.is=e})(Yu||(Yu={}));UC=[` +`,`\r +`,"\r"];(function(n){function e(s,o,a,u){return new el(s,o,a,u)}n.create=e;function t(s){let o=s;return!!(C.defined(o)&&C.string(o.uri)&&(C.undefined(o.languageId)||C.string(o.languageId))&&C.uinteger(o.lineCount)&&C.func(o.getText)&&C.func(o.positionAt)&&C.func(o.offsetAt))}n.is=t;function r(s,o){let a=s.getText(),u=i(o,(f,p)=>{let h=f.range.start.line-p.range.start.line;return h===0?f.range.start.character-p.range.start.character:h}),l=a.length;for(let f=u.length-1;f>=0;f--){let p=u[f],h=s.offsetAt(p.range.start),g=s.offsetAt(p.range.end);if(g<=l)a=a.substring(0,h)+p.newText+a.substring(g,a.length);else throw new Error("Overlapping edit");l=h}return a}n.applyEdits=r;function i(s,o){if(s.length<=1)return s;let a=s.length/2|0,u=s.slice(0,a),l=s.slice(a);i(u,o),i(l,o);let f=0,p=0,h=0;for(;f0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return Yt.create(0,e);for(;re?i=o:r=o+1}let s=r-1;return Yt.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(g){return g===!0||g===!1}n.boolean=i;function s(g){return e.call(g)==="[object String]"}n.string=s;function o(g){return e.call(g)==="[object Number]"}n.number=o;function a(g,_,y){return e.call(g)==="[object Number]"&&_<=g&&g<=y}n.numberRange=a;function u(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}n.integer=u;function l(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}n.uinteger=l;function f(g){return e.call(g)==="[object Function]"}n.func=f;function p(g){return g!==null&&typeof g=="object"}n.objectLiteral=p;function h(g,_){return Array.isArray(g)&&g.every(_)}n.typedArray=h})(C||(C={}))});var je=T(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.CM=wt.ProtocolNotificationType=wt.ProtocolNotificationType0=wt.ProtocolRequestType=wt.ProtocolRequestType0=wt.RegistrationType=wt.MessageDirection=void 0;var wi=Kn(),Rp;(function(n){n.clientToServer="clientToServer",n.serverToClient="serverToClient",n.both="both"})(Rp||(wt.MessageDirection=Rp={}));var tl=class{____;method;constructor(e){this.method=e}};wt.RegistrationType=tl;var nl=class extends wi.RequestType0{__;___;____;_pr;constructor(e){super(e)}};wt.ProtocolRequestType0=nl;var rl=class extends wi.RequestType{__;___;____;_pr;constructor(e){super(e,wi.ParameterStructures.byName)}};wt.ProtocolRequestType=rl;var il=class extends wi.NotificationType0{___;____;constructor(e){super(e)}};wt.ProtocolNotificationType0=il;var sl=class extends wi.NotificationType{___;____;constructor(e){super(e,wi.ParameterStructures.byName)}};wt.ProtocolNotificationType=sl;var Tp;(function(n){function e(t,r){return{client:t,server:r}}n.create=e})(Tp||(wt.CM=Tp={}))});var Po=T(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.boolean=HC;on.string=Op;on.number=WC;on.error=zC;on.func=KC;on.array=Ep;on.stringArray=BC;on.typedArray=VC;on.objectLiteral=GC;function HC(n){return n===!0||n===!1}function Op(n){return typeof n=="string"||n instanceof String}function WC(n){return typeof n=="number"||n instanceof Number}function zC(n){return n instanceof Error}function KC(n){return typeof n=="function"}function Ep(n){return Array.isArray(n)}function BC(n){return Ep(n)&&n.every(e=>Op(e))}function VC(n,e){return Array.isArray(n)&&n.every(e)}function GC(n){return n!==null&&typeof n=="object"}});var xp=T(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.ImplementationRequest=void 0;var ol=je(),qp;(function(n){n.method="textDocument/implementation",n.messageDirection=ol.MessageDirection.clientToServer,n.type=new ol.ProtocolRequestType(n.method),n.capabilities=ol.CM.create("textDocument.implementation","implementationProvider")})(qp||(Ro.ImplementationRequest=qp={}))});var Ip=T(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.TypeDefinitionRequest=void 0;var al=je(),Mp;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=al.MessageDirection.clientToServer,n.type=new al.ProtocolRequestType(n.method),n.capabilities=al.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(Mp||(To.TypeDefinitionRequest=Mp={}))});var Fp=T(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.DidChangeWorkspaceFoldersNotification=Si.WorkspaceFoldersRequest=void 0;var Di=je(),Np;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=Di.MessageDirection.serverToClient,n.type=new Di.ProtocolRequestType0(n.method),n.capabilities=Di.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Np||(Si.WorkspaceFoldersRequest=Np={}));var jp;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=Di.MessageDirection.clientToServer,n.type=new Di.ProtocolNotificationType(n.method),n.capabilities=Di.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(jp||(Si.DidChangeWorkspaceFoldersNotification=jp={}))});var Ap=T(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.ConfigurationRequest=void 0;var cl=je(),Lp;(function(n){n.method="workspace/configuration",n.messageDirection=cl.MessageDirection.serverToClient,n.type=new cl.ProtocolRequestType(n.method),n.capabilities=cl.CM.create("workspace.configuration",void 0)})(Lp||(Oo.ConfigurationRequest=Lp={}))});var Up=T(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.ColorPresentationRequest=Ri.DocumentColorRequest=void 0;var Pi=je(),kp;(function(n){n.method="textDocument/documentColor",n.messageDirection=Pi.MessageDirection.clientToServer,n.type=new Pi.ProtocolRequestType(n.method),n.capabilities=Pi.CM.create("textDocument.colorProvider","colorProvider")})(kp||(Ri.DocumentColorRequest=kp={}));var $p;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=Pi.MessageDirection.clientToServer,n.type=new Pi.ProtocolRequestType(n.method),n.capabilities=Pi.CM.create("textDocument.colorProvider","colorProvider")})($p||(Ri.ColorPresentationRequest=$p={}))});var zp=T(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.FoldingRangeRefreshRequest=Oi.FoldingRangeRequest=void 0;var Ti=je(),Hp;(function(n){n.method="textDocument/foldingRange",n.messageDirection=Ti.MessageDirection.clientToServer,n.type=new Ti.ProtocolRequestType(n.method),n.capabilities=Ti.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Hp||(Oi.FoldingRangeRequest=Hp={}));var Wp;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=Ti.MessageDirection.serverToClient,n.type=new Ti.ProtocolRequestType0(n.method),n.capabilities=Ti.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Wp||(Oi.FoldingRangeRefreshRequest=Wp={}))});var Bp=T(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.DeclarationRequest=void 0;var ul=je(),Kp;(function(n){n.method="textDocument/declaration",n.messageDirection=ul.MessageDirection.clientToServer,n.type=new ul.ProtocolRequestType(n.method),n.capabilities=ul.CM.create("textDocument.declaration","declarationProvider")})(Kp||(Eo.DeclarationRequest=Kp={}))});var Gp=T(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.SelectionRangeRequest=void 0;var ll=je(),Vp;(function(n){n.method="textDocument/selectionRange",n.messageDirection=ll.MessageDirection.clientToServer,n.type=new ll.ProtocolRequestType(n.method),n.capabilities=ll.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Vp||(qo.SelectionRangeRequest=Vp={}))});var Yp=T(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.WorkDoneProgressCancelNotification=Rr.WorkDoneProgressCreateRequest=Rr.WorkDoneProgress=void 0;var XC=Kn(),fs=je(),Xp;(function(n){n.type=new XC.ProgressType;function e(t){return t===n.type}n.is=e})(Xp||(Rr.WorkDoneProgress=Xp={}));var Jp;(function(n){n.method="window/workDoneProgress/create",n.messageDirection=fs.MessageDirection.serverToClient,n.type=new fs.ProtocolRequestType(n.method),n.capabilities=fs.CM.create("window.workDoneProgress",void 0)})(Jp||(Rr.WorkDoneProgressCreateRequest=Jp={}));var Qp;(function(n){n.method="window/workDoneProgress/cancel",n.messageDirection=fs.MessageDirection.clientToServer,n.type=new fs.ProtocolNotificationType(n.method)})(Qp||(Rr.WorkDoneProgressCancelNotification=Qp={}))});var ng=T(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.CallHierarchyOutgoingCallsRequest=Tr.CallHierarchyIncomingCallsRequest=Tr.CallHierarchyPrepareRequest=void 0;var Vn=je(),Zp;(function(n){n.method="textDocument/prepareCallHierarchy",n.messageDirection=Vn.MessageDirection.clientToServer,n.type=new Vn.ProtocolRequestType(n.method),n.capabilities=Vn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Zp||(Tr.CallHierarchyPrepareRequest=Zp={}));var eg;(function(n){n.method="callHierarchy/incomingCalls",n.messageDirection=Vn.MessageDirection.clientToServer,n.type=new Vn.ProtocolRequestType(n.method),n.capabilities=Vn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(eg||(Tr.CallHierarchyIncomingCallsRequest=eg={}));var tg;(function(n){n.method="callHierarchy/outgoingCalls",n.messageDirection=Vn.MessageDirection.clientToServer,n.type=new Vn.ProtocolRequestType(n.method),n.capabilities=Vn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(tg||(Tr.CallHierarchyOutgoingCallsRequest=tg={}))});var cg=T(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.SemanticTokensRefreshRequest=It.SemanticTokensRangeRequest=It.SemanticTokensDeltaRequest=It.SemanticTokensRequest=It.SemanticTokensRegistrationType=It.TokenFormat=void 0;var Ht=je(),rg;(function(n){n.Relative="relative"})(rg||(It.TokenFormat=rg={}));var hs;(function(n){n.method="textDocument/semanticTokens",n.type=new Ht.RegistrationType(n.method)})(hs||(It.SemanticTokensRegistrationType=hs={}));var ig;(function(n){n.method="textDocument/semanticTokens/full",n.messageDirection=Ht.MessageDirection.clientToServer,n.type=new Ht.ProtocolRequestType(n.method),n.registrationMethod=hs.method,n.capabilities=Ht.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(ig||(It.SemanticTokensRequest=ig={}));var sg;(function(n){n.method="textDocument/semanticTokens/full/delta",n.messageDirection=Ht.MessageDirection.clientToServer,n.type=new Ht.ProtocolRequestType(n.method),n.registrationMethod=hs.method,n.capabilities=Ht.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(sg||(It.SemanticTokensDeltaRequest=sg={}));var og;(function(n){n.method="textDocument/semanticTokens/range",n.messageDirection=Ht.MessageDirection.clientToServer,n.type=new Ht.ProtocolRequestType(n.method),n.registrationMethod=hs.method,n.capabilities=Ht.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(og||(It.SemanticTokensRangeRequest=og={}));var ag;(function(n){n.method="workspace/semanticTokens/refresh",n.messageDirection=Ht.MessageDirection.serverToClient,n.type=new Ht.ProtocolRequestType0(n.method),n.capabilities=Ht.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(ag||(It.SemanticTokensRefreshRequest=ag={}))});var lg=T(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.ShowDocumentRequest=void 0;var dl=je(),ug;(function(n){n.method="window/showDocument",n.messageDirection=dl.MessageDirection.serverToClient,n.type=new dl.ProtocolRequestType(n.method),n.capabilities=dl.CM.create("window.showDocument.support",void 0)})(ug||(xo.ShowDocumentRequest=ug={}))});var fg=T(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.LinkedEditingRangeRequest=void 0;var fl=je(),dg;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=fl.MessageDirection.clientToServer,n.type=new fl.ProtocolRequestType(n.method),n.capabilities=fl.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(dg||(Mo.LinkedEditingRangeRequest=dg={}))});var bg=T(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.WillDeleteFilesRequest=Dt.DidDeleteFilesNotification=Dt.DidRenameFilesNotification=Dt.WillRenameFilesRequest=Dt.DidCreateFilesNotification=Dt.WillCreateFilesRequest=Dt.FileOperationPatternKind=void 0;var ct=je(),hg;(function(n){n.file="file",n.folder="folder"})(hg||(Dt.FileOperationPatternKind=hg={}));var pg;(function(n){n.method="workspace/willCreateFiles",n.messageDirection=ct.MessageDirection.clientToServer,n.type=new ct.ProtocolRequestType(n.method),n.capabilities=ct.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(pg||(Dt.WillCreateFilesRequest=pg={}));var gg;(function(n){n.method="workspace/didCreateFiles",n.messageDirection=ct.MessageDirection.clientToServer,n.type=new ct.ProtocolNotificationType(n.method),n.capabilities=ct.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(gg||(Dt.DidCreateFilesNotification=gg={}));var mg;(function(n){n.method="workspace/willRenameFiles",n.messageDirection=ct.MessageDirection.clientToServer,n.type=new ct.ProtocolRequestType(n.method),n.capabilities=ct.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(mg||(Dt.WillRenameFilesRequest=mg={}));var _g;(function(n){n.method="workspace/didRenameFiles",n.messageDirection=ct.MessageDirection.clientToServer,n.type=new ct.ProtocolNotificationType(n.method),n.capabilities=ct.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(_g||(Dt.DidRenameFilesNotification=_g={}));var yg;(function(n){n.method="workspace/didDeleteFiles",n.messageDirection=ct.MessageDirection.clientToServer,n.type=new ct.ProtocolNotificationType(n.method),n.capabilities=ct.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(yg||(Dt.DidDeleteFilesNotification=yg={}));var vg;(function(n){n.method="workspace/willDeleteFiles",n.messageDirection=ct.MessageDirection.clientToServer,n.type=new ct.ProtocolRequestType(n.method),n.capabilities=ct.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(vg||(Dt.WillDeleteFilesRequest=vg={}))});var Sg=T(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.MonikerRequest=Or.MonikerKind=Or.UniquenessLevel=void 0;var hl=je(),Cg;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(Cg||(Or.UniquenessLevel=Cg={}));var wg;(function(n){n.$import="import",n.$export="export",n.local="local"})(wg||(Or.MonikerKind=wg={}));var Dg;(function(n){n.method="textDocument/moniker",n.messageDirection=hl.MessageDirection.clientToServer,n.type=new hl.ProtocolRequestType(n.method),n.capabilities=hl.CM.create("textDocument.moniker","monikerProvider")})(Dg||(Or.MonikerRequest=Dg={}))});var Og=T(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.TypeHierarchySubtypesRequest=Er.TypeHierarchySupertypesRequest=Er.TypeHierarchyPrepareRequest=void 0;var Br=je(),Pg;(function(n){n.method="textDocument/prepareTypeHierarchy",n.messageDirection=Br.MessageDirection.clientToServer,n.type=new Br.ProtocolRequestType(n.method),n.capabilities=Br.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(Pg||(Er.TypeHierarchyPrepareRequest=Pg={}));var Rg;(function(n){n.method="typeHierarchy/supertypes",n.messageDirection=Br.MessageDirection.clientToServer,n.type=new Br.ProtocolRequestType(n.method)})(Rg||(Er.TypeHierarchySupertypesRequest=Rg={}));var Tg;(function(n){n.method="typeHierarchy/subtypes",n.messageDirection=Br.MessageDirection.clientToServer,n.type=new Br.ProtocolRequestType(n.method)})(Tg||(Er.TypeHierarchySubtypesRequest=Tg={}))});var xg=T(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.InlineValueRefreshRequest=qi.InlineValueRequest=void 0;var Ei=je(),Eg;(function(n){n.method="textDocument/inlineValue",n.messageDirection=Ei.MessageDirection.clientToServer,n.type=new Ei.ProtocolRequestType(n.method),n.capabilities=Ei.CM.create("textDocument.inlineValue","inlineValueProvider")})(Eg||(qi.InlineValueRequest=Eg={}));var qg;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=Ei.MessageDirection.serverToClient,n.type=new Ei.ProtocolRequestType0(n.method),n.capabilities=Ei.CM.create("workspace.inlineValue.refreshSupport",void 0)})(qg||(qi.InlineValueRefreshRequest=qg={}))});var jg=T(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.InlayHintRefreshRequest=qr.InlayHintResolveRequest=qr.InlayHintRequest=void 0;var Gn=je(),Mg;(function(n){n.method="textDocument/inlayHint",n.messageDirection=Gn.MessageDirection.clientToServer,n.type=new Gn.ProtocolRequestType(n.method),n.capabilities=Gn.CM.create("textDocument.inlayHint","inlayHintProvider")})(Mg||(qr.InlayHintRequest=Mg={}));var Ig;(function(n){n.method="inlayHint/resolve",n.messageDirection=Gn.MessageDirection.clientToServer,n.type=new Gn.ProtocolRequestType(n.method),n.capabilities=Gn.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(Ig||(qr.InlayHintResolveRequest=Ig={}));var Ng;(function(n){n.method="workspace/inlayHint/refresh",n.messageDirection=Gn.MessageDirection.serverToClient,n.type=new Gn.ProtocolRequestType0(n.method),n.capabilities=Gn.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Ng||(qr.InlayHintRefreshRequest=Ng={}))});var Hg=T(ut=>{"use strict";var JC=ut&&ut.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),QC=ut&&ut.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),YC=ut&&ut.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var ew=Re&&Re.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),tw=Re&&Re.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),nw=Re&&Re.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.InlineCompletionRequest=void 0;var ml=je(),Jg;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=ml.MessageDirection.clientToServer,n.type=new ml.ProtocolRequestType(n.method),n.capabilities=ml.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Jg||(No.InlineCompletionRequest=Jg={}))});var em=T(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.TextDocumentContentRefreshRequest=Mi.TextDocumentContentRequest=void 0;var gs=je(),Yg;(function(n){n.method="workspace/textDocumentContent",n.messageDirection=gs.MessageDirection.clientToServer,n.type=new gs.ProtocolRequestType(n.method),n.capabilities=gs.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Yg||(Mi.TextDocumentContentRequest=Yg={}));var Zg;(function(n){n.method="workspace/textDocumentContent/refresh",n.messageDirection=gs.MessageDirection.serverToClient,n.type=new gs.ProtocolRequestType(n.method)})(Zg||(Mi.TextDocumentContentRefreshRequest=Zg={}))});var p_=T(m=>{"use strict";var rw=m&&m.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),iw=m&&m.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),sw=m&&m.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}n.hasId=e})(cm||(m.StaticRegistrationOptions=cm={}));var um;(function(n){function e(t){let r=t;return r&&(r.documentSelector===null||bl.is(r.documentSelector))}n.is=e})(um||(m.TextDocumentRegistrationOptions=um={}));var lm;(function(n){function e(r){let i=r;return lt.objectLiteral(i)&&(i.workDoneProgress===void 0||lt.boolean(i.workDoneProgress))}n.is=e;function t(r){let i=r;return i&<.boolean(i.workDoneProgress)}n.hasWorkDoneProgress=t})(lm||(m.WorkDoneProgressOptions=lm={}));var dm;(function(n){n.method="initialize",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method)})(dm||(m.InitializeRequest=dm={}));var fm;(function(n){n.unknownProtocolVersion=1})(fm||(m.InitializeErrorCodes=fm={}));var hm;(function(n){n.method="initialized",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType(n.method)})(hm||(m.InitializedNotification=hm={}));var pm;(function(n){n.method="shutdown",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType0(n.method)})(pm||(m.ShutdownRequest=pm={}));var gm;(function(n){n.method="exit",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType0(n.method)})(gm||(m.ExitNotification=gm={}));var mm;(function(n){n.method="workspace/didChangeConfiguration",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("workspace.didChangeConfiguration",void 0)})(mm||(m.DidChangeConfigurationNotification=mm={}));var _m;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4,n.Debug=5})(_m||(m.MessageType=_m={}));var ym;(function(n){n.method="window/showMessage",n.messageDirection=q.MessageDirection.serverToClient,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("window.showMessage",void 0)})(ym||(m.ShowMessageNotification=ym={}));var vm;(function(n){n.method="window/showMessageRequest",n.messageDirection=q.MessageDirection.serverToClient,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("window.showMessage",void 0)})(vm||(m.ShowMessageRequest=vm={}));var bm;(function(n){n.method="window/logMessage",n.messageDirection=q.MessageDirection.serverToClient,n.type=new q.ProtocolNotificationType(n.method)})(bm||(m.LogMessageNotification=bm={}));var Cm;(function(n){n.method="telemetry/event",n.messageDirection=q.MessageDirection.serverToClient,n.type=new q.ProtocolNotificationType(n.method)})(Cm||(m.TelemetryEventNotification=Cm={}));var wm;(function(n){n.None=0,n.Full=1,n.Incremental=2})(wm||(m.TextDocumentSyncKind=wm={}));var Dm;(function(n){n.method="textDocument/didOpen",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Dm||(m.DidOpenTextDocumentNotification=Dm={}));var Sm;(function(n){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}n.isIncremental=e;function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}n.isFull=t})(Sm||(m.TextDocumentContentChangeEvent=Sm={}));var Pm;(function(n){n.method="textDocument/didChange",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("textDocument.synchronization","textDocumentSync")})(Pm||(m.DidChangeTextDocumentNotification=Pm={}));var Rm;(function(n){n.method="textDocument/didClose",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Rm||(m.DidCloseTextDocumentNotification=Rm={}));var Tm;(function(n){n.method="textDocument/didSave",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Tm||(m.DidSaveTextDocumentNotification=Tm={}));var Om;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(Om||(m.TextDocumentSaveReason=Om={}));var Em;(function(n){n.method="textDocument/willSave",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Em||(m.WillSaveTextDocumentNotification=Em={}));var qm;(function(n){n.method="textDocument/willSaveWaitUntil",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(qm||(m.WillSaveTextDocumentWaitUntilRequest=qm={}));var xm;(function(n){n.method="workspace/didChangeWatchedFiles",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("workspace.didChangeWatchedFiles",void 0)})(xm||(m.DidChangeWatchedFilesNotification=xm={}));var Mm;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(Mm||(m.FileChangeType=Mm={}));var Cl;(function(n){function e(t){let r=t;return lt.objectLiteral(r)&&(tm.URI.is(r.baseUri)||tm.WorkspaceFolder.is(r.baseUri))&<.string(r.pattern)}n.is=e})(Cl||(m.RelativePattern=Cl={}));var wl;(function(n){function e(t){let r=t;return lt.string(r)||Cl.is(r)}n.is=e})(wl||(m.GlobPattern=wl={}));var Im;(function(n){n.Create=1,n.Change=2,n.Delete=4})(Im||(m.WatchKind=Im={}));var Nm;(function(n){n.method="textDocument/publishDiagnostics",n.messageDirection=q.MessageDirection.serverToClient,n.type=new q.ProtocolNotificationType(n.method),n.capabilities=q.CM.create("textDocument.publishDiagnostics",void 0)})(Nm||(m.PublishDiagnosticsNotification=Nm={}));var jm;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(jm||(m.CompletionTriggerKind=jm={}));var Fm;(function(n){n.method="textDocument/completion",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.completion","completionProvider")})(Fm||(m.CompletionRequest=Fm={}));var Lm;(function(n){n.method="completionItem/resolve",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Lm||(m.CompletionResolveRequest=Lm={}));var Am;(function(n){n.method="textDocument/hover",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.hover","hoverProvider")})(Am||(m.HoverRequest=Am={}));var km;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(km||(m.SignatureHelpTriggerKind=km={}));var $m;(function(n){n.method="textDocument/signatureHelp",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.signatureHelp","signatureHelpProvider")})($m||(m.SignatureHelpRequest=$m={}));var Um;(function(n){n.method="textDocument/definition",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.definition","definitionProvider")})(Um||(m.DefinitionRequest=Um={}));var Hm;(function(n){n.method="textDocument/references",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.references","referencesProvider")})(Hm||(m.ReferencesRequest=Hm={}));var Wm;(function(n){n.method="textDocument/documentHighlight",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Wm||(m.DocumentHighlightRequest=Wm={}));var zm;(function(n){n.method="textDocument/documentSymbol",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(zm||(m.DocumentSymbolRequest=zm={}));var Km;(function(n){n.method="textDocument/codeAction",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.codeAction","codeActionProvider")})(Km||(m.CodeActionRequest=Km={}));var Bm;(function(n){n.method="codeAction/resolve",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Bm||(m.CodeActionResolveRequest=Bm={}));var Vm;(function(n){n.method="workspace/symbol",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("workspace.symbol","workspaceSymbolProvider")})(Vm||(m.WorkspaceSymbolRequest=Vm={}));var Gm;(function(n){n.method="workspaceSymbol/resolve",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Gm||(m.WorkspaceSymbolResolveRequest=Gm={}));var Xm;(function(n){n.method="textDocument/codeLens",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.codeLens","codeLensProvider")})(Xm||(m.CodeLensRequest=Xm={}));var Jm;(function(n){n.method="codeLens/resolve",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Jm||(m.CodeLensResolveRequest=Jm={}));var Qm;(function(n){n.method="workspace/codeLens/refresh",n.messageDirection=q.MessageDirection.serverToClient,n.type=new q.ProtocolRequestType0(n.method),n.capabilities=q.CM.create("workspace.codeLens",void 0)})(Qm||(m.CodeLensRefreshRequest=Qm={}));var Ym;(function(n){n.method="textDocument/documentLink",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.documentLink","documentLinkProvider")})(Ym||(m.DocumentLinkRequest=Ym={}));var Zm;(function(n){n.method="documentLink/resolve",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Zm||(m.DocumentLinkResolveRequest=Zm={}));var e_;(function(n){n.method="textDocument/formatting",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.formatting","documentFormattingProvider")})(e_||(m.DocumentFormattingRequest=e_={}));var t_;(function(n){n.method="textDocument/rangeFormatting",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(t_||(m.DocumentRangeFormattingRequest=t_={}));var n_;(function(n){n.method="textDocument/rangesFormatting",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(n_||(m.DocumentRangesFormattingRequest=n_={}));var r_;(function(n){n.method="textDocument/onTypeFormatting",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(r_||(m.DocumentOnTypeFormattingRequest=r_={}));var i_;(function(n){n.Identifier=1})(i_||(m.PrepareSupportDefaultBehavior=i_={}));var s_;(function(n){n.method="textDocument/rename",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.rename","renameProvider")})(s_||(m.RenameRequest=s_={}));var o_;(function(n){n.method="textDocument/prepareRename",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(o_||(m.PrepareRenameRequest=o_={}));var a_;(function(n){n.method="workspace/executeCommand",n.messageDirection=q.MessageDirection.clientToServer,n.type=new q.ProtocolRequestType(n.method),n.capabilities=q.CM.create("workspace.executeCommand","executeCommandProvider")})(a_||(m.ExecuteCommandRequest=a_={}));var c_;(function(n){n.method="workspace/applyEdit",n.messageDirection=q.MessageDirection.serverToClient,n.type=new q.ProtocolRequestType("workspace/applyEdit"),n.capabilities=q.CM.create("workspace.applyEdit",void 0)})(c_||(m.ApplyWorkspaceEditRequest=c_={}))});var m_=T(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.createProtocolConnection=pw;var g_=Kn();function pw(n,e,t,r){return g_.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,g_.createMessageConnection)(n,e,t,r)}});var se=T(Nt=>{"use strict";var gw=Nt&&Nt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),jo=Nt&&Nt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&gw(e,n,t)};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.LSPErrorCodes=Nt.createProtocolConnection=void 0;jo(Kn(),Nt);jo((So(),Yi(Do)),Nt);jo(je(),Nt);jo(p_(),Nt);var mw=m_();Object.defineProperty(Nt,"createProtocolConnection",{enumerable:!0,get:function(){return mw.createProtocolConnection}});var __;(function(n){n.lspReservedErrorRangeStart=-32899,n.RequestFailed=-32803,n.ServerCancelled=-32802,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(__||(Nt.LSPErrorCodes=__={}))});var Fo=T(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.Semaphore=cn.Delayer=void 0;cn.setTestMode=_w;cn.clearTestMode=yw;cn.map=vw;cn.mapAsync=bw;cn.forEach=Cw;var ys=se(),El=class{defaultDelay;timeout;completionPromise;onSuccess;task;constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(r=>{this.onSuccess=r}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;let r=this.task();return this.task=void 0,r})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,ys.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){this.timeout!==void 0&&(this.timeout.dispose(),this.timeout=void 0)}};cn.Delayer=El;var ql=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ys.RAL)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};cn.Semaphore=ql;var xl=!1;function _w(){xl=!0}function yw(){xl=!1}var y_=15,_s=class{yieldAfter;startTime;counter;total;counterInterval;constructor(e=y_){this.yieldAfter=xl===!0?Math.max(e,2):Math.max(e,y_),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){let e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=this.total*2;break}}return!1}};async function vw(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),s=new _s(r?.yieldAfter);function o(u){s.start();for(let l=u;l{(0,ys.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(o(a))})});return i}async function bw(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),s=new _s(r?.yieldAfter);async function o(u){s.start();for(let l=u;l{(0,ys.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(o(a))})});return i}async function Cw(n,e,t,r){if(n.length===0)return;let i=new _s(r?.yieldAfter);function s(a){i.start();for(let u=a;u{(0,ys.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?a(-1):a(s(o))})})}});var Il=T(Jn=>{"use strict";var ww=Jn&&Jn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Dw=Jn&&Jn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Sw=Jn&&Jn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Rw=Qn&&Qn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Tw=Qn&&Qn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ow=Qn&&Qn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var qw=Yn&&Yn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),xw=Yn&&Yn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Mw=Yn&&Yn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Nw=Zn&&Zn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),jw=Zn&&Zn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Fw=Zn&&Zn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Aw=Zt&&Zt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kw=Zt&&Zt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),b_=Zt&&Zt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Uw=er&&er.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Hw=er&&er.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ww=er&&er.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Kw=tr&&tr.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Bw=tr&&tr.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Vw=tr&&tr.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Xw=nr&&nr.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Jw=nr&&nr.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Qw=nr&&nr.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Yw=rr&&rr.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Zw=rr&&rr.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),eD=rr&&rr.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var nD=un&&un.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),rD=un&&un.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ao=un&&un.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;id.toString());function r(d){return t(d)}function i(d){return{uri:t(d.uri)}}function s(d){return{uri:t(d.uri),languageId:d.languageId,version:d.version,text:d.getText()}}function o(d){return{uri:t(d.uri),version:d.version}}function a(d){return{textDocument:s(d)}}function u(d){let S=d;return!!S.document&&!!S.contentChanges}function l(d){let S=d;return!!S.uri&&!!S.version}function f(d,S,J){if(l(d))return{textDocument:{uri:t(d.uri),version:d.version},contentChanges:[{text:d.getText()}]};if(u(d)){let Ee=S,Ce=J;return{textDocument:{uri:t(Ee),version:Ce},contentChanges:d.contentChanges.map(xt=>{let Hn=xt.range;return{range:{start:{line:Hn.start.line,character:Hn.start.character},end:{line:Hn.end.line,character:Hn.end.character}},rangeLength:xt.rangeLength,text:xt.text}})}}else throw Error("Unsupported text document change parameter")}function p(d){return{textDocument:i(d)}}function h(d,S=!1){let J={textDocument:i(d)};return S&&(J.text=d.getText()),J}function g(d){switch(d){case Je.TextDocumentSaveReason.Manual:return ie.TextDocumentSaveReason.Manual;case Je.TextDocumentSaveReason.AfterDelay:return ie.TextDocumentSaveReason.AfterDelay;case Je.TextDocumentSaveReason.FocusOut:return ie.TextDocumentSaveReason.FocusOut}return ie.TextDocumentSaveReason.Manual}function _(d){return{textDocument:i(d.document),reason:g(d.reason)}}function y(d){return{files:d.files.map(S=>({uri:t(S)}))}}function D(d){return{files:d.files.map(S=>({oldUri:t(S.oldUri),newUri:t(S.newUri)}))}}function M(d){return{files:d.files.map(S=>({uri:t(S)}))}}function w(d){return{files:d.files.map(S=>({uri:t(S)}))}}function I(d){return{files:d.files.map(S=>({oldUri:t(S.oldUri),newUri:t(S.newUri)}))}}function j(d){return{files:d.files.map(S=>({uri:t(S)}))}}function A(d,S){return{textDocument:i(d),position:R(S)}}function de(d){switch(d){case Je.CompletionTriggerKind.TriggerCharacter:return ie.CompletionTriggerKind.TriggerCharacter;case Je.CompletionTriggerKind.TriggerForIncompleteCompletions:return ie.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return ie.CompletionTriggerKind.Invoked}}function le(d,S,J){return{textDocument:i(d),position:R(S),context:{triggerKind:de(J.triggerKind),triggerCharacter:J.triggerCharacter}}}function Pe(d){switch(d){case Je.SignatureHelpTriggerKind.Invoke:return ie.SignatureHelpTriggerKind.Invoked;case Je.SignatureHelpTriggerKind.TriggerCharacter:return ie.SignatureHelpTriggerKind.TriggerCharacter;case Je.SignatureHelpTriggerKind.ContentChange:return ie.SignatureHelpTriggerKind.ContentChange}}function Ot(d){return{label:d.label}}function gn(d){return d.map(Ot)}function $(d){return{label:d.label,parameters:gn(d.parameters)}}function O(d){return d.map($)}function V(d){return d===void 0?d:{signatures:O(d.signatures),activeSignature:d.activeSignature,activeParameter:d.activeParameter}}function z(d,S,J){return{textDocument:i(d),position:R(S),context:{isRetrigger:J.isRetrigger,triggerCharacter:J.triggerCharacter,triggerKind:Pe(J.triggerKind),activeSignatureHelp:V(J.activeSignatureHelp)}}}function R(d){return{line:d.line,character:d.character}}function N(d){return d==null?d:{line:d.line>ie.uinteger.MAX_VALUE?ie.uinteger.MAX_VALUE:d.line,character:d.character>ie.uinteger.MAX_VALUE?ie.uinteger.MAX_VALUE:d.character}}function F(d,S){return C_.map(d,N,S)}function W(d){return d.map(N)}function U(d){return d==null?d:{start:N(d.start),end:N(d.end)}}function B(d){return d.map(U)}function ne(d){return d==null?d:ie.Location.create(r(d.uri),U(d.range))}function oe(d){switch(d){case Je.DiagnosticSeverity.Error:return ie.DiagnosticSeverity.Error;case Je.DiagnosticSeverity.Warning:return ie.DiagnosticSeverity.Warning;case Je.DiagnosticSeverity.Information:return ie.DiagnosticSeverity.Information;case Je.DiagnosticSeverity.Hint:return ie.DiagnosticSeverity.Hint}}function Ue(d){if(!d)return;let S=[];for(let J of d){let Ee=_e(J);Ee!==void 0&&S.push(Ee)}return S.length>0?S:void 0}function _e(d){switch(d){case Je.DiagnosticTag.Unnecessary:return ie.DiagnosticTag.Unnecessary;case Je.DiagnosticTag.Deprecated:return ie.DiagnosticTag.Deprecated;default:return}}function st(d){return{message:d.message,location:ne(d.location)}}function At(d){return d.map(st)}function ai(d){if(d!=null)return Gr.number(d)||Gr.string(d)?d:{value:d.value,target:r(d.target)}}function hr(d){let S=ie.Diagnostic.create(U(d.range),d.message),J=d instanceof D_.ProtocolDiagnostic?d:void 0;J!==void 0&&J.data!==void 0&&(S.data=J.data);let Ee=ai(d.code);return D_.DiagnosticCode.is(Ee)?J!==void 0&&J.hasDiagnosticCode?S.code=Ee:(S.code=Ee.value,S.codeDescription={href:Ee.target}):S.code=Ee,Gr.number(d.severity)&&(S.severity=oe(d.severity)),Array.isArray(d.tags)&&(S.tags=Ue(d.tags)),d.relatedInformation&&(S.relatedInformation=At(d.relatedInformation)),d.source&&(S.source=d.source),S}function pr(d,S){return d==null?d:C_.map(d,hr,S)}function gr(d){return d==null?d:d.map(hr)}function Xi(d,S){switch(d){case"$string":return S;case ie.MarkupKind.PlainText:return{kind:d,value:S};case ie.MarkupKind.Markdown:return{kind:d,value:S.value};default:return`Unsupported Markup content received. Kind is: ${d}`}}function ci(d){if(d===Je.CompletionItemTag.Deprecated)return ie.CompletionItemTag.Deprecated}function kt(d){if(d===void 0)return d;let S=[];for(let J of d){let Ee=ci(J);Ee!==void 0&&S.push(Ee)}return S}function Ji(d,S){return S!==void 0?S:d+1}function mn(d,S=!1){let J,Ee;Gr.string(d.label)?J=d.label:(J=d.label.label,S&&(d.label.detail!==void 0||d.label.description!==void 0)&&(Ee={detail:d.label.detail,description:d.label.description}));let Ce={label:J};Ee!==void 0&&(Ce.labelDetails=Ee);let pt=d instanceof iD.default?d:void 0;d.detail&&(Ce.detail=d.detail),d.documentation&&(!pt||pt.documentationFormat==="$string"?Ce.documentation=d.documentation:Ce.documentation=Xi(pt.documentationFormat,d.documentation)),d.filterText&&(Ce.filterText=d.filterText),mr(Ce,d),Gr.number(d.kind)&&(Ce.kind=Ji(d.kind,pt&&pt.originalItemKind)),d.sortText&&(Ce.sortText=d.sortText),d.additionalTextEdits&&(Ce.additionalTextEdits=ui(d.additionalTextEdits)),d.commitCharacters&&(Ce.commitCharacters=d.commitCharacters.slice()),d.command&&(Ce.command=be(d.command)),(d.preselect===!0||d.preselect===!1)&&(Ce.preselect=d.preselect);let xt=kt(d.tags);if(pt){if(pt.data!==void 0&&(Ce.data=pt.data),pt.deprecated===!0||pt.deprecated===!1){if(pt.deprecated===!0&&xt!==void 0&&xt.length>0){let Hn=xt.indexOf(Je.CompletionItemTag.Deprecated);Hn!==-1&&xt.splice(Hn,1)}Ce.deprecated=pt.deprecated}pt.insertTextMode!==void 0&&(Ce.insertTextMode=pt.insertTextMode)}return xt!==void 0&&xt.length>0&&(Ce.tags=xt),Ce.insertTextMode===void 0&&d.keepWhitespace===!0&&(Ce.insertTextMode=ie.InsertTextMode.adjustIndentation),Ce}function mr(d,S){let J=ie.InsertTextFormat.PlainText,Ee,Ce;S.textEdit?(Ee=S.textEdit.newText,Ce=S.textEdit.range):S.insertText instanceof Je.SnippetString?(J=ie.InsertTextFormat.Snippet,Ee=S.insertText.value):Ee=S.insertText,S.range&&(Ce=S.range),d.insertTextFormat=J,S.fromEdit&&Ee!==void 0&&Ce!==void 0?d.textEdit=_r(Ee,Ce):d.insertText=Ee}function _r(d,S){return Ql.is(S)?ie.InsertReplaceEdit.create(d,U(S.inserting),U(S.replacing)):{newText:d,range:U(S)}}function kn(d){return{range:U(d.range),newText:d.newText}}function ui(d){return d==null?d:d.map(kn)}function mt(d){return d<=Je.SymbolKind.TypeParameter?d+1:ie.SymbolKind.Property}function rn(d){return d}function _t(d){return d.map(rn)}function Qi(d,S,J){return{textDocument:i(d),position:R(S),context:{includeDeclaration:J.includeDeclaration}}}async function ht(d,S){let J=ie.CodeAction.create(d.title);if(d instanceof w_.default&&d.data!==void 0&&(J.data=d.data),d.kind!==void 0&&(J.kind=Gt(d.kind)),d.diagnostics!==void 0&&(J.diagnostics=await pr(d.diagnostics,S)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(J.command=be(d.command)),d.isPreferred!==void 0&&(J.isPreferred=d.isPreferred),d.disabled!==void 0&&(J.disabled={reason:d.disabled.reason}),d.isAI&&(J.tags??=[],J.tags.push(ie.CodeActionTag.LLMGenerated)),J}function $n(d){let S=ie.CodeAction.create(d.title);if(d instanceof w_.default&&d.data!==void 0&&(S.data=d.data),d.kind!==void 0&&(S.kind=Gt(d.kind)),d.diagnostics!==void 0&&(S.diagnostics=gr(d.diagnostics)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(S.command=be(d.command)),d.isPreferred!==void 0&&(S.isPreferred=d.isPreferred),d.disabled!==void 0&&(S.disabled={reason:d.disabled.reason}),d.isAI&&(S.tags??=[],S.tags.push(ie.CodeActionTag.LLMGenerated)),S}async function li(d,S){if(d==null)return d;let J;return d.only&&Gr.string(d.only.value)&&(J=[d.only.value]),ie.CodeActionContext.create(await pr(d.diagnostics,S),J,yr(d.triggerKind))}function Hr(d){if(d==null)return d;let S;return d.only&&Gr.string(d.only.value)&&(S=[d.only.value]),ie.CodeActionContext.create(gr(d.diagnostics),S,yr(d.triggerKind))}function yr(d){switch(d){case Je.CodeActionTriggerKind.Invoke:return ie.CodeActionTriggerKind.Invoked;case Je.CodeActionTriggerKind.Automatic:return ie.CodeActionTriggerKind.Automatic;default:return}}function Gt(d){if(d!=null)return d.value}function v(d){return ie.InlineValueContext.create(d.frameId,U(d.stoppedLocation))}function x(d,S,J){return{textDocument:i(d),position:N(S),context:k(J)}}function k(d){return{triggerKind:Q(d.triggerKind),selectedCompletionInfo:he(d.selectedCompletionInfo)}}function Q(d){switch(d){case Je.InlineCompletionTriggerKind.Invoke:return ie.InlineCompletionTriggerKind.Invoked;case Je.InlineCompletionTriggerKind.Automatic:return ie.InlineCompletionTriggerKind.Automatic}}function he(d){if(d!=null)return{range:U(d.range),text:d.text}}function be(d){let S=ie.Command.create(d.title,d.command);return d.tooltip&&(S.tooltip=d.tooltip),d.arguments&&(S.arguments=d.arguments),S}function ye(d){let S=ie.CodeLens.create(U(d.range));return d.command&&(S.command=be(d.command)),d instanceof sD.default&&d.data&&(S.data=d.data),S}function He(d,S){let J={tabSize:d.tabSize,insertSpaces:d.insertSpaces};return S.trimTrailingWhitespace&&(J.trimTrailingWhitespace=!0),S.trimFinalNewlines&&(J.trimFinalNewlines=!0),S.insertFinalNewline&&(J.insertFinalNewline=!0),J}function Ye(d){return{textDocument:i(d)}}function Oe(d){return{textDocument:i(d)}}function Me(d){let S=ie.DocumentLink.create(U(d.range));d.target&&(S.target=r(d.target)),d.tooltip!==void 0&&(S.tooltip=d.tooltip);let J=d instanceof oD.default?d:void 0;return J&&J.data&&(S.data=J.data),S}function yt(d){return{textDocument:i(d)}}function Et(d){let S={name:d.name,kind:mt(d.kind),uri:r(d.uri),range:U(d.range),selectionRange:U(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(S.detail=d.detail),d.tags!==void 0&&(S.tags=_t(d.tags)),d instanceof aD.default&&d.data!==void 0&&(S.data=d.data),S}function Un(d){let S={name:d.name,kind:mt(d.kind),uri:r(d.uri),range:U(d.range),selectionRange:U(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(S.detail=d.detail),d.tags!==void 0&&(S.tags=_t(d.tags)),d instanceof cD.default&&d.data!==void 0&&(S.data=d.data),S}function $t(d){let S=d instanceof uD.default?{name:d.name,kind:mt(d.kind),location:d.hasRange?ne(d.location):{uri:t(d.location.uri)},data:d.data}:{name:d.name,kind:mt(d.kind),location:ne(d.location)};return d.tags!==void 0&&(S.tags=_t(d.tags)),d.containerName!==""&&(S.containerName=d.containerName),S}function qt(d){let S=typeof d.label=="string"?d.label:d.label.map(di),J=ie.InlayHint.create(N(d.position),S);return d.kind!==void 0&&(J.kind=d.kind),d.textEdits!==void 0&&(J.textEdits=ui(d.textEdits)),d.tooltip!==void 0&&(J.tooltip=Xs(d.tooltip)),d.paddingLeft!==void 0&&(J.paddingLeft=d.paddingLeft),d.paddingRight!==void 0&&(J.paddingRight=d.paddingRight),d instanceof lD.default&&d.data!==void 0&&(J.data=d.data),J}function di(d){let S=ie.InlayHintLabelPart.create(d.value);return d.location!==void 0&&(S.location=ne(d.location)),d.command!==void 0&&(S.command=be(d.command)),d.tooltip!==void 0&&(S.tooltip=Xs(d.tooltip)),S}function Xs(d){return typeof d=="string"?d:{kind:ie.MarkupKind.Markdown,value:d.value}}return{asUri:r,asTextDocumentIdentifier:i,asTextDocumentItem:s,asVersionedTextDocumentIdentifier:o,asOpenTextDocumentParams:a,asChangeTextDocumentParams:f,asCloseTextDocumentParams:p,asSaveTextDocumentParams:h,asWillSaveTextDocumentParams:_,asDidCreateFilesParams:y,asDidRenameFilesParams:D,asDidDeleteFilesParams:M,asWillCreateFilesParams:w,asWillRenameFilesParams:I,asWillDeleteFilesParams:j,asTextDocumentPositionParams:A,asCompletionParams:le,asSignatureHelpParams:z,asWorkerPosition:R,asRange:U,asRanges:B,asPosition:N,asPositions:F,asPositionsSync:W,asLocation:ne,asDiagnosticSeverity:oe,asDiagnosticTag:_e,asDiagnostic:hr,asDiagnostics:pr,asDiagnosticsSync:gr,asCompletionItem:mn,asTextEdit:kn,asSymbolKind:mt,asSymbolTag:rn,asSymbolTags:_t,asReferenceParams:Qi,asCodeAction:ht,asCodeActionSync:$n,asCodeActionContext:li,asCodeActionContextSync:Hr,asInlineValueContext:v,asCommand:be,asCodeLens:ye,asFormattingOptions:He,asDocumentSymbolParams:Ye,asCodeLensParams:Oe,asDocumentLink:Me,asDocumentLinkParams:yt,asCallHierarchyItem:Et,asTypeHierarchyItem:Un,asInlayHint:qt,asWorkspaceSymbol:$t,asInlineCompletionParams:x,asInlineCompletionContext:k}}});var T_=T(ln=>{"use strict";var fD=ln&&ln.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),hD=ln&&ln.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),$o=ln&&ln.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;iH.Uri.parse(c));function o(c){return s(c)}function a(c){let b=[];for(let E of c)if(typeof E=="string")b.push(E);else if(R_.NotebookCellTextDocumentFilter.is(E))if(typeof E.notebook=="string")b.push({notebookType:E.notebook,language:E.language});else{let K=E.notebook.notebookType??"*";b.push({notebookType:K,scheme:E.notebook.scheme,pattern:Wa(E.notebook.pattern),language:E.language})}else R_.TextDocumentFilter.is(E)&&b.push({language:E.language,scheme:E.scheme,pattern:Wa(E.pattern)});return b}async function u(c,b){return ve.map(c,f,b)}function l(c){let b=new Array(c.length);for(let E=0;E0?b:void 0}function g(c){switch(c){case ee.DiagnosticTag.Unnecessary:return H.DiagnosticTag.Unnecessary;case ee.DiagnosticTag.Deprecated:return H.DiagnosticTag.Deprecated;default:return}}function _(c){return c?new H.Position(c.line,c.character):void 0}function y(c){return c?new H.Range(c.start.line,c.start.character,c.end.line,c.end.character):void 0}async function D(c,b){return ve.map(c,E=>new H.Range(E.start.line,E.start.character,E.end.line,E.end.character),b)}function M(c){if(c==null)return H.DiagnosticSeverity.Error;switch(c){case ee.DiagnosticSeverity.Error:return H.DiagnosticSeverity.Error;case ee.DiagnosticSeverity.Warning:return H.DiagnosticSeverity.Warning;case ee.DiagnosticSeverity.Information:return H.DiagnosticSeverity.Information;case ee.DiagnosticSeverity.Hint:return H.DiagnosticSeverity.Hint}return H.DiagnosticSeverity.Error}function w(c){if(Wt.string(c))return j(c);if(ko.is(c))return j().appendCodeblock(c.value,c.language);if(Array.isArray(c)){let b=[];for(let E of c){let K=j();ko.is(E)?K.appendCodeblock(E.value,E.language):K.appendMarkdown(E),b.push(K)}return b}else return j(c)}function I(c){if(Wt.string(c))return c;switch(c.kind){case ee.MarkupKind.Markdown:return j(c.value);case ee.MarkupKind.PlainText:return c.value;default:return`Unsupported Markup content received. Kind is: ${c.kind}`}}function j(c){let b;if(c===void 0||typeof c=="string")b=new H.MarkdownString(c);else switch(c.kind){case ee.MarkupKind.Markdown:b=new H.MarkdownString(c.value);break;case ee.MarkupKind.PlainText:b=new H.MarkdownString,b.appendText(c.value);break;default:b=new H.MarkdownString,b.appendText(`Unsupported Markup content received. Kind is: ${c.kind}`);break}return b.isTrusted=e,b.supportHtml=t,b.supportThemeIcons=r,b}function A(c){if(c)return new H.Hover(w(c.contents),y(c.range))}async function de(c,b,E){if(!c)return;if(Array.isArray(c))return ve.map(c,Wn=>$(Wn,b),E);let K=c,{defaultRange:We,commitCharacters:Qe}=le(K,b),qe=await ve.map(K.items,Wn=>$(Wn,Qe,K.applyKind?.commitCharacters,We,K.itemDefaults?.insertTextMode,K.itemDefaults?.insertTextFormat,K.itemDefaults?.data,K.applyKind?.data),E);return new H.CompletionList(qe,K.isIncomplete)}function le(c,b){let E=c.itemDefaults?.editRange,K=c.itemDefaults?.commitCharacters??b;return ee.Range.is(E)?{defaultRange:y(E),commitCharacters:K}:E!==void 0?{defaultRange:{inserting:y(E.insert),replacing:y(E.replace)},commitCharacters:K}:{defaultRange:void 0,commitCharacters:K}}function Pe(c){return ee.CompletionItemKind.Text<=c&&c<=ee.CompletionItemKind.TypeParameter?[c-1,void 0]:[H.CompletionItemKind.Text,c]}function Ot(c){if(c===ee.CompletionItemTag.Deprecated)return H.CompletionItemTag.Deprecated}function gn(c){if(c==null)return[];let b=[];for(let E of c){let K=Ot(E);K!==void 0&&b.push(K)}return b}function $(c,b,E,K,We,Qe,qe,Wn){let vr=gn(c.tags),Xt=z(c),Ze=new pD.default(Xt);c.detail&&(Ze.detail=c.detail),c.documentation&&(Ze.documentation=I(c.documentation),Ze.documentationFormat=Wt.string(c.documentation)?"$string":c.documentation.kind),c.filterText&&(Ze.filterText=c.filterText);let Js=R(c,K,Qe);if(Js&&(Ze.insertText=Js.text,Ze.range=Js.range,Ze.fromEdit=Js.fromEdit),Wt.number(c.kind)){let[$b,Qh]=Pe(c.kind);Ze.kind=$b,Qh&&(Ze.originalItemKind=Qh)}c.sortText&&(Ze.sortText=c.sortText),c.additionalTextEdits&&(Ze.additionalTextEdits=U(c.additionalTextEdits));let Xh=O(c,b,E);Xh&&(Ze.commitCharacters=Xh.slice()),c.command&&(Ze.command=_t(c.command)),(c.deprecated===!0||c.deprecated===!1)&&(Ze.deprecated=c.deprecated,c.deprecated===!0&&vr.push(H.CompletionItemTag.Deprecated)),(c.preselect===!0||c.preselect===!1)&&(Ze.preselect=c.preselect);let Jh=V(c,qe,Wn);Jh!==void 0&&(Ze.data=Jh),vr.length>0&&(Ze.tags=vr);let Ka=c.insertTextMode??We;return Ka!==void 0&&(Ze.insertTextMode=Ka,Ka===ee.InsertTextMode.asIs&&(Ze.keepWhitespace=!0)),Ze}function O(c,b,E){if(E===ee.ApplyKind.Merge){if(!b&&!c.commitCharacters)return;let K=new Set;if(b)for(let We of b)K.add(We);if(Wt.stringArray(c.commitCharacters))for(let We of c.commitCharacters)K.add(We);return Array.from(K)}return c.commitCharacters!==void 0?Wt.stringArray(c.commitCharacters)?c.commitCharacters:void 0:b}function V(c,b,E){if(E===ee.ApplyKind.Merge){let K={...b};return c.data&&Object.entries(c.data).forEach(([We,Qe])=>{Qe!=null&&(K[We]=Qe)}),K}return c.data??b}function z(c){return ee.CompletionItemLabelDetails.is(c.labelDetails)?{label:c.label,detail:c.labelDetails.detail,description:c.labelDetails.description}:c.label}function R(c,b,E){let K=c.insertTextFormat??E;if(c.textEdit!==void 0||b!==void 0){let[We,Qe]=c.textEdit!==void 0?N(c.textEdit):[b,c.textEditText??c.label];return K===ee.InsertTextFormat.Snippet?{text:new H.SnippetString(Qe),range:We,fromEdit:!0}:{text:Qe,range:We,fromEdit:!0}}else return c.insertText?K===ee.InsertTextFormat.Snippet?{text:new H.SnippetString(c.insertText),fromEdit:!1}:{text:c.insertText,fromEdit:!1}:void 0}function N(c){return ee.InsertReplaceEdit.is(c)?[{inserting:y(c.insert),replacing:y(c.replace)},c.newText]:[y(c.range),c.newText]}function F(c){if(c)return new H.TextEdit(y(c.range),c.newText)}async function W(c,b){if(c)return ve.map(c,F,b)}function U(c){if(!c)return;let b=new Array(c.length);for(let E=0;E0){let E=[];for(let K of c.children)E.push(mt(K));b.children=E}return b}function rn(c,b){c.tags=_r(b.tags),b.deprecated&&(c.tags?c.tags.includes(H.SymbolTag.Deprecated)||(c.tags=c.tags.concat(H.SymbolTag.Deprecated)):c.tags=[H.SymbolTag.Deprecated])}function _t(c){let b={title:c.title,command:c.command};return c.tooltip&&(b.tooltip=c.tooltip),c.arguments&&(b.arguments=c.arguments),b}async function Qi(c,b){if(c)return ve.map(c,_t,b)}let ht=new Map;ht.set(ee.CodeActionKind.Empty,H.CodeActionKind.Empty),ht.set(ee.CodeActionKind.QuickFix,H.CodeActionKind.QuickFix),ht.set(ee.CodeActionKind.Refactor,H.CodeActionKind.Refactor),ht.set(ee.CodeActionKind.RefactorExtract,H.CodeActionKind.RefactorExtract),ht.set(ee.CodeActionKind.RefactorInline,H.CodeActionKind.RefactorInline),ht.set(ee.CodeActionKind.RefactorRewrite,H.CodeActionKind.RefactorRewrite),ht.set(ee.CodeActionKind.Source,H.CodeActionKind.Source),ht.set(ee.CodeActionKind.SourceOrganizeImports,H.CodeActionKind.SourceOrganizeImports);function $n(c){if(c==null)return;let b=ht.get(c);if(b)return b;let E=c.split(".");b=H.CodeActionKind.Empty;for(let K of E)b=b.append(K);return b}function li(c){if(c!=null)return c.map(b=>$n(b))}function Hr(c){if(c!=null)return c.map(b=>({kind:$n(b.kind),command:_t(b.command)}))}async function yr(c,b){if(c==null)return;let E=new _D.default(c.title,c.data);return c.kind!==void 0&&(E.kind=$n(c.kind)),c.diagnostics!==void 0&&(E.diagnostics=l(c.diagnostics)),c.edit!==void 0&&(E.edit=await k(c.edit,b)),c.command!==void 0&&(E.command=_t(c.command)),c.isPreferred!==void 0&&(E.isPreferred=c.isPreferred),c.disabled!==void 0&&(E.disabled={reason:c.disabled.reason}),c.tags?.includes(ee.CodeActionTag.LLMGenerated)&&(E.isAI=!0),E}function Gt(c,b){return ve.mapAsync(c,async E=>ee.Command.is(E)?_t(E):yr(E,b),b)}function v(c){if(!c)return;let b=new gD.default(y(c.range));return c.command&&(b.command=_t(c.command)),c.data!==void 0&&c.data!==null&&(b.data=c.data),b}async function x(c,b){if(c)return ve.map(c,v,b)}async function k(c,b){if(!c)return;let E=new Map;if(c.changeAnnotations!==void 0){let Qe=c.changeAnnotations;await ve.forEach(Object.keys(Qe),qe=>{let Wn=Q(Qe[qe]);E.set(qe,Wn)},b)}let K=Qe=>{if(Qe!==void 0)return E.get(Qe)},We=new H.WorkspaceEdit;if(c.documentChanges){let Qe=c.documentChanges;await ve.forEach(Qe,qe=>{if(ee.CreateFile.is(qe))We.createFile(s(qe.uri),qe.options,K(qe.annotationId));else if(ee.RenameFile.is(qe))We.renameFile(s(qe.oldUri),s(qe.newUri),qe.options,K(qe.annotationId));else if(ee.DeleteFile.is(qe))We.deleteFile(s(qe.uri),qe.options,K(qe.annotationId));else if(ee.TextDocumentEdit.is(qe)){let Wn=s(qe.textDocument.uri),vr=[];for(let Xt of qe.edits)ee.AnnotatedTextEdit.is(Xt)?vr.push([new H.TextEdit(y(Xt.range),Xt.newText),K(Xt.annotationId)]):ee.SnippetTextEdit.is(Xt)?vr.push([new H.SnippetTextEdit(y(Xt.range),new H.SnippetString(Xt.snippet.value)),K(Xt.annotationId)]):vr.push([new H.TextEdit(y(Xt.range),Xt.newText),void 0]);We.set(Wn,vr)}else throw new Error(`Unknown workspace edit change received: +${JSON.stringify(qe,void 0,4)}`)},b)}else if(c.changes){let Qe=c.changes;await ve.forEach(Object.keys(Qe),qe=>{We.set(s(qe),U(Qe[qe]))},b)}return We}function Q(c){if(c!==void 0)return{label:c.label,needsConfirmation:!!c.needsConfirmation,description:c.description}}function he(c){let b=y(c.range),E=c.target?o(c.target):void 0,K=new mD.default(b,E);return c.tooltip!==void 0&&(K.tooltip=c.tooltip),c.data!==void 0&&c.data!==null&&(K.data=c.data),K}async function be(c,b){if(c)return ve.map(c,he,b)}function ye(c){return new H.Color(c.red,c.green,c.blue,c.alpha)}function He(c){return new H.ColorInformation(y(c.range),ye(c.color))}async function Ye(c,b){if(c)return ve.map(c,He,b)}function Oe(c){let b=new H.ColorPresentation(c.label);return b.additionalTextEdits=U(c.additionalTextEdits),c.textEdit&&(b.textEdit=F(c.textEdit)),b}async function Me(c,b){if(c)return ve.map(c,Oe,b)}function yt(c){if(c)switch(c){case ee.FoldingRangeKind.Comment:return H.FoldingRangeKind.Comment;case ee.FoldingRangeKind.Imports:return H.FoldingRangeKind.Imports;case ee.FoldingRangeKind.Region:return H.FoldingRangeKind.Region}}function Et(c){return new H.FoldingRange(c.startLine,c.endLine,yt(c.kind))}async function Un(c,b){if(c)return ve.map(c,Et,b)}function $t(c){return new H.SelectionRange(y(c.range),c.parent?$t(c.parent):void 0)}async function qt(c,b){return Array.isArray(c)?ve.map(c,$t,b):[]}function di(c){return ee.InlineValueText.is(c)?new H.InlineValueText(y(c.range),c.text):ee.InlineValueVariableLookup.is(c)?new H.InlineValueVariableLookup(y(c.range),c.variableName,c.caseSensitiveLookup):new H.InlineValueEvaluatableExpression(y(c.range),c.expression)}async function Xs(c,b){return Array.isArray(c)?ve.map(c,di,b):[]}async function d(c,b){let E=typeof c.label=="string"?c.label:await ve.map(c.label,S,b),K=new CD.default(_(c.position),E);return c.kind!==void 0&&(K.kind=c.kind),c.textEdits!==void 0&&(K.textEdits=await W(c.textEdits,b)),c.tooltip!==void 0&&(K.tooltip=J(c.tooltip)),c.paddingLeft!==void 0&&(K.paddingLeft=c.paddingLeft),c.paddingRight!==void 0&&(K.paddingRight=c.paddingRight),c.data!==void 0&&(K.data=c.data),K}function S(c){let b=new H.InlayHintLabelPart(c.value);return c.location!==void 0&&(b.location=st(c.location)),c.tooltip!==void 0&&(b.tooltip=J(c.tooltip)),c.command!==void 0&&(b.command=_t(c.command)),b}function J(c){return typeof c=="string"?c:j(c)}async function Ee(c,b){if(Array.isArray(c))return ve.mapAsync(c,d,b)}function Ce(c){if(c===null)return;let b=new yD.default(mn(c.kind),c.name,c.detail||"",o(c.uri),y(c.range),y(c.selectionRange),c.data);return c.tags!==void 0&&(b.tags=_r(c.tags)),b}async function pt(c,b){if(c!==null)return ve.map(c,Ce,b)}async function xt(c,b){return new H.CallHierarchyIncomingCall(Ce(c.from),await D(c.fromRanges,b))}async function Hn(c,b){if(c!==null)return ve.mapAsync(c,xt,b)}async function Bh(c,b){return new H.CallHierarchyOutgoingCall(Ce(c.to),await D(c.fromRanges,b))}async function Mb(c,b){if(c!==null)return ve.mapAsync(c,Bh,b)}async function Ib(c,b){if(c!=null)return new H.SemanticTokens(new Uint32Array(c.data),c.resultId)}function Vh(c){return new H.SemanticTokensEdit(c.start,c.deleteCount,c.data!==void 0?new Uint32Array(c.data):void 0)}async function Nb(c,b){if(c!=null)return new H.SemanticTokensEdits(c.edits.map(Vh),c.resultId)}function jb(c){return c}async function Fb(c,b){if(c!=null)return new H.LinkedEditingRanges(await D(c.ranges,b),Lb(c.wordPattern))}function Lb(c){if(c!=null)return new RegExp(c)}function Gh(c){if(c===null)return;let b=new vD.default(mn(c.kind),c.name,c.detail||"",o(c.uri),y(c.range),y(c.selectionRange),c.data);return c.tags!==void 0&&(b.tags=_r(c.tags)),b}async function Ab(c,b){if(c!==null)return ve.map(c,Gh,b)}function Wa(c){if(Wt.string(c))return c;if(ee.RelativePattern.is(c)){if(ee.URI.is(c.baseUri))return new H.RelativePattern(o(c.baseUri),c.pattern);if(ee.WorkspaceFolder.is(c.baseUri)){let b=H.workspace.getWorkspaceFolder(o(c.baseUri.uri));return b!==void 0?new H.RelativePattern(b,c.pattern):void 0}}}async function kb(c,b){if(!c)return;if(Array.isArray(c))return ve.map(c,We=>za(We),b);let E=c,K=await ve.map(E.items,We=>za(We),b);return new H.InlineCompletionList(K)}function za(c){let b;typeof c.insertText=="string"?b=c.insertText:b=new H.SnippetString(c.insertText.value);let E;c.command&&(E=_t(c.command));let K=new H.InlineCompletionItem(b,y(c.range),E);return c.filterText&&(K.filterText=c.filterText),K}return{asUri:o,asDocumentSelector:a,asDiagnostics:u,asDiagnostic:f,asRange:y,asRanges:D,asPosition:_,asDiagnosticSeverity:M,asDiagnosticTag:g,asHover:A,asCompletionResult:de,asCompletionItem:$,asTextEdit:F,asTextEdits:W,asSignatureHelp:B,asSignatureInformations:ne,asSignatureInformation:oe,asParameterInformations:Ue,asParameterInformation:_e,asDeclarationResult:At,asDefinitionResult:ai,asLocation:st,asReferences:gr,asDocumentHighlights:Xi,asDocumentHighlight:ci,asDocumentHighlightKind:kt,asSymbolKind:mn,asSymbolTag:mr,asSymbolTags:_r,asSymbolInformations:Ji,asSymbolInformation:kn,asDocumentSymbols:ui,asDocumentSymbol:mt,asCommand:_t,asCommands:Qi,asCodeAction:yr,asCodeActionKind:$n,asCodeActionKinds:li,asCodeActionDocumentations:Hr,asCodeActionResult:Gt,asCodeLens:v,asCodeLenses:x,asWorkspaceEdit:k,asDocumentLink:he,asDocumentLinks:be,asFoldingRangeKind:yt,asFoldingRange:Et,asFoldingRanges:Un,asColor:ye,asColorInformation:He,asColorInformations:Ye,asColorPresentation:Oe,asColorPresentations:Me,asSelectionRange:$t,asSelectionRanges:qt,asInlineValue:di,asInlineValues:Xs,asInlayHint:d,asInlayHints:Ee,asSemanticTokensLegend:jb,asSemanticTokens:Ib,asSemanticTokensEdit:Vh,asSemanticTokensEdits:Nb,asCallHierarchyItem:Ce,asCallHierarchyItems:pt,asCallHierarchyIncomingCall:xt,asCallHierarchyIncomingCalls:Hn,asCallHierarchyOutgoingCall:Bh,asCallHierarchyOutgoingCalls:Mb,asLinkedEditingRanges:Fb,asTypeHierarchyItem:Gh,asTypeHierarchyItems:Ab,asGlobPattern:Wa,asInlineCompletionResult:kb,asInlineCompletionItem:za}}});var Fe=T(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.empty=void 0;Ir.v4=O_;Ir.isUUID=E_;Ir.parse=SD;Ir.generateUuid=PD;var vs=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},Yl=class n extends vs{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}};Ir.empty=new vs("00000000-0000-0000-0000-000000000000");function O_(){return new Yl}var DD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function E_(n){return DD.test(n)}function SD(n){if(!E_(n))throw new Error("invalid uuid");return new vs(n)}function PD(){return O_().asHex()}});var ed=T(bn=>{"use strict";var RD=bn&&bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),TD=bn&&bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),OD=bn&&bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{switch(i.kind){case"begin":this.begin(i);break;case"report":this.report(i);break;case"end":this.done(),r&&r(this);break}})}begin(e){this._infinite=e.percentage===void 0,this._lspProgressDisposable!==void 0&&q_.window.withProgress({location:q_.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},async(t,r)=>{if(this._lspProgressDisposable!==void 0)return this._progress=t,this._cancellationToken=r,this._tokenDisposable=this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(x_.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((i,s)=>{this._resolve=i,this._reject=s})})}report(e){if(this._infinite&&M_.string(e.message))this._progress!==void 0&&this._progress.report({message:e.message});else if(M_.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),r=Math.max(0,t-this._reported);this._reported+=r,this._progress!==void 0&&this._progress.report({message:e.message,increment:r})}}cancel(){this.cleanup(),this._reject!==void 0&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),this._resolve!==void 0&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){this._lspProgressDisposable!==void 0&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),this._tokenDisposable!==void 0&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}};bn.ProgressPart=Zl});var ge=T(Be=>{"use strict";var ED=Be&&Be.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),qD=Be&&Be.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),F_=Be&&Be.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}let r=t>0;return{kind:"document",id:this.registrationType.method,registrations:r,matches:!1}}};Be.DynamicDocumentFeature=bs;var rd=class extends bs{_event;_type;_middleware;_createParams;_textDocument;_selectorFilter;_listener;_selectors;_onNotificationSent;static textDocumentFilter(e,t){for(let r of e)if(Nr.languages.match(r,t)>0)return!0;return!1}constructor(e,t,r,i,s,o,a){super(e),this._event=t,this._type=r,this._middleware=i,this._createParams=s,this._textDocument=o,this._selectorFilter=a,this._selectors=new Map,this._onNotificationSent=new Nr.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(t=>{this.callback(t).catch(r=>{this._client.error(`Sending document notification ${this._type.method} failed.`,r)})})),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){let t=async r=>{let i=this._createParams(r);await this._client.sendNotification(this._type,i),this.notificationSent(this.getTextDocument(r),this._type,i)};if(this.matches(e)){let r=this._middleware();return r?r(e,i=>t(i)):t(e)}}matches(e){return this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))?!1:!this._selectorFilter||this._selectorFilter(this._selectors.values(),e)}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._onNotificationSent=new Nr.EventEmitter,this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._selectors.values())if(Nr.languages.match(t,e)>0)return{send:r=>this.callback(r)}}};Be.TextDocumentEventFeature=rd;var id=class extends bs{_registrationType;_registrations;constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(let e of this._registrations.values()){let t=e.data.registerOptions.documentSelector;t!==null&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(t){if(td.TextDocumentRegistrationOptions.is(t)){let r=td.StaticRegistrationOptions.hasId(t)?t.id:I_.generateUuid(),i=t.documentSelector??e;if(i)return[r,Object.assign({},t,{documentSelector:i})]}else if(Rt.boolean(t)&&t===!0||td.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let r=Rt.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[I_.generateUuid(),r]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,t){if(!(!e||!t))return Rt.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(let t of this._registrations.values()){let r=t.data.registerOptions.documentSelector;if(r!==null&&Nr.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(r),e)>0)return t.provider}}getAllProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};Be.TextDocumentLanguageFeature=id;var sd=class{_client;_registrationType;_registrations;constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};Be.WorkspaceFeature=sd});var A_=T(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.range=Xr.balanced=void 0;var MD=(n,e,t)=>{let r=n instanceof RegExp?L_(n,t):n,i=e instanceof RegExp?L_(e,t):e,s=r!==null&&i!=null&&(0,Xr.range)(r,i,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+r.length,s[1]),post:t.slice(s[1]+i.length)}};Xr.balanced=MD;var L_=(n,e)=>{let t=e.match(n);return t?t[0]:null},ID=(n,e,t)=>{let r,i,s,o,a,u=t.indexOf(n),l=t.indexOf(e,u+1),f=u;if(u>=0&&l>0){if(n===e)return[u,l];for(r=[],s=t.length;f>=0&&!a;){if(f===u)r.push(f),u=t.indexOf(n,f+1);else if(r.length===1){let p=r.pop();p!==void 0&&(a=[p,l])}else i=r.pop(),i!==void 0&&i=0?u:l}r.length&&o!==void 0&&(a=[s,o])}return a};Xr.range=ID});var K_=T(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.EXPANSION_MAX=void 0;Ni.expand=BD;var k_=A_(),$_="\0SLASH"+Math.random()+"\0",U_="\0OPEN"+Math.random()+"\0",ad="\0CLOSE"+Math.random()+"\0",H_="\0COMMA"+Math.random()+"\0",W_="\0PERIOD"+Math.random()+"\0",ND=new RegExp($_,"g"),jD=new RegExp(U_,"g"),FD=new RegExp(ad,"g"),LD=new RegExp(H_,"g"),AD=new RegExp(W_,"g"),kD=/\\\\/g,$D=/\\{/g,UD=/\\}/g,HD=/\\,/g,WD=/\\\./g;Ni.EXPANSION_MAX=1e5;function od(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function zD(n){return n.replace(kD,$_).replace($D,U_).replace(UD,ad).replace(HD,H_).replace(WD,W_)}function KD(n){return n.replace(ND,"\\").replace(jD,"{").replace(FD,"}").replace(LD,",").replace(AD,".")}function z_(n){if(!n)return[""];let e=[],t=(0,k_.balanced)("{","}",n);if(!t)return n.split(",");let{pre:r,body:i,post:s}=t,o=r.split(",");o[o.length-1]+="{"+i+"}";let a=z_(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function BD(n,e={}){if(!n)return[];let{max:t=Ni.EXPANSION_MAX}=e;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),Cs(zD(n),t,!0).map(KD)}function VD(n){return"{"+n+"}"}function GD(n){return/^-?0\d/.test(n)}function XD(n,e){return n<=e}function JD(n,e){return n>=e}function Cs(n,e,t){let r=[];for(;;){let i=(0,k_.balanced)("{","}",n);if(!i)return[n];let s=i.pre;if(/\$$/.test(i.pre)){let g=i.post.length?Cs(i.post,e,!1):[""];for(let _=0;_=0;if(!u&&!l){if(i.post.match(/,(?!,).*\}/)){n=i.pre+"{"+i.body+ad+i.post,t=!0;continue}return[n]}let f=i.post.length?Cs(i.post,e,!1):[""],p;if(u)p=i.body.split(/\.\./);else if(p=z_(i.body),p.length===1&&p[0]!==void 0&&(p=Cs(p[0],e,!1).map(VD),p.length===1))return f.map(g=>i.pre+p[0]+g);let h;if(u&&p[0]!==void 0&&p[1]!==void 0){let g=od(p[0]),_=od(p[1]),y=Math.max(p[0].length,p[1].length),D=p.length===3&&p[2]!==void 0?Math.max(Math.abs(od(p[2])),1):1,M=XD;_0){let le=new Array(de+1).join("0");j<0?A="-"+le+A.slice(1):A=le+A}}h.push(A)}}else{h=[];for(let g=0;g{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.assertValidPattern=void 0;var QD=1024*64,YD=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>QD)throw new TypeError("pattern is too long")};Uo.assertValidPattern=YD});var G_=T(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.parseClass=void 0;var ZD={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ws=n=>n.replace(/[[\]\\-]/g,"\\$&"),eS=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),V_=n=>n.join(""),tS=(n,e)=>{let t=e;if(n.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=t+1,o=!1,a=!1,u=!1,l=!1,f=t,p="";e:for(;sp?r.push(ws(p)+"-"+ws(y)):y===p&&r.push(ws(y)),p="",s++;continue}if(n.startsWith("-]",s+1)){r.push(ws(y+"-")),s+=2;continue}if(n.startsWith("-",s+1)){p=y,s+=2;continue}r.push(ws(y)),s++}if(f{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.unescape=void 0;var nS=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?n.replace(/\[([^/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?n.replace(/\[([^/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");Wo.unescape=nS});var ld=T(Go=>{"use strict";var jt;Object.defineProperty(Go,"__esModule",{value:!0});Go.AST=void 0;var rS=G_(),Ko=zo(),iS=new Set(["!","?","+","*","@"]),cd=n=>iS.has(n),X_=n=>cd(n.type),sS=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),oS=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),aS=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),J_=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),cS="(?!(?:^|/)\\.\\.?(?:$|/))",Bo="(?!\\.)",uS=new Set(["[","."]),lS=new Set(["..","."]),dS=new Set("().*{}+?[]^$\\!"),fS=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ud="[^/]",Q_=ud+"*?",Y_=ud+"+?",hS=0,Vo=class{type;#n;#r;#i=!1;#e=[];#t;#a;#u;#c=!1;#s;#o;#l=!1;id=++hS;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,t,r={}){this.type=e,e&&(this.#r=!0),this.#t=t,this.#n=this.#t?this.#t.#n:this,this.#s=this.#n===this?r:this.#n.#s,this.#u=this.#n===this?[]:this.#n.#u,e==="!"&&!this.#n.#c&&this.#u.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#o=this.#e.map(e=>String(e)).join("")}#_(){if(this!==this.#n)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,r=t.#t;for(;r;){for(let i=t.#a+1;!r.type&&itypeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#c&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let e=this.#t;for(let t=0;ttypeof g!="string"),l=this.#e.map(g=>{let[_,y,D,M]=typeof g=="string"?jt.#D(g,this.#r,u):g.toRegExpSource(e);return this.#r=this.#r||D,this.#i=this.#i||M,_}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&lS.has(this.#e[0]))){let _=uS,y=t&&_.has(l.charAt(0))||l.startsWith("\\.")&&_.has(l.charAt(2))||l.startsWith("\\.\\.")&&_.has(l.charAt(4)),D=!t&&!e&&_.has(l.charAt(0));f=y?cS:D?Bo:""}let p="";return this.isEnd()&&this.#n.#c&&this.#t?.type==="!"&&(p="(?:$|\\/)"),[f+l+p,(0,Ko.unescape)(l),this.#r=!!this.#r,this.#i]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#m(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString(),l=this;return l.#e=[u],l.type=null,l.#r=void 0,[u,(0,Ko.unescape)(this.toString()),!1,!1]}let o=!r||e||t||!Bo?"":this.#m(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#l)a=(this.isStart()&&!t?Bo:"")+Y_;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Bo:"")+Q_+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+s+u}return[a,(0,Ko.unescape)(s),this.#r=!!this.#r,this.#i]}#h(){if(X_(this)){let e=0,t=!1;do{t=!0;for(let r=0;r{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,i,s,o]=t.toRegExpSource(e);return this.#i=this.#i||o,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#D(e,t,r=!1){let i=!1,s="",o=!1,a=!1;for(let u=0;u{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.escape=void 0;var pS=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):e?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");Xo.escape=pS});var fd=T(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.unescape=Y.escape=Y.AST=Y.Minimatch=Y.match=Y.makeRe=Y.braceExpand=Y.defaults=Y.filter=Y.GLOBSTAR=Y.sep=Y.minimatch=void 0;var gS=K_(),Jo=B_(),ty=ld(),mS=dd(),_S=zo(),yS=(n,e,t={})=>((0,Jo.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Jr(e,t).match(n));Y.minimatch=yS;var vS=/^\*+([^+@!?*[(]*)$/,bS=n=>e=>!e.startsWith(".")&&e.endsWith(n),CS=n=>e=>e.endsWith(n),wS=n=>(n=n.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(n)),DS=n=>(n=n.toLowerCase(),e=>e.toLowerCase().endsWith(n)),SS=/^\*+\.\*+$/,PS=n=>!n.startsWith(".")&&n.includes("."),RS=n=>n!=="."&&n!==".."&&n.includes("."),TS=/^\.\*+$/,OS=n=>n!=="."&&n!==".."&&n.startsWith("."),ES=/^\*+$/,qS=n=>n.length!==0&&!n.startsWith("."),xS=n=>n.length!==0&&n!=="."&&n!=="..",MS=/^\?+([^+@!?*[(]*)?$/,IS=([n,e=""])=>{let t=ny([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},NS=([n,e=""])=>{let t=ry([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},jS=([n,e=""])=>{let t=ry([n]);return e?r=>t(r)&&r.endsWith(e):t},FS=([n,e=""])=>{let t=ny([n]);return e?r=>t(r)&&r.endsWith(e):t},ny=([n])=>{let e=n.length;return t=>t.length===e&&!t.startsWith(".")},ry=([n])=>{let e=n.length;return t=>t.length===e&&t!=="."&&t!==".."},iy=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Z_={win32:{sep:"\\"},posix:{sep:"/"}};Y.sep=iy==="win32"?Z_.win32.sep:Z_.posix.sep;Y.minimatch.sep=Y.sep;Y.GLOBSTAR=Symbol("globstar **");Y.minimatch.GLOBSTAR=Y.GLOBSTAR;var LS="[^/]",AS=LS+"*?",kS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",$S="(?:(?!(?:\\/|^)\\.).)*?",US=(n,e={})=>t=>(0,Y.minimatch)(t,n,e);Y.filter=US;Y.minimatch.filter=Y.filter;var en=(n,e={})=>Object.assign({},n,e),HS=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return Y.minimatch;let e=Y.minimatch;return Object.assign((r,i,s={})=>e(r,i,en(n,s)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,en(n,s))}static defaults(i){return e.defaults(en(n,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,o={}){super(i,s,en(n,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,en(n,s))}},unescape:(r,i={})=>e.unescape(r,en(n,i)),escape:(r,i={})=>e.escape(r,en(n,i)),filter:(r,i={})=>e.filter(r,en(n,i)),defaults:r=>e.defaults(en(n,r)),makeRe:(r,i={})=>e.makeRe(r,en(n,i)),braceExpand:(r,i={})=>e.braceExpand(r,en(n,i)),match:(r,i,s={})=>e.match(r,i,en(n,s)),sep:e.sep,GLOBSTAR:Y.GLOBSTAR})};Y.defaults=HS;Y.minimatch.defaults=Y.defaults;var WS=(n,e={})=>((0,Jo.assertValidPattern)(n),e.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,gS.expand)(n,{max:e.braceExpandMax}));Y.braceExpand=WS;Y.minimatch.braceExpand=Y.braceExpand;var zS=(n,e={})=>new Jr(n,e).makeRe();Y.makeRe=zS;Y.minimatch.makeRe=Y.makeRe;var KS=(n,e,t={})=>{let r=new Jr(e,t);return n=n.filter(i=>r.match(i)),r.options.nonull&&!n.length&&n.push(e),n};Y.match=KS;Y.minimatch.match=Y.match;var ey=/[?*]|[+@!]\(.*?\)|\[|\]/,BS=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Jr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){(0,Jo.assertValidPattern)(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||iy,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=s[0]===""&&s[1]===""&&(s[2]==="?"||!ey.test(s[2]))&&!ey.test(s[3]),l=/^[a-z]:/i.test(s[0]);if(u)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(l)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(u=>this.parse(u))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let i=r;for(;t[i+1]==="**";)i++;i!==r&&t.splice(r,i-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&r.splice(i+1,o-i);let a=r[i+1],u=r[i+2],l=r[i+3];if(a!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(i,1);let f=r.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;ot.length)}partsMatch(e,t,r=!1){let i=0,s=0,o=[],a="";for(;i=2&&(e=this.levelTwoFileOptimize(e)),t.includes(Y.GLOBSTAR)?this.#n(e,t,r,i,s):this.#i(e,t,r,i,s)}#n(e,t,r,i,s){let o=t.indexOf(Y.GLOBSTAR,s),a=t.lastIndexOf(Y.GLOBSTAR),[u,l,f]=r?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,a),t.slice(a+1)];if(u.length){let w=e.slice(i,i+u.length);if(!this.#i(w,u,r,0,0))return!1;i+=u.length,s+=u.length}let p=0;if(f.length){if(f.length+i>e.length)return!1;let w=e.length-f.length;if(this.#i(e,f,r,w,0))p=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(w--,!this.#i(e,f,r,w,0)))return!1;p=f.length+1}}if(!l.length){let w=!!p;for(let I=i;I{let l=u.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))i.add(h);return typeof p=="string"?BS(p):p===Y.GLOBSTAR?Y.GLOBSTAR:p._src});l.forEach((p,h)=>{let g=l[h+1],_=l[h-1];p!==Y.GLOBSTAR||_===Y.GLOBSTAR||(_===void 0?g!==void 0&&g!==Y.GLOBSTAR?l[h+1]="(?:\\/|"+r+"\\/)?"+g:l[h]=r:g===void 0?l[h-1]=_+"(?:\\/|\\/"+r+")?":g!==Y.GLOBSTAR&&(l[h-1]=_+"(?:\\/|\\/"+r+"\\/)"+g,l[h+1]=Y.GLOBSTAR))});let f=l.filter(p=>p!==Y.GLOBSTAR);if(this.partial&&f.length>=1){let p=[];for(let h=1;h<=f.length;h++)p.push(f.slice(0,h).join("/"));return"(?:"+p.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a of s){let u=i;if(r.matchBase&&a.length===1&&(u=[o]),this.matchOne(u,a,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return Y.minimatch.defaults(e).Minimatch}};Y.Minimatch=Jr;var VS=ld();Object.defineProperty(Y,"AST",{enumerable:!0,get:function(){return VS.AST}});var GS=dd();Object.defineProperty(Y,"escape",{enumerable:!0,get:function(){return GS.escape}});var XS=zo();Object.defineProperty(Y,"unescape",{enumerable:!0,get:function(){return XS.unescape}});Y.minimatch.AST=ty.AST;Y.minimatch.Minimatch=Jr;Y.minimatch.escape=mS.escape;Y.minimatch.unescape=_S.unescape});var hd=T(ir=>{"use strict";var JS=ir&&ir.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),QS=ir&&ir.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),YS=ir&&ir.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.DiagnosticFeature=jr.DiagnosticPullMode=jr.vsdiag=void 0;var ke=require("vscode"),Le=se(),nP=Fe(),rP=hd(),pd=ge();function Qo(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var tn;(function(n){let e;(function(t){t.full="full",t.unChanged="unChanged"})(e=n.DocumentDiagnosticReportKind||(n.DocumentDiagnosticReportKind={}))})(tn||(jr.vsdiag=tn={}));var Ds;(function(n){n.onType="onType",n.onSave="onSave",n.onFocus="onFocus"})(Ds||(jr.DiagnosticPullMode=Ds={}));var dt;(function(n){n.active="open",n.reschedule="reschedule",n.outDated="drop"})(dt||(dt={}));var tt;(function(n){n[n.document=1]="document",n[n.workspace=2]="workspace"})(tt||(tt={}));var sr;(function(n){function e(t){return t instanceof ke.Uri?t.toString():t.uri.toString()}n.asKey=e})(sr||(sr={}));var gd=class{documentPullStates;workspacePullStates;constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,r){let i=e===tt.document?this.documentPullStates:this.workspacePullStates,[s,o,a]=t instanceof ke.Uri?[t.toString(),t,r]:[t.uri.toString(),t.uri,t.version],u=i.get(s);return u===void 0&&(u={document:o,pulledVersion:a,resultId:void 0},i.set(s,u)),u}update(e,t,r,i){let s=e===tt.document?this.documentPullStates:this.workspacePullStates,[o,a,u,l]=t instanceof ke.Uri?[t.toString(),t,r,i]:[t.uri.toString(),t.uri,t.version,r],f=s.get(o);f===void 0?(f={document:a,pulledVersion:u,resultId:l},s.set(o,f)):(f.pulledVersion=u,f.resultId=l)}unTrack(e,t){let r=sr.asKey(t);(e===tt.document?this.documentPullStates:this.workspacePullStates).delete(r)}tracks(e,t){let r=sr.asKey(t);return(e===tt.document?this.documentPullStates:this.workspacePullStates).has(r)}tracksSameVersion(e,t){let r=t.uri.toString(),s=(e===tt.document?this.documentPullStates:this.workspacePullStates).get(r);return s!==void 0&&s.pulledVersion===t.version}getResultId(e,t){let r=sr.asKey(t);return(e===tt.document?this.documentPullStates:this.workspacePullStates).get(r)?.resultId}getAllResultIds(){let e=[];for(let[t,r]of this.workspacePullStates)this.documentPullStates.has(t)&&(r=this.documentPullStates.get(t)),r.resultId!==void 0&&e.push({uri:t,value:r.resultId});return e}},md=class{isDisposed;client;visibleDocuments;options;onDidChangeDiagnosticsEmitter;provider;diagnostics;openRequests;documentStates;workspaceErrorCounter;workspaceCancellation;workspaceTimeout;constructor(e,t,r){this.client=e,this.visibleDocuments=t,this.options=r,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new ke.EventEmitter,this.provider=this.createProvider(),this.diagnostics=ke.languages.createDiagnosticCollection(r.identifier),this.openRequests=new Map,this.documentStates=new gd,this.workspaceErrorCounter=0}knows(e,t){let r=t instanceof ke.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(r.toString())}knowsSameVersion(e,t){let r=this.openRequests.get(t.uri.toString());return r===void 0?this.documentStates.tracksSameVersion(e,t):r.state===dt.reschedule?!0:r.state===dt.outDated?!1:r.version===t.version}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;let r=e instanceof ke.Uri?e:e.uri;this.pullAsync(e).then(()=>{t&&t()},i=>{this.client.error(`Document pull failed for text document ${r.toString()}`,i,!1)})}async pullAsync(e,t){if(this.isDisposed)return;let r=e instanceof ke.Uri,i=r?e:e.uri,s=i.toString();t=r?t:e.version;let o=this.openRequests.get(s),a=r?this.documentStates.track(tt.document,e,t):this.documentStates.track(tt.document,e);if(o===void 0){let u=new ke.CancellationTokenSource;this.openRequests.set(s,{state:dt.active,document:e,version:t,tokenSource:u});let l,f;try{l=await this.provider.provideDiagnostics(e,a.resultId,u.token)??{kind:tn.DocumentDiagnosticReportKind.full,items:[]}}catch(p){if(p instanceof pd.LSPCancellationError&&Le.DiagnosticServerCancellationData.is(p.data)&&p.data.retriggerRequest===!1&&(f={state:dt.outDated,document:e}),f===void 0&&p instanceof ke.CancellationError)f={state:dt.reschedule,document:e};else throw p}if(f=f??this.openRequests.get(s),f===void 0){this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),this.diagnostics.delete(i);return}if(this.openRequests.delete(s),!this.visibleDocuments.isVisible(e)){this.documentStates.unTrack(tt.document,e);return}if(f.state===dt.outDated)return;l!==void 0&&(l.kind===tn.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,l.items),a.pulledVersion=t,a.resultId=l.resultId),f.state===dt.reschedule&&this.pull(e)}else o.state===dt.active?(o.tokenSource.cancel(),this.openRequests.set(s,{state:dt.reschedule,document:o.document})):o.state===dt.outDated&&this.openRequests.set(s,{state:dt.reschedule,document:o.document})}forgetDocument(e){if(this.isDisposed)return;let t=e instanceof ke.Uri?e:e.uri,r=t.toString(),i=this.openRequests.get(r);this.options.workspaceDiagnostics&&t.scheme!=="untitled"?(i!==void 0?this.openRequests.set(r,{state:dt.reschedule,document:e}):this.pull(e,()=>{this.forget(tt.document,e)}),this.forget(tt.workspace,e)):(i!==void 0&&(i.state===dt.active&&i.tokenSource.cancel(),this.openRequests.set(r,{state:dt.outDated,document:e})),this.diagnostics.delete(t),this.forget(tt.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then(()=>{this.workspaceTimeout=(0,Le.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3)},e=>{!(e instanceof pd.LSPCancellationError)&&!Le.DiagnosticServerCancellationData.is(e.data)&&(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,Le.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3))})}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;this.workspaceCancellation!==void 0&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new ke.CancellationTokenSource;let e=this.documentStates.getAllResultIds().map(t=>({uri:this.client.protocol2CodeConverter.asUri(t.uri),value:t.value}));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,t=>{if(!(!t||this.isDisposed))for(let r of t.items)r.kind===tn.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(tt.document,r.uri)||this.diagnostics.set(r.uri,r.items)),this.documentStates.update(tt.workspace,r.uri,r.version??void 0,r.resultId)})}createProvider(){let e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(t,r,i)=>{let s=(a,u,l)=>{let f={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(a instanceof ke.Uri?a:a.uri)},previousResultId:u};return this.isDisposed===!0||!this.client.isRunning()?{kind:tn.DocumentDiagnosticReportKind.full,items:[]}:this.client.sendRequest(Le.DocumentDiagnosticRequest.type,f,l).then(async p=>p==null||this.isDisposed||l.isCancellationRequested?{kind:tn.DocumentDiagnosticReportKind.full,items:[]}:p.kind===Le.DocumentDiagnosticReportKind.Full?{kind:tn.DocumentDiagnosticReportKind.full,resultId:p.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(p.items,l)}:{kind:tn.DocumentDiagnosticReportKind.unChanged,resultId:p.resultId},p=>this.client.handleFailedRequest(Le.DocumentDiagnosticRequest.type,l,p,{kind:tn.DocumentDiagnosticReportKind.full,items:[]},!0,!0))},o=this.client.middleware;return o.provideDiagnostics?o.provideDiagnostics(t,r,i,s):s(t,r,i)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(t,r,i)=>{let s=async l=>l.kind===Le.DocumentDiagnosticReportKind.Full?{kind:tn.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version,items:await this.client.protocol2CodeConverter.asDiagnostics(l.items,r)}:{kind:tn.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version},o=l=>{let f=[];for(let p of l)f.push({uri:this.client.code2ProtocolConverter.asUri(p.uri),value:p.value});return f},a=(l,f,p)=>{let h=(0,nP.generateUuid)(),g=this.client.onProgress(Le.WorkspaceDiagnosticRequest.partialResult,h,async y=>{if(y==null){p(null);return}let D={items:[]};for(let M of y.items)try{D.items.push(await s(M))}catch(w){this.client.error("Converting workspace diagnostics failed.",w)}p(D)}),_={identifier:this.options.identifier,previousResultIds:o(l),partialResultToken:h};return this.isDisposed===!0||!this.client.isRunning()?{items:[]}:this.client.sendRequest(Le.WorkspaceDiagnosticRequest.type,_,f).then(async y=>{if(f.isCancellationRequested)return{items:[]};let D={items:[]};for(let M of y.items)D.items.push(await s(M));return g.dispose(),p(D),{items:[]}},y=>(g.dispose(),this.client.handleFailedRequest(Le.DocumentDiagnosticRequest.type,f,y,{items:[]})))},u=this.client.middleware;return u.provideWorkspaceDiagnostics?u.provideWorkspaceDiagnostics(t,r,i,a):a(t,r,i)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(let[e,t]of this.openRequests)t.state===dt.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:dt.outDated,document:t.document});this.diagnostics.dispose()}},_d=class{client;diagnosticRequestor;lastDocumentToPull;documents;timeoutHandle;isDisposed;constructor(e,t){this.client=e,this.diagnosticRequestor=t,this.documents=new Le.LinkedMap,this.isDisposed=!1}add(e){if(this.isDisposed===!0)return;let t=sr.asKey(e);this.documents.has(t)||(this.documents.set(t,e,Le.Touch.Last),this.lastDocumentToPull=e)}remove(e){let t=sr.asKey(e);if(this.documents.delete(t),this.documents.size===0){this.stop();return}else if(t===this.lastDocumentToPullKey()){let r=this.documents.before(t);r===void 0?this.stop():this.lastDocumentToPull=r}}trigger(){this.lastDocumentToPull=this.documents.last,this.runLoop()}runLoop(){if(this.isDisposed!==!0){if(this.documents.size===0){this.stop();return}this.lastDocumentToPull!==void 0&&this.timeoutHandle===void 0&&(this.timeoutHandle=(0,Le.RAL)().timer.setTimeout(()=>{let e=this.documents.first;if(e===void 0)return;let t=sr.asKey(e);this.diagnosticRequestor.pullAsync(e).catch(r=>{this.client.error(`Document pull failed for text document ${t}`,r,!1)}).finally(()=>{this.timeoutHandle=void 0,this.documents.set(t,e,Le.Touch.Last),t!==this.lastDocumentToPullKey()&&this.runLoop()})},500))}}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear(),this.lastDocumentToPull=void 0}stop(){this.timeoutHandle?.dispose(),this.timeoutHandle=void 0,this.lastDocumentToPull=void 0}lastDocumentToPullKey(){return this.lastDocumentToPull!==void 0?sr.asKey(this.lastDocumentToPull):void 0}},yd=class{disposable;diagnosticRequestor;activeTextDocument;backgroundScheduler;constructor(e,t,r){let i=Object.assign({onChange:!1,onSave:!1,onFocus:!1},e.clientOptions.diagnosticPullOptions),s=e.protocol2CodeConverter.asDocumentSelector(r.documentSelector),o=[],a=(w,I)=>!(typeof w=="string"||w.language!==void 0&&w.language!=="*"||w.scheme!==void 0&&w.scheme!=="*"&&w.scheme!==I.scheme||w.pattern!==void 0&&!(0,rP.matchGlobPattern)(w.pattern,I)),u=w=>{let I=r.documentSelector;if(i.match!==void 0)return i.match(I,w);for(let j of I)if(Le.TextDocumentFilter.is(j)&&a(j,w))return!0;return!1},l=w=>w instanceof ke.Uri?u(w):ke.languages.match(s,w)>0&&t.isVisible(w),f=w=>ke.languages.match(s,w.document)>0&&t.isVisible(w.notebook.uri),p=w=>w instanceof ke.Uri?this.activeTextDocument?.uri.toString()===w.toString():this.activeTextDocument===w;this.diagnosticRequestor=new md(e,t,r),this.backgroundScheduler=new _d(e,this.diagnosticRequestor);let h=w=>{!l(w)||!r.interFileDependencies||p(w)||i.onChange===!1||this.backgroundScheduler.add(w)},g=(w,I)=>(i.filter===void 0||!i.filter(w,I))&&this.diagnosticRequestor.knows(tt.document,w);this.activeTextDocument=ke.window.activeTextEditor?.document,o.push(ke.window.onDidChangeActiveTextEditor(w=>{let I=this.activeTextDocument;this.activeTextDocument=w?.document,I!==void 0&&h(I),this.activeTextDocument!==void 0&&(this.backgroundScheduler.remove(this.activeTextDocument),i.onFocus===!0&&l(this.activeTextDocument)&&g(this.activeTextDocument,Ds.onFocus)&&this.diagnosticRequestor.pull(this.activeTextDocument))}));let _=e.getFeature(Le.DidOpenTextDocumentNotification.method);o.push(_.onNotificationSent(w=>{let I=w.textDocument;this.diagnosticRequestor.knowsSameVersion(tt.document,I)||l(I)&&this.diagnosticRequestor.pull(I,()=>{h(I)})}));let y=e.getFeature(Le.NotebookDocumentSyncRegistrationType.method);o.push(y.onOpenNotificationSent(w=>{for(let I of w.getCells())f(I)&&this.diagnosticRequestor.pull(I.document,()=>{h(I.document)})})),o.push(t.onOpen(w=>{for(let I of w){if(this.diagnosticRequestor.knows(tt.document,I))continue;let j=I.toString(),A;for(let de of ke.workspace.textDocuments)if(j===de.uri.toString()){A=de;break}A!==void 0&&l(A)&&this.diagnosticRequestor.pull(A,()=>{h(A)})}}));let D=new Set;for(let w of ke.workspace.textDocuments)l(w)&&(this.diagnosticRequestor.pull(w,()=>{h(w)}),D.add(w.uri.toString()));for(let w of ke.workspace.notebookDocuments)for(let I of w.getCells())f(I)&&(this.diagnosticRequestor.pull(I.document,()=>{h(I.document)}),D.add(I.document.uri.toString()));if(i.onTabs===!0)for(let w of t.getResources())!D.has(w.toString())&&l(w)&&this.diagnosticRequestor.pull(w,()=>{h(w)});if(i.onChange===!0){let w=e.getFeature(Le.DidChangeTextDocumentNotification.method);o.push(w.onNotificationSent(async I=>{let j=I.textDocument;g(j,Ds.onType)&&this.diagnosticRequestor.pull(j,()=>{this.backgroundScheduler.trigger()})})),o.push(y.onChangeNotificationSent(async I=>{let A=(I.cells?.textContent||[]).map(Pe=>I.notebook.getCells().find(Ot=>Ot.document.uri.toString()===Pe.document.uri.toString()));for(let Pe of A)Pe&&f(Pe)&&this.diagnosticRequestor.pull(Pe.document,()=>{this.backgroundScheduler.trigger()});let de=I.cells?.structure?.didClose||[];for(let Pe of de)this.diagnosticRequestor.forgetDocument(Pe.document);let le=I.cells?.structure?.didOpen||[];for(let Pe of le)f(Pe)&&this.diagnosticRequestor.pull(Pe.document,()=>{this.backgroundScheduler.trigger()})}))}if(i.onSave===!0){let w=e.getFeature(Le.DidSaveTextDocumentNotification.method);o.push(w.onNotificationSent(I=>{let j=I.textDocument;g(j,Ds.onSave)&&this.diagnosticRequestor.pull(I.textDocument)})),o.push(y.onSaveNotificationSent(I=>{for(let j of I.getCells())f(j)&&this.diagnosticRequestor.pull(j.document)}))}let M=e.getFeature(Le.DidCloseTextDocumentNotification.method);o.push(M.onNotificationSent(w=>{this.cleanUpDocument(w.textDocument)})),o.push(y.onCloseNotificationSent(w=>{for(let I of w.getCells())this.cleanUpDocument(I.document)})),o.push(t.onClose(w=>{for(let I of w)this.cleanUpDocument(I)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(()=>{for(let w of ke.workspace.textDocuments)l(w)&&this.diagnosticRequestor.pull(w)}),r.workspaceDiagnostics===!0&&r.identifier!=="da348dc5-c30a-4515-9d98-31ff3be38d14"&&this.diagnosticRequestor.pullWorkspace(),this.disposable=ke.Disposable.from(...o,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}forget(e){this.cleanUpDocument(e)}cleanUpDocument(e){this.backgroundScheduler.remove(e),this.diagnosticRequestor.knows(tt.document,e)&&this.diagnosticRequestor.forgetDocument(e)}},vd=class extends pd.TextDocumentLanguageFeature{constructor(e){super(e,Le.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=Qo(Qo(e,"textDocument"),"diagnostic");t.relatedInformation=!0,t.tagSupport={valueSet:[Le.DiagnosticTag.Unnecessary,Le.DiagnosticTag.Deprecated]},t.codeDescriptionSupport=!0,t.dataSupport=!0,t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,t.markupMessageSupport=!1,Qo(Qo(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(Le.DiagnosticRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeDiagnosticsEmitter.fire()});let[i,s]=this.getRegistration(t,e.diagnosticProvider);!i||!s||this.register({id:i,registerOptions:s})}clear(){super.clear()}refresh(){for(let e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}registerLanguageProvider(e){let t=new yd(this._client,this._client.visibleDocuments,e);return[t.disposable,t]}};jr.DiagnosticFeature=vd});var ay=T(Cn=>{"use strict";var iP=Cn&&Cn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sP=Cn&&Cn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ta=Cn&&Cn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0&&(y.metadata=o(h.metadata)),y}t.asNotebookDocument=i;function s(h,g){return h.map(_=>a(_,g))}t.asNotebookCells=s;function o(h){return l(new Set,h)}t.asMetadata=o;function a(h,g){let _=or.NotebookCell.create(u(h.kind),g.asUri(h.document.uri));return Object.keys(h.metadata).length>0&&(_.metadata=o(h.metadata)),h.executionSummary!==void 0&&sy.number(h.executionSummary.executionOrder)&&sy.boolean(h.executionSummary.success)&&(_.executionSummary={executionOrder:h.executionSummary.executionOrder,success:h.executionSummary.success}),_}t.asNotebookCell=a;function u(h){switch(h){case $e.NotebookCellKind.Markup:return or.NotebookCellKind.Markup;case $e.NotebookCellKind.Code:return or.NotebookCellKind.Code}}function l(h,g){if(h.has(g))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(g)){let _=[];for(let y of g)if(y!==null&&typeof y=="object"||Array.isArray(y))_.push(l(h,y));else{if(y instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");_.push(y)}return _}else{let _=Object.keys(g),y=Object.create(null);for(let D of _){let M=g[D];if(M!==null&&typeof M=="object"||Array.isArray(M))y[D]=l(h,M);else{if(M instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");y[D]=M}}return y}}function f(h,g){let _=g.asChangeTextDocumentParams(h,h.document.uri,h.document.version);return{document:_.textDocument,changes:_.contentChanges}}t.asTextContentChange=f;function p(h,g){let _=Object.create(null);if(h.metadata&&(_.metadata=n.c2p.asMetadata(h.metadata)),h.cells!==void 0){let y=Object.create(null),D=h.cells;D.structure&&(y.structure={array:{start:D.structure.array.start,deleteCount:D.structure.array.deleteCount,cells:D.structure.array.cells!==void 0?D.structure.array.cells.map(M=>n.c2p.asNotebookCell(M,g)):void 0},didOpen:D.structure.didOpen!==void 0?D.structure.didOpen.map(M=>g.asOpenTextDocumentParams(M.document).textDocument):void 0,didClose:D.structure.didClose!==void 0?D.structure.didClose.map(M=>g.asCloseTextDocumentParams(M.document).textDocument):void 0}),D.data!==void 0&&(y.data=D.data.map(M=>n.c2p.asNotebookCell(M,g))),D.textContent!==void 0&&(y.textContent=D.textContent.map(M=>n.c2p.asTextContentChange(M,g))),Object.keys(y).length>0&&(_.cells=y)}return _}t.asNotebookDocumentChangeEvent=p})(e=n.c2p||(n.c2p={}))})(ji||(ji={}));var Cd;(function(n){function e(a,u,l){let f=a.length,p=u.length,h=0;for(;h=0&&_>=0&&t(a[g],u[_],l);)g--,_--;let y=g+1-h,D=h===_+1?void 0:u.slice(h,_+1);return D!==void 0?{start:h,deleteCount:y,cells:D}:{start:h,deleteCount:y}}else return hr.document.uri.toString()))}}n.create=e})(ea||(ea={}));var Fi=class{client;options;notebookSyncInfo;notebookDidOpen;disposables;selector;onChangeNotificationSent;onOpenNotificationSent;onCloseNotificationSent;onSaveNotificationSent;constructor(e,t,r,i,s,o){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(Zo.asDocumentSelector(t)),this.onChangeNotificationSent=r,this.onOpenNotificationSent=i,this.onCloseNotificationSent=s,this.onSaveNotificationSent=o,$e.workspace.onDidOpenNotebookDocument(a=>{this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a)},void 0,this.disposables);for(let a of $e.workspace.notebookDocuments)this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a);$e.workspace.onDidChangeNotebookDocument(a=>this.didChangeNotebookDocument(a),void 0,this.disposables),this.options.save===!0&&$e.workspace.onDidSaveNotebookDocument(a=>this.didSave(a),void 0,this.disposables),$e.workspace.onDidCloseNotebookDocument(a=>{this.didClose(a),this.notebookDidOpen.delete(a.uri.toString())},void 0,this.disposables)}getState(){for(let e of $e.workspace.notebookDocuments)if(this.getMatchingCellsConsideringSyncInfo(e)!==void 0)return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){if($e.languages.match(this.selector,e)>0)return!0;let t=e.uri.toString();for(let r of this.notebookSyncInfo.values())if(r.uris.has(t))return!0;return!1}didOpenNotebookCellTextDocument(e,t){if($e.languages.match(this.selector,t.document)===0||!this.notebookDidOpen.has(e.uri.toString()))return;let r=this.getSyncInfo(e),i=this.cellMatches(e,t);if(r!==void 0){let s=r.uris.has(t.document.uri.toString());if(i&&s||!i&&!s)return;if(i){let o=this.mergeCells(e,r,[t]);if(o!==void 0){let a=this.asNotebookDocumentChangeEvent(e,void 0,r,o);a!==void 0&&this.doSendChange(a,o).catch(()=>{})}}}else i&&this.doSendOpen(e,[t]).catch(()=>{})}didChangeNotebookCellTextDocument(e,t,r){if($e.languages.match(this.selector,r.document)===0)return;let i=this.getSyncInfo(e);i===void 0||!i.uris.has(t.document.uri.toString())||this.doSendChange({notebook:e,cells:{textContent:[r]}},i.cells).catch(()=>{})}didCloseNotebookCellTextDocument(e,t){let r=this.getSyncInfo(e);if(r===void 0)return;let i=t.document.uri,s=r.cells.findIndex(o=>o.document.uri.toString()===i.toString());if(s!==-1)if(s===0&&r.cells.length===1)this.doSendClose(e,r.cells).catch(()=>{});else{let o=r.cells.slice(),a=o.splice(s,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:s,deleteCount:1},didClose:a}}},o).catch(()=>{})}}dispose(){for(let e of this.disposables)e.dispose()}didOpen(e,t,r=this.getSyncInfo(e)){if(r!==void 0)if(t===void 0&&(t=r.cells.slice()),t!==void 0){let i=this.asNotebookDocumentChangeEvent(e,void 0,r,t);i!==void 0&&this.doSendChange(i,t).catch(()=>{})}else this.doSendClose(e,[]).catch(()=>{});else{if(t=this.getMatchingCells(e),t===void 0)return;this.doSendOpen(e,t).catch(()=>{})}}didChangeNotebookDocument(e){let t=e.notebook,r=this.getSyncInfo(t);if(r===void 0){if(e.contentChanges.length===0)return;let i=this.getMatchingCells(t);if(i===void 0)return;this.didOpen(t,i,r)}else{let i=this.getMatchingCellsFromEvent(t,r,e);if(i===void 0){this.didClose(t,r);return}let s=this.asNotebookDocumentChangeEvent(e.notebook,e,r,i);s!==void 0&&this.doSendChange(s,i).catch(()=>{})}}didSave(e){this.getSyncInfo(e)!==void 0&&this.doSendSave(e).catch(()=>{})}didClose(e,t=this.getSyncInfo(e)){if(t===void 0)return;let r=e.getCells().filter(i=>t.uris.has(i.document.uri.toString()));this.doSendClose(e,r).catch(()=>{})}async sendDidOpenNotebookDocument(e){if(this.getSyncInfo(e)!==void 0)throw new Error(`Notebook document ${e.uri.toString()} is already open`);let r=this.getMatchingCells(e);if(r!==void 0)return this.doSendOpen(e,r)}async doSendOpen(e,t){let r=async(s,o)=>{let a=o.map(u=>this.client.code2ProtocolConverter.asTextDocumentItem(u.document));try{await this.client.sendNotification(or.DidOpenNotebookDocumentNotification.type,{notebookDocument:ji.c2p.asNotebookDocument(s,o,this.client.code2ProtocolConverter),cellTextDocuments:a}),this.onOpenNotificationSent.fire(s)}catch(u){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",u),u}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),ea.create(t)),i?.didOpen!==void 0?i.didOpen(e,t,r):r(e,t)}async sendDidChangeNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e.notebook);if(t===void 0)throw new Error(`Received changed event for un-synced notebook ${e.notebook.uri.toString()}`);return this.doSendChange(e,t)}async doSendChange(e,t){let r=async s=>{try{await this.client.sendNotification(or.DidChangeNotebookDocumentNotification.type,{notebookDocument:ji.c2p.asVersionedNotebookDocumentIdentifier(s.notebook,this.client.code2ProtocolConverter),change:ji.c2p.asNotebookDocumentChangeEvent(s,this.client.code2ProtocolConverter)}),this.onChangeNotificationSent.fire(s)}catch(o){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",o),o}},i=this.client.middleware?.notebooks;return e.cells?.structure!==void 0&&this.notebookSyncInfo.set(e.notebook.uri.toString(),ea.create(t)),i?.didChange!==void 0?i?.didChange(e,r):r(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){let t=async i=>{try{await this.client.sendNotification(or.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(i.uri)}}),this.onSaveNotificationSent.fire(i)}catch(s){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",s),s}},r=this.client.middleware?.notebooks;return r?.didSave!==void 0?r.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e);if(t===void 0)throw new Error(`Received close event for un-synced notebook ${e.uri.toString()}`);return this.doSendClose(e,t)}async doSendClose(e,t){let r=async(s,o)=>{try{await this.client.sendNotification(or.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(s.uri)},cellTextDocuments:o.map(a=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(a.document))}),this.onCloseNotificationSent.fire(s)}catch(a){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",a),a}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),i?.didClose!==void 0?i.didClose(e,t,r):r(e,t)}getSynchronizedCells(e){return this.getSyncInfo(e)?.cells}asNotebookDocumentChangeEvent(e,t,r,i){if(t!==void 0&&t.notebook!==e)throw new Error("Notebook must be identical");let s={notebook:e};t?.metadata!==void 0&&(s.metadata=ji.c2p.asMetadata(t.metadata));let o;if(t?.cellChanges!==void 0&&t.cellChanges.length>0){let a=[];o=new Set(i.map(u=>u.document.uri.toString()));for(let u of t.cellChanges)o.has(u.cell.document.uri.toString())&&(u.executionSummary!==void 0||u.metadata!==void 0)&&a.push(u.cell);a.length>0&&(s.cells=s.cells??{},s.cells.data=a)}if((t?.contentChanges!==void 0&&t.contentChanges.length>0||t===void 0)&&r!==void 0&&i!==void 0){let a=r.cells,u=i,l=Cd.computeDiff(a,u,!1),f,p;if(l!==void 0){f=l.cells===void 0?new Map:new Map(l.cells.map(_=>[_.document.uri.toString(),_])),p=l.deleteCount===0?new Map:new Map(a.slice(l.start,l.start+l.deleteCount).map(_=>[_.document.uri.toString(),_]));for(let _ of Array.from(p.keys()))f.has(_)&&(p.delete(_),f.delete(_));s.cells=s.cells??{};let h=[],g=[];if(f.size>0||p.size>0){for(let _ of f.values())h.push(_);for(let _ of p.values())g.push(_)}s.cells.structure={array:l,didOpen:h,didClose:g}}}return Object.keys(s).length>1?s:void 0}getMatchingCells(e,t=e.getCells()){if(this.options.notebookSelector!==void 0){for(let r of this.options.notebookSelector)if(r.notebook===void 0||Yo.matchNotebook(r.notebook,e)){let i=this.filterCells(e,t,r.cells);return i.length===0?void 0:i}}}getMatchingCellsFromEvent(e,t,r){if(this.options.notebookSelector===void 0)return;let i;for(let u of this.options.notebookSelector)if(u.notebook===void 0||Yo.matchNotebook(u.notebook,e)){i=u;break}if(i===void 0)return;if((r.cellChanges===void 0||r.cellChanges.length===0)&&(r.contentChanges===void 0||r.contentChanges.length===0))return t.cells;let s;if(r.cellChanges!==void 0&&r.cellChanges.length>0){let u=r.cellChanges.map(f=>f.cell),l=this.filterCells(e,u,i.cells);if(l.length!==u.length){s=new Set(t.uris);for(let f of u)s.delete(f.document.uri.toString());for(let f of l)s.add(f.document.uri.toString())}}if(r.contentChanges!==void 0&&r.contentChanges.length>0){s===void 0&&(s=new Set(t.uris));for(let u of r.contentChanges){for(let f of u.removedCells)s.delete(f.document.uri.toString());let l=this.filterCells(e,new Array(...u.addedCells),i.cells);for(let f of l)s.add(f.document.uri.toString())}}if(s===void 0)return t.cells;let o=[],a=e.getCells();for(let u of a)s.has(u.document.uri.toString())&&o.push(u);return o}getMatchingCellsFromSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:void 0}getMatchingCellsConsideringSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:this.getMatchingCells(e)}mergeCells(e,t,r){let i=[],s=new Set(t.uris);for(let o of r)s.add(o.document.uri.toString());for(let o of e.getCells())s.has(o.document.uri.toString())&&i.push(o);return i}cellMatches(e,t){let r=this.getMatchingCells(e,[t]);return r!==void 0&&r[0]===t}filterCells(e,t,r){let i=r!==void 0?t.filter(s=>{let o=s.document.languageId;return r.some((a=>a.language==="*"||o===a.language))}):t;return typeof this.client.clientOptions.notebookDocumentOptions?.filterCells=="function"?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}getSyncInfo(e){return this.notebookSyncInfo.get(e.uri.toString())}},wd=class n{static CellScheme="vscode-notebook-cell";client;registrations;dedicatedChannel;_onChangeNotificationSent;_onOpenNotificationSent;_onCloseNotificationSent;_onSaveNotificationSent;constructor(e){this.client=e,this.registrations=new Map,this.registrationType=or.NotebookDocumentSyncRegistrationType.type,this._onChangeNotificationSent=new $e.EventEmitter,this._onOpenNotificationSent=new $e.EventEmitter,this._onCloseNotificationSent=new $e.EventEmitter,this._onSaveNotificationSent=new $e.EventEmitter,$e.workspace.onDidOpenTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let s of this.registrations.values())s instanceof Fi&&s.didOpenNotebookCellTextDocument(r,i)}),$e.workspace.onDidChangeTextDocument(t=>{if(t.contentChanges.length===0)return;let r=t.document;if(r.uri.scheme!==n.CellScheme)return;let[i,s]=this.findNotebookDocumentAndCell(r);if(!(i===void 0||s===void 0))for(let o of this.registrations.values())o instanceof Fi&&o.didChangeNotebookCellTextDocument(i,s,t)}),$e.workspace.onDidCloseTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let s of this.registrations.values())s instanceof Fi&&s.didCloseNotebookCellTextDocument(r,i)})}getState(){if(this.registrations.size===0)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(let e of this.registrations.values()){let t=e.getState();if(t.kind==="document"&&t.registrations===!0&&t.matches===!0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}registrationType;get onOpenNotificationSent(){return this._onOpenNotificationSent.event}get onChangeNotificationSent(){return this._onChangeNotificationSent.event}get onCloseNotificationSent(){return this._onCloseNotificationSent.event}get onSaveNotificationSent(){return this._onSaveNotificationSent.event}fillClientCapabilities(e){let t=oy(oy(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){let t=e.notebookDocumentSync;t!==void 0&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(Zo.asDocumentSelector(t)))}initialize(e){let t=e.notebookDocumentSync;if(t===void 0)return;let r=t.id??oP.generateUuid();this.register({id:r,registerOptions:t})}register(e){let t=new Fi(this.client,e.registerOptions,this._onChangeNotificationSent,this._onOpenNotificationSent,this._onCloseNotificationSent,this._onSaveNotificationSent);this.registrations.set(e.id,t)}unregister(e){let t=this.registrations.get(e);t!==void 0&&(this.registrations.delete(e),t.dispose())}clear(){for(let e of this.registrations.values())e.dispose();this.registrations.clear(),this._onChangeNotificationSent.dispose(),this._onChangeNotificationSent=new $e.EventEmitter,this._onOpenNotificationSent.dispose(),this._onOpenNotificationSent=new $e.EventEmitter,this._onCloseNotificationSent.dispose(),this._onCloseNotificationSent=new $e.EventEmitter,this._onSaveNotificationSent.dispose(),this._onSaveNotificationSent=new $e.EventEmitter}handles(e){if(e.uri.scheme!==n.CellScheme)return!1;if(this.dedicatedChannel!==void 0&&$e.languages.match(this.dedicatedChannel,e)>0)return!0;for(let t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(let t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){let t=e.uri.toString();for(let r of $e.workspace.notebookDocuments)for(let i of r.getCells())if(i.document.uri.toString()===t)return[r,i];return[void 0,void 0]}};Cn.NotebookDocumentSyncFeature=wd});var ly=T(zt=>{"use strict";var cP=zt&&zt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),uP=zt&&zt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),uy=zt&&zt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let i=o=>{let a=[];for(let u of o.items){let l=u.scopeUri!==void 0&&u.scopeUri!==null?this._client.protocol2CodeConverter.asUri(u.scopeUri):void 0;a.push(this.getConfiguration(l,u.section!==null?u.section:void 0))}return a},s=e.middleware.workspace;return s&&s.configuration?s.configuration(t,r,i):i(t,r)})}getConfiguration(e,t){let r=null;if(t){let i=t.lastIndexOf(".");if(i===-1)r=Qr(Li.workspace.getConfiguration(void 0,e).get(t));else{let s=Li.workspace.getConfiguration(t.substr(0,i),e);s&&(r=Qr(s.get(t.substr(i+1))))}}else{let i=Li.workspace.getConfiguration(void 0,e);r={};for(let s of Object.keys(i))i.has(s)&&(r[s]=Qr(i.get(s)))}return r===void 0&&(r=null),r}clear(){}};zt.ConfigurationFeature=Dd;function Qr(n){if(n){if(Array.isArray(n))return n.map(Qr);if(typeof n=="object"){let e=Object.create(null);for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=Qr(n[t]));return e}}return n}var Sd=class{_client;isCleared;_listeners;constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return Ss.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,cy.ensure)((0,cy.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;e!==void 0&&this.register({id:dP.generateUuid(),registerOptions:{section:e}})}register(e){let t=Li.workspace.onDidChangeConfiguration(r=>{this.onDidChangeConfiguration(e.registerOptions.section,r)});this._listeners.set(e.id,t),e.registerOptions.section!==void 0&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let r;if(lP.string(e)?r=[e]:r=e,r!==void 0&&t!==void 0&&!r.some(a=>t.affectsConfiguration(a)))return;let i=async o=>o===void 0?this._client.sendNotification(Ss.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(Ss.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(o)}),s=this._client.middleware.workspace?.didChangeConfiguration;(s?s(r,i):i(r)).catch(o=>{this._client.error(`Sending notification ${Ss.DidChangeConfigurationNotification.type.method} failed`,o)})}extractSettingsInformation(e){function t(s,o){let a=s;for(let u=0;u=0?u=Li.workspace.getConfiguration(o.substr(0,a),r).get(o.substr(a+1)):u=Li.workspace.getConfiguration(void 0,r).get(o),u){let l=e[s].split(".");t(i,l)[l[l.length-1]]=Qr(u)}}return i}};zt.SyncConfigurationFeature=Sd});var py={};Ba(py,{TextDocument:()=>Pd});function Rd(n,e){if(n.length<=1)return n;let t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);Rd(r,e),Rd(i,e);let s=0,o=0,a=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function fP(n){let e=hy(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var na,Pd,gy=Yh(()=>{"use strict";na=class n{constructor(e,t,r,i){this._uri=e,this._languageId=t,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 t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let r of e)if(n.isIncremental(r)){let i=hy(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),u=Math.max(i.end.line,0),l=this._lineOffsets,f=dy(r.text,!1,s);if(u-a===f.length)for(let h=0,g=f.length;he?i=o:r=o+1}let s=r-1;return e=this.ensureBeforeEOL(e,t[s]),{line:s,character:e-t[s]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line];if(e.character<=0)return r;let i=e.line+1=t.length){let o=t.length-1;return{start:{line:o,character:0},end:{line:o,character:this._content.length-t[o]}}}else if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=t[e],i=e+1=t.length)return"";if(e<0)return"";let r=e+1t&&fy(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")}static isFull(e){let t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0}};(function(n){function e(i,s,o,a){return new na(i,s,o,a)}n.create=e;function t(i,s,o){if(i instanceof na)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function r(i,s){let o=i.getText(),a=Rd(s.map(fP),(f,p)=>{let h=f.range.start.line-p.range.start.line;return h===0?f.range.start.character-p.range.start.character:h}),u=0,l=[];for(let f of a){let p=i.offsetAt(f.range.start);if(pu&&l.push(o.substring(u,p)),f.newText.length&&l.push(f.newText),u=i.offsetAt(f.range.end)}return l.push(o.substr(u)),l.join("")}n.applyEdits=r})(Pd||(Pd={}))});var my=T(rt=>{"use strict";var hP=rt&&rt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),pP=rt&&rt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),gP=rt&&rt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ie.middleware.didOpen,r=>e.code2ProtocolConverter.asOpenTextDocumentParams(r),r=>r,Ve.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingOpenNotifications=new Map,this._delayOpen=e.clientOptions.textSynchronization?.delayOpenNotifications??!1}async callback(e){if(this._delayOpen){if(!this.matches(e))return;if(this._client.visibleDocuments.isVisible(e))return super.callback(e);{let r=new Id(e);this._pendingOpenNotifications.set(r.uri.toString(),r)}}else return super.callback(e)}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,Ve.ensure)((0,Ve.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Ai.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return xe.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);if(nt.workspace.textDocuments.forEach(r=>{let i=r.uri.toString();if(!this._syncedDocuments.has(i)&&nt.languages.match(t,r)>0&&!this._client.hasDedicatedTextSynchronizationFeature(r))if(this._client.visibleDocuments.isVisible(r)){let o=this._client.middleware,a=u=>this._client.sendNotification(this._type,this._createParams(u));(o.didOpen?o.didOpen(r,a):a(r)).catch(u=>{this._client.error(`Sending document notification ${this._type.method} failed`,u)}),this._syncedDocuments.set(i,r)}else this._pendingOpenNotifications.set(i,r)}),this._delayOpen&&this._pendingOpenListeners===void 0){this._pendingOpenListeners=[];let r=this._client.visibleDocuments;this._pendingOpenListeners.push(r.onClose(i=>{for(let s of i)this._pendingOpenNotifications.delete(s.toString())})),this._pendingOpenListeners.push(r.onOpen(i=>{for(let s of i){let o=this._pendingOpenNotifications.get(s.toString());o!==void 0&&(super.callback(o).catch((a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})),this._pendingOpenNotifications.delete(s.toString()))}})),this._pendingOpenListeners.push(nt.workspace.onDidCloseTextDocument(i=>{this._pendingOpenNotifications.delete(i.uri.toString())}))}}async sendPendingOpenNotifications(e){let t=Array.from(this._pendingOpenNotifications.values());this._pendingOpenNotifications.clear();let r=!1;for(let i of t){if(e!==void 0&&i.uri.toString()===e){r=!0;continue}await super.callback(i)}return r}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,r)}clear(){if(this._pendingOpenNotifications.clear(),this._pendingOpenListeners!==void 0){for(let e of this._pendingOpenListeners)e.dispose();this._pendingOpenListeners=void 0}super.clear()}};rt.DidOpenTextDocumentFeature=Td;var Od=class extends Ve.TextDocumentEventFeature{_syncedDocuments;_pendingTextDocumentChanges;constructor(e,t,r){super(e,nt.workspace.onDidCloseTextDocument,xe.DidCloseTextDocumentNotification.type,()=>e.middleware.didClose,i=>e.code2ProtocolConverter.asCloseTextDocumentParams(i),i=>i,Ve.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=r}get registrationType(){return xe.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,Ve.ensure)((0,Ve.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Ai.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,r)}unregister(e){let t=this._selectors.get(e);if(t===void 0)return;super.unregister(e);let r=this._selectors.values();this._syncedDocuments.forEach(i=>{if(nt.languages.match(t,i)>0&&!this._selectorFilter(r,i)&&!this._client.hasDedicatedTextSynchronizationFeature(i)){let s=this._client.middleware,o=a=>this._client.sendNotification(this._type,this._createParams(a));this._syncedDocuments.delete(i.uri.toString()),(s.didClose?s.didClose(i,o):o(i)).catch(a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})}})}};rt.DidCloseTextDocumentFeature=Od;var Ed=class extends Ve.DynamicDocumentFeature{_listener;_changeData;_onNotificationSent;_onPendingChangeAdded;_pendingTextDocumentChanges;_syncKind;constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new nt.EventEmitter,this._onPendingChangeAdded=new nt.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=xe.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return xe.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,Ve.ensure)((0,Ve.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.change!==void 0&&r.change!==xe.TextDocumentSyncKind.None&&this.register({id:Ai.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:r.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=nt.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(let e of this._changeData.values())yield e.documentSelector}async callback(e){if(e.contentChanges.length===0)return;let t=e.document.uri,r=e.document.version,i=[];for(let s of this._changeData.values())if(nt.languages.match(s.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let o=this._client.middleware;if(s.syncKind===xe.TextDocumentSyncKind.Incremental){let a=async u=>{let l=this._client.code2ProtocolConverter.asChangeTextDocumentParams(u,t,r);await this._client.sendNotification(xe.DidChangeTextDocumentNotification.type,l),this.notificationSent(u.document,xe.DidChangeTextDocumentNotification.type,l)};i.push(o.didChange?o.didChange(e,u=>a(u)):a(e))}else if(s.syncKind===xe.TextDocumentSyncKind.Full){let a=async u=>{let l=u.document.uri.toString();this._pendingTextDocumentChanges.set(l,u.document),this._onPendingChangeAdded.fire()};i.push(o.didChange?o.didChange(e,u=>a(u)):a(e))}}return Promise.all(i).then(void 0,s=>{throw this._client.error(`Sending document notification ${xe.DidChangeTextDocumentNotification.type.method} failed`,s),s})}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){if(this._changeData.delete(e),this._changeData.size===0)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=xe.TextDocumentSyncKind.None;else{this._syncKind=xe.TextDocumentSyncKind.None;for(let t of this._changeData.values())if(this.updateSyncKind(t.syncKind),this._syncKind===xe.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=xe.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(this._pendingTextDocumentChanges.size===0)return[];let t;if(e.size===0)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(let r of this._pendingTextDocumentChanges)e.has(r[0])||(t.push(r[1]),this._pendingTextDocumentChanges.delete(r[0]))}return t}getProvider(e){for(let t of this._changeData.values())if(nt.languages.match(t.documentSelector,e)>0)return{send:r=>this.callback(r)}}updateSyncKind(e){if(this._syncKind!==xe.TextDocumentSyncKind.Full)switch(e){case xe.TextDocumentSyncKind.Full:this._syncKind=e;break;case xe.TextDocumentSyncKind.Incremental:this._syncKind===xe.TextDocumentSyncKind.None&&(this._syncKind=xe.TextDocumentSyncKind.Incremental);break}}};rt.DidChangeTextDocumentFeature=Ed;var qd=class extends Ve.TextDocumentEventFeature{constructor(e){super(e,nt.workspace.onWillSaveTextDocument,xe.WillSaveTextDocumentNotification.type,()=>e.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),t=>t.document,(t,r)=>Ve.TextDocumentEventFeature.textDocumentFilter(t,r.document))}get registrationType(){return xe.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let t=(0,Ve.ensure)((0,Ve.ensure)(e,"textDocument"),"synchronization");t.willSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSave&&this.register({id:Ai.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}};rt.WillSaveFeature=qd;var xd=class extends Ve.DynamicDocumentFeature{_listener;_selectors;constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return xe.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let t=(0,Ve.ensure)((0,Ve.ensure)(e,"textDocument"),"synchronization");t.willSaveWaitUntil=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSaveWaitUntil&&this.register({id:Ai.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=nt.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(Ve.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,r=i=>this._client.sendRequest(xe.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(i)).then(async s=>{let o=await this._client.protocol2CodeConverter.asTextEdits(s);return o===void 0?[]:o});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,r):r(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}};rt.WillSaveWaitUntilFeature=xd;var Md=class extends Ve.TextDocumentEventFeature{_includeText;constructor(e){super(e,nt.workspace.onDidSaveTextDocument,xe.DidSaveTextDocumentNotification.type,()=>e.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),t=>t,Ve.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return xe.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,Ve.ensure)((0,Ve.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;if(t&&r&&r.save){let i=typeof r.save=="boolean"?{includeText:!1}:{includeText:!!r.save.includeText};this.register({id:Ai.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},i)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}};rt.DidSaveTextDocumentFeature=Md;var _P="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function yP(n=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of _P)n.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}var vP=yP(),Id=class n{_extTextDocument;_capturedTextDocument;_content;_uri;_fileName;_languageId;_version;_eol;_isUntitled;_encoding;_isDirty;_isClosed;constructor(e){this._extTextDocument=e,this._content=e.getText(),this._uri=e.uri,this._fileName=e.fileName,this._languageId=e.languageId,this._version=e.version,this._eol=e.eol,this._isUntitled=e.isUntitled,this._encoding=e.encoding,this._isDirty=e.isDirty,this._isClosed=e.isClosed,this._capturedTextDocument=mP.TextDocument.create(this._uri.toString(),this._languageId,this._version,this._content)}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}get eol(){return this._eol}get isUntitled(){return this._isUntitled}get encoding(){return this._encoding}get fileName(){return this._fileName}get isDirty(){return this._isDirty}get isClosed(){return this._isClosed}save(){return this.version===this._extTextDocument.version?this._extTextDocument.save():Promise.resolve(!1)}get lineCount(){return this._capturedTextDocument.lineCount}offsetAt(e){return this._capturedTextDocument.offsetAt(e)}positionAt(e){let t=this._capturedTextDocument.positionAt(e);return new nt.Position(t.line,t.character)}getText(e){return this._capturedTextDocument.getText(e)}lineAt(e){let t=typeof e=="number"?e:this.validatePosition(e).line;if(t<0||t>=this.lineCount)throw new RangeError(`Illegal value for line: ${t}`);let r=this._capturedTextDocument.getLineRange(t),i=this._capturedTextDocument.getText(r),s=i.search(/\S/),o=new nt.Range(r.start.line,r.start.character,r.end.line,r.end.character),a=t+1=e.character)return new nt.Range(r,o.index,r,s.lastIndex)}validateRange(e){let t=this.validatePosition(e.start),r=this.validatePosition(e.end);return t===e.start&&r===e.end?e:new nt.Range(t.line,t.character,r.line,r.character)}validatePosition(e){let t=Math.min(Math.max(e.line,0),this.lineCount-1),r=this._capturedTextDocument.getLineRange(t),i=Math.min(Math.max(e.character,0),r.end.character);return t===e.line&&i===e.character?e:new nt.Position(t,i)}static getWordRegExp(e){let t=e??vP;if(t.flags.includes("g"))return t;let r=`${t.flags}g`;return new RegExp(t.source,r)}}});var _y=T(wn=>{"use strict";var bP=wn&&wn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),CP=wn&&wn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),wP=wn&&wn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let p=this._client,h=this._client.middleware,g=(_,y,D,M)=>p.sendRequest(pe.CompletionRequest.type,p.code2ProtocolConverter.asCompletionParams(_,y,D),M).then(w=>M.isCancellationRequested?null:p.protocol2CodeConverter.asCompletionResult(w,i,M),w=>p.handleFailedRequest(pe.CompletionRequest.type,M,w,null));return h.provideCompletionItem?h.provideCompletionItem(a,u,f,l,g):g(a,u,f,l)},resolveCompletionItem:e.resolveProvider?(a,u)=>{let l=this._client,f=this._client.middleware,p=(h,g)=>l.sendRequest(pe.CompletionResolveRequest.type,l.code2ProtocolConverter.asCompletionItem(h,!!this.labelDetailsSupport.get(t)),g).then(_=>g.isCancellationRequested?null:l.protocol2CodeConverter.asCompletionItem(_),_=>l.handleFailedRequest(pe.CompletionResolveRequest.type,g,_,h));return f.resolveCompletionItem?f.resolveCompletionItem(a,u,p):p(a,u)}:void 0};return[DP.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(s),o,...r),o]}};wn.CompletionItemFeature=jd});var yy=T(Dn=>{"use strict";var RP=Dn&&Dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),TP=Dn&&Dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),OP=Dn&&Dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(Ps.HoverRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asHover(g),g=>a.handleFailedRequest(Ps.HoverRequest.type,h,g,null)),l=a.middleware;return l.provideHover?l.provideHover(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return EP.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Dn.HoverFeature=Ld});var vy=T(Sn=>{"use strict";var xP=Sn&&Sn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),MP=Sn&&Sn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),IP=Sn&&Sn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(Ad.DefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(Ad.DefinitionRequest.type,h,g,null)),l=a.middleware;return l.provideDefinition?l.provideDefinition(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return NP.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Sn.DefinitionFeature=$d});var Cy=T(Pn=>{"use strict";var FP=Pn&&Pn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),LP=Pn&&Pn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),AP=Pn&&Pn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h,g)=>a.sendRequest(Rs.SignatureHelpRequest.type,a.code2ProtocolConverter.asSignatureHelpParams(f,p,h),g).then(_=>g.isCancellationRequested?null:a.protocol2CodeConverter.asSignatureHelp(_,g),_=>a.handleFailedRequest(Rs.SignatureHelpRequest.type,g,_,null)),l=a.middleware;return l.provideSignatureHelp?l.provideSignatureHelp(r,i,o,s,u):u(r,i,o,s)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){let r=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(e.retriggerCharacters===void 0){let i=e.triggerCharacters||[];return by.languages.registerSignatureHelpProvider(r,t,...i)}else{let i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return by.languages.registerSignatureHelpProvider(r,t,i)}}};Pn.SignatureHelpFeature=Hd});var wy=T(Rn=>{"use strict";var $P=Rn&&Rn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),UP=Rn&&Rn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),HP=Rn&&Rn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(Wd.DocumentHighlightRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDocumentHighlights(g,h),g=>a.handleFailedRequest(Wd.DocumentHighlightRequest.type,h,g,null)),l=a.middleware;return l.provideDocumentHighlights?l.provideDocumentHighlights(i,s,o,u):u(i,s,o)}};return[WP.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Rn.DocumentHighlightFeature=Kd});var Gd=T(St=>{"use strict";var KP=St&&St.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),BP=St&&St.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),VP=St&&St.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=async(f,p)=>{try{let h=await a.sendRequest(De.DocumentSymbolRequest.type,a.code2ProtocolConverter.asDocumentSymbolParams(f),p);if(p.isCancellationRequested||h===void 0||h===null)return null;if(h.length===0)return[];{let g=h[0];return De.DocumentSymbol.is(g)?await a.protocol2CodeConverter.asDocumentSymbols(h,p):await a.protocol2CodeConverter.asSymbolInformations(h,p)}}catch(h){return a.handleFailedRequest(De.DocumentSymbolRequest.type,p,h,null)}},l=a.middleware;return l.provideDocumentSymbols?l.provideDocumentSymbols(s,o,u):u(s,o)}},i=e.label!==void 0?{label:e.label}:void 0;return[GP.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,i),r]}};St.DocumentSymbolFeature=Vd});var Sy=T(Tn=>{"use strict";var JP=Tn&&Tn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),QP=Tn&&Tn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),YP=Tn&&Tn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let s=this._client,o=(u,l)=>s.sendRequest(Ts.WorkspaceSymbolRequest.type,{query:u},l).then(f=>l.isCancellationRequested?null:s.protocol2CodeConverter.asSymbolInformations(f,l),f=>s.handleFailedRequest(Ts.WorkspaceSymbolRequest.type,l,f,null)),a=s.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(r,i,o):o(r,i)},resolveWorkspaceSymbol:e.resolveProvider===!0?(r,i)=>{let s=this._client,o=(u,l)=>s.sendRequest(Ts.WorkspaceSymbolResolveRequest.type,s.code2ProtocolConverter.asWorkspaceSymbol(u),l).then(f=>l.isCancellationRequested?null:s.protocol2CodeConverter.asSymbolInformation(f),f=>s.handleFailedRequest(Ts.WorkspaceSymbolResolveRequest.type,l,f,null)),a=s.middleware;return a.resolveWorkspaceSymbol?a.resolveWorkspaceSymbol(r,i,o):o(r,i)}:void 0};return[ZP.languages.registerWorkspaceSymbolProvider(t),t]}};Tn.WorkspaceSymbolFeature=Jd});var Py=T(On=>{"use strict";var tR=On&&On.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),nR=On&&On.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),rR=On&&On.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=(p,h,g,_)=>u.sendRequest(Qd.ReferencesRequest.type,u.code2ProtocolConverter.asReferenceParams(p,h,g),_).then(y=>_.isCancellationRequested?null:u.protocol2CodeConverter.asReferences(y,_),y=>u.handleFailedRequest(Qd.ReferencesRequest.type,_,y,null)),f=u.middleware;return f.provideReferences?f.provideReferences(i,s,o,a,l):l(i,s,o,a)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return iR.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};On.ReferencesFeature=Zd});var Ry=T(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.TypeDefinitionFeature=void 0;var oR=require("vscode"),ef=se(),Os=ge(),tf=class extends Os.TextDocumentLanguageFeature{constructor(e){super(e,ef.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,Os.ensure)((0,Os.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,Os.ensure)((0,Os.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeDefinitionProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideTypeDefinition:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(ef.TypeDefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(ef.TypeDefinitionRequest.type,h,g,null)),l=a.middleware;return l.provideTypeDefinition?l.provideTypeDefinition(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return oR.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ra.TypeDefinitionFeature=tf});var Ty=T(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.ImplementationFeature=void 0;var aR=require("vscode"),nf=se(),rf=ge(),sf=class extends rf.TextDocumentLanguageFeature{constructor(e){super(e,nf.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,rf.ensure)((0,rf.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.implementationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideImplementation:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(nf.ImplementationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(nf.ImplementationRequest.type,h,g,null)),l=a.middleware;return l.provideImplementation?l.provideImplementation(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return aR.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ia.ImplementationFeature=sf});var Oy=T(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.ColorProviderFeature=void 0;var cR=require("vscode"),Es=se(),of=ge(),af=class extends of.TextDocumentLanguageFeature{constructor(e){super(e,Es.DocumentColorRequest.type)}fillClientCapabilities(e){(0,of.ensure)((0,of.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.colorProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideColorPresentations:(i,s,o)=>{let a=this._client,u=(f,p,h)=>{let g={color:f,textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(p.document),range:a.code2ProtocolConverter.asRange(p.range)};return a.sendRequest(Es.ColorPresentationRequest.type,g,h).then(_=>h.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(_,h),_=>a.handleFailedRequest(Es.ColorPresentationRequest.type,h,_,null))},l=a.middleware;return l.provideColorPresentations?l.provideColorPresentations(i,s,o,u):u(i,s,o)},provideDocumentColors:(i,s)=>{let o=this._client,a=(l,f)=>{let p={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(l)};return o.sendRequest(Es.DocumentColorRequest.type,p,f).then(h=>f.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(h,f),h=>o.handleFailedRequest(Es.DocumentColorRequest.type,f,h,null))},u=o.middleware;return u.provideDocumentColors?u.provideDocumentColors(i,s,a):a(i,s)}};return[cR.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};sa.ColorProviderFeature=af});var Ey=T(En=>{"use strict";var uR=En&&En.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),lR=En&&En.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),dR=En&&En.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=async(p,h,g,_)=>{let y={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h),context:u.code2ProtocolConverter.asCodeActionContextSync(g)};return u.sendRequest(Pt.CodeActionRequest.type,y,_).then(D=>_.isCancellationRequested||D===null||D===void 0?null:u.protocol2CodeConverter.asCodeActionResult(D,_),D=>u.handleFailedRequest(Pt.CodeActionRequest.type,_,D,null))},f=u.middleware;return f.provideCodeActions?f.provideCodeActions(i,s,o,a,l):l(i,s,o,a)},resolveCodeAction:e.resolveProvider?(i,s)=>{let o=this._client,a=this._client.middleware,u=async(l,f)=>o.sendRequest(Pt.CodeActionResolveRequest.type,o.code2ProtocolConverter.asCodeActionSync(l),f).then(p=>f.isCancellationRequested?l:o.protocol2CodeConverter.asCodeAction(p,f),p=>o.handleFailedRequest(Pt.CodeActionResolveRequest.type,f,p,l));return a.resolveCodeAction?a.resolveCodeAction(i,s,u):u(i,s)}:void 0};return[fR.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,this.getMetadata(e)),r]}getMetadata(e){if(!(e.codeActionKinds===void 0&&e.documentation===void 0))return{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds),documentation:this._client.protocol2CodeConverter.asCodeActionDocumentations(e.documentation)}}};En.CodeActionFeature=uf});var xy=T(qn=>{"use strict";var pR=qn&&qn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),gR=qn&&qn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),mR=qn&&qn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{for(let s of this.getAllProviders())s.onDidChangeCodeLensEmitter.fire()});let i=this.getRegistrationOptions(t,e.codeLensProvider);i&&this.register({id:_R.generateUuid(),registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new qy.EventEmitter,i={onDidChangeCodeLenses:r.event,provideCodeLenses:(s,o)=>{let a=this._client,u=(f,p)=>a.sendRequest(ki.CodeLensRequest.type,a.code2ProtocolConverter.asCodeLensParams(f),p).then(h=>p.isCancellationRequested?null:a.protocol2CodeConverter.asCodeLenses(h,p),h=>a.handleFailedRequest(ki.CodeLensRequest.type,p,h,null)),l=a.middleware;return l.provideCodeLenses?l.provideCodeLenses(s,o,u):u(s,o)},resolveCodeLens:e.resolveProvider?(s,o)=>{let a=this._client,u=(f,p)=>a.sendRequest(ki.CodeLensResolveRequest.type,a.code2ProtocolConverter.asCodeLens(f),p).then(h=>p.isCancellationRequested?f:a.protocol2CodeConverter.asCodeLens(h),h=>a.handleFailedRequest(ki.CodeLensResolveRequest.type,p,h,f)),l=a.middleware;return l.resolveCodeLens?l.resolveCodeLens(s,o,u):u(s,o)}:void 0};return[qy.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeCodeLensEmitter:r}]}};qn.CodeLensFeature=lf});var My=T(Ft=>{"use strict";var yR=Ft&&Ft.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vR=Ft&&Ft.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bR=Ft&&Ft.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),options:a.code2ProtocolConverter.asFormattingOptions(p,$i.fromConfiguration(f))};return a.sendRequest(dn.DocumentFormattingRequest.type,g,h).then(_=>h.isCancellationRequested?null:a.protocol2CodeConverter.asTextEdits(_,h),_=>a.handleFailedRequest(dn.DocumentFormattingRequest.type,h,_,null))},l=a.middleware;return l.provideDocumentFormattingEdits?l.provideDocumentFormattingEdits(i,s,o,u):u(i,s,o)}};return[oa.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ft.DocumentFormattingFeature=df;var ff=class extends ar.TextDocumentLanguageFeature{constructor(e){super(e,dn.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){let t=(0,ar.ensure)((0,ar.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);r&&this.register({id:pf.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentRangeFormattingEdits:(i,s,o,a)=>{let u=this._client,l=(p,h,g,_)=>{let y={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h),options:u.code2ProtocolConverter.asFormattingOptions(g,$i.fromConfiguration(p))};return u.sendRequest(dn.DocumentRangeFormattingRequest.type,y,_).then(D=>_.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(D,_),D=>u.handleFailedRequest(dn.DocumentRangeFormattingRequest.type,_,D,null))},f=u.middleware;return f.provideDocumentRangeFormattingEdits?f.provideDocumentRangeFormattingEdits(i,s,o,a,l):l(i,s,o,a)}};return e.rangesSupport&&(r.provideDocumentRangesFormattingEdits=(i,s,o,a)=>{let u=this._client,l=(p,h,g,_)=>{let y={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),ranges:u.code2ProtocolConverter.asRanges(h),options:u.code2ProtocolConverter.asFormattingOptions(g,$i.fromConfiguration(p))};return u.sendRequest(dn.DocumentRangesFormattingRequest.type,y,_).then(D=>_.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(D,_),D=>u.handleFailedRequest(dn.DocumentRangesFormattingRequest.type,_,D,null))},f=u.middleware;return f.provideDocumentRangesFormattingEdits?f.provideDocumentRangesFormattingEdits(i,s,o,a,l):l(i,s,o,a)}),[oa.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ft.DocumentRangeFormattingFeature=ff;var hf=class extends ar.TextDocumentLanguageFeature{constructor(e){super(e,dn.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,ar.ensure)((0,ar.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);r&&this.register({id:pf.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideOnTypeFormattingEdits:(s,o,a,u,l)=>{let f=this._client,p=(g,_,y,D,M)=>{let w={textDocument:f.code2ProtocolConverter.asTextDocumentIdentifier(g),position:f.code2ProtocolConverter.asPosition(_),ch:y,options:f.code2ProtocolConverter.asFormattingOptions(D,$i.fromConfiguration(g))};return f.sendRequest(dn.DocumentOnTypeFormattingRequest.type,w,M).then(I=>M.isCancellationRequested?null:f.protocol2CodeConverter.asTextEdits(I,M),I=>f.handleFailedRequest(dn.DocumentOnTypeFormattingRequest.type,M,I,null))},h=f.middleware;return h.provideOnTypeFormattingEdits?h.provideOnTypeFormattingEdits(s,o,a,u,l,p):p(s,o,a,u,l)}},i=e.moreTriggerCharacter||[];return[oa.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,e.firstTriggerCharacter,...i),r]}};Ft.DocumentOnTypeFormattingFeature=hf});var jy=T(xn=>{"use strict";var CR=xn&&xn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),wR=xn&&xn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ny=xn&&xn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=async(p,h,g,_)=>{let y={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),position:u.code2ProtocolConverter.asPosition(h),newName:g},D=null;try{D=await u.sendRequest(Yr.RenameRequest.type,y,_)}catch(w){return u.handleFailedRequest(Yr.RenameRequest.type,_,w,null,!1)}if(_.isCancellationRequested||D===null)return null;let M=await u.protocol2CodeConverter.asWorkspaceEdit(D,_);if(_.isCancellationRequested)return null;if(!u.validateWorkspaceEdit(D))throw new Error("The rename edit returned from the server is not valid anymore and cannot be applied.");return M},f=u.middleware;return f.provideRenameEdits?f.provideRenameEdits(i,s,o,a,l):l(i,s,o,a)},prepareRename:e.prepareProvider?(i,s,o)=>{let a=this._client,u=(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),position:a.code2ProtocolConverter.asPosition(p)};return a.sendRequest(Yr.PrepareRenameRequest.type,g,h).then(_=>h.isCancellationRequested?null:Yr.Range.is(_)?a.protocol2CodeConverter.asRange(_):this.isDefaultBehavior(_)?_.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):_&&Yr.Range.is(_.range)?{range:a.protocol2CodeConverter.asRange(_.range),placeholder:_.placeholder}:Promise.reject(new Error("The element can't be renamed.")),_=>{throw typeof _.message=="string"?new Error(_.message):new Error("The element can't be renamed.")})},l=a.middleware;return l.prepareRename?l.prepareRename(i,s,o,u):u(i,s,o)}:void 0};return[this.registerProvider(t,r),r]}registerProvider(e,t){return DR.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){let t=e;return t&&Iy.boolean(t.defaultBehavior)}};xn.RenameFeature=mf});var Fy=T(Mn=>{"use strict";var PR=Mn&&Mn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),RR=Mn&&Mn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),TR=Mn&&Mn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let o=this._client,a=(l,f)=>o.sendRequest(xs.DocumentLinkRequest.type,o.code2ProtocolConverter.asDocumentLinkParams(l),f).then(p=>f.isCancellationRequested?null:o.protocol2CodeConverter.asDocumentLinks(p,f),p=>o.handleFailedRequest(xs.DocumentLinkRequest.type,f,p,null)),u=o.middleware;return u.provideDocumentLinks?u.provideDocumentLinks(i,s,a):a(i,s)},resolveDocumentLink:e.resolveProvider?(i,s)=>{let o=this._client,a=(l,f)=>o.sendRequest(xs.DocumentLinkResolveRequest.type,o.code2ProtocolConverter.asDocumentLink(l),f).then(p=>f.isCancellationRequested?l:o.protocol2CodeConverter.asDocumentLink(p),p=>o.handleFailedRequest(xs.DocumentLinkResolveRequest.type,f,p,l)),u=o.middleware;return u.resolveDocumentLink?u.resolveDocumentLink(i,s,a):a(i,s)}:void 0};return[OR.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Mn.DocumentLinkFeature=yf});var Ay=T(In=>{"use strict";var qR=In&&In.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),xR=In&&In.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),MR=In&&In.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}}get registrationType(){return vf.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,Ly.ensure)((0,Ly.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:NR.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let t=this._client,r=t.middleware,i=(s,o)=>{let a={command:s,arguments:o};return t.sendRequest(vf.ExecuteCommandRequest.type,a).then(void 0,u=>t.handleFailedRequest(vf.ExecuteCommandRequest.type,void 0,u,void 0))};if(e.registerOptions.commands){let s=[];for(let o of e.registerOptions.commands)s.push(IR.commands.registerCommand(o,(...a)=>r.executeCommand?r.executeCommand(o,a,i):i(o,a)));this._commands.set(e.id,s)}}unregister(e){let t=this._commands.get(e);t&&(this._commands.delete(e),t.forEach(r=>r.dispose()))}clear(){this._commands.forEach(e=>{e.forEach(t=>t.dispose())}),this._commands.clear()}};In.ExecuteCommandFeature=bf});var $y=T(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.FoldingRangeFeature=void 0;var ky=require("vscode"),Zr=se(),Ms=ge(),Cf=class extends Ms.TextDocumentLanguageFeature{constructor(e){super(e,Zr.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,Ms.ensure)((0,Ms.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[Zr.FoldingRangeKind.Comment,Zr.FoldingRangeKind.Imports,Zr.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,Ms.ensure)((0,Ms.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(Zr.FoldingRangeRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeFoldingRange.fire()});let[r,i]=this.getRegistration(t,e.foldingRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new ky.EventEmitter,i={onDidChangeFoldingRanges:r.event,provideFoldingRanges:(s,o,a)=>{let u=this._client,l=(p,h,g)=>{let _={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p)};return u.sendRequest(Zr.FoldingRangeRequest.type,_,g).then(y=>g.isCancellationRequested?null:u.protocol2CodeConverter.asFoldingRanges(y,g),y=>u.handleFailedRequest(Zr.FoldingRangeRequest.type,g,y,null))},f=u.middleware;return f.provideFoldingRanges?f.provideFoldingRanges(s,o,a,l):l(s,o,a)}};return[ky.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeFoldingRange:r}]}};aa.FoldingRangeFeature=Cf});var Uy=T(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.DeclarationFeature=void 0;var jR=require("vscode"),wf=se(),Df=ge(),Sf=class extends Df.TextDocumentLanguageFeature{constructor(e){super(e,wf.DeclarationRequest.type)}fillClientCapabilities(e){let t=(0,Df.ensure)((0,Df.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.declarationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDeclaration:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(wf.DeclarationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDeclarationResult(g,h),g=>a.handleFailedRequest(wf.DeclarationRequest.type,h,g,null)),l=a.middleware;return l.provideDeclaration?l.provideDeclaration(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return jR.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ca.DeclarationFeature=Sf});var Hy=T(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.SelectionRangeFeature=void 0;var FR=require("vscode"),Pf=se(),Rf=ge(),Tf=class extends Rf.TextDocumentLanguageFeature{constructor(e){super(e,Pf.SelectionRangeRequest.type)}fillClientCapabilities(e){let t=(0,Rf.ensure)((0,Rf.ensure)(e,"textDocument"),"selectionRange");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.selectionRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideSelectionRanges:(i,s,o)=>{let a=this._client,u=async(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),positions:a.code2ProtocolConverter.asPositionsSync(p,h)};return a.sendRequest(Pf.SelectionRangeRequest.type,g,h).then(_=>h.isCancellationRequested?null:a.protocol2CodeConverter.asSelectionRanges(_,h),_=>a.handleFailedRequest(Pf.SelectionRangeRequest.type,h,_,null))},l=a.middleware;return l.provideSelectionRanges?l.provideSelectionRanges(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return FR.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ua.SelectionRangeFeature=Tf});var Wy=T(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.CallHierarchyFeature=void 0;var LR=require("vscode"),ei=se(),Of=ge(),Ef=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,r){let i=this.client,s=this.middleware,o=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(ei.CallHierarchyPrepareRequest.type,f,l).then(p=>l.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(p,l),p=>i.handleFailedRequest(ei.CallHierarchyPrepareRequest.type,l,p,null))};return s.prepareCallHierarchy?s.prepareCallHierarchy(e,t,r,o):o(e,t,r)}provideCallHierarchyIncomingCalls(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(o)};return r.sendRequest(ei.CallHierarchyIncomingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyIncomingCalls(l,a),l=>r.handleFailedRequest(ei.CallHierarchyIncomingCallsRequest.type,a,l,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,s):s(e,t)}provideCallHierarchyOutgoingCalls(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(o)};return r.sendRequest(ei.CallHierarchyOutgoingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyOutgoingCalls(l,a),l=>r.handleFailedRequest(ei.CallHierarchyOutgoingCallsRequest.type,a,l,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,s):s(e,t)}},qf=class extends Of.TextDocumentLanguageFeature{constructor(e){super(e,ei.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=e,r=(0,Of.ensure)((0,Of.ensure)(t,"textDocument"),"callHierarchy");r.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.callHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new Ef(t);return[LR.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};la.CallHierarchyFeature=qf});var Ky=T(Nn=>{"use strict";var AR=Nn&&Nn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kR=Nn&&Nn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),zy=Nn&&Nn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{for(let o of this.getAllProviders())o.onDidChangeSemanticTokensEmitter.fire()});let[i,s]=this.getRegistration(t,e.semanticTokensProvider);!i||!s||this.register({id:i,registerOptions:s})}registerLanguageProvider(e){let t=e.documentSelector,r=$R.boolean(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,s=new da.EventEmitter,o=r?{onDidChangeSemanticTokens:s.event,provideDocumentSemanticTokens:(g,_)=>{let y=this._client,D=y.middleware,M=(w,I)=>{let j={textDocument:y.code2ProtocolConverter.asTextDocumentIdentifier(w)};return y.sendRequest(ce.SemanticTokensRequest.type,j,I).then(A=>I.isCancellationRequested?null:y.protocol2CodeConverter.asSemanticTokens(A,I),A=>y.handleFailedRequest(ce.SemanticTokensRequest.type,I,A,null))};return D.provideDocumentSemanticTokens?D.provideDocumentSemanticTokens(g,_,M):M(g,_)},provideDocumentSemanticTokensEdits:i?(g,_,y)=>{let D=this._client,M=D.middleware,w=(I,j,A)=>{let de={textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(I),previousResultId:j};return D.sendRequest(ce.SemanticTokensDeltaRequest.type,de,A).then(async le=>A.isCancellationRequested?null:ce.SemanticTokens.is(le)?await D.protocol2CodeConverter.asSemanticTokens(le,A):await D.protocol2CodeConverter.asSemanticTokensEdits(le,A),le=>D.handleFailedRequest(ce.SemanticTokensDeltaRequest.type,A,le,null))};return M.provideDocumentSemanticTokensEdits?M.provideDocumentSemanticTokensEdits(g,_,y,w):w(g,_,y)}:void 0}:void 0,u=e.range===!0?{onDidChangeSemanticTokens:s.event,provideDocumentRangeSemanticTokens:(g,_,y)=>{let D=this._client,M=D.middleware,w=(I,j,A)=>{let de={textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(I),range:D.code2ProtocolConverter.asRange(j)};return D.sendRequest(ce.SemanticTokensRangeRequest.type,de,A).then(le=>A.isCancellationRequested?null:D.protocol2CodeConverter.asSemanticTokens(le,A),le=>D.handleFailedRequest(ce.SemanticTokensRangeRequest.type,A,le,null))};return M.provideDocumentRangeSemanticTokens?M.provideDocumentRangeSemanticTokens(g,_,y,w):w(g,_,y)}}:void 0,l=[],f=this._client,p=f.protocol2CodeConverter.asSemanticTokensLegend(e.legend),h=f.protocol2CodeConverter.asDocumentSelector(t);return o!==void 0&&l.push(da.languages.registerDocumentSemanticTokensProvider(h,o,p)),u!==void 0&&l.push(da.languages.registerDocumentRangeSemanticTokensProvider(h,u,p)),[new da.Disposable(()=>l.forEach(g=>g.dispose())),{range:u,full:o,onDidChangeSemanticTokensEmitter:s}]}};Nn.SemanticTokensFeature=xf});var Vy=T(jn=>{"use strict";var UR=jn&&jn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),HR=jn&&jn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),By=jn&&jn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(Mf.LinkedEditingRangeRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asLinkedEditingRanges(g,h),g=>a.handleFailedRequest(Mf.LinkedEditingRangeRequest.type,h,g,null)),l=a.middleware;return l.provideLinkedEditingRange?l.provideLinkedEditingRange(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return WR.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};jn.LinkedEditingFeature=Nf});var Gy=T(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.TypeHierarchyFeature=void 0;var zR=require("vscode"),ti=se(),jf=ge(),Ff=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,r){let i=this.client,s=this.middleware,o=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(ti.TypeHierarchyPrepareRequest.type,f,l).then(p=>l.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(p,l),p=>i.handleFailedRequest(ti.TypeHierarchyPrepareRequest.type,l,p,null))};return s.prepareTypeHierarchy?s.prepareTypeHierarchy(e,t,r,o):o(e,t,r)}provideTypeHierarchySupertypes(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(o)};return r.sendRequest(ti.TypeHierarchySupertypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(ti.TypeHierarchySupertypesRequest.type,a,l,null))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,s):s(e,t)}provideTypeHierarchySubtypes(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(o)};return r.sendRequest(ti.TypeHierarchySubtypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(ti.TypeHierarchySubtypesRequest.type,a,l,null))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,s):s(e,t)}},Lf=class extends jf.TextDocumentLanguageFeature{constructor(e){super(e,ti.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=(0,jf.ensure)((0,jf.ensure)(e,"textDocument"),"typeHierarchy");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new Ff(t);return[zR.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};fa.TypeHierarchyFeature=Lf});var Jy=T(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.InlineValueFeature=void 0;var Xy=require("vscode"),ha=se(),Ns=ge(),Af=class extends Ns.TextDocumentLanguageFeature{constructor(e){super(e,ha.InlineValueRequest.type)}fillClientCapabilities(e){(0,Ns.ensure)((0,Ns.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,Ns.ensure)((0,Ns.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(ha.InlineValueRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeInlineValues.fire()});let[r,i]=this.getRegistration(t,e.inlineValueProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Xy.EventEmitter,i={onDidChangeInlineValues:r.event,provideInlineValues:(s,o,a,u)=>{let l=this._client,f=(h,g,_,y)=>{let D={textDocument:l.code2ProtocolConverter.asTextDocumentIdentifier(h),range:l.code2ProtocolConverter.asRange(g),context:l.code2ProtocolConverter.asInlineValueContext(_)};return l.sendRequest(ha.InlineValueRequest.type,D,y).then(M=>y.isCancellationRequested?null:l.protocol2CodeConverter.asInlineValues(M,y),M=>l.handleFailedRequest(ha.InlineValueRequest.type,y,M,null))},p=l.middleware;return p.provideInlineValues?p.provideInlineValues(s,o,a,u,f):f(s,o,a,u)}};return[this.registerProvider(t,i),{provider:i,onDidChangeInlineValues:r}]}registerProvider(e,t){return Xy.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};pa.InlineValueFeature=Af});var Yy=T(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.InlayHintsFeature=void 0;var Qy=require("vscode"),Ui=se(),js=ge(),kf=class extends js.TextDocumentLanguageFeature{constructor(e){super(e,Ui.InlayHintRequest.type)}fillClientCapabilities(e){let t=(0,js.ensure)((0,js.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,js.ensure)((0,js.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(Ui.InlayHintRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeInlayHints.fire()});let[r,i]=this.getRegistration(t,e.inlayHintProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Qy.EventEmitter,i={onDidChangeInlayHints:r.event,provideInlayHints:(s,o,a)=>{let u=this._client,l=async(p,h,g)=>{let _={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h)};try{let y=await u.sendRequest(Ui.InlayHintRequest.type,_,g);return g.isCancellationRequested?null:u.protocol2CodeConverter.asInlayHints(y,g)}catch(y){return u.handleFailedRequest(Ui.InlayHintRequest.type,g,y,null)}},f=u.middleware;return f.provideInlayHints?f.provideInlayHints(s,o,a,l):l(s,o,a)}};return i.resolveInlayHint=e.resolveProvider===!0?(s,o)=>{let a=this._client,u=async(f,p)=>{try{let h=await a.sendRequest(Ui.InlayHintResolveRequest.type,a.code2ProtocolConverter.asInlayHint(f),p);if(p.isCancellationRequested)return null;let g=a.protocol2CodeConverter.asInlayHint(h,p);return p.isCancellationRequested?null:g}catch(h){return a.handleFailedRequest(Ui.InlayHintResolveRequest.type,p,h,null)}},l=a.middleware;return l.resolveInlayHint?l.resolveInlayHint(s,o,u):u(s,o)}:void 0,[this.registerProvider(t,i),{provider:i,onDidChangeInlayHints:r}]}registerProvider(e,t){return Qy.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ga.InlayHintsFeature=kf});var Zy=T(fn=>{"use strict";var KR=fn&&fn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),BR=fn&&fn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),VR=fn&&fn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ie.indexOf(t)<0)}var Hf=class{_client;_listeners;_initialFolders;constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return Fs.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=ma.workspace.workspaceFolders;this.initializeWithFolders(t),t===void 0?e.workspaceFolders=null:e.workspaceFolders=t.map(r=>this.asProtocol(r))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(Fs.WorkspaceFoldersRequest.type,s=>{let o=()=>{let u=ma.workspace.workspaceFolders;return u===void 0?null:u.map(f=>this.asProtocol(f))},a=t.middleware.workspace;return a&&a.workspaceFolders?a.workspaceFolders(s,o):o(s)});let r=$f($f($f(e,"workspace"),"workspaceFolders"),"changeNotifications"),i;typeof r=="string"?i=r:r===!0&&(i=GR.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){let r=Uf(this._initialFolders,e),i=Uf(e,this._initialFolders);(i.length>0||r.length>0)&&(t=this.doSendEvent(i,r))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));t!==void 0&&t.catch(r=>{this._client.error(`Sending notification ${Fs.DidChangeWorkspaceFoldersNotification.type.method} failed`,r)})}doSendEvent(e,t){let r={event:{added:e.map(i=>this.asProtocol(i)),removed:t.map(i=>this.asProtocol(i))}};return this._client.sendNotification(Fs.DidChangeWorkspaceFoldersNotification.type,r)}register(e){let t=e.id,r=this._client,i=ma.workspace.onDidChangeWorkspaceFolders(s=>{let o=l=>this.doSendEvent(l.added,l.removed),a=r.middleware.workspace;(a&&a.didChangeWorkspaceFolders?a.didChangeWorkspaceFolders(s,o):o(s)).catch(l=>{this._client.error(`Sending notification ${Fs.DidChangeWorkspaceFoldersNotification.type.method} failed`,l)})});this._listeners.set(t,i),this.sendInitialEvent(ma.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);t!==void 0&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return e===void 0?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}};fn.WorkspaceFoldersFeature=Hf});var nv=T(it=>{"use strict";var XR=it&&it.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),JR=it&&it.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),va=it&&it.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){let t=ev(ev(e,"workspace"),"fileOperations");tv(t,"dynamicRegistration",!0),tv(t,this._clientCapability,!0)}initialize(e){let t=e.workspace?.fileOperations,r=t!==void 0?ZR(t,this._serverCapability):void 0;if(r?.filters!==void 0)try{this.register({id:YR.generateUuid(),registerOptions:{filters:r.filters}})}catch(i){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${i}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let t=e.registerOptions.filters.map(r=>{let i=new QR.Minimatch(r.pattern.glob,n.asMinimatchOptions(r.pattern.options));if(!i.makeRe())throw new Error(`Invalid pattern ${r.pattern.glob}!`);return{scheme:r.scheme,matcher:i,kind:r.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),this._filters.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return n.getFileType(e)}async filter(e,t){let r=await Promise.all(e.files.map(async s=>{let o=t(s),a=o.fsPath.replace(/\\/g,"/");for(let u of this._filters.values())for(let l of u)if(!(l.scheme!==void 0&&l.scheme!==o.scheme)){if(l.matcher.match(a)){if(l.kind===void 0)return!0;let f=await this.getFileType(o);if(f===void 0)return this._client.info(`Unable to determine file type for ${o.toString()}. Treating as a match.`),!0;if(f===nn.FileType.File&&l.kind===cr.FileOperationPatternKind.file||f===nn.FileType.Directory&&l.kind===cr.FileOperationPatternKind.folder)return!0}else if(l.kind===cr.FileOperationPatternKind.folder&&await n.getFileType(o)===nn.FileType.Directory&&l.matcher.match(`${a}/`))return!0}return!1})),i=e.files.filter((s,o)=>r[o]);return{...e,files:i}}static async getFileType(e){try{return(await nn.workspace.fs.stat(e)).type}catch{return}}static asMinimatchOptions(e){let t={dot:!0};return e?.ignoreCase===!0&&(t.nocase=!0),t}},_a=class extends Ls{_notificationType;_accessUri;_createParams;constructor(e,t,r,i,s,o,a){super(e,t,r,i,s),this._notificationType=r,this._accessUri=o,this._createParams=a}async send(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=async i=>this._client.sendNotification(this._notificationType,this._createParams(i));return this.doSend(t,r)}}},ya=class extends _a{_willListener;_fsPathFileTypes=new Map;async getFileType(e){let t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);let r=await Ls.getFileType(e);return r&&this._fsPathFileTypes.set(t,r),r}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),this.filterSize()===0&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}},Wf=class extends _a{constructor(e){super(e,nn.workspace.onDidCreateFiles,cr.DidCreateFilesNotification.type,"didCreate","didCreate",t=>t,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.didCreateFiles?r.didCreateFiles(e,t):t(e)}};it.DidCreateFilesFeature=Wf;var zf=class extends ya{constructor(e){super(e,nn.workspace.onDidRenameFiles,cr.DidRenameFilesNotification.type,"didRename","didRename",t=>t.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=nn.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,t=>t.oldUri))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didRenameFiles?r.didRenameFiles(e,t):t(e)}};it.DidRenameFilesFeature=zf;var Kf=class extends ya{constructor(e){super(e,nn.workspace.onDidDeleteFiles,cr.DidDeleteFilesNotification.type,"didDelete","didDelete",t=>t,e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=nn.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,t=>t))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didDeleteFiles?r.didDeleteFiles(e,t):t(e)}};it.DidDeleteFilesFeature=Kf;var As=class extends Ls{_requestType;_accessUri;_createParams;constructor(e,t,r,i,s,o,a){super(e,t,r,i,s),this._requestType=r,this._accessUri=o,this._createParams=a}async send(e){let t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=i=>this._client.sendRequest(this._requestType,this._createParams(i),i.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,r)}else return}},Bf=class extends As{constructor(e){super(e,nn.workspace.onWillCreateFiles,cr.WillCreateFilesRequest.type,"willCreate","willCreate",t=>t,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willCreateFiles?r.willCreateFiles(e,t):t(e)}};it.WillCreateFilesFeature=Bf;var Vf=class extends As{constructor(e){super(e,nn.workspace.onWillRenameFiles,cr.WillRenameFilesRequest.type,"willRename","willRename",t=>t.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willRenameFiles?r.willRenameFiles(e,t):t(e)}};it.WillRenameFilesFeature=Vf;var Gf=class extends As{constructor(e){super(e,nn.workspace.onWillDeleteFiles,cr.WillDeleteFilesRequest.type,"willDelete","willDelete",t=>t,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willDeleteFiles?r.willDeleteFiles(e,t):t(e)}};it.WillDeleteFilesFeature=Gf});var rv=T(Fn=>{"use strict";var eT=Fn&&Fn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),tT=Fn&&Fn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),nT=Fn&&Fn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=this._client.middleware,f=(p,h,g,_)=>u.sendRequest(Xf.InlineCompletionRequest.type,u.code2ProtocolConverter.asInlineCompletionParams(p,h,g),_).then(y=>_.isCancellationRequested?null:u.protocol2CodeConverter.asInlineCompletionResult(y,_),y=>u.handleFailedRequest(Xf.InlineCompletionRequest.type,_,y,null));return l.provideInlineCompletionItems?l.provideInlineCompletionItems(i,s,o,a,f):f(i,s,o,a)}};return[rT.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Fn.InlineCompletionItemFeature=Qf});var ov=T(Ln=>{"use strict";var sT=Ln&&Ln.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),oT=Ln&&Ln.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),sv=Ln&&Ln.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0;return{kind:"workspace",id:Hi.TextDocumentContentRequest.method,registrations:e}}get registrationType(){return Hi.TextDocumentContentRequest.type}getProviders(){let e=[];for(let t of this._registrations.values())e.push(...t.providers);return e}fillClientCapabilities(e){let t=(0,iv.ensure)((0,iv.ensure)(e,"workspace"),"textDocumentContent");t.dynamicRegistration=!0}initialize(e){let t=this._client;if(t.onRequest(Hi.TextDocumentContentRefreshRequest.type,async s=>{let o=t.protocol2CodeConverter.asUri(s.uri);for(let a of this._registrations.values())for(let u of a.providers)u.scheme===o.scheme&&u.onDidChangeEmitter.fire(o)}),!e?.workspace?.textDocumentContent)return;let r=e.workspace.textDocumentContent,i=Hi.StaticRegistrationOptions.hasId(r)?r.id:aT.generateUuid();this.register({id:i,registerOptions:r})}register(e){let t=[],r=[];for(let i of e.registerOptions.schemes){let[s,o]=this.registerTextDocumentContentProvider(i);t.push(o),r.push(s)}this._registrations.set(e.id,{disposable:Yf.Disposable.from(...r),providers:t})}registerTextDocumentContentProvider(e){let t=new Yf.EventEmitter,r={onDidChange:t.event,provideTextDocumentContent:(i,s)=>{let o=this._client,a=(l,f)=>{let p={uri:o.code2ProtocolConverter.asUri(l)};return o.sendRequest(Hi.TextDocumentContentRequest.type,p,f).then(h=>f.isCancellationRequested?null:h.text,h=>o.handleFailedRequest(Hi.TextDocumentContentRequest.type,f,h,null))},u=o.middleware;return u.provideTextDocumentContent?u.provideTextDocumentContent(i,s,a):a(i,s)}};return[Yf.workspace.registerTextDocumentContentProvider(e,r),{scheme:e,onDidChangeEmitter:t,provider:r}]}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}};Ln.TextDocumentContentFeature=Zf});var av=T(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.FileSystemWatcherFeature=void 0;var cT=require("vscode"),ni=se(),ba=ge(),eh=class{_client;_notifyFileEvent;_watchers;constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return ni.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,ba.ensure)((0,ba.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,ba.ensure)((0,ba.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let r of e.registerOptions.watchers){let i=this._client.protocol2CodeConverter.asGlobPattern(r.globPattern);if(i===void 0)continue;let s=!0,o=!0,a=!0;r.kind!==void 0&&r.kind!==null&&(s=(r.kind&ni.WatchKind.Create)!==0,o=(r.kind&ni.WatchKind.Change)!==0,a=(r.kind&ni.WatchKind.Delete)!==0);let u=cT.workspace.createFileSystemWatcher(i,!s,!o,!a);this.hookListeners(u,s,o,a,t),t.push(u)}this._watchers.set(e.id,t)}registerRaw(e,t){let r=[];for(let i of t)this.hookListeners(i,!0,!0,!0,r);this._watchers.set(e,r)}hookListeners(e,t,r,i,s){t&&e.onDidCreate(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:ni.FileChangeType.Created}),null,s),r&&e.onDidChange(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:ni.FileChangeType.Changed}),null,s),i&&e.onDidDelete(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:ni.FileChangeType.Deleted}),null,s)}unregister(e){let t=this._watchers.get(e);if(t){this._watchers.delete(e);for(let r of t)r.dispose()}}clear(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}};Ca.FileSystemWatcherFeature=eh});var uv=T(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.ProgressFeature=void 0;var cv=se(),uT=ed();function lT(n,e){return n[e]===void 0&&(n[e]=Object.create(null)),n[e]}var th=class{_client;activeParts;constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:cv.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){lT(e,"window").workDoneProgress=!0}initialize(){let e=this._client,t=i=>{this.activeParts.delete(i)},r=i=>{this.activeParts.add(new uT.ProgressPart(this._client,i.token,t))};e.onRequest(cv.WorkDoneProgressCreateRequest.type,r)}clear(){for(let e of this.activeParts)e.done();this.activeParts.clear()}};wa.ProgressFeature=th});var lh=T(Te=>{"use strict";var dT=Te&&Te.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),fT=Te&&Te.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Pa=Te&&Te.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let t=this.open,r=new Set;n.fillVisibleResources(r);let i=new Set,s=new Set(r);for(let o of t.values())r.has(o)?s.delete(o):i.add(o);if(this.open=r,i.size>0){let o=new Set;for(let a of i)o.add(re.Uri.parse(a));this._onClose.fire(o)}if(s.size>0){let o=new Set;for(let a of s)o.add(re.Uri.parse(a));this._onOpen.fire(o)}};this.disposables.push(re.window.tabGroups.onDidChangeTabs(t=>{t.closed.length===0&&t.opened.length===0||e()})),this.disposables.push(re.window.onDidChangeVisibleTextEditors(t=>{e()}))}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposables.forEach(e=>e.dispose())}isActive(e){return e instanceof re.Uri?re.window.activeTextEditor?.document.uri===e:re.window.activeTextEditor?.document===e}isVisible(e){let t=e instanceof re.Uri?e:e.uri;return t.scheme===rh.NotebookDocumentSyncFeature.CellScheme?re.workspace.notebookDocuments.some(r=>this.open.has(r.uri.toString())?r.getCells().find(s=>s.document.uri.toString()===t.toString())!==void 0:!1):this.open.has(t.toString())}getResources(){let e=new Set;return n.fillVisibleResources(new Set,e),e}static fillVisibleResources(e,t){let r=e??new Set;for(let i of re.window.tabGroups.all)for(let s of i.tabs){let o=s.input,a;o instanceof re.TabInputText?a=o.uri:o instanceof re.TabInputTextDiff?a=o.modified:(o instanceof re.TabInputCustom||o instanceof re.TabInputNotebook)&&(a=o.uri),a!==void 0&&!r.has(a.toString())&&(r.add(a.toString()),t!==void 0&&t.add(a))}for(let i of re.window.visibleTextEditors){let s=i.document.uri;r.has(s.toString())||(r.add(s.toString()),t!==void 0&&t.add(s))}}},Sa=class n{_id;_name;_clientOptions;_state;_onStart;_onStop;_connection;_idleInterval;_ignoredRegistrations;_listeners;_disposed;_notificationHandlers;_notificationDisposables;_pendingNotificationHandlers;_requestHandlers;_requestDisposables;_pendingRequestHandlers;_progressHandlers;_pendingProgressHandlers;_progressDisposables;_initializeResult;_outputChannel;_disposeOutputChannel;_traceOutputChannel;_traceLogLevel;_capabilities;_diagnostics;_syncedDocuments;_didChangeTextDocumentFeature;_inFlightOpenNotifications;_pendingChangeSemaphore;_pendingChangeDelayer;_didOpenTextDocumentFeature;_fileEvents;_fileEventDelayer;_telemetryEmitter;_stateChangeEmitter;_trace;_traceFormat=L.TraceFormat.Text;_tracer;_c2p;_p2c;_visibleDocuments;constructor(e,t,r){this._id=e,this._name=t,r=r||{};let i={isTrusted:!1,supportHtml:!1,supportThemeIcons:!1};r.markdown!==void 0&&(i.isTrusted=ih.sanitizeIsTrusted(r.markdown.isTrusted),i.supportHtml=r.markdown.supportHtml===!0,i.supportThemeIcons=r.markdown.supportThemeIcons===!0),this._clientOptions={documentSelector:r.documentSelector??[],synchronize:r.synchronize??{},diagnosticCollectionName:r.diagnosticCollectionName,outputChannelName:r.outputChannelName??this._name,revealOutputChannelOn:r.revealOutputChannelOn??ri.Error,stdioEncoding:r.stdioEncoding??"utf8",initializationOptions:r.initializationOptions,initializationFailedHandler:r.initializationFailedHandler,progressOnInitialization:!!r.progressOnInitialization,errorHandler:r.errorHandler??this.createDefaultErrorHandler(r.connectionOptions?.maxRestartCount),middleware:r.middleware??{},uriConverters:r.uriConverters,workspaceFolder:r.workspaceFolder,connectionOptions:r.connectionOptions,markdown:i,diagnosticPullOptions:r.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:r.notebookDocumentOptions??{},textSynchronization:this.createTextSynchronizationOptions(r.textSynchronization)},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=fe.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,r.outputChannel?(this._outputChannel=r.outputChannel,this._disposeOutputChannel=!1,this._traceLogLevel=this._outputChannel.logLevel):(this._outputChannel=void 0,this._disposeOutputChannel=!0,this._traceLogLevel=re.LogLevel.Info),this._traceOutputChannel=r.traceOutputChannel,this._traceOutputChannel!==void 0&&(this._traceLogLevel=this._traceOutputChannel.logLevel),this._diagnostics=void 0,this._inFlightOpenNotifications=new Set,this._pendingChangeSemaphore=new Da.Semaphore(1),this._pendingChangeDelayer=new Da.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new Da.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new L.Emitter,this._stateChangeEmitter=new L.Emitter,this._trace=L.Trace.Off,this._tracer={log:(s,o)=>{hn.string(s)?this.trace(s,o):this.traceObject(s)}},this._c2p=hT.createConverter(r.uriConverters?r.uriConverters.code2Protocol:void 0),this._p2c=pT.createConverter(r.uriConverters?r.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml,this._clientOptions.markdown.supportThemeIcons),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}createTextSynchronizationOptions(e){return e?typeof e.delayOpenNotifications=="boolean"?{delayOpenNotifications:e.delayOpenNotifications}:{delayOpenNotifications:!1}:{delayOpenNotifications:!1}}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get visibleDocuments(){return this._visibleDocuments===void 0&&(this._visibleDocuments=new oh),this._visibleDocuments}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=re.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name,{log:!0}),this._traceOutputChannel===void 0&&(this._traceLogLevel=this._outputChannel.logLevel)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let r=this.getPublicState();r!==t&&this._stateChangeEmitter.fire({oldState:t,newState:r})}getPublicState(){switch(this.$state){case fe.Starting:return Ki.Starting;case fe.Running:return Ki.Running;case fe.StartFailed:return Ki.StartFailed;default:return Ki.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===fe.StartFailed||this.$state===fe.Stopping||this.$state===fe.Stopped)return Promise.reject(new L.ResponseError(L.ErrorCodes.ConnectionInactive,"Client is not running"));let r=await this.$start();await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(),this._didChangeTextDocumentFeature.syncKind===L.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(r);let i,s;if(t.length===1?L.CancellationToken.is(t[0])?s=t[0]:i=t[0]:t.length===2&&(i=t[0],s=t[1]),s!==void 0&&s.isCancellationRequested)return Promise.reject(new L.ResponseError(L.LSPErrorCodes.RequestCancelled,"Request got cancelled"));let o=this._clientOptions.middleware?.sendRequest;return o!==void 0?o(e,i,s,(a,u,l)=>{let f=[];return u!==void 0&&f.push(u),l!==void 0&&f.push(l),r.sendRequest(a,...f)}):r.sendRequest(e,...t)}onRequest(e,t){let r=typeof e=="string"?e:e.method;this._requestHandlers.set(r,t);let i=this.activeConnection(),s;return i!==void 0?(this._requestDisposables.set(r,i.onRequest(e,t)),s={dispose:()=>{let o=this._requestDisposables.get(r);o!==void 0&&(o.dispose(),this._requestDisposables.delete(r))}}):(this._pendingRequestHandlers.set(r,t),s={dispose:()=>{this._pendingRequestHandlers.delete(r);let o=this._requestDisposables.get(r);o!==void 0&&(o.dispose(),this._requestDisposables.delete(r))}}),{dispose:()=>{this._requestHandlers.delete(r),s.dispose()}}}async sendNotification(e,t){if(this.$state===fe.StartFailed||this.$state===fe.Stopping||this.$state===fe.Stopped)return Promise.reject(new L.ResponseError(L.ErrorCodes.ConnectionInactive,"Client is not running"));let r=this._didChangeTextDocumentFeature.syncKind===L.TextDocumentSyncKind.Full,i;r&&typeof e!="string"&&e.method===L.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._inFlightOpenNotifications.add(i));let s;typeof e!="string"&&e.method===L.DidCloseTextDocumentNotification.method&&(s=t.textDocument.uri);let o=await this.$start();if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(s))return;r&&await this.sendPendingFullTextDocumentChanges(o),i!==void 0&&this._inFlightOpenNotifications.delete(i);let u=this._clientOptions.middleware?.sendNotification;return u?u(e,o.sendNotification.bind(o),t):o.sendNotification(e,t)}onNotification(e,t){let r=typeof e=="string"?e:e.method;this._notificationHandlers.set(r,t);let i=this.activeConnection(),s;return i!==void 0?(this._notificationDisposables.set(r,i.onNotification(e,t)),s={dispose:()=>{let o=this._notificationDisposables.get(r);o!==void 0&&(o.dispose(),this._notificationDisposables.delete(r))}}):(this._pendingNotificationHandlers.set(r,t),s={dispose:()=>{this._pendingNotificationHandlers.delete(r);let o=this._notificationDisposables.get(r);o!==void 0&&(o.dispose(),this._notificationDisposables.delete(r))}}),{dispose:()=>{this._notificationHandlers.delete(r),s.dispose()}}}async sendProgress(e,t,r){if(this.$state===fe.StartFailed||this.$state===fe.Stopping||this.$state===fe.Stopped)return Promise.reject(new L.ResponseError(L.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,r)}catch(i){throw this.error(`Sending progress for token ${t} failed.`,i),i}}onProgress(e,t,r){this._progressHandlers.set(t,{type:e,handler:r});let i=this.activeConnection(),s,o=this._clientOptions.middleware?.handleWorkDoneProgress,a=L.WorkDoneProgress.is(e)&&o!==void 0?u=>{o(t,u,()=>r(u))}:r;return i!==void 0?(this._progressDisposables.set(t,i.onProgress(e,t,a)),s={dispose:()=>{let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:r}),s={dispose:()=>{this._pendingProgressHandlers.delete(t);let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),s.dispose()}}}createDefaultErrorHandler(e){if(e!==void 0&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new sh(this,e??4)}async setTrace(e){this._trace=e;let t=this.activeConnection();t!==void 0&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof L.ResponseError){let t=e;return` Message: ${t.message} + Code: ${t.code} ${t.data?` +`+t.data.toString():""}`}return e instanceof Error?hn.string(e.stack)?e.stack:e.message:hn.string(e)?e:e.toString()}shouldLogToOutputChannel(){return this.$state!==fe.Stopped?!0:this._outputChannel!==void 0}error(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.error(this.getLogMessage(e,t)),(r==="force"||r&&this._clientOptions.revealOutputChannelOn<=ri.Error)&&this.showNotificationMessage(L.MessageType.Error,e,t)}warn(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.warn(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=ri.Warn&&this.showNotificationMessage(L.MessageType.Warning,e,t)}info(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.info(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=ri.Info&&this.showNotificationMessage(L.MessageType.Info,e,t)}debug(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.debug(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=ri.Debug&&this.showNotificationMessage(L.MessageType.Debug,e,t)}trace(e,t){this.traceOutputChannel.trace(this.getLogMessage(e,t))}traceObject(e){this.traceOutputChannel.trace(JSON.stringify(e))}showNotificationMessage(e,t,r){t=t??"A request has failed. See the output for more information.",r&&(t+=` +`+this.data2String(r)),(e===L.MessageType.Error?re.window.showErrorMessage:e===L.MessageType.Warning?re.window.showWarningMessage:re.window.showInformationMessage)(t,"Go to output").then(s=>{s!==void 0&&this.outputChannel.show(!0)})}getLogMessage(e,t){return t!=null?`${e} +${this.data2String(t)}`:e}needsStart(){return this.$state===fe.Initial||this.$state===fe.Stopping||this.$state===fe.Stopped}needsStop(){return this.$state===fe.Starting||this.$state===fe.Running}activeConnection(){return this.$state===fe.Running&&this._connection!==void 0?this._connection:void 0}isRunning(){return this.$state===fe.Running}async start(){if(this._disposed==="disposing"||this._disposed==="disposed")throw new Error("Client got disposed and can't be restarted.");if(this.$state===fe.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(this._onStart!==void 0)return this._onStart;let[e,t,r]=this.createOnStartPromise();this._onStart=e,this._diagnostics===void 0&&(this._diagnostics=re.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName??this._id));for(let[i,s]of this._notificationHandlers)this._pendingNotificationHandlers.has(i)||this._pendingNotificationHandlers.set(i,s);for(let[i,s]of this._requestHandlers)this._pendingRequestHandlers.has(i)||this._pendingRequestHandlers.set(i,s);for(let[i,s]of this._progressHandlers)this._pendingProgressHandlers.has(i)||this._pendingProgressHandlers.set(i,s);this.$state=fe.Starting;try{let i=await this.createConnection();i.onNotification(L.LogMessageNotification.type,s=>{switch(s.type){case L.MessageType.Error:this.error(s.message,void 0,!1);break;case L.MessageType.Warning:this.warn(s.message,void 0,!1);break;case L.MessageType.Info:this.info(s.message,void 0,!1);break;case L.MessageType.Debug:this.debug(s.message,void 0,!1);break;default:this.outputChannel.appendLine(s.message)}}),i.onNotification(L.ShowMessageNotification.type,s=>{switch(s.type){case L.MessageType.Error:re.window.showErrorMessage(s.message);break;case L.MessageType.Warning:re.window.showWarningMessage(s.message);break;case L.MessageType.Info:re.window.showInformationMessage(s.message);break;default:re.window.showInformationMessage(s.message)}}),i.onRequest(L.ShowMessageRequest.type,s=>{let o;switch(s.type){case L.MessageType.Error:o=re.window.showErrorMessage;break;case L.MessageType.Warning:o=re.window.showWarningMessage;break;case L.MessageType.Info:o=re.window.showInformationMessage;break;default:o=re.window.showInformationMessage}let a=s.actions||[];return o(s.message,...a)}),i.onNotification(L.TelemetryEventNotification.type,s=>{this._telemetryEmitter.fire(s)}),i.onRequest(L.ShowDocumentRequest.type,async(s,o)=>{let a=async l=>{let f=this.protocol2CodeConverter.asUri(l.uri);try{if(l.external===!0)return{success:await re.env.openExternal(f)};{let p={};return l.selection!==void 0&&(p.selection=this.protocol2CodeConverter.asRange(l.selection)),l.takeFocus===void 0||l.takeFocus===!1?p.preserveFocus=!0:l.takeFocus===!0&&(p.preserveFocus=!1),await re.window.showTextDocument(f,p),{success:!0}}}catch{return{success:!1}}},u=this._clientOptions.middleware.window?.showDocument;return u!==void 0?u(s,o,a):a(s)}),i.listen(),await this.initialize(i),t()}catch(i){this.$state=fe.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,i,"force"),r(i)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise((i,s)=>{e=i,t=s}),e,t]}async initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,[r,i]=this._clientOptions.workspaceFolder!==void 0?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],s={processId:null,clientInfo:{name:re.env.appName,version:re.version},locale:this.getLocale(),rootPath:r||null,rootUri:r?this._c2p.asUri(re.Uri.file(r)):null,capabilities:this.computeClientCapabilities(),initializationOptions:hn.func(t)?t():t,trace:L.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(s),this._clientOptions.progressOnInitialization){let o=lv.generateUuid(),a=new gT.ProgressPart(e,o);s.workDoneToken=o;try{let u=await this.doInitialize(e,s);return a.done(),u}catch(u){throw a.cancel(),u}}else return this.doInitialize(e,s)}async doInitialize(e,t){try{let r=await e.initialize(t);if(r.capabilities.positionEncoding!==void 0&&r.capabilities.positionEncoding!==L.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${r.capabilities.positionEncoding}) received from server ${this.name}`);this._initializeResult=r,this.$state=fe.Running;let i;hn.number(r.capabilities.textDocumentSync)?r.capabilities.textDocumentSync===L.TextDocumentSyncKind.None?i={openClose:!1,change:L.TextDocumentSyncKind.None,save:void 0}:i={openClose:!0,change:r.capabilities.textDocumentSync,save:{includeText:!1}}:r.capabilities.textDocumentSync!==void 0&&r.capabilities.textDocumentSync!==null&&(i=r.capabilities.textDocumentSync),this._capabilities=Object.assign({},r.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(L.PublishDiagnosticsNotification.type,s=>this.handleDiagnostics(s)),e.onRequest(L.RegistrationRequest.type,s=>this.handleRegistrationRequest(s)),e.onRequest("client/registerFeature",s=>this.handleRegistrationRequest(s)),e.onRequest(L.UnregistrationRequest.type,s=>this.handleUnregistrationRequest(s)),e.onRequest("client/unregisterFeature",s=>this.handleUnregistrationRequest(s)),e.onRequest(L.ApplyWorkspaceEditRequest.type,s=>this.handleApplyWorkspaceEdit(s));for(let[s,o]of this._pendingNotificationHandlers)this._notificationDisposables.set(s,e.onNotification(s,o));this._pendingNotificationHandlers.clear();for(let[s,o]of this._pendingRequestHandlers)this._requestDisposables.set(s,e.onRequest(s,o));this._pendingRequestHandlers.clear();for(let[s,o]of this._pendingProgressHandlers)this._progressDisposables.set(s,e.onProgress(o.type,s,o.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(L.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookLogLevelChanged(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),r}catch(r){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(r)?this.initialize(e):this.stop():r instanceof L.ResponseError&&r.data&&r.data.retry?re.window.showErrorMessage(r.message,{title:"Retry",id:"retry"}).then(i=>{i&&i.id==="retry"?this.initialize(e):this.stop()}):(r&&r.message&&re.window.showErrorMessage(r.message),this.error("Server initialization failed.",r),this.stop()),r}}_clientGetRootPath(){let e=re.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}stop(e=2e3){return this.shutdown(Fr.Stop,e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t=2e3){if(this.$state===fe.Stopped||this.$state===fe.Initial)return;if(this.$state===fe.Stopping){if(this._onStop!==void 0)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}let r=this.activeConnection();if(r===void 0||this.$state!==fe.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=fe.Stopping,this.cleanUp(e);let i=new Promise(o=>{(0,L.RAL)().timer.setTimeout(o,t)}),s=(async o=>(await o.shutdown(),await o.exit(),o))(r);return this._onStop=Promise.race([i,s]).then(o=>{if(o!==void 0)o.end(),o.dispose();else throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out")},o=>{throw this.error("Stopping server failed",o,!1),o}).finally(()=>{this.$state=fe.Stopped,e===Fr.Stop&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()})}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();let t=this._listeners.splice(0,this._listeners.length);for(let r of t)r.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(let r of Array.from(this._features.entries()).map(i=>i[1]).reverse())r.clear();(e===Fr.Stop||e===Fr.Restart)&&this._diagnostics!==void 0&&(this._diagnostics.dispose(),this._diagnostics=void 0),this._idleInterval!==void 0&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){this._outputChannel!==void 0&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){let t=this;async function r(s){return t._fileEvents.push(s),t._fileEventDelayer.trigger(async()=>{let o=t._fileEvents;t._fileEvents=[];try{await t.sendNotification(L.DidChangeWatchedFilesNotification.type,{changes:o})}catch(a){throw t._fileEvents.push(...o),a}})}let i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,r):r(e)).catch(s=>{t.error("Notifying file events failed.",s)})}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock(async()=>{try{let t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications);if(t.length===0)return;for(let r of t){let i=this.code2ProtocolConverter.asChangeTextDocumentParams(r);await e.sendNotification(L.DidChangeTextDocumentNotification.type,i),this._didChangeTextDocumentFeature.notificationSent(r,L.DidChangeTextDocumentNotification.type,i)}}catch(t){throw this.error("Sending pending changes failed",t,!1),t}})}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger(async()=>{let e=this.activeConnection();if(e===void 0){this.triggerPendingChangeDelivery();return}await this.sendPendingFullTextDocumentChanges(e)}).catch(e=>this.error("Delivering pending changes failed",e,!1))}_diagnosticQueue=new Map;_diagnosticQueueState={state:"idle"};handleDiagnostics(e){if(!this._diagnostics)return;let t=e.uri;this._diagnosticQueueState.state==="busy"&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,L.RAL)().timer.setImmediate(()=>{this.workDiagnosticQueue()})}workDiagnosticQueue(){if(this._diagnosticQueueState.state==="busy")return;let e=this._diagnosticQueue.entries().next();if(e.done===!0)return;let[t,r]=e.value;this._diagnosticQueue.delete(t);let i=new re.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(r,i.token).then(s=>{if(!i.token.isCancellationRequested){let o=this._p2c.asUri(t),a=this.clientOptions.middleware;a.handleDiagnostics?a.handleDiagnostics(o,s,(u,l)=>this.setDiagnostics(u,l)):this.setDiagnostics(o,s)}}).catch(s=>{this.error("Processing diagnostic queue failed.",s)}).finally(()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()})}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return re.env.language}async $start(){if(this.$state===fe.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();let e=this.activeConnection();if(e===void 0)throw new Error("Starting server failed");return e}async createConnection(){let e=(i,s,o)=>{this.handleConnectionError(i,s,o).catch(a=>this.error("Handling connection error failed",a))},t=()=>{this.handleConnectionClosed().catch(i=>this.error("Handling connection close failed",i))},r=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=VT(r.reader,r.writer,e,t,this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===fe.Stopped)return;try{this._connection!==void 0&&this._connection.dispose()}catch{}let e={action:Lr.DoNotRestart};if(this.$state!==fe.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch{}this._connection=void 0,e.action===Lr.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,e.handled===!0?!1:"force"),this.cleanUp(Fr.Stop),this.$state===fe.Starting?this.$state=fe.StartFailed:this.$state=fe.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===Lr.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",void 0,!e.handled),this.cleanUp(Fr.Restart),this.$state=fe.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch(t=>this.error("Restarting server failed",t,"force")))}async handleConnectionError(e,t,r){let i=await this._clientOptions.errorHandler.error(e,t,r);i.action===ks.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring. +${e.message} +Shutting down server.`,void 0,i.handled===!0?!1:"force"),this.stop().catch(s=>{this.error("Stopping server failed",s,!1)})):this.error(i.message??`Client ${this._name}: connection to server is erroring. +${e.message}`,void 0,i.handled===!0?!1:"force")}hookConfigurationChanged(e){this._listeners.push(re.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)}))}hookLogLevelChanged(e){this._listeners.push(this.traceOutputChannel.onDidChangeLogLevel(t=>{this._traceLogLevel=t,this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){let r=re.workspace.getConfiguration(this._id),i=this._traceLogLevel!==re.LogLevel.Trace?L.Trace.Off:L.Trace.Messages,s=L.TraceFormat.Text;if(r&&i!==L.Trace.Off){let o=r.get("trace.server","messages");typeof o=="string"?(i=L.Trace.fromString(o),i===L.Trace.Off&&(i=L.Trace.Messages)):(i=L.Trace.fromString(r.get("trace.server.verbosity","messages")),i===L.Trace.Off&&(i=L.Trace.Messages),s=L.TraceFormat.fromString(r.get("trace.server.format","text")))}this._trace=i,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch(o=>{this.error("Updating trace failed with error",o,!1)})}hookFileEvents(e){let t=this._clientOptions.synchronize.fileEvents;if(!t)return;let r;hn.array(t)?r=t:r=[t],r&&this._dynamicFeatures.get(L.DidChangeWatchedFilesNotification.type.method).registerRaw(lv.generateUuid(),r)}_features=[];_dynamicFeatures=new Map;registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),Kt.DynamicFeature.is(e)){let t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){let t=this.getFeature(L.NotebookDocumentSyncRegistrationType.method);return t===void 0||!(t instanceof rh.NotebookDocumentSyncFeature)?!1:t.handles(e)}registerBuiltinFeatures(){let e=new Map;this.registerFeature(new dv.ConfigurationFeature(this)),this._didOpenTextDocumentFeature=new Wi.DidOpenTextDocumentFeature(this,this._syncedDocuments),this.registerFeature(this._didOpenTextDocumentFeature),this._didChangeTextDocumentFeature=new Wi.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded(()=>{this.triggerPendingChangeDelivery()}),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new Wi.WillSaveFeature(this)),this.registerFeature(new Wi.WillSaveWaitUntilFeature(this)),this.registerFeature(new Wi.DidSaveTextDocumentFeature(this)),this.registerFeature(new Wi.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new KT.FileSystemWatcherFeature(this,t=>this.notifyFileEvent(t))),this.registerFeature(new _T.CompletionItemFeature(this)),this.registerFeature(new yT.HoverFeature(this)),this.registerFeature(new bT.SignatureHelpFeature(this)),this.registerFeature(new vT.DefinitionFeature(this)),this.registerFeature(new ST.ReferencesFeature(this)),this.registerFeature(new CT.DocumentHighlightFeature(this)),this.registerFeature(new wT.DocumentSymbolFeature(this)),this.registerFeature(new DT.WorkspaceSymbolFeature(this)),this.registerFeature(new OT.CodeActionFeature(this)),this.registerFeature(new ET.CodeLensFeature(this)),this.registerFeature(new nh.DocumentFormattingFeature(this)),this.registerFeature(new nh.DocumentRangeFormattingFeature(this)),this.registerFeature(new nh.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new qT.RenameFeature(this)),this.registerFeature(new xT.DocumentLinkFeature(this)),this.registerFeature(new MT.ExecuteCommandFeature(this)),this.registerFeature(new dv.SyncConfigurationFeature(this)),this.registerFeature(new PT.TypeDefinitionFeature(this)),this.registerFeature(new RT.ImplementationFeature(this)),this.registerFeature(new TT.ColorProviderFeature(this)),this.clientOptions.workspaceFolder===void 0&&this.registerFeature(new HT.WorkspaceFoldersFeature(this)),this.registerFeature(new IT.FoldingRangeFeature(this)),this.registerFeature(new NT.DeclarationFeature(this)),this.registerFeature(new jT.SelectionRangeFeature(this)),this.registerFeature(new BT.ProgressFeature(this)),this.registerFeature(new FT.CallHierarchyFeature(this)),this.registerFeature(new LT.SemanticTokensFeature(this)),this.registerFeature(new AT.LinkedEditingFeature(this)),this.registerFeature(new zi.DidCreateFilesFeature(this)),this.registerFeature(new zi.DidRenameFilesFeature(this)),this.registerFeature(new zi.DidDeleteFilesFeature(this)),this.registerFeature(new zi.WillCreateFilesFeature(this)),this.registerFeature(new zi.WillRenameFilesFeature(this)),this.registerFeature(new zi.WillDeleteFilesFeature(this)),this.registerFeature(new kT.TypeHierarchyFeature(this)),this.registerFeature(new $T.InlineValueFeature(this)),this.registerFeature(new UT.InlayHintsFeature(this)),this.registerFeature(new mT.DiagnosticFeature(this)),this.registerFeature(new rh.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(uh.createAll(this))}fillInitializeParams(e){for(let t of this._features)hn.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};(0,Kt.ensure)(e,"workspace").applyEdit=!0;let t=(0,Kt.ensure)((0,Kt.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[L.ResourceOperationKind.Create,L.ResourceOperationKind.Rename,L.ResourceOperationKind.Delete],t.failureHandling=L.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0},t.metadataSupport=!0,t.snippetEditSupport=!0;let r=(0,Kt.ensure)((0,Kt.ensure)(e,"textDocument"),"publishDiagnostics");r.relatedInformation=!0,r.versionSupport=!1,r.tagSupport={valueSet:[L.DiagnosticTag.Unnecessary,L.DiagnosticTag.Deprecated]},r.codeDescriptionSupport=!0,r.dataSupport=!0;let i=(0,Kt.ensure)((0,Kt.ensure)(e,"textDocument"),"filters");i.relativePatternSupport=!0;let s=(0,Kt.ensure)(e,"window"),o=(0,Kt.ensure)(s,"showMessage");o.messageActionItem={additionalPropertiesSupport:!0};let a=(0,Kt.ensure)(s,"showDocument");a.support=!0;let u=(0,Kt.ensure)(e,"general");u.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(n.RequestsToCancelOnContentModified)},u.regularExpressions={engine:"ECMAScript",version:"ES2020"},u.markdown={parser:"marked",version:"1.1.0"},u.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(u.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let l of this._features)l.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let r of this._features)hn.func(r.preInitialize)&&r.preInitialize(this._capabilities,t);for(let r of this._features)r.initialize(this._capabilities,t)}async handleRegistrationRequest(e){let t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,r=>this.doRegisterCapability(r)):this.doRegisterCapability(e)}async doRegisterCapability(e){if(!this.isRunning()){for(let t of e.registrations)this._ignoredRegistrations.add(t.id);return}for(let t of e.registrations){let r=this._dynamicFeatures.get(t.method);if(r===void 0)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));let i=t.registerOptions??{};i.documentSelector=i.documentSelector??this._clientOptions.documentSelector;let s={id:t.id,registerOptions:i};try{r.register(s)}catch(o){return Promise.reject(o)}}}async handleUnregistrationRequest(e){let t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,r=>this.doUnregisterCapability(r)):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(let t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;let r=this._dynamicFeatures.get(t.method);if(!r)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));r.unregister(t.id)}}async handleApplyWorkspaceEdit(e){let t=this.clientOptions.middleware?.workspace?.handleApplyEdit;if(t){let r=await t(e,i=>this.doHandleApplyWorkspaceEdit(i));return r instanceof L.ResponseError?Promise.reject(r):r}else return this.doHandleApplyWorkspaceEdit(e)}workspaceEditLock=new Da.Semaphore(1);async doHandleApplyWorkspaceEdit(e){let t=e.edit,r=await this.workspaceEditLock.lock(()=>this._p2c.asWorkspaceEdit(t));return this.validateWorkspaceEdit(t)?hn.asPromise(re.workspace.applyEdit(r,{isRefactoring:e.metadata?.isRefactoring}).then(s=>({applied:s}))):Promise.resolve({applied:!1})}validateWorkspaceEdit(e){let t=new Map;if(re.workspace.textDocuments.forEach(r=>t.set(r.uri.toString(),r)),e.documentChanges){for(let r of e.documentChanges)if(L.TextDocumentEdit.is(r)&&r.textDocument.version!==null&&r.textDocument.version>=0){let i=this._p2c.asUri(r.textDocument.uri).toString(),s=t.get(i);if(s&&s.version!==r.textDocument.version)return!1}}return!0}static RequestsToCancelOnContentModified=new Set([L.SemanticTokensRequest.method,L.SemanticTokensRangeRequest.method,L.SemanticTokensDeltaRequest.method]);static CancellableResolveCalls=new Set([L.CompletionResolveRequest.method,L.CodeLensResolveRequest.method,L.CodeActionResolveRequest.method,L.InlayHintResolveRequest.method,L.DocumentLinkResolveRequest.method,L.WorkspaceSymbolResolveRequest.method]);handleFailedRequest(e,t,r,i,s=!0,o=!1){if(r instanceof L.ResponseError){if(r.code===L.ErrorCodes.PendingResponseRejected||r.code===L.ErrorCodes.ConnectionInactive)return i;if(r.code===L.LSPErrorCodes.RequestCancelled||r.code===L.LSPErrorCodes.ServerCancelled){if(t!==void 0&&t.isCancellationRequested&&!o)return i;throw r.data!==void 0?new Kt.LSPCancellationError(r.data):new re.CancellationError}else if(r.code===L.LSPErrorCodes.ContentModified){if(n.RequestsToCancelOnContentModified.has(e.method)||n.CancellableResolveCalls.has(e.method))throw new re.CancellationError;return i}}throw this.error(`Request ${e.method} failed.`,r,s),r}};Te.BaseLanguageClient=Sa;var ah=class extends Sa{serverOptions;constructor(e,t,r,i){super(e,t,i),this.serverOptions=r}async createMessageTransports(e){return this.serverOptions()}};Te.LanguageClient=ah;var ch=class{error(e){(0,L.RAL)().console.error(e)}warn(e){(0,L.RAL)().console.warn(e)}info(e){(0,L.RAL)().console.info(e)}log(e){(0,L.RAL)().console.log(e)}};function VT(n,e,t,r,i){let s=new ch,o=(0,L.createProtocolConnection)(n,e,s,i);return o.onError(u=>{t(u[0],u[1],u[2])}),o.onClose(r),{listen:()=>o.listen(),sendRequest:o.sendRequest,onRequest:o.onRequest,hasPendingResponse:o.hasPendingResponse,sendNotification:o.sendNotification,onNotification:o.onNotification,onProgress:o.onProgress,sendProgress:o.sendProgress,trace:(u,l,f)=>{let p={sendNotification:!1,traceFormat:L.TraceFormat.Text};return f===void 0?o.trace(u,l,p):(hn.boolean(f),o.trace(u,l,f))},initialize:u=>o.sendRequest(L.InitializeRequest.type,u),shutdown:()=>o.sendRequest(L.ShutdownRequest.type,void 0),exit:()=>o.sendNotification(L.ExitNotification.type),end:()=>o.end(),dispose:()=>o.dispose()}}var uh;(function(n){function e(t){return[new WT.InlineCompletionItemFeature(t),new zT.TextDocumentContentFeature(t)]}n.createAll=e})(uh||(Te.ProposedFeatures=uh={}))});var gv=T(ur=>{"use strict";var GT=ur&&ur.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XT=ur&&ur.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),JT=ur&&ur.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i /dev/null 2>&1 +} + +terminateTree "${t}" +`;return!pv.spawnSync("/bin/sh",[],{input:r,stdio:["pipe","inherit","inherit"]}).error}catch{return!1}else return n.kill("SIGKILL"),!0}});var yv=T(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var mv=require("util"),lr=Kn(),dh=class n extends lr.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return n.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new mv.TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}},fh=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),lr.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),lr.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),lr.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),lr.Disposable.create(()=>this.stream.off("data",e))}},hh=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),lr.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),lr.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),lr.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((r,i)=>{let s=o=>{o==null?r():i(o)};typeof e=="string"?this.stream.write(e,t,s):this.stream.write(e,s)})}end(){this.stream.end()}},_v=Object.freeze({messageBuffer:Object.freeze({create:n=>new dh(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(n,void 0,0),e.charset))}catch(t){return Promise.reject(t)}}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{try{return n instanceof Buffer?Promise.resolve(JSON.parse(n.toString(e.charset))):Promise.resolve(JSON.parse(new mv.TextDecoder(e.charset).decode(n)))}catch(t){return Promise.reject(t)}}})}),stream:Object.freeze({asReadableStream:n=>new fh(n),asWritableStream:n=>new hh(n)}),console,timer:Object.freeze({setTimeout(n,e,...t){let r=setTimeout(n,e,...t);return{dispose:()=>clearTimeout(r)}},setImmediate(n,...e){let t=setImmediate(n,...e);return{dispose:()=>clearImmediate(t)}},setInterval(n,e,...t){let r=setInterval(n,e,...t);return{dispose:()=>clearInterval(r)}}})});function ph(){return _v}(function(n){function e(){lr.RAL.install(_v)}n.install=e})(ph||(ph={}));gh.default=ph});var Ch=T(me=>{"use strict";var bv=me&&me.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),tO=me&&me.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bh=me&&me.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ithis.fireError(r)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),Bt.Disposable.create(()=>this.process.off("message",e))}};me.IPCMessageReader=mh;var _h=class extends Bt.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",r=>this.fireError(r)),t.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};me.IPCMessageWriter=_h;var yh=class extends Bt.AbstractMessageReader{onData;constructor(e){super(),this.onData=new Bt.Emitter,e.on("close",()=>this.fireClose),e.on("error",t=>this.fireError(t)),e.on("message",t=>{this.onData.fire(t)})}listen(e){return this.onData.event(e)}};me.PortMessageReader=yh;var vh=class extends Bt.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",t=>this.fireError(t))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};me.PortMessageWriter=vh;var ii=class extends Bt.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,$s.default)().stream.asReadableStream(e),t)}};me.SocketMessageReader=ii;var si=class extends Bt.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,$s.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};me.SocketMessageWriter=si;var Ra=class extends Bt.ReadableStreamMessageReader{constructor(e,t){super((0,$s.default)().stream.asReadableStream(e),t)}};me.StreamMessageReader=Ra;var Ta=class extends Bt.WriteableStreamMessageWriter{constructor(e,t){super((0,$s.default)().stream.asWritableStream(e),t)}};me.StreamMessageWriter=Ta;var aO=process.env.XDG_RUNTIME_DIR,cO=new Map([["linux",107],["darwin",103]]);function uO(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,vv.randomBytes)(16).toString("hex")}-sock`;let n=32,e=10,t=oO.realpathSync(aO??sO.tmpdir()),r=cO.get(process.platform);if(r!==void 0&&(n=Math.min(r-t.length-e,n)),n<16)throw new Error(`Unable to generate a random pipe name with ${n} characters.`);let i=(0,vv.randomBytes)(Math.floor(n/2)).toString("hex");return iO.join(t,`lsp-${i}.sock`)}function lO(n,e="utf-8"){let t,r=new Promise((i,s)=>{t=i});return new Promise((i,s)=>{let o=(0,Oa.createServer)(a=>{o.close(),t([new ii(a,e),new si(a,e)])});o.on("error",s),o.listen(n,()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}function dO(n,e="utf-8"){let t=(0,Oa.createConnection)(n);return[new ii(t,e),new si(t,e)]}function fO(n,e="utf-8"){let t,r=new Promise((i,s)=>{t=i});return new Promise((i,s)=>{let o=(0,Oa.createServer)(a=>{o.close(),t([new ii(a,e),new si(a,e)])});o.on("error",s),o.listen(n,"127.0.0.1",()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}function hO(n,e="utf-8"){let t=(0,Oa.createConnection)(n,"127.0.0.1");return[new ii(t,e),new si(t,e)]}function pO(n){let e=n;return e.read!==void 0&&e.addListener!==void 0}function gO(n){let e=n;return e.write!==void 0&&e.addListener!==void 0}function mO(n,e,t,r){t||(t=Bt.NullLogger);let i=pO(n)?new Ra(n):n,s=gO(e)?new Ta(e):e;return Bt.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Bt.createMessageConnection)(i,s,t,r)}});var wh=T(dr=>{"use strict";var _O=dr&&dr.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Cv=dr&&dr.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&_O(e,n,t)};Object.defineProperty(dr,"__esModule",{value:!0});dr.createProtocolConnection=vO;var yO=Ch();Cv(Ch(),dr);Cv(se(),dr);function vO(n,e,t,r){return(0,yO.createMessageConnection)(n,e,t,r)}});var Us=T((Jq,wv)=>{"use strict";var bO=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};wv.exports=bO});var Ea=T((Qq,Dv)=>{"use strict";var CO="2.0.0",wO=Number.MAX_SAFE_INTEGER||9007199254740991,DO=16,SO=250,PO=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Dv.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:DO,MAX_SAFE_BUILD_LENGTH:SO,MAX_SAFE_INTEGER:wO,RELEASE_TYPES:PO,SEMVER_SPEC_VERSION:CO,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var qa=T((An,Sv)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Dh,MAX_SAFE_BUILD_LENGTH:RO,MAX_LENGTH:TO}=Ea(),OO=Us();An=Sv.exports={};var EO=An.re=[],qO=An.safeRe=[],G=An.src=[],xO=An.safeSrc=[],X=An.t={},MO=0,Sh="[a-zA-Z0-9-]",IO=[["\\s",1],["\\d",TO],[Sh,RO]],NO=n=>{for(let[e,t]of IO)n=n.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return n},ue=(n,e,t)=>{let r=NO(e),i=MO++;OO(n,i,e),X[n]=i,G[i]=e,xO[i]=r,EO[i]=new RegExp(e,t?"g":void 0),qO[i]=new RegExp(r,t?"g":void 0)};ue("NUMERICIDENTIFIER","0|[1-9]\\d*");ue("NUMERICIDENTIFIERLOOSE","\\d+");ue("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Sh}*`);ue("MAINVERSION",`(${G[X.NUMERICIDENTIFIER]})\\.(${G[X.NUMERICIDENTIFIER]})\\.(${G[X.NUMERICIDENTIFIER]})`);ue("MAINVERSIONLOOSE",`(${G[X.NUMERICIDENTIFIERLOOSE]})\\.(${G[X.NUMERICIDENTIFIERLOOSE]})\\.(${G[X.NUMERICIDENTIFIERLOOSE]})`);ue("PRERELEASEIDENTIFIER",`(?:${G[X.NONNUMERICIDENTIFIER]}|${G[X.NUMERICIDENTIFIER]})`);ue("PRERELEASEIDENTIFIERLOOSE",`(?:${G[X.NONNUMERICIDENTIFIER]}|${G[X.NUMERICIDENTIFIERLOOSE]})`);ue("PRERELEASE",`(?:-(${G[X.PRERELEASEIDENTIFIER]}(?:\\.${G[X.PRERELEASEIDENTIFIER]})*))`);ue("PRERELEASELOOSE",`(?:-?(${G[X.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${G[X.PRERELEASEIDENTIFIERLOOSE]})*))`);ue("BUILDIDENTIFIER",`${Sh}+`);ue("BUILD",`(?:\\+(${G[X.BUILDIDENTIFIER]}(?:\\.${G[X.BUILDIDENTIFIER]})*))`);ue("FULLPLAIN",`v?${G[X.MAINVERSION]}${G[X.PRERELEASE]}?${G[X.BUILD]}?`);ue("FULL",`^${G[X.FULLPLAIN]}$`);ue("LOOSEPLAIN",`[v=\\s]*${G[X.MAINVERSIONLOOSE]}${G[X.PRERELEASELOOSE]}?${G[X.BUILD]}?`);ue("LOOSE",`^${G[X.LOOSEPLAIN]}$`);ue("GTLT","((?:<|>)?=?)");ue("XRANGEIDENTIFIERLOOSE",`${G[X.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);ue("XRANGEIDENTIFIER",`${G[X.NUMERICIDENTIFIER]}|x|X|\\*`);ue("XRANGEPLAIN",`[v=\\s]*(${G[X.XRANGEIDENTIFIER]})(?:\\.(${G[X.XRANGEIDENTIFIER]})(?:\\.(${G[X.XRANGEIDENTIFIER]})(?:${G[X.PRERELEASE]})?${G[X.BUILD]}?)?)?`);ue("XRANGEPLAINLOOSE",`[v=\\s]*(${G[X.XRANGEIDENTIFIERLOOSE]})(?:\\.(${G[X.XRANGEIDENTIFIERLOOSE]})(?:\\.(${G[X.XRANGEIDENTIFIERLOOSE]})(?:${G[X.PRERELEASELOOSE]})?${G[X.BUILD]}?)?)?`);ue("XRANGE",`^${G[X.GTLT]}\\s*${G[X.XRANGEPLAIN]}$`);ue("XRANGELOOSE",`^${G[X.GTLT]}\\s*${G[X.XRANGEPLAINLOOSE]}$`);ue("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Dh}})(?:\\.(\\d{1,${Dh}}))?(?:\\.(\\d{1,${Dh}}))?`);ue("COERCE",`${G[X.COERCEPLAIN]}(?:$|[^\\d])`);ue("COERCEFULL",G[X.COERCEPLAIN]+`(?:${G[X.PRERELEASE]})?(?:${G[X.BUILD]})?(?:$|[^\\d])`);ue("COERCERTL",G[X.COERCE],!0);ue("COERCERTLFULL",G[X.COERCEFULL],!0);ue("LONETILDE","(?:~>?)");ue("TILDETRIM",`(\\s*)${G[X.LONETILDE]}\\s+`,!0);An.tildeTrimReplace="$1~";ue("TILDE",`^${G[X.LONETILDE]}${G[X.XRANGEPLAIN]}$`);ue("TILDELOOSE",`^${G[X.LONETILDE]}${G[X.XRANGEPLAINLOOSE]}$`);ue("LONECARET","(?:\\^)");ue("CARETTRIM",`(\\s*)${G[X.LONECARET]}\\s+`,!0);An.caretTrimReplace="$1^";ue("CARET",`^${G[X.LONECARET]}${G[X.XRANGEPLAIN]}$`);ue("CARETLOOSE",`^${G[X.LONECARET]}${G[X.XRANGEPLAINLOOSE]}$`);ue("COMPARATORLOOSE",`^${G[X.GTLT]}\\s*(${G[X.LOOSEPLAIN]})$|^$`);ue("COMPARATOR",`^${G[X.GTLT]}\\s*(${G[X.FULLPLAIN]})$|^$`);ue("COMPARATORTRIM",`(\\s*)${G[X.GTLT]}\\s*(${G[X.LOOSEPLAIN]}|${G[X.XRANGEPLAIN]})`,!0);An.comparatorTrimReplace="$1$2$3";ue("HYPHENRANGE",`^\\s*(${G[X.XRANGEPLAIN]})\\s+-\\s+(${G[X.XRANGEPLAIN]})\\s*$`);ue("HYPHENRANGELOOSE",`^\\s*(${G[X.XRANGEPLAINLOOSE]})\\s+-\\s+(${G[X.XRANGEPLAINLOOSE]})\\s*$`);ue("STAR","(<|>)?=?\\s*\\*");ue("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");ue("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var xa=T((Yq,Pv)=>{"use strict";var jO=Object.freeze({loose:!0}),FO=Object.freeze({}),LO=n=>n?typeof n!="object"?jO:n:FO;Pv.exports=LO});var Ev=T((Zq,Ov)=>{"use strict";var Rv=/^[0-9]+$/,Tv=(n,e)=>{if(typeof n=="number"&&typeof e=="number")return n===e?0:nTv(e,n);Ov.exports={compareIdentifiers:Tv,rcompareIdentifiers:AO}});var Hs=T((ex,xv)=>{"use strict";var Ma=Us(),{MAX_LENGTH:qv,MAX_SAFE_INTEGER:Ia}=Ea(),{safeRe:Na,t:ja}=qa(),kO=xa(),{compareIdentifiers:Ph}=Ev(),$O=(n,e)=>{let t=e.split(".");if(t.length>n.length)return!1;for(let r=0;rqv)throw new TypeError(`version is longer than ${qv} characters`);Ma("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Na[ja.LOOSE]:Na[ja.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Ia||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ia||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ia||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&se.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof n||(e=new n(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(Ma("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return Ph(r,i)}while(++t)}compareBuild(e){e instanceof n||(e=new n(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(Ma("build compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return Ph(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?Na[ja.PRERELEASELOOSE]:Na[ja.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let s=[t,i];if(r===!1&&(s=[t]),$O(this.prerelease,t)){let o=this.prerelease[t.split(".").length];isNaN(o)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};xv.exports=Rh});var Nv=T((tx,Iv)=>{"use strict";var Mv=Hs(),UO=(n,e,t=!1)=>{if(n instanceof Mv)return n;try{return new Mv(n,e)}catch(r){if(!t)return null;throw r}};Iv.exports=UO});var Fv=T((nx,jv)=>{"use strict";var Th=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};jv.exports=Th});var oi=T((rx,Av)=>{"use strict";var Lv=Hs(),HO=(n,e,t)=>new Lv(n,t).compare(new Lv(e,t));Av.exports=HO});var $v=T((ix,kv)=>{"use strict";var WO=oi(),zO=(n,e,t)=>WO(n,e,t)===0;kv.exports=zO});var Hv=T((sx,Uv)=>{"use strict";var KO=oi(),BO=(n,e,t)=>KO(n,e,t)!==0;Uv.exports=BO});var zv=T((ox,Wv)=>{"use strict";var VO=oi(),GO=(n,e,t)=>VO(n,e,t)>0;Wv.exports=GO});var Bv=T((ax,Kv)=>{"use strict";var XO=oi(),JO=(n,e,t)=>XO(n,e,t)>=0;Kv.exports=JO});var Gv=T((cx,Vv)=>{"use strict";var QO=oi(),YO=(n,e,t)=>QO(n,e,t)<0;Vv.exports=YO});var Jv=T((ux,Xv)=>{"use strict";var ZO=oi(),eE=(n,e,t)=>ZO(n,e,t)<=0;Xv.exports=eE});var Yv=T((lx,Qv)=>{"use strict";var tE=$v(),nE=Hv(),rE=zv(),iE=Bv(),sE=Gv(),oE=Jv(),aE=(n,e,t,r)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n===t;case"!==":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n!==t;case"":case"=":case"==":return tE(n,t,r);case"!=":return nE(n,t,r);case">":return rE(n,t,r);case">=":return iE(n,t,r);case"<":return sE(n,t,r);case"<=":return oE(n,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}};Qv.exports=aE});var sb=T((dx,ib)=>{"use strict";var Ws=Symbol("SemVer ANY"),qh=class n{static get ANY(){return Ws}constructor(e,t){if(t=Zv(t),e instanceof n){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Eh("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ws?this.value="":this.value=this.operator+this.semver.version,Eh("comp",this)}parse(e){let t=this.options.loose?eb[tb.COMPARATORLOOSE]:eb[tb.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new nb(r[2],this.options.loose):this.semver=Ws}toString(){return this.value}test(e){if(Eh("Comparator.test",e,this.options.loose),this.semver===Ws||e===Ws)return!0;if(typeof e=="string")try{e=new nb(e,this.options)}catch{return!1}return Oh(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new rb(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new rb(this.value,t).test(e.semver):(t=Zv(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Oh(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Oh(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};ib.exports=qh;var Zv=xa(),{safeRe:eb,t:tb}=qa(),Oh=Yv(),Eh=Us(),nb=Hs(),rb=xh()});var xh=T((fx,ub)=>{"use strict";var cE=/\s+/g,Mh=class n{constructor(e,t){if(t=lE(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof Ih)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(cE," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!ab(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&vE(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(yE,"");let r=((this.options.includePrerelease&&mE)|(this.options.loose&&_E))+":"+e,i=ob.get(r);if(i)return i;let s=this.options.loose,o=s?Tt[gt.HYPHENRANGELOOSE]:Tt[gt.HYPHENRANGE];e=e.replace(o,qE(this.options.includePrerelease)),Ae("hyphen replace",e),e=e.replace(Tt[gt.COMPARATORTRIM],hE),Ae("comparator trim",e),e=e.replace(Tt[gt.TILDETRIM],pE),Ae("tilde trim",e),e=e.replace(Tt[gt.CARETTRIM],gE),Ae("caret trim",e);let a=e.split(" ").map(p=>bE(p,this.options)).join(" ").split(/\s+/).map(p=>EE(p,this.options));s&&(a=a.filter(p=>(Ae("loose invalid filter",p,this.options),!!p.match(Tt[gt.COMPARATORLOOSE])))),Ae("range list",a);let u=new Map,l=a.map(p=>new Ih(p,this.options));for(let p of l){if(ab(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let f=[...u.values()];return ob.set(r,f),f}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>cb(r,t)&&e.set.some(i=>cb(i,t)&&r.every(s=>i.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new dE(e,this.options)}catch{return!1}for(let t=0;tn.value==="<0.0.0-0",vE=n=>n.value==="",cb=(n,e)=>{let t=!0,r=n.slice(),i=r.pop();for(;t&&r.length;)t=r.every(s=>i.intersects(s,e)),i=r.pop();return t},bE=(n,e)=>(n=n.replace(Tt[gt.BUILD],""),Ae("comp",n,e),n=SE(n,e),Ae("caret",n),n=wE(n,e),Ae("tildes",n),n=RE(n,e),Ae("xrange",n),n=OE(n,e),Ae("stars",n),n),ot=n=>!n||n.toLowerCase()==="x"||n==="*",CE=(n,e,t)=>ot(n)&&!ot(e)||ot(e)&&t&&!ot(t),wE=(n,e)=>n.trim().split(/\s+/).map(t=>DE(t,e)).join(" "),DE=(n,e)=>{let t=e.loose?Tt[gt.TILDELOOSE]:Tt[gt.TILDE],r=e.includePrerelease?"-0":"";return n.replace(t,(i,s,o,a,u)=>{Ae("tilde",n,i,s,o,a,u);let l;return ot(s)?l="":ot(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:ot(a)?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:u?(Ae("replaceTilde pr",u),l=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,Ae("tilde return",l),l})},SE=(n,e)=>n.trim().split(/\s+/).map(t=>PE(t,e)).join(" "),PE=(n,e)=>{Ae("caret",n,e);let t=e.loose?Tt[gt.CARETLOOSE]:Tt[gt.CARET],r=e.includePrerelease?"-0":"";return n.replace(t,(i,s,o,a,u)=>{Ae("caret",n,i,s,o,a,u);let l;return ot(s)?l="":ot(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:ot(a)?s==="0"?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${r} <${+s+1}.0.0-0`:u?(Ae("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${a}-${u} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a}-${u} <${+s+1}.0.0-0`):(Ae("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Ae("caret return",l),l})},RE=(n,e)=>(Ae("replaceXRanges",n,e),n.split(/\s+/).map(t=>TE(t,e)).join(" ")),TE=(n,e)=>{n=n.trim();let t=e.loose?Tt[gt.XRANGELOOSE]:Tt[gt.XRANGE];return n.replace(t,(r,i,s,o,a,u)=>{if(Ae("xRange",n,r,i,s,o,a,u),CE(s,o,a))return n;let l=ot(s),f=l||ot(o),p=f||ot(a),h=p;return i==="="&&h&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&h?(f&&(o=0),a=0,i===">"?(i=">=",f?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",f?s=+s+1:o=+o+1),i==="<"&&(u="-0"),r=`${i+s}.${o}.${a}${u}`):f?r=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),Ae("xRange return",r),r})},OE=(n,e)=>(Ae("replaceStars",n,e),n.trim().replace(Tt[gt.STAR],"")),EE=(n,e)=>(Ae("replaceGTE0",n,e),n.trim().replace(Tt[e.includePrerelease?gt.GTE0PRE:gt.GTE0],"")),qE=n=>(e,t,r,i,s,o,a,u,l,f,p,h)=>(ot(r)?t="":ot(i)?t=`>=${r}.0.0${n?"-0":""}`:ot(s)?t=`>=${r}.${i}.0${n?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${n?"-0":""}`,ot(l)?u="":ot(f)?u=`<${+l+1}.0.0-0`:ot(p)?u=`<${l}.${+f+1}.0-0`:h?u=`<=${l}.${f}.${p}-${h}`:n?u=`<${l}.${f}.${+p+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),xE=(n,e,t)=>{for(let r=0;r0){let i=n[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var db=T((hx,lb)=>{"use strict";var ME=xh(),IE=(n,e,t)=>{try{e=new ME(e,t)}catch{return!1}return e.test(n)};lb.exports=IE});var Fa=T(Vt=>{"use strict";var NE=Vt&&Vt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Nh=Vt&&Vt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&NE(e,n,t)};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.DiagnosticPullMode=Vt.vsdiag=void 0;Nh(se(),Vt);Nh(ge(),Vt);var fb=bd();Object.defineProperty(Vt,"vsdiag",{enumerable:!0,get:function(){return fb.vsdiag}});Object.defineProperty(Vt,"DiagnosticPullMode",{enumerable:!0,get:function(){return fb.DiagnosticPullMode}});Nh(lh(),Vt)});var yb=T(ft=>{"use strict";var mb=ft&&ft.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),jE=ft&&ft.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),zs=ft&&ft.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0&&(e.prerelease=[]),!AE(e,gb))throw new Error(`The language client requires VS Code version ${gb} but received version ${kr.version}`)}get isInDebugMode(){return this._isInDebugMode}get serverProcess(){return this._serverProcess}async restart(){await this.stop(),this.isInDebugMode?(await new Promise(e=>setTimeout(e,1e3)),await this.start()):await this.start()}shutdown(e,t=2e3){return super.shutdown(e,t).finally(()=>{if(this._serverProcess){let r=this._serverProcess;this._serverProcess=void 0,(this._isDetached===void 0||!this._isDetached)&&this.checkProcessDied(r),this._isDetached=void 0}})}checkProcessDied(e){!e||e.pid===void 0||setTimeout(()=>{try{e.pid!==void 0&&(process.kill(e.pid,0),(0,FE.terminate)(e))}catch{}},2e3)}handleConnectionClosed(){return this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),e.processId===null&&(e.processId=process.pid)}createMessageTransports(e){function t(h,g){if(!h&&!g)return;let _=Object.create(null);return Object.keys(process.env).forEach(y=>_[y]=process.env[y]),g&&(_.ELECTRON_RUN_AS_NODE="1",_.ELECTRON_NO_ASAR="1"),h&&Object.keys(h).forEach(y=>_[y]=h[y]),_}let r=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function s(){let h=process.execArgv;return h?h.some(g=>r.some(_=>g.startsWith(_))||i.some(_=>g===_)):!1}function o(h){if(h.stdin===null||h.stdout===null||h.stderr===null)throw new Error("Process created without stdio streams")}function a(h,g){hb.createInterface({input:h,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",_=>g.info(_))}function u(h,g){hb.createInterface({input:h,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",_=>g.error(_))}let l=this._serverOptions;if(Vi.func(l))return l().then(h=>{if(pb.MessageTransports.is(h))return this._isDetached=!!h.detached,h;if(kh.is(h))return this._isDetached=!!h.detached,{reader:new Ge.StreamMessageReader(h.reader),writer:new Ge.StreamMessageWriter(h.writer)};{let g;return $h.is(h)?(g=h.process,this._isDetached=h.detached):(g=h,this._isDetached=!1),u(g.stderr,this.outputChannel),{reader:new Ge.StreamMessageReader(g.stdout),writer:new Ge.StreamMessageWriter(g.stdin)}}});let f,p=l;return p.run||p.debug?this._forceDebug||s()?(f=p.debug,this._isInDebugMode=!0):(f=p.run,this._isInDebugMode=!1):f=l,this._getServerWorkingDir(f.options).then(h=>{if(Ah.is(f)&&f.module){let g=f,_=g.transport||Xe.stdio;if(g.runtime){let y=[],D=g.options??Object.create(null);D.execArgv&&D.execArgv.forEach(j=>y.push(j)),y.push(g.module),g.args&&g.args.forEach(j=>y.push(j));let M=Object.create(null);M.cwd=h,M.env=t(D.env,!1);let w=this._getRuntimePath(g.runtime,h),I;if(_===Xe.ipc?(M.stdio=[null,null,null,"ipc"],y.push("--node-ipc")):_===Xe.stdio?y.push("--stdio"):_===Xe.pipe?(I=(0,Ge.generateRandomPipeName)(),y.push(`--pipe=${I}`)):Ar.isSocket(_)&&y.push(`--socket=${_.port}`),y.push(`--clientProcessId=${process.pid.toString()}`),_===Xe.ipc||_===Xe.stdio){let j=fr.spawn(w,y,M);return!j||!j.pid?Bi(j,`Launching server using runtime ${w} failed.`):(this._serverProcess=j,u(j.stderr,this.outputChannel),_===Xe.ipc?(a(j.stdout,this.outputChannel),Promise.resolve({reader:new Ge.IPCMessageReader(j),writer:new Ge.IPCMessageWriter(j)})):Promise.resolve({reader:new Ge.StreamMessageReader(j.stdout),writer:new Ge.StreamMessageWriter(j.stdin)}))}else{if(_===Xe.pipe)return(0,Ge.createClientPipeTransport)(I).then(j=>{let A=fr.spawn(w,y,M);return!A||!A.pid?Bi(A,`Launching server using runtime ${w} failed.`):(this._serverProcess=A,u(A.stderr,this.outputChannel),a(A.stdout,this.outputChannel),j.onConnected().then(de=>({reader:de[0],writer:de[1]})))});if(Ar.isSocket(_))return(0,Ge.createClientSocketTransport)(_.port).then(j=>{let A=fr.spawn(w,y,M);return!A||!A.pid?Bi(A,`Launching server using runtime ${w} failed.`):(this._serverProcess=A,u(A.stderr,this.outputChannel),a(A.stdout,this.outputChannel),j.onConnected().then(de=>({reader:de[0],writer:de[1]})))})}}else{let y;return new Promise((D,M)=>{let w=(g.args&&g.args.slice())??[];_===Xe.ipc?w.push("--node-ipc"):_===Xe.stdio?w.push("--stdio"):_===Xe.pipe?(y=(0,Ge.generateRandomPipeName)(),w.push(`--pipe=${y}`)):Ar.isSocket(_)&&w.push(`--socket=${_.port}`),w.push(`--clientProcessId=${process.pid.toString()}`);let I=g.options?{...g.options}:Object.create(null);if(I.env=t(I.env,!0),I.execArgv=I.execArgv||[],I.cwd=h,I.silent=!0,_===Xe.ipc||_===Xe.stdio){let j=fr.fork(g.module,w||[],I);o(j),this._serverProcess=j,u(j.stderr,this.outputChannel),_===Xe.ipc?(a(j.stdout,this.outputChannel),D({reader:new Ge.IPCMessageReader(this._serverProcess),writer:new Ge.IPCMessageWriter(this._serverProcess)})):D({reader:new Ge.StreamMessageReader(j.stdout),writer:new Ge.StreamMessageWriter(j.stdin)})}else _===Xe.pipe?(0,Ge.createClientPipeTransport)(y).then(j=>{let A=fr.fork(g.module,w||[],I);o(A),this._serverProcess=A,u(A.stderr,this.outputChannel),a(A.stdout,this.outputChannel),j.onConnected().then(de=>{D({reader:de[0],writer:de[1]})},M)},M):Ar.isSocket(_)&&(0,Ge.createClientSocketTransport)(_.port).then(j=>{let A=fr.fork(g.module,w||[],I);o(A),this._serverProcess=A,u(A.stderr,this.outputChannel),a(A.stdout,this.outputChannel),j.onConnected().then(de=>{D({reader:de[0],writer:de[1]})},M)},M)})}}else if(Lh.is(f)&&f.command){let g=f,_=f.args!==void 0?f.args.slice(0):[],y,D=f.transport;if(D===Xe.stdio)_.push("--stdio");else if(D===Xe.pipe)y=(0,Ge.generateRandomPipeName)(),_.push(`--pipe=${y}`);else if(Ar.isSocket(D))_.push(`--socket=${D.port}`);else if(D===Xe.ipc)throw new Error("Transport kind ipc is not support for command executable");let M=Object.assign({},g.options);if(M.cwd=M.cwd||h,D===void 0||D===Xe.stdio){let w=fr.spawn(g.command,_,M);return!w||!w.pid?Bi(w,`Launching server using command ${g.command} failed.`):(u(w.stderr,this.outputChannel),this._serverProcess=w,this._isDetached=!!M.detached,Promise.resolve({reader:new Ge.StreamMessageReader(w.stdout),writer:new Ge.StreamMessageWriter(w.stdin)}))}else{if(D===Xe.pipe)return(0,Ge.createClientPipeTransport)(y).then(w=>{let I=fr.spawn(g.command,_,M);return!I||!I.pid?Bi(I,`Launching server using command ${g.command} failed.`):(this._serverProcess=I,this._isDetached=!!M.detached,u(I.stderr,this.outputChannel),a(I.stdout,this.outputChannel),w.onConnected().then(j=>({reader:j[0],writer:j[1]})))});if(Ar.isSocket(D))return(0,Ge.createClientSocketTransport)(D.port).then(w=>{let I=fr.spawn(g.command,_,M);return!I||!I.pid?Bi(I,`Launching server using command ${g.command} failed.`):(this._serverProcess=I,this._isDetached=!!M.detached,u(I.stderr,this.outputChannel),a(I.stdout,this.outputChannel),w.onConnected().then(j=>({reader:j[0],writer:j[1]})))})}}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(l,null,4)))}).finally(()=>{this._serverProcess!==void 0&&this._serverProcess.on("exit",(h,g)=>{h===0?this.info("Server process exited successfully",void 0,!1):h!==null&&this.error(`Server process exited with code ${h}.`,void 0,!1),g!==null&&this.error(`Server process exited with signal ${g}.`,void 0,!1)})})}_getRuntimePath(e,t){if(Fh.isAbsolute(e))return e;let r=this._mainGetRootPath();if(r!==void 0){let i=Fh.join(r,e);if(jh.existsSync(i))return i}if(t!==void 0){let i=Fh.join(t,e);if(jh.existsSync(i))return i}return e}_mainGetRootPath(){let e=kr.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise(r=>{jh.lstat(t,(i,s)=>{r(!i&&s.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}};ft.LanguageClient=Uh;var Hh=class{_client;_setting;_listeners;constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return kr.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new kr.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,r=e>=0?this._setting.substr(e+1):void 0,i=r?kr.workspace.getConfiguration(t).get(r,!1):kr.workspace.getConfiguration(t);i&&this._client.needsStart()?this._client.start().catch(s=>this._client.error("Start failed after configuration change",s,"force")):!i&&this._client.needsStop()&&this._client.stop().catch(s=>this._client.error("Stop failed after configuration change",s,"force"))}};ft.SettingMonitor=Hh;function Bi(n,e){return n===null?Promise.reject(e):new Promise((t,r)=>{n.on("error",i=>{r(`${e} ${i}`)}),setImmediate(()=>r(e))})}});var VE={};Ba(VE,{activate:()=>KE,deactivate:()=>BE});module.exports=Yi(VE);var Ha=require("vscode"),Gs=br(yb());var Se=require("vscode"),Bs=br(Fa());var pn=require("vscode");var vb;(()=>{"use strict";var n={975:$=>{function O(R){if(typeof R!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(R))}function V(R,N){for(var F,W="",U=0,B=-1,ne=0,oe=0;oe<=R.length;++oe){if(oe2){var Ue=W.lastIndexOf("/");if(Ue!==W.length-1){Ue===-1?(W="",U=0):U=(W=W.slice(0,Ue)).length-1-W.lastIndexOf("/"),B=oe,ne=0;continue}}else if(W.length===2||W.length===1){W="",U=0,B=oe,ne=0;continue}}N&&(W.length>0?W+="/..":W="..",U=2)}else W.length>0?W+="/"+R.slice(B+1,oe):W=R.slice(B+1,oe),U=oe-B-1;B=oe,ne=0}else F===46&&ne!==-1?++ne:ne=-1}return W}var z={resolve:function(){for(var R,N="",F=!1,W=arguments.length-1;W>=-1&&!F;W--){var U;W>=0?U=arguments[W]:(R===void 0&&(R=process.cwd()),U=R),O(U),U.length!==0&&(N=U+"/"+N,F=U.charCodeAt(0)===47)}return N=V(N,!F),F?N.length>0?"/"+N:"/":N.length>0?N:"."},normalize:function(R){if(O(R),R.length===0)return".";var N=R.charCodeAt(0)===47,F=R.charCodeAt(R.length-1)===47;return(R=V(R,!N)).length!==0||N||(R="."),R.length>0&&F&&(R+="/"),N?"/"+R:R},isAbsolute:function(R){return O(R),R.length>0&&R.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var R,N=0;N0&&(R===void 0?R=F:R+="/"+F)}return R===void 0?".":z.normalize(R)},relative:function(R,N){if(O(R),O(N),R===N||(R=z.resolve(R))===(N=z.resolve(N)))return"";for(var F=1;Foe){if(N.charCodeAt(B+_e)===47)return N.slice(B+_e+1);if(_e===0)return N.slice(B+_e)}else U>oe&&(R.charCodeAt(F+_e)===47?Ue=_e:_e===0&&(Ue=0));break}var st=R.charCodeAt(F+_e);if(st!==N.charCodeAt(B+_e))break;st===47&&(Ue=_e)}var At="";for(_e=F+Ue+1;_e<=W;++_e)_e!==W&&R.charCodeAt(_e)!==47||(At.length===0?At+="..":At+="/..");return At.length>0?At+N.slice(B+Ue):(B+=Ue,N.charCodeAt(B)===47&&++B,N.slice(B))},_makeLong:function(R){return R},dirname:function(R){if(O(R),R.length===0)return".";for(var N=R.charCodeAt(0),F=N===47,W=-1,U=!0,B=R.length-1;B>=1;--B)if((N=R.charCodeAt(B))===47){if(!U){W=B;break}}else U=!1;return W===-1?F?"/":".":F&&W===1?"//":R.slice(0,W)},basename:function(R,N){if(N!==void 0&&typeof N!="string")throw new TypeError('"ext" argument must be a string');O(R);var F,W=0,U=-1,B=!0;if(N!==void 0&&N.length>0&&N.length<=R.length){if(N.length===R.length&&N===R)return"";var ne=N.length-1,oe=-1;for(F=R.length-1;F>=0;--F){var Ue=R.charCodeAt(F);if(Ue===47){if(!B){W=F+1;break}}else oe===-1&&(B=!1,oe=F+1),ne>=0&&(Ue===N.charCodeAt(ne)?--ne==-1&&(U=F):(ne=-1,U=oe))}return W===U?U=oe:U===-1&&(U=R.length),R.slice(W,U)}for(F=R.length-1;F>=0;--F)if(R.charCodeAt(F)===47){if(!B){W=F+1;break}}else U===-1&&(B=!1,U=F+1);return U===-1?"":R.slice(W,U)},extname:function(R){O(R);for(var N=-1,F=0,W=-1,U=!0,B=0,ne=R.length-1;ne>=0;--ne){var oe=R.charCodeAt(ne);if(oe!==47)W===-1&&(U=!1,W=ne+1),oe===46?N===-1?N=ne:B!==1&&(B=1):N!==-1&&(B=-1);else if(!U){F=ne+1;break}}return N===-1||W===-1||B===0||B===1&&N===W-1&&N===F+1?"":R.slice(N,W)},format:function(R){if(R===null||typeof R!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof R);return(function(N,F){var W=F.dir||F.root,U=F.base||(F.name||"")+(F.ext||"");return W?W===F.root?W+U:W+"/"+U:U})(0,R)},parse:function(R){O(R);var N={root:"",dir:"",base:"",ext:"",name:""};if(R.length===0)return N;var F,W=R.charCodeAt(0),U=W===47;U?(N.root="/",F=1):F=0;for(var B=-1,ne=0,oe=-1,Ue=!0,_e=R.length-1,st=0;_e>=F;--_e)if((W=R.charCodeAt(_e))!==47)oe===-1&&(Ue=!1,oe=_e+1),W===46?B===-1?B=_e:st!==1&&(st=1):B!==-1&&(st=-1);else if(!Ue){ne=_e+1;break}return B===-1||oe===-1||st===0||st===1&&B===oe-1&&B===ne+1?oe!==-1&&(N.base=N.name=ne===0&&U?R.slice(1,oe):R.slice(ne,oe)):(ne===0&&U?(N.name=R.slice(1,B),N.base=R.slice(1,oe)):(N.name=R.slice(ne,B),N.base=R.slice(ne,oe)),N.ext=R.slice(B,oe)),ne>0?N.dir=R.slice(0,ne-1):U&&(N.dir="/"),N},sep:"/",delimiter:":",win32:null,posix:null};z.posix=z,$.exports=z}},e={};function t($){var O=e[$];if(O!==void 0)return O.exports;var V=e[$]={exports:{}};return n[$](V,V.exports,t),V.exports}t.d=($,O)=>{for(var V in O)t.o(O,V)&&!t.o($,V)&&Object.defineProperty($,V,{enumerable:!0,get:O[V]})},t.o=($,O)=>Object.prototype.hasOwnProperty.call($,O),t.r=$=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),Object.defineProperty($,"__esModule",{value:!0})};var r={};let i;t.r(r),t.d(r,{URI:()=>h,Utils:()=>gn}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//;function u($,O){if(!$.scheme&&O)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${$.authority}", path: "${$.path}", query: "${$.query}", fragment: "${$.fragment}"}`);if($.scheme&&!s.test($.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if($.path){if($.authority){if(!o.test($.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($.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let l="",f="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(O){return O instanceof h||!!O&&typeof O.authority=="string"&&typeof O.fragment=="string"&&typeof O.path=="string"&&typeof O.query=="string"&&typeof O.scheme=="string"&&typeof O.fsPath=="string"&&typeof O.with=="function"&&typeof O.toString=="function"}scheme;authority;path;query;fragment;constructor(O,V,z,R,N,F=!1){typeof O=="object"?(this.scheme=O.scheme||l,this.authority=O.authority||l,this.path=O.path||l,this.query=O.query||l,this.fragment=O.fragment||l):(this.scheme=(function(W,U){return W||U?W:"file"})(O,F),this.authority=V||l,this.path=(function(W,U){switch(W){case"https":case"http":case"file":U?U[0]!==f&&(U=f+U):U=f}return U})(this.scheme,z||l),this.query=R||l,this.fragment=N||l,u(this,F))}get fsPath(){return w(this,!1)}with(O){if(!O)return this;let{scheme:V,authority:z,path:R,query:N,fragment:F}=O;return V===void 0?V=this.scheme:V===null&&(V=l),z===void 0?z=this.authority:z===null&&(z=l),R===void 0?R=this.path:R===null&&(R=l),N===void 0?N=this.query:N===null&&(N=l),F===void 0?F=this.fragment:F===null&&(F=l),V===this.scheme&&z===this.authority&&R===this.path&&N===this.query&&F===this.fragment?this:new _(V,z,R,N,F)}static parse(O,V=!1){let z=p.exec(O);return z?new _(z[2]||l,de(z[4]||l),de(z[5]||l),de(z[7]||l),de(z[9]||l),V):new _(l,l,l,l,l)}static file(O){let V=l;if(i&&(O=O.replace(/\\/g,f)),O[0]===f&&O[1]===f){let z=O.indexOf(f,2);z===-1?(V=O.substring(2),O=f):(V=O.substring(2,z),O=O.substring(z)||f)}return new _("file",V,O,l,l)}static from(O){let V=new _(O.scheme,O.authority,O.path,O.query,O.fragment);return u(V,!0),V}toString(O=!1){return I(this,O)}toJSON(){return this}static revive(O){if(O){if(O instanceof h)return O;{let V=new _(O);return V._formatted=O.external,V._fsPath=O._sep===g?O.fsPath:null,V}}return O}}let g=i?1:void 0;class _ extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath}toString(O=!1){return O?I(this,!0):(this._formatted||(this._formatted=I(this,!1)),this._formatted)}toJSON(){let O={$mid:1};return this._fsPath&&(O.fsPath=this._fsPath,O._sep=g),this._formatted&&(O.external=this._formatted),this.path&&(O.path=this.path),this.scheme&&(O.scheme=this.scheme),this.authority&&(O.authority=this.authority),this.query&&(O.query=this.query),this.fragment&&(O.fragment=this.fragment),O}}let y={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($,O,V){let z,R=-1;for(let N=0;N<$.length;N++){let F=$.charCodeAt(N);if(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F===45||F===46||F===95||F===126||O&&F===47||V&&F===91||V&&F===93||V&&F===58)R!==-1&&(z+=encodeURIComponent($.substring(R,N)),R=-1),z!==void 0&&(z+=$.charAt(N));else{z===void 0&&(z=$.substr(0,N));let W=y[F];W!==void 0?(R!==-1&&(z+=encodeURIComponent($.substring(R,N)),R=-1),z+=W):R===-1&&(R=N)}}return R!==-1&&(z+=encodeURIComponent($.substring(R))),z!==void 0?z:$}function M($){let O;for(let V=0;V<$.length;V++){let z=$.charCodeAt(V);z===35||z===63?(O===void 0&&(O=$.substr(0,V)),O+=y[z]):O!==void 0&&(O+=$[V])}return O!==void 0?O:$}function w($,O){let V;return V=$.authority&&$.path.length>1&&$.scheme==="file"?`//${$.authority}${$.path}`:$.path.charCodeAt(0)===47&&($.path.charCodeAt(1)>=65&&$.path.charCodeAt(1)<=90||$.path.charCodeAt(1)>=97&&$.path.charCodeAt(1)<=122)&&$.path.charCodeAt(2)===58?O?$.path.substr(1):$.path[1].toLowerCase()+$.path.substr(2):$.path,i&&(V=V.replace(/\//g,"\\")),V}function I($,O){let V=O?M:D,z="",{scheme:R,authority:N,path:F,query:W,fragment:U}=$;if(R&&(z+=R,z+=":"),(N||R==="file")&&(z+=f,z+=f),N){let B=N.indexOf("@");if(B!==-1){let ne=N.substr(0,B);N=N.substr(B+1),B=ne.lastIndexOf(":"),B===-1?z+=V(ne,!1,!1):(z+=V(ne.substr(0,B),!1,!1),z+=":",z+=V(ne.substr(B+1),!1,!0)),z+="@"}N=N.toLowerCase(),B=N.lastIndexOf(":"),B===-1?z+=V(N,!1,!0):(z+=V(N.substr(0,B),!1,!0),z+=N.substr(B))}if(F){if(F.length>=3&&F.charCodeAt(0)===47&&F.charCodeAt(2)===58){let B=F.charCodeAt(1);B>=65&&B<=90&&(F=`/${String.fromCharCode(B+32)}:${F.substr(3)}`)}else if(F.length>=2&&F.charCodeAt(1)===58){let B=F.charCodeAt(0);B>=65&&B<=90&&(F=`${String.fromCharCode(B+32)}:${F.substr(2)}`)}z+=V(F,!0,!1)}return W&&(z+="?",z+=V(W,!1,!1)),U&&(z+="#",z+=O?U:D(U,!1,!1)),z}function j($){try{return decodeURIComponent($)}catch{return $.length>3?$.substr(0,3)+j($.substr(3)):$}}let A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function de($){return $.match(A)?$.replace(A,(O=>j(O))):$}var le=t(975);let Pe=le.posix||le,Ot="/";var gn;(function($){$.joinPath=function(O,...V){return O.with({path:Pe.join(O.path,...V)})},$.resolvePath=function(O,...V){let z=O.path,R=!1;z[0]!==Ot&&(z=Ot+z,R=!0);let N=Pe.resolve(z,...V);return R&&N[0]===Ot&&!O.authority&&(N=N.substring(1)),O.with({path:N})},$.dirname=function(O){if(O.path.length===0||O.path===Ot)return O;let V=Pe.dirname(O.path);return V.length===1&&V.charCodeAt(0)===46&&(V=""),O.with({path:V})},$.basename=function(O){return Pe.basename(O.path)},$.extname=function(O){return Pe.extname(O.path)}})(gn||(gn={})),vb=r})();var{URI:mx,Utils:Ks}=vb;function wb(n){let e=bb(),t=Cb(),r=new pn.EventEmitter;return n.push(pn.extensions.onDidChange(i=>{let s=Cb();(s.length!==t.length||!s.every((o,a)=>o===t[a]))&&(t=s,r.fire())})),n.push(pn.workspace.onDidChangeConfiguration(i=>{i.affectsConfiguration("css.customData")&&(e=bb(),r.fire())})),{get uris(){return e.concat(t)},get onDidChange(){return r.event}}}function bb(){let n=pn.workspace.workspaceFolders,e=[];if(!n)return e;let t=(r,i)=>{if(Array.isArray(r))for(let s of r)typeof s=="string"&&e.push(Ks.resolvePath(i,s).toString())};for(let r=0;re.type=new La.RequestType("fs/content"))(Db||={});var Sb;(e=>e.type=new La.RequestType("fs/stat"))(Sb||={});var Pb;(e=>e.type=new La.RequestType("fs/readDir"))(Pb||={});function Rb(n,e){n.onRequest(Db.type,t=>{let r=$r.Uri.parse(t.uri);return r.scheme==="file"&&e.fs?e.fs.getContent(t.uri):$r.workspace.fs.readFile(r).then(i=>new e.TextDecoder(t.encoding).decode(i))}),n.onRequest(Pb.type,t=>{let r=$r.Uri.parse(t);return r.scheme==="file"&&e.fs?e.fs.readDirectory(t):$r.workspace.fs.readDirectory(r)}),n.onRequest(Sb.type,t=>{let r=$r.Uri.parse(t);return r.scheme==="file"&&e.fs?e.fs.stat(t):$r.workspace.fs.stat(r)})}var Wh;(e=>e.type=new Bs.NotificationType("css/customDataChanged"))(Wh||={});var kE=["newlineBetweenSelectors","newlineBetweenRules","spaceAroundSelectorSeparator","braceStyle","preserveNewLines","maxPreserveNewLines"];async function Tb(n,e,t){let r=wb(n.subscriptions),i=["css","scss","less"],s=i.map(f=>({languageId:f,settingId:`${f}.format.enable`,provider:void 0})),o={documentSelector:i,synchronize:{configurationSection:["css","scss","less"]},initializationOptions:{handledSchemas:["file"],provideFormatter:!1,customCapabilities:{rangeFormatting:{editLimit:1e4}}},middleware:{provideCompletionItem(f,p,h,g,_){function y(j){let A=j.range;A instanceof Se.Range&&A.end.isAfter(p)&&A.start.isBeforeOrEqual(p)&&(j.range={inserting:new Se.Range(A.start,p),replacing:A})}function D(j){j.kind===Se.CompletionItemKind.Color&&(j.label={label:j.label,description:j.documentation})}function M(j){return j&&((Array.isArray(j)?j:j.items).forEach(y),(Array.isArray(j)?j:j.items).forEach(D)),j}function w(j){return!!j&&typeof j.then=="function"}let I=_(f,p,h,g);return w(I)?I.then(M):M(I)}}},a=e("css",Se.l10n.t("CSS Language Server"),o);a.registerProposedFeatures(),await a.start(),a.sendNotification(Wh.type,r.uris),r.onDidChange(()=>{a.sendNotification(Wh.type,r.uris)});for(let f of s)l(f),n.subscriptions.push({dispose:()=>f.provider?.dispose()}),n.subscriptions.push(Se.workspace.onDidChangeConfiguration(p=>p.affectsConfiguration(f.settingId)&&l(f)));Rb(a,t),n.subscriptions.push(u());function u(){let f=/^(\s*)(\/(\*\s*(#\w*)?)?)?$/;return Se.languages.registerCompletionItemProvider(i,{provideCompletionItems(p,h){let _=p.getText(new Se.Range(new Se.Position(h.line,0),h)).match(f);if(_){let y=new Se.Range(new Se.Position(h.line,_[1].length),h),D=new Se.CompletionItem("#region",Se.CompletionItemKind.Snippet);D.range=y,Se.TextEdit.replace(y,"/* #region */"),D.insertText=new Se.SnippetString("/* #region $1*/"),D.documentation=Se.l10n.t("Folding Region Start"),D.filterText=_[2],D.sortText="za";let M=new Se.CompletionItem("#endregion",Se.CompletionItemKind.Snippet);return M.range=y,M.insertText="/* #endregion */",M.documentation=Se.l10n.t("Folding Region End"),M.sortText="zb",M.filterText=_[2],[D,M]}return null}})}function l(f){let p=Se.workspace.getConfiguration().get(f.settingId);!p&&f.provider?(f.provider.dispose(),f.provider=void 0):p&&!f.provider&&(f.provider=Se.languages.registerDocumentRangeFormattingEditProvider(f.languageId,{provideDocumentRangeFormattingEdits(h,g,_,y){let D=Se.workspace.getConfiguration("files",h),M={trimTrailingWhitespace:D.get("trimTrailingWhitespace"),trimFinalNewlines:D.get("trimFinalNewlines"),insertFinalNewline:D.get("insertFinalNewline")},w={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(h),range:a.code2ProtocolConverter.asRange(g),options:a.code2ProtocolConverter.asFormattingOptions(_,M)},I=Se.workspace.getConfiguration(f.languageId,h).get("format");if(I)for(let j of kE){let A=I[j];A!=null&&(w.options[j]=A)}return a.sendRequest(Bs.DocumentRangeFormattingRequest.type,w,y).then(a.protocol2CodeConverter.asTextEdits,j=>(a.handleFailedRequest(Bs.DocumentRangeFormattingRequest.type,void 0,j,[]),Promise.resolve([])))}}))}return a}var Gi=br(require("fs")),Aa=require("vscode");function Ob(){function n(e){if(!e.startsWith("file://"))throw new Error("fileRequestService can only handle file URLs")}return{getContent(e,t){return n(e),new Promise((r,i)=>{let s=Aa.Uri.parse(e);Gi.readFile(s.fsPath,t,(o,a)=>{if(o)return i(o);r(a.toString())})})},stat(e){return n(e),new Promise((t,r)=>{let i=Aa.Uri.parse(e);Gi.stat(i.fsPath,(s,o)=>{if(s)return s.code==="ENOENT"?t({type:0,ctime:-1,mtime:-1,size:-1}):r(s);let a=0;o.isFile()?a=1:o.isDirectory()?a=2:o.isSymbolicLink()&&(a=64),t({type:a,ctime:o.ctime.getTime(),mtime:o.mtime.getTime(),size:o.size})})})},readDirectory(e){return n(e),new Promise((t,r)=>{let i=Aa.Uri.parse(e).fsPath;Gi.readdir(i,{withFileTypes:!0},(s,o)=>{if(s)return r(s);t(o.map(a=>a.isSymbolicLink()?[a.name,64]:a.isDirectory()?[a.name,2]:a.isFile()?[a.name,1]:[a.name,0]))})})}}}var Ur=br(require("path")),Lt=br(require("vscode"));var zh=br(require("vscode"));var ka=Object.freeze({file:"file",notebookCell:"vscode-notebook-cell",untitled:"untitled"}),$a=Object.freeze({plain:"text/plain",uriList:"text/uri-list"});function Eb(n){let e=$E(n);return e.scheme===ka.untitled?zh.workspace.workspaceFolders?.[0]?.uri:Ks.dirname(e)}function $E(n){if(n.scheme===ka.notebookCell){for(let e of zh.workspace.notebookDocuments)for(let t of e.getCells())if(t.document.uri.toString()===n.toString())return e.uri}return n}var qb=br(require("vscode"));function UE(n){return n.split(`\r +`)}function HE(n){return UE(n).filter(e=>!e.startsWith("#")).map(e=>e.trim())}var Vs=class n{constructor(e){this.entries=e}entries;static from(e){return new n(WE(HE(e).map(t=>{try{return{uri:qb.Uri.parse(t),str:t}}catch{return}})))}};function WE(n){return n.filter(e=>!!e)}var Kh=class{kind=Lt.DocumentDropOrPasteEditKind.Empty.append("css","link","url");async provideDocumentDropEdits(e,t,r,i){let s=await this.getUriList(r);if(!s.entries.length||i.isCancellationRequested)return;let o=await this.createUriListSnippet(e.uri,s);if(!(!o||i.isCancellationRequested))return{kind:this.kind,title:o.label,insertText:o.snippet.value,yieldTo:this.pasteAsCssUrlByDefault(e,t)?[]:[Lt.DocumentDropOrPasteEditKind.Empty.append("uri")]}}async provideDocumentPasteEdits(e,t,r,i,s){let o=await this.getUriList(r);if(!o.entries.length||s.isCancellationRequested)return;let a=await this.createUriListSnippet(e.uri,o);if(!(!a||s.isCancellationRequested))return[{kind:this.kind,title:a.label,insertText:a.snippet.value,yieldTo:this.pasteAsCssUrlByDefault(e,t[0].start)?[]:[Lt.DocumentDropOrPasteEditKind.Empty.append("uri")]}]}async getUriList(e){let t=await e.get($a.uriList)?.asString();if(t)return Vs.from(t);let r=[];for(let[i,s]of e){let o=s.asFile();o?.uri&&r.push(o.uri)}return new Vs(r.map(i=>({uri:i,str:i.toString(!0)})))}async createUriListSnippet(e,t){if(!t.entries.length)return;let r=new Lt.SnippetString;for(let i=0;i1?Lt.l10n.t("Insert url() Functions"):Lt.l10n.t("Insert url() Function")}}pasteAsCssUrlByDefault(e,t){let r=/url\(.+?\)/gi;for(let i of Array.from(e.lineAt(t.line).text.matchAll(r)))if(t.character>i.index&&t.characternew Gs.LanguageClient(a,u,s,l);process.env.VSCODE_L10N_BUNDLE_LOCATION=Ha.l10n.uri?.toString()??"",Ua=await Tb(n,o,{fs:Ob(),TextDecoder}),n.subscriptions.push(xb({language:"css",scheme:"*"}))}async function BE(){Ua&&(await Ua.stop(),Ua=void 0)}0&&(module.exports={activate,deactivate}); +//# sourceMappingURL=cssClientMain.js.map diff --git a/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/schemas/package.schema.json b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/schemas/package.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..5a3bea8f9dcf068b432bb3f77042f01998482ec8 --- /dev/null +++ b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/schemas/package.schema.json @@ -0,0 +1 @@ +{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"contributes":{"type":"object","properties":{"css.customData":{"type":"array","markdownDescription":"A list of relative file paths pointing to JSON files following the [custom data format](https://github.com/microsoft/vscode-css-languageservice/blob/master/docs/customData.md).\n\nVS Code loads custom data on startup to enhance its CSS support for the custom CSS properties, at directives, pseudo classes and pseudo elements you specify in the JSON files.\n\nThe file paths are relative to workspace and only workspace folder settings are considered.","items":{"type":"string","description":"Relative path to a CSS custom data file"}}}}}} \ No newline at end of file diff --git a/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/server/.npmrc b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/server/.npmrc new file mode 100644 index 0000000000000000000000000000000000000000..a9c57709666b27ed6df6df5494b45558582bd723 --- /dev/null +++ b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/server/.npmrc @@ -0,0 +1,2 @@ +legacy-peer-deps="true" +timeout=180000 diff --git a/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/server/dist/node/cssServerMain.js b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/server/dist/node/cssServerMain.js new file mode 100644 index 0000000000000000000000000000000000000000..cde9eec337bb0422bb4ee9fe44bbc00ab4b15284 --- /dev/null +++ b/home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/css-language-features/server/dist/node/cssServerMain.js @@ -0,0 +1,78 @@ +import { createRequire } from 'module'; const require = createRequire(import.meta.url); +var v0=Object.create;var Rs=Object.defineProperty;var F0=Object.getOwnPropertyDescriptor;var C0=Object.getOwnPropertyNames;var x0=Object.getPrototypeOf,A0=Object.prototype.hasOwnProperty;var bt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Q=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(i){throw n=[i],i}};var $=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},E0=(t,e)=>{for(var n in e)Rs(t,n,{get:e[n],enumerable:!0})},Ep=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of C0(e))!A0.call(t,r)&&r!==n&&Rs(t,r,{get:()=>e[r],enumerable:!(i=F0(e,r))||i.enumerable});return t};var Ke=(t,e,n)=>(n=t!=null?v0(x0(t)):{},Ep(e||!t||!t.__esModule?Rs(n,"default",{value:t,enumerable:!0}):n,t)),Fl=t=>Ep(Rs({},"__esModule",{value:!0}),t);var gt=$((ky,Dp)=>{"use strict";var Cl=Object.defineProperty,k0=Object.getOwnPropertyDescriptor,M0=Object.getOwnPropertyNames,R0=Object.prototype.hasOwnProperty,D0=(t,e)=>{for(var n in e)Cl(t,n,{get:e[n],enumerable:!0})},O0=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of M0(e))!R0.call(t,r)&&r!==n&&Cl(t,r,{get:()=>e[r],enumerable:!(i=k0(e,r))||i.enumerable});return t},P0=t=>O0(Cl({},"__esModule",{value:!0}),t),Mp={};D0(Mp,{config:()=>W0,t:()=>Rp});Dp.exports=P0(Mp);var I0=bt("fs"),T0=bt("fs/promises");async function z0(t){if(t.protocol==="file:")return await(0,T0.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:"){let e=await fetch(t.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!e.ok){let i=`Unexpected ${e.status} response while trying to read ${t}`;try{i+=`: ${await e.text()}`}catch{}throw new Error(i)}return await e.text()}throw new Error("Unsupported protocol")}function N0(t){return(0,I0.readFileSync)(t,"utf8")}var zr;function W0(t){if("contents"in t){typeof t.contents=="string"?zr=JSON.parse(t.contents):zr=t.contents;return}if("fsPath"in t){let e=N0(t.fsPath),n=JSON.parse(e);zr=kp(n)?n.contents.bundle:n;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((n,i)=>{z0(e).then(r=>{try{let s=JSON.parse(r);zr=kp(s)?s.contents.bundle:s,n()}catch(s){i(s)}}).catch(r=>{i(r)})})}}function Rp(...t){let e=t[0],n,i,r;if(typeof e=="string")n=e,i=e,t.splice(0,1),r=!t||typeof t[0]!="object"?t:t[0];else if(e instanceof Array){let a=t.slice(1);if(e.length!==a.length+1)throw new Error("expected a string as the first argument to l10n.t");let o=e[0];for(let l=1;l0&&(n+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),r=e.args??{};let s=zr?.[n];return s?typeof s=="string"?Ds(s,r):s.comment?Ds(s.message,r):Ds(i,r):Ds(i,r)}var L0=/{([^}]+)}/g;function Ds(t,e){return Object.keys(e).length===0?t:t.replace(L0,(n,i)=>e[i]??n)}function kp(t){return typeof t?.contents?.bundle=="object"&&typeof t?.version=="string"}});var Os=$(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.boolean=q0;Nt.string=Op;Nt.number=j0;Nt.error=$0;Nt.func=Pp;Nt.array=Ip;Nt.stringArray=U0;Nt.typedArray=B0;Nt.thenable=V0;function q0(t){return t===!0||t===!1}function Op(t){return typeof t=="string"||t instanceof String}function j0(t){return typeof t=="number"||t instanceof Number}function $0(t){return t instanceof Error}function Pp(t){return typeof t=="function"}function Ip(t){return Array.isArray(t)}function U0(t){return Ip(t)&&t.every(e=>Op(e))}function B0(t,e){return Array.isArray(t)&&t.every(e)}function V0(t){return t&&Pp(t.then)}});var xi=$(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.boolean=H0;ln.string=Tp;ln.number=G0;ln.error=K0;ln.func=J0;ln.array=zp;ln.stringArray=Y0;function H0(t){return t===!0||t===!1}function Tp(t){return typeof t=="string"||t instanceof String}function G0(t){return typeof t=="number"||t instanceof Number}function K0(t){return t instanceof Error}function J0(t){return typeof t=="function"}function zp(t){return Array.isArray(t)}function Y0(t){return zp(t)&&t.every(e=>Tp(e))}});var Jl=$(G=>{"use strict";var X0=G&&G.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Q0=G&&G.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Z0=G&&G.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.LRUCache=Mn.LinkedMap=Mn.Touch=void 0;var et;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(et||(Mn.Touch=et={}));var Ps=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){let n=this._map.get(e);return n?n.previous?.value:void 0}after(e){let n=this._map.get(e);return n?n.next?.value:void 0}has(e){return this._map.has(e)}get(e,n=et.None){let i=this._map.get(e);if(i)return n!==et.None&&this.touch(i,n),i.value}set(e,n,i=et.None){let r=this._map.get(e);if(r)r.value=n,i!==et.None&&this.touch(r,i);else{switch(r={key:e,value:n,next:void 0,previous:void 0},i){case et.None:this.addItemLast(r);break;case et.First:this.addItemFirst(r);break;case et.Last:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),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 i=this._state,r=this._head;for(;r;){if(n?e.bind(n)(r.value,r.key,this):e(r.value,r.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){let e=this._state,n=this._head,i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:n.key,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return i}values(){let e=this._state,n=this._head,i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:n.value,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return i}entries(){let e=this._state,n=this._head,i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:[n.key,n.value],done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,i=this.size;for(;n&&i>e;)this._map.delete(n.key),n=n.next,i--;this._head=n,this._size=i,n&&(n.previous=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,i=e.previous;if(!n||!i)throw new Error("Invalid list");n.previous=i,i.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!==et.First&&n!==et.Last)){if(n===et.First){if(e===this._head)return;let i=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(i.previous=r,r.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===et.Last){if(e===this._tail)return;let i=e.next,r=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=r,r.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,i)=>{e.push([i,n])}),e}fromJSON(e){this.clear();for(let[n,i]of e)this.set(n,i)}};Mn.LinkedMap=Ps;var Yl=class extends Ps{_limit;_ratio;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 ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=et.AsNew){return super.get(e,n)}peek(e){return super.get(e,et.None)}set(e,n){return super.set(e,n,et.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Mn.LRUCache=Yl});var Lp=$(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.Disposable=void 0;var Wp;(function(t){function e(n){return{dispose:n}}t.create=e})(Wp||(Is.Disposable=Wp={}))});var Rn=$(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var Ql;function Zl(){if(Ql===void 0)throw new Error("No runtime abstraction layer installed");return Ql}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Ql=n}t.install=e})(Zl||(Zl={}));ec.default=Zl});var Ai=$(Dn=>{"use strict";var ew=Dn&&Dn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.Emitter=Dn.Event=void 0;var tw=ew(Rn()),qp;(function(t){let e={dispose(){}};t.None=function(){return e}})(qp||(Dn.Event=qp={}));var tc=class{_callbacks;_contexts;add(e,n=null,i){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(n),Array.isArray(i)&&i.push({dispose:()=>this.remove(e,n)})}remove(e,n=null){if(!this._callbacks)return;let i=!1;for(let r=0,s=this._callbacks.length;r{this._callbacks||(this._callbacks=new tc),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);let r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,n),r.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Dn.Emitter=nc});var Ns=$(pt=>{"use strict";var nw=pt&&pt.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),iw=pt&&pt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rw=pt&&pt.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.SharedArrayReceiverStrategy=Ei.SharedArraySenderStrategy=void 0;var cw=Ns(),Nr;(function(t){t.Continue=0,t.Cancelled=1})(Nr||(Nr={}));var sc=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let n=new SharedArrayBuffer(4),i=new Int32Array(n,0,1);i[0]=Nr.Continue,this.buffers.set(e.id,n),e.$cancellationData=n}async sendCancellation(e,n){let i=this.buffers.get(n);if(i===void 0)return;let r=new Int32Array(i,0,1);Atomics.store(r,0,Nr.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Ei.SharedArraySenderStrategy=sc;var ac=class{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Nr.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},oc=class{token;constructor(e){this.token=new ac(e)}cancel(){}dispose(){}},lc=class{kind="request";createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new cw.CancellationTokenSource:new oc(n)}};Ei.SharedArrayReceiverStrategy=lc});var dc=$(ki=>{"use strict";var dw=ki&&ki.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ki,"__esModule",{value:!0});ki.Semaphore=void 0;var hw=dw(Rn()),cc=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,i)=>{this._waiting.push({thunk:e,resolve:n,reject:i}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,hw.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=e.thunk();n instanceof Promise?n.then(i=>{this._active--,e.resolve(i),this.runNext()},i=>{this._active--,e.reject(i),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}};ki.Semaphore=cc});var Up=$(tt=>{"use strict";var pw=tt&&tt.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),uw=tt&&tt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mw=tt&&tt.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{this.onData(i)});return this.readable.onError(i=>this.fireError(i)),this.readable.onClose(()=>this.fireClose()),n}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders(!0);if(!i)return;let r=i.get("content-length");if(!r){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(i))}`));return}let s=parseInt(r);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${r}`));return}this.nextMessageLength=s}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let i=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,r=await this.options.contentTypeDecoder.decode(i,this.options);this.callback(r)}).catch(i=>{this.fireError(i)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,pc.default)().timer.setTimeout((e,n)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};tt.ReadableStreamMessageReader=mc});var Kp=$(nt=>{"use strict";var gw=nt&&nt.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ww=nt&&nt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_w=nt&&nt.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;rthis.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let r=[];return r.push(vw,i.byteLength.toString(),Hp),r.push(Hp),this.doWrite(e,r,i)},i=>{throw this.fireError(i),i}))}async doWrite(e,n,i){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(i)}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){this.writable.end()}};nt.WriteableStreamMessageWriter=bc});var Jp=$(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.AbstractMessageBuffer=void 0;var Fw=13,Cw=10,xw=`\r +`,gc=class{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let n=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let n=0,i=0,r=0,s=0;e:for(;ithis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],a=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,a}let n=this.allocNative(e),i=0,r=0;for(;e>0;){let s=this._chunks[r];if(s.byteLength>e){let a=s.slice(0,e);n.set(a,i),i+=e,this._chunks[r]=s.slice(e),this._totalLength-=e,e-=e}else n.set(s,i),i+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return n}};qs.AbstractMessageBuffer=gc});var Zp=$(Z=>{"use strict";var Aw=Z&&Z.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Ew=Z&&Z.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kw=Z&&Z.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{},warn:()=>{},info:()=>{},log:()=>{}});var ue;(function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"})(ue||(Z.Trace=ue={}));var vc;(function(t){t.Off="off",t.Messages="messages",t.Compact="compact",t.Verbose="verbose"})(vc||(Z.TraceValue=vc={}));Z.TraceValues=vc;(function(t){function e(i){if(!Ae.string(i))return t.Off;switch(i=i.toLowerCase(),i){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}t.fromString=e;function n(i){switch(i){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}t.toString=n})(ue||(Z.Trace=ue={}));var wt;(function(t){t.Text="text",t.JSON="json"})(wt||(Z.TraceFormat=wt={}));(function(t){function e(n){return Ae.string(n)?(n=n.toLowerCase(),n==="json"?t.JSON:t.Text):t.Text}t.fromString=e})(wt||(Z.TraceFormat=wt={}));var Fc;(function(t){t.type=new ne.NotificationType("$/setTrace")})(Fc||(Z.SetTraceNotification=Fc={}));var js;(function(t){t.type=new ne.NotificationType("$/logTrace")})(js||(Z.LogTraceNotification=js={}));var jr;(function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"})(jr||(Z.ConnectionErrors=jr={}));var Ri=class t extends Error{code;constructor(e,n){super(n),this.code=e,Object.setPrototypeOf(this,t.prototype)}};Z.ConnectionError=Ri;var Cc;(function(t){function e(n){let i=n;return i&&Ae.func(i.cancelUndispatched)}t.is=e})(Cc||(Z.ConnectionStrategy=Cc={}));var $s;(function(t){function e(n){let i=n;return i&&(i.kind===void 0||i.kind==="id")&&Ae.func(i.createCancellationTokenSource)&&(i.dispose===void 0||Ae.func(i.dispose))}t.is=e})($s||(Z.IdCancellationReceiverStrategy=$s={}));var xc;(function(t){function e(n){let i=n;return i&&i.kind==="request"&&Ae.func(i.createCancellationTokenSource)&&(i.dispose===void 0||Ae.func(i.dispose))}t.is=e})(xc||(Z.RequestCancellationReceiverStrategy=xc={}));var Us;(function(t){t.Message=Object.freeze({createCancellationTokenSource(n){return new wc.CancellationTokenSource}});function e(n){return $s.is(n)||xc.is(n)}t.is=e})(Us||(Z.CancellationReceiverStrategy=Us={}));var Bs;(function(t){t.Message=Object.freeze({sendCancellation(n,i){return n.sendNotification($r.type,{id:i})},cleanup(n){}});function e(n){let i=n;return i&&Ae.func(i.sendCancellation)&&Ae.func(i.cleanup)}t.is=e})(Bs||(Z.CancellationSenderStrategy=Bs={}));var Vs;(function(t){t.Message=Object.freeze({receiver:Us.Message,sender:Bs.Message});function e(n){let i=n;return i&&Us.is(i.receiver)&&Bs.is(i.sender)}t.is=e})(Vs||(Z.CancellationStrategy=Vs={}));var Hs;(function(t){function e(n){let i=n;return i&&Ae.func(i.handleMessage)}t.is=e})(Hs||(Z.MessageStrategy=Hs={}));var Qp;(function(t){function e(n){let i=n;return i&&(Vs.is(i.cancellationStrategy)||Cc.is(i.connectionStrategy)||Hs.is(i.messageStrategy)||Ae.number(i.maxParallelism))}t.is=e})(Qp||(Z.ConnectionOptions=Qp={}));var Wt;(function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"})(Wt||(Wt={}));function Rw(t,e,n,i){let r=n!==void 0?n:Z.NullLogger,s=0,a=0,o=0,l="2.0",c=i?.maxParallelism??-1,h=0,m,w=new Map,S,P=new Map,H=new Map,oe,X=new Xp.LinkedMap,y=new Map,_=new Set,b=new Map,R=ue.Off,E=wt.Text,U,se=Wt.New,We=new Lr.Emitter,ht=new Lr.Emitter,I=new Lr.Emitter,C=new Lr.Emitter,W=new Lr.Emitter,N=i&&i.cancellationStrategy?i.cancellationStrategy:Vs.Message;function x(f){}function k(){return se===Wt.Listening}function D(){return se===Wt.Closed}function L(){return se===Wt.Disposed}function B(){(se===Wt.New||se===Wt.Listening)&&(se=Wt.Closed,ht.fire(void 0))}function q(f){We.fire([f,void 0,void 0])}function te(f){We.fire(f)}t.onClose(B),t.onError(q),e.onClose(B),e.onError(te);function ae(f){if(f===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+f.toString()}function De(f){return f===null?"res-unknown-"+(++o).toString():"res-"+f.toString()}function fe(){return"not-"+(++a).toString()}function kt(f,M){ne.Message.isRequest(M)?f.set(ae(M.id),M):ne.Message.isResponse(M)?c===-1?f.set(De(M.id),M):Fp(M):f.set(fe(),M)}function an(){oe||X.size===0||c!==-1&&h>=c||(oe=(0,Yp.default)().timer.setImmediate(async()=>{if(oe=void 0,X.size===0||c!==-1&&h>=c)return;let f=X.shift(),M;try{h++;let T=i?.messageStrategy;Hs.is(T)?M=T.handleMessage(f,vp):M=vp(f)}catch(T){r.error(`Processing message queue failed: ${T.toString()}`)}finally{M instanceof Promise?M.then(()=>{h--,an()}).catch(T=>{r.error(`Processing message queue failed: ${T.toString()}`)}):h--,an()}}))}async function vp(f){return ne.Message.isRequest(f)?p0(f):ne.Message.isNotification(f)?u0(f):ne.Message.isResponse(f)?Fp(f):m0(f)}let h0=f=>{try{if(ne.Message.isNotification(f)&&f.method===$r.type.method){let M=f.params.id,T=ae(M),K=X.get(T);if(ne.Message.isRequest(K)){let xe=i?.connectionStrategy,be=xe&&xe.cancelUndispatched?xe.cancelUndispatched(K,x):void 0;if(be&&(be.error!==void 0||be.result!==void 0)){X.delete(T),b.delete(M),be.id=K.id,Sl(be,f.method,Date.now()),e.write(be).catch(()=>r.error("Sending response for canceled message failed."));return}}let pe=b.get(M);if(pe!==void 0){pe.cancel(),yl(f);return}else _.add(M)}kt(X,f)}finally{an()}};async function p0(f){if(L())return Promise.resolve();function M(Le,Ze,ke){let Me={jsonrpc:l,id:f.id};return Le instanceof ne.ResponseError?Me.error=Le.toJson():Me.result=Le===void 0?null:Le,Sl(Me,Ze,ke),e.write(Me)}function T(Le,Ze,ke){let Me={jsonrpc:l,id:f.id,error:Le.toJson()};return Sl(Me,Ze,ke),e.write(Me)}g0(f);let K=w.get(f.method),pe,xe;K&&(pe=K.type,xe=K.handler);let be=Date.now();if(xe||m){let Le=f.id??String(Date.now()),Ze=$s.is(N.receiver)?N.receiver.createCancellationTokenSource(Le):N.receiver.createCancellationTokenSource(f);f.id!==null&&_.has(f.id)&&Ze.cancel(),f.id!==null&&b.set(Le,Ze);try{let ke;if(xe)if(f.params===void 0){if(pe!==void 0&&pe.numberOfParams!==0)return T(new ne.ResponseError(ne.ErrorCodes.InvalidParams,`Request ${f.method} defines ${pe.numberOfParams} params but received none.`),f.method,be);ke=xe(Ze.token)}else if(Array.isArray(f.params)){if(pe!==void 0&&pe.parameterStructures===ne.ParameterStructures.byName)return T(new ne.ResponseError(ne.ErrorCodes.InvalidParams,`Request ${f.method} defines parameters by name but received parameters by position`),f.method,be);ke=xe(...f.params,Ze.token)}else{if(pe!==void 0&&pe.parameterStructures===ne.ParameterStructures.byPosition)return T(new ne.ResponseError(ne.ErrorCodes.InvalidParams,`Request ${f.method} defines parameters by position but received parameters by name`),f.method,be);ke=xe(f.params,Ze.token)}else m&&(ke=m(f.method,f.params,Ze.token));let Me=await ke;await M(Me,f.method,be)}catch(ke){ke instanceof ne.ResponseError?await M(ke,f.method,be):ke&&Ae.string(ke.message)?await T(new ne.ResponseError(ne.ErrorCodes.InternalError,`Request ${f.method} failed with message: ${ke.message}`),f.method,be):await T(new ne.ResponseError(ne.ErrorCodes.InternalError,`Request ${f.method} failed unexpectedly without providing any details.`),f.method,be)}finally{b.delete(Le)}}else await T(new ne.ResponseError(ne.ErrorCodes.MethodNotFound,`Unhandled method ${f.method}`),f.method,be)}function Fp(f){if(!L())if(f.id===null)f.error?r.error(`Received response message without id: Error is: +${JSON.stringify(f.error,void 0,4)}`):r.error("Received response message without id. No further error information provided.");else{let M=f.id,T=y.get(M);if(w0(f,T),T!==void 0){y.delete(M);try{if(f.error){let K=f.error;T.reject(new ne.ResponseError(K.code,K.message,K.data))}else if(f.result!==void 0)T.resolve(f.result);else throw new Error("Should never happen.")}catch(K){K.message?r.error(`Response handler '${T.method}' failed with message: ${K.message}`):r.error(`Response handler '${T.method}' failed unexpectedly.`)}}}}async function u0(f){if(L())return;let M,T;if(f.method===$r.type.method){let K=f.params.id;_.delete(K),yl(f);return}else{let K=P.get(f.method);K&&(T=K.handler,M=K.type)}if(T||S)try{if(yl(f),T)if(f.params===void 0)M!==void 0&&M.numberOfParams!==0&&M.parameterStructures!==ne.ParameterStructures.byName&&r.error(`Notification ${f.method} defines ${M.numberOfParams} params but received none.`),await T();else if(Array.isArray(f.params)){let K=f.params;f.method===qr.type.method&&K.length===2&&_c.is(K[0])?await T({token:K[0],value:K[1]}):(M!==void 0&&(M.parameterStructures===ne.ParameterStructures.byName&&r.error(`Notification ${f.method} defines parameters by name but received parameters by position`),M.numberOfParams!==f.params.length&&r.error(`Notification ${f.method} defines ${M.numberOfParams} params but received ${K.length} arguments`)),await T(...K))}else M!==void 0&&M.parameterStructures===ne.ParameterStructures.byPosition&&r.error(`Notification ${f.method} defines parameters by position but received parameters by name`),await T(f.params);else S&&await S(f.method,f.params)}catch(K){K.message?r.error(`Notification handler '${f.method}' failed with message: ${K.message}`):r.error(`Notification handler '${f.method}' failed unexpectedly.`)}else I.fire(f)}function m0(f){if(!f){r.error("Received empty message.");return}r.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(f,null,4)}`);let M=f;if(Ae.string(M.id)||Ae.number(M.id)){let T=M.id,K=y.get(T);K&&K.reject(new Error("The received response has neither a result nor an error property."))}}function En(f){if(f!=null)switch(R){case ue.Verbose:return JSON.stringify(f,null,4);case ue.Compact:return JSON.stringify(f);default:return}}function f0(f){if(!(R===ue.Off||!U))if(E===wt.Text){let M;(R===ue.Verbose||R===ue.Compact)&&f.params&&(M=`Params: ${En(f.params)}`),U.log(`Sending request '${f.method} - (${f.id})'.`,M)}else Ci("send-request",f)}function b0(f){if(!(R===ue.Off||!U))if(E===wt.Text){let M;(R===ue.Verbose||R===ue.Compact)&&(f.params?M=`Params: ${En(f.params)}`:M="No parameters provided."),U.log(`Sending notification '${f.method}'.`,M)}else Ci("send-notification",f)}function Sl(f,M,T){if(!(R===ue.Off||!U))if(E===wt.Text){let K;(R===ue.Verbose||R===ue.Compact)&&(f.error&&f.error.data?K=`Error data: ${En(f.error.data)}`:f.result?K=`Result: ${En(f.result)}`:f.error===void 0&&(K="No result returned.")),U.log(`Sending response '${M} - (${f.id})'. Processing request took ${Date.now()-T}ms`,K)}else Ci("send-response",f)}function g0(f){if(!(R===ue.Off||!U))if(E===wt.Text){let M;(R===ue.Verbose||R===ue.Compact)&&f.params&&(M=`Params: ${En(f.params)}`),U.log(`Received request '${f.method} - (${f.id})'.`,M)}else Ci("receive-request",f)}function yl(f){if(!(R===ue.Off||!U||f.method===js.type.method))if(E===wt.Text){let M;(R===ue.Verbose||R===ue.Compact)&&(f.params?M=`Params: ${En(f.params)}`:M="No parameters provided."),U.log(`Received notification '${f.method}'.`,M)}else Ci("receive-notification",f)}function w0(f,M){if(!(R===ue.Off||!U))if(E===wt.Text){let T;if((R===ue.Verbose||R===ue.Compact)&&(f.error&&f.error.data?T=`Error data: ${En(f.error.data)}`:f.result?T=`Result: ${En(f.result)}`:f.error===void 0&&(T="No result returned.")),M){let K=f.error?` Request failed: ${f.error.message} (${f.error.code}).`:"";U.log(`Received response '${M.method} - (${f.id})' in ${Date.now()-M.timerStart}ms.${K}`,T)}else U.log(`Received response ${f.id} without active response promise.`,T)}else Ci("receive-response",f)}function Ci(f,M){if(!U||R===ue.Off)return;let T={isLSPMessage:!0,type:f,message:M,timestamp:Date.now()};U.log(T)}function Pr(){if(D())throw new Ri(jr.Closed,"Connection is closed.");if(L())throw new Ri(jr.Disposed,"Connection is disposed.")}function _0(){if(k())throw new Ri(jr.AlreadyListening,"Connection is already listening")}function S0(){if(!k())throw new Error("Call listen() first.")}function Ir(f){return f===void 0?null:f}function Cp(f){if(f!==null)return f}function xp(f){return f!=null&&!Array.isArray(f)&&typeof f=="object"}function vl(f,M){switch(f){case ne.ParameterStructures.auto:return xp(M)?Cp(M):[Ir(M)];case ne.ParameterStructures.byName:if(!xp(M))throw new Error("Received parameters by name but param is not an object literal.");return Cp(M);case ne.ParameterStructures.byPosition:return[Ir(M)];default:throw new Error(`Unknown parameter structure ${f.toString()}`)}}function Ap(f,M){let T,K=f.numberOfParams;switch(K){case 0:T=void 0;break;case 1:T=vl(f.parameterStructures,M[0]);break;default:T=[];for(let pe=0;pe{Pr();let T,K;if(Ae.string(f)){T=f;let xe=M[0],be=0,Le=ne.ParameterStructures.auto;ne.ParameterStructures.is(xe)&&(be=1,Le=xe);let Ze=M.length,ke=Ze-be;switch(ke){case 0:K=void 0;break;case 1:K=vl(Le,M[be]);break;default:if(Le===ne.ParameterStructures.byName)throw new Error(`Received ${ke} parameters for 'by Name' notification parameter structure.`);K=M.slice(be,Ze).map(Me=>Ir(Me));break}}else{let xe=M;T=f.method,K=Ap(f,xe)}let pe={jsonrpc:l,method:T,params:K};return b0(pe),e.write(pe).catch(xe=>{throw r.error("Sending notification failed."),xe})},onNotification:(f,M)=>{Pr();let T;return Ae.func(f)?S=f:M&&(Ae.string(f)?(T=f,P.set(f,{type:void 0,handler:M})):(T=f.method,P.set(f.method,{type:f,handler:M}))),{dispose:()=>{T!==void 0?P.get(T)?.handler===M&&P.delete(T):S===f&&(S=void 0)}}},onProgress:(f,M,T)=>{if(H.has(M))throw new Error(`Progress handler for token ${M} already registered`);return H.set(M,T),{dispose:()=>{H.get(M)===T&&H.delete(M)}}},sendProgress:(f,M,T)=>ii.sendNotification(qr.type,{token:M,value:T}),onUnhandledProgress:C.event,sendRequest:(f,...M)=>{Pr(),S0();function T(Me,zt){let on=N.sender.sendCancellation(Me,zt);on===void 0?r.log(`Received no promise from cancellation strategy when cancelling id ${zt}`):on.catch(()=>{r.log(`Sending cancellation messages for id ${zt} failed.`)})}let K,pe,xe;if(Ae.string(f)){K=f;let Me=M[0],zt=M[M.length-1],on=0,Tr=ne.ParameterStructures.auto;ne.ParameterStructures.is(Me)&&(on=1,Tr=Me);let ri=M.length;wc.CancellationToken.is(zt)&&(ri=ri-1,xe=zt);let Gt=ri-on;switch(Gt){case 0:pe=void 0;break;case 1:pe=vl(Tr,M[on]);break;default:if(Tr===ne.ParameterStructures.byName)throw new Error(`Received ${Gt} parameters for 'by Name' request parameter structure.`);pe=M.slice(on,ri).map(y0=>Ir(y0));break}}else{let Me=M;K=f.method,pe=Ap(f,Me);let zt=f.numberOfParams;xe=wc.CancellationToken.is(Me[zt])?Me[zt]:void 0}let be=s++,Le,Ze=!1;xe!==void 0&&(xe.isCancellationRequested?Ze=!0:Le=xe.onCancellationRequested(()=>{T(ii,be)}));let ke={jsonrpc:l,id:be,method:K,params:pe};return f0(ke),typeof N.sender.enableCancellation=="function"&&N.sender.enableCancellation(ke),new Promise(async(Me,zt)=>{let on=Gt=>{Me(Gt),N.sender.cleanup(be),Le?.dispose()},Tr=Gt=>{zt(Gt),N.sender.cleanup(be),Le?.dispose()},ri={method:K,timerStart:Date.now(),resolve:on,reject:Tr};try{y.set(be,ri),await e.write(ke),Ze&&T(ii,be)}catch(Gt){throw y.delete(be),ri.reject(new ne.ResponseError(ne.ErrorCodes.MessageWriteError,Gt.message?Gt.message:"Unknown reason")),r.error("Sending request failed."),Gt}})},onRequest:(f,M)=>{Pr();let T=null;return yc.is(f)?(T=void 0,m=f):Ae.string(f)?(T=null,M!==void 0&&(T=f,w.set(f,{handler:M,type:void 0}))):M!==void 0&&(T=f.method,w.set(f.method,{type:f,handler:M})),{dispose:()=>{T!==null&&(T!==void 0?w.get(T)?.handler===M&&w.delete(T):m===f&&(m=void 0))}}},hasPendingResponse:()=>y.size>0,trace:async(f,M,T)=>{let K=!1,pe=wt.Text;T!==void 0&&(Ae.boolean(T)?K=T:(K=T.sendNotification||!1,pe=T.traceFormat||wt.Text)),R=f,E=pe,R===ue.Off?U=void 0:U=M,K&&!D()&&!L()&&await ii.sendNotification(Fc.type,{value:ue.toString(f)})},onError:We.event,onClose:ht.event,onUnhandledNotification:I.event,onDispose:W.event,end:()=>{e.end()},dispose:()=>{if(L())return;se=Wt.Disposed,W.fire(void 0);let f=new ne.ResponseError(ne.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let M of y.values())M.reject(f);y=new Map,b=new Map,_=new Set,X=new Xp.LinkedMap,Ae.func(e.dispose)&&e.dispose(),Ae.func(t.dispose)&&t.dispose()},listen:()=>{Pr(),_0(),se=Wt.Listening,t.listen(h0)},inspect:()=>{(0,Yp.default)().console.log("inspect")}};return ii.onNotification(js.type,f=>{if(R===ue.Off||!U)return;let M=R===ue.Verbose||R===ue.Compact;U.log(f.message,M?f.verbose:void 0)}),ii.onNotification(qr.type,async f=>{let M=H.get(f.token);M?await M(f.value):C.fire(f)}),ii}});var cn=$(F=>{"use strict";var Dw=F&&F.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(F,"__esModule",{value:!0});F.ProgressType=F.ProgressToken=F.createMessageConnection=F.NullLogger=F.ConnectionOptions=F.ConnectionStrategy=F.AbstractMessageBuffer=F.WriteableStreamMessageWriter=F.AbstractMessageWriter=F.MessageWriter=F.ReadableStreamMessageReader=F.AbstractMessageReader=F.MessageReader=F.SharedArrayReceiverStrategy=F.SharedArraySenderStrategy=F.CancellationToken=F.CancellationTokenSource=F.Emitter=F.Event=F.Disposable=F.LRUCache=F.Touch=F.LinkedMap=F.ParameterStructures=F.NotificationType9=F.NotificationType8=F.NotificationType7=F.NotificationType6=F.NotificationType5=F.NotificationType4=F.NotificationType3=F.NotificationType2=F.NotificationType1=F.NotificationType0=F.NotificationType=F.ErrorCodes=F.ResponseError=F.RequestType9=F.RequestType8=F.RequestType7=F.RequestType6=F.RequestType5=F.RequestType4=F.RequestType3=F.RequestType2=F.RequestType1=F.RequestType0=F.RequestType=F.Message=F.RAL=void 0;F.MessageStrategy=F.CancellationStrategy=F.CancellationSenderStrategy=F.RequestCancellationReceiverStrategy=F.IdCancellationReceiverStrategy=F.CancellationReceiverStrategy=F.ConnectionError=F.ConnectionErrors=F.LogTraceNotification=F.SetTraceNotification=F.TraceFormat=F.TraceValues=F.TraceValue=F.Trace=void 0;var _e=Jl();Object.defineProperty(F,"Message",{enumerable:!0,get:function(){return _e.Message}});Object.defineProperty(F,"RequestType",{enumerable:!0,get:function(){return _e.RequestType}});Object.defineProperty(F,"RequestType0",{enumerable:!0,get:function(){return _e.RequestType0}});Object.defineProperty(F,"RequestType1",{enumerable:!0,get:function(){return _e.RequestType1}});Object.defineProperty(F,"RequestType2",{enumerable:!0,get:function(){return _e.RequestType2}});Object.defineProperty(F,"RequestType3",{enumerable:!0,get:function(){return _e.RequestType3}});Object.defineProperty(F,"RequestType4",{enumerable:!0,get:function(){return _e.RequestType4}});Object.defineProperty(F,"RequestType5",{enumerable:!0,get:function(){return _e.RequestType5}});Object.defineProperty(F,"RequestType6",{enumerable:!0,get:function(){return _e.RequestType6}});Object.defineProperty(F,"RequestType7",{enumerable:!0,get:function(){return _e.RequestType7}});Object.defineProperty(F,"RequestType8",{enumerable:!0,get:function(){return _e.RequestType8}});Object.defineProperty(F,"RequestType9",{enumerable:!0,get:function(){return _e.RequestType9}});Object.defineProperty(F,"ResponseError",{enumerable:!0,get:function(){return _e.ResponseError}});Object.defineProperty(F,"ErrorCodes",{enumerable:!0,get:function(){return _e.ErrorCodes}});Object.defineProperty(F,"NotificationType",{enumerable:!0,get:function(){return _e.NotificationType}});Object.defineProperty(F,"NotificationType0",{enumerable:!0,get:function(){return _e.NotificationType0}});Object.defineProperty(F,"NotificationType1",{enumerable:!0,get:function(){return _e.NotificationType1}});Object.defineProperty(F,"NotificationType2",{enumerable:!0,get:function(){return _e.NotificationType2}});Object.defineProperty(F,"NotificationType3",{enumerable:!0,get:function(){return _e.NotificationType3}});Object.defineProperty(F,"NotificationType4",{enumerable:!0,get:function(){return _e.NotificationType4}});Object.defineProperty(F,"NotificationType5",{enumerable:!0,get:function(){return _e.NotificationType5}});Object.defineProperty(F,"NotificationType6",{enumerable:!0,get:function(){return _e.NotificationType6}});Object.defineProperty(F,"NotificationType7",{enumerable:!0,get:function(){return _e.NotificationType7}});Object.defineProperty(F,"NotificationType8",{enumerable:!0,get:function(){return _e.NotificationType8}});Object.defineProperty(F,"NotificationType9",{enumerable:!0,get:function(){return _e.NotificationType9}});Object.defineProperty(F,"ParameterStructures",{enumerable:!0,get:function(){return _e.ParameterStructures}});var Ac=Xl();Object.defineProperty(F,"LinkedMap",{enumerable:!0,get:function(){return Ac.LinkedMap}});Object.defineProperty(F,"LRUCache",{enumerable:!0,get:function(){return Ac.LRUCache}});Object.defineProperty(F,"Touch",{enumerable:!0,get:function(){return Ac.Touch}});var Ow=Lp();Object.defineProperty(F,"Disposable",{enumerable:!0,get:function(){return Ow.Disposable}});var eu=Ai();Object.defineProperty(F,"Event",{enumerable:!0,get:function(){return eu.Event}});Object.defineProperty(F,"Emitter",{enumerable:!0,get:function(){return eu.Emitter}});var tu=Ns();Object.defineProperty(F,"CancellationTokenSource",{enumerable:!0,get:function(){return tu.CancellationTokenSource}});Object.defineProperty(F,"CancellationToken",{enumerable:!0,get:function(){return tu.CancellationToken}});var nu=jp();Object.defineProperty(F,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return nu.SharedArraySenderStrategy}});Object.defineProperty(F,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return nu.SharedArrayReceiverStrategy}});var Ec=Up();Object.defineProperty(F,"MessageReader",{enumerable:!0,get:function(){return Ec.MessageReader}});Object.defineProperty(F,"AbstractMessageReader",{enumerable:!0,get:function(){return Ec.AbstractMessageReader}});Object.defineProperty(F,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Ec.ReadableStreamMessageReader}});var kc=Kp();Object.defineProperty(F,"MessageWriter",{enumerable:!0,get:function(){return kc.MessageWriter}});Object.defineProperty(F,"AbstractMessageWriter",{enumerable:!0,get:function(){return kc.AbstractMessageWriter}});Object.defineProperty(F,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return kc.WriteableStreamMessageWriter}});var Pw=Jp();Object.defineProperty(F,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Pw.AbstractMessageBuffer}});var Te=Zp();Object.defineProperty(F,"ConnectionStrategy",{enumerable:!0,get:function(){return Te.ConnectionStrategy}});Object.defineProperty(F,"ConnectionOptions",{enumerable:!0,get:function(){return Te.ConnectionOptions}});Object.defineProperty(F,"NullLogger",{enumerable:!0,get:function(){return Te.NullLogger}});Object.defineProperty(F,"createMessageConnection",{enumerable:!0,get:function(){return Te.createMessageConnection}});Object.defineProperty(F,"ProgressToken",{enumerable:!0,get:function(){return Te.ProgressToken}});Object.defineProperty(F,"ProgressType",{enumerable:!0,get:function(){return Te.ProgressType}});Object.defineProperty(F,"Trace",{enumerable:!0,get:function(){return Te.Trace}});Object.defineProperty(F,"TraceValue",{enumerable:!0,get:function(){return Te.TraceValue}});Object.defineProperty(F,"TraceFormat",{enumerable:!0,get:function(){return Te.TraceFormat}});Object.defineProperty(F,"SetTraceNotification",{enumerable:!0,get:function(){return Te.SetTraceNotification}});Object.defineProperty(F,"LogTraceNotification",{enumerable:!0,get:function(){return Te.LogTraceNotification}});Object.defineProperty(F,"ConnectionErrors",{enumerable:!0,get:function(){return Te.ConnectionErrors}});Object.defineProperty(F,"ConnectionError",{enumerable:!0,get:function(){return Te.ConnectionError}});Object.defineProperty(F,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Te.CancellationReceiverStrategy}});Object.defineProperty(F,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return Te.IdCancellationReceiverStrategy}});Object.defineProperty(F,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return Te.RequestCancellationReceiverStrategy}});Object.defineProperty(F,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Te.CancellationSenderStrategy}});Object.defineProperty(F,"CancellationStrategy",{enumerable:!0,get:function(){return Te.CancellationStrategy}});Object.defineProperty(F,"MessageStrategy",{enumerable:!0,get:function(){return Te.MessageStrategy}});Object.defineProperty(F,"TraceValues",{enumerable:!0,get:function(){return Te.TraceValues}});var Iw=Dw(Rn());F.RAL=Iw.default});var ua={};E0(ua,{AnnotatedTextEdit:()=>dn,ApplyKind:()=>qc,ChangeAnnotation:()=>On,ChangeAnnotationIdentifier:()=>qe,CodeAction:()=>Wi,CodeActionContext:()=>oa,CodeActionKind:()=>zn,CodeActionTag:()=>la,CodeActionTriggerKind:()=>Gr,CodeDescription:()=>Oc,CodeLens:()=>Hc,Color:()=>Br,ColorInformation:()=>Js,ColorPresentation:()=>Ys,Command:()=>Kt,CompletionItem:()=>ta,CompletionItemKind:()=>J,CompletionItemLabelDetails:()=>jc,CompletionItemTag:()=>Lt,CompletionList:()=>na,CreateFile:()=>Pi,DeleteFile:()=>Ti,Diagnostic:()=>Oi,DiagnosticRelatedInformation:()=>Zs,DiagnosticSeverity:()=>ai,DiagnosticTag:()=>Dc,DocumentHighlight:()=>ra,DocumentHighlightKind:()=>hn,DocumentLink:()=>ca,DocumentSymbol:()=>aa,DocumentUri:()=>Gs,EOL:()=>Tw,FoldingRange:()=>Qs,FoldingRangeKind:()=>Xs,FormattingOptions:()=>Gc,Hover:()=>ia,InlayHint:()=>td,InlayHintKind:()=>da,InlayHintLabelPart:()=>ha,InlineCompletionContext:()=>ad,InlineCompletionItem:()=>nd,InlineCompletionList:()=>id,InlineCompletionTriggerKind:()=>rd,InlineValueContext:()=>ed,InlineValueEvaluatableExpression:()=>Zc,InlineValueText:()=>Xc,InlineValueVariableLookup:()=>Qc,InsertReplaceEdit:()=>Wc,InsertTextFormat:()=>je,InsertTextMode:()=>Lc,LanguageKind:()=>zc,Location:()=>Pn,LocationLink:()=>Rc,MarkedString:()=>Ni,MarkupContent:()=>Tn,MarkupKind:()=>at,OptionalVersionedTextDocumentIdentifier:()=>Hr,ParameterInformation:()=>$c,Position:()=>Ee,Range:()=>ee,RenameFile:()=>Ii,SelectedCompletionInfo:()=>sd,SelectionRange:()=>oi,SemanticTokenModifiers:()=>Jc,SemanticTokenTypes:()=>Kc,SemanticTokens:()=>Yc,SignatureInformation:()=>Uc,SnippetTextEdit:()=>Pc,StringValue:()=>pa,SymbolInformation:()=>sa,SymbolKind:()=>_t,SymbolTag:()=>Bc,TextDocument:()=>ld,TextDocumentEdit:()=>In,TextDocumentIdentifier:()=>Tc,TextDocumentItem:()=>Nc,TextEdit:()=>V,URI:()=>Ks,VersionedTextDocumentIdentifier:()=>zi,WorkspaceChange:()=>Ic,WorkspaceEdit:()=>Vr,WorkspaceFolder:()=>od,WorkspaceSymbol:()=>Vc,integer:()=>Mc,uinteger:()=>Ur});var Gs,Ks,Mc,Ur,Ee,ee,Pn,Rc,Br,Js,Ys,Xs,Qs,Zs,ai,Dc,Oc,Oi,Kt,V,On,qe,dn,In,Pi,Ii,Ti,Vr,Di,Pc,ea,Ic,Tc,zi,Hr,zc,Nc,at,Tn,J,je,Lt,Wc,Lc,qc,jc,ta,na,Ni,ia,$c,Uc,hn,ra,_t,Bc,sa,Vc,aa,zn,Gr,oa,la,Wi,Hc,Gc,ca,oi,Kc,Jc,Yc,Xc,Qc,Zc,ed,da,ha,td,pa,nd,id,rd,sd,ad,od,Tw,ld,cd,v,Kr=Q(()=>{"use strict";(function(t){function e(n){return typeof n=="string"}t.is=e})(Gs||(Gs={}));(function(t){function e(n){return typeof n=="string"}t.is=e})(Ks||(Ks={}));(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})(Mc||(Mc={}));(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})(Ur||(Ur={}));(function(t){function e(i,r){return i===Number.MAX_VALUE&&(i=Ur.MAX_VALUE),r===Number.MAX_VALUE&&(r=Ur.MAX_VALUE),{line:i,character:r}}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&v.uinteger(r.line)&&v.uinteger(r.character)}t.is=n})(Ee||(Ee={}));(function(t){function e(i,r,s,a){if(v.uinteger(i)&&v.uinteger(r)&&v.uinteger(s)&&v.uinteger(a))return{start:Ee.create(i,r),end:Ee.create(s,a)};if(Ee.is(i)&&Ee.is(r))return{start:i,end:r};throw new Error(`Range#create called with invalid arguments[${i}, ${r}, ${s}, ${a}]`)}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&Ee.is(r.start)&&Ee.is(r.end)}t.is=n})(ee||(ee={}));(function(t){function e(i,r){return{uri:i,range:r}}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&ee.is(r.range)&&(v.string(r.uri)||v.undefined(r.uri))}t.is=n})(Pn||(Pn={}));(function(t){function e(i,r,s,a){return{targetUri:i,targetRange:r,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&ee.is(r.targetRange)&&v.string(r.targetUri)&&ee.is(r.targetSelectionRange)&&(ee.is(r.originSelectionRange)||v.undefined(r.originSelectionRange))}t.is=n})(Rc||(Rc={}));(function(t){function e(i,r,s,a){return{red:i,green:r,blue:s,alpha:a}}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&v.numberRange(r.red,0,1)&&v.numberRange(r.green,0,1)&&v.numberRange(r.blue,0,1)&&v.numberRange(r.alpha,0,1)}t.is=n})(Br||(Br={}));(function(t){function e(i,r){return{range:i,color:r}}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&ee.is(r.range)&&Br.is(r.color)}t.is=n})(Js||(Js={}));(function(t){function e(i,r,s){return{label:i,textEdit:r,additionalTextEdits:s}}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&v.string(r.label)&&(v.undefined(r.textEdit)||V.is(r))&&(v.undefined(r.additionalTextEdits)||v.typedArray(r.additionalTextEdits,V.is))}t.is=n})(Ys||(Ys={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Xs||(Xs={}));(function(t){function e(i,r,s,a,o,l){let c={startLine:i,endLine:r};return v.defined(s)&&(c.startCharacter=s),v.defined(a)&&(c.endCharacter=a),v.defined(o)&&(c.kind=o),v.defined(l)&&(c.collapsedText=l),c}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&v.uinteger(r.startLine)&&v.uinteger(r.startLine)&&(v.undefined(r.startCharacter)||v.uinteger(r.startCharacter))&&(v.undefined(r.endCharacter)||v.uinteger(r.endCharacter))&&(v.undefined(r.kind)||v.string(r.kind))}t.is=n})(Qs||(Qs={}));(function(t){function e(i,r){return{location:i,message:r}}t.create=e;function n(i){let r=i;return v.defined(r)&&Pn.is(r.location)&&v.string(r.message)}t.is=n})(Zs||(Zs={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(ai||(ai={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(Dc||(Dc={}));(function(t){function e(n){let i=n;return v.objectLiteral(i)&&v.string(i.href)}t.is=e})(Oc||(Oc={}));(function(t){function e(i,r,s,a,o,l){let c={range:i,message:r};return v.defined(s)&&(c.severity=s),v.defined(a)&&(c.code=a),v.defined(o)&&(c.source=o),v.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(i){var r;let s=i;return v.defined(s)&&ee.is(s.range)&&(v.string(s.message)||Tn.is(s.message))&&(v.number(s.severity)||v.undefined(s.severity))&&(v.integer(s.code)||v.string(s.code)||v.undefined(s.code))&&(v.undefined(s.codeDescription)||v.string((r=s.codeDescription)===null||r===void 0?void 0:r.href))&&(v.string(s.source)||v.undefined(s.source))&&(v.undefined(s.relatedInformation)||v.typedArray(s.relatedInformation,Zs.is))}t.is=n})(Oi||(Oi={}));(function(t){function e(i,r,...s){let a={title:i,command:r};return v.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(i){let r=i;return v.defined(r)&&v.string(r.title)&&(r.tooltip===void 0||v.string(r.tooltip))&&v.string(r.command)}t.is=n})(Kt||(Kt={}));(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function i(s){return{range:s,newText:""}}t.del=i;function r(s){let a=s;return v.objectLiteral(a)&&v.string(a.newText)&&ee.is(a.range)}t.is=r})(V||(V={}));(function(t){function e(i,r,s){let a={label:i};return r!==void 0&&(a.needsConfirmation=r),s!==void 0&&(a.description=s),a}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&v.string(r.label)&&(v.boolean(r.needsConfirmation)||r.needsConfirmation===void 0)&&(v.string(r.description)||r.description===void 0)}t.is=n})(On||(On={}));(function(t){function e(n){let i=n;return v.string(i)}t.is=e})(qe||(qe={}));(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function i(s,a){return{range:s,newText:"",annotationId:a}}t.del=i;function r(s){let a=s;return V.is(a)&&(On.is(a.annotationId)||qe.is(a.annotationId))}t.is=r})(dn||(dn={}));(function(t){function e(i,r){return{textDocument:i,edits:r}}t.create=e;function n(i){let r=i;return v.defined(r)&&Hr.is(r.textDocument)&&Array.isArray(r.edits)}t.is=n})(In||(In={}));(function(t){function e(i,r,s){let a={kind:"create",uri:i};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(a.options=r),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(i){let r=i;return r&&r.kind==="create"&&v.string(r.uri)&&(r.options===void 0||(r.options.overwrite===void 0||v.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||v.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||qe.is(r.annotationId))}t.is=n})(Pi||(Pi={}));(function(t){function e(i,r,s,a){let o={kind:"rename",oldUri:i,newUri:r};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(i){let r=i;return r&&r.kind==="rename"&&v.string(r.oldUri)&&v.string(r.newUri)&&(r.options===void 0||(r.options.overwrite===void 0||v.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||v.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||qe.is(r.annotationId))}t.is=n})(Ii||(Ii={}));(function(t){function e(i,r,s){let a={kind:"delete",uri:i};return r!==void 0&&(r.recursive!==void 0||r.ignoreIfNotExists!==void 0)&&(a.options=r),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(i){let r=i;return r&&r.kind==="delete"&&v.string(r.uri)&&(r.options===void 0||(r.options.recursive===void 0||v.boolean(r.options.recursive))&&(r.options.ignoreIfNotExists===void 0||v.boolean(r.options.ignoreIfNotExists)))&&(r.annotationId===void 0||qe.is(r.annotationId))}t.is=n})(Ti||(Ti={}));(function(t){function e(n){let i=n;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(r=>v.string(r.kind)?Pi.is(r)||Ii.is(r)||Ti.is(r):In.is(r)))}t.is=e})(Vr||(Vr={}));Di=class{constructor(e,n){this.edits=e,this.changeAnnotations=n}insert(e,n,i){let r,s;if(i===void 0?r=V.insert(e,n):qe.is(i)?(s=i,r=dn.insert(e,n,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),r=dn.insert(e,n,s)),this.edits.push(r),s!==void 0)return s}replace(e,n,i){let r,s;if(i===void 0?r=V.replace(e,n):qe.is(i)?(s=i,r=dn.replace(e,n,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),r=dn.replace(e,n,s)),this.edits.push(r),s!==void 0)return s}delete(e,n){let i,r;if(n===void 0?i=V.del(e):qe.is(n)?(r=n,i=dn.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=dn.del(e,r)),this.edits.push(i),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(t){function e(n){let i=n;return v.objectLiteral(i)&&ee.is(i.range)&&pa.isSnippet(i.snippet)&&(i.annotationId===void 0||On.is(i.annotationId)||qe.is(i.annotationId))}t.is=e})(Pc||(Pc={}));ea=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,n){let i;if(qe.is(e)?i=e:(i=this.nextId(),n=e),this._annotations[i]!==void 0)throw new Error(`Id ${i} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${i}`);return this._annotations[i]=n,this._size++,i}nextId(){return this._counter++,this._counter.toString()}},Ic=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new ea(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(n=>{if(In.is(n)){let i=new Di(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=i}})):e.changes&&Object.keys(e.changes).forEach(n=>{let i=new Di(e.changes[n]);this._textEditChanges[n]=i})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hr.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:e.uri,version:e.version},i=this._textEditChanges[n.uri];if(!i){let r=[],s={textDocument:n,edits:r};this._workspaceEdit.documentChanges.push(s),i=new Di(r,this._changeAnnotations),this._textEditChanges[n.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[e];if(!n){let i=[];this._workspaceEdit.changes[e]=i,n=new Di(i),this._textEditChanges[e]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ea,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let r;On.is(n)||qe.is(n)?r=n:i=n;let s,a;if(r===void 0?s=Pi.create(e,i):(a=qe.is(r)?r:this._changeAnnotations.manage(r),s=Pi.create(e,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}renameFile(e,n,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;On.is(i)||qe.is(i)?s=i:r=i;let a,o;if(s===void 0?a=Ii.create(e,n,r):(o=qe.is(s)?s:this._changeAnnotations.manage(s),a=Ii.create(e,n,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let r;On.is(n)||qe.is(n)?r=n:i=n;let s,a;if(r===void 0?s=Ti.create(e,i):(a=qe.is(r)?r:this._changeAnnotations.manage(r),s=Ti.create(e,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}};(function(t){function e(i){return{uri:i}}t.create=e;function n(i){let r=i;return v.defined(r)&&v.string(r.uri)}t.is=n})(Tc||(Tc={}));(function(t){function e(i,r){return{uri:i,version:r}}t.create=e;function n(i){let r=i;return v.defined(r)&&v.string(r.uri)&&v.integer(r.version)}t.is=n})(zi||(zi={}));(function(t){function e(i,r){return{uri:i,version:r}}t.create=e;function n(i){let r=i;return v.defined(r)&&v.string(r.uri)&&(r.version===null||v.integer(r.version))}t.is=n})(Hr||(Hr={}));(function(t){t.ABAP="abap",t.WindowsBat="bat",t.BibTeX="bibtex",t.Clojure="clojure",t.Coffeescript="coffeescript",t.C="c",t.CPP="cpp",t.CSharp="csharp",t.CSS="css",t.D="d",t.Delphi="pascal",t.Diff="diff",t.Dart="dart",t.Dockerfile="dockerfile",t.Elixir="elixir",t.Erlang="erlang",t.FSharp="fsharp",t.GitCommit="git-commit",t.GitRebase="git-rebase",t.Go="go",t.Groovy="groovy",t.Handlebars="handlebars",t.Haskell="haskell",t.HTML="html",t.Ini="ini",t.Java="java",t.JavaScript="javascript",t.JavaScriptReact="javascriptreact",t.JSON="json",t.LaTeX="latex",t.Less="less",t.Lua="lua",t.Makefile="makefile",t.Markdown="markdown",t.ObjectiveC="objective-c",t.ObjectiveCPP="objective-cpp",t.Pascal="pascal",t.Perl="perl",t.Perl6="perl6",t.PHP="php",t.Plaintext="plaintext",t.Powershell="powershell",t.Pug="jade",t.Python="python",t.R="r",t.Razor="razor",t.Ruby="ruby",t.Rust="rust",t.SCSS="scss",t.SASS="sass",t.Scala="scala",t.ShaderLab="shaderlab",t.ShellScript="shellscript",t.SQL="sql",t.Swift="swift",t.TypeScript="typescript",t.TypeScriptReact="typescriptreact",t.TeX="tex",t.VisualBasic="vb",t.XML="xml",t.XSL="xsl",t.YAML="yaml"})(zc||(zc={}));(function(t){function e(i,r,s,a){return{uri:i,languageId:r,version:s,text:a}}t.create=e;function n(i){let r=i;return v.defined(r)&&v.string(r.uri)&&v.string(r.languageId)&&v.integer(r.version)&&v.string(r.text)}t.is=n})(Nc||(Nc={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){let i=n;return i===t.PlainText||i===t.Markdown}t.is=e})(at||(at={}));(function(t){function e(n){let i=n;return v.objectLiteral(n)&&at.is(i.kind)&&v.string(i.value)}t.is=e})(Tn||(Tn={}));(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})(J||(J={}));(function(t){t.PlainText=1,t.Snippet=2})(je||(je={}));(function(t){t.Deprecated=1})(Lt||(Lt={}));(function(t){function e(i,r,s){return{newText:i,insert:r,replace:s}}t.create=e;function n(i){let r=i;return r&&v.string(r.newText)&&ee.is(r.insert)&&ee.is(r.replace)}t.is=n})(Wc||(Wc={}));(function(t){t.asIs=1,t.adjustIndentation=2})(Lc||(Lc={}));(function(t){t.Replace=1,t.Merge=2})(qc||(qc={}));(function(t){function e(n){let i=n;return i&&(v.string(i.detail)||i.detail===void 0)&&(v.string(i.description)||i.description===void 0)}t.is=e})(jc||(jc={}));(function(t){function e(n){return{label:n}}t.create=e})(ta||(ta={}));(function(t){function e(n,i){return{items:n||[],isIncomplete:!!i}}t.create=e})(na||(na={}));(function(t){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(i){let r=i;return v.string(r)||v.objectLiteral(r)&&v.string(r.language)&&v.string(r.value)}t.is=n})(Ni||(Ni={}));(function(t){function e(n){let i=n;return!!i&&v.objectLiteral(i)&&(Tn.is(i.contents)||Ni.is(i.contents)||v.typedArray(i.contents,Ni.is))&&(n.range===void 0||ee.is(n.range))}t.is=e})(ia||(ia={}));(function(t){function e(n,i){return i?{label:n,documentation:i}:{label:n}}t.create=e})($c||($c={}));(function(t){function e(n,i,...r){let s={label:n};return v.defined(i)&&(s.documentation=i),v.defined(r)?s.parameters=r:s.parameters=[],s}t.create=e})(Uc||(Uc={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(hn||(hn={}));(function(t){function e(n,i){let r={range:n};return v.number(i)&&(r.kind=i),r}t.create=e})(ra||(ra={}));(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})(_t||(_t={}));(function(t){t.Deprecated=1})(Bc||(Bc={}));(function(t){function e(n,i,r,s,a){let o={name:n,kind:i,location:{uri:s,range:r}};return a&&(o.containerName=a),o}t.create=e})(sa||(sa={}));(function(t){function e(n,i,r,s){return s!==void 0?{name:n,kind:i,location:{uri:r,range:s}}:{name:n,kind:i,location:{uri:r}}}t.create=e})(Vc||(Vc={}));(function(t){function e(i,r,s,a,o,l){let c={name:i,detail:r,kind:s,range:a,selectionRange:o};return l!==void 0&&(c.children=l),c}t.create=e;function n(i){let r=i;return r&&v.string(r.name)&&v.number(r.kind)&&ee.is(r.range)&&ee.is(r.selectionRange)&&(r.detail===void 0||v.string(r.detail))&&(r.deprecated===void 0||v.boolean(r.deprecated))&&(r.children===void 0||Array.isArray(r.children))&&(r.tags===void 0||Array.isArray(r.tags))}t.is=n})(aa||(aa={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorMove="refactor.move",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll",t.Notebook="notebook"})(zn||(zn={}));(function(t){t.Invoked=1,t.Automatic=2})(Gr||(Gr={}));(function(t){function e(i,r,s){let a={diagnostics:i};return r!=null&&(a.only=r),s!=null&&(a.triggerKind=s),a}t.create=e;function n(i){let r=i;return v.defined(r)&&v.typedArray(r.diagnostics,Oi.is)&&(r.only===void 0||v.typedArray(r.only,v.string))&&(r.triggerKind===void 0||r.triggerKind===Gr.Invoked||r.triggerKind===Gr.Automatic)}t.is=n})(oa||(oa={}));(function(t){t.LLMGenerated=1;function e(n){return v.defined(n)&&n===t.LLMGenerated}t.is=e})(la||(la={}));(function(t){function e(i,r,s){let a={title:i},o=!0;return typeof r=="string"?(o=!1,a.kind=r):Kt.is(r)?a.command=r:a.edit=r,o&&s!==void 0&&(a.kind=s),a}t.create=e;function n(i){let r=i;return r&&v.string(r.title)&&(r.diagnostics===void 0||v.typedArray(r.diagnostics,Oi.is))&&(r.kind===void 0||v.string(r.kind))&&(r.edit!==void 0||r.command!==void 0)&&(r.command===void 0||Kt.is(r.command))&&(r.isPreferred===void 0||v.boolean(r.isPreferred))&&(r.edit===void 0||Vr.is(r.edit))&&(r.tags===void 0||v.typedArray(r.tags,la.is))}t.is=n})(Wi||(Wi={}));(function(t){function e(i,r){let s={range:i};return v.defined(r)&&(s.data=r),s}t.create=e;function n(i){let r=i;return v.defined(r)&&ee.is(r.range)&&(v.undefined(r.command)||Kt.is(r.command))}t.is=n})(Hc||(Hc={}));(function(t){function e(i,r){return{tabSize:i,insertSpaces:r}}t.create=e;function n(i){let r=i;return v.defined(r)&&v.uinteger(r.tabSize)&&v.boolean(r.insertSpaces)}t.is=n})(Gc||(Gc={}));(function(t){function e(i,r,s){return{range:i,target:r,data:s}}t.create=e;function n(i){let r=i;return v.defined(r)&&ee.is(r.range)&&(v.undefined(r.target)||v.string(r.target))}t.is=n})(ca||(ca={}));(function(t){function e(i,r){return{range:i,parent:r}}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&ee.is(r.range)&&(r.parent===void 0||t.is(r.parent))}t.is=n})(oi||(oi={}));(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",t.label="label"})(Kc||(Kc={}));(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"})(Jc||(Jc={}));(function(t){function e(n){let i=n;return v.objectLiteral(i)&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}t.is=e})(Yc||(Yc={}));(function(t){function e(i,r){return{range:i,text:r}}t.create=e;function n(i){let r=i;return r!=null&&ee.is(r.range)&&v.string(r.text)}t.is=n})(Xc||(Xc={}));(function(t){function e(i,r,s){return{range:i,variableName:r,caseSensitiveLookup:s}}t.create=e;function n(i){let r=i;return r!=null&&ee.is(r.range)&&v.boolean(r.caseSensitiveLookup)&&(v.string(r.variableName)||r.variableName===void 0)}t.is=n})(Qc||(Qc={}));(function(t){function e(i,r){return{range:i,expression:r}}t.create=e;function n(i){let r=i;return r!=null&&ee.is(r.range)&&(v.string(r.expression)||r.expression===void 0)}t.is=n})(Zc||(Zc={}));(function(t){function e(i,r){return{frameId:i,stoppedLocation:r}}t.create=e;function n(i){let r=i;return v.defined(r)&&ee.is(i.stoppedLocation)}t.is=n})(ed||(ed={}));(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(da||(da={}));(function(t){function e(i){return{value:i}}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&(r.tooltip===void 0||v.string(r.tooltip)||Tn.is(r.tooltip))&&(r.location===void 0||Pn.is(r.location))&&(r.command===void 0||Kt.is(r.command))}t.is=n})(ha||(ha={}));(function(t){function e(i,r,s){let a={position:i,label:r};return s!==void 0&&(a.kind=s),a}t.create=e;function n(i){let r=i;return v.objectLiteral(r)&&Ee.is(r.position)&&(v.string(r.label)||v.typedArray(r.label,ha.is))&&(r.kind===void 0||da.is(r.kind))&&r.textEdits===void 0||v.typedArray(r.textEdits,V.is)&&(r.tooltip===void 0||v.string(r.tooltip)||Tn.is(r.tooltip))&&(r.paddingLeft===void 0||v.boolean(r.paddingLeft))&&(r.paddingRight===void 0||v.boolean(r.paddingRight))}t.is=n})(td||(td={}));(function(t){function e(i){return{kind:"snippet",value:i}}t.createSnippet=e;function n(i){let r=i;return v.objectLiteral(r)&&r.kind==="snippet"&&v.string(r.value)}t.isSnippet=n})(pa||(pa={}));(function(t){function e(n,i,r,s){return{insertText:n,filterText:i,range:r,command:s}}t.create=e})(nd||(nd={}));(function(t){function e(n){return{items:n}}t.create=e})(id||(id={}));(function(t){t.Invoked=1,t.Automatic=2})(rd||(rd={}));(function(t){function e(n,i){return{range:n,text:i}}t.create=e})(sd||(sd={}));(function(t){function e(n,i){return{triggerKind:n,selectedCompletionInfo:i}}t.create=e})(ad||(ad={}));(function(t){function e(n){let i=n;return v.objectLiteral(i)&&Ks.is(i.uri)&&v.string(i.name)}t.is=e})(od||(od={}));Tw=[` +`,`\r +`,"\r"];(function(t){function e(s,a,o,l){return new cd(s,a,o,l)}t.create=e;function n(s){let a=s;return!!(v.defined(a)&&v.string(a.uri)&&(v.undefined(a.languageId)||v.string(a.languageId))&&v.uinteger(a.lineCount)&&v.func(a.getText)&&v.func(a.positionAt)&&v.func(a.offsetAt))}t.is=n;function i(s,a){let o=s.getText(),l=r(a,(h,m)=>{let w=h.range.start.line-m.range.start.line;return w===0?h.range.start.character-m.range.start.character:w}),c=o.length;for(let h=l.length-1;h>=0;h--){let m=l[h],w=s.offsetAt(m.range.start),S=s.offsetAt(m.range.end);if(S<=c)o=o.substring(0,w)+m.newText+o.substring(S,o.length);else throw new Error("Overlapping edit");c=w}return o}t.applyEdits=i;function r(s,a){if(s.length<=1)return s;let o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);r(l,a),r(c,a);let h=0,m=0,w=0;for(;h0&&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(),i=0,r=n.length;if(r===0)return Ee.create(0,e);for(;ie?r=a:i=a+1}let s=i-1;return Ee.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 i=n[e.line],r=e.line+1"u"}t.undefined=i;function r(S){return S===!0||S===!1}t.boolean=r;function s(S){return e.call(S)==="[object String]"}t.string=s;function a(S){return e.call(S)==="[object Number]"}t.number=a;function o(S,P,H){return e.call(S)==="[object Number]"&&P<=S&&S<=H}t.numberRange=o;function l(S){return e.call(S)==="[object Number]"&&-2147483648<=S&&S<=2147483647}t.integer=l;function c(S){return e.call(S)==="[object Number]"&&0<=S&&S<=2147483647}t.uinteger=c;function h(S){return e.call(S)==="[object Function]"}t.func=h;function m(S){return S!==null&&typeof S=="object"}t.objectLiteral=m;function w(S,P){return Array.isArray(S)&&S.every(P)}t.typedArray=w})(v||(v={}))});var ve=$(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.CM=it.ProtocolNotificationType=it.ProtocolNotificationType0=it.ProtocolRequestType=it.ProtocolRequestType0=it.RegistrationType=it.MessageDirection=void 0;var Li=cn(),iu;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(iu||(it.MessageDirection=iu={}));var dd=class{____;method;constructor(e){this.method=e}};it.RegistrationType=dd;var hd=class extends Li.RequestType0{__;___;____;_pr;constructor(e){super(e)}};it.ProtocolRequestType0=hd;var pd=class extends Li.RequestType{__;___;____;_pr;constructor(e){super(e,Li.ParameterStructures.byName)}};it.ProtocolRequestType=pd;var ud=class extends Li.NotificationType0{___;____;constructor(e){super(e)}};it.ProtocolNotificationType0=ud;var md=class extends Li.NotificationType{___;____;constructor(e){super(e,Li.ParameterStructures.byName)}};it.ProtocolNotificationType=md;var ru;(function(t){function e(n,i){return{client:n,server:i}}t.create=e})(ru||(it.CM=ru={}))});var ma=$(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.boolean=zw;qt.string=su;qt.number=Nw;qt.error=Ww;qt.func=Lw;qt.array=au;qt.stringArray=qw;qt.typedArray=jw;qt.objectLiteral=$w;function zw(t){return t===!0||t===!1}function su(t){return typeof t=="string"||t instanceof String}function Nw(t){return typeof t=="number"||t instanceof Number}function Ww(t){return t instanceof Error}function Lw(t){return typeof t=="function"}function au(t){return Array.isArray(t)}function qw(t){return au(t)&&t.every(e=>su(e))}function jw(t,e){return Array.isArray(t)&&t.every(e)}function $w(t){return t!==null&&typeof t=="object"}});var lu=$(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.ImplementationRequest=void 0;var fd=ve(),ou;(function(t){t.method="textDocument/implementation",t.messageDirection=fd.MessageDirection.clientToServer,t.type=new fd.ProtocolRequestType(t.method),t.capabilities=fd.CM.create("textDocument.implementation","implementationProvider")})(ou||(fa.ImplementationRequest=ou={}))});var du=$(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.TypeDefinitionRequest=void 0;var bd=ve(),cu;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=bd.MessageDirection.clientToServer,t.type=new bd.ProtocolRequestType(t.method),t.capabilities=bd.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(cu||(ba.TypeDefinitionRequest=cu={}))});var uu=$(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.DidChangeWorkspaceFoldersNotification=ji.WorkspaceFoldersRequest=void 0;var qi=ve(),hu;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=qi.MessageDirection.serverToClient,t.type=new qi.ProtocolRequestType0(t.method),t.capabilities=qi.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(hu||(ji.WorkspaceFoldersRequest=hu={}));var pu;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=qi.MessageDirection.clientToServer,t.type=new qi.ProtocolNotificationType(t.method),t.capabilities=qi.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(pu||(ji.DidChangeWorkspaceFoldersNotification=pu={}))});var fu=$(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.ConfigurationRequest=void 0;var gd=ve(),mu;(function(t){t.method="workspace/configuration",t.messageDirection=gd.MessageDirection.serverToClient,t.type=new gd.ProtocolRequestType(t.method),t.capabilities=gd.CM.create("workspace.configuration",void 0)})(mu||(ga.ConfigurationRequest=mu={}))});var wu=$(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.ColorPresentationRequest=Ui.DocumentColorRequest=void 0;var $i=ve(),bu;(function(t){t.method="textDocument/documentColor",t.messageDirection=$i.MessageDirection.clientToServer,t.type=new $i.ProtocolRequestType(t.method),t.capabilities=$i.CM.create("textDocument.colorProvider","colorProvider")})(bu||(Ui.DocumentColorRequest=bu={}));var gu;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=$i.MessageDirection.clientToServer,t.type=new $i.ProtocolRequestType(t.method),t.capabilities=$i.CM.create("textDocument.colorProvider","colorProvider")})(gu||(Ui.ColorPresentationRequest=gu={}))});var yu=$(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.FoldingRangeRefreshRequest=Vi.FoldingRangeRequest=void 0;var Bi=ve(),_u;(function(t){t.method="textDocument/foldingRange",t.messageDirection=Bi.MessageDirection.clientToServer,t.type=new Bi.ProtocolRequestType(t.method),t.capabilities=Bi.CM.create("textDocument.foldingRange","foldingRangeProvider")})(_u||(Vi.FoldingRangeRequest=_u={}));var Su;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=Bi.MessageDirection.serverToClient,t.type=new Bi.ProtocolRequestType0(t.method),t.capabilities=Bi.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Su||(Vi.FoldingRangeRefreshRequest=Su={}))});var Fu=$(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.DeclarationRequest=void 0;var wd=ve(),vu;(function(t){t.method="textDocument/declaration",t.messageDirection=wd.MessageDirection.clientToServer,t.type=new wd.ProtocolRequestType(t.method),t.capabilities=wd.CM.create("textDocument.declaration","declarationProvider")})(vu||(wa.DeclarationRequest=vu={}))});var xu=$(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.SelectionRangeRequest=void 0;var _d=ve(),Cu;(function(t){t.method="textDocument/selectionRange",t.messageDirection=_d.MessageDirection.clientToServer,t.type=new _d.ProtocolRequestType(t.method),t.capabilities=_d.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Cu||(_a.SelectionRangeRequest=Cu={}))});var Mu=$(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.WorkDoneProgressCancelNotification=Nn.WorkDoneProgressCreateRequest=Nn.WorkDoneProgress=void 0;var Uw=cn(),Jr=ve(),Au;(function(t){t.type=new Uw.ProgressType;function e(n){return n===t.type}t.is=e})(Au||(Nn.WorkDoneProgress=Au={}));var Eu;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=Jr.MessageDirection.serverToClient,t.type=new Jr.ProtocolRequestType(t.method),t.capabilities=Jr.CM.create("window.workDoneProgress",void 0)})(Eu||(Nn.WorkDoneProgressCreateRequest=Eu={}));var ku;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=Jr.MessageDirection.clientToServer,t.type=new Jr.ProtocolNotificationType(t.method)})(ku||(Nn.WorkDoneProgressCancelNotification=ku={}))});var Pu=$(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.CallHierarchyOutgoingCallsRequest=Wn.CallHierarchyIncomingCallsRequest=Wn.CallHierarchyPrepareRequest=void 0;var pn=ve(),Ru;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=pn.MessageDirection.clientToServer,t.type=new pn.ProtocolRequestType(t.method),t.capabilities=pn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ru||(Wn.CallHierarchyPrepareRequest=Ru={}));var Du;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=pn.MessageDirection.clientToServer,t.type=new pn.ProtocolRequestType(t.method),t.capabilities=pn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Du||(Wn.CallHierarchyIncomingCallsRequest=Du={}));var Ou;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=pn.MessageDirection.clientToServer,t.type=new pn.ProtocolRequestType(t.method),t.capabilities=pn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ou||(Wn.CallHierarchyOutgoingCallsRequest=Ou={}))});var Lu=$(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.SemanticTokensRefreshRequest=ut.SemanticTokensRangeRequest=ut.SemanticTokensDeltaRequest=ut.SemanticTokensRequest=ut.SemanticTokensRegistrationType=ut.TokenFormat=void 0;var St=ve(),Iu;(function(t){t.Relative="relative"})(Iu||(ut.TokenFormat=Iu={}));var Yr;(function(t){t.method="textDocument/semanticTokens",t.type=new St.RegistrationType(t.method)})(Yr||(ut.SemanticTokensRegistrationType=Yr={}));var Tu;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=St.MessageDirection.clientToServer,t.type=new St.ProtocolRequestType(t.method),t.registrationMethod=Yr.method,t.capabilities=St.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Tu||(ut.SemanticTokensRequest=Tu={}));var zu;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=St.MessageDirection.clientToServer,t.type=new St.ProtocolRequestType(t.method),t.registrationMethod=Yr.method,t.capabilities=St.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(zu||(ut.SemanticTokensDeltaRequest=zu={}));var Nu;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=St.MessageDirection.clientToServer,t.type=new St.ProtocolRequestType(t.method),t.registrationMethod=Yr.method,t.capabilities=St.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Nu||(ut.SemanticTokensRangeRequest=Nu={}));var Wu;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=St.MessageDirection.serverToClient,t.type=new St.ProtocolRequestType0(t.method),t.capabilities=St.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Wu||(ut.SemanticTokensRefreshRequest=Wu={}))});var ju=$(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.ShowDocumentRequest=void 0;var Sd=ve(),qu;(function(t){t.method="window/showDocument",t.messageDirection=Sd.MessageDirection.serverToClient,t.type=new Sd.ProtocolRequestType(t.method),t.capabilities=Sd.CM.create("window.showDocument.support",void 0)})(qu||(Sa.ShowDocumentRequest=qu={}))});var Uu=$(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.LinkedEditingRangeRequest=void 0;var yd=ve(),$u;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=yd.MessageDirection.clientToServer,t.type=new yd.ProtocolRequestType(t.method),t.capabilities=yd.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})($u||(ya.LinkedEditingRangeRequest=$u={}))});var Xu=$(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.WillDeleteFilesRequest=rt.DidDeleteFilesNotification=rt.DidRenameFilesNotification=rt.WillRenameFilesRequest=rt.DidCreateFilesNotification=rt.WillCreateFilesRequest=rt.FileOperationPatternKind=void 0;var $e=ve(),Bu;(function(t){t.file="file",t.folder="folder"})(Bu||(rt.FileOperationPatternKind=Bu={}));var Vu;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=$e.MessageDirection.clientToServer,t.type=new $e.ProtocolRequestType(t.method),t.capabilities=$e.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(Vu||(rt.WillCreateFilesRequest=Vu={}));var Hu;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=$e.MessageDirection.clientToServer,t.type=new $e.ProtocolNotificationType(t.method),t.capabilities=$e.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Hu||(rt.DidCreateFilesNotification=Hu={}));var Gu;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=$e.MessageDirection.clientToServer,t.type=new $e.ProtocolRequestType(t.method),t.capabilities=$e.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Gu||(rt.WillRenameFilesRequest=Gu={}));var Ku;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=$e.MessageDirection.clientToServer,t.type=new $e.ProtocolNotificationType(t.method),t.capabilities=$e.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Ku||(rt.DidRenameFilesNotification=Ku={}));var Ju;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=$e.MessageDirection.clientToServer,t.type=new $e.ProtocolNotificationType(t.method),t.capabilities=$e.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Ju||(rt.DidDeleteFilesNotification=Ju={}));var Yu;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=$e.MessageDirection.clientToServer,t.type=new $e.ProtocolRequestType(t.method),t.capabilities=$e.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Yu||(rt.WillDeleteFilesRequest=Yu={}))});var tm=$(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.MonikerRequest=Ln.MonikerKind=Ln.UniquenessLevel=void 0;var vd=ve(),Qu;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(Qu||(Ln.UniquenessLevel=Qu={}));var Zu;(function(t){t.$import="import",t.$export="export",t.local="local"})(Zu||(Ln.MonikerKind=Zu={}));var em;(function(t){t.method="textDocument/moniker",t.messageDirection=vd.MessageDirection.clientToServer,t.type=new vd.ProtocolRequestType(t.method),t.capabilities=vd.CM.create("textDocument.moniker","monikerProvider")})(em||(Ln.MonikerRequest=em={}))});var sm=$(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.TypeHierarchySubtypesRequest=qn.TypeHierarchySupertypesRequest=qn.TypeHierarchyPrepareRequest=void 0;var li=ve(),nm;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=li.MessageDirection.clientToServer,t.type=new li.ProtocolRequestType(t.method),t.capabilities=li.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(nm||(qn.TypeHierarchyPrepareRequest=nm={}));var im;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=li.MessageDirection.clientToServer,t.type=new li.ProtocolRequestType(t.method)})(im||(qn.TypeHierarchySupertypesRequest=im={}));var rm;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=li.MessageDirection.clientToServer,t.type=new li.ProtocolRequestType(t.method)})(rm||(qn.TypeHierarchySubtypesRequest=rm={}))});var lm=$(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.InlineValueRefreshRequest=Gi.InlineValueRequest=void 0;var Hi=ve(),am;(function(t){t.method="textDocument/inlineValue",t.messageDirection=Hi.MessageDirection.clientToServer,t.type=new Hi.ProtocolRequestType(t.method),t.capabilities=Hi.CM.create("textDocument.inlineValue","inlineValueProvider")})(am||(Gi.InlineValueRequest=am={}));var om;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=Hi.MessageDirection.serverToClient,t.type=new Hi.ProtocolRequestType0(t.method),t.capabilities=Hi.CM.create("workspace.inlineValue.refreshSupport",void 0)})(om||(Gi.InlineValueRefreshRequest=om={}))});var pm=$(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.InlayHintRefreshRequest=jn.InlayHintResolveRequest=jn.InlayHintRequest=void 0;var un=ve(),cm;(function(t){t.method="textDocument/inlayHint",t.messageDirection=un.MessageDirection.clientToServer,t.type=new un.ProtocolRequestType(t.method),t.capabilities=un.CM.create("textDocument.inlayHint","inlayHintProvider")})(cm||(jn.InlayHintRequest=cm={}));var dm;(function(t){t.method="inlayHint/resolve",t.messageDirection=un.MessageDirection.clientToServer,t.type=new un.ProtocolRequestType(t.method),t.capabilities=un.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(dm||(jn.InlayHintResolveRequest=dm={}));var hm;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=un.MessageDirection.serverToClient,t.type=new un.ProtocolRequestType0(t.method),t.capabilities=un.CM.create("workspace.inlayHint.refreshSupport",void 0)})(hm||(jn.InlayHintRefreshRequest=hm={}))});var _m=$(Ue=>{"use strict";var Bw=Ue&&Ue.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Vw=Ue&&Ue.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hw=Ue&&Ue.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{"use strict";var Kw=ge&&ge.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Jw=ge&&ge.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Yw=ge&&ge.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.InlineCompletionRequest=void 0;var xd=ve(),Em;(function(t){t.method="textDocument/inlineCompletion",t.messageDirection=xd.MessageDirection.clientToServer,t.type=new xd.ProtocolRequestType(t.method),t.capabilities=xd.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Em||(Fa.InlineCompletionRequest=Em={}))});var Dm=$(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.TextDocumentContentRefreshRequest=Ji.TextDocumentContentRequest=void 0;var Qr=ve(),Mm;(function(t){t.method="workspace/textDocumentContent",t.messageDirection=Qr.MessageDirection.clientToServer,t.type=new Qr.ProtocolRequestType(t.method),t.capabilities=Qr.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Mm||(Ji.TextDocumentContentRequest=Mm={}));var Rm;(function(t){t.method="workspace/textDocumentContent/refresh",t.messageDirection=Qr.MessageDirection.serverToClient,t.type=new Qr.ProtocolRequestType(t.method)})(Rm||(Ji.TextDocumentContentRefreshRequest=Rm={}))});var Hf=$(p=>{"use strict";var Xw=p&&p.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Qw=p&&p.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Zw=p&&p.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r0}t.hasId=e})(Lm||(p.StaticRegistrationOptions=Lm={}));var qm;(function(t){function e(n){let i=n;return i&&(i.documentSelector===null||Md.is(i.documentSelector))}t.is=e})(qm||(p.TextDocumentRegistrationOptions=qm={}));var jm;(function(t){function e(i){let r=i;return Be.objectLiteral(r)&&(r.workDoneProgress===void 0||Be.boolean(r.workDoneProgress))}t.is=e;function n(i){let r=i;return r&&Be.boolean(r.workDoneProgress)}t.hasWorkDoneProgress=n})(jm||(p.WorkDoneProgressOptions=jm={}));var $m;(function(t){t.method="initialize",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method)})($m||(p.InitializeRequest=$m={}));var Um;(function(t){t.unknownProtocolVersion=1})(Um||(p.InitializeErrorCodes=Um={}));var Bm;(function(t){t.method="initialized",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType(t.method)})(Bm||(p.InitializedNotification=Bm={}));var Vm;(function(t){t.method="shutdown",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType0(t.method)})(Vm||(p.ShutdownRequest=Vm={}));var Hm;(function(t){t.method="exit",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType0(t.method)})(Hm||(p.ExitNotification=Hm={}));var Gm;(function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("workspace.didChangeConfiguration",void 0)})(Gm||(p.DidChangeConfigurationNotification=Gm={}));var Km;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(Km||(p.MessageType=Km={}));var Jm;(function(t){t.method="window/showMessage",t.messageDirection=A.MessageDirection.serverToClient,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("window.showMessage",void 0)})(Jm||(p.ShowMessageNotification=Jm={}));var Ym;(function(t){t.method="window/showMessageRequest",t.messageDirection=A.MessageDirection.serverToClient,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("window.showMessage",void 0)})(Ym||(p.ShowMessageRequest=Ym={}));var Xm;(function(t){t.method="window/logMessage",t.messageDirection=A.MessageDirection.serverToClient,t.type=new A.ProtocolNotificationType(t.method)})(Xm||(p.LogMessageNotification=Xm={}));var Qm;(function(t){t.method="telemetry/event",t.messageDirection=A.MessageDirection.serverToClient,t.type=new A.ProtocolNotificationType(t.method)})(Qm||(p.TelemetryEventNotification=Qm={}));var Zm;(function(t){t.None=0,t.Full=1,t.Incremental=2})(Zm||(p.TextDocumentSyncKind=Zm={}));var ef;(function(t){t.method="textDocument/didOpen",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(ef||(p.DidOpenTextDocumentNotification=ef={}));var tf;(function(t){function e(i){let r=i;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}t.isIncremental=e;function n(i){let r=i;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}t.isFull=n})(tf||(p.TextDocumentContentChangeEvent=tf={}));var nf;(function(t){t.method="textDocument/didChange",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("textDocument.synchronization","textDocumentSync")})(nf||(p.DidChangeTextDocumentNotification=nf={}));var rf;(function(t){t.method="textDocument/didClose",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(rf||(p.DidCloseTextDocumentNotification=rf={}));var sf;(function(t){t.method="textDocument/didSave",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(sf||(p.DidSaveTextDocumentNotification=sf={}));var af;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(af||(p.TextDocumentSaveReason=af={}));var of;(function(t){t.method="textDocument/willSave",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(of||(p.WillSaveTextDocumentNotification=of={}));var lf;(function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(lf||(p.WillSaveTextDocumentWaitUntilRequest=lf={}));var cf;(function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("workspace.didChangeWatchedFiles",void 0)})(cf||(p.DidChangeWatchedFilesNotification=cf={}));var df;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(df||(p.FileChangeType=df={}));var Rd;(function(t){function e(n){let i=n;return Be.objectLiteral(i)&&(Om.URI.is(i.baseUri)||Om.WorkspaceFolder.is(i.baseUri))&&Be.string(i.pattern)}t.is=e})(Rd||(p.RelativePattern=Rd={}));var Dd;(function(t){function e(n){let i=n;return Be.string(i)||Rd.is(i)}t.is=e})(Dd||(p.GlobPattern=Dd={}));var hf;(function(t){t.Create=1,t.Change=2,t.Delete=4})(hf||(p.WatchKind=hf={}));var pf;(function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=A.MessageDirection.serverToClient,t.type=new A.ProtocolNotificationType(t.method),t.capabilities=A.CM.create("textDocument.publishDiagnostics",void 0)})(pf||(p.PublishDiagnosticsNotification=pf={}));var uf;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(uf||(p.CompletionTriggerKind=uf={}));var mf;(function(t){t.method="textDocument/completion",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.completion","completionProvider")})(mf||(p.CompletionRequest=mf={}));var ff;(function(t){t.method="completionItem/resolve",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(ff||(p.CompletionResolveRequest=ff={}));var bf;(function(t){t.method="textDocument/hover",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.hover","hoverProvider")})(bf||(p.HoverRequest=bf={}));var gf;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(gf||(p.SignatureHelpTriggerKind=gf={}));var wf;(function(t){t.method="textDocument/signatureHelp",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(wf||(p.SignatureHelpRequest=wf={}));var _f;(function(t){t.method="textDocument/definition",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.definition","definitionProvider")})(_f||(p.DefinitionRequest=_f={}));var Sf;(function(t){t.method="textDocument/references",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.references","referencesProvider")})(Sf||(p.ReferencesRequest=Sf={}));var yf;(function(t){t.method="textDocument/documentHighlight",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(yf||(p.DocumentHighlightRequest=yf={}));var vf;(function(t){t.method="textDocument/documentSymbol",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(vf||(p.DocumentSymbolRequest=vf={}));var Ff;(function(t){t.method="textDocument/codeAction",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.codeAction","codeActionProvider")})(Ff||(p.CodeActionRequest=Ff={}));var Cf;(function(t){t.method="codeAction/resolve",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Cf||(p.CodeActionResolveRequest=Cf={}));var xf;(function(t){t.method="workspace/symbol",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("workspace.symbol","workspaceSymbolProvider")})(xf||(p.WorkspaceSymbolRequest=xf={}));var Af;(function(t){t.method="workspaceSymbol/resolve",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Af||(p.WorkspaceSymbolResolveRequest=Af={}));var Ef;(function(t){t.method="textDocument/codeLens",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.codeLens","codeLensProvider")})(Ef||(p.CodeLensRequest=Ef={}));var kf;(function(t){t.method="codeLens/resolve",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(kf||(p.CodeLensResolveRequest=kf={}));var Mf;(function(t){t.method="workspace/codeLens/refresh",t.messageDirection=A.MessageDirection.serverToClient,t.type=new A.ProtocolRequestType0(t.method),t.capabilities=A.CM.create("workspace.codeLens",void 0)})(Mf||(p.CodeLensRefreshRequest=Mf={}));var Rf;(function(t){t.method="textDocument/documentLink",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.documentLink","documentLinkProvider")})(Rf||(p.DocumentLinkRequest=Rf={}));var Df;(function(t){t.method="documentLink/resolve",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Df||(p.DocumentLinkResolveRequest=Df={}));var Of;(function(t){t.method="textDocument/formatting",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.formatting","documentFormattingProvider")})(Of||(p.DocumentFormattingRequest=Of={}));var Pf;(function(t){t.method="textDocument/rangeFormatting",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Pf||(p.DocumentRangeFormattingRequest=Pf={}));var If;(function(t){t.method="textDocument/rangesFormatting",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(If||(p.DocumentRangesFormattingRequest=If={}));var Tf;(function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Tf||(p.DocumentOnTypeFormattingRequest=Tf={}));var zf;(function(t){t.Identifier=1})(zf||(p.PrepareSupportDefaultBehavior=zf={}));var Nf;(function(t){t.method="textDocument/rename",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.rename","renameProvider")})(Nf||(p.RenameRequest=Nf={}));var Wf;(function(t){t.method="textDocument/prepareRename",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Wf||(p.PrepareRenameRequest=Wf={}));var Lf;(function(t){t.method="workspace/executeCommand",t.messageDirection=A.MessageDirection.clientToServer,t.type=new A.ProtocolRequestType(t.method),t.capabilities=A.CM.create("workspace.executeCommand","executeCommandProvider")})(Lf||(p.ExecuteCommandRequest=Lf={}));var qf;(function(t){t.method="workspace/applyEdit",t.messageDirection=A.MessageDirection.serverToClient,t.type=new A.ProtocolRequestType("workspace/applyEdit"),t.capabilities=A.CM.create("workspace.applyEdit",void 0)})(qf||(p.ApplyWorkspaceEditRequest=qf={}))});var Kf=$(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.createProtocolConnection=l_;var Gf=cn();function l_(t,e,n,i){return Gf.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,Gf.createMessageConnection)(t,e,n,i)}});var Re=$(mt=>{"use strict";var c_=mt&&mt.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Ca=mt&&mt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&c_(e,t,n)};Object.defineProperty(mt,"__esModule",{value:!0});mt.LSPErrorCodes=mt.createProtocolConnection=void 0;Ca(cn(),mt);Ca((Kr(),Fl(ua)),mt);Ca(ve(),mt);Ca(Hf(),mt);var d_=Kf();Object.defineProperty(mt,"createProtocolConnection",{enumerable:!0,get:function(){return d_.createProtocolConnection}});var Jf;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(Jf||(mt.LSPErrorCodes=Jf={}))});var Ld=$($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.empty=void 0;$n.v4=Yf;$n.isUUID=Xf;$n.parse=p_;$n.generateUuid=u_;var es=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},Wd=class t extends es{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}};$n.empty=new es("00000000-0000-0000-0000-000000000000");function Yf(){return new Wd}var h_=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Xf(t){return h_.test(t)}function p_(t){if(!Xf(t))throw new Error("invalid uuid");return new es(t)}function u_(){return Yf().asHex()}});var Qf=$(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.ProgressFeature=void 0;Qi.attachWorkDone=f_;Qi.attachPartialResult=g_;var Un=Re(),m_=Ld(),Xi=class t{_connection;_token;static Instances=new Map;constructor(e,n){this._connection=e,this._token=n,t.Instances.set(this._token,this)}begin(e,n,i,r){let s={kind:"begin",title:e,message:i,cancellable:r};typeof n=="number"&&(s.percentage=Math.round(n)),this._connection.sendProgress(Un.WorkDoneProgress.type,this._token,s)}report(e,n){let i={kind:"report"};typeof e=="number"?(i.percentage=Math.round(e),n!==void 0&&(i.message=n)):i.message=e,this._connection.sendProgress(Un.WorkDoneProgress.type,this._token,i)}done(){t.Instances.delete(this._token),this._connection.sendProgress(Un.WorkDoneProgress.type,this._token,{kind:"end"})}},xa=class extends Xi{_source;constructor(e,n){super(e,n),this._source=new Un.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},ts=class{constructor(){}begin(){}report(){}done(){}},Aa=class extends ts{_source;constructor(){super(),this._source=new Un.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function f_(t,e){if(e===void 0||e.workDoneToken===void 0)return new ts;let n=e.workDoneToken;return delete e.workDoneToken,new Xi(t,n)}var b_=t=>class extends t{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),e?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Un.WorkDoneProgressCancelNotification.type,n=>{let i=Xi.Instances.get(n.token);(i instanceof xa||i instanceof Aa)&&i.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new ts:new Xi(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,m_.generateUuid)();return this.connection.sendRequest(Un.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new xa(this.connection,e))}else return Promise.resolve(new Aa)}};Qi.ProgressFeature=b_;var qd;(function(t){t.type=new Un.ProgressType})(qd||(qd={}));var jd=class{_connection;_token;constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(qd.type,this._token,e)}};function g_(t,e){if(e===void 0||e.partialResultToken===void 0)return;let n=e.partialResultToken;return delete e.partialResultToken,new jd(t,n)}});var Zf=$(Xt=>{"use strict";var w_=Xt&&Xt.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),__=Xt&&Xt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),S_=Xt&&Xt.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;rclass extends t{getConfiguration(e){return e?v_.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(y_.ConfigurationRequest.type,n).then(i=>Array.isArray(i)?Array.isArray(e)?i:i[0]:Array.isArray(e)?[]:null)}};Xt.ConfigurationFeature=F_});var eb=$(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.WorkspaceFoldersFeature=void 0;var Ea=Re(),C_=t=>class extends t{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ea.Emitter,this.connection.onNotification(Ea.DidChangeWorkspaceFoldersNotification.type,i=>{this._onDidChangeWorkspaceFolders.fire(i.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);let n=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ea.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ea.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};ka.WorkspaceFoldersFeature=C_});var tb=$(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.CallHierarchyFeature=void 0;var $d=Re(),x_=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest($d.CallHierarchyPrepareRequest.type,(n,i)=>e(n,i,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{let n=$d.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))},onOutgoingCalls:e=>{let n=$d.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))}}}};Ma.CallHierarchyFeature=x_});var Bd=$(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.SemanticTokensBuilder=Bn.SemanticTokensDiff=Bn.SemanticTokensFeature=void 0;var Ra=Re(),A_=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Ra.SemanticTokensRefreshRequest.type),on:e=>{let n=Ra.SemanticTokensRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))},onDelta:e=>{let n=Ra.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))},onRange:e=>{let n=Ra.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))}}}};Bn.SemanticTokensFeature=A_;var Da=class{originalSequence;modifiedSequence;constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){let e=this.originalSequence.length,n=this.modifiedSequence.length,i=0;for(;i=i&&s>=i&&this.originalSequence[r]===this.modifiedSequence[s];)r--,s--;(r0&&(a-=this._prevLine,a===0&&(o-=this._prevChar));let l=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;l[this._dataLen++]=a,l[this._dataLen++]=o,l[this._dataLen++]=i,l[this._dataLen++]=r,l[this._dataLen++]=s,this._prevLine=e,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(e){let n=e.length/5|0,i=0,r=0,s=[];for(let a=0;a{let c=e[5*o],h=e[5*l];if(c===h){let m=e[5*o+1],w=e[5*l+1];return m-w}return c-h});let r=[],s=0,a=0;for(let o=0;o{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.ShowDocumentFeature=void 0;var E_=Re(),k_=t=>class extends t{showDocument(e){return this.connection.sendRequest(E_.ShowDocumentRequest.type,e)}};Oa.ShowDocumentFeature=k_});var ib=$(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.FileOperationsFeature=void 0;var Zi=Re(),M_=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(Zi.DidCreateFilesNotification.type,n=>e(n))}onDidRenameFiles(e){return this.connection.onNotification(Zi.DidRenameFilesNotification.type,n=>e(n))}onDidDeleteFiles(e){return this.connection.onNotification(Zi.DidDeleteFilesNotification.type,n=>e(n))}onWillCreateFiles(e){return this.connection.onRequest(Zi.WillCreateFilesRequest.type,(n,i)=>e(n,i))}onWillRenameFiles(e){return this.connection.onRequest(Zi.WillRenameFilesRequest.type,(n,i)=>e(n,i))}onWillDeleteFiles(e){return this.connection.onRequest(Zi.WillDeleteFilesRequest.type,(n,i)=>e(n,i))}};Pa.FileOperationsFeature=M_});var rb=$(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.LinkedEditingRangeFeature=void 0;var R_=Re(),D_=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(R_.LinkedEditingRangeRequest.type,(n,i)=>e(n,i,this.attachWorkDoneProgress(n),void 0))}};Ia.LinkedEditingRangeFeature=D_});var sb=$(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.TypeHierarchyFeature=void 0;var Vd=Re(),O_=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(Vd.TypeHierarchyPrepareRequest.type,(n,i)=>e(n,i,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{let n=Vd.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))},onSubtypes:e=>{let n=Vd.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))}}}};Ta.TypeHierarchyFeature=O_});var ob=$(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.InlineValueFeature=void 0;var ab=Re(),P_=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(ab.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(ab.InlineValueRequest.type,(n,i)=>e(n,i,this.attachWorkDoneProgress(n)))}}};za.InlineValueFeature=P_});var cb=$(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.FoldingRangeFeature=void 0;var lb=Re(),I_=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(lb.FoldingRangeRefreshRequest.type),on:e=>{let n=lb.FoldingRangeRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))}}}};Na.FoldingRangeFeature=I_});var db=$(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.InlayHintFeature=void 0;var Hd=Re(),T_=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Hd.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(Hd.InlayHintRequest.type,(n,i)=>e(n,i,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(Hd.InlayHintResolveRequest.type,(n,i)=>e(n,i))}}};Wa.InlayHintFeature=T_});var hb=$(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.DiagnosticFeature=void 0;var ns=Re(),z_=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(ns.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(ns.DocumentDiagnosticRequest.type,(n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(ns.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(ns.WorkspaceDiagnosticRequest.type,(n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(ns.WorkspaceDiagnosticRequest.partialResult,n)))}}};La.DiagnosticFeature=z_});var Kd=$(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.TextDocuments=void 0;var di=Re(),Gd=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new di.Emitter,this._onDidOpen=new di.Emitter,this._onDidClose=new di.Emitter,this._onDidSave=new di.Emitter,this._onWillSave=new di.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=di.TextDocumentSyncKind.Incremental;let n=[];return n.push(e.onDidOpenTextDocument(i=>{let r=i.textDocument,s=this._configuration.create(r.uri,r.languageId,r.version,r.text);this._syncedDocuments.set(r.uri,s);let a=Object.freeze({document:s});this._onDidOpen.fire(a),this._onDidChangeContent.fire(a)})),n.push(e.onDidChangeTextDocument(i=>{let r=i.textDocument,s=i.contentChanges;if(s.length===0)return;let{version:a}=r;if(a==null)throw new Error(`Received document change event for ${r.uri} without valid version identifier`);let o=this._syncedDocuments.get(r.uri);o!==void 0&&(o=this._configuration.update(o,s,a),this._syncedDocuments.set(r.uri,o),this._onDidChangeContent.fire(Object.freeze({document:o})))})),n.push(e.onDidCloseTextDocument(i=>{let r=this._syncedDocuments.get(i.textDocument.uri);r!==void 0&&(this._syncedDocuments.delete(i.textDocument.uri),this._onDidClose.fire(Object.freeze({document:r})))})),n.push(e.onWillSaveTextDocument(i=>{let r=this._syncedDocuments.get(i.textDocument.uri);r!==void 0&&this._onWillSave.fire(Object.freeze({document:r,reason:i.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((i,r)=>{let s=this._syncedDocuments.get(i.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:i.reason}),r):[]})),n.push(e.onDidSaveTextDocument(i=>{let r=this._syncedDocuments.get(i.textDocument.uri);r!==void 0&&this._onDidSave.fire(Object.freeze({document:r}))})),di.Disposable.create(()=>{n.forEach(i=>i.dispose())})}};qa.TextDocuments=Gd});var Xd=$(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.NotebookDocuments=er.NotebookSyncFeature=void 0;var Mt=Re(),pb=Kd(),N_=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(Mt.DidOpenNotebookDocumentNotification.type,n=>e(n)),onDidChangeNotebookDocument:e=>this.connection.onNotification(Mt.DidChangeNotebookDocumentNotification.type,n=>e(n)),onDidSaveNotebookDocument:e=>this.connection.onNotification(Mt.DidSaveNotebookDocumentNotification.type,n=>e(n)),onDidCloseNotebookDocument:e=>this.connection.onNotification(Mt.DidCloseNotebookDocumentNotification.type,n=>e(n))}}};er.NotebookSyncFeature=N_;var Jd=class t{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(e){return this.openHandler=e,Mt.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,Mt.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,Mt.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}},Yd=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(e){e instanceof pb.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new pb.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Mt.Emitter,this._onDidChange=new Mt.Emitter,this._onDidSave=new Mt.Emitter,this._onDidClose=new Mt.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){let n=typeof e=="string"?e:e.document,i=this.notebookCellMap.get(n);return i&&i[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let n=new Jd,i=[];return i.push(this.cellTextDocuments.listen(n)),i.push(e.notebooks.synchronization.onDidOpenNotebookDocument(async r=>{this.notebookDocuments.set(r.notebookDocument.uri,r.notebookDocument);for(let s of r.cellTextDocuments)await n.openTextDocument({textDocument:s});this.updateCellMap(r.notebookDocument),this._onDidOpen.fire(r.notebookDocument)})),i.push(e.notebooks.synchronization.onDidChangeNotebookDocument(async r=>{let s=this.notebookDocuments.get(r.notebookDocument.uri);if(s===void 0)return;s.version=r.notebookDocument.version;let a=s.metadata,o=!1,l=r.change;l.metadata!==void 0&&(o=!0,s.metadata=l.metadata);let c=[],h=[],m=[],w=[];if(l.cells!==void 0){let X=l.cells;if(X.structure!==void 0){let y=X.structure.array;if(s.cells.splice(y.start,y.deleteCount,...y.cells!==void 0?y.cells:[]),X.structure.didOpen!==void 0)for(let _ of X.structure.didOpen)await n.openTextDocument({textDocument:_}),c.push(_.uri);if(X.structure.didClose)for(let _ of X.structure.didClose)await n.closeTextDocument({textDocument:_}),h.push(_.uri)}if(X.data!==void 0){let y=new Map(X.data.map(_=>[_.document,_]));for(let _=0;_<=s.cells.length;_++){let b=y.get(s.cells[_].document);if(b!==void 0){let R=s.cells.splice(_,1,b);if(m.push({old:R[0],new:b}),y.delete(b.document),y.size===0)break}}}if(X.textContent!==void 0)for(let y of X.textContent)await n.changeTextDocument({textDocument:y.document,contentChanges:y.changes}),w.push(y.document.uri)}this.updateCellMap(s);let S={notebookDocument:s};o&&(S.metadata={old:a,new:s.metadata});let P=[];for(let X of c)P.push(this.getNotebookCell(X));let H=[];for(let X of h)H.push(this.getNotebookCell(X));let oe=[];for(let X of w)oe.push(this.getNotebookCell(X));(P.length>0||H.length>0||m.length>0||oe.length>0)&&(S.cells={added:P,removed:H,changed:{data:m,textContent:oe}}),(S.metadata!==void 0||S.cells!==void 0)&&this._onDidChange.fire(S)})),i.push(e.notebooks.synchronization.onDidSaveNotebookDocument(r=>{let s=this.notebookDocuments.get(r.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),i.push(e.notebooks.synchronization.onDidCloseNotebookDocument(async r=>{let s=this.notebookDocuments.get(r.notebookDocument.uri);if(s!==void 0){this._onDidClose.fire(s);for(let a of r.cellTextDocuments)await n.closeTextDocument({textDocument:a});this.notebookDocuments.delete(r.notebookDocument.uri);for(let a of s.cells)this.notebookCellMap.delete(a.document)}})),Mt.Disposable.create(()=>{i.forEach(r=>r.dispose())})}updateCellMap(e){for(let n of e.cells)this.notebookCellMap.set(n.document,[n,e])}};er.NotebookDocuments=Yd});var ub=$(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.MonikerFeature=void 0;var W_=Re(),L_=t=>class extends t{get moniker(){return{on:e=>{let n=W_.MonikerRequest.type;return this.connection.onRequest(n,(i,r)=>e(i,r,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n,i)))}}}};ja.MonikerFeature=L_});var ih=$(we=>{"use strict";var q_=we&&we.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),j_=we&&we.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Sb=we&&we.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{e.window.showErrorMessage(n)})}};we.ErrorMessageTracker=eh;var $a=class{_rawConnection;_connection;constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(j.MessageType.Error,e)}warn(e){this.send(j.MessageType.Warning,e)}info(e){this.send(j.MessageType.Info,e)}log(e){this.send(j.MessageType.Log,e)}debug(e){this.send(j.MessageType.Debug,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(j.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,j.RAL)().console.error("Sending log message failed")})}},th=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...n){let i={type:j.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(j.ShowMessageRequest.type,i).then(Qd)}showWarningMessage(e,...n){let i={type:j.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(j.ShowMessageRequest.type,i).then(Qd)}showInformationMessage(e,...n){let i={type:j.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(j.ShowMessageRequest.type,i).then(Qd)}},mb=(0,H_.ShowDocumentFeature)((0,ie.ProgressFeature)(th)),fb;(function(t){function e(){return new Ua}t.create=e})(fb||(we.BulkRegistration=fb={}));var Ua=class{_registrations=[];_registered=new Set;add(e,n){let i=Rt.string(e)?e:e.method;if(this._registered.has(i))throw new Error(`${i} is already added to this registration`);let r=Zd.generateUuid();this._registrations.push({id:r,method:i,registerOptions:n||{}}),this._registered.add(i)}asRegistrationParams(){return{registrations:this._registrations}}},bb;(function(t){function e(){return new is(void 0,[])}t.create=e})(bb||(we.BulkUnregistration=bb={}));var is=class{_connection;_unregistrations=new Map;constructor(e,n){this._connection=e,n.forEach(i=>{this._unregistrations.set(i.method,i)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let i of this._unregistrations.values())e.push(i);let n={unregisterations:e};this._connection.sendRequest(j.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let n=Rt.string(e)?e:e.method,i=this._unregistrations.get(n);if(!i)return!1;let r={unregisterations:[i]};return this._connection.sendRequest(j.UnregistrationRequest.type,r).then(()=>{this._unregistrations.delete(n)},s=>{this._connection.console.info(`Un-registering request handler for ${i.id} failed.`)}),!0}},Ba=class{_connection;attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,n,i){return e instanceof Ua?this.registerMany(e):e instanceof is?this.registerSingle1(e,n,i):this.registerSingle2(e,n)}registerSingle1(e,n,i){let r=Rt.string(n)?n:n.method,s=Zd.generateUuid(),a={registrations:[{id:s,method:r,registerOptions:i||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(j.RegistrationRequest.type,a).then(o=>(e.add({id:s,method:r}),e),o=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(o)))}registerSingle2(e,n){let i=Rt.string(e)?e:e.method,r=Zd.generateUuid(),s={registrations:[{id:r,method:i,registerOptions:n||{}}]};return this.connection.sendRequest(j.RegistrationRequest.type,s).then(a=>j.Disposable.create(()=>{this.unregisterSingle(r,i).catch(()=>{this.connection.console.info(`Un-registering capability with id ${r} failed.`)})}),a=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(a)))}unregisterSingle(e,n){let i={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(j.UnregistrationRequest.type,i).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(j.RegistrationRequest.type,n).then(()=>new is(this._connection,n.registrations.map(i=>({id:i.id,method:i.method}))),i=>(this.connection.console.info("Bulk registration failed."),Promise.reject(i)))}},nh=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function n(r){return r&&!!r.edit}let i=n(e)?e:{edit:e};return this.connection.sendRequest(j.ApplyWorkspaceEditRequest.type,i)}},gb=(0,G_.FileOperationsFeature)((0,U_.WorkspaceFoldersFeature)((0,$_.ConfigurationFeature)(nh))),Va=class{_trace;_connection;constructor(){this._trace=j.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,n){this._trace!==j.Trace.Off&&this.connection.sendNotification(j.LogTraceNotification.type,{message:e,verbose:this._trace===j.Trace.Verbose?n:void 0}).catch(()=>{})}},Ha=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(j.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},Ga=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,ie.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,ie.attachPartialResult)(this.connection,n)}};we._LanguagesImpl=Ga;var wb=(0,X_.FoldingRangeFeature)((0,t2.MonikerFeature)((0,Z_.DiagnosticFeature)((0,Q_.InlayHintFeature)((0,Y_.InlineValueFeature)((0,J_.TypeHierarchyFeature)((0,K_.LinkedEditingRangeFeature)((0,V_.SemanticTokensFeature)((0,B_.CallHierarchyFeature)(Ga))))))))),Ka=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,ie.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,ie.attachPartialResult)(this.connection,n)}};we._NotebooksImpl=Ka;var _b=(0,e2.NotebookSyncFeature)(Ka);function yb(t,e){return function(n){return e(t(n))}}function vb(t,e){return function(n){return e(t(n))}}function Fb(t,e){return function(n){return e(t(n))}}function Cb(t,e){return function(n){return e(t(n))}}function xb(t,e){return function(n){return e(t(n))}}function Ab(t,e){return function(n){return e(t(n))}}function Eb(t,e){return function(n){return e(t(n))}}function kb(t,e){return function(n){return e(t(n))}}function n2(t,e){function n(r,s,a){return r&&s?a(r,s):r||s}return{__brand:"features",console:n(t.console,e.console,yb),tracer:n(t.tracer,e.tracer,Fb),telemetry:n(t.telemetry,e.telemetry,vb),client:n(t.client,e.client,Cb),window:n(t.window,e.window,xb),workspace:n(t.workspace,e.workspace,Ab),languages:n(t.languages,e.languages,Eb),notebooks:n(t.notebooks,e.notebooks,kb)}}function i2(t,e,n){let i=n&&n.console?new(n.console($a)):new $a,r=t(i);i.rawAttach(r);let s=n&&n.tracer?new(n.tracer(Va)):new Va,a=n&&n.telemetry?new(n.telemetry(Ha)):new Ha,o=n&&n.client?new(n.client(Ba)):new Ba,l=n&&n.window?new(n.window(mb)):new mb,c=n&&n.workspace?new(n.workspace(gb)):new gb,h=n&&n.languages?new(n.languages(wb)):new wb,m=n&&n.notebooks?new(n.notebooks(_b)):new _b,w=[i,s,a,o,l,c,h,m];function S(y){return y instanceof Promise?y:Rt.thenable(y)?new Promise((_,b)=>{y.then(R=>_(R),R=>b(R))}):Promise.resolve(y)}let P,H,oe,X={listen:()=>r.listen(),sendRequest:(y,..._)=>r.sendRequest(Rt.string(y)?y:y.method,..._),onRequest:(y,_)=>r.onRequest(y,_),sendNotification:(y,_)=>{let b=Rt.string(y)?y:y.method;return r.sendNotification(b,_)},onNotification:(y,_)=>r.onNotification(y,_),onProgress:r.onProgress,sendProgress:r.sendProgress,onInitialize:y=>(H=y,{dispose:()=>{H=void 0}}),onInitialized:y=>r.onNotification(j.InitializedNotification.type,y),onShutdown:y=>(P=y,{dispose:()=>{P=void 0}}),onExit:y=>(oe=y,{dispose:()=>{oe=void 0}}),get console(){return i},get telemetry(){return a},get tracer(){return s},get client(){return o},get window(){return l},get workspace(){return c},get languages(){return h},get notebooks(){return m},onDidChangeConfiguration:y=>r.onNotification(j.DidChangeConfigurationNotification.type,y),onDidChangeWatchedFiles:y=>r.onNotification(j.DidChangeWatchedFilesNotification.type,y),__textDocumentSync:void 0,onDidOpenTextDocument:y=>r.onNotification(j.DidOpenTextDocumentNotification.type,y),onDidChangeTextDocument:y=>r.onNotification(j.DidChangeTextDocumentNotification.type,y),onDidCloseTextDocument:y=>r.onNotification(j.DidCloseTextDocumentNotification.type,y),onWillSaveTextDocument:y=>r.onNotification(j.WillSaveTextDocumentNotification.type,y),onWillSaveTextDocumentWaitUntil:y=>r.onRequest(j.WillSaveTextDocumentWaitUntilRequest.type,y),onDidSaveTextDocument:y=>r.onNotification(j.DidSaveTextDocumentNotification.type,y),sendDiagnostics:y=>r.sendNotification(j.PublishDiagnosticsNotification.type,y),onHover:y=>r.onRequest(j.HoverRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),void 0)),onCompletion:y=>r.onRequest(j.CompletionRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onCompletionResolve:y=>r.onRequest(j.CompletionResolveRequest.type,y),onSignatureHelp:y=>r.onRequest(j.SignatureHelpRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),void 0)),onDeclaration:y=>r.onRequest(j.DeclarationRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onDefinition:y=>r.onRequest(j.DefinitionRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onTypeDefinition:y=>r.onRequest(j.TypeDefinitionRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onImplementation:y=>r.onRequest(j.ImplementationRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onReferences:y=>r.onRequest(j.ReferencesRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onDocumentHighlight:y=>r.onRequest(j.DocumentHighlightRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onDocumentSymbol:y=>r.onRequest(j.DocumentSymbolRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onWorkspaceSymbol:y=>r.onRequest(j.WorkspaceSymbolRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onWorkspaceSymbolResolve:y=>r.onRequest(j.WorkspaceSymbolResolveRequest.type,y),onCodeAction:y=>r.onRequest(j.CodeActionRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onCodeActionResolve:y=>r.onRequest(j.CodeActionResolveRequest.type,(_,b)=>y(_,b)),onCodeLens:y=>r.onRequest(j.CodeLensRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onCodeLensResolve:y=>r.onRequest(j.CodeLensResolveRequest.type,(_,b)=>y(_,b)),onDocumentFormatting:y=>r.onRequest(j.DocumentFormattingRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),void 0)),onDocumentRangeFormatting:y=>r.onRequest(j.DocumentRangeFormattingRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),void 0)),onDocumentOnTypeFormatting:y=>r.onRequest(j.DocumentOnTypeFormattingRequest.type,(_,b)=>y(_,b)),onRenameRequest:y=>r.onRequest(j.RenameRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),void 0)),onPrepareRename:y=>r.onRequest(j.PrepareRenameRequest.type,(_,b)=>y(_,b)),onDocumentLinks:y=>r.onRequest(j.DocumentLinkRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onDocumentLinkResolve:y=>r.onRequest(j.DocumentLinkResolveRequest.type,(_,b)=>y(_,b)),onDocumentColor:y=>r.onRequest(j.DocumentColorRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onColorPresentation:y=>r.onRequest(j.ColorPresentationRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onFoldingRanges:y=>r.onRequest(j.FoldingRangeRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onSelectionRanges:y=>r.onRequest(j.SelectionRangeRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),(0,ie.attachPartialResult)(r,_))),onExecuteCommand:y=>r.onRequest(j.ExecuteCommandRequest.type,(_,b)=>y(_,b,(0,ie.attachWorkDone)(r,_),void 0)),dispose:()=>r.dispose()};for(let y of w)y.attach(X);return r.onRequest(j.InitializeRequest.type,y=>{e.initialize(y),Rt.string(y.trace)&&(s.trace=j.Trace.fromString(y.trace));for(let _ of w)_.initialize(y.capabilities);if(H){let _=H(y,new j.CancellationTokenSource().token,(0,ie.attachWorkDone)(r,y),void 0);return S(_).then(b=>{if(b instanceof j.ResponseError)return b;let R=b;R||(R={capabilities:{}});let E=R.capabilities;E||(E={},R.capabilities=E),E.textDocumentSync===void 0||E.textDocumentSync===null?E.textDocumentSync=Rt.number(X.__textDocumentSync)?X.__textDocumentSync:j.TextDocumentSyncKind.None:!Rt.number(E.textDocumentSync)&&!Rt.number(E.textDocumentSync.change)&&(E.textDocumentSync.change=Rt.number(X.__textDocumentSync)?X.__textDocumentSync:j.TextDocumentSyncKind.None);for(let U of w)U.fillServerCapabilities(E);return R})}else{let _={capabilities:{textDocumentSync:j.TextDocumentSyncKind.None}};for(let b of w)b.fillServerCapabilities(_.capabilities);return _}}),r.onRequest(j.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,P)return P(new j.CancellationTokenSource().token)}),r.onNotification(j.ExitNotification.type,()=>{try{if(oe)return oe()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),r.onNotification(j.SetTraceNotification.type,y=>{s.trace=j.Trace.fromString(y.value)}),X}});var Mb=$(ot=>{"use strict";var r2=ot&&ot.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),s2=ot&&ot.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lh=ot&&ot.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r1){let i=n[0],r=n[1];i.length===0&&r.length>1&&r[1]===":"&&n.shift()}return $t.normalize(n.join("/"))}function sh(){return process.platform==="win32"}function Ja(t,e,n,i){let r="NODE_PATH",s=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((a,o)=>{let l=process.env,c=Object.create(null);Object.keys(l).forEach(h=>c[h]=l[h]),e&&rh.existsSync(e)&&(c[r]?c[r]=e+$t.delimiter+c[r]:c[r]=e,i&&i(`NODE_PATH value is: ${c[r]}`)),c.ELECTRON_RUN_AS_NODE="1";try{let h=(0,ch.fork)("",[],{cwd:n,env:c,execArgv:["-e",s]});if(h.pid===void 0){o(new Error(`Starting process to resolve node module ${t} failed`));return}h.on("error",w=>{o(w)}),h.on("message",w=>{w.c==="r"&&(h.send({c:"e"}),w.s?a(w.r):o(new Error(`Failed to resolve module: ${t}`)))});let m={c:"rs",a:t};h.send(m)}catch(h){o(h)}})}function ah(t){let e="npm",n=Object.create(null);Object.keys(process.env).forEach(s=>n[s]=process.env[s]),n.NO_UPDATE_NOTIFIER="true";let i={encoding:"utf8",env:n};sh()&&(e="npm.cmd",i.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let s=(0,ch.spawnSync)(e,["config","get","prefix"],i).stdout;if(!s){t&&t("'npm config get prefix' didn't return a value.");return}let a=s.trim();return t&&t(`'npm config get prefix' value is: ${a}`),a.length>0?sh()?$t.join(a,"node_modules"):$t.join(a,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",r)}}function l2(t){let e="yarn",n={encoding:"utf8"};sh()&&(e="yarn.cmd",n.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let r=(0,ch.spawnSync)(e,["global","dir","--json"],n),s=r.stdout;if(!s){t&&(t("'yarn global dir' didn't return a value."),r.stderr&&t(r.stderr));return}let a=s.trim().split(/\r?\n/);for(let o of a)try{let l=JSON.parse(o);if(l.type==="log")return $t.join(l.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",i)}}var oh;(function(t){let e;function n(){return e!==void 0||(process.platform==="win32"?e=!1:e=!rh.existsSync(__filename.toUpperCase())||!rh.existsSync(__filename.toLowerCase())),e}t.isCaseSensitive=n;function i(r,s){return n()?$t.normalize(s).indexOf($t.normalize(r))===0:$t.normalize(s).toLowerCase().indexOf($t.normalize(r).toLowerCase())===0}t.isParent=i})(oh||(ot.FileSystem=oh={}));function c2(t,e,n,i){return n?($t.isAbsolute(n)||(n=$t.join(t,n)),Ja(e,n,n,i).then(r=>oh.isParent(n,r)?r:Promise.reject(new Error(`Failed to load ${e} from node path location.`))).then(void 0,r=>Ja(e,ah(i),t,i))):Ja(e,ah(i),t,i)}});var Ob=$(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var Rb=bt("util"),fn=cn(),dh=class t extends fn.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return t.emptyBuffer}fromString(e,n){return Buffer.from(e,n)}toString(e,n){return e instanceof Buffer?e.toString(n):new Rb.TextDecoder(n).decode(e)}asNative(e,n){return n===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,n):Buffer.from(e,0,n)}allocNative(e){return Buffer.allocUnsafe(e)}},hh=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),fn.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),fn.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),fn.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),fn.Disposable.create(()=>this.stream.off("data",e))}},ph=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),fn.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),fn.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),fn.Disposable.create(()=>this.stream.off("end",e))}write(e,n){return new Promise((i,r)=>{let s=a=>{a==null?i():r(a)};typeof e=="string"?this.stream.write(e,n,s):this.stream.write(e,s)})}end(){this.stream.end()}},Db=Object.freeze({messageBuffer:Object.freeze({create:t=>new dh(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(t,void 0,0),e.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{try{return t instanceof Buffer?Promise.resolve(JSON.parse(t.toString(e.charset))):Promise.resolve(JSON.parse(new Rb.TextDecoder(e.charset).decode(t)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:t=>new hh(t),asWritableStream:t=>new ph(t)}),console,timer:Object.freeze({setTimeout(t,e,...n){let i=setTimeout(t,e,...n);return{dispose:()=>clearTimeout(i)}},setImmediate(t,...e){let n=setImmediate(t,...e);return{dispose:()=>clearImmediate(n)}},setInterval(t,e,...n){let i=setInterval(t,e,...n);return{dispose:()=>clearInterval(i)}}})});function uh(){return Db}(function(t){function e(){fn.RAL.install(Db)}t.install=e})(uh||(uh={}));mh.default=uh});var Sh=$(ce=>{"use strict";var Ib=ce&&ce.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),d2=ce&&ce.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_h=ce&&ce.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;rthis.fireError(i)),n.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),yt.Disposable.create(()=>this.process.off("message",e))}};ce.IPCMessageReader=fh;var bh=class extends yt.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;let n=this.process;n.on("error",i=>this.fireError(i)),n.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,e)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){}};ce.IPCMessageWriter=bh;var gh=class extends yt.AbstractMessageReader{onData;constructor(e){super(),this.onData=new yt.Emitter,e.on("close",()=>this.fireClose),e.on("error",n=>this.fireError(n)),e.on("message",n=>{this.onData.fire(n)})}listen(e){return this.onData.event(e)}};ce.PortMessageReader=gh;var wh=class extends yt.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",n=>this.fireError(n))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){}};ce.PortMessageWriter=wh;var hi=class extends yt.ReadableStreamMessageReader{constructor(e,n="utf-8"){super((0,rs.default)().stream.asReadableStream(e),n)}};ce.SocketMessageReader=hi;var pi=class extends yt.WriteableStreamMessageWriter{socket;constructor(e,n){super((0,rs.default)().stream.asWritableStream(e),n),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};ce.SocketMessageWriter=pi;var Ya=class extends yt.ReadableStreamMessageReader{constructor(e,n){super((0,rs.default)().stream.asReadableStream(e),n)}};ce.StreamMessageReader=Ya;var Xa=class extends yt.WriteableStreamMessageWriter{constructor(e,n){super((0,rs.default)().stream.asWritableStream(e),n)}};ce.StreamMessageWriter=Xa;var b2=process.env.XDG_RUNTIME_DIR,g2=new Map([["linux",107],["darwin",103]]);function w2(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Pb.randomBytes)(16).toString("hex")}-sock`;let t=32,e=10,n=f2.realpathSync(b2??m2.tmpdir()),i=g2.get(process.platform);if(i!==void 0&&(t=Math.min(i-n.length-e,t)),t<16)throw new Error(`Unable to generate a random pipe name with ${t} characters.`);let r=(0,Pb.randomBytes)(Math.floor(t/2)).toString("hex");return u2.join(n,`lsp-${r}.sock`)}function _2(t,e="utf-8"){let n,i=new Promise((r,s)=>{n=r});return new Promise((r,s)=>{let a=(0,Qa.createServer)(o=>{a.close(),n([new hi(o,e),new pi(o,e)])});a.on("error",s),a.listen(t,()=>{a.removeListener("error",s),r({onConnected:()=>i})})})}function S2(t,e="utf-8"){let n=(0,Qa.createConnection)(t);return[new hi(n,e),new pi(n,e)]}function y2(t,e="utf-8"){let n,i=new Promise((r,s)=>{n=r});return new Promise((r,s)=>{let a=(0,Qa.createServer)(o=>{a.close(),n([new hi(o,e),new pi(o,e)])});a.on("error",s),a.listen(t,"127.0.0.1",()=>{a.removeListener("error",s),r({onConnected:()=>i})})})}function v2(t,e="utf-8"){let n=(0,Qa.createConnection)(t,"127.0.0.1");return[new hi(n,e),new pi(n,e)]}function F2(t){let e=t;return e.read!==void 0&&e.addListener!==void 0}function C2(t){let e=t;return e.write!==void 0&&e.addListener!==void 0}function x2(t,e,n,i){n||(n=yt.NullLogger);let r=F2(t)?new Ya(t):t,s=C2(e)?new Xa(e):e;return yt.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,yt.createMessageConnection)(r,s,n,i)}});var yh=$(bn=>{"use strict";var A2=bn&&bn.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Tb=bn&&bn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&A2(e,t,n)};Object.defineProperty(bn,"__esModule",{value:!0});bn.createProtocolConnection=k2;var E2=Sh();Tb(Sh(),bn);Tb(Re(),bn);function k2(t,e,n,i){return(0,E2.createMessageConnection)(t,e,n,i)}});var zb=$(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.InlineCompletionFeature=void 0;var M2=Re(),R2=t=>class extends t{get inlineCompletion(){return{on:e=>this.connection.onRequest(M2.InlineCompletionRequest.type,(n,i)=>e(n,i,this.attachWorkDoneProgress(n)))}}};Za.InlineCompletionFeature=R2});var Wb=$(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.TextDocumentContentFeature=void 0;var Nb=Re(),D2=t=>class extends t{get textDocumentContent(){return{refresh:e=>this.connection.sendRequest(Nb.TextDocumentContentRefreshRequest.type,{uri:e}),on:e=>this.connection.onRequest(Nb.TextDocumentContentRequest.type,(n,i)=>e(n,i))}}};eo.TextDocumentContentFeature=D2});var tr=$(ze=>{"use strict";var qb=ze&&ze.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),O2=ze&&ze.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),jb=ze&&ze.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{"use strict";var Hb=lt&<.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),W2=lt&<.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Gb=lt&<.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r{try{process.kill(i,0)}catch{to(),process.exit(nr?0:1)}},3e3))}catch{}}for(let n=2;n{let e=t.processId;vh.number(e)&&Jb===void 0&&setInterval(()=>{try{process.kill(e,0)}catch{process.exit(nr?0:1)}},3e3)},get shutdownReceived(){return nr},set shutdownReceived(t){nr=t},exit:t=>{to(),process.exit(t)}};function $2(t,e,n,i){let r,s,a,o;return t!==void 0&&t.__brand==="features"&&(r=t,t=e,e=n,n=i),ui.ConnectionStrategy.is(t)||ui.ConnectionOptions.is(t)?o=t:(s=t,a=e,o=n),U2(s,a,o,r)}function U2(t,e,n,i){let r=!1;if(!t&&!e&&process.argv.length>2){let o,l,c=process.argv.slice(2);for(let h=0;h{to(),process.exit(nr?0:1)}),o.on("close",()=>{to(),process.exit(nr?0:1)})}let a=o=>{let l=(0,ui.createProtocolConnection)(t,e,o,n);return r&&B2(o),l};return(0,L2.createConnection)(a,j2,i)}function B2(t){function e(i){return i.map(r=>typeof r=="string"?r:(0,Ub.inspect)(r)).join(" ")}let n=new Map;console.assert=function(r,...s){if(!r)if(s.length===0)t.error("Assertion failed");else{let[a,...o]=s;t.error(`Assertion failed: ${a} ${e(o)}`)}},console.count=function(r="default"){let s=String(r),a=n.get(s)??0;a+=1,n.set(s,a),t.log(`${s}: ${s}`)},console.countReset=function(r){r===void 0?n.clear():n.delete(String(r))},console.debug=function(...r){t.log(e(r))},console.dir=function(r,s){t.log((0,Ub.inspect)(r,s))},console.log=function(...r){t.log(e(r))},console.error=function(...r){t.error(e(r))},console.trace=function(...r){let s=new Error().stack.replace(/(.+\n){2}/,""),a="Trace";r.length!==0&&(a+=`: ${e(r)}`),t.log(`${a} +${s}`)},console.warn=function(...r){t.warn(e(r))}}});function as(t,e){if(e instanceof Error){let n=e;return`${t}: ${n.message} +${n.stack}`}else{if(typeof e=="string")return`${t}: ${e}`;if(e)return`${t}: ${e.toString()}`}return t}function Ve(t,e,n,i,r){return new Promise(s=>{t.timer.setImmediate(()=>{if(r.isCancellationRequested){s(Xb());return}return e().then(a=>{if(r.isCancellationRequested){s(Xb());return}else s(a)},a=>{console.error(as(i,a)),s(n)})})})}function Xb(){return new no.ResponseError(no.LSPErrorCodes.RequestCancelled,"Request cancelled")}var no,io=Q(()=>{"use strict";no=Ke(tr(),1)});var Qb,vt,Ft,ir=Q(()=>{"use strict";(()=>{"use strict";var t={975:I=>{function C(x){if(typeof x!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(x))}function W(x,k){for(var D,L="",B=0,q=-1,te=0,ae=0;ae<=x.length;++ae){if(ae2){var De=L.lastIndexOf("/");if(De!==L.length-1){De===-1?(L="",B=0):B=(L=L.slice(0,De)).length-1-L.lastIndexOf("/"),q=ae,te=0;continue}}else if(L.length===2||L.length===1){L="",B=0,q=ae,te=0;continue}}k&&(L.length>0?L+="/..":L="..",B=2)}else L.length>0?L+="/"+x.slice(q+1,ae):L=x.slice(q+1,ae),B=ae-q-1;q=ae,te=0}else D===46&&te!==-1?++te:te=-1}return L}var N={resolve:function(){for(var x,k="",D=!1,L=arguments.length-1;L>=-1&&!D;L--){var B;L>=0?B=arguments[L]:(x===void 0&&(x=process.cwd()),B=x),C(B),B.length!==0&&(k=B+"/"+k,D=B.charCodeAt(0)===47)}return k=W(k,!D),D?k.length>0?"/"+k:"/":k.length>0?k:"."},normalize:function(x){if(C(x),x.length===0)return".";var k=x.charCodeAt(0)===47,D=x.charCodeAt(x.length-1)===47;return(x=W(x,!k)).length!==0||k||(x="."),x.length>0&&D&&(x+="/"),k?"/"+x:x},isAbsolute:function(x){return C(x),x.length>0&&x.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var x,k=0;k0&&(x===void 0?x=D:x+="/"+D)}return x===void 0?".":N.normalize(x)},relative:function(x,k){if(C(x),C(k),x===k||(x=N.resolve(x))===(k=N.resolve(k)))return"";for(var D=1;Dae){if(k.charCodeAt(q+fe)===47)return k.slice(q+fe+1);if(fe===0)return k.slice(q+fe)}else B>ae&&(x.charCodeAt(D+fe)===47?De=fe:fe===0&&(De=0));break}var kt=x.charCodeAt(D+fe);if(kt!==k.charCodeAt(q+fe))break;kt===47&&(De=fe)}var an="";for(fe=D+De+1;fe<=L;++fe)fe!==L&&x.charCodeAt(fe)!==47||(an.length===0?an+="..":an+="/..");return an.length>0?an+k.slice(q+De):(q+=De,k.charCodeAt(q)===47&&++q,k.slice(q))},_makeLong:function(x){return x},dirname:function(x){if(C(x),x.length===0)return".";for(var k=x.charCodeAt(0),D=k===47,L=-1,B=!0,q=x.length-1;q>=1;--q)if((k=x.charCodeAt(q))===47){if(!B){L=q;break}}else B=!1;return L===-1?D?"/":".":D&&L===1?"//":x.slice(0,L)},basename:function(x,k){if(k!==void 0&&typeof k!="string")throw new TypeError('"ext" argument must be a string');C(x);var D,L=0,B=-1,q=!0;if(k!==void 0&&k.length>0&&k.length<=x.length){if(k.length===x.length&&k===x)return"";var te=k.length-1,ae=-1;for(D=x.length-1;D>=0;--D){var De=x.charCodeAt(D);if(De===47){if(!q){L=D+1;break}}else ae===-1&&(q=!1,ae=D+1),te>=0&&(De===k.charCodeAt(te)?--te==-1&&(B=D):(te=-1,B=ae))}return L===B?B=ae:B===-1&&(B=x.length),x.slice(L,B)}for(D=x.length-1;D>=0;--D)if(x.charCodeAt(D)===47){if(!q){L=D+1;break}}else B===-1&&(q=!1,B=D+1);return B===-1?"":x.slice(L,B)},extname:function(x){C(x);for(var k=-1,D=0,L=-1,B=!0,q=0,te=x.length-1;te>=0;--te){var ae=x.charCodeAt(te);if(ae!==47)L===-1&&(B=!1,L=te+1),ae===46?k===-1?k=te:q!==1&&(q=1):k!==-1&&(q=-1);else if(!B){D=te+1;break}}return k===-1||L===-1||q===0||q===1&&k===L-1&&k===D+1?"":x.slice(k,L)},format:function(x){if(x===null||typeof x!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof x);return(function(k,D){var L=D.dir||D.root,B=D.base||(D.name||"")+(D.ext||"");return L?L===D.root?L+B:L+"/"+B:B})(0,x)},parse:function(x){C(x);var k={root:"",dir:"",base:"",ext:"",name:""};if(x.length===0)return k;var D,L=x.charCodeAt(0),B=L===47;B?(k.root="/",D=1):D=0;for(var q=-1,te=0,ae=-1,De=!0,fe=x.length-1,kt=0;fe>=D;--fe)if((L=x.charCodeAt(fe))!==47)ae===-1&&(De=!1,ae=fe+1),L===46?q===-1?q=fe:kt!==1&&(kt=1):q!==-1&&(kt=-1);else if(!De){te=fe+1;break}return q===-1||ae===-1||kt===0||kt===1&&q===ae-1&&q===te+1?ae!==-1&&(k.base=k.name=te===0&&B?x.slice(1,ae):x.slice(te,ae)):(te===0&&B?(k.name=x.slice(1,q),k.base=x.slice(1,ae)):(k.name=x.slice(te,q),k.base=x.slice(te,ae)),k.ext=x.slice(q,ae)),te>0?k.dir=x.slice(0,te-1):B&&(k.dir="/"),k},sep:"/",delimiter:":",win32:null,posix:null};N.posix=N,I.exports=N}},e={};function n(I){var C=e[I];if(C!==void 0)return C.exports;var W=e[I]={exports:{}};return t[I](W,W.exports,n),W.exports}n.d=(I,C)=>{for(var W in C)n.o(C,W)&&!n.o(I,W)&&Object.defineProperty(I,W,{enumerable:!0,get:C[W]})},n.o=(I,C)=>Object.prototype.hasOwnProperty.call(I,C),n.r=I=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(I,"__esModule",{value:!0})};var i={};let r;n.r(i),n.d(i,{URI:()=>w,Utils:()=>ht}),typeof process=="object"?r=process.platform==="win32":typeof navigator=="object"&&(r=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function l(I,C){if(!I.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${I.authority}", path: "${I.path}", query: "${I.query}", fragment: "${I.fragment}"}`);if(I.scheme&&!s.test(I.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(I.path){if(I.authority){if(!a.test(I.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(o.test(I.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="",h="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static isUri(C){return C instanceof w||!!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,W,N,x,k,D=!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(L,B){return L||B?L:"file"})(C,D),this.authority=W||c,this.path=(function(L,B){switch(L){case"https":case"http":case"file":B?B[0]!==h&&(B=h+B):B=h}return B})(this.scheme,N||c),this.query=x||c,this.fragment=k||c,l(this,D))}get fsPath(){return y(this,!1)}with(C){if(!C)return this;let{scheme:W,authority:N,path:x,query:k,fragment:D}=C;return W===void 0?W=this.scheme:W===null&&(W=c),N===void 0?N=this.authority:N===null&&(N=c),x===void 0?x=this.path:x===null&&(x=c),k===void 0?k=this.query:k===null&&(k=c),D===void 0?D=this.fragment:D===null&&(D=c),W===this.scheme&&N===this.authority&&x===this.path&&k===this.query&&D===this.fragment?this:new P(W,N,x,k,D)}static parse(C,W=!1){let N=m.exec(C);return N?new P(N[2]||c,E(N[4]||c),E(N[5]||c),E(N[7]||c),E(N[9]||c),W):new P(c,c,c,c,c)}static file(C){let W=c;if(r&&(C=C.replace(/\\/g,h)),C[0]===h&&C[1]===h){let N=C.indexOf(h,2);N===-1?(W=C.substring(2),C=h):(W=C.substring(2,N),C=C.substring(N)||h)}return new P("file",W,C,c,c)}static from(C){let W=new P(C.scheme,C.authority,C.path,C.query,C.fragment);return l(W,!0),W}toString(C=!1){return _(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof w)return C;{let W=new P(C);return W._formatted=C.external,W._fsPath=C._sep===S?C.fsPath:null,W}}return C}}let S=r?1:void 0;class P extends w{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(C=!1){return C?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=S),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 H={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 oe(I,C,W){let N,x=-1;for(let k=0;k=97&&D<=122||D>=65&&D<=90||D>=48&&D<=57||D===45||D===46||D===95||D===126||C&&D===47||W&&D===91||W&&D===93||W&&D===58)x!==-1&&(N+=encodeURIComponent(I.substring(x,k)),x=-1),N!==void 0&&(N+=I.charAt(k));else{N===void 0&&(N=I.substr(0,k));let L=H[D];L!==void 0?(x!==-1&&(N+=encodeURIComponent(I.substring(x,k)),x=-1),N+=L):x===-1&&(x=k)}}return x!==-1&&(N+=encodeURIComponent(I.substring(x))),N!==void 0?N:I}function X(I){let C;for(let W=0;W1&&I.scheme==="file"?`//${I.authority}${I.path}`:I.path.charCodeAt(0)===47&&(I.path.charCodeAt(1)>=65&&I.path.charCodeAt(1)<=90||I.path.charCodeAt(1)>=97&&I.path.charCodeAt(1)<=122)&&I.path.charCodeAt(2)===58?C?I.path.substr(1):I.path[1].toLowerCase()+I.path.substr(2):I.path,r&&(W=W.replace(/\//g,"\\")),W}function _(I,C){let W=C?X:oe,N="",{scheme:x,authority:k,path:D,query:L,fragment:B}=I;if(x&&(N+=x,N+=":"),(k||x==="file")&&(N+=h,N+=h),k){let q=k.indexOf("@");if(q!==-1){let te=k.substr(0,q);k=k.substr(q+1),q=te.lastIndexOf(":"),q===-1?N+=W(te,!1,!1):(N+=W(te.substr(0,q),!1,!1),N+=":",N+=W(te.substr(q+1),!1,!0)),N+="@"}k=k.toLowerCase(),q=k.lastIndexOf(":"),q===-1?N+=W(k,!1,!0):(N+=W(k.substr(0,q),!1,!0),N+=k.substr(q))}if(D){if(D.length>=3&&D.charCodeAt(0)===47&&D.charCodeAt(2)===58){let q=D.charCodeAt(1);q>=65&&q<=90&&(D=`/${String.fromCharCode(q+32)}:${D.substr(3)}`)}else if(D.length>=2&&D.charCodeAt(1)===58){let q=D.charCodeAt(0);q>=65&&q<=90&&(D=`${String.fromCharCode(q+32)}:${D.substr(2)}`)}N+=W(D,!0,!1)}return L&&(N+="?",N+=W(L,!1,!1)),B&&(N+="#",N+=C?B:oe(B,!1,!1)),N}function b(I){try{return decodeURIComponent(I)}catch{return I.length>3?I.substr(0,3)+b(I.substr(3)):I}}let R=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(I){return I.match(R)?I.replace(R,(C=>b(C))):I}var U=n(975);let se=U.posix||U,We="/";var ht;(function(I){I.joinPath=function(C,...W){return C.with({path:se.join(C.path,...W)})},I.resolvePath=function(C,...W){let N=C.path,x=!1;N[0]!==We&&(N=We+N,x=!0);let k=se.resolve(N,...W);return x&&k[0]===We&&!C.authority&&(k=k.substring(1)),C.with({path:k})},I.dirname=function(C){if(C.path.length===0||C.path===We)return C;let W=se.dirname(C.path);return W.length===1&&W.charCodeAt(0)===46&&(W=""),C.with({path:W})},I.basename=function(C){return se.basename(C.path)},I.extname=function(C){return se.extname(C.path)}})(ht||(ht={})),Qb=i})();({URI:vt,Utils:Ft}=Qb)});var d,ao,ro,Zb,eg,so,tg,ng,os,ls,V2,H2,cs,G2,Vn,ig,K2,Fh,dg,hg,J2,Y2,X2,Q2,Z2,Ch,rg,rr,sr,ds,sg,ag,xh,Ah,eS,tS,nS,iS,rS,sS,aS,og,lg,oS,cg,Qt,Se,Dt,Hn=Q(()=>{"use strict";(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"})(d||(d={}));ao=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&&i===rg?(e=!0,!1):(n=i===Fh,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,n=!1,i=this.stream.peekChar();(i===cg||i===Vn)&&e++,this.stream.peekChar(e)===og&&(e++,n=!0);let r=this.stream.peekChar(e);return r>=os&&r<=ls?(this.stream.advance(e+1),this.stream.advanceWhileChar(s=>s>=os&&s<=ls||!n&&s===og),!0):!1}_newline(e){let n=this.stream.peekChar();switch(n){case sr:case ds:case rr:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===sr&&this.stream.advanceIfChar(rr)&&e.push(` +`),!0}return!1}_escape(e,n){let i=this.stream.peekChar();if(i===Ch){this.stream.advance(1),i=this.stream.peekChar();let r=0;for(;r<6&&(i>=os&&i<=ls||i>=ro&&i<=Zb||i>=so&&i<=tg);)this.stream.advance(1),i=this.stream.peekChar(),r++;if(r>0){try{let s=parseInt(this.stream.substring(this.stream.pos()-r),16);s&&e.push(String.fromCharCode(s))}catch{}return i===xh||i===Ah?this.stream.advance(1):this._newline([]),!0}if(i!==sr&&i!==ds&&i!==rr)return this.stream.advance(1),e.push(String.fromCharCode(i)),!0;if(n)return this._newline(e)}return!1}_stringChar(e,n){let i=this.stream.peekChar();return i!==0&&i!==e&&i!==Ch&&i!==sr&&i!==ds&&i!==rr?(this.stream.advance(1),n.push(String.fromCharCode(i)),!0):!1}_string(e){if(this.stream.peekChar()===ag||this.stream.peekChar()===sg){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)),d.String):d.BadString}return null}_unquotedChar(e){let n=this.stream.peekChar();return n!==0&&n!==Ch&&n!==ag&&n!==sg&&n!==dg&&n!==hg&&n!==xh&&n!==Ah&&n!==rr&&n!==ds&&n!==sr?(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===xh||n===Ah||n===rr||n===ds||n===sr)>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===ig||n>=ro&&n<=eg||n>=so&&n<=ng||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_minus(e){let n=this.stream.peekChar();return n===Vn?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_identChar(e){let n=this.stream.peekChar();return n===ig||n===Vn||n>=ro&&n<=eg||n>=so&&n<=ng||n>=os&&n<=ls||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(cg)){let e=i=>i>=os&&i<=ls||i>=ro&&i<=Zb||i>=so&&i<=tg,n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(i=>i===oS);if(n>=1&&n<=6)if(this.stream.advanceIfChar(Vn)){let i=this.stream.advanceWhileChar(e);if(i>=1&&i<=6)return!0}else return!0}return!1}}});function Fe(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function pg(t,e,n=4){let i=Math.abs(t.length-e.length);if(i>n)return 0;let r=[],s=[],a,o;for(a=0;a0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}function mg(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}var gn=Q(()=>{"use strict"});function qo(t,e){let n=null;return!t||et.end?null:(t.accept(i=>i.offset===-1&&i.length===-1?!0:i.offset<=e&&i.end>=e?(n?i.length<=n.length&&(n=i):n=i,!0):!1),n)}function mr(t,e){let n=qo(t,e),i=[];for(;n;)i.unshift(n),n=n.parent;return i}function fg(t){let e=t.findParent(u.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}var u,re,z,st,lo,Ne,co,mi,he,Ct,Ot,Pt,ar,ho,He,po,Gn,Mh,xt,Zt,At,uo,mo,fo,bo,go,wn,wo,or,hs,lr,ps,Kn,_o,So,yo,vo,Fo,Jn,Yn,Xn,fi,Co,xo,Ao,Eo,ko,Qn,cr,bi,dr,_n,Mo,Ro,hr,Zn,Do,Oo,gi,Po,dS,hS,pS,wi,en,_i,ei,tn,Io,To,Sn,Ut,pr,zo,No,Wo,us,Je,ur,Lo,Ye=Q(()=>{"use strict";gn();(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.Scope=52]="Scope",t[t.Keyframe=53]="Keyframe",t[t.FontFace=54]="FontFace",t[t.Import=55]="Import",t[t.Namespace=56]="Namespace",t[t.Invocation=57]="Invocation",t[t.FunctionDeclaration=58]="FunctionDeclaration",t[t.ReturnStatement=59]="ReturnStatement",t[t.MediaQuery=60]="MediaQuery",t[t.MediaCondition=61]="MediaCondition",t[t.MediaFeature=62]="MediaFeature",t[t.FunctionParameter=63]="FunctionParameter",t[t.FunctionArgument=64]="FunctionArgument",t[t.KeyframeSelector=65]="KeyframeSelector",t[t.ViewPort=66]="ViewPort",t[t.Document=67]="Document",t[t.AtApplyRule=68]="AtApplyRule",t[t.CustomPropertyDeclaration=69]="CustomPropertyDeclaration",t[t.CustomPropertySet=70]="CustomPropertySet",t[t.ListEntry=71]="ListEntry",t[t.Supports=72]="Supports",t[t.SupportsCondition=73]="SupportsCondition",t[t.NamespacePrefix=74]="NamespacePrefix",t[t.GridLine=75]="GridLine",t[t.Plugin=76]="Plugin",t[t.UnknownAtRule=77]="UnknownAtRule",t[t.Use=78]="Use",t[t.ModuleConfiguration=79]="ModuleConfiguration",t[t.Forward=80]="Forward",t[t.ForwardVisibility=81]="ForwardVisibility",t[t.Module=82]="Module",t[t.UnicodeRange=83]="UnicodeRange",t[t.Layer=84]="Layer",t[t.LayerNameList=85]="LayerNameList",t[t.LayerName=86]="LayerName",t[t.PropertyAtRule=87]="PropertyAtRule",t[t.Container=88]="Container",t[t.ModuleConfig=89]="ModuleConfig",t[t.SelectorList=90]="SelectorList",t[t.StartingStyleAtRule=91]="StartingStyleAtRule"})(u||(u={}));(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"})(re||(re={}));z=class{get end(){return this.offset+this.length}constructor(e=-1,n=-1,i){this.parent=null,this.offset=e,this.length=n,i&&(this.nodeType=i)}set type(e){this.nodeType=e}get type(){return this.nodeType||u.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 r=e.parent.children.indexOf(e);r>=0&&e.parent.children.splice(r,1)}e.parent=this;let i=this.children;return i||(i=this.children=[]),n!==-1?i.splice(n,0,e):i.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,i=-1){return n?(n.attachTo(this,i),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;i--)if(n=this.children[i],n.offset<=e)return n}return null}findChildAtOffset(e,n){let i=this.findFirstChildBeforeOffset(e);return i&&i.end>=e?n&&i.findChildAtOffset(e,!0)||i:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof st;)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(i=>n.type===i);)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]}},st=class extends z{constructor(e,n=-1){super(-1,-1),this.attachTo(e,n),this.offset=-1,this.length=-1}},lo=class extends z{constructor(e,n){super(e,n)}get type(){return u.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}},Ne=class extends z{constructor(e,n){super(e,n),this.isCustomProperty=!1}get type(){return u.Identifier}containsInterpolation(){return this.hasChildren()}},co=class extends z{constructor(e,n){super(e,n)}get type(){return u.Stylesheet}},mi=class extends z{constructor(e,n){super(e,n)}get type(){return u.Declarations}},he=class extends z{constructor(e,n){super(e,n)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}},Ct=class extends he{constructor(e,n){super(e,n)}get type(){return u.Ruleset}getSelectors(){return this.selectors||(this.selectors=new st(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(u.Declarations)!==null}},Ot=class extends z{constructor(e,n){super(e,n)}get type(){return u.Selector}},Pt=class extends z{constructor(e,n){super(e,n)}get type(){return u.SimpleSelector}},ar=class extends z{constructor(e,n){super(e,n)}},ho=class extends he{constructor(e,n){super(e,n)}get type(){return u.CustomPropertySet}},He=class t extends ar{constructor(e,n){super(e,n),this.property=null}get type(){return u.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 mi&&this.parent.getParent()instanceof hs){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}},po=class extends He{constructor(e,n){super(e,n)}get type(){return u.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}},Gn=class extends z{constructor(e,n){super(e,n)}get type(){return u.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return ug(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}},Mh=class extends z{constructor(e,n){super(e,n)}get type(){return u.Invocation}getArguments(){return this.arguments||(this.arguments=new st(this)),this.arguments}},xt=class extends Mh{constructor(e,n){super(e,n)}get type(){return u.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},Zt=class extends z{constructor(e,n){super(e,n)}get type(){return u.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}},At=class extends z{constructor(e,n){super(e,n)}get type(){return u.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}},uo=class extends he{constructor(e,n){super(e,n)}get type(){return u.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}},mo=class extends he{constructor(e,n){super(e,n)}get type(){return u.For}setVariable(e){return this.setNode("variable",e,0)}},fo=class extends he{constructor(e,n){super(e,n)}get type(){return u.Each}getVariables(){return this.variables||(this.variables=new st(this)),this.variables}},bo=class extends he{constructor(e,n){super(e,n)}get type(){return u.While}},go=class extends he{constructor(e,n){super(e,n)}get type(){return u.Else}},wn=class extends he{constructor(e,n){super(e,n)}get type(){return u.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 st(this)),this.parameters}},wo=class extends he{constructor(e,n){super(e,n)}get type(){return u.ViewPort}},or=class extends he{constructor(e,n){super(e,n)}get type(){return u.FontFace}},hs=class extends he{constructor(e,n){super(e,n)}get type(){return u.NestedProperties}},lr=class extends he{constructor(e,n){super(e,n)}get type(){return u.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():""}},ps=class extends he{constructor(e,n){super(e,n)}get type(){return u.KeyframeSelector}},Kn=class extends z{constructor(e,n){super(e,n)}get type(){return u.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}},_o=class extends z{get type(){return u.Use}setParameters(e){return this.setNode("parameters",e)}getParameters(){return this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},So=class extends z{get type(){return u.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}},yo=class extends z{get type(){return u.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}setParameters(e){return this.setNode("parameters",e)}getParameters(){return this.parameters}},vo=class extends z{get type(){return u.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Fo=class extends z{constructor(e,n){super(e,n)}get type(){return u.Namespace}},Jn=class extends he{constructor(e,n){super(e,n)}get type(){return u.Media}},Yn=class extends he{constructor(e,n){super(e,n)}get type(){return u.Scope}},Xn=class extends z{constructor(e,n){super(e,n)}get type(){return u.Scope}getScopeStart(){return this.scopeStart}setScopeStart(e){return this.setNode("scopeStart",e)}getScopeEnd(){return this.scopeEnd}setScopeEnd(e){return this.setNode("scopeEnd",e)}getName(){let e="";return this.scopeStart&&(e+=this.scopeStart.getText()),this.scopeEnd&&(e+=`${this.scopeStart?" ":""}\u2192 ${this.scopeEnd.getText()}`),e}},fi=class extends he{constructor(e,n){super(e,n)}get type(){return u.Supports}},Co=class extends he{constructor(e,n){super(e,n)}get type(){return u.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}},xo=class extends he{constructor(e,n){super(e,n)}get type(){return u.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}},Ao=class extends he{constructor(e,n){super(e,n)}get type(){return u.StartingStyleAtRule}},Eo=class extends he{constructor(e,n){super(e,n)}get type(){return u.Document}},ko=class extends he{constructor(e,n){super(e,n)}get type(){return u.Container}},Qn=class extends z{constructor(e,n){super(e,n)}},cr=class extends z{constructor(e,n){super(e,n)}get type(){return u.MediaQuery}},bi=class extends z{constructor(e,n){super(e,n)}get type(){return u.MediaCondition}},dr=class extends z{constructor(e,n){super(e,n)}get type(){return u.MediaFeature}},_n=class extends z{constructor(e,n){super(e,n)}get type(){return u.SupportsCondition}},Mo=class extends he{constructor(e,n){super(e,n)}get type(){return u.Page}},Ro=class extends he{constructor(e,n){super(e,n)}get type(){return u.PageBoxMarginBox}},hr=class extends z{constructor(e,n){super(e,n)}get type(){return u.Expression}},Zn=class extends z{constructor(e,n){super(e,n)}get type(){return u.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}},Do=class extends z{constructor(e,n){super(e,n)}get type(){return u.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}},Oo=class extends z{constructor(e,n){super(e,n)}get type(){return u.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}},gi=class extends z{constructor(e,n){super(e,n)}get type(){return u.HexColorValue}},Po=class extends z{constructor(e,n){super(e,n)}get type(){return u.RatioValue}},dS=46,hS=48,pS=57,wi=class extends z{constructor(e,n){super(e,n)}get type(){return u.NumericValue}getValue(){let e=this.getText(),n=0,i;for(let r=0,s=e.length;r{"use strict";de=Ke(gt(),1),le=class{constructor(e,n){this.id=e,this.message=n}},g={NumberExpected:new le("css-numberexpected",de.t("number expected")),ConditionExpected:new le("css-conditionexpected",de.t("condition expected")),RuleOrSelectorExpected:new le("css-ruleorselectorexpected",de.t("at-rule or selector expected")),DotExpected:new le("css-dotexpected",de.t("dot expected")),ColonExpected:new le("css-colonexpected",de.t("colon expected")),SemiColonExpected:new le("css-semicolonexpected",de.t("semi-colon expected")),TermExpected:new le("css-termexpected",de.t("term expected")),ExpressionExpected:new le("css-expressionexpected",de.t("expression expected")),OperatorExpected:new le("css-operatorexpected",de.t("operator expected")),IdentifierExpected:new le("css-identifierexpected",de.t("identifier expected")),PercentageExpected:new le("css-percentageexpected",de.t("percentage expected")),URIOrStringExpected:new le("css-uriorstringexpected",de.t("uri or string expected")),URIExpected:new le("css-uriexpected",de.t("URI expected")),VariableNameExpected:new le("css-varnameexpected",de.t("variable name expected")),VariableValueExpected:new le("css-varvalueexpected",de.t("variable value expected")),PropertyValueExpected:new le("css-propertyvalueexpected",de.t("property value expected")),LeftCurlyExpected:new le("css-lcurlyexpected",de.t("{ expected")),RightCurlyExpected:new le("css-rcurlyexpected",de.t("} expected")),LeftSquareBracketExpected:new le("css-rbracketexpected",de.t("[ expected")),RightSquareBracketExpected:new le("css-lbracketexpected",de.t("] expected")),LeftParenthesisExpected:new le("css-lparentexpected",de.t("( expected")),RightParenthesisExpected:new le("css-rparentexpected",de.t(") expected")),CommaExpected:new le("css-commaexpected",de.t("comma expected")),PageDirectiveOrDeclarationExpected:new le("css-pagedirordeclexpected",de.t("page directive or declaraton expected")),UnknownAtRule:new le("css-unknownatrule",de.t("at-rule unknown")),UnknownKeyword:new le("css-unknownkeyword",de.t("unknown keyword")),SelectorExpected:new le("css-selectorexpected",de.t("selector expected")),StringLiteralExpected:new le("css-stringliteralexpected",de.t("string literal expected")),WhitespaceExpected:new le("css-whitespaceexpected",de.t("whitespace expected")),MediaQueryExpected:new le("css-mediaqueryexpected",de.t("media query expected")),IdentifierOrWildcardExpected:new le("css-idorwildcardexpected",de.t("identifier or wildcard expected")),WildcardExpected:new le("css-wildcardexpected",de.t("wildcard expected")),IdentifierOrVariableExpected:new le("css-idorvarexpected",de.t("identifier or variable expected")),IfConditionExpected:new le("css-ifconditionexpected",de.t("if condition expected"))}});function Rh(t,e){if(t.length<=1)return t;let n=t.length/2|0,i=t.slice(0,n),r=t.slice(n);Rh(i,e),Rh(r,e);let s=0,a=0,o=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function uS(t){let e=wg(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var $o,fr,_g=Q(()=>{"use strict";$o=class t{constructor(e,n,i,r){this._uri=e,this._languageId=n,this._version=i,this._content=r,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),i=this.offsetAt(e.end);return this._content.substring(n,i)}return this._content}update(e,n){for(let i of e)if(t.isIncremental(i)){let r=wg(i.range),s=this.offsetAt(r.start),a=this.offsetAt(r.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(a,this._content.length);let o=Math.max(r.start.line,0),l=Math.max(r.end.line,0),c=this._lineOffsets,h=bg(i.text,!1,s);if(l-o===h.length)for(let w=0,S=h.length;we?r=a:i=a+1}let s=i-1;return e=this.ensureBeforeEOL(e,n[s]),{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 i=n[e.line];if(e.character<=0)return i;let r=e.line+1n&&gg(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(t){function e(r,s,a,o){return new $o(r,s,a,o)}t.create=e;function n(r,s,a){if(r instanceof $o)return r.update(s,a),r;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function i(r,s){let a=r.getText(),o=Rh(s.map(uS),(h,m)=>{let w=h.range.start.line-m.range.start.line;return w===0?h.range.start.character-m.range.start.character:w}),l=0,c=[];for(let h of o){let m=r.offsetAt(h.range.start);if(ml&&c.push(a.substring(l,m)),h.newText.length&&c.push(h.newText),l=r.offsetAt(h.range.end)}return c.push(a.substr(l)),c.join("")}t.applyEdits=i})(fr||(fr={}))});var Sg,Xe,Et=Q(()=>{"use strict";Kr();_g();(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[at.Markdown,at.PlainText]}},hover:{contentFormat:[at.Markdown,at.PlainText]}}}})(Sg||(Sg={}));(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(Xe||(Xe={}))});function yg(t){switch(t){case"nonstandard":return`\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it. + +`;case"obsolete":return`\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it. + +`;default:return""}}function vg(t,e){if(t.status==="false"){let i=SS(e),r="Limited availability across major browsers";return i&&(r+=` (Not fully implemented in ${i})`),r}let n=t.baseline_low_date?.split("-")[0];return`${t.status==="low"?"Newly":"Widely"} available across major browsers (Baseline since ${n})`}function bS(t){if(!t)return"";let e;switch(t?.status){case"low":e=Dh.BASELINE_LOW;break;case"high":e=Dh.BASELINE_HIGH;break;default:e=Dh.BASELINE_LIMITED}return`![Baseline icon](${e})`}function Bt(t,e,n){let i;if(e?i={kind:"markdown",value:wS(t,n)}:i={kind:"plaintext",value:gS(t,n)},i.value!=="")return i}function Oh(t){return t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),t.replace(//g,">")}function gS(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;let n="";if(e?.documentation!==!1){let i="";t.status&&(i=yg(t.status),n+=i),n+=t.description,t.baseline&&!i&&(n+=` + +${vg(t.baseline,t.browsers)}`),"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(i=>`${i.name}: ${i.url}`).join(" | ")),n}function wS(t,e){if(!t.description||t.description==="")return"";let n="";if(e?.documentation!==!1){let i="";t.status&&(i=yg(t.status),n+=i),typeof t.description=="string"?n+=Oh(t.description):n+=t.description.kind===at.Markdown?t.description.value:Oh(t.description.value),t.baseline&&!i&&(n+=` + +${bS(t.baseline)} _${vg(t.baseline,t.browsers)}_`),"syntax"in t&&t.syntax&&(n+=` + +Syntax: ${Oh(t.syntax)}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` + +`),n+=t.references.map(i=>`[${i.name}](${i.url})`).join(" | ")),n}function SS(t){if(!t)return"";let e=new Map(Object.entries(mS));for(let n of t){let i=fS.exec(n);if(!i)continue;let r=i[1];e.delete(r)}return _S.format(Object.values(Array.from(e.entries()).reduce((n,[i,r])=>r.name in n||i==="E"?(n[r.name]=r.name,n):(n[r.name]=`${r.name} on ${r.platform}`,n),{})))}var mS,fS,Dh,_S,Fg=Q(()=>{"use strict";Et();mS={C:{name:"Chrome",platform:"desktop"},CA:{name:"Chrome",platform:"Android"},E:{name:"Edge",platform:"desktop"},FF:{name:"Firefox",platform:"desktop"},FFA:{name:"Firefox",platform:"Android"},S:{name:"Safari",platform:"macOS"},SM:{name:"Safari",platform:"iOS"}},fS=/(E|FFA|FF|SM|S|CA|C|IE|O)([\d|\.]+)?/,Dh={BASELINE_LIMITED:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ncmF5LXNoYXBlIHsKICAgICAgZmlsbDogI0M2QzZDNjsgLyogTGlnaHQgbW9kZSAqLwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgLmdyYXktc2hhcGUgewogICAgICAgIGZpbGw6ICM1NjU2NTY7IC8qIERhcmsgbW9kZSAqLwogICAgICB9CiAgICB9CiAgPC9zdHlsZT4KICA8cGF0aCBkPSJNMTUwIDBMMjQwIDkwTDIxMCAxMjBMMTIwIDMwTDE1MCAwWiIgZmlsbD0iI0YwOTQwOSIvPgogIDxwYXRoIGQ9Ik00MjAgMzBMNTQwIDE1MEw0MjAgMjcwTDM5MCAyNDBMNDgwIDE1MEwzOTAgNjBMNDIwIDMwWiIgY2xhc3M9ImdyYXktc2hhcGUiLz4KICA8cGF0aCBkPSJNMzMwIDE4MEwzMDAgMjEwTDM5MCAzMDBMNDIwIDI3MEwzMzAgMTgwWiIgZmlsbD0iI0YwOTQwOSIvPgogIDxwYXRoIGQ9Ik0xMjAgMzBMMTUwIDYwTDYwIDE1MEwxNTAgMjQwTDEyMCAyNzBMMCAxNTBMMTIwIDMwWiIgY2xhc3M9ImdyYXktc2hhcGUiLz4KICA8cGF0aCBkPSJNMzkwIDBMNDIwIDMwTDE1MCAzMDBMMTIwIDI3MEwzOTAgMFoiIGZpbGw9IiNGMDk0MDkiLz4KPC9zdmc+",BASELINE_LOW:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ibHVlLXNoYXBlIHsKICAgICAgZmlsbDogI0E4QzdGQTsgLyogTGlnaHQgbW9kZSAqLwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgLmJsdWUtc2hhcGUgewogICAgICAgIGZpbGw6ICMyRDUwOUU7IC8qIERhcmsgbW9kZSAqLwogICAgICB9CiAgICB9CgogICAgLmRhcmtlci1ibHVlLXNoYXBlIHsKICAgICAgICBmaWxsOiAjMUI2RUYzOwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgICAuZGFya2VyLWJsdWUtc2hhcGUgewogICAgICAgICAgICBmaWxsOiAjNDE4NUZGOwogICAgICAgIH0KICAgIH0KCiAgPC9zdHlsZT4KICA8cGF0aCBkPSJNMTUwIDBMMTgwIDMwTDE1MCA2MEwxMjAgMzBMMTUwIDBaIiBjbGFzcz0iYmx1ZS1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0yMTAgNjBMMjQwIDkwTDIxMCAxMjBMMTgwIDkwTDIxMCA2MFoiIGNsYXNzPSJibHVlLXNoYXBlIi8+CiAgPHBhdGggZD0iTTQ1MCA2MEw0ODAgOTBMNDUwIDEyMEw0MjAgOTBMNDUwIDYwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNNTEwIDEyMEw1NDAgMTUwTDUxMCAxODBMNDgwIDE1MEw1MTAgMTIwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNNDUwIDE4MEw0ODAgMjEwTDQ1MCAyNDBMNDIwIDIxMEw0NTAgMTgwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNMzkwIDI0MEw0MjAgMjcwTDM5MCAzMDBMMzYwIDI3MEwzOTAgMjQwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNMzMwIDE4MEwzNjAgMjEwTDMzMCAyNDBMMzAwIDIxMEwzMzAgMTgwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNOTAgNjBMMTIwIDkwTDkwIDEyMEw2MCA5MEw5MCA2MFoiIGNsYXNzPSJibHVlLXNoYXBlIi8+CiAgPHBhdGggZD0iTTM5MCAwTDQyMCAzMEwxNTAgMzAwTDAgMTUwTDMwIDEyMEwxNTAgMjQwTDM5MCAwWiIgY2xhc3M9ImRhcmtlci1ibHVlLXNoYXBlIi8+Cjwvc3ZnPg==",BASELINE_HIGH:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ncmVlbi1zaGFwZSB7CiAgICAgIGZpbGw6ICNDNEVFRDA7IC8qIExpZ2h0IG1vZGUgKi8KICAgIH0KCiAgICBAbWVkaWEgKHByZWZlcnMtY29sb3Itc2NoZW1lOiBkYXJrKSB7CiAgICAgIC5ncmVlbi1zaGFwZSB7CiAgICAgICAgZmlsbDogIzEyNTIyNTsgLyogRGFyayBtb2RlICovCiAgICAgIH0KICAgIH0KICA8L3N0eWxlPgogIDxwYXRoIGQ9Ik00MjAgMzBMMzkwIDYwTDQ4MCAxNTBMMzkwIDI0MEwzMzAgMTgwTDMwMCAyMTBMMzkwIDMwMEw1NDAgMTUwTDQyMCAzMFoiIGNsYXNzPSJncmVlbi1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0xNTAgMEwzMCAxMjBMNjAgMTUwTDE1MCA2MEwyMTAgMTIwTDI0MCA5MEwxNTAgMFoiIGNsYXNzPSJncmVlbi1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0zOTAgMEw0MjAgMzBMMTUwIDMwMEwwIDE1MEwzMCAxMjBMMTUwIDI0MEwzOTAgMFoiIGZpbGw9IiMxRUE0NDYiLz4KPC9zdmc+"};_S=new Intl.ListFormat("en",{style:"long",type:"disjunction"})});function Ge(t,e,n=0,i=1){let s=t.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(s){s[2]&&(e=100);let a=parseFloat(s[1])/e;if(a>=n&&a<=i)return a}throw new Error}function Uo(t){let e=t.getText();if(e==="none")return 0;let n=/^(?[-+]?[0-9]*\.?[0-9]+)(?deg|rad|grad|turn)?$/iu.exec(e);if(n?.groups?.numberString){let i=Number.parseFloat(n.groups.numberString);if(!Number.isNaN(i))switch(n.groups.unit){case"deg":return i%Si;case"grad":return i*xS%Si;case"rad":return i*kg%Si;case"turn":return i*Si%Si;default:return i%Si}}throw new Error(`Failed to parse '${e}' as angle`)}function Mg(t){let e=t.getName();return e?vS.test(e):!1}function Ph(t){return yS.test(t)||FS.test(t)||CS.test(t)}function Oe(t){return t=Bo&&t<=kS?t-Bo+10:0)}function xg(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:Oe(t.charCodeAt(1))*17/255,green:Oe(t.charCodeAt(2))*17/255,blue:Oe(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Oe(t.charCodeAt(1))*17/255,green:Oe(t.charCodeAt(2))*17/255,blue:Oe(t.charCodeAt(3))*17/255,alpha:Oe(t.charCodeAt(4))*17/255};case 7:return{red:(Oe(t.charCodeAt(1))*16+Oe(t.charCodeAt(2)))/255,green:(Oe(t.charCodeAt(3))*16+Oe(t.charCodeAt(4)))/255,blue:(Oe(t.charCodeAt(5))*16+Oe(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Oe(t.charCodeAt(1))*16+Oe(t.charCodeAt(2)))/255,green:(Oe(t.charCodeAt(3))*16+Oe(t.charCodeAt(4)))/255,blue:(Oe(t.charCodeAt(5))*16+Oe(t.charCodeAt(6)))/255,alpha:(Oe(t.charCodeAt(7))*16+Oe(t.charCodeAt(8)))/255}}return null}function Rg(t,e,n,i=1){if(t=t/60,e===0)return{red:n,green:n,blue:n,alpha:i};{let r=(o,l,c)=>{for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-o)*c+o:c<3?l:c<4?(l-o)*(4-c)+o:o},s=n<=.5?n*(e+1):n+e-n*e,a=n*2-s;return{red:r(a,s,t+2),green:r(a,s,t),blue:r(a,s,t-2),alpha:i}}}function Ih(t){let e=t.red,n=t.green,i=t.blue,r=t.alpha,s=Math.max(e,n,i),a=Math.min(e,n,i),o=0,l=0,c=(a+s)/2,h=s-a;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case e:o=(n-i)/h+(n=1){let l=e/(e+n);return{red:l,green:l,blue:l,alpha:i}}let r=Rg(t,1,.5,i),s=r.red;s*=1-e-n,s+=e;let a=r.green;a*=1-e-n,a+=e;let o=r.blue;return o*=1-e-n,o+=e,{red:s,green:a,blue:o,alpha:i}}function Dg(t){let e=Ih(t),n=Math.min(t.red,t.green,t.blue),i=1-Math.max(t.red,t.green,t.blue);return{h:e.h,w:n,b:i,a:e.a}}function RS(t){let e={x:0,y:0,z:0,alpha:t.alpha??1};e.y=(t.l+16)/116,e.x=t.a/500+e.y,e.z=e.y-t.b/200;let n;for(n in e){let i=e[n]*e[n]*e[n];i>.008856?e[n]=i:e[n]=(e[n]-16/116)/7.787}return e.x=e.x*95.047,e.y=e.y*100,e.z=e.z*108.883,e}function DS(t){let e=t.l+.3963377774*t.a+.2158037573*t.b,n=t.l-.1055613458*t.a-.0638541728*t.b,i=t.l-.0894841775*t.a-1.291485548*t.b,r=e**3,s=n**3,a=i**3,o=1.2270138511*r-.5577999807*s+.281256149*a,l=-.0405801784*r+1.1122568696*s-.0716766787*a,c=-.0763812845*r-.4214819784*s+1.5861632204*a;return{x:o*100,y:l*100,z:c*100,alpha:t.alpha??1}}function OS(t){let e=t.x/100,n=t.y/100,i=t.z/100,r=3.2406254773200533*e-1.5372079722103187*n-.4986285986982479*i,s=-.9689307147293197*e+1.8757560608852415*n+.041517523842953964*i,a=.055710120445510616*e+-.2040210505984867*n+1.0569959422543882*i,o=l=>l<=.0031308?12.92*l:Math.min(1.055*Math.pow(l,1/2.4)-.055,1);return{red:Math.round(o(r)*255),blue:Math.round(o(a)*255),green:Math.round(o(s)*255),alpha:t.alpha}}function Og(t){let e=t.red,n=t.green,i=t.blue;e>.04045?e=Math.pow((e+.055)/1.055,2.4):e=e/12.92,n>.04045?n=Math.pow((n+.055)/1.055,2.4):n=n/12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i=i/12.92,e=e*100,n=n*100,i=i*100;let r=e*.4124+n*.3576+i*.1805,s=e*.2126+n*.7152+i*.0722,a=e*.0193+n*.1192+i*.9505;return{x:r,y:s,z:a,alpha:t.alpha}}function PS(t,e=!0){let s=t.x/95.047,a=t.y/100,o=t.z/108.883;s>.008856?s=Math.pow(s,1/3):s=7.787*s+16/116,a>.008856?a=Math.pow(a,1/3):a=7.787*a+16/116,o>.008856?o=Math.pow(o,1/3):o=7.787*o+16/116;let l=116*a-16,c=500*(s-a),h=200*(a-o);return e?{l:Math.round((l+Number.EPSILON)*100)/100,a:Math.round((c+Number.EPSILON)*100)/100,b:Math.round((h+Number.EPSILON)*100)/100,alpha:t.alpha}:{l,a:c,b:h,alpha:t.alpha}}function IS(t,e=!0){let n=t.x/100,i=t.y/100,r=t.z/100,s=.8189330101*n+.3618667424*i-.1288597137*r,a=.0329845436*n+.9293118715*i+.0361456387*r,o=.0482003018*n+.2643662691*i+.633851707*r,l=Math.cbrt(s),c=Math.cbrt(a),h=Math.cbrt(o),m=.2104542553*l+.793617785*c-.0040720468*h,w=1.9779984951*l-2.428592205*c+.4505937099*h,S=.0259040371*l+.7827717662*c-.808675766*h;return e?{l:Number(m.toFixed(5)),a:Number(w.toFixed(5)),b:Number(S.toFixed(5)),alpha:t.alpha}:{l:m,a:w,b:S,alpha:t.alpha}}function Th(t,e=!0){let n=Og(t);return PS(n,e)}function zh(t,e=!0){let n=Og(t),i=IS(n,e);return{...i,l:i.l*100}}function Pg(t){let e=Math.sqrt(Math.pow(t.a,2)+Math.pow(t.b,2)),n=Math.atan2(t.b,t.a)*kg;for(;n<0;)n=n+360;return{l:t.l,c:e,h:n,alpha:t.alpha}}function Ig(t){let e=Th(t,!1),n=Pg(e);return{l:Math.round((n.l+Number.EPSILON)*100)/100,c:Math.round((n.c+Number.EPSILON)*100)/100,h:Math.round((n.h+Number.EPSILON)*100)/100,alpha:n.alpha}}function Tg(t){let e=zh(t,!1),n=Pg(e);return{l:Number(n.l.toFixed(3)),c:Number(n.c.toFixed(5)),h:Number(n.h.toFixed(3)),alpha:n.alpha}}function zg(t,e){let n=e(t),i=OS(n);return{red:(i.red>=0?Math.min(i.red,255):0)/255,green:(i.green>=0?Math.min(i.green,255):0)/255,blue:(i.blue>=0?Math.min(i.blue,255):0)/255,alpha:t.alpha??1}}function Ng(t,e,n,i=1){return zg({l:t,a:e,b:n,alpha:i},RS)}function Wg(t,e,n,i=1){return zg({l:t,a:e,b:n,alpha:i},DS)}function Lg(t,e,n,i=1){return{l:t,a:e*Math.cos(n*Ag),b:e*Math.sin(n*Ag),alpha:i}}function TS(t,e,n,i=1){let r=Lg(t,e,n,i);return Ng(r.l,r.a,r.b,i)}function zS(t,e,n,i=1){let r=Lg(t,e,n,i);return Wg(r.l,r.a,r.b,i)}function qg(t){if(t.type===u.HexColorValue){let e=t.getText();return xg(e)}else if(t.type===u.Function){let e=t,n=e.getName(),i=e.getArguments().getChildren();if(i.length===1){let r=i[0].getChildren();if(r.length===1&&r[0].type===u.Expression&&(i=r[0].getChildren(),i.length===3)){let s=i[2];if(s instanceof Zn){let a=s.getLeft(),o=s.getRight(),l=s.getOperator();a&&o&&l&&l.matches("/")&&(i=[i[0],i[1],a,o])}}}if(!n||i.length<3||i.length>4)return null;try{let r=i.length===4?Ge(i[3],1):1;switch(n){case"rgb":case"rgba":return{red:Ge(i[0],255),green:Ge(i[1],255),blue:Ge(i[2],255),alpha:r};case"hsl":case"hsla":{let s=Uo(i[0]),a=Ge(i[1],100),o=Ge(i[2],100);return Rg(s,a,o,r)}case"hwb":{let s=Uo(i[0]),a=Ge(i[1],100),o=Ge(i[2],100);return MS(s,a,o,r)}case"lab":{let s=Ge(i[0],100),a=Ge(i[1],125,-1),o=Ge(i[2],125,-1);return Ng(s*100,a*125,o*125,r)}case"lch":{let s=Ge(i[0],100),a=Ge(i[1],230),o=Uo(i[2]);return TS(s*100,a*230,o,r)}case"oklab":{let s=Ge(i[0],1),a=Ge(i[1],.4,-1),o=Ge(i[2],.4,-1);return Wg(s,a*.4,o*.4,r)}case"oklch":{let s=Ge(i[0],1),a=Ge(i[1],.4),o=Uo(i[2]);return zS(s,a*.4,o,r)}}}catch{return null}}else if(t.type===u.Identifier){if(t.parent&&t.parent.type!==u.Term)return null;let e=t.parent;if(e&&e.parent&&e.parent.type===u.BinaryExpression){let r=e.parent;if(r.parent&&r.parent.type===u.ListEntry&&r.parent.key===r)return null}let n=t.getText().toLowerCase();if(n==="none")return null;let i=ms[n];if(i)return xg(i)}return null}var Ce,yS,Eg,vS,ms,FS,Vo,CS,Si,xS,kg,Cg,AS,ES,Bo,kS,Ag,jg=Q(()=>{"use strict";Ye();Ce=Ke(gt(),1),yS=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,Eg=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("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:Ce.t("Mix two colors together in a polar color space.")},{label:"lab",func:"lab($lightness $channel_a $channel_b $alpha)",insertText:"lab(${1:lightness} ${2:a} ${3:b} ${4:alpha})",desc:Ce.t("css.builtin.lab","Creates a Color from Lightness, Channel a, Channel b and alpha values.")},{label:"lab relative",func:"lab(from $color $lightness $channel_a $channel_b $alpha)",insertText:"lab(from ${1:color} ${2:lightness} ${3:channel_a} ${4:channel_b} ${5:alpha})",desc:Ce.t("css.builtin.lab","Creates a Color from Lightness, Channel a, Channel b and alpha values of another Color.")},{label:"lch",func:"lch($lightness $chrome $hue $alpha)",insertText:"lch(${1:lightness} ${2:chrome} ${3:hue} ${4:alpha})",desc:Ce.t("css.builtin.lab","Creates a Color from Lightness, Chroma, Hue and alpha values.")},{label:"lch relative",func:"lch(from $color $lightness $chrome $hue $alpha)",insertText:"lch(from ${1:color} ${2:lightness} ${3:chrome} ${4:hue} ${5:alpha})",desc:Ce.t("css.builtin.lab","Creates a Color from Lightness, Chroma, Hue and alpha values of another Color.")}],vS=/^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch)$/iu,ms={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"},FS=new RegExp(`^(${Object.keys(ms).join("|")})$`,"i"),Vo={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."},CS=new RegExp(`^(${Object.keys(Vo).join("|")})$`,"i");Si=360,xS=.9,kg=Si/2/Math.PI;Cg=48,AS=57,ES=65,Bo=97,kS=102;Ag=Math.PI/180});var Nh,Wh,Lh,$g,qh,jh,$h,Uh,Bh,Vh,Hh,Ho,Ug,Bg,Vg,Hg=Q(()=>{"use strict";Nh={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."},Wh={"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."},Lh={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."},$g=["medium","thick","thin"],qh={"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."},jh={"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."},$h={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."},Uh={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /.","if()":"Evaluates a conditional expression."},Bh={"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."},Vh={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."},Hh={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Ho={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"]},Ug=["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"],Bg=["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"],Vg=["@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"]});var br=Q(()=>{"use strict";Fg();jg();Hg()});function fs(t){return Object.keys(t).map(e=>t[e])}function dt(t){return typeof t<"u"}var bs=Q(()=>{"use strict"});var nn,gs=Q(()=>{"use strict";Hn();Ye();jo();br();bs();nn=class{constructor(e=new Dt){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:d.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return d.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return d.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return d.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(),i=e();return i||(this.restoreAtMark(n),null)}acceptOneKeyword(e){if(d.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(u.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===d.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new z(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,n,i,r){if(!(e instanceof st)&&(n&&this.markError(e,n,i,r),this.prevToken)){let s=this.prevToken.offset+this.prevToken.len;e.length=s>e.offset?s-e.offset:0}return e}markError(e,n,i,r){this.token!==this.lastErrorToken&&(e.addIssue(new ur(e,n,Je.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(i||r)&&this.resync(i,r)}parseStylesheet(e){let n=e.version,i=e.getText(),r=(s,a)=>{if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return i.substr(s,a)};return this.internalParse(i,this._parseStylesheet,r)}internalParse(e,n,i){this.scanner.setSource(e),this.token=this.scanner.scan();let r=n.bind(this)();return r&&(i?r.textProvider=i:r.textProvider=(s,a)=>e.substr(s,a)),r}_parseStylesheet(){let e=this.create(co);for(;e.addChild(this._parseStylesheetStart()););let n=!1;do{let i=!1;do{i=!1;let r=this._parseStylesheetStatement();for(r&&(e.addChild(r),i=!0,n=!1,!this.peek(d.EOF)&&this._needsSemicolonAfter(r)&&!this.accept(d.SemiColon)&&this.markError(e,g.SemiColonExpected));this.accept(d.SemiColon)||this.accept(d.CDO)||this.accept(d.CDC);)i=!0,n=!1}while(i);if(this.peek(d.EOF))break;n||(this.peek(d.AtKeyword)?this.markError(e,g.UnknownAtRule):this.markError(e,g.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(d.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(d.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parseScope()||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseStartingStyleAtRule(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){let n=this.mark();if(this._parseSelector(e)){for(;this.accept(d.Comma)&&this._parseSelector(e););if(this.accept(d.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null}_parseRuleset(e=!1){let n=this.create(Ct),i=n.getSelectors();if(!i.addChild(this._parseSelector(e)))return null;for(;this.accept(d.Comma);)if(!i.addChild(this._parseSelector(e)))return this.finish(n,g.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseScope()||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseStartingStyleAtRule(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(d.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(d.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case u.Keyframe:case u.ViewPort:case u.Media:case u.Ruleset:case u.Namespace:case u.If:case u.For:case u.Each:case u.While:case u.MixinDeclaration:case u.FunctionDeclaration:case u.MixinContentDeclaration:case u.Scope:return!1;case u.ExtendsReference:case u.MixinContentReference:case u.ReturnStatement:case u.MediaQuery:case u.Debug:case u.Import:case u.AtApplyRule:case u.CustomPropertyDeclaration:return!0;case u.VariableDeclaration:return e.needsSemicolon;case u.MixinReference:return!e.getContent();case u.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){let n=this.create(mi);if(!this.accept(d.CurlyL))return null;let i=e();for(;n.addChild(i)&&!this.peek(d.CurlyR);){if(this._needsSemicolonAfter(i)&&!this.accept(d.SemiColon))return this.finish(n,g.SemiColonExpected,[d.SemiColon,d.CurlyR]);for(i&&this.prevToken&&this.prevToken.type===d.SemiColon&&(i.semicolonPosition=this.prevToken.offset);this.accept(d.SemiColon););i=e()}return this.accept(d.CurlyR)?this.finish(n):this.finish(n,g.RightCurlyExpected,[d.CurlyR,d.SemiColon])}_parseBody(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,g.LeftCurlyExpected,[d.CurlyR,d.SemiColon])}_parseSelector(e){let n=this.create(Ot),i=!1;for(e&&(i=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)i=!0,n.addChild(this._parseCombinator());return i?this.finish(n):null}_parseDeclaration(e,n=!1){let i=this._tryParseCustomPropertyDeclaration(e,n);if(i)return i;let r=this.create(He);return r.setProperty(this._parseProperty())?this.accept(d.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(d.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,g.PropertyValueExpected)):this.finish(r,g.ColonExpected,[d.Colon],e||[d.SemiColon]):null}_tryParseCustomPropertyDeclaration(e,n=!1){if(!this.peekRegExp(d.Ident,/^--/))return null;let i=this.create(po);if(!i.setProperty(this._parseProperty()))return null;if(!this.accept(d.Colon))return n?this.finish(i):this.finish(i,g.ColonExpected,[d.Colon]);this.prevToken&&(i.colonPosition=this.prevToken.offset);let r=this.mark();if(this.peek(d.CurlyL)){let a=this.create(ho),o=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(a.setDeclarations(o)&&!o.isErroneous(!0)&&(a.addChild(this._parsePrio()),this.peek(d.SemiColon)))return this.finish(a),i.setPropertySet(a),i.semicolonPosition=this.token.offset,this.finish(i);this.restoreAtMark(r)}let s=this._parseExpr();return s&&!s.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],d.SemiColon,d.EOF))?(i.setValue(s),this.peek(d.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)):(this.restoreAtMark(r),i.addChild(this._parseCustomPropertyValue(e)),i.addChild(this._parsePrio()),dt(i.colonPosition)&&this.token.offset===i.colonPosition+1?this.finish(i,g.PropertyValueExpected):this.finish(i))}_parseCustomPropertyValue(e=[d.CurlyR]){let n=this.create(z),i=()=>s===0&&a===0&&o===0,r=()=>e.indexOf(this.token.type)!==-1,s=0,a=0,o=0;e:for(;;){switch(this.token.type){case d.SemiColon:if(i())break e;break;case d.Exclamation:if(i())break e;break;case d.CurlyL:s++;break;case d.CurlyR:if(s--,s<0){if(r()&&a===0&&o===0)break e;return this.finish(n,g.LeftCurlyExpected)}break;case d.ParenthesisL:a++;break;case d.ParenthesisR:if(a--,a<0){if(r()&&o===0&&s===0)break e;return this.finish(n,g.LeftParenthesisExpected)}break;case d.BracketL:o++;break;case d.BracketR:if(o--,o<0)return this.finish(n,g.LeftSquareBracketExpected);break;case d.BadString:break e;case d.EOF:let l=g.RightCurlyExpected;return o>0?l=g.RightSquareBracketExpected:a>0&&(l=g.RightParenthesisExpected),this.finish(n,l)}this.consumeToken()}return this.finish(n)}_tryToParseDeclaration(e){let n=this.mark();return this._parseProperty()&&this.accept(d.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)}_parseProperty(){let e=this.create(Gn),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(d.Charset))return null;let e=this.create(z);return this.consumeToken(),this.accept(d.String)?this.accept(d.SemiColon)?this.finish(e):this.finish(e,g.SemiColonExpected):this.finish(e,g.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;let e=this.create(Kn);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,g.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(d.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,g.IdentifierExpected,[d.SemiColon]);if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[d.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(d.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(d.ParenthesisR))?this.finish(e,g.RightParenthesisExpected,[d.ParenthesisR],[]):(!this.peek(d.SemiColon)&&!this.peek(d.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;let e=this.create(Fo);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,g.URIExpected,[d.SemiColon]):this.accept(d.SemiColon)?this.finish(e):this.finish(e,g.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;let e=this.create(or);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(wo);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(d.AtKeyword,this.keyframeRegex))return null;let e=this.create(lr),n=this.create(z);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,g.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,g.IdentifierExpected,[d.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([re.Keyframe])}_parseKeyframeSelector(){let e=this.create(ps),n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(d.Percentage)&&(n=!0),!n)return null;for(;this.accept(d.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(d.Percentage)&&(n=!0),!n)return this.finish(e,g.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){let e=this.create(ps),n=this.mark(),i=!1;if(e.addChild(this._parseIdent())&&(i=!0),this.accept(d.Percentage)&&(i=!0),!i)return null;for(;this.accept(d.Comma);)if(i=!1,e.addChild(this._parseIdent())&&(i=!0),this.accept(d.Percentage)&&(i=!0),!i)return this.restoreAtMark(n),null;return this.peek(d.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;let e=this.create(xo);return this.consumeToken(),!this.peekRegExp(d.Ident,/^--/)||!e.setName(this._parseIdent([re.Property]))?this.finish(e,g.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseStartingStyleAtRule(e=!1){if(!this.peekKeyword("@starting-style"))return null;let n=this.create(Ao);return this.consumeToken(),this._parseBody(n,this._parseStartingStyleDeclaration.bind(this,e))}_parseStartingStyleDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;let n=this.create(Co);this.consumeToken();let i=this._parseLayerNameList();return i&&n.setNames(i),(!i||i.getChildren().length===1)&&this.peek(d.CurlyL)?this._parseBody(n,this._parseLayerDeclaration.bind(this,e)):this.accept(d.SemiColon)?this.finish(n):this.finish(n,g.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){let e=this.createNode(u.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(d.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,g.IdentifierExpected);return this.finish(e)}_parseLayerName(){let e=this.createNode(u.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,g.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;let n=this.create(fi);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(_n);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(d.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(_n);if(this.accept(d.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([d.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,g.ConditionExpected):this.accept(d.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,g.RightParenthesisExpected,[d.ParenthesisR],[]);if(this.peek(d.Ident)){let n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(d.ParenthesisL)){let i=1;for(;this.token.type!==d.EOF&&i!==0;)this.token.type===d.ParenthesisL?i++:this.token.type===d.ParenthesisR&&i--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,g.LeftParenthesisExpected,[],[d.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(Jn);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,g.MediaQueryExpected)}_parseMediaQueryList(){let e=this.create(Qn);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,g.MediaQueryExpected);for(;this.accept(d.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,g.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){let e=this.create(cr),n=this.mark();if(this.acceptIdent("not"),this.peek(d.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(Po);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(n):this.finish(n,g.NumberExpected):(this.restoreAtMark(e),null):null}_parseBooleanExpression(e){let n=this.create(z);if(this.acceptIdent("not")){if(!n.addChild(this._parseBooleanExpressionGroup(e)))return null}else{if(!n.addChild(this._parseBooleanExpressionGroup(e)))return null;if(this.peekIdent("and")){for(;this.acceptIdent("and");)if(!n.addChild(this._parseBooleanExpressionGroup(e)))return null}else if(this.peekIdent("or")){for(;this.acceptIdent("or");)if(!n.addChild(this._parseBooleanExpressionGroup(e)))return null}}return this.finish(n)}_parseBooleanExpressionGroup(e){let n=this.create(z),i=this.mark();if(this.accept(d.ParenthesisL)){if(n.addChild(this._parseBooleanExpression(e)))return this.accept(d.ParenthesisR)?this.finish(n):this.finish(n,g.RightParenthesisExpected,[],[d.CurlyL]);this.restoreAtMark(i)}return n.addChild(e())?this.finish(n):null}_parseMediaCondition(){let e=this.create(bi);this.acceptIdent("not");let n=!0;for(;n;){if(!this.accept(d.ParenthesisL))return this.finish(e,g.LeftParenthesisExpected,[],[d.CurlyL]);if(this.peek(d.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[],[d.CurlyL]);n=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){let e=[d.ParenthesisR],n=this.create(dr);if(n.addChild(this._parseMediaFeatureName())){if(this.accept(d.Colon)){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,g.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,g.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,g.TermExpected,[],e)}}else if(n.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(n,g.OperatorExpected,[],e);if(!n.addChild(this._parseMediaFeatureName()))return this.finish(n,g.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,g.TermExpected,[],e)}else return this.finish(n,g.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()}_parseScope(){if(!this.peekKeyword("@scope"))return null;let e=this.create(Yn);return this.consumeToken(),e.addChild(this._parseScopeLimits()),this._parseBody(e,this._parseScopeDeclaration.bind(this))}_parseScopeDeclaration(){return this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0)}_parseScopeLimits(){let e=this.create(Xn);if(this.accept(d.ParenthesisL)){if(!e.setScopeStart(this._parseScopeSelectorList()))return this.finish(e,g.SelectorExpected,[],[d.ParenthesisR]);if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[],[d.CurlyL])}if(this.acceptIdent("to")){if(!this.accept(d.ParenthesisL))return this.finish(e,g.LeftParenthesisExpected,[],[d.CurlyL]);if(!e.setScopeEnd(this._parseScopeSelectorList()))return this.finish(e,g.SelectorExpected,[],[d.ParenthesisR]);if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[],[d.CurlyL])}return this.finish(e)}_parseScopeSelectorList(){let e=this.createNode(u.SelectorList);if(!e.addChild(this._parseSelector(!0)))return null;for(;this.accept(d.Comma)&&e.addChild(this._parseSelector(!0)););return this.finish(e)}_parseMedium(){let e=this.create(z);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(Mo);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(d.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,g.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(d.AtKeyword))return null;let e=this.create(Ro);return this.acceptOneKeyword(Vg)||this.markError(e,g.UnknownAtRule,[],[d.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(d.Ident)&&!this.peek(d.Colon))return null;let e=this.create(z);return e.addChild(this._parseIdent()),this.accept(d.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,g.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;let e=this.create(Eo);return this.consumeToken(),this.resync([],[d.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(ko);if(this.consumeToken(),n.addChild(this._parseIdent()),n.addChild(this._parseContainerQuery()))for(;this.accept(d.Comma)&&!this.peek(d.CurlyL);)n.addChild(this._parseIdent()),n.addChild(this._parseContainerQuery());return this._parseBody(n,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){let e=this.create(z);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens(!0)),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(e=!1){let n=this.create(z);if(this.accept(d.ParenthesisL)){if(this.peekIdent("not")||this.peek(d.ParenthesisL)?n.addChild(this._parseContainerQuery()):n.addChild(this._parseMediaFeature()),!this.accept(d.ParenthesisR))return this.finish(n,g.RightParenthesisExpected,[],[d.CurlyL])}else if(this.acceptIdent("style")){if(this.hasWhitespace()||!this.accept(d.ParenthesisL))return this.finish(n,g.LeftParenthesisExpected,[],[d.CurlyL]);if(n.addChild(this._parseStyleQuery()),!this.accept(d.ParenthesisR))return this.finish(n,g.RightParenthesisExpected,[],[d.CurlyL])}else return e?null:this.finish(n,g.LeftParenthesisExpected,[],[d.CurlyL]);return this.finish(n)}_parseStyleQuery(){let e=this.create(z);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(d.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([d.ParenthesisR],!0));return this.finish(e)}_parseStyleInParens(){let e=this.create(z);if(this.accept(d.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[],[d.CurlyL])}else return this.finish(e,g.LeftParenthesisExpected,[],[d.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(d.AtKeyword))return null;let e=this.create(pr);e.addChild(this._parseUnknownAtRuleName());let n=()=>r===0&&s===0&&a===0,i=0,r=0,s=0,a=0;e:for(;;){switch(this.token.type){case d.SemiColon:if(n())break e;break;case d.EOF:return r>0?this.finish(e,g.RightCurlyExpected):a>0?this.finish(e,g.RightSquareBracketExpected):s>0?this.finish(e,g.RightParenthesisExpected):this.finish(e);case d.CurlyL:i++,r++;break;case d.CurlyR:if(r--,i>0&&r===0){if(this.consumeToken(),a>0)return this.finish(e,g.RightSquareBracketExpected);if(s>0)return this.finish(e,g.RightParenthesisExpected);break e}if(r<0){if(s===0&&a===0)break e;return this.finish(e,g.LeftCurlyExpected)}break;case d.ParenthesisL:s++;break;case d.ParenthesisR:if(s--,s<0)return this.finish(e,g.LeftParenthesisExpected);break;case d.BracketL:a++;break;case d.BracketR:if(a--,a<0)return this.finish(e,g.LeftSquareBracketExpected);break}this.consumeToken()}return e}_parseUnknownAtRuleName(){let e=this.create(z);return this.accept(d.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(d.Dashmatch)||this.peek(d.Includes)||this.peek(d.SubstringOperator)||this.peek(d.PrefixOperator)||this.peek(d.SuffixOperator)||this.peekDelim("=")){let e=this.createNode(u.Operator);return this.consumeToken(),this.finish(e)}else return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;let e=this.create(z);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){let e=this.create(z);this.consumeToken();let n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=u.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=u.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){let e=this.create(z);return this.consumeToken(),e.type=u.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){let e=this.create(z);return this.consumeToken(),e.type=u.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){let e=this.create(z);this.consumeToken();let n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=u.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null}_parseSimpleSelector(){let e=this.create(Pt),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(u.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(d.Hash)&&!this.peekDelim("#"))return null;let e=this.createNode(u.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,g.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;let e=this.createNode(u.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,g.IdentifierExpected):this.finish(e)}_parseElementName(){let e=this.mark(),n=this.createNode(u.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(u.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(d.BracketL))return null;let e=this.create(Oo);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(d.BracketR)?this.finish(e):this.finish(e,g.RightSquareBracketExpected)):this.finish(e,g.IdentifierExpected)}_parsePseudo(){let e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(d.ParenthesisL)){let n=()=>{let r=this.createNode(u.SelectorList);if(!r.addChild(this._parseSelector(!0)))return null;for(;this.accept(d.Comma)&&r.addChild(this._parseSelector(!0)););return this.peek(d.ParenthesisR)?this.finish(r):null};if(!e.addChild(this.try(n))){for(;!this.peekIdent("of")&&(e.addChild(this._parseTerm())||e.addChild(this._parseOperator())););if(this.acceptIdent("of")&&!e.addChild(this.try(n)))return this.finish(e,g.SelectorExpected)}if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(d.Colon))return null;let e=this.mark(),n=this.createNode(u.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(d.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,g.IdentifierExpected):this.finish(n))}_tryParsePrio(){let e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(d.Exclamation))return null;let e=this.createNode(u.Prio);return this.accept(d.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){let n=this.create(hr);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(d.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(lo);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(d.BracketL))return null;let e=this.createNode(u.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(d.BracketR)?this.finish(e):this.finish(e,g.RightSquareBracketExpected)}_parseBinaryExpr(e,n){let i=this.create(Zn);if(!i.setLeft(e||this._parseTerm()))return null;if(!i.setOperator(n||this._parseOperator()))return this.finish(i);if(!i.setRight(this._parseTerm()))return this.finish(i,g.TermExpected);i=this.finish(i);let r=this._parseOperator();return r&&(i=this._parseBinaryExpr(i,r)),this.finish(i)}_parseTerm(){let e=this.create(Do);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(d.ParenthesisL))return null;let e=this.create(z);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected)}_parseNumeric(){if(this.peek(d.Num)||this.peek(d.Percentage)||this.peek(d.Resolution)||this.peek(d.Length)||this.peek(d.EMS)||this.peek(d.EXS)||this.peek(d.Angle)||this.peek(d.Time)||this.peek(d.Dimension)||this.peek(d.ContainerQueryLength)||this.peek(d.Freq)){let e=this.create(wi);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(d.String)&&!this.peek(d.BadString))return null;let e=this.createNode(u.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(d.Ident,/^url(-prefix)?$/i))return null;let e=this.mark(),n=this.createNode(u.URILiteral);return this.accept(d.Ident),this.hasWhitespace()||!this.peek(d.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(d.ParenthesisR)?this.finish(n):this.finish(n,g.RightParenthesisExpected))}_parseURLArgument(){let e=this.create(z);return!this.accept(d.String)&&!this.accept(d.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)}_parseIdent(e){if(!this.peek(d.Ident))return null;let n=this.create(Ne);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(d.Ident,/^--/),this.consumeToken(),this.finish(n)}_parseFunction(){let e=this.mark(),n=this.create(xt),i=this._parseFunctionArgument.bind(this),r=d.Comma;if(this.peekIdent("if")&&(i=this._parseIfBranch.bind(this),r=d.SemiColon),!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(d.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(i()))for(;this.accept(r)&&!this.peek(d.ParenthesisR);)n.getArguments().addChild(i())||this.markError(n,g.ExpressionExpected);return this.accept(d.ParenthesisR)?this.finish(n):this.finish(n,g.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(d.Ident))return null;let e=this.create(Ne);if(e.referenceTypes=[re.Function],this.acceptIdent("progid")){if(this.accept(d.Colon))for(;this.accept(d.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){let e=this.create(At);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseIfBranch(){let e=this.create(z);return e.addChild(this._parseIfCondition())?this.accept(d.Colon)?(e.addChild(this._parseExpr()),this.finish(e)):this.finish(e,g.ColonExpected,[],[d.SemiColon]):this.finish(e,g.IfConditionExpected,[],[d.SemiColon])}_parseIfCondition(){let e=this.create(z);return this.peekIdent("else")?(e.addChild(this._parseIdent()),this.finish(e)):this._parseBooleanExpression(this._parseIfTest.bind(this))}_parseIfTest(){let e=this.create(z);if(this.acceptIdent("supports"))return this.hasWhitespace()||!this.accept(d.ParenthesisL)?this.finish(e,g.LeftParenthesisExpected,[],[d.Colon]):(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected,[],[d.Colon]));if(this.acceptIdent("media")){if(this.hasWhitespace()||!this.accept(d.ParenthesisL))return this.finish(e,g.LeftParenthesisExpected,[],[d.Colon]);let n=this.mark(),i=this._parseMediaCondition();return i&&!i.isErroneous()?e.addChild(i):(this.restoreAtMark(n),e.addChild(this._parseMediaFeature())),this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected,[],[d.Colon])}return this.acceptIdent("style")?this.hasWhitespace()||!this.accept(d.ParenthesisL)?this.finish(e,g.LeftParenthesisExpected,[],[d.Colon]):(e.addChild(this._parseStyleQuery()),this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected,[],[d.Colon])):null}_parseHexColor(){if(this.peekRegExp(d.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(gi);return this.consumeToken(),this.finish(e)}else return null}}});function Kg(t,e){let n=0,i=t.length;if(i===0)return 0;for(;n{"use strict"});var Jo,Kh,gr,Jh,yi,Yh=Q(()=>{"use strict";Ye();Ko();Jo=class{constructor(e,n){this.offset=e,this.length=n,this.symbols=[],this.parent=null,this.children=[]}addChild(e){this.children.push(e),e.setParent(this)}setParent(e){this.parent=e}findScope(e,n=0){return this.offset<=e&&this.offset+this.length>e+n||this.offset===e&&this.length===n?this.findInScope(e,n):null}findInScope(e,n=0){let i=e+n,r=Kg(this.children,a=>a.offset>i);if(r===0)return this;let s=this.children[r-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 i=0;i{"use strict";ir()});function Xh(t){return Fe(t,"'")||Fe(t,'"')?t.slice(1,-1):t}function LS(t,e,n){let i,r=t.lastIndexOf("/");if(r===-1)i=n;else{let s=e.slice(r+1),a=Zo(n.end,-s.length),o=s.indexOf(" "),l;o!==-1?l=Zo(a,o):l=n.end,i=ee.create(a,l)}return i}function qS(t,e,n){return e?(t=t+"/",{label:Xo(t),kind:J.Folder,textEdit:V.replace(n,Xo(t)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:Xo(t),kind:J.File,textEdit:V.replace(n,Xo(t))}}function Xo(t){return t.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function Zo(t,e){return Ee.create(t.line,t.character+e)}function jS(t,e,n){let i=Zo(t.start,e),r=Zo(t.end,n);return ee.create(i,r)}var Qo,WS,Jg=Q(()=>{"use strict";Et();gn();Yo();Qo=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 i={items:[],isIncomplete:!1};for(let r of this.literalCompletions){let s=r.uriValue,a=Xh(s);if(a==="."||a==="..")i.isIncomplete=!0;else{let o=await this.providePathSuggestions(s,r.position,r.range,e,n);for(let l of o)i.items.push(l)}}for(let r of this.importCompletions){let s=r.pathValue,a=Xh(s);if(a==="."||a==="..")i.isIncomplete=!0;else{let o=await this.providePathSuggestions(s,r.position,r.range,e,n);e.languageId==="scss"&&o.forEach(l=>{Fe(l.label,"_")&&oo(l.label,".scss")&&(l.textEdit?l.textEdit.newText=l.label.slice(1,-5):l.label=l.label.slice(1,-5))});for(let l of o)i.items.push(l)}}return i}async providePathSuggestions(e,n,i,r,s){let a=Xh(e),o=Fe(e,"'")||Fe(e,'"'),l=o?a.slice(0,n.character-(i.start.character+1)):a.slice(0,n.character-i.start.character),c=r.uri,h=o?jS(i,1,-1):i,m=LS(l,a,h),w=l.substring(0,l.lastIndexOf("/")+1),S=s.resolveReference(w||".",c);if(S)try{let P=[],H=await this.readDirectory(S);for(let[oe,X]of H)oe.charCodeAt(0)!==WS&&(X===Xe.Directory||ft(S,oe)!==c)&&P.push(qS(oe,X===Xe.Directory,m));return P}catch{}return[]}},WS=46});function _r(t){return!!(t.status&&(t.status==="nonstandard"||t.status==="obsolete"))}function Sr(t){return t.replace(/\(\)$/,"($1)")}function $S(t,e){let n=e.getFullPropertyName(),i=new _s;function r(o){return(o instanceof Ne||o instanceof wi||o instanceof gi)&&i.add(o.getText()),!0}function s(o){let l=o.getFullPropertyName();return n===l}function a(o){if(o instanceof He&&o!==e&&s(o)){let l=o.getValue();l&&l.accept(r)}return!0}return t.accept(a),i}function US(t,e){let n=e-1,i=t.getText();for(;n>=0&&` +\r":{[()]},*>+`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,e)}var Yg,yn,Qh,rn,ti,_s,Zh,ep,el=Q(()=>{"use strict";Ye();Yh();br();gn();Et();Yg=Ke(gt(),1);bs();Jg();yn=je.Snippet,Qh={title:"Suggest",command:"editor.action.triggerSuggest"};(function(t){t.Enums=" ",t.Normal="d",t.VendorPrefixed="x",t.Term="y",t.Variable="z"})(rn||(rn={}));ti=class{constructor(e=null,n,i){this.variablePrefix=e,this.lsOptions=n,this.cssDataManager=i,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new yi(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,n,i,r,s=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,n,i,s);let a=new Qo(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[a].concat(o);let l=this.doComplete(e,n,i,s);try{let c=await a.computeCompletions(e,r);return{isIncomplete:l.isIncomplete||c.isIncomplete,itemDefaults:l.itemDefaults,items:c.items.concat(l.items)}}finally{this.completionParticipants=o}}doComplete(e,n,i,r){this.offset=e.offsetAt(n),this.position=n,this.currentWord=US(e,this.offset),this.defaultReplaceRange=ee.create(Ee.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=i,this.documentSettings=r;try{let s={isIncomplete:!1,itemDefaults:{editRange:{start:{line:n.line,character:n.character-this.currentWord.length},end:n}},items:[]};this.nodePath=mr(this.styleSheet,this.offset);for(let a=this.nodePath.length-1;a>=0;a--){let o=this.nodePath[a];if(o instanceof Gn)this.getCompletionsForDeclarationProperty(o.getParent(),s);else if(o instanceof hr)o.parent instanceof _i?this.getVariableProposals(null,s):this.getCompletionsForExpression(o,s);else if(o instanceof Pt){let l=o.findAParent(u.ExtendsReference,u.Ruleset);if(l)if(l.type===u.ExtendsReference)this.getCompletionsForExtendsReference(l,o,s);else{let c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(o instanceof At)this.getCompletionsForFunctionArgument(o,o.getParent(),s);else if(o instanceof mi)this.getCompletionsForDeclarations(o,s);else if(o instanceof en)this.getCompletionsForVariableDeclaration(o,s);else if(o instanceof Ct)this.getCompletionsForRuleSet(o,s);else if(o instanceof _i)this.getCompletionsForInterpolation(o,s);else if(o instanceof wn)this.getCompletionsForFunctionDeclaration(o,s);else if(o instanceof Sn)this.getCompletionsForMixinReference(o,s);else if(o instanceof xt)this.getCompletionsForFunctionArgument(null,o,s);else if(o instanceof fi)this.getCompletionsForSupports(o,s);else if(o instanceof _n)this.getCompletionsForSupportsCondition(o,s);else if(o instanceof bi)this.getCompletionsForMediaCondition(o,s);else if(o instanceof tn)this.getCompletionsForExtendsReference(o,null,s);else if(o.type===u.URILiteral)this.getCompletionForUriLiteralValue(o,s);else if(o.parent===null)this.getCompletionForTopLevel(s);else if(o.type===u.StringLiteral&&this.isImportPathParent(o.parent.type))this.getCompletionForImportPath(o,s);else continue;if(s.items.length>0||this.offset>o.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===u.Import}finalize(e){return e}findInNodePath(...e){for(let n=this.nodePath.length-1;n>=0;n--){let i=this.nodePath[n];if(e.indexOf(i.type)!==-1)return i}return null}getCompletionsForDeclarationProperty(e,n){return this.getPropertyProposals(e,n)}getPropertyProposals(e,n){let i=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(a=>{let o,l,c=!1;e?(o=this.getCompletionRange(e.getProperty()),l=a.name,dt(e.colonPosition)||(l+=": ",c=!0)):(o=this.getCompletionRange(null),l=a.name+": ",c=!0),!e&&r&&(l+="$0;"),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(o.end)&&(l+="$0;");let h={label:a.name,documentation:Bt(a,this.doesSupportMarkdown()),tags:_r(a)?[Lt.Deprecated]:[],textEdit:V.replace(o,l),insertTextFormat:je.Snippet,kind:J.Property};i&&c&&(h.command=Qh);let w=(255-(typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50)).toString(16),S=Fe(a.name,"-")?rn.VendorPrefixed:rn.Normal;h.sortText=S+"_"+w,n.items.push(h)}),this.completionParticipants.forEach(a=>{a.onCssProperty&&a.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 i=e.getFullPropertyName(),r=this.cssDataManager.getProperty(i),s=e.getValue()||null;for(;s&&s.hasChildren();)s=s.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(a=>{a.onCssPropertyValue&&a.onCssPropertyValue({propertyName:i,propertyValue:this.currentWord,range:this.getCompletionRange(s)})}),r){if(r.restrictions)for(let a of r.restrictions)switch(a){case"color":this.getColorProposals(r,s,n);break;case"position":this.getPositionProposals(r,s,n);break;case"repeat":this.getRepeatStyleProposals(r,s,n);break;case"line-style":this.getLineStyleProposals(r,s,n);break;case"line-width":this.getLineWidthProposals(r,s,n);break;case"geometry-box":this.getGeometryBoxProposals(r,s,n);break;case"box":this.getBoxProposals(r,s,n);break;case"image":this.getImageProposals(r,s,n);break;case"timing-function":this.getTimingFunctionProposals(r,s,n);break;case"shape":this.getBasicShapeProposals(r,s,n);break}this.getValueEnumProposals(r,s,n),this.getCSSWideKeywordProposals(r,s,n),this.getUnitProposals(r,s,n)}else{let a=$S(this.styleSheet,e);for(let o of a.getEntries())n.items.push({label:o,textEdit:V.replace(this.getCompletionRange(s),o),kind:J.Value})}return this.getVariableProposals(s,n),this.getTermProposals(r,s,n),n}getValueEnumProposals(e,n,i){if(e.values)for(let r of e.values){let s=r.name,a;if(oo(s,")")){let c=s.lastIndexOf("(");c!==-1&&(s=s.substring(0,c+1)+"$1"+s.substring(c+1),a=yn)}let o=rn.Enums;Fe(r.name,"-")&&(o+=rn.VendorPrefixed);let l={label:r.name,documentation:Bt(r,this.doesSupportMarkdown()),tags:_r(e)?[Lt.Deprecated]:[],textEdit:V.replace(this.getCompletionRange(n),s),sortText:o,kind:J.Value,insertTextFormat:a};i.items.push(l)}return i}getCSSWideKeywordProposals(e,n,i){for(let r in $h)i.items.push({label:r,documentation:$h[r],textEdit:V.replace(this.getCompletionRange(n),r),kind:J.Value});for(let r in Uh){let s=Sr(r);i.items.push({label:r,documentation:Uh[r],textEdit:V.replace(this.getCompletionRange(n),s),kind:J.Function,insertTextFormat:yn,command:Fe(r,"var")?Qh:void 0})}return i}getCompletionsForInterpolation(e,n){return this.offset>=e.offset+2&&this.getVariableProposals(null,n),n}getVariableProposals(e,n){let i=this.getSymbolContext().findSymbolsAtOffset(this.offset,re.Variable);for(let r of i){let s=Fe(r.name,"--")?`var(${r.name})`:r.name,a={label:r.name,documentation:r.value?Eh(r.value):r.value,textEdit:V.replace(this.getCompletionRange(e),s),kind:J.Variable,sortText:rn.Variable};if(typeof a.documentation=="string"&&Ph(a.documentation)&&(a.kind=J.Color),r.node.type===u.FunctionParameter){let o=r.node.getParent();o.type===u.MixinDeclaration&&(a.detail=Yg.t("argument from '{0}'",o.getName()))}n.items.push(a)}return n}getVariableProposalsForCSSVarFunction(e){let n=new _s;this.styleSheet.acceptVisitor(new ep(n,this.offset));let i=this.getSymbolContext().findSymbolsAtOffset(this.offset,re.Variable);for(let r of i){if(Fe(r.name,"--")){let s={label:r.name,documentation:r.value?Eh(r.value):r.value,textEdit:V.replace(this.getCompletionRange(null),r.name),kind:J.Variable};typeof s.documentation=="string"&&Ph(s.documentation)&&(s.kind=J.Color),e.items.push(s)}n.remove(r.name)}for(let r of n.getEntries())if(Fe(r,"--")){let s={label:r,textEdit:V.replace(this.getCompletionRange(null),r),kind:J.Variable};e.items.push(s)}return e}getUnitProposals(e,n,i){let r="0";if(this.currentWord.length>0){let s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(r=s[0],i.isIncomplete=r.length===this.currentWord.length)}else this.currentWord.length===0&&(i.isIncomplete=!0);if(n&&n.parent&&n.parent.type===u.Term&&(n=n.getParent()),e.restrictions)for(let s of e.restrictions){let a=Ho[s];if(a)for(let o of a){let l=r+o;i.items.push({label:l,textEdit:V.replace(this.getCompletionRange(n),l),kind:J.Unit})}}return i}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){let n=e.end!==-1?this.textDocument.positionAt(e.end):this.position,i=this.textDocument.positionAt(e.offset);if(i.line===n.line)return ee.create(i,n)}return this.defaultReplaceRange}getColorProposals(e,n,i){for(let s in ms)i.items.push({label:s,documentation:ms[s],textEdit:V.replace(this.getCompletionRange(n),s),kind:J.Color});for(let s in Vo)i.items.push({label:s,documentation:Vo[s],textEdit:V.replace(this.getCompletionRange(n),s),kind:J.Value});let r=new _s;this.styleSheet.acceptVisitor(new Zh(r,this.offset));for(let s of r.getEntries())i.items.push({label:s,textEdit:V.replace(this.getCompletionRange(n),s),kind:J.Color});for(let s of Eg)i.items.push({label:s.label,detail:s.func,documentation:s.desc,textEdit:V.replace(this.getCompletionRange(n),s.insertText),insertTextFormat:yn,kind:J.Function});return i}getPositionProposals(e,n,i){for(let r in Nh)i.items.push({label:r,documentation:Nh[r],textEdit:V.replace(this.getCompletionRange(n),r),kind:J.Value});return i}getRepeatStyleProposals(e,n,i){for(let r in Wh)i.items.push({label:r,documentation:Wh[r],textEdit:V.replace(this.getCompletionRange(n),r),kind:J.Value});return i}getLineStyleProposals(e,n,i){for(let r in Lh)i.items.push({label:r,documentation:Lh[r],textEdit:V.replace(this.getCompletionRange(n),r),kind:J.Value});return i}getLineWidthProposals(e,n,i){for(let r of $g)i.items.push({label:r,textEdit:V.replace(this.getCompletionRange(n),r),kind:J.Value});return i}getGeometryBoxProposals(e,n,i){for(let r in jh)i.items.push({label:r,documentation:jh[r],textEdit:V.replace(this.getCompletionRange(n),r),kind:J.Value});return i}getBoxProposals(e,n,i){for(let r in qh)i.items.push({label:r,documentation:qh[r],textEdit:V.replace(this.getCompletionRange(n),r),kind:J.Value});return i}getImageProposals(e,n,i){for(let r in Bh){let s=Sr(r);i.items.push({label:r,documentation:Bh[r],textEdit:V.replace(this.getCompletionRange(n),s),kind:J.Function,insertTextFormat:r!==s?yn:void 0})}return i}getTimingFunctionProposals(e,n,i){for(let r in Vh){let s=Sr(r);i.items.push({label:r,documentation:Vh[r],textEdit:V.replace(this.getCompletionRange(n),s),kind:J.Function,insertTextFormat:r!==s?yn:void 0})}return i}getBasicShapeProposals(e,n,i){for(let r in Hh){let s=Sr(r);i.items.push({label:r,documentation:Hh[r],textEdit:V.replace(this.getCompletionRange(n),s),kind:J.Function,insertTextFormat:r!==s?yn:void 0})}return i}getCompletionsForStylesheet(e){let n=this.styleSheet.findFirstChildBeforeOffset(this.offset);return n?n instanceof Ct?this.getCompletionsForRuleSet(n,e):n instanceof fi?this.getCompletionsForSupports(n,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(n=>{e.items.push({label:n.name,textEdit:V.replace(this.getCompletionRange(null),n.name),documentation:Bt(n,this.doesSupportMarkdown()),tags:_r(n)?[Lt.Deprecated]:[],kind:J.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,n){let i=e.getDeclarations();return i&&i.endsWith("}")&&this.offset>=i.end?this.getCompletionForTopLevel(n):!i||this.offset<=i.offset?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)}getCompletionsForSelector(e,n,i){let r=this.findInNodePath(u.PseudoSelector,u.IdentifierSelector,u.ClassSelector,u.ElementNameSelector);if(!r&&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=ee.create(Ee.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(c=>{let h=Sr(c.name),m={label:c.name,textEdit:V.replace(this.getCompletionRange(r),h),documentation:Bt(c,this.doesSupportMarkdown()),tags:_r(c)?[Lt.Deprecated]:[],kind:J.Function,insertTextFormat:c.name!==h?yn:void 0};Fe(c.name,":-")&&(m.sortText=rn.VendorPrefixed),i.items.push(m)}),this.cssDataManager.getPseudoElements().forEach(c=>{let h=Sr(c.name),m={label:c.name,textEdit:V.replace(this.getCompletionRange(r),h),documentation:Bt(c,this.doesSupportMarkdown()),tags:_r(c)?[Lt.Deprecated]:[],kind:J.Function,insertTextFormat:c.name!==h?yn:void 0};Fe(c.name,"::-")&&(m.sortText=rn.VendorPrefixed),i.items.push(m)}),!n){for(let c of Ug)i.items.push({label:c,textEdit:V.replace(this.getCompletionRange(r),c),kind:J.Keyword});for(let c of Bg)i.items.push({label:c,textEdit:V.replace(this.getCompletionRange(r),c),kind:J.Keyword})}let o={};o[this.currentWord]=!0;let l=this.textDocument.getText();if(this.styleSheet.accept(c=>{if(c.type===u.SimpleSelector&&c.length>0){let h=l.substr(c.offset,c.length);return h.charAt(0)==="."&&!o[h]&&(o[h]=!0,i.items.push({label:h,textEdit:V.replace(this.getCompletionRange(r),h),kind:J.Keyword})),!1}return!0}),e&&e.isNested()){let c=e.getSelectors().findFirstChildBeforeOffset(this.offset);c&&e.getSelectors().getChildren().indexOf(c)===0&&this.getPropertyProposals(null,i)}return i}getCompletionsForDeclarations(e,n){if(!e||this.offset===e.offset)return n;let i=e.findFirstChildBeforeOffset(this.offset);if(!i)return this.getCompletionsForDeclarationProperty(null,n);if(i instanceof ar){let r=i;if(!dt(r.colonPosition)||this.offset<=r.colonPosition)return this.getCompletionsForDeclarationProperty(r,n);if(dt(r.semicolonPosition)&&r.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,n),n}getCompletionsForExpression(e,n){let i=e.getParent();if(i instanceof At)return this.getCompletionsForFunctionArgument(i,i.getParent(),n),n;let r=e.findParent(u.Declaration);if(!r)return this.getTermProposals(void 0,null,n),n;let s=e.findChildAtOffset(this.offset,!0);return s?s instanceof wi||s instanceof Ne?this.getCompletionsForDeclarationValue(r,n):n:this.getCompletionsForDeclarationValue(r,n)}getCompletionsForFunctionArgument(e,n,i){let r=n.getIdentifier();return r&&r.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(i),i}getCompletionsForFunctionDeclaration(e,n){let i=e.getDeclarations();return i&&this.offset>i.offset&&this.offset{s.onCssMixinReference&&s.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(r)})}),n}getTermProposals(e,n,i){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,re.Function);for(let s of r)s.node instanceof wn&&i.items.push(this.makeTermProposal(s,s.node.getParameters(),n));return i}makeTermProposal(e,n,i){let r=e.node,s=n.getChildren().map(o=>o instanceof Zt?o.getName():o.getText()),a=e.name+"("+s.map((o,l)=>"${"+(l+1)+":"+o+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+s.join(", ")+")",textEdit:V.replace(this.getCompletionRange(i),a),insertTextFormat:yn,kind:J.Function,sortText:rn.Term}}getCompletionsForSupportsCondition(e,n){let i=e.findFirstChildBeforeOffset(this.offset);if(i){if(i instanceof He)return!dt(i.colonPosition)||this.offset<=i.colonPosition?this.getCompletionsForDeclarationProperty(i,n):this.getCompletionsForDeclarationValue(i,n);if(i instanceof _n)return this.getCompletionsForSupportsCondition(i,n)}return dt(e.lParent)&&this.offset>e.lParent&&(!dt(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n}getCompletionsForSupports(e,n){let i=e.getDeclarations();if(!i||this.offset<=i.offset){let s=e.findFirstChildBeforeOffset(this.offset);return s instanceof _n?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)}getCompletionsForMediaCondition(e,n){let i=e.findFirstChildBeforeOffset(this.offset);if(i){if(i instanceof dr){let s=i.getChild(0);if(s&&this.offset>s.end){let a=s.getText(),o=this.cssDataManager.getAtDirective("@media")?.descriptors?.find(l=>l.name===a);if(o)return this.getValueEnumProposals(o,null,n)}}else if(i instanceof bi)return this.getCompletionsForMediaCondition(i,n)}let r=this.cssDataManager.getAtDirective("@media");for(let s of r?.descriptors||[]){let a,o=s.name;s.type==="discrete"&&(s.values&&(a=Qh),o=`${s.name}: `),n.items.push({label:s.name,textEdit:V.replace(this.getCompletionRange(null),o),documentation:Bt(s,this.doesSupportMarkdown()),tags:_r(s)?[Lt.Deprecated]:[],kind:J.Keyword,command:a})}return n}getCompletionsForExtendsReference(e,n,i){return i}getCompletionForUriLiteralValue(e,n){let i,r,s;if(e.hasChildren()){let a=e.getChild(0);i=a.getText(),r=this.position,s=this.getCompletionRange(a)}else{i="",r=this.position;let a=this.textDocument.positionAt(e.offset+4);s=ee.create(a,a)}return this.completionParticipants.forEach(a=>{a.onCssURILiteralValue&&a.onCssURILiteralValue({uriValue:i,position:r,range:s})}),n}getCompletionForImportPath(e,n){return this.completionParticipants.forEach(i=>{i.onCssImportPath&&i.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),n}hasCharacterAtPosition(e,n){let i=this.textDocument.getText();return e>=0&&e1){let c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(o[l])}}break;case u.SelectorPlaceholder:if(i.matches("@at-root"))return n;case u.ElementNameSelector:let r=i.getText();n.addAttr("name",r==="*"?"element":It(r));break;case u.ClassSelector:n.addAttr("class",It(i.getText().substring(1)));break;case u.IdentifierSelector:n.addAttr("id",It(i.getText().substring(1)));break;case u.MixinDeclaration:n.addAttr("class",i.getName());break;case u.PseudoSelector:n.addAttr(It(i.getText()),"");break;case u.AttributeSelector:let s=i,a=s.getIdentifier();if(a){let o=s.getValue(),l=s.getOperator(),c;if(o&&l)switch(It(l.getText())){case"|=":c=`${vn.remove(It(o.getText()))}-\u2026`;break;case"^=":c=`${vn.remove(It(o.getText()))}\u2026`;break;case"$=":c=`\u2026${vn.remove(It(o.getText()))}`;break;case"~=":c=` \u2026 ${vn.remove(It(o.getText()))} \u2026 `;break;case"*=":c=`\u2026${vn.remove(It(o.getText()))}\u2026`;break;default:c=vn.remove(It(o.getText()));break}n.addAttr(It(a.getText()),c)}break}return n}function It(t){let e=new Dt;e.setSource(t);let n=e.scanUnquotedString();return n?n.text:t}function BS(t){switch(t.type){case u.MixinDeclaration:case u.Stylesheet:return!0}return!1}function VS(t){if(t.matches("@at-root"))return null;let e=new ni,n=[],i=t.getParent();if(i instanceof Ct){let s=i.getParent();for(;s&&!BS(s);){if(s instanceof Ct){if(s.getSelectors().matches("@at-root"))break;n.push(s)}s=s.getParent()}}let r=new tp(e);for(let s=n.length-1;s>=0;s--){let a=n[s].getSelectors().getChild(0);a&&r.processSelector(a)}return r.processSelector(t),e}var Xg,ys,ni,vs,tl,vn,Ss,nl,tp,Zg=Q(()=>{"use strict";Ye();Hn();Xg=Ke(gt(),1);gs();ys=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 ni);)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 i of this.attributes)if(i.name===e){i.value+=" "+n;return}this.attributes.push({name:e,value:n})}clone(e=!0){let n=new t;if(this.attributes){n.attributes=[];for(let i of this.attributes)n.addAttr(i.name,i.value)}if(e&&this.children){n.children=[];for(let i=0;i"),this.writeLine(n,r.join(""))}};(function(t){function e(i,r){return r+n(i)+r}t.ensure=e;function n(i){let r=i.match(/^['"](.*)["']$/);return r?r[1]:i}t.remove=n})(vn||(vn={}));Ss=class{constructor(){this.id=0,this.attr=0,this.tag=0}};nl=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,n){let i=VS(e);if(i){let r=new tl('"').print(i,n);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]}simpleSelectorToMarkedString(e){let n=Qg(e),i=new tl('"').print(n);return i.push(this.selectorToSpecificityMarkedString(e)),i}isPseudoElementIdentifier(e){let n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1}selectorToSpecificityMarkedString(e){let n=s=>{let a=new Ss,o=new Ss;for(let l of s)for(let c of l.getChildren()){let h=i(c);if(h.id>o.id){o=h;continue}else if(h.ido.attr){o=h;continue}else if(h.attro.tag){o=h;continue}}return a.id+=o.id,a.attr+=o.attr,a.tag+=o.tag,a},i=s=>{let a=new Ss;e:for(let o of s.getChildren()){switch(o.type){case u.IdentifierSelector:a.id++;break;case u.ClassSelector:case u.AttributeSelector:a.attr++;break;case u.ElementNameSelector:if(o.matches("*"))break;a.tag++;break;case u.PseudoSelector:let l=o.getText(),c=o.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&c.length>0){a.tag++;let h=n(c);a.id+=h.id,a.attr+=h.attr,a.tag+=h.tag;continue e}a.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&c.length>0){let h=n(c);a.id+=h.id,a.attr+=h.attr,a.tag+=h.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&c.length>0){a.attr++;let h=n(c);a.id+=h.id,a.attr+=h.attr,a.tag+=h.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&c.length>0){a.attr++;let h=c[c.length-1];if(c.length>2&&h.type===u.SelectorList){let H=n(h.getChildren());a.id+=H.id,a.attr+=H.attr,a.tag+=H.tag;continue e}let m=new nn,w=c[1].getText();m.scanner.setSource(w);let S=m.scanner.scan(),P=m.scanner.scan();if(S.text==="n"||S.text==="-n"&&P.text==="of"){let H=[],X=w.slice(P.offset+2).split(",");for(let _ of X){let b=m.internalParse(_,m._parseSelector);b&&H.push(b)}let y=n(H);a.id+=y.id,a.attr+=y.attr,a.tag+=y.tag;continue e}continue e}a.attr++;continue e}if(o.getChildren().length>0){let l=i(o);a.id+=l.id,a.attr+=l.attr,a.tag+=l.tag}}return a},r=i(e);return`[${Xg.t("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${r.id}, ${r.attr}, ${r.tag})`}},tp=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let n=null;if(!(this.element instanceof ni)&&e.getChildren().some(i=>i.hasChildren()&&i.getChild(0).type===u.SelectorCombinator)){let i=this.element.findRoot();i.parent instanceof ni&&(n=this.element,this.element=i.parent,this.element.removeChild(i),this.prev=null)}for(let i of e.getChildren()){if(i instanceof Pt){if(this.prev instanceof Pt){let a=new vs("\u2026");this.element.addChild(a),this.element=a}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 vs("\u22EE"));let r=Qg(i,n),s=r.findRoot();this.element.addChild(s),this.element=r}(i instanceof Pt||i.type===u.SelectorCombinatorParent||i.type===u.SelectorCombinatorShadowPiercingDescendant||i.type===u.SelectorCombinatorSibling||i.type===u.SelectorCombinatorAllSiblings)&&(this.prev=i)}}}});var yr,e1=Q(()=>{"use strict";Ye();br();Zg();gn();Et();bs();yr=class{constructor(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new nl(n)}configure(e){this.defaultSettings=e}doHover(e,n,i,r=this.defaultSettings){function s(h){return ee.create(e.positionAt(h.offset),e.positionAt(h.end))}let a=e.offsetAt(n),o=mr(i,a),l=null,c=[];for(let h=0;htypeof n=="string"?n:n.value):e.value}doesSupportMarkdown(){if(!dt(this.supportsMarkdown)){if(!dt(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(at.Markdown)!==-1}return this.supportsMarkdown}}});function HS(t,e){let n=qg(t);if(n){let i=Fn(t,e);return{color:n,range:i}}return null}function Fn(t,e){return ee.create(e.positionAt(t.offset),e.positionAt(t.end))}function i1(t,e){let n=e.start.line,i=e.end.line,r=t.start.line,s=t.end.line;return!(ns||i>s||n===r&&e.start.charactert.end.character)}function r1(t){if(t.type===u.Selector)return hn.Write;if(t instanceof Ne&&t.parent&&t.parent instanceof Gn&&t.isCustomProperty)return hn.Write;if(t.parent)switch(t.parent.type){case u.FunctionDeclaration:case u.MixinDeclaration:case u.Keyframe:case u.VariableDeclaration:case u.FunctionParameter:return hn.Write}return hn.Read}function vi(t){let e=t.toString(16);return e.length!==2?"0"+e:e}function np(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 Fs,t1,n1,Fi,ip=Q(()=>{"use strict";Et();Fs=Ke(gt(),1);Ye();Yh();br();gn();Yo();t1=/^\w+:\/\//,n1=/^data:/,Fi=class{constructor(e,n){this.fileSystemProvider=e,this.resolveModuleReferences=n}configure(e){this.defaultSettings=e}findDefinition(e,n,i){let r=new yi(i),s=e.offsetAt(n),a=qo(i,s);if(!a)return null;let o=r.findSymbolFromNode(a);return o?{uri:e.uri,range:Fn(o.node,e)}:null}findReferences(e,n,i){return this.findDocumentHighlights(e,n,i).map(s=>({uri:e.uri,range:s.range}))}getHighlightNode(e,n,i){let r=e.offsetAt(n),s=qo(i,r);if(!(!s||s.type===u.Stylesheet||s.type===u.Declarations||s.type===u.ModuleConfig))return s.type===u.Identifier&&s.parent&&s.parent.type===u.ClassSelector&&(s=s.parent),s}findDocumentHighlights(e,n,i){let r=[],s=this.getHighlightNode(e,n,i);if(!s)return r;let a=new yi(i),o=a.findSymbolFromNode(s),l=s.getText();return i.accept(c=>{if(o){if(a.matchesSymbol(c,o))return r.push({kind:r1(c),range:Fn(c,e)}),!1}else s&&s.type===c.type&&c.matches(l)&&r.push({kind:r1(c),range:Fn(c,e)});return!0}),r}isRawStringDocumentLinkNode(e){return e.type===u.Import}findDocumentLinks(e,n,i){let r=this.findUnresolvedLinks(e,n),s=[];for(let a of r){let o=a.link,l=o.target;if(!(!l||n1.test(l)))if(t1.test(l))s.push(o);else{let c=i.resolveReference(l,e.uri);c&&(o.target=c),s.push(o)}}return s}async findDocumentLinks2(e,n,i){let r=this.findUnresolvedLinks(e,n),s=[];for(let a of r){let o=a.link,l=o.target;if(!(!l||n1.test(l)))if(t1.test(l))s.push(o);else{let c=await this.resolveReference(l,e.uri,i,a.isRawLink);c!==void 0&&(o.target=c,s.push(o))}}return s}findUnresolvedLinks(e,n){let i=[],r=s=>{let a=s.getText(),o=Fn(s,e);if(o.start.line===o.end.line&&o.start.character===o.end.character)return;(Fe(a,"'")||Fe(a,'"'))&&(a=a.slice(1,-1));let l=s.parent?this.isRawStringDocumentLinkNode(s.parent):!1;i.push({link:{target:a,range:o},isRawLink:l})};return n.accept(s=>{if(s.type===u.URILiteral){let a=s.getChild(0);return a&&r(a),!1}if(s.parent&&this.isRawStringDocumentLinkNode(s.parent)){let a=s.getText();return(Fe(a,"'")||Fe(a,'"'))&&r(s),!1}return!0}),i}findSymbolInformations(e,n){let i=[],r=(s,a,o)=>{let l=o instanceof z?Fn(o,e):o,c={name:s||Fs.t(""),kind:a,location:Pn.create(e.uri,l)};i.push(c)};return this.collectDocumentSymbols(e,n,r),i}findDocumentSymbols(e,n){let i=[],r=[],s=(a,o,l,c,h)=>{let m=l instanceof z?Fn(l,e):l,w=c instanceof z?Fn(c,e):c;(!w||!i1(m,w))&&(w=ee.create(m.start,m.start));let S={name:a||Fs.t(""),kind:o,range:m,selectionRange:w},P=r.pop();for(;P&&!i1(P[1],m);)P=r.pop();if(P){let H=P[0];H.children||(H.children=[]),H.children.push(S),r.push(P)}else i.push(S);h&&r.push([S,Fn(h,e)])};return this.collectDocumentSymbols(e,n,s),i}collectDocumentSymbols(e,n,i){n.accept(r=>{if(r instanceof Ct){for(let s of r.getSelectors().getChildren())if(s instanceof Ot){let a=ee.create(e.positionAt(s.offset),e.positionAt(r.end));i(s.getText(),_t.Class,a,s,r.getDeclarations())}}else if(r instanceof en)i(r.getName(),_t.Variable,r,r.getVariable(),void 0);else if(r instanceof Ut)i(r.getName(),_t.Method,r,r.getIdentifier(),r.getDeclarations());else if(r instanceof wn)i(r.getName(),_t.Function,r,r.getIdentifier(),r.getDeclarations());else if(r instanceof lr){let s=Fs.t("@keyframes {0}",r.getName());i(s,_t.Class,r,r.getIdentifier(),r.getDeclarations())}else if(r instanceof or){let s=Fs.t("@font-face");i(s,_t.Class,r,void 0,r.getDeclarations())}else if(r instanceof Jn){let s=r.getChild(0);if(s instanceof Qn){let a="@media "+s.getText();i(a,_t.Module,r,s,r.getDeclarations())}}else if(r instanceof Yn){let s="",a=r.getChild(0);a instanceof Xn&&(s=`${a.getName()}`),i(`@scope${s?` ${s}`:""}`,_t.Module,r,a??void 0,r.getDeclarations())}return!0})}findDocumentColors(e,n){let i=[];return n.accept(r=>{let s=HS(r,e);return s&&i.push(s),!0}),i}getColorPresentations(e,n,i,r){let s=[],a=Math.round(i.red*255),o=Math.round(i.green*255),l=Math.round(i.blue*255),c;i.alpha===1?c=`rgb(${a}, ${o}, ${l})`:c=`rgba(${a}, ${o}, ${l}, ${i.alpha})`,s.push({label:c,textEdit:V.replace(r,c)}),i.alpha===1?c=`#${vi(a)}${vi(o)}${vi(l)}`:c=`#${vi(a)}${vi(o)}${vi(l)}${vi(Math.round(i.alpha*255))}`,s.push({label:c,textEdit:V.replace(r,c)});let h=Ih(i);h.a===1?c=`hsl(${h.h}, ${Math.round(h.s*100)}%, ${Math.round(h.l*100)}%)`:c=`hsla(${h.h}, ${Math.round(h.s*100)}%, ${Math.round(h.l*100)}%, ${h.a})`,s.push({label:c,textEdit:V.replace(r,c)});let m=Dg(i);m.a===1?c=`hwb(${m.h} ${Math.round(m.w*100)}% ${Math.round(m.b*100)}%)`:c=`hwb(${m.h} ${Math.round(m.w*100)}% ${Math.round(m.b*100)}% / ${m.a})`,s.push({label:c,textEdit:V.replace(r,c)});let w=Th(i);w.alpha===1?c=`lab(${w.l}% ${w.a} ${w.b})`:c=`lab(${w.l}% ${w.a} ${w.b} / ${w.alpha})`,s.push({label:c,textEdit:V.replace(r,c)});let S=Ig(i);S.alpha===1?c=`lch(${S.l}% ${S.c} ${S.h})`:c=`lch(${S.l}% ${S.c} ${S.h} / ${S.alpha})`,s.push({label:c,textEdit:V.replace(r,c)});let P=zh(i);c=P.alpha===1?`oklab(${P.l}% ${P.a} ${P.b})`:`oklab(${P.l}% ${P.a} ${P.b} / ${P.alpha})`,s.push({label:c,textEdit:V.replace(r,c)});let H=Tg(i);return c=H.alpha===1?`oklch(${H.l}% ${H.c} ${H.h})`:`oklch(${H.l}% ${H.c} ${H.h} / ${H.alpha})`,s.push({label:c,textEdit:V.replace(r,c)}),s}prepareRename(e,n,i){let r=this.getHighlightNode(e,n,i);if(r)return ee.create(e.positionAt(r.offset),e.positionAt(r.end))}doRename(e,n,i,r){let a=this.findDocumentHighlights(e,n,r).map(o=>V.replace(o.range,i));return{changes:{[e.uri]:a}}}async resolveModuleReference(e,n,i){if(Fe(n,"file://")){let r=np(e);if(r&&r!=="."&&r!==".."){let s=i.resolveReference("/",n),a=wr(n),o=await this.resolvePathToModule(r,a,s);if(o){let l=e.substring(r.length+1);return ft(o,l)}}}}async mapReference(e,n){return e}async resolveReference(e,n,i,r=!1,s=this.defaultSettings){if(e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,n,i),r);let a=await this.mapReference(i.resolveReference(e,n),r);if(this.resolveModuleReferences){if(a&&await this.fileExists(a))return a;let o=await this.mapReference(await this.resolveModuleReference(e,n,i),r);if(o)return o}if(a&&!await this.fileExists(a)){let o=i.resolveReference("/",n);if(s&&o){if(e in s)return this.mapReference(ft(o,s[e]),r);let l=e.indexOf("/"),c=`${e.substring(0,l)}/`;if(c in s){let h=s[c].slice(0,-1),m=ft(o,h);return this.mapReference(m=ft(m,e.substring(c.length-1)),r)}}}return a}async resolvePathToModule(e,n,i){let r=ft(n,"node_modules",e,"package.json");if(await this.fileExists(r))return wr(r);if(i&&n.startsWith(i)&&n.length!==i.length)return this.resolvePathToModule(e,wr(n),i)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{let n=await this.fileSystemProvider.stat(e);return!(n.type===Xe.Unknown&&n.size===-1)}catch{return!1}}async getContent(e){if(!this.fileSystemProvider||!this.fileSystemProvider.getContent)return null;try{return await this.fileSystemProvider.getContent(e)}catch{return null}}}});function GS(t){switch(t){case"ignore":return Je.Ignore;case"warning":return Je.Warning;case"error":return Je.Error}return null}var Pe,vr,s1,Vt,Ie,rp,me,a1,il,rl=Q(()=>{"use strict";Ye();Pe=Ke(gt(),1),vr=Je.Warning,s1=Je.Error,Vt=Je.Ignore,Ie=class{constructor(e,n,i){this.id=e,this.message=n,this.defaultValue=i}},rp=class{constructor(e,n,i){this.id=e,this.message=n,this.defaultValue=i}},me={AllVendorPrefixes:new Ie("compatibleVendorPrefixes",Pe.t("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Vt),IncludeStandardPropertyWhenUsingVendorPrefix:new Ie("vendorPrefix",Pe.t("When using a vendor-specific prefix also include the standard property"),vr),DuplicateDeclarations:new Ie("duplicateProperties",Pe.t("Do not use duplicate style definitions"),Vt),EmptyRuleSet:new Ie("emptyRules",Pe.t("Do not use empty rulesets"),vr),ImportStatemement:new Ie("importStatement",Pe.t("Import statements do not load in parallel"),Vt),BewareOfBoxModelSize:new Ie("boxModel",Pe.t("Do not use width or height when using padding or border"),Vt),UniversalSelector:new Ie("universalSelector",Pe.t("The universal selector (*) is known to be slow"),Vt),ZeroWithUnit:new Ie("zeroUnits",Pe.t("No unit for zero needed"),Vt),RequiredPropertiesForFontFace:new Ie("fontFaceProperties",Pe.t("@font-face rule must define 'src' and 'font-family' properties"),vr),HexColorLength:new Ie("hexColorLength",Pe.t("Hex colors must consist of three, four, six or eight hex numbers"),s1),ArgsInColorFunction:new Ie("argumentsInColorFunction",Pe.t("Invalid number of parameters"),s1),UnknownProperty:new Ie("unknownProperties",Pe.t("Unknown property."),vr),UnknownAtRules:new Ie("unknownAtRules",Pe.t("Unknown at-rule."),vr),IEStarHack:new Ie("ieHack",Pe.t("IE hacks are only necessary when supporting IE7 and older"),Vt),UnknownVendorSpecificProperty:new Ie("unknownVendorSpecificProperties",Pe.t("Unknown vendor specific property."),Vt),PropertyIgnoredDueToDisplay:new Ie("propertyIgnoredDueToDisplay",Pe.t("Property is ignored due to the display."),vr),AvoidImportant:new Ie("important",Pe.t("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Vt),AvoidFloat:new Ie("float",Pe.t("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Vt),AvoidIdSelector:new Ie("idSelector",Pe.t("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Vt)},a1={ValidProperties:new rp("validProperties",Pe.t("A list of properties that are not validated against the `unknownProperties` rule."),[])},il=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){let n=GS(this.conf[e.id]);if(n)return n}return e.defaultValue}getSetting(e){return this.conf[e.id]}}});var o1,Fr,l1=Q(()=>{"use strict";Ye();gn();rl();Et();o1=Ke(gt(),1),Fr=class{constructor(e){this.cssDataManager=e}doCodeActions(e,n,i,r){return this.doCodeActions2(e,n,i,r).map(s=>{let a=s.edit&&s.edit.documentChanges&&s.edit.documentChanges[0];return Kt.create(s.title,"_css.applyCodeAction",e.uri,e.version,a&&a.edits)})}doCodeActions2(e,n,i,r){let s=[];if(i.diagnostics)for(let a of i.diagnostics)this.appendFixesForMarker(e,r,a,s);return s}getFixesForUnknownProperty(e,n,i,r){let s=n.getName(),a=[];this.cssDataManager.getProperties().forEach(l=>{let c=pg(s,l.name);c>=s.length/2&&a.push({property:l.name,score:c})}),a.sort((l,c)=>c.score-l.score||l.property.localeCompare(c.property));let o=3;for(let l of a){let c=l.property,h=o1.t("Rename to '{0}'",c),m=V.replace(i.range,c),w=zi.create(e.uri,e.version),S={documentChanges:[In.create(w,[m])]},P=Wi.create(h,S,zn.QuickFix);if(P.diagnostics=[i],r.push(P),--o<=0)return}}appendFixesForMarker(e,n,i,r){if(i.code!==me.UnknownProperty.id)return;let s=e.offsetAt(i.range.start),a=e.offsetAt(i.range.end),o=mr(n,s);for(let l=o.length-1;l>=0;l--){let c=o[l];if(c instanceof He){let h=c.getProperty();if(h&&h.offset===s&&h.end===a){this.getFixesForUnknownProperty(e,h,i,r);return}}}}}});function Cs(t,e,n,i){let r=t[e];r.value=n,n&&(Gh(r.properties,i)||r.properties.push(i))}function KS(t,e,n){Cs(t,"top",e,n),Cs(t,"right",e,n),Cs(t,"bottom",e,n),Cs(t,"left",e,n)}function Qe(t,e,n,i){e==="top"||e==="right"||e==="bottom"||e==="left"?Cs(t,e,n,i):KS(t,n,i)}function sp(t,e,n){switch(e.length){case 1:Qe(t,void 0,e[0],n);break;case 2:Qe(t,"top",e[0],n),Qe(t,"bottom",e[0],n),Qe(t,"right",e[1],n),Qe(t,"left",e[1],n);break;case 3:Qe(t,"top",e[0],n),Qe(t,"right",e[1],n),Qe(t,"left",e[1],n),Qe(t,"bottom",e[2],n);break;case 4:Qe(t,"top",e[0],n),Qe(t,"right",e[1],n),Qe(t,"bottom",e[2],n),Qe(t,"left",e[3],n);break}}function ap(t,e){for(let n of e)if(t.matches(n))return!0;return!1}function xs(t,e=!0){return e&&ap(t,["initial","unset"])?!1:parseFloat(t.getText())!==0}function c1(t,e=!0){return t.map(n=>xs(n,e))}function al(t,e=!0){return!(ap(t,["none","hidden"])||e&&ap(t,["initial","unset"]))}function JS(t,e=!0){return t.map(n=>al(n,e))}function YS(t){let e=t.getChildren();if(e.length===1){let n=e[0];return xs(n)&&al(n)}for(let n of e){let i=n;if(!xs(i,!1)||!al(i,!1))return!1}return!0}function op(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 i=n.node.value;if(!(typeof i>"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 r=n.fullPropertyName.split("-");switch(r[0]){case"border":switch(r[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(r[2]){case void 0:Qe(e,r[1],YS(i),n);break;case"width":Qe(e,r[1],xs(i,!1),n);break;case"style":Qe(e,r[1],al(i,!0),n);break}break;case"width":sp(e,c1(i.getChildren(),!1),n);break;case"style":sp(e,JS(i.getChildren(),!0),n);break}break;case"padding":r.length===1?sp(e,c1(i.getChildren(),!0),n):Qe(e,r[1],xs(i,!0),n);break}break}}return e}var sl,d1=Q(()=>{"use strict";Ko();sl=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}});var sn,ol,As,h1=Q(()=>{"use strict";sn=Ke(gt(),1);br();Ye();Ko();rl();d1();ol=class{constructor(){this.data={}}add(e,n,i){let r=this.data[e];r||(r={nodes:[],names:[]},this.data[e]=r),r.names.push(n),i&&r.nodes.push(i)}},As=class t{static entries(e,n,i,r,s){let a=new t(n,i,r);return e.acceptVisitor(a),a.completeValidations(),a.getEntries(s)}constructor(e,n,i){this.cssDataManager=i,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new ol,this.validProperties={};let r=n.getSetting(a1.ValidProperties);Array.isArray(r)&&r.forEach(s=>{if(typeof s=="string"){let a=s.trim().toLowerCase();a.length&&(this.validProperties[a]=!0)}})}isValidPropertyDeclaration(e){let n=e.fullPropertyName;return this.validProperties[n]}fetch(e,n){let i=[];for(let r of e)r.fullPropertyName===n&&i.push(r);return i}fetchWithValue(e,n,i){let r=[];for(let s of e)if(s.fullPropertyName===n){let a=s.node.getValue();a&&this.findValueInExpression(a,i)&&r.push(s)}return r}findValueInExpression(e,n){let i=!1;return e.accept(r=>(r.type===u.Identifier&&r.matches(n)&&(i=!0),!i)),i}getEntries(e=Je.Warning|Je.Error){return this.warnings.filter(n=>(n.getLevel()&e)!==0)}addEntry(e,n,i){let r=new ur(e,n,this.settings.getRule(n),i);this.warnings.push(r)}getMissingNames(e,n){let i=e.slice(0);for(let s=0;s0){let l=this.fetch(i,"float");for(let c=0;c0){let l=this.fetch(i,"vertical-align");for(let c=0;c1)for(let w=0;wR.startsWith(b))&&P.delete(y)}}let H=[];for(let X=0,y=t.prefixes.length;Xs instanceof Zn?(r+=1,!1):!0),r!==i&&this.addEntry(e,me.ArgsInColorFunction)),!0}};As.prefixes=["-ms-","-moz-","-o-","-webkit-"]});var Cr,p1=Q(()=>{"use strict";Ye();rl();h1();Et();Cr=class{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,n,i=this.settings){if(i&&i.validate===!1)return[];let r=[];r.push.apply(r,Lo.entries(n)),r.push.apply(r,As.entries(n,e,new il(i&&i.lint),this.cssDataManager));let s=[];for(let o in me)s.push(me[o].id);function a(o){let l=ee.create(e.positionAt(o.getOffset()),e.positionAt(o.getOffset()+o.getLength())),c=e.languageId;return{code:o.getRule().id,source:c,message:o.getMessage(),severity:o.getLevel()===Je.Warning?ai.Warning:ai.Error,range:l}}return r.filter(o=>o.getLevel()!==Je.Ignore).map(a)}}});var u1,XS,QS,ZS,ey,ty,ny,Es,iy,ry,sy,lp,Cn,ll,Ar,fC,cp,dp,cl,dl,ks,bC,xr,hp=Q(()=>{"use strict";Hn();u1=47,XS=10,QS=13,ZS=12,ey=36,ty=35,ny=123,Es=61,iy=33,ry=60,sy=62,lp=46,Cn=d.CustomToken,ll=Cn++,Ar=Cn++,fC=Cn++,cp=Cn++,dp=Cn++,cl=Cn++,dl=Cn++,ks=Cn++,bC=Cn++,xr=class extends Dt{scanNext(e){if(this.stream.advanceIfChar(ey)){let n=["$"];if(this.ident(n))return this.finishToken(e,ll,n.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([ty,ny])?this.finishToken(e,Ar):this.stream.advanceIfChars([Es,Es])?this.finishToken(e,cp):this.stream.advanceIfChars([iy,Es])?this.finishToken(e,dp):this.stream.advanceIfChar(ry)?this.stream.advanceIfChar(Es)?this.finishToken(e,dl):this.finishToken(e,d.Delim):this.stream.advanceIfChar(sy)?this.stream.advanceIfChar(Es)?this.finishToken(e,cl):this.finishToken(e,d.Delim):this.stream.advanceIfChars([lp,lp,lp])?this.finishToken(e,ks):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([u1,u1])?(this.stream.advanceWhileChar(e=>{switch(e){case XS:case QS:case ZS:return!1;default:return!0}}),!0):!1}}});var hl,Ms,pl,m1=Q(()=>{"use strict";hl=Ke(gt(),1),Ms=class{constructor(e,n){this.id=e,this.message=n}},pl={FromExpected:new Ms("scss-fromexpected",hl.t("'from' expected")),ThroughOrToExpected:new Ms("scss-throughexpected",hl.t("'through' or 'to' expected")),InExpected:new Ms("scss-fromexpected",hl.t("'in' expected"))}});var ul,f1=Q(()=>{"use strict";hp();Hn();gs();Ye();m1();jo();ul=class extends nn{constructor(){super(new xr)}_parseStylesheetStatement(e=!1){return this.peek(d.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(Kn);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,g.URIOrStringExpected);for(;this.accept(d.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,g.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(ll))return null;let n=this.create(en);if(!n.setVariable(this._parseVariable()))return null;if(!this.accept(d.Colon))return this.finish(n,g.ColonExpected);if(this.prevToken&&(n.colonPosition=this.prevToken.offset),!n.setValue(this._parseExpr()))return this.finish(n,g.VariableValueExpected,[],e);for(;this.peek(d.Exclamation);)if(!n.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(d.Ident,/^(default|global)$/))return this.finish(n,g.UnknownKeyword);this.consumeToken()}return this.peek(d.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(dl)||this.accept(cl)||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(ll))return null;let e=this.create(ei);return this.consumeToken(),e}_parseModuleMember(){let e=this.mark(),n=this.create(us);return n.setIdentifier(this._parseIdent([re.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):n.addChild(this._parseVariable()||this._parseFunction())?n:this.finish(n,g.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(d.Ident)&&!this.peek(Ar)&&!this.peekDelim("-"))return null;let n=this.create(Ne);n.referenceTypes=e,n.isCustomProperty=this.peekRegExp(d.Ident,/^--/);let i=!1,r=()=>{let s=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(s),null):this._parseInterpolation()};for(;(this.accept(d.Ident)||n.addChild(r())||i&&this.acceptRegexp(/^[\w-]/))&&(i=!0,!this.hasWhitespace()););return i?this.finish(n):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(Ar)){let e=this.create(_i);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(d.CurlyR)?this.finish(e):this.finish(e,g.ExpressionExpected):this.accept(d.CurlyR)?this.finish(e):this.finish(e,g.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(cp)||this.peek(dp)||this.peek(cl)||this.peek(dl)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){let e=this.createNode(u.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){let e=this.create(z);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(d.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 i=this.create(He);if(!i.setProperty(this._parseProperty()))return null;if(!this.accept(d.Colon))return this.finish(i,g.ColonExpected,[d.Colon],e||[d.SemiColon]);this.prevToken&&(i.colonPosition=this.prevToken.offset);let r=!1;if(i.setValue(this._parseExpr())&&(r=!0,i.addChild(this._parsePrio())),this.peek(d.CurlyL))i.setNestedProperties(this._parseNestedProperties());else if(!r)return this.finish(i,g.PropertyValueExpected);return this.peek(d.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)}_parseNestedProperties(){let e=this.create(hs);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){let e=this.create(tn);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,g.SelectorExpected);for(;this.accept(d.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(d.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,g.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(u.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(d.Num)||this.accept(d.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){let e=this.createNode(u.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword("@at-root")){let e=this.createNode(u.SelectorPlaceholder);if(this.consumeToken(),this.accept(d.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,g.IdentifierExpected);if(!this.accept(d.Colon))return this.finish(e,g.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,g.IdentifierExpected);if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[d.CurlyR])}return this.finish(e)}return null}_parseElementName(){let e=this.mark(),n=super._parseElementName();return n&&!this.hasWhitespace()&&this.peek(d.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(u.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(d.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(uo);if(this.consumeToken(),!n.setExpression(this._parseExpr(!0)))return this.finish(n,g.ExpressionExpected);if(this._parseBody(n,e),this.acceptKeyword("@else")){if(this.peekIdent("if"))n.setElseClause(this._internalParseIfStatement(e));else if(this.peek(d.CurlyL)){let i=this.create(go);this._parseBody(i,e),n.setElseClause(i)}}return this.finish(n)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;let n=this.create(mo);return this.consumeToken(),n.setVariable(this._parseVariable())?this.acceptIdent("from")?n.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(n,pl.ThroughOrToExpected,[d.CurlyR]):n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,g.ExpressionExpected,[d.CurlyR]):this.finish(n,g.ExpressionExpected,[d.CurlyR]):this.finish(n,pl.FromExpected,[d.CurlyR]):this.finish(n,g.VariableNameExpected,[d.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;let n=this.create(fo);this.consumeToken();let i=n.getVariables();if(!i.addChild(this._parseVariable()))return this.finish(n,g.VariableNameExpected,[d.CurlyR]);for(;this.accept(d.Comma);)if(!i.addChild(this._parseVariable()))return this.finish(n,g.VariableNameExpected,[d.CurlyR]);return this.finish(i),this.acceptIdent("in")?n.addChild(this._parseExpr())?this._parseBody(n,e):this.finish(n,g.ExpressionExpected,[d.CurlyR]):this.finish(n,pl.InExpected,[d.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;let n=this.create(bo);return this.consumeToken(),n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,g.ExpressionExpected,[d.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(wn);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([re.Function])))return this.finish(e,g.IdentifierExpected,[d.CurlyR]);if(!this.accept(d.ParenthesisL))return this.finish(e,g.LeftParenthesisExpected,[d.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,g.VariableNameExpected)}return this.accept(d.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,g.RightParenthesisExpected,[d.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;let e=this.createNode(u.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,g.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;let e=this.create(Ut);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([re.Mixin])))return this.finish(e,g.IdentifierExpected,[d.CurlyR]);if(this.accept(d.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,g.VariableNameExpected)}if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[d.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){let e=this.create(Zt);return e.setIdentifier(this._parseVariable())?(this.accept(ks),this.accept(d.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,g.VariableValueExpected,[],[d.Comma,d.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;let e=this.create(Io);if(this.consumeToken(),this.accept(d.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,g.ExpressionExpected)}if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;let e=this.create(Sn);this.consumeToken();let n=this._parseIdent([re.Mixin]);if(!e.setIdentifier(n))return this.finish(e,g.IdentifierExpected,[d.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){let i=this._parseIdent([re.Mixin]);if(!i)return this.finish(e,g.IdentifierExpected,[d.CurlyR]);let r=this.create(us);n.referenceTypes=[re.Module],r.setIdentifier(n),e.setIdentifier(i),e.addChild(r)}if(this.accept(d.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,g.ExpressionExpected)}if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(d.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){let e=this.create(To);if(this.acceptIdent("using")){if(!this.accept(d.ParenthesisL))return this.finish(e,g.LeftParenthesisExpected,[d.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,g.VariableNameExpected)}if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[d.CurlyL])}return this.peek(d.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseIfTest(){let e=this.create(z);return this.acceptIdent("sass")?this.hasWhitespace()||!this.accept(d.ParenthesisL)?this.finish(e,g.LeftParenthesisExpected,[],[d.CurlyL]):(e.addChild(this._parseExpr()),this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected,[],[d.CurlyL])):super._parseIfTest()}_parseFunction(){let e=this.mark(),n=this.create(xt),i=this.peekIdent("if");if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(d.ParenthesisL))return this.restoreAtMark(e),null;let r,s=this._parseFunctionArgument.bind(this),a=d.Comma;if(!i)r=this._parseFunctionArgument();else{let o=this.mark();r=this._parseIfBranch(),r&&!r.isErroneous()?(s=this._parseIfBranch.bind(this),a=d.SemiColon):(this.restoreAtMark(o),r=this._parseFunctionArgument())}if(n.getArguments().addChild(r))for(;this.accept(a)&&!this.peek(d.ParenthesisR);)n.getArguments().addChild(s())||this.markError(n,g.ExpressionExpected);return this.accept(d.ParenthesisR)?this.finish(n):this.finish(n,g.RightParenthesisExpected)}_parseFunctionArgument(){let e=this.create(At),n=this.mark(),i=this._parseVariable();if(i)if(this.accept(d.Colon))e.setIdentifier(i);else{if(this.accept(ks))return e.setValue(i),this.finish(e);this.restoreAtMark(n)}return e.setValue(this._parseExpr(!0))?(this.accept(ks),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(d.ParenthesisR)){this.restoreAtMark(e);let i=this.create(z);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return n}_parseOperation(){if(!this.peek(d.ParenthesisL))return null;let e=this.create(z);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(d.Comma);return this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected)}_parseListElement(){let e=this.create(zo),n=this._parseBinaryExpr();if(!n)return null;if(this.accept(d.Colon)){if(e.setKey(n),!e.setValue(this._parseBinaryExpr()))return this.finish(e,g.ExpressionExpected)}else e.setValue(n);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;let e=this.create(_o);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,g.StringLiteralExpected);if(!this.peek(d.SemiColon)&&!this.peek(d.EOF)){if(!this.peekRegExp(d.Ident,/as|with/))return this.finish(e,g.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([re.Module]))&&!this.acceptDelim("*"))return this.finish(e,g.IdentifierOrWildcardExpected);if(this.acceptIdent("with")&&!e.setParameters(this._parseModuleConfig()))return this.finish(e,g.LeftParenthesisExpected,[d.ParenthesisR])}return!this.accept(d.SemiColon)&&!this.accept(d.EOF)?this.finish(e,g.SemiColonExpected):this.finish(e)}_parseModuleConfig(){let e=this.createNode(u.ModuleConfig);if(!this.accept(d.ParenthesisL))return null;if(!e.addChild(this._parseModuleConfigDeclaration()))return this.finish(e,g.VariableNameExpected);for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!e.addChild(this._parseModuleConfigDeclaration()))return this.finish(e,g.VariableNameExpected);return this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected)}_parseModuleConfigDeclaration(){let e=this.create(So);return e.setIdentifier(this._parseVariable())?!this.accept(d.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,g.VariableValueExpected,[],[d.Comma,d.ParenthesisR]):this.accept(d.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,g.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;let e=this.create(yo);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,g.StringLiteralExpected);if(this.acceptIdent("as")){let n=this._parseIdent([re.Forward]);if(!e.setIdentifier(n))return this.finish(e,g.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,g.WildcardExpected)}if(this.acceptIdent("with")){if(!e.setParameters(this._parseModuleConfig()))return this.finish(e,g.LeftParenthesisExpected,[d.ParenthesisR])}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,g.IdentifierOrVariableExpected);return!this.accept(d.SemiColon)&&!this.accept(d.EOF)?this.finish(e,g.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){let e=this.create(vo);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(d.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}}});function b1(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(i=>`[${i.name}](${i.url})`).join(" | "),e.documentation=n}})}var O,xn,Ht,g1=Q(()=>{"use strict";el();Ye();Et();O=Ke(gt(),1),xn=O.t("Sass documentation"),Ht=class t extends ti{constructor(e,n){super("$",e,n),b1(t.scssModuleLoaders),b1(t.scssModuleBuiltIns)}isImportPathParent(e){return e===u.Forward||e===u.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,n){let i=e.getParent().type;if(i===u.Forward||i===u.Use)for(let r of t.scssModuleBuiltIns){let s={label:r.label,documentation:r.documentation,textEdit:V.replace(this.getCompletionRange(e),`'${r.label}'`),kind:J.Module};n.items.push(s)}return super.getCompletionForImportPath(e,n)}createReplaceFunction(){let e=1;return(n,i)=>"\\"+i+": ${"+e+++":"+(t.variableDefaults[i]||"")+"}"}createFunctionProposals(e,n,i,r){for(let s of e){let a=s.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),l={label:s.func.substr(0,s.func.indexOf("(")),detail:s.func,documentation:s.desc,textEdit:V.replace(this.getCompletionRange(n),a),insertTextFormat:je.Snippet,kind:J.Function};i&&(l.sortText="z"),r.items.push(l)}return r}getCompletionsForSelector(e,n,i){return this.createFunctionProposals(t.selectorFuncs,null,!0,i),super.getCompletionsForSelector(e,n,i)}getTermProposals(e,n,i){let r=t.builtInFuncs;return e&&(r=r.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(r,n,!0,i),super.getTermProposals(e,n,i)}getColorProposals(e,n,i){return this.createFunctionProposals(t.colorProposals,n,!1,i),super.getColorProposals(e,n,i)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionForAtDirectives(n),this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}getCompletionsForExtendsReference(e,n,i){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,re.Rule);for(let s of r){let a={label:s.name,textEdit:V.replace(this.getCompletionRange(n),s.name),kind:J.Function};i.items.push(a)}return i}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}};Ht.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"};Ht.colorProposals=[{func:"red($color)",desc:O.t("Gets the red component of a color.")},{func:"green($color)",desc:O.t("Gets the green component of a color.")},{func:"blue($color)",desc:O.t("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:O.t("Mixes two colors together.")},{func:"hue($color)",desc:O.t("Gets the hue component of a color.")},{func:"saturation($color)",desc:O.t("Gets the saturation component of a color.")},{func:"lightness($color)",desc:O.t("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:O.t("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:O.t("Makes a color lighter.")},{func:"darken($color, $amount)",desc:O.t("Makes a color darker.")},{func:"saturate($color, $amount)",desc:O.t("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:O.t("Makes a color less saturated.")},{func:"grayscale($color)",desc:O.t("Converts a color to grayscale.")},{func:"complement($color)",desc:O.t("Returns the complement of a color.")},{func:"invert($color)",desc:O.t("Returns the inverse of a color.")},{func:"alpha($color)",desc:O.t("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:O.t("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:O.t("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:O.t("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:O.t("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:O.t("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:O.t("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:O.t("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:O.t("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:O.t("Converts a color into the format understood by IE filters.")}];Ht.selectorFuncs=[{func:"selector-nest($selectors\u2026)",desc:O.t("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors\u2026)",desc:O.t("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:O.t("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:O.t("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:O.t("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:O.t("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:O.t("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:O.t("Parses a selector into the format returned by &.")}];Ht.builtInFuncs=[{func:"unquote($string)",desc:O.t("Removes quotes from a string.")},{func:"quote($string)",desc:O.t("Adds quotes to a string.")},{func:"str-length($string)",desc:O.t("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:O.t("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:O.t("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:O.t("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:O.t("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:O.t("Converts a string to lower case.")},{func:"percentage($number)",desc:O.t("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:O.t("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:O.t("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:O.t("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:O.t("Returns the absolute value of a number.")},{func:"min($numbers)",desc:O.t("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:O.t("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:O.t("Returns a random number.")},{func:"length($list)",desc:O.t("Returns the length of a list.")},{func:"nth($list, $n)",desc:O.t("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:O.t("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:O.t("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:O.t("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:O.t("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:O.t("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:O.t("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:O.t("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:O.t("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:O.t("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:O.t("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:O.t("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:O.t("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:O.t("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:O.t("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:O.t("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:O.t("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:O.t("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:O.t("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:O.t("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:O.t("Returns the type of a value.")},{func:"unit($number)",desc:O.t("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:O.t("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:O.t("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args\u2026)",desc:O.t("Dynamically calls a Sass function.")}];Ht.scssAtDirectives=[{label:"@extend",documentation:O.t("Inherits the styles of another selector."),kind:J.Keyword},{label:"@at-root",documentation:O.t("Causes one or more rules to be emitted at the root of the document."),kind:J.Keyword},{label:"@debug",documentation:O.t("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:J.Keyword},{label:"@warn",documentation:O.t("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:J.Keyword},{label:"@error",documentation:O.t("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:J.Keyword},{label:"@if",documentation:O.t("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { + $0 +}`,insertTextFormat:je.Snippet,kind:J.Keyword},{label:"@for",documentation:O.t("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:je.Snippet,kind:J.Keyword},{label:"@each",documentation:O.t("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:je.Snippet,kind:J.Keyword},{label:"@while",documentation:O.t("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} { + $0 +}`,insertTextFormat:je.Snippet,kind:J.Keyword},{label:"@mixin",documentation:O.t("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} { + $0 +}`,insertTextFormat:je.Snippet,kind:J.Keyword},{label:"@include",documentation:O.t("Includes the styles defined by another mixin into the current rule."),kind:J.Keyword},{label:"@function",documentation:O.t("Defines complex operations that can be re-used throughout stylesheets."),kind:J.Keyword}];Ht.scssModuleLoaders=[{label:"@use",documentation:O.t("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:xn,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:je.Snippet,kind:J.Keyword},{label:"@forward",documentation:O.t("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:xn,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:je.Snippet,kind:J.Keyword}];Ht.scssModuleBuiltIns=[{label:"sass:math",documentation:O.t("Provides functions that operate on numbers."),references:[{name:xn,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:O.t("Makes it easy to combine, search, or split apart strings."),references:[{name:xn,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:O.t("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:xn,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:O.t("Lets you access and modify values in lists."),references:[{name:xn,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:O.t("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:xn,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:O.t("Provides access to Sass\u2019s powerful selector engine."),references:[{name:xn,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:O.t("Exposes the details of Sass\u2019s inner workings."),references:[{name:xn,url:"https://sass-lang.com/documentation/modules/meta"}]}]});var w1,oy,ly,cy,pp,up,dy,ml,Er,mp=Q(()=>{"use strict";Hn();w1=47,oy=10,ly=13,cy=12,pp=96,up=46,dy=d.CustomToken,ml=dy++,Er=class extends Dt{scanNext(e){let n=this.escapedJavaScript();return n!==null?this.finishToken(e,n):this.stream.advanceIfChars([up,up,up])?this.finishToken(e,ml):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([w1,w1])?(this.stream.advanceWhileChar(e=>{switch(e){case oy:case ly:case cy:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===pp?(this.stream.advance(1),this.stream.advanceWhileChar(n=>n!==pp),this.stream.advanceIfChar(pp)?d.EscapedJavaScript:d.BadEscapedJavaScript):null}}});var fl,_1=Q(()=>{"use strict";mp();Hn();gs();Ye();jo();fl=class extends nn{constructor(){super(new Er)}_parseStylesheetStatement(e=!1){return this.peek(d.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(Kn);if(this.consumeToken(),this.accept(d.ParenthesisL)){if(!this.accept(d.Ident))return this.finish(e,g.IdentifierExpected,[d.SemiColon]);do if(!this.accept(d.Comma))break;while(this.accept(d.Ident));if(!this.accept(d.ParenthesisR))return this.finish(e,g.RightParenthesisExpected,[d.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,g.URIOrStringExpected,[d.SemiColon]):(!this.peek(d.SemiColon)&&!this.peek(d.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;let e=this.createNode(u.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(d.SemiColon)?this.finish(e):this.finish(e,g.SemiColonExpected):this.finish(e,g.StringLiteralExpected)}_parseMediaQuery(){let e=super._parseMediaQuery();if(!e){let n=this.create(cr);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(en),i=this.mark();if(!n.setVariable(this._parseVariable(!0)))return null;if(this.accept(d.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,g.VariableValueExpected,[],e);n.addChild(this._parsePrio())}else return this.restoreAtMark(i),null;return this.peek(d.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(d.ParenthesisL)){let i=this.create(Ut);if(i.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(d.Comma)||this.accept(d.SemiColon))&&!this.peek(d.ParenthesisR);)i.getParameters().addChild(this._parseMixinParameter())||this.markError(i,g.IdentifierExpected,[],[d.ParenthesisR]);if(!this.accept(d.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(d.CurlyL))return null;let n=this.create(he);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(d.BracketL)&&(n=!0),!!e.addChild(this._parseLookupValue());)n=!1;return!n}_parseLookupValue(){let e=this.create(z),n=this.mark();return this.accept(d.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(d.BracketR)||this.accept(d.BracketR)?e:(this.restoreAtMark(n),null):(this.restoreAtMark(n),null)}_parseVariable(e=!1,n=!1){let i=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!i&&!this.peek(d.AtKeyword))return null;let r=this.create(ei),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(d.AtKeyword)&&!this.accept(d.Ident)?(this.restoreAtMark(s),null):!n&&this.peek(d.BracketL)&&!this._addLookupChildren(r)?(this.restoreAtMark(s),null):r}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(d.EscapedJavaScript)||this.peek(d.BadEscapedJavaScript)){let e=this.createNode(u.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){let e=this.createNode(u.EscapedValue);return this.consumeToken(),this.accept(d.String)||this.accept(d.EscapedJavaScript)?this.finish(e):this.finish(e,g.TermExpected)}return null}_parseOperator(){let e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){let e=this.createNode(u.Operator);return this.consumeToken(),this.acceptDelim("="),e}else if(this.peekDelim("=")){let e=this.createNode(u.Operator);return this.consumeToken(),this.acceptDelim("<"),e}else if(this.peekDelim("<")){let e=this.createNode(u.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(d.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([re.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){let n=this.create(Ot),i=!1;for(e&&(i=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());){i=!0;let r=this.mark();if(n.addChild(this._parseGuard())&&this.peek(d.CurlyL))break;this.restoreAtMark(r),n.addChild(this._parseCombinator())}return i?this.finish(n):null}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(u.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(d.Num)||this.accept(d.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;let e=this.createNode(u.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 i=this.mark(),r=this.create(Ne);r.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let s=!1;return e?r.isCustomProperty?s=r.addChild(this._parseIdent()):s=r.addChild(this._parseRegexp(n)):r.isCustomProperty?s=this._acceptInterpolatedIdent(r):s=this._acceptInterpolatedIdent(r,n),s?(!e&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(r)):(this.restoreAtMark(i),null)}peekInterpolatedIdent(){return this.peek(d.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,n){let i=!1,r=()=>{let a=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(a),null):this._parseInterpolation()},s=n?()=>this.acceptRegexp(n):()=>this.accept(d.Ident);for(;(s()||e.addChild(this._parseInterpolation()||this.try(r)))&&(i=!0,!this.hasWhitespace()););return i}_parseInterpolation(){let e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){let n=this.createNode(u.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(d.CurlyL)?(this.restoreAtMark(e),null):n.addChild(this._parseIdent())?this.accept(d.CurlyR)?this.finish(n):this.finish(n,g.RightCurlyExpected):this.finish(n,g.IdentifierExpected)}return null}_tryParseMixinDeclaration(){let e=this.mark(),n=this.create(Ut);if(!n.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(d.ParenthesisL))return this.restoreAtMark(e),null;if(n.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(d.Comma)||this.accept(d.SemiColon))&&!this.peek(d.ParenthesisR);)n.getParameters().addChild(this._parseMixinParameter())||this.markError(n,g.IdentifierExpected,[],[d.ParenthesisR]);return this.accept(d.ParenthesisR)?(n.setGuard(this._parseGuard()),this.peek(d.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(Ne),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else if(this.peek(d.Hash))e=this.create(Ne),this.consumeToken();else return null;return e.referenceTypes=[re.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(d.Colon))return null;let e=this.mark(),n=this.create(tn);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(tn);return this.consumeToken(),this.hasWhitespace()||!this.accept(d.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(e),null):this._completeExtends(n)}_completeExtends(e){if(!this.accept(d.ParenthesisL))return this.finish(e,g.LeftParenthesisExpected);let n=e.getSelectors();if(!n.addChild(this._parseSelector(!0)))return this.finish(e,g.SelectorExpected);for(;this.accept(d.Comma);)if(!n.addChild(this._parseSelector(!0)))return this.finish(e,g.SelectorExpected);return this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(d.AtKeyword))return null;let e=this.mark(),n=this.create(Sn);return n.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(d.ParenthesisL))?(this.restoreAtMark(e),null):this.accept(d.ParenthesisR)?this.finish(n):this.finish(n,g.RightParenthesisExpected)}_tryParseMixinReference(e=!0){let n=this.mark(),i=this.create(Sn),r=this._parseMixinDeclarationIdentifier();for(;r;){this.acceptDelim(">");let a=this._parseMixinDeclarationIdentifier();if(a)i.getNamespaces().addChild(r),r=a;else break}if(!i.setIdentifier(r))return this.restoreAtMark(n),null;let s=!1;if(this.accept(d.ParenthesisL)){if(s=!0,i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(d.Comma)||this.accept(d.SemiColon))&&!this.peek(d.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,g.ExpressionExpected)}if(!this.accept(d.ParenthesisR))return this.finish(i,g.RightParenthesisExpected);r.referenceTypes=[re.Mixin]}else r.referenceTypes=[re.Mixin,re.Rule];return this.peek(d.BracketL)?e||this._addLookupChildren(i):i.addChild(this._parsePrio()),!s&&!this.peek(d.SemiColon)&&!this.peek(d.CurlyR)&&!this.peek(d.EOF)?(this.restoreAtMark(n),null):this.finish(i)}_parseMixinArgument(){let e=this.create(At),n=this.mark(),i=this._parseVariable();return i&&(this.accept(d.Colon)?e.setIdentifier(i):this.restoreAtMark(n)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(n),null)}_parseMixinParameter(){let e=this.create(Zt);if(this.peekKeyword("@rest")){let i=this.create(z);return this.consumeToken(),this.accept(ml)?(e.setIdentifier(this.finish(i)),this.finish(e)):this.finish(e,g.DotExpected,[],[d.Comma,d.ParenthesisR])}if(this.peek(ml)){let i=this.create(z);return this.consumeToken(),e.setIdentifier(this.finish(i)),this.finish(e)}let n=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(d.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(No);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,g.ConditionExpected);for(;this.acceptIdent("and")||this.accept(d.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,g.ConditionExpected);return this.finish(e)}_parseGuardCondition(){let e=this.create(Wo);return e.isNegated=this.acceptIdent("not"),this.accept(d.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,g.RightParenthesisExpected)):e.isNegated?this.finish(e,g.LeftParenthesisExpected):null}_parseFunction(){let e=this.mark(),n=this.create(xt);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(d.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(d.Comma)||this.accept(d.SemiColon))&&!this.peek(d.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,g.ExpressionExpected)}return this.accept(d.ParenthesisR)?this.finish(n):this.finish(n,g.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){let e=this.create(Ne);return e.referenceTypes=[re.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){let e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(d.ParenthesisR)){this.restoreAtMark(e);let i=this.create(z);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return n}}});var Y,kr,S1=Q(()=>{"use strict";el();Et();Y=Ke(gt(),1),kr=class t extends ti{constructor(e,n){super("@",e,n)}createFunctionProposals(e,n,i,r){for(let s of e){let a={label:s.name,detail:s.example,documentation:s.description,textEdit:V.replace(this.getCompletionRange(n),s.name+"($0)"),insertTextFormat:je.Snippet,kind:J.Function};i&&(a.sortText="z"),r.items.push(a)}return r}getTermProposals(e,n,i){let r=t.builtInProposals;return e&&(r=r.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(r,n,!0,i),super.getTermProposals(e,n,i)}getColorProposals(e,n,i){return this.createFunctionProposals(t.colorProposals,n,!1,i),super.getColorProposals(e,n,i)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}};kr.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:Y.t("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:Y.t('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:Y.t("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:Y.t("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:Y.t("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:Y.t("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:Y.t("URL encodes a string")},{name:"e",example:"e(@string);",description:Y.t("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:Y.t("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:Y.t("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:Y.t("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:Y.t("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:Y.t("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:Y.t("absolute value of a number"),example:"abs(number);"},{name:"acos",description:Y.t("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:Y.t("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:Y.t("rounds up to an integer")},{name:"cos",description:Y.t("cosine function"),example:"cos(number);"},{name:"floor",description:Y.t("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:Y.t("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:Y.t("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:Y.t("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:Y.t("sine function"),example:"sin(number);"},{name:"tan",description:Y.t("tangent function"),example:"tan(number);"},{name:"atan",description:Y.t("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:Y.t("returns pi"),example:"pi();"},{name:"pow",description:Y.t("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:Y.t("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:Y.t("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:Y.t("returns the lowest of one or more values"),example:"max(@x, @y);"}];kr.colorProposals=[{name:"argb",example:"argb(@color);",description:Y.t("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:Y.t("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:Y.t("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:Y.t("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:Y.t("creates a color")},{name:"hue",example:"hue(@color);",description:Y.t("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:Y.t("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:Y.t("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:Y.t("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:Y.t("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:Y.t("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:Y.t("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:Y.t("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:Y.t("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:Y.t("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:Y.t("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:Y.t("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:Y.t("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:Y.t("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:Y.t("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:Y.t("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:Y.t("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:Y.t("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:Y.t("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:Y.t("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:Y.t("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:Y.t("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 v1(t,e){let n=py(t);return uy(n,e)}function py(t){function e(h){return t.positionAt(h.offset).line}function n(h){return t.positionAt(h.offset+h.len).line}function i(){switch(t.languageId){case"scss":return new xr;case"less":return new Er;default:return new Dt}}function r(h,m){let w=e(h),S=n(h);return w!==S?{startLine:w,endLine:S,kind:m}:null}let s=[],a=[],o=i();o.ignoreComment=!1,o.setSource(t.getText());let l=o.scan(),c=null;for(;l.type!==d.EOF;){switch(l.type){case d.CurlyL:case Ar:{a.push({line:e(l),type:"brace",isStart:!0});break}case d.CurlyR:{if(a.length!==0){let h=y1(a,"brace");if(!h)break;let m=n(l);h.type==="brace"&&(c&&n(c)!==m&&m--,h.line!==m&&s.push({startLine:h.line,endLine:m,kind:void 0}))}break}case d.Comment:{let h=S=>S==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1},w=(S=>{let P=S.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(P)return h(P[1]);if(t.languageId==="scss"||t.languageId==="less"){let H=S.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(H)return h(H[1])}return null})(l);if(w)if(w.isStart)a.push(w);else{let S=y1(a,"comment");if(!S)break;S.type==="comment"&&S.line!==w.line&&s.push({startLine:S.line,endLine:w.line,kind:"region"})}else{let S=r(l,"comment");S&&s.push(S)}break}}c=l,l=o.scan()}return s}function y1(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 uy(t,e){let n=e&&e.rangeLimit||Number.MAX_VALUE,i=t.sort((a,o)=>{let l=a.startLine-o.startLine;return l===0&&(l=a.endLine-o.endLine),l}),r=[],s=-1;return i.forEach(a=>{a.startLine{"use strict";Hn();hp();mp()});var C1,x1,A1=Q(()=>{"use strict";(function(){"use strict";var t=[,,(function(r){function s(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}s.prototype.clone_empty=function(){var l=new s(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},s.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},s.prototype.has_match=function(l){for(var c=this.__items.length-1;c>=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 a(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}a.prototype.get_indent_size=function(l,c){var h=this.__base_string_length;return c=c||0,l<0&&(h=0),h+=l*this.__indent_size,h+=c,h},a.prototype.get_indent_string=function(l,c){var h=this.__base_string;return c=c||0,l<0&&(l=0,h=""),c+=l*this.__indent_size,this.__ensure_cache(c),h+=this.__cache[c],h},a.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var l=this.__cache.length,c=0,h="";this.__indent_size&&l>=this.__indent_size&&(c=Math.floor(l/this.__indent_size),l-=c*this.__indent_size,h=new Array(c+1).join(this.__indent_string)),l&&(h+=new Array(l+1).join(" ")),this.__cache.push(h)};function o(l,c){this.__indent_cache=new a(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()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},o.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.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 h=this.__lines.join(` +`);return l!==` +`&&(h=h.replace(/[\n]/g,l)),h},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.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)},o.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},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(l,c){for(var h=this.__lines.length-2;h>=0;){var m=this.__lines[h];if(m.is_empty())break;if(m.item(0).indexOf(l)!==0&&m.item(-1)!==c){this.__lines.splice(h+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},r.exports.Output=o}),,,,(function(r){function s(l,c){this.raw_options=a(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 h=this.raw_options[l],m=c||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(m=h.concat()):typeof h=="string"&&(m=h.split(/[^a-zA-Z0-9_\/\-]+/)),m},s.prototype._get_boolean=function(l,c){var h=this.raw_options[l],m=h===void 0?!!c:!!h;return m},s.prototype._get_characters=function(l,c){var h=this.raw_options[l],m=c||"";return typeof h=="string"&&(m=h.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),m},s.prototype._get_number=function(l,c){var h=this.raw_options[l];c=parseInt(c,10),isNaN(c)&&(c=0);var m=parseInt(h,10);return isNaN(m)&&(m=c),m},s.prototype._get_selection=function(l,c,h){var m=this._get_selection_list(l,c,h);if(m.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 m[0]},s.prototype._get_selection_list=function(l,c,h){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[c[0]],!this._is_valid_selection(h,c))throw new Error("Invalid Default Value!");var m=this._get_array(l,h);if(!this._is_valid_selection(m,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 m},s.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(h){return c.indexOf(h)===-1})};function a(l,c){var h={};l=o(l);var m;for(m in l)m!==c&&(h[m]=l[m]);if(c&&l[c])for(m in l[c])h[m]=l[c][m];return h}function o(l){var c={},h;for(h in l){var m=h.replace(/-/g,"_");c[m]=l[h]}return c}r.exports.Options=s,r.exports.normalizeOpts=o,r.exports.mergeOpts=a}),,(function(r){var s=RegExp.prototype.hasOwnProperty("sticky");function a(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position=0&&o=0&&l=o.length&&this.__input.substring(l-o.length,l).toLowerCase()===o},r.exports.InputScanner=a}),,,,,(function(r){function s(a,o){a=typeof a=="string"?a:a.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+o,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(a);l;)o[l[1]]=l[2],l=this.__directive_pattern.exec(a);return o},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},r.exports.Directives=s}),,(function(r,s,a){var o=a(16).Beautifier,l=a(17).Options;function c(h,m){var w=new o(h,m);return w.beautify()}r.exports=c,r.exports.defaultOptions=function(){return new l}}),(function(r,s,a){var o=a(17).Options,l=a(2).Output,c=a(8).InputScanner,h=a(13).Directives,m=new h(/\/\*/,/\*\//),w=/\r\n|[\r\n]/,S=/\r\n|[\r\n]/g,P=/\s/,H=/(?:\s|\n)+/g,oe=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,X=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function y(_,b){this._source_text=_||"",this._options=new o(b),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"]}y.prototype.eatString=function(_){var b="";for(this._ch=this._input.next();this._ch;){if(b+=this._ch,this._ch==="\\")b+=this._input.next();else if(_.indexOf(this._ch)!==-1||this._ch===` +`)break;this._ch=this._input.next()}return b},y.prototype.eatWhitespace=function(_){for(var b=P.test(this._input.peek()),R=0;P.test(this._input.peek());)this._ch=this._input.next(),_&&this._ch===` +`&&(R===0||R0&&this._indentLevel--},y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _=this._source_text,b=this._options.eol;b==="auto"&&(b=` +`,_&&w.test(_||"")&&(b=_.match(w)[0])),_=_.replace(S,` +`);var R=_.match(/^[\t ]*/)[0];this._output=new l(this._options,R),this._input=new c(_),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var E=0,U=!1,se=!1,We=!1,ht=!1,I=!1,C=this._ch,W=!1,N,x,k;N=this._input.read(H),x=N!=="",k=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 D=this._input.read(oe),L=m.get_directives(D);L&&L.ignore==="start"&&(D+=m.readIgnored(this._input)),this.print_string(D),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(X)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(x),this.print_string(this._ch);var B=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);B.match(/[ :]$/)&&(B=this.eatString(": ").replace(/\s+$/,""),this.print_string(B),this._output.space_before_token=!0),E===0&&B.indexOf(":")!==-1&&(se=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(x),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{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),E===0&&q.indexOf(":")!==-1?(se=!0,this.indent()):q in this.NESTED_AT_RULE?(this._nestedLevel+=1,q in this.CONDITIONAL_GROUP_RULE&&(We=!0)):E===0&&!se&&(ht=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(x),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")se&&(se=!1,this.outdent()),ht=!1,We?(We=!1,U=this._indentLevel>=this._nestedLevel):U=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&U&&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)):(k==="("?this._output.space_before_token=!1:k!==","&&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(),k==="{"&&this._output.trim(!0),se&&(this.outdent(),se=!1),this.print_string(this._ch),U=!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 te=0;te"||this._ch==="+"||this._ch==="~")&&!se&&E===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&&P.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(x),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),P.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 fe=k==='"'||k==="'";this.preserveSingleSpace(fe||x),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` +`&&W&&this._output.add_new_line()}var kt=this._output.get_code(b);return kt},r.exports.Beautifier=y}),(function(r,s,a){var o=a(6).Options;function l(c){o.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 h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var m=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var w=0;w0&&M1(i,m-1);)m--;m===0||k1(i,m-1)?h=m:m0){let h=n.insertSpaces?kh(" ",o*s):kh(" ",s);c=c.split(` +`).join(` +`+h),e.start.character===0&&(c=h+c)}return[{range:e,newText:c}]}function E1(t){return t.replace(/^\s+/,"")}function by(t,e){for(;e>=0;){let n=t.charCodeAt(e);if(n===my)return!0;if(n===fy)return!1;e--}return!1}function An(t,e,n){if(t&&t.hasOwnProperty(e)){let i=t[e];if(i!==null)return i}return n}function gy(t,e,n){let i=e,r=0,s=n.tabSize||4;for(;i{"use strict";Et();A1();gn();my=123,fy=125});var fp,bp=Q(()=>{"use strict";fp={version:1.1,properties:[{name:"additive-symbols",browsers:["FF33"],atRule:"@counter-style",syntax:"[ && ]#",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","FFA28","S9","SM9","C29","CA29","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",browsers:["E12","FF28","FFA28","S9","SM9","C29","CA29","IE11","O16"],baseline:{status:"high",baseline_low_date:"2015-09-30",baseline_high_date:"2018-03-30"}},{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:68,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/align-content"}],baseline:{status:"high",baseline_low_date:"2015-09-30",baseline_high_date:"2018-03-30"},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","FFA20","S9","SM9","C29","CA29","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 | | [ ? ] | anchor-center",relevance:90,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/align-items"}],baseline:{status:"high",baseline_low_date:"2015-09-30",baseline_high_date:"2018-03-30"},description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","FFA20","S9","SM9","C52","CA52","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",browsers:["E79","FF20","FFA20","S9","SM9","C52","CA52","O39"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"},description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left",browsers:["E79","FF20","FFA20","S9","SM9","C52","CA52","O39"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"}},{name:"right",browsers:["E79","FF20","FFA20","S9","SM9","C52","CA52","O39"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"}},{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",browsers:["E79","FF20","FFA20","S9","SM9","C52","CA52","O39"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"}}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ] | anchor-center",relevance:58,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/justify-items"}],baseline:{status:"high",baseline_low_date:"2016-07-27",baseline_high_date:"2019-01-27"},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","FFA45","S10.1","SM10.3","C57","CA57","IE10","O44"],values:[{name:"auto",browsers:["E79","FF45","FFA45","S10.1","SM10.3","C57","CA57","O44"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"}},{name:"normal",browsers:["E79","FF45","FFA45","S10.1","SM10.3","C57","CA57","O44"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"}},{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",browsers:["E79","FF45","FFA45","S10.1","SM10.3","C57","CA57","O44"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"}},{name:"right",browsers:["E79","FF45","FFA45","S10.1","SM10.3","C57","CA57","O44"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"}},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",browsers:["E79","FF45","FFA45","S10.1","SM10.3","C57","CA57","O44"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"},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 ] | anchor-center",relevance:59,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/justify-self"}],baseline:{status:"high",baseline_low_date:"2017-10-17",baseline_high_date:"2020-04-17"},description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",browsers:["E12","FF20","FFA20","S9","SM9","C29","CA29","IE10","O12.1"],values:[{name:"auto",browsers:["E79","FF28","FFA28","S7","SM7","C21","CA25","O15"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"},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",browsers:["E79","FF28","FFA28","S7","SM7","C21","CA25","O15"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"}},{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",browsers:["E79","FF28","FFA28","S7","SM7","C21","CA25","O15"],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"},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 | | ? | anchor-center",relevance:76,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/align-self"}],baseline:{status:"high",baseline_low_date:"2015-09-30",baseline_high_date:"2018-03-30"},description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","FFA27","S9.1","SM9.3","C37","CA37","O24"],values:[],syntax:"initial | inherit | unset | revert | revert-layer",relevance:56,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/all"}],baseline:{status:"high",baseline_low_date:"2020-01-15",baseline_high_date:"2022-07-15"},description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",values:[],relevance:50,baseline:{status:"false"},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","FFA16","S9","SM9","C43","CA43","IE10","O30"],values:[{name:"alternate",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},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",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},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",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},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",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},description:"Both forwards and backwards fill modes are applied."},{name:"forwards",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},description:"Causes the animation to repeat forever."},{name:"none",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},description:"No animation is performed"},{name:"normal",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},description:"Normal playback."},{name:"reverse",browsers:["E12","FF5","FFA5","S4","SM3.2","C3","CA18","O15"],baseline:{status:"high",baseline_low_date:"2015-07-29",baseline_high_date:"2018-01-29"},description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:84,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/animation"}],baseline:{status:"high",baseline_low_date:"2015-09-30",baseline_high_date:"2018-03-30"},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","FFA16","S9","SM9","C43","CA43","IE10","O30"],syntax:"