@tsrx/typescript-plugin 0.3.54 → 0.3.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const e=require(`./language-CAqwRK_u.js`);var t=e.r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dedupeDocumentSpans=t;function t(e){return n(e,e=>[e.fileName,e.textSpan.start,e.textSpan.length].join(`:`))}function n(e,t){let n=new Map;for(let r of e.reverse())n.set(t(r),r);return[...n.values()]}})),n=e.r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getServiceScript=t,e.fixupImpliedNodeFormatForFile=n;function t(e,t){let n=e.scripts.get(t);if(n?.targetIds.size)for(let t of n.targetIds){let r=e.scripts.get(t);if(r?.generated){let e=r.generated.languagePlugin.typescript?.getServiceScript(r.generated.root);if(e)return[e,r,n]}}if(n?.associatedOnly)return[void 0,n,n];if(n?.generated){let e=n.generated.languagePlugin.typescript?.getServiceScript(n.generated.root);if(e)return[e,n,n]}return[void 0,void 0,void 0]}function n(e,t,n,r,i,a){if(n.impliedNodeFormat!==void 0||!t.some(e=>n.fileName.endsWith(e))||[`.d.ts`,`.ts`,`.tsx`,`.js`,`.jsx`].some(e=>n.fileName.endsWith(e)))return;let o=n.fileName+`.ts`,s=e.getImpliedNodeFormatForFileWorker?.(o,r,i,a)?.impliedNodeFormat;if(s!==void 0)return n.impliedNodeFormat=s,()=>n.impliedNodeFormat=void 0}})),r=e.r((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.transformCallHierarchyItem=s,t.transformDiagnostic=c,t.fillSourceFileText=l,t.transformFileTextChanges=u,t.transformDocumentSpan=d,t.transformSpan=f,t.transformTextChange=p,t.transformTextSpan=m,t.toSourceOffset=h,t.toSourceRanges=g,t.toSourceOffsets=_,t.toGeneratedRange=v,t.toGeneratedRanges=y,t.toGeneratedOffset=b,t.toGeneratedOffsets=x,t.getMappingOffset=S;let r=e.n(),i=n(),a=new WeakMap,o=new WeakSet;function s(e,t,n,r){let i=f(e,t.file,t.span,n,r),a=f(e,t.file,t.selectionSpan,n,r);return{...t,file:i?.fileName??t.file,span:i?.textSpan??{start:0,length:0},selectionSpan:a?.textSpan??{start:0,length:0}}}function c(e,t,n,o){if(!a.has(t)){a.set(t,void 0);let{relatedInformation:s}=t;if(s&&(t.relatedInformation=s.map(t=>c(e,t,n,o)).filter(e=>!!e)),t.file!==void 0&&t.start!==void 0&&t.length!==void 0){let[s]=(0,i.getServiceScript)(e,t.file.fileName);if(s){let[i,c]=m(void 0,e,s,{start:t.start,length:t.length},!0,e=>(0,r.shouldReportDiagnostics)(e,String(t.source),String(t.code)))??[],u=i?t.file.fileName===i?t.file:n?.getSourceFile(i):void 0;c&&u&&(o&&l(e,t.file),a.set(t,{...t,file:u,start:c.start,length:c.length}))}else a.set(t,t)}else a.set(t,t)}return a.get(t)}function l(e,t){if(o.has(t))return;o.add(t);let[n]=(0,i.getServiceScript)(e,t.fileName);if(n&&!n.preventLeadingOffset){let r=e.scripts.fromVirtualCode(n.code);t.text=r.snapshot.getText(0,r.snapshot.getLength())+t.text.substring(r.snapshot.getLength())}}function u(e,t,n,r){let a={},o=new Set;for(let s of t){let[t,c]=(0,i.getServiceScript)(e,s.fileName);if(c)s.textChanges.forEach(t=>{let{fileName:i,textSpan:o}=f(e,s.fileName,t.span,n,r)??{};i&&o&&(a[i]??(a[i]=[])).push({...t,span:o})});else{let e=a[s.fileName]??(a[s.fileName]=[]);s.textChanges.forEach(t=>{e.push(t)}),s.isNewFile&&o.add(s.fileName)}}let s=[];for(let e in a)s.push({fileName:e,isNewFile:o.has(e),textChanges:a[e]});return s}function d(e,t,n,r,i){let a=f(e,t.fileName,t.textSpan,n,r);if(!a&&i&&(a={fileName:t.fileName,textSpan:{start:0,length:0}}),!a)return;let o=f(e,t.fileName,t.contextSpan,n,r),s=f(e,t.originalFileName,t.originalTextSpan,n,r),c=f(e,t.originalFileName,t.originalContextSpan,n,r);return{...t,fileName:a.fileName,textSpan:a.textSpan,contextSpan:o?.textSpan,originalFileName:s?.fileName,originalTextSpan:s?.textSpan,originalContextSpan:c?.textSpan}}function f(e,t,n,r,a){if(!t||!n)return;let[o]=(0,i.getServiceScript)(e,t);if(o){let[t,i]=m(void 0,e,o,n,r,a)??[];if(i&&t)return{fileName:t,textSpan:i}}else return{fileName:t,textSpan:n}}function p(e,t,n,r,i,a){let[o,s]=m(e,t,n,r.span,i,a)??[];if(s&&o)return[o,{newText:r.newText,span:s}]}function m(e,t,n,r,i,a){let o=r.start,s=r.start+r.length;for(let[r,c,l]of g(e,t,n,o,s,i,a))return[r,{start:c,length:l-c}]}function h(e,t,n,r,i){for(let a of _(e,t,n,r,i))return a}function*g(e,t,n,r,i,a,o){if(e){let s=t.maps.get(n.code,e);for(let[c,l]of s.toSourceRange(r-S(t,n),i-S(t,n),a,o))yield[e.id,c,l]}else for(let[e,s]of t.maps.forEach(n.code))for(let[c,l]of s.toSourceRange(r-S(t,n),i-S(t,n),a,o))yield[e.id,c,l]}function*_(e,t,n,r,i){if(e){let a=t.maps.get(n.code,e);for(let[o,s]of a.toSourceLocation(r-S(t,n)))i(s.data)&&(yield[e.id,o])}else for(let[e,a]of t.maps.forEach(n.code))for(let[o,s]of a.toSourceLocation(r-S(t,n)))i(s.data)&&(yield[e.id,o])}function v(e,t,n,r,i,a){for(let o of y(e,t,n,r,i,a))return o}function*y(e,t,n,r,i,a){let o=e.maps.get(t.code,n);for(let[n,s]of o.toGeneratedRange(r,i,!0,a))yield[n+S(e,t),s+S(e,t)]}function b(e,t,n,r,i){for(let[a]of x(e,t,n,r,i))return a}function*x(e,t,n,r,i){let a=e.maps.get(t.code,n);for(let[n,o]of a.toGeneratedLocation(r))i(o.data)&&(yield[n+S(e,t),o])}function S(e,t){return t.preventLeadingOffset?0:e.scripts.fromVirtualCode(t.code).snapshot.getLength()}})),i=e.r((i=>{Object.defineProperty(i,`__esModule`,{value:!0}),i.createProxyLanguageService=u;let a=e.n(),o=t(),s=r(),c=n(),l=/\\/g;function u(e){let t=new Map,n;return{initialize(t){n=(n,r)=>{switch(r){case`getNavigationTree`:return d(t,n[r]);case`getOutliningSpans`:return f(t,n[r]);case`getFormattingEditsForDocument`:return p(t,n[r]);case`getFormattingEditsForRange`:return m(t,n[r]);case`getFormattingEditsAfterKeystroke`:return h(t,n[r]);case`getEditsForFileRename`:return g(t,n[r]);case`getLinkedEditingRangeAtPosition`:return _(t,n[r]);case`prepareCallHierarchy`:return v(t,n[r]);case`provideCallHierarchyIncomingCalls`:return y(t,n[r]);case`provideCallHierarchyOutgoingCalls`:return b(t,n[r]);case`organizeImports`:return x(t,n[r]);case`getQuickInfoAtPosition`:return S(t,n[r]);case`getSignatureHelpItems`:return C(t,n[r]);case`getDocumentHighlights`:return w(t,n[r]);case`getApplicableRefactors`:return T(t,n[r]);case`getEditsForRefactor`:return E(t,n[r]);case`getCombinedCodeFix`:return D(t,n[r]);case`getRenameInfo`:return O(t,n[r]);case`getCodeFixesAtPosition`:return k(t,n[r]);case`getEncodedSemanticClassifications`:return A(t,n[r]);case`getSyntacticDiagnostics`:return j(t,e,n[r]);case`getSemanticDiagnostics`:return M(t,e,n[r]);case`getSuggestionDiagnostics`:return N(t,e,n[r]);case`getDefinitionAndBoundSpan`:return P(t,n[r]);case`findReferences`:return F(t,n[r]);case`getDefinitionAtPosition`:return I(t,n[r]);case`getTypeDefinitionAtPosition`:return L(t,n[r]);case`getImplementationAtPosition`:return R(t,n[r]);case`findRenameLocations`:return z(t,n[r]);case`getReferencesAtPosition`:return B(t,n[r]);case`getCompletionsAtPosition`:return V(t,n[r]);case`getCompletionEntryDetails`:return H(t,n[r]);case`provideInlayHints`:return U(t,n[r]);case`getFileReferences`:return W(t,n[r]);case`getNavigateToItems`:return G(t,n[r])}}},proxy:new Proxy(e,{get(e,r,i){if(n){t.has(r)||t.set(r,n(e,r));let i=t.get(r);if(i)return i}return Reflect.get(e,r,i)},set(e,t,n,r){return Reflect.set(e,t,n,r)}})}}function d(e,t){return n=>{let r=n.replace(l,`/`),[i,a]=(0,c.getServiceScript)(e,r);if(i||a?.associatedOnly){let e=t(a.id);return e.childItems=void 0,e}else return t(r)}}function f(e,t){return n=>{let r=n.replace(l,`/`),[i,a]=(0,c.getServiceScript)(e,r);return i||a?.associatedOnly?[]:t(r)}}function p(e,t){return(n,r)=>{let i=n.replace(l,`/`),[o,u,d]=(0,c.getServiceScript)(e,i);return u?.associatedOnly?[]:o?e.maps.get(o.code,u).mappings.some(e=>(0,a.isFormattingEnabled)(e.data))?t(u.id,r).map(t=>(0,s.transformTextChange)(d,e,o,t,!1,a.isFormattingEnabled)?.[1]).filter(e=>!!e):[]:t(i,r)}}function m(e,t){return(n,r,i,o)=>{let u=n.replace(l,`/`),[d,f,p]=(0,c.getServiceScript)(e,u);if(f?.associatedOnly)return[];if(d){let n=(0,s.toGeneratedRange)(e,d,p,r,i,a.isFormattingEnabled);return n===void 0?[]:t(f.id,n[0],n[1],o).map(t=>(0,s.transformTextChange)(p,e,d,t,!1,a.isFormattingEnabled)?.[1]).filter(e=>!!e)}else return t(u,r,i,o)}}function h(e,t){return(n,r,i,o)=>{let u=n.replace(l,`/`),[d,f,p]=(0,c.getServiceScript)(e,u);if(f?.associatedOnly)return[];if(d){let n=(0,s.toGeneratedOffset)(e,d,p,r,a.isFormattingEnabled);return n===void 0?[]:t(f.id,n,i,o).map(t=>(0,s.transformTextChange)(p,e,d,t,!1,a.isFormattingEnabled)?.[1]).filter(e=>!!e)}else return t(u,r,i,o)}}function g(e,t){return(n,r,i,o)=>{let c=t(n,r,i,o);return(0,s.transformFileTextChanges)(e,c,!1,a.isRenameEnabled)}}function _(e,t){return(n,r)=>{let i=n.replace(l,`/`),[o,u,d]=(0,c.getServiceScript)(e,i);if(!u?.associatedOnly)if(o){let n=(0,s.toGeneratedOffset)(e,o,d,r,a.isLinkedEditingEnabled);if(n!==void 0){let r=t(u.id,n);if(r)return{ranges:r.ranges.map(t=>(0,s.transformTextSpan)(d,e,o,t,!1,a.isLinkedEditingEnabled)?.[1]).filter(e=>!!e),wordPattern:r.wordPattern}}}else return t(i,r)}}function v(e,t){return(n,r)=>{let i=n.replace(l,`/`),[o,u,d]=(0,c.getServiceScript)(e,i);if(!u?.associatedOnly)if(o){let n=(0,s.toGeneratedOffset)(e,o,d,r,a.isCallHierarchyEnabled);if(n!==void 0){let r=t(u.id,n);if(Array.isArray(r))return r.map(t=>(0,s.transformCallHierarchyItem)(e,t,!0,a.isCallHierarchyEnabled));if(r)return(0,s.transformCallHierarchyItem)(e,r,!0,a.isCallHierarchyEnabled)}}else return t(i,r)}}function y(e,t){return(n,r)=>{let i=[],o=n.replace(l,`/`),[u,d,f]=(0,c.getServiceScript)(e,o);if(d?.associatedOnly)return[];if(u){let n=(0,s.toGeneratedOffset)(e,u,f,r,a.isCallHierarchyEnabled);n!==void 0&&(i=t(d.id,n))}else i=t(o,r);return i.map(t=>({from:(0,s.transformCallHierarchyItem)(e,t.from,!0,a.isCallHierarchyEnabled),fromSpans:t.fromSpans.map(n=>(0,s.transformSpan)(e,t.from.file,n,!0,a.isCallHierarchyEnabled)?.textSpan).filter(e=>!!e)}))}}function b(e,t){return(n,r)=>{let i=[],o=n.replace(l,`/`),[u,d,f]=(0,c.getServiceScript)(e,o);if(d?.associatedOnly)return[];if(u){let n=(0,s.toGeneratedOffset)(e,u,f,r,a.isCallHierarchyEnabled);n!==void 0&&(i=t(d.id,n))}else i=t(o,r);return i.map(t=>({to:(0,s.transformCallHierarchyItem)(e,t.to,!0,a.isCallHierarchyEnabled),fromSpans:t.fromSpans.map(t=>u?(0,s.transformTextSpan)(f,e,u,t,!0,a.isCallHierarchyEnabled)?.[1]:t).filter(e=>!!e)}))}}function x(e,t){return(n,r,i)=>{let o=t(n,r,i);return(0,s.transformFileTextChanges)(e,o,!1,a.isCodeActionsEnabled)}}function S(e,t){return(n,r,...i)=>{let o=n.replace(l,`/`),[u,d,f]=(0,c.getServiceScript)(e,o);if(!d?.associatedOnly)if(u){let n=[];for(let[o]of(0,s.toGeneratedOffsets)(e,u,f,r,a.isHoverEnabled)){let r=t(d.id,o,...i);if(r){let t=(0,s.transformTextSpan)(f,e,u,r.textSpan,!0,a.isHoverEnabled)?.[1];t&&n.push({...r,textSpan:t})}}if(n.length===1)return n[0];if(n.length>=2){let e={...n[0]};e.displayParts=e.displayParts?.slice(),e.documentation=e.documentation?.slice(),e.tags=e.tags?.slice();let t=new Set([q(n[0].displayParts)]),r=new Set([q(n[0].documentation)]),i=new Set;for(let e of n[0].tags??[])i.add(e.name+`__volar__`+q(e.text));for(let a=1;a<n.length;a++){let{displayParts:o,documentation:s,tags:c}=n[a];o?.length&&!t.has(q(o))&&(t.add(q(o)),e.displayParts??=[],e.displayParts.push({...o[0],text:`
1
+ const e=require(`./language--WWw6ckw.js`);var t=e.r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dedupeDocumentSpans=t;function t(e){return n(e,e=>[e.fileName,e.textSpan.start,e.textSpan.length].join(`:`))}function n(e,t){let n=new Map;for(let r of e.reverse())n.set(t(r),r);return[...n.values()]}})),n=e.r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getServiceScript=t,e.fixupImpliedNodeFormatForFile=n;function t(e,t){let n=e.scripts.get(t);if(n?.targetIds.size)for(let t of n.targetIds){let r=e.scripts.get(t);if(r?.generated){let e=r.generated.languagePlugin.typescript?.getServiceScript(r.generated.root);if(e)return[e,r,n]}}if(n?.associatedOnly)return[void 0,n,n];if(n?.generated){let e=n.generated.languagePlugin.typescript?.getServiceScript(n.generated.root);if(e)return[e,n,n]}return[void 0,void 0,void 0]}function n(e,t,n,r,i,a){if(n.impliedNodeFormat!==void 0||!t.some(e=>n.fileName.endsWith(e))||[`.d.ts`,`.ts`,`.tsx`,`.js`,`.jsx`].some(e=>n.fileName.endsWith(e)))return;let o=n.fileName+`.ts`,s=e.getImpliedNodeFormatForFileWorker?.(o,r,i,a)?.impliedNodeFormat;if(s!==void 0)return n.impliedNodeFormat=s,()=>n.impliedNodeFormat=void 0}})),r=e.r((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.transformCallHierarchyItem=s,t.transformDiagnostic=c,t.fillSourceFileText=l,t.transformFileTextChanges=u,t.transformDocumentSpan=d,t.transformSpan=f,t.transformTextChange=p,t.transformTextSpan=m,t.toSourceOffset=h,t.toSourceRanges=g,t.toSourceOffsets=_,t.toGeneratedRange=v,t.toGeneratedRanges=y,t.toGeneratedOffset=b,t.toGeneratedOffsets=x,t.getMappingOffset=S;let r=e.n(),i=n(),a=new WeakMap,o=new WeakSet;function s(e,t,n,r){let i=f(e,t.file,t.span,n,r),a=f(e,t.file,t.selectionSpan,n,r);return{...t,file:i?.fileName??t.file,span:i?.textSpan??{start:0,length:0},selectionSpan:a?.textSpan??{start:0,length:0}}}function c(e,t,n,o){if(!a.has(t)){a.set(t,void 0);let{relatedInformation:s}=t;if(s&&(t.relatedInformation=s.map(t=>c(e,t,n,o)).filter(e=>!!e)),t.file!==void 0&&t.start!==void 0&&t.length!==void 0){let[s]=(0,i.getServiceScript)(e,t.file.fileName);if(s){let[i,c]=m(void 0,e,s,{start:t.start,length:t.length},!0,e=>(0,r.shouldReportDiagnostics)(e,String(t.source),String(t.code)))??[],u=i?t.file.fileName===i?t.file:n?.getSourceFile(i):void 0;c&&u&&(o&&l(e,t.file),a.set(t,{...t,file:u,start:c.start,length:c.length}))}else a.set(t,t)}else a.set(t,t)}return a.get(t)}function l(e,t){if(o.has(t))return;o.add(t);let[n]=(0,i.getServiceScript)(e,t.fileName);if(n&&!n.preventLeadingOffset){let r=e.scripts.fromVirtualCode(n.code);t.text=r.snapshot.getText(0,r.snapshot.getLength())+t.text.substring(r.snapshot.getLength())}}function u(e,t,n,r){let a={},o=new Set;for(let s of t){let[t,c]=(0,i.getServiceScript)(e,s.fileName);if(c)s.textChanges.forEach(t=>{let{fileName:i,textSpan:o}=f(e,s.fileName,t.span,n,r)??{};i&&o&&(a[i]??(a[i]=[])).push({...t,span:o})});else{let e=a[s.fileName]??(a[s.fileName]=[]);s.textChanges.forEach(t=>{e.push(t)}),s.isNewFile&&o.add(s.fileName)}}let s=[];for(let e in a)s.push({fileName:e,isNewFile:o.has(e),textChanges:a[e]});return s}function d(e,t,n,r,i){let a=f(e,t.fileName,t.textSpan,n,r);if(!a&&i&&(a={fileName:t.fileName,textSpan:{start:0,length:0}}),!a)return;let o=f(e,t.fileName,t.contextSpan,n,r),s=f(e,t.originalFileName,t.originalTextSpan,n,r),c=f(e,t.originalFileName,t.originalContextSpan,n,r);return{...t,fileName:a.fileName,textSpan:a.textSpan,contextSpan:o?.textSpan,originalFileName:s?.fileName,originalTextSpan:s?.textSpan,originalContextSpan:c?.textSpan}}function f(e,t,n,r,a){if(!t||!n)return;let[o]=(0,i.getServiceScript)(e,t);if(o){let[t,i]=m(void 0,e,o,n,r,a)??[];if(i&&t)return{fileName:t,textSpan:i}}else return{fileName:t,textSpan:n}}function p(e,t,n,r,i,a){let[o,s]=m(e,t,n,r.span,i,a)??[];if(s&&o)return[o,{newText:r.newText,span:s}]}function m(e,t,n,r,i,a){let o=r.start,s=r.start+r.length;for(let[r,c,l]of g(e,t,n,o,s,i,a))return[r,{start:c,length:l-c}]}function h(e,t,n,r,i){for(let a of _(e,t,n,r,i))return a}function*g(e,t,n,r,i,a,o){if(e){let s=t.maps.get(n.code,e);for(let[c,l]of s.toSourceRange(r-S(t,n),i-S(t,n),a,o))yield[e.id,c,l]}else for(let[e,s]of t.maps.forEach(n.code))for(let[c,l]of s.toSourceRange(r-S(t,n),i-S(t,n),a,o))yield[e.id,c,l]}function*_(e,t,n,r,i){if(e){let a=t.maps.get(n.code,e);for(let[o,s]of a.toSourceLocation(r-S(t,n)))i(s.data)&&(yield[e.id,o])}else for(let[e,a]of t.maps.forEach(n.code))for(let[o,s]of a.toSourceLocation(r-S(t,n)))i(s.data)&&(yield[e.id,o])}function v(e,t,n,r,i,a){for(let o of y(e,t,n,r,i,a))return o}function*y(e,t,n,r,i,a){let o=e.maps.get(t.code,n);for(let[n,s]of o.toGeneratedRange(r,i,!0,a))yield[n+S(e,t),s+S(e,t)]}function b(e,t,n,r,i){for(let[a]of x(e,t,n,r,i))return a}function*x(e,t,n,r,i){let a=e.maps.get(t.code,n);for(let[n,o]of a.toGeneratedLocation(r))i(o.data)&&(yield[n+S(e,t),o])}function S(e,t){return t.preventLeadingOffset?0:e.scripts.fromVirtualCode(t.code).snapshot.getLength()}})),i=e.r((i=>{Object.defineProperty(i,`__esModule`,{value:!0}),i.createProxyLanguageService=u;let a=e.n(),o=t(),s=r(),c=n(),l=/\\/g;function u(e){let t=new Map,n;return{initialize(t){n=(n,r)=>{switch(r){case`getNavigationTree`:return d(t,n[r]);case`getOutliningSpans`:return f(t,n[r]);case`getFormattingEditsForDocument`:return p(t,n[r]);case`getFormattingEditsForRange`:return m(t,n[r]);case`getFormattingEditsAfterKeystroke`:return h(t,n[r]);case`getEditsForFileRename`:return g(t,n[r]);case`getLinkedEditingRangeAtPosition`:return _(t,n[r]);case`prepareCallHierarchy`:return v(t,n[r]);case`provideCallHierarchyIncomingCalls`:return y(t,n[r]);case`provideCallHierarchyOutgoingCalls`:return b(t,n[r]);case`organizeImports`:return x(t,n[r]);case`getQuickInfoAtPosition`:return S(t,n[r]);case`getSignatureHelpItems`:return C(t,n[r]);case`getDocumentHighlights`:return w(t,n[r]);case`getApplicableRefactors`:return T(t,n[r]);case`getEditsForRefactor`:return E(t,n[r]);case`getCombinedCodeFix`:return D(t,n[r]);case`getRenameInfo`:return O(t,n[r]);case`getCodeFixesAtPosition`:return k(t,n[r]);case`getEncodedSemanticClassifications`:return A(t,n[r]);case`getSyntacticDiagnostics`:return j(t,e,n[r]);case`getSemanticDiagnostics`:return M(t,e,n[r]);case`getSuggestionDiagnostics`:return N(t,e,n[r]);case`getDefinitionAndBoundSpan`:return P(t,n[r]);case`findReferences`:return F(t,n[r]);case`getDefinitionAtPosition`:return I(t,n[r]);case`getTypeDefinitionAtPosition`:return L(t,n[r]);case`getImplementationAtPosition`:return R(t,n[r]);case`findRenameLocations`:return z(t,n[r]);case`getReferencesAtPosition`:return B(t,n[r]);case`getCompletionsAtPosition`:return V(t,n[r]);case`getCompletionEntryDetails`:return H(t,n[r]);case`provideInlayHints`:return U(t,n[r]);case`getFileReferences`:return W(t,n[r]);case`getNavigateToItems`:return G(t,n[r])}}},proxy:new Proxy(e,{get(e,r,i){if(n){t.has(r)||t.set(r,n(e,r));let i=t.get(r);if(i)return i}return Reflect.get(e,r,i)},set(e,t,n,r){return Reflect.set(e,t,n,r)}})}}function d(e,t){return n=>{let r=n.replace(l,`/`),[i,a]=(0,c.getServiceScript)(e,r);if(i||a?.associatedOnly){let e=t(a.id);return e.childItems=void 0,e}else return t(r)}}function f(e,t){return n=>{let r=n.replace(l,`/`),[i,a]=(0,c.getServiceScript)(e,r);return i||a?.associatedOnly?[]:t(r)}}function p(e,t){return(n,r)=>{let i=n.replace(l,`/`),[o,u,d]=(0,c.getServiceScript)(e,i);return u?.associatedOnly?[]:o?e.maps.get(o.code,u).mappings.some(e=>(0,a.isFormattingEnabled)(e.data))?t(u.id,r).map(t=>(0,s.transformTextChange)(d,e,o,t,!1,a.isFormattingEnabled)?.[1]).filter(e=>!!e):[]:t(i,r)}}function m(e,t){return(n,r,i,o)=>{let u=n.replace(l,`/`),[d,f,p]=(0,c.getServiceScript)(e,u);if(f?.associatedOnly)return[];if(d){let n=(0,s.toGeneratedRange)(e,d,p,r,i,a.isFormattingEnabled);return n===void 0?[]:t(f.id,n[0],n[1],o).map(t=>(0,s.transformTextChange)(p,e,d,t,!1,a.isFormattingEnabled)?.[1]).filter(e=>!!e)}else return t(u,r,i,o)}}function h(e,t){return(n,r,i,o)=>{let u=n.replace(l,`/`),[d,f,p]=(0,c.getServiceScript)(e,u);if(f?.associatedOnly)return[];if(d){let n=(0,s.toGeneratedOffset)(e,d,p,r,a.isFormattingEnabled);return n===void 0?[]:t(f.id,n,i,o).map(t=>(0,s.transformTextChange)(p,e,d,t,!1,a.isFormattingEnabled)?.[1]).filter(e=>!!e)}else return t(u,r,i,o)}}function g(e,t){return(n,r,i,o)=>{let c=t(n,r,i,o);return(0,s.transformFileTextChanges)(e,c,!1,a.isRenameEnabled)}}function _(e,t){return(n,r)=>{let i=n.replace(l,`/`),[o,u,d]=(0,c.getServiceScript)(e,i);if(!u?.associatedOnly)if(o){let n=(0,s.toGeneratedOffset)(e,o,d,r,a.isLinkedEditingEnabled);if(n!==void 0){let r=t(u.id,n);if(r)return{ranges:r.ranges.map(t=>(0,s.transformTextSpan)(d,e,o,t,!1,a.isLinkedEditingEnabled)?.[1]).filter(e=>!!e),wordPattern:r.wordPattern}}}else return t(i,r)}}function v(e,t){return(n,r)=>{let i=n.replace(l,`/`),[o,u,d]=(0,c.getServiceScript)(e,i);if(!u?.associatedOnly)if(o){let n=(0,s.toGeneratedOffset)(e,o,d,r,a.isCallHierarchyEnabled);if(n!==void 0){let r=t(u.id,n);if(Array.isArray(r))return r.map(t=>(0,s.transformCallHierarchyItem)(e,t,!0,a.isCallHierarchyEnabled));if(r)return(0,s.transformCallHierarchyItem)(e,r,!0,a.isCallHierarchyEnabled)}}else return t(i,r)}}function y(e,t){return(n,r)=>{let i=[],o=n.replace(l,`/`),[u,d,f]=(0,c.getServiceScript)(e,o);if(d?.associatedOnly)return[];if(u){let n=(0,s.toGeneratedOffset)(e,u,f,r,a.isCallHierarchyEnabled);n!==void 0&&(i=t(d.id,n))}else i=t(o,r);return i.map(t=>({from:(0,s.transformCallHierarchyItem)(e,t.from,!0,a.isCallHierarchyEnabled),fromSpans:t.fromSpans.map(n=>(0,s.transformSpan)(e,t.from.file,n,!0,a.isCallHierarchyEnabled)?.textSpan).filter(e=>!!e)}))}}function b(e,t){return(n,r)=>{let i=[],o=n.replace(l,`/`),[u,d,f]=(0,c.getServiceScript)(e,o);if(d?.associatedOnly)return[];if(u){let n=(0,s.toGeneratedOffset)(e,u,f,r,a.isCallHierarchyEnabled);n!==void 0&&(i=t(d.id,n))}else i=t(o,r);return i.map(t=>({to:(0,s.transformCallHierarchyItem)(e,t.to,!0,a.isCallHierarchyEnabled),fromSpans:t.fromSpans.map(t=>u?(0,s.transformTextSpan)(f,e,u,t,!0,a.isCallHierarchyEnabled)?.[1]:t).filter(e=>!!e)}))}}function x(e,t){return(n,r,i)=>{let o=t(n,r,i);return(0,s.transformFileTextChanges)(e,o,!1,a.isCodeActionsEnabled)}}function S(e,t){return(n,r,...i)=>{let o=n.replace(l,`/`),[u,d,f]=(0,c.getServiceScript)(e,o);if(!d?.associatedOnly)if(u){let n=[];for(let[o]of(0,s.toGeneratedOffsets)(e,u,f,r,a.isHoverEnabled)){let r=t(d.id,o,...i);if(r){let t=(0,s.transformTextSpan)(f,e,u,r.textSpan,!0,a.isHoverEnabled)?.[1];t&&n.push({...r,textSpan:t})}}if(n.length===1)return n[0];if(n.length>=2){let e={...n[0]};e.displayParts=e.displayParts?.slice(),e.documentation=e.documentation?.slice(),e.tags=e.tags?.slice();let t=new Set([q(n[0].displayParts)]),r=new Set([q(n[0].documentation)]),i=new Set;for(let e of n[0].tags??[])i.add(e.name+`__volar__`+q(e.text));for(let a=1;a<n.length;a++){let{displayParts:o,documentation:s,tags:c}=n[a];o?.length&&!t.has(q(o))&&(t.add(q(o)),e.displayParts??=[],e.displayParts.push({...o[0],text:`
2
2
 
3
3
  `+o[0].text}),e.displayParts.push(...o.slice(1))),s?.length&&!r.has(q(s))&&(r.add(q(s)),e.documentation??=[],e.documentation.push({...s[0],text:`
4
4