@tuoyuan/code-editor 1.1.1 → 1.1.2
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/JavascriptEditor.vue.d.ts +2 -0
- package/dist/JsonEditor.vue.d.ts +2 -0
- package/dist/SqlEditor.vue.d.ts +2 -0
- package/dist/{cssMode-QyjcDiWJ.cjs → cssMode-BCryXDVP.cjs} +1 -1
- package/dist/{cssMode-DWZ_7wzZ.js → cssMode-CXjqIYq4.js} +1 -1
- package/dist/{freemarker2-ZBWNKk26.cjs → freemarker2-CUVrrGDg.cjs} +1 -1
- package/dist/{freemarker2-DWTadBSg.js → freemarker2-DlybHztA.js} +1 -1
- package/dist/{handlebars-B_qIF3NI.js → handlebars-Bf86XcYC.js} +1 -1
- package/dist/{handlebars-A9cwrduN.cjs → handlebars-CcuLDeQT.cjs} +1 -1
- package/dist/{html-CdrxwbDf.cjs → html-B1AN-YkI.cjs} +1 -1
- package/dist/{html-BKl6uOS7.js → html-CC9TJsag.js} +1 -1
- package/dist/{htmlMode-DROkOnfi.js → htmlMode-BPyAr2to.js} +1 -1
- package/dist/{htmlMode-n0itWBoR.cjs → htmlMode-DfvjW08o.cjs} +1 -1
- package/dist/{index-DXhonmPz.js → index-CLA4iUSf.js} +33 -27
- package/dist/{index-BeUzrSyK.cjs → index-DBy21Q0J.cjs} +19 -19
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{javascript-DInhAjbC.js → javascript-H86iPtAN.js} +1 -1
- package/dist/{javascript-BHmlB2-p.cjs → javascript-Yav3bgjl.cjs} +1 -1
- package/dist/{jsonMode-DxQCyyC8.js → jsonMode-9TsIZPcy.js} +1 -1
- package/dist/{jsonMode-CxUBUu4Z.cjs → jsonMode-COW9TJQp.cjs} +1 -1
- package/dist/{liquid-DYGZnyjr.js → liquid-BCIuKpoT.js} +1 -1
- package/dist/{liquid-CurcSKaZ.cjs → liquid-CcRxrnaF.cjs} +1 -1
- package/dist/{mdx-DHhJb3sc.js → mdx-BUQyJHn2.js} +1 -1
- package/dist/{mdx-B1XYL_jF.cjs → mdx-DJ6AIedb.cjs} +1 -1
- package/dist/{python-dgYUQ06v.js → python-B95rqRBw.js} +1 -1
- package/dist/{python-t2JZtsgb.cjs → python-BWX6OvU0.cjs} +1 -1
- package/dist/{razor-6GtCVHGL.js → razor-CfrRW9NO.js} +1 -1
- package/dist/{razor-CIVyDUzm.cjs → razor-CoDMSgWQ.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{tsMode-CK3xVHoe.cjs → tsMode-D5NvKt6W.cjs} +1 -1
- package/dist/{tsMode-BsSmNLlq.js → tsMode-DZZHGQbs.js} +1 -1
- package/dist/{typescript-CYhBSHj1.js → typescript-CYPxqy7s.js} +1 -1
- package/dist/{typescript-CY5I32fd.cjs → typescript-DdqYMZZo.cjs} +1 -1
- package/dist/{xml-DC4ZbPhD.js → xml-72ltGbW-.js} +1 -1
- package/dist/{xml-BcK5SUKU.cjs → xml-zIa4uf2u.cjs} +1 -1
- package/dist/{yaml-D1shKG8a.js → yaml-CK70Osyq.js} +1 -1
- package/dist/{yaml-D32PKVDc.cjs → yaml-EvNQiffb.cjs} +1 -1
- package/package.json +1 -1
|
@@ -751,7 +751,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
751
751
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
752
752
|
* Released under the MIT license
|
|
753
753
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
754
|
-
*-----------------------------------------------------------------------------*/Ne({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Promise.resolve().then(()=>require("./freemarker2-
|
|
754
|
+
*-----------------------------------------------------------------------------*/Ne({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Promise.resolve().then(()=>require("./freemarker2-CUVrrGDg.cjs")).then(o=>o.TagAutoInterpolationDollar)});Ne({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Promise.resolve().then(()=>require("./freemarker2-CUVrrGDg.cjs")).then(o=>o.TagAngleInterpolationDollar)});Ne({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Promise.resolve().then(()=>require("./freemarker2-CUVrrGDg.cjs")).then(o=>o.TagBracketInterpolationDollar)});Ne({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Promise.resolve().then(()=>require("./freemarker2-CUVrrGDg.cjs")).then(o=>o.TagAngleInterpolationBracket)});Ne({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Promise.resolve().then(()=>require("./freemarker2-CUVrrGDg.cjs")).then(o=>o.TagBracketInterpolationBracket)});Ne({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Promise.resolve().then(()=>require("./freemarker2-CUVrrGDg.cjs")).then(o=>o.TagAutoInterpolationDollar)});Ne({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Promise.resolve().then(()=>require("./freemarker2-CUVrrGDg.cjs")).then(o=>o.TagAutoInterpolationBracket)});/*!-----------------------------------------------------------------------------
|
|
755
755
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
756
756
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
757
757
|
* Released under the MIT license
|
|
@@ -766,7 +766,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
766
766
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
767
767
|
* Released under the MIT license
|
|
768
768
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
769
|
-
*-----------------------------------------------------------------------------*/Ne({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Promise.resolve().then(()=>require("./handlebars-
|
|
769
|
+
*-----------------------------------------------------------------------------*/Ne({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Promise.resolve().then(()=>require("./handlebars-CcuLDeQT.cjs"))});/*!-----------------------------------------------------------------------------
|
|
770
770
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
771
771
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
772
772
|
* Released under the MIT license
|
|
@@ -776,7 +776,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
776
776
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
777
777
|
* Released under the MIT license
|
|
778
778
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
779
|
-
*-----------------------------------------------------------------------------*/Ne({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Promise.resolve().then(()=>require("./html-
|
|
779
|
+
*-----------------------------------------------------------------------------*/Ne({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Promise.resolve().then(()=>require("./html-B1AN-YkI.cjs"))});/*!-----------------------------------------------------------------------------
|
|
780
780
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
781
781
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
782
782
|
* Released under the MIT license
|
|
@@ -791,7 +791,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
791
791
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
792
792
|
* Released under the MIT license
|
|
793
793
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
794
|
-
*-----------------------------------------------------------------------------*/Ne({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Promise.resolve().then(()=>require("./javascript-
|
|
794
|
+
*-----------------------------------------------------------------------------*/Ne({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Promise.resolve().then(()=>require("./javascript-Yav3bgjl.cjs"))});/*!-----------------------------------------------------------------------------
|
|
795
795
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
796
796
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
797
797
|
* Released under the MIT license
|
|
@@ -821,7 +821,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
821
821
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
822
822
|
* Released under the MIT license
|
|
823
823
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
824
|
-
*-----------------------------------------------------------------------------*/Ne({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Promise.resolve().then(()=>require("./liquid-
|
|
824
|
+
*-----------------------------------------------------------------------------*/Ne({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Promise.resolve().then(()=>require("./liquid-CcRxrnaF.cjs"))});/*!-----------------------------------------------------------------------------
|
|
825
825
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
826
826
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
827
827
|
* Released under the MIT license
|
|
@@ -836,7 +836,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
836
836
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
837
837
|
* Released under the MIT license
|
|
838
838
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
839
|
-
*-----------------------------------------------------------------------------*/Ne({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Promise.resolve().then(()=>require("./mdx-
|
|
839
|
+
*-----------------------------------------------------------------------------*/Ne({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Promise.resolve().then(()=>require("./mdx-DJ6AIedb.cjs"))});/*!-----------------------------------------------------------------------------
|
|
840
840
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
841
841
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
842
842
|
* Released under the MIT license
|
|
@@ -916,7 +916,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
916
916
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
917
917
|
* Released under the MIT license
|
|
918
918
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
919
|
-
*-----------------------------------------------------------------------------*/Ne({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Promise.resolve().then(()=>require("./python-
|
|
919
|
+
*-----------------------------------------------------------------------------*/Ne({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Promise.resolve().then(()=>require("./python-BWX6OvU0.cjs"))});/*!-----------------------------------------------------------------------------
|
|
920
920
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
921
921
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
922
922
|
* Released under the MIT license
|
|
@@ -931,7 +931,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
931
931
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
932
932
|
* Released under the MIT license
|
|
933
933
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
934
|
-
*-----------------------------------------------------------------------------*/Ne({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Promise.resolve().then(()=>require("./razor-
|
|
934
|
+
*-----------------------------------------------------------------------------*/Ne({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Promise.resolve().then(()=>require("./razor-CoDMSgWQ.cjs"))});/*!-----------------------------------------------------------------------------
|
|
935
935
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
936
936
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
937
937
|
* Released under the MIT license
|
|
@@ -1031,7 +1031,7 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
1031
1031
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
1032
1032
|
* Released under the MIT license
|
|
1033
1033
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
1034
|
-
*-----------------------------------------------------------------------------*/Ne({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Promise.resolve().then(()=>require("./typescript-
|
|
1034
|
+
*-----------------------------------------------------------------------------*/Ne({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Promise.resolve().then(()=>require("./typescript-DdqYMZZo.cjs"))});/*!-----------------------------------------------------------------------------
|
|
1035
1035
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1036
1036
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
1037
1037
|
* Released under the MIT license
|
|
@@ -1051,32 +1051,32 @@ ${e.toString()}`}}class PI{constructor(e=new cv,t=!1,i,n=xfe){var s;this._servic
|
|
|
1051
1051
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
1052
1052
|
* Released under the MIT license
|
|
1053
1053
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
1054
|
-
*-----------------------------------------------------------------------------*/Ne({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>Promise.resolve().then(()=>require("./xml-
|
|
1054
|
+
*-----------------------------------------------------------------------------*/Ne({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>Promise.resolve().then(()=>require("./xml-zIa4uf2u.cjs"))});/*!-----------------------------------------------------------------------------
|
|
1055
1055
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1056
1056
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
1057
1057
|
* Released under the MIT license
|
|
1058
1058
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
1059
|
-
*-----------------------------------------------------------------------------*/Ne({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Promise.resolve().then(()=>require("./yaml-
|
|
1059
|
+
*-----------------------------------------------------------------------------*/Ne({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Promise.resolve().then(()=>require("./yaml-EvNQiffb.cjs"))});/*!-----------------------------------------------------------------------------
|
|
1060
1060
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1061
1061
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
1062
1062
|
* Released under the MIT license
|
|
1063
1063
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
1064
|
-
*-----------------------------------------------------------------------------*/var Zme=Object.defineProperty,Qme=Object.getOwnPropertyDescriptor,e_e=Object.getOwnPropertyNames,t_e=Object.prototype.hasOwnProperty,i_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of e_e(e))!t_e.call(o,n)&&n!==t&&Zme(o,n,{get:()=>e[n],enumerable:!(i=Qme(e,n))||i.enumerable});return o},n_e=(o,e,t)=>(i_e(o,e,"default"),t),s_={};n_e(s_,n_);var G2=class{constructor(e,t,i){this._onDidChange=new s_.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},z2={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},$2={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},HG=new G2("css",z2,$2),WG=new G2("scss",z2,$2),UG=new G2("less",z2,$2);s_.languages.css={cssDefaults:HG,lessDefaults:UG,scssDefaults:WG};function K2(){return Promise.resolve().then(()=>require("./cssMode-
|
|
1064
|
+
*-----------------------------------------------------------------------------*/var Zme=Object.defineProperty,Qme=Object.getOwnPropertyDescriptor,e_e=Object.getOwnPropertyNames,t_e=Object.prototype.hasOwnProperty,i_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of e_e(e))!t_e.call(o,n)&&n!==t&&Zme(o,n,{get:()=>e[n],enumerable:!(i=Qme(e,n))||i.enumerable});return o},n_e=(o,e,t)=>(i_e(o,e,"default"),t),s_={};n_e(s_,n_);var G2=class{constructor(e,t,i){this._onDidChange=new s_.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},z2={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},$2={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},HG=new G2("css",z2,$2),WG=new G2("scss",z2,$2),UG=new G2("less",z2,$2);s_.languages.css={cssDefaults:HG,lessDefaults:UG,scssDefaults:WG};function K2(){return Promise.resolve().then(()=>require("./cssMode-BCryXDVP.cjs"))}s_.languages.onLanguage("less",()=>{K2().then(o=>o.setupMode(UG))});s_.languages.onLanguage("scss",()=>{K2().then(o=>o.setupMode(WG))});s_.languages.onLanguage("css",()=>{K2().then(o=>o.setupMode(HG))});/*!-----------------------------------------------------------------------------
|
|
1065
1065
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1066
1066
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
1067
1067
|
* Released under the MIT license
|
|
1068
1068
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
1069
|
-
*-----------------------------------------------------------------------------*/var s_e=Object.defineProperty,o_e=Object.getOwnPropertyDescriptor,r_e=Object.getOwnPropertyNames,a_e=Object.prototype.hasOwnProperty,l_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of r_e(e))!a_e.call(o,n)&&n!==t&&s_e(o,n,{get:()=>e[n],enumerable:!(i=o_e(e,n))||i.enumerable});return o},d_e=(o,e,t)=>(l_e(o,e,"default"),t),UR={};d_e(UR,n_);var c_e=class{constructor(e,t,i){this._onDidChange=new UR.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},h_e={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},VR={format:h_e,suggest:{},data:{useDefaultDataProvider:!0}};function GR(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===qE,documentFormattingEdits:o===qE,documentRangeFormattingEdits:o===qE}}var qE="html",yU="handlebars",DU="razor",VG=zR(qE,VR,GR(qE)),u_e=VG.defaults,GG=zR(yU,VR,GR(yU)),f_e=GG.defaults,zG=zR(DU,VR,GR(DU)),g_e=zG.defaults;UR.languages.html={htmlDefaults:u_e,razorDefaults:g_e,handlebarDefaults:f_e,htmlLanguageService:VG,handlebarLanguageService:GG,razorLanguageService:zG,registerHTMLLanguageService:zR};function p_e(){return Promise.resolve().then(()=>require("./htmlMode-
|
|
1069
|
+
*-----------------------------------------------------------------------------*/var s_e=Object.defineProperty,o_e=Object.getOwnPropertyDescriptor,r_e=Object.getOwnPropertyNames,a_e=Object.prototype.hasOwnProperty,l_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of r_e(e))!a_e.call(o,n)&&n!==t&&s_e(o,n,{get:()=>e[n],enumerable:!(i=o_e(e,n))||i.enumerable});return o},d_e=(o,e,t)=>(l_e(o,e,"default"),t),UR={};d_e(UR,n_);var c_e=class{constructor(e,t,i){this._onDidChange=new UR.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},h_e={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},VR={format:h_e,suggest:{},data:{useDefaultDataProvider:!0}};function GR(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===qE,documentFormattingEdits:o===qE,documentRangeFormattingEdits:o===qE}}var qE="html",yU="handlebars",DU="razor",VG=zR(qE,VR,GR(qE)),u_e=VG.defaults,GG=zR(yU,VR,GR(yU)),f_e=GG.defaults,zG=zR(DU,VR,GR(DU)),g_e=zG.defaults;UR.languages.html={htmlDefaults:u_e,razorDefaults:g_e,handlebarDefaults:f_e,htmlLanguageService:VG,handlebarLanguageService:GG,razorLanguageService:zG,registerHTMLLanguageService:zR};function p_e(){return Promise.resolve().then(()=>require("./htmlMode-DfvjW08o.cjs"))}function zR(o,e=VR,t=GR(o)){const i=new c_e(o,e,t);let n;const s=UR.languages.onLanguage(o,async()=>{n=(await p_e()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n==null||n.dispose(),n=void 0}}}/*!-----------------------------------------------------------------------------
|
|
1070
1070
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1071
1071
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
1072
1072
|
* Released under the MIT license
|
|
1073
1073
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
1074
|
-
*-----------------------------------------------------------------------------*/var m_e=Object.defineProperty,__e=Object.getOwnPropertyDescriptor,E_e=Object.getOwnPropertyNames,S_e=Object.prototype.hasOwnProperty,C_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of E_e(e))!S_e.call(o,n)&&n!==t&&m_e(o,n,{get:()=>e[n],enumerable:!(i=__e(e,n))||i.enumerable});return o},v_e=(o,e,t)=>(C_e(o,e,"default"),t),Rv={};v_e(Rv,n_);var T_e=class{constructor(e,t,i){this._onDidChange=new Rv.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},b_e={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},I_e={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},$G=new T_e("json",b_e,I_e),L_e=()=>KG().then(o=>o.getWorker());Rv.languages.json={jsonDefaults:$G,getWorker:L_e};function KG(){return Promise.resolve().then(()=>require("./jsonMode-
|
|
1074
|
+
*-----------------------------------------------------------------------------*/var m_e=Object.defineProperty,__e=Object.getOwnPropertyDescriptor,E_e=Object.getOwnPropertyNames,S_e=Object.prototype.hasOwnProperty,C_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of E_e(e))!S_e.call(o,n)&&n!==t&&m_e(o,n,{get:()=>e[n],enumerable:!(i=__e(e,n))||i.enumerable});return o},v_e=(o,e,t)=>(C_e(o,e,"default"),t),Rv={};v_e(Rv,n_);var T_e=class{constructor(e,t,i){this._onDidChange=new Rv.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},b_e={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},I_e={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},$G=new T_e("json",b_e,I_e),L_e=()=>KG().then(o=>o.getWorker());Rv.languages.json={jsonDefaults:$G,getWorker:L_e};function KG(){return Promise.resolve().then(()=>require("./jsonMode-COW9TJQp.cjs"))}Rv.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});Rv.languages.onLanguage("json",()=>{KG().then(o=>o.setupMode($G))});/*!-----------------------------------------------------------------------------
|
|
1075
1075
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1076
1076
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
1077
1077
|
* Released under the MIT license
|
|
1078
1078
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
1079
|
-
*-----------------------------------------------------------------------------*/var R_e=Object.defineProperty,A_e=Object.getOwnPropertyDescriptor,w_e=Object.getOwnPropertyNames,N_e=Object.prototype.hasOwnProperty,y_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w_e(e))!N_e.call(o,n)&&n!==t&&R_e(o,n,{get:()=>e[n],enumerable:!(i=A_e(e,n))||i.enumerable});return o},D_e=(o,e,t)=>(y_e(o,e,"default"),t),O_e="5.4.5",Om={};D_e(Om,n_);var YG=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(YG||{}),qG=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(qG||{}),jG=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(jG||{}),XG=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(XG||{}),JG=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(JG||{}),ZG=class{constructor(o,e,t,i,n){this._onDidChange=new Om.Emitter,this._onDidExtraLibsChange=new Om.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},x_e=O_e,QG={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},Y2=new ZG({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},QG),ez=new ZG({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},QG),M_e=()=>$R().then(o=>o.getTypeScriptWorker()),P_e=()=>$R().then(o=>o.getJavaScriptWorker());Om.languages.typescript={ModuleKind:YG,JsxEmit:qG,NewLineKind:jG,ScriptTarget:XG,ModuleResolutionKind:JG,typescriptVersion:x_e,typescriptDefaults:Y2,javascriptDefaults:ez,getTypeScriptWorker:M_e,getJavaScriptWorker:P_e};function $R(){return Promise.resolve().then(()=>require("./tsMode-CK3xVHoe.cjs"))}Om.languages.onLanguage("typescript",()=>$R().then(o=>o.setupTypeScript(Y2)));Om.languages.onLanguage("javascript",()=>$R().then(o=>o.setupJavaScript(ez)));class k_e extends Fs{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Ve("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:re.map,toggled:Y.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Y.has("isInDiffEditor"),menu:{when:Y.has("isInDiffEditor"),id:N.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(nt),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class tz extends Fs{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Ve("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:Y.has("isInDiffEditor")})}run(e,...t){const i=e.get(nt),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class iz extends Fs{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Ve("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:Y.has("isInDiffEditor")})}run(e,...t){const i=e.get(nt),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const Av=Ve("diffEditor","Diff Editor");class F_e extends Ya{constructor(){super({id:"diffEditor.switchSide",title:Ve("switchSide","Switch Side"),icon:re.arrowSwap,precondition:Y.has("isInDiffEditor"),f1:!0,category:Av})}runEditorCommand(e,t,i){const n=r_(e);if(n instanceof uc){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class B_e extends Ya{constructor(){super({id:"diffEditor.exitCompareMove",title:Ve("exitCompareMove","Exit Compare Move"),icon:re.close,precondition:O.comparingMovedCode,f1:!1,category:Av,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=r_(e);n instanceof uc&&n.exitCompareMove()}}class H_e extends Ya{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Ve("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:re.fold,precondition:Y.has("isInDiffEditor"),f1:!0,category:Av})}runEditorCommand(e,t,...i){const n=r_(e);n instanceof uc&&n.collapseAllUnchangedRegions()}}class W_e extends Ya{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Ve("showAllUnchangedRegions","Show All Unchanged Regions"),icon:re.unfold,precondition:Y.has("isInDiffEditor"),f1:!0,category:Av})}runEditorCommand(e,t,...i){const n=r_(e);n instanceof uc&&n.showAllUnchangedRegions()}}class wx extends Fs{constructor(){super({id:"diffEditor.revert",title:Ve("revert","Revert"),f1:!1,category:Av})}run(e,t){var i;const n=U_e(e,t.originalUri,t.modifiedUri);n instanceof uc&&n.revertRangeMappings((i=t.mapping.innerChanges)!==null&&i!==void 0?i:[])}}const nz=Ve("accessibleDiffViewer","Accessible Diff Viewer");class o_ extends Fs{constructor(){super({id:o_.id,title:Ve("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:nz,precondition:Y.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=r_(e);t==null||t.accessibleDiffViewerNext()}}o_.id="editor.action.accessibleDiffViewer.next";class wv extends Fs{constructor(){super({id:wv.id,title:Ve("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:nz,precondition:Y.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=r_(e);t==null||t.accessibleDiffViewerPrev()}}wv.id="editor.action.accessibleDiffViewer.prev";function U_e(o,e,t){return o.get(Tt).listDiffEditors().find(s=>{var r,a;const l=s.getModifiedEditor(),d=s.getOriginalEditor();return l&&((r=l.getModel())===null||r===void 0?void 0:r.uri.toString())===t.toString()&&d&&((a=d.getModel())===null||a===void 0?void 0:a.uri.toString())===e.toString()})||null}function r_(o){const t=o.get(Tt).listDiffEditors(),i=Wn();if(i)for(const n of t){const s=n.getContainerDomNode();if(V_e(s,i))return n}return null}function V_e(o,e){let t=e;for(;t;){if(t===o)return!0;t=t.parentElement}return!1}Kt(k_e);Kt(tz);Kt(iz);Cn.appendMenuItem(N.EditorTitle,{command:{id:new iz().desc.id,title:p("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Y.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Y.has("isInDiffEditor")},order:11,group:"1_diff",when:Y.and(O.diffEditorRenderSideBySideInlineBreakpointReached,Y.has("isInDiffEditor"))});Cn.appendMenuItem(N.EditorTitle,{command:{id:new tz().desc.id,title:p("showMoves","Show Moved Code Blocks"),icon:re.move,toggled:Ym.create("config.diffEditor.experimental.showMoves",!0),precondition:Y.has("isInDiffEditor")},order:10,group:"1_diff",when:Y.has("isInDiffEditor")});Kt(wx);for(const o of[{icon:re.arrowRight,key:O.diffEditorInlineMode.toNegated()},{icon:re.discard,key:O.diffEditorInlineMode}])Cn.appendMenuItem(N.DiffEditorHunkToolbar,{command:{id:new wx().desc.id,title:p("revertHunk","Revert Block"),icon:o.icon},when:Y.and(O.diffEditorModifiedWritable,o.key),order:5,group:"primary"}),Cn.appendMenuItem(N.DiffEditorSelectionToolbar,{command:{id:new wx().desc.id,title:p("revertSelection","Revert Selection"),icon:o.icon},when:Y.and(O.diffEditorModifiedWritable,o.key),order:5,group:"primary"});Kt(F_e);Kt(B_e);Kt(H_e);Kt(W_e);Cn.appendMenuItem(N.EditorTitle,{command:{id:o_.id,title:p("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Y.has("isInDiffEditor")},order:10,group:"2_diff",when:Y.and(O.accessibleDiffViewerVisible.negate(),Y.has("isInDiffEditor"))});gt.registerCommandAlias("editor.action.diffReview.next",o_.id);Kt(o_);gt.registerCommandAlias("editor.action.diffReview.prev",wv.id);Kt(wv);var G_e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},z_e=function(o,e){return function(t,i){e(t,i,o)}},Nx;const KR=new he("selectionAnchorSet",!1);let fc=Nx=class{static get(e){return e.getContribution(Nx.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=KR.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Te.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new jn().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Qs(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Te.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};fc.ID="editor.contrib.selectionAnchorController";fc=Nx=G_e([z_e(1,Pe)],fc);class $_e extends ge{constructor(){super({id:"editor.action.setSelectionAnchor",label:p("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:Ji(2089,2080),weight:100}})}async run(e,t){var i;(i=fc.get(t))===null||i===void 0||i.setSelectionAnchor()}}class K_e extends ge{constructor(){super({id:"editor.action.goToSelectionAnchor",label:p("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:KR})}async run(e,t){var i;(i=fc.get(t))===null||i===void 0||i.goToSelectionAnchor()}}class Y_e extends ge{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:p("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:KR,kbOpts:{kbExpr:O.editorTextFocus,primary:Ji(2089,2089),weight:100}})}async run(e,t){var i;(i=fc.get(t))===null||i===void 0||i.selectFromAnchorToCursor()}}class q_e extends ge{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:p("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:KR,kbOpts:{kbExpr:O.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=fc.get(t))===null||i===void 0||i.cancelSelectionAnchor()}}bt(fc.ID,fc,4);te($_e);te(K_e);te(Y_e);te(q_e);const j_e=M("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},p("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class X_e extends ge{constructor(){super({id:"editor.action.jumpToBracket",label:p("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=jr.get(t))===null||i===void 0||i.jumpToBracket()}}class J_e extends ge{constructor(){super({id:"editor.action.selectToBracket",label:p("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Ve("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=jr.get(t))===null||n===void 0||n.selectToBracket(s)}}class Z_e extends ge{constructor(){super({id:"editor.action.removeBrackets",label:p("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=jr.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class Q_e{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class jr extends U{static get(e){return e.getContribution(jr.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Ht(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new Te(r.lineNumber,r.column,r.lineNumber,r.column):new Te(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(w.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const h=a;a=l,l=h}}a&&l&&i.push(new Te(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let h=0,u=e.length;h<u;h++){const f=e[h];f.isEmpty()&&(s[r++]=f.getStartPosition())}s.length>1&&s.sort(W.compare);const a=[];let l=0,d=0;const c=n.length;for(let h=0,u=s.length;h<u;h++){const f=s[h];for(;d<c&&n[d].position.isBefore(f);)d++;if(d<c&&n[d].position.equals(f))a[l++]=n[d];else{let g=t.bracketPairs.matchBracket(f,20),m=jr._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!g&&this._matchBrackets==="always"&&(g=t.bracketPairs.findEnclosingBrackets(f,20),m=jr._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new Q_e(f,g,m)}}this._lastBracketsData=a,this._lastVersionId=i}}jr.ID="editor.contrib.bracketMatchingController";jr._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=qe.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Si(j_e),position:Ko.Center}});jr._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=qe.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});bt(jr.ID,jr,1);te(J_e);te(X_e);te(Z_e);Cn.appendMenuItem(N.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class eEe{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new w(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new w(i,s,i,s),a)}else{const r=new w(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new w(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new Te(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Te(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class sz extends ge{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new eEe(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class tEe extends sz{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:p("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:O.writable})}}class iEe extends sz{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:p("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:O.writable})}}te(tEe);te(iEe);class nEe extends ge{constructor(){super({id:"editor.action.transposeLetters",label:p("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;const c=l===d?r.getPosition():Dt.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=Dt.leftPosition(i,c),u=Dt.leftPosition(i,h),f=i.getValueInRange(w.fromPositions(u,h)),g=i.getValueInRange(w.fromPositions(h,c)),m=w.fromPositions(u,c);n.push(new kn(m,g+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}te(nEe);const YR=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){o(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}}();function q2(o){return{asString:async()=>o,asFile:()=>{},value:typeof o=="string"?o:void 0}}function sEe(o,e,t){const i={id:YR(),name:o,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class oz{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return ft.some(this,([i,n])=>n.asFile())&&t.push("files"),az($I(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return $I(e)}}function $I(o){return o.toLowerCase()}function rz(o,e){return az($I(o),e.map($I))}function az(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(r=>r.startsWith(n+"/")):!1}const qR=Object.freeze({create:o=>oc(o.map(e=>e.toString())).join(`\r
|
|
1079
|
+
*-----------------------------------------------------------------------------*/var R_e=Object.defineProperty,A_e=Object.getOwnPropertyDescriptor,w_e=Object.getOwnPropertyNames,N_e=Object.prototype.hasOwnProperty,y_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w_e(e))!N_e.call(o,n)&&n!==t&&R_e(o,n,{get:()=>e[n],enumerable:!(i=A_e(e,n))||i.enumerable});return o},D_e=(o,e,t)=>(y_e(o,e,"default"),t),O_e="5.4.5",Om={};D_e(Om,n_);var YG=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(YG||{}),qG=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(qG||{}),jG=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(jG||{}),XG=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(XG||{}),JG=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(JG||{}),ZG=class{constructor(o,e,t,i,n){this._onDidChange=new Om.Emitter,this._onDidExtraLibsChange=new Om.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},x_e=O_e,QG={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},Y2=new ZG({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},QG),ez=new ZG({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},QG),M_e=()=>$R().then(o=>o.getTypeScriptWorker()),P_e=()=>$R().then(o=>o.getJavaScriptWorker());Om.languages.typescript={ModuleKind:YG,JsxEmit:qG,NewLineKind:jG,ScriptTarget:XG,ModuleResolutionKind:JG,typescriptVersion:x_e,typescriptDefaults:Y2,javascriptDefaults:ez,getTypeScriptWorker:M_e,getJavaScriptWorker:P_e};function $R(){return Promise.resolve().then(()=>require("./tsMode-D5NvKt6W.cjs"))}Om.languages.onLanguage("typescript",()=>$R().then(o=>o.setupTypeScript(Y2)));Om.languages.onLanguage("javascript",()=>$R().then(o=>o.setupJavaScript(ez)));class k_e extends Fs{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Ve("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:re.map,toggled:Y.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Y.has("isInDiffEditor"),menu:{when:Y.has("isInDiffEditor"),id:N.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(nt),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class tz extends Fs{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Ve("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:Y.has("isInDiffEditor")})}run(e,...t){const i=e.get(nt),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class iz extends Fs{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Ve("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:Y.has("isInDiffEditor")})}run(e,...t){const i=e.get(nt),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const Av=Ve("diffEditor","Diff Editor");class F_e extends Ya{constructor(){super({id:"diffEditor.switchSide",title:Ve("switchSide","Switch Side"),icon:re.arrowSwap,precondition:Y.has("isInDiffEditor"),f1:!0,category:Av})}runEditorCommand(e,t,i){const n=r_(e);if(n instanceof uc){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class B_e extends Ya{constructor(){super({id:"diffEditor.exitCompareMove",title:Ve("exitCompareMove","Exit Compare Move"),icon:re.close,precondition:O.comparingMovedCode,f1:!1,category:Av,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=r_(e);n instanceof uc&&n.exitCompareMove()}}class H_e extends Ya{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Ve("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:re.fold,precondition:Y.has("isInDiffEditor"),f1:!0,category:Av})}runEditorCommand(e,t,...i){const n=r_(e);n instanceof uc&&n.collapseAllUnchangedRegions()}}class W_e extends Ya{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Ve("showAllUnchangedRegions","Show All Unchanged Regions"),icon:re.unfold,precondition:Y.has("isInDiffEditor"),f1:!0,category:Av})}runEditorCommand(e,t,...i){const n=r_(e);n instanceof uc&&n.showAllUnchangedRegions()}}class wx extends Fs{constructor(){super({id:"diffEditor.revert",title:Ve("revert","Revert"),f1:!1,category:Av})}run(e,t){var i;const n=U_e(e,t.originalUri,t.modifiedUri);n instanceof uc&&n.revertRangeMappings((i=t.mapping.innerChanges)!==null&&i!==void 0?i:[])}}const nz=Ve("accessibleDiffViewer","Accessible Diff Viewer");class o_ extends Fs{constructor(){super({id:o_.id,title:Ve("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:nz,precondition:Y.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=r_(e);t==null||t.accessibleDiffViewerNext()}}o_.id="editor.action.accessibleDiffViewer.next";class wv extends Fs{constructor(){super({id:wv.id,title:Ve("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:nz,precondition:Y.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=r_(e);t==null||t.accessibleDiffViewerPrev()}}wv.id="editor.action.accessibleDiffViewer.prev";function U_e(o,e,t){return o.get(Tt).listDiffEditors().find(s=>{var r,a;const l=s.getModifiedEditor(),d=s.getOriginalEditor();return l&&((r=l.getModel())===null||r===void 0?void 0:r.uri.toString())===t.toString()&&d&&((a=d.getModel())===null||a===void 0?void 0:a.uri.toString())===e.toString()})||null}function r_(o){const t=o.get(Tt).listDiffEditors(),i=Wn();if(i)for(const n of t){const s=n.getContainerDomNode();if(V_e(s,i))return n}return null}function V_e(o,e){let t=e;for(;t;){if(t===o)return!0;t=t.parentElement}return!1}Kt(k_e);Kt(tz);Kt(iz);Cn.appendMenuItem(N.EditorTitle,{command:{id:new iz().desc.id,title:p("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Y.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Y.has("isInDiffEditor")},order:11,group:"1_diff",when:Y.and(O.diffEditorRenderSideBySideInlineBreakpointReached,Y.has("isInDiffEditor"))});Cn.appendMenuItem(N.EditorTitle,{command:{id:new tz().desc.id,title:p("showMoves","Show Moved Code Blocks"),icon:re.move,toggled:Ym.create("config.diffEditor.experimental.showMoves",!0),precondition:Y.has("isInDiffEditor")},order:10,group:"1_diff",when:Y.has("isInDiffEditor")});Kt(wx);for(const o of[{icon:re.arrowRight,key:O.diffEditorInlineMode.toNegated()},{icon:re.discard,key:O.diffEditorInlineMode}])Cn.appendMenuItem(N.DiffEditorHunkToolbar,{command:{id:new wx().desc.id,title:p("revertHunk","Revert Block"),icon:o.icon},when:Y.and(O.diffEditorModifiedWritable,o.key),order:5,group:"primary"}),Cn.appendMenuItem(N.DiffEditorSelectionToolbar,{command:{id:new wx().desc.id,title:p("revertSelection","Revert Selection"),icon:o.icon},when:Y.and(O.diffEditorModifiedWritable,o.key),order:5,group:"primary"});Kt(F_e);Kt(B_e);Kt(H_e);Kt(W_e);Cn.appendMenuItem(N.EditorTitle,{command:{id:o_.id,title:p("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Y.has("isInDiffEditor")},order:10,group:"2_diff",when:Y.and(O.accessibleDiffViewerVisible.negate(),Y.has("isInDiffEditor"))});gt.registerCommandAlias("editor.action.diffReview.next",o_.id);Kt(o_);gt.registerCommandAlias("editor.action.diffReview.prev",wv.id);Kt(wv);var G_e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},z_e=function(o,e){return function(t,i){e(t,i,o)}},Nx;const KR=new he("selectionAnchorSet",!1);let fc=Nx=class{static get(e){return e.getContribution(Nx.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=KR.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Te.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new jn().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Qs(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Te.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};fc.ID="editor.contrib.selectionAnchorController";fc=Nx=G_e([z_e(1,Pe)],fc);class $_e extends ge{constructor(){super({id:"editor.action.setSelectionAnchor",label:p("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:Ji(2089,2080),weight:100}})}async run(e,t){var i;(i=fc.get(t))===null||i===void 0||i.setSelectionAnchor()}}class K_e extends ge{constructor(){super({id:"editor.action.goToSelectionAnchor",label:p("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:KR})}async run(e,t){var i;(i=fc.get(t))===null||i===void 0||i.goToSelectionAnchor()}}class Y_e extends ge{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:p("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:KR,kbOpts:{kbExpr:O.editorTextFocus,primary:Ji(2089,2089),weight:100}})}async run(e,t){var i;(i=fc.get(t))===null||i===void 0||i.selectFromAnchorToCursor()}}class q_e extends ge{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:p("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:KR,kbOpts:{kbExpr:O.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=fc.get(t))===null||i===void 0||i.cancelSelectionAnchor()}}bt(fc.ID,fc,4);te($_e);te(K_e);te(Y_e);te(q_e);const j_e=M("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},p("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class X_e extends ge{constructor(){super({id:"editor.action.jumpToBracket",label:p("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=jr.get(t))===null||i===void 0||i.jumpToBracket()}}class J_e extends ge{constructor(){super({id:"editor.action.selectToBracket",label:p("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Ve("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=jr.get(t))===null||n===void 0||n.selectToBracket(s)}}class Z_e extends ge{constructor(){super({id:"editor.action.removeBrackets",label:p("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=jr.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class Q_e{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class jr extends U{static get(e){return e.getContribution(jr.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Ht(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new Te(r.lineNumber,r.column,r.lineNumber,r.column):new Te(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(w.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const h=a;a=l,l=h}}a&&l&&i.push(new Te(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let h=0,u=e.length;h<u;h++){const f=e[h];f.isEmpty()&&(s[r++]=f.getStartPosition())}s.length>1&&s.sort(W.compare);const a=[];let l=0,d=0;const c=n.length;for(let h=0,u=s.length;h<u;h++){const f=s[h];for(;d<c&&n[d].position.isBefore(f);)d++;if(d<c&&n[d].position.equals(f))a[l++]=n[d];else{let g=t.bracketPairs.matchBracket(f,20),m=jr._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!g&&this._matchBrackets==="always"&&(g=t.bracketPairs.findEnclosingBrackets(f,20),m=jr._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new Q_e(f,g,m)}}this._lastBracketsData=a,this._lastVersionId=i}}jr.ID="editor.contrib.bracketMatchingController";jr._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=qe.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Si(j_e),position:Ko.Center}});jr._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=qe.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});bt(jr.ID,jr,1);te(J_e);te(X_e);te(Z_e);Cn.appendMenuItem(N.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class eEe{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new w(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new w(i,s,i,s),a)}else{const r=new w(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new w(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new Te(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Te(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class sz extends ge{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new eEe(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class tEe extends sz{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:p("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:O.writable})}}class iEe extends sz{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:p("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:O.writable})}}te(tEe);te(iEe);class nEe extends ge{constructor(){super({id:"editor.action.transposeLetters",label:p("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;const c=l===d?r.getPosition():Dt.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=Dt.leftPosition(i,c),u=Dt.leftPosition(i,h),f=i.getValueInRange(w.fromPositions(u,h)),g=i.getValueInRange(w.fromPositions(h,c)),m=w.fromPositions(u,c);n.push(new kn(m,g+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}te(nEe);const YR=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){o(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}}();function q2(o){return{asString:async()=>o,asFile:()=>{},value:typeof o=="string"?o:void 0}}function sEe(o,e,t){const i={id:YR(),name:o,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class oz{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return ft.some(this,([i,n])=>n.asFile())&&t.push("files"),az($I(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return $I(e)}}function $I(o){return o.toLowerCase()}function rz(o,e){return az($I(o),e.map($I))}function az(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(r=>r.startsWith(n+"/")):!1}const qR=Object.freeze({create:o=>oc(o.map(e=>e.toString())).join(`\r
|
|
1080
1080
|
`),split:o=>o.split(`\r
|
|
1081
1081
|
`),parse:o=>qR.split(o).filter(e=>!e.startsWith("#"))});class Bt{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+Bt.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new Bt((this.value?[this.value,...e]:e).join(Bt.sep))}}Bt.sep=".";Bt.None=new Bt("@@none@@");Bt.Empty=new Bt("");const OU={EDITORS:"CodeEditors",FILES:"CodeFiles"};class oEe{}const rEe={DragAndDropContribution:"workbench.contributions.dragAndDrop"};mi.add(rEe.DragAndDropContribution,new oEe);class fC{constructor(){}static getInstance(){return fC.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}fC.INSTANCE=new fC;function lz(o){const e=new oz;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,q2(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,aEe(n))}}return e}function aEe(o){const e=o.path?De.parse(o.path):void 0;return sEe(o.name,e,async()=>new Uint8Array(await o.arrayBuffer()))}const lEe=Object.freeze([OU.EDITORS,OU.FILES,qS.RESOURCES,qS.INTERNAL_URI_LIST]);function dz(o,e=!1){const t=lz(o),i=t.get(qS.INTERNAL_URI_LIST);if(i)t.replace(Ri.uriList,i);else if(e||!t.has(Ri.uriList)){const n=[];for(const s of o.items){const r=s.getAsFile();if(r){const a=r.path;try{a?n.push(De.file(a).toString()):n.push(De.parse(r.name,!0).toString())}catch{}}}n.length&&t.replace(Ri.uriList,q2(qR.create(n)))}for(const n of lEe)t.delete(n);return t}var j2=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gC=function(o,e){return function(t,i){e(t,i,o)}};class X2{async provideDocumentPasteEdits(e,t,i,n,s){const r=await this.getEdit(i,s);if(r)return{dispose(){},edits:[{insertText:r.insertText,title:r.title,kind:r.kind,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}]}}async provideDocumentDropEdits(e,t,i,n){const s=await this.getEdit(i,n);return s?[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}]:void 0}}class gc extends X2{constructor(){super(...arguments),this.kind=gc.kind,this.dropMimeTypes=[Ri.text],this.pasteMimeTypes=[Ri.text]}async getEdit(e,t){const i=e.get(Ri.text);if(!i||e.has(Ri.uriList))return;const n=await i.asString();return{handledMimeType:Ri.text,title:p("text.label","Insert Plain Text"),insertText:n,kind:this.kind}}}gc.id="text";gc.kind=new Bt("text.plain");class cz extends X2{constructor(){super(...arguments),this.kind=new Bt("uri.absolute"),this.dropMimeTypes=[Ri.uriList],this.pasteMimeTypes=[Ri.uriList]}async getEdit(e,t){const i=await hz(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:a,originalText:l})=>a.scheme===Ue.file?a.fsPath:(n++,l)).join(" ");let r;return n>0?r=i.length>1?p("defaultDropProvider.uriList.uris","Insert Uris"):p("defaultDropProvider.uriList.uri","Insert Uri"):r=i.length>1?p("defaultDropProvider.uriList.paths","Insert Paths"):p("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:Ri.uriList,insertText:s,title:r,kind:this.kind}}}let KI=class extends X2{constructor(e){super(),this._workspaceContextService=e,this.kind=new Bt("uri.relative"),this.dropMimeTypes=[Ri.uriList],this.pasteMimeTypes=[Ri.uriList]}async getEdit(e,t){const i=await hz(e);if(!i.length||t.isCancellationRequested)return;const n=Ma(i.map(({uri:s})=>{const r=this._workspaceContextService.getWorkspaceFolder(s);return r?goe(r.uri,s):void 0}));if(n.length)return{handledMimeType:Ri.uriList,insertText:n.join(" "),title:i.length>1?p("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):p("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}}};KI=j2([gC(0,kf)],KI);class dEe{constructor(){this.kind=new Bt("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Ri.text}]}async provideDocumentPasteEdits(e,t,i,n,s){var r;if(n.triggerKind!==hS.PasteAs&&!(!((r=n.only)===null||r===void 0)&&r.contains(this.kind)))return;const a=i.get("text/html"),l=await(a==null?void 0:a.asString());if(!(!l||s.isCancellationRequested))return{dispose(){},edits:[{insertText:l,yieldTo:this._yieldTo,title:p("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}}}async function hz(o){const e=o.get(Ri.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const n of qR.parse(t))try{i.push({uri:De.parse(n),originalText:n})}catch{}return i}let yx=class extends U{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new gc)),this._register(e.documentDropEditProvider.register("*",new cz)),this._register(e.documentDropEditProvider.register("*",new KI(t)))}};yx=j2([gC(0,Ce),gC(1,kf)],yx);let Dx=class extends U{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new gc)),this._register(e.documentPasteEditProvider.register("*",new cz)),this._register(e.documentPasteEditProvider.register("*",new KI(t))),this._register(e.documentPasteEditProvider.register("*",new dEe))}};Dx=j2([gC(0,Ce),gC(1,kf)],Dx);class Pr{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=Pr._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(Pr.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(Pr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(Pr.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(Pr.isVariableCharacter(i)||Pr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof Pr._table[i]>"u"&&!Pr.isDigitCharacter(i)&&!Pr.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}}Pr._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class a_{constructor(){this._children=[]}appendChild(e){return e instanceof bs&&this._children[this._children.length-1]instanceof bs?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function r(a,l){for(const d of a)d.parent=l,r(d.children,d)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Nv)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class bs extends a_{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new bs(this.value)}}class uz extends a_{}class sr extends uz{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof l_?this._children[0]:void 0}clone(){const e=new sr(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class l_ extends a_{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof bs&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new l_;return this.options.forEach(e.appendChild,e),e}}class J2 extends a_{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof fa&&!!s.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof fa){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new J2;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class fa extends a_{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new fa(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class pC extends uz{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new bs(t)],!0):!1}clone(){const e=new pC(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function xU(o,e){const t=[...o];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class Nv extends a_{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof sr&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(n=>n===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return xU([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof sr&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof pC&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new Nv;return this._children=this.children.map(t=>t.clone()),e}walk(e){xU(this.children,e)}}class Vf{constructor(){this._scanner=new Pr,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new Nv;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(l=>(l instanceof sr&&(l.isFinalTabstop?n.set(0,void 0):!n.has(l.index)&&l.children.length>0?n.set(l.index,l.children):s.push(l)),!0));const r=(l,d)=>{const c=n.get(l.index);if(!c)return;const h=new sr(l.index);h.transform=l.transform;for(const u of c){const f=u.clone();h.appendChild(f),f instanceof sr&&n.has(f.index)&&!d.has(f.index)&&(d.add(f.index),r(f,d),d.delete(f.index))}t.replace(l,[h])},a=new Set;for(const l of s)r(l,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new sr(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new bs(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new sr(Number(t)):new pC(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new sr(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new bs("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const r=new l_;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(r),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new bs(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new pC(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new bs("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new J2;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new bs(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new fa(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new fa(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new fa(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new fa(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new fa(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const r=this._until(4);if(r)return e.appendChild(new fa(Number(n),void 0,s,r)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new fa(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new bs(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function fz(o,e,t){var i,n,s,r;return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:(n=(i=t.additionalEdit)===null||i===void 0?void 0:i.edits)!==null&&n!==void 0?n:[]}:{edits:[...e.map(a=>new Ch(o,{range:a,text:typeof t.insertText=="string"?Vf.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...(r=(s=t.additionalEdit)===null||s===void 0?void 0:s.edits)!==null&&r!==void 0?r:[]]}}function gz(o){var e;function t(a,l){return"mimeType"in a?a.mimeType===l.handledMimeType:!!l.kind&&a.kind.contains(l.kind)}const i=new Map;for(const a of o)for(const l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(const d of o)if(d!==a&&t(l,d)){let c=i.get(a);c||(c=[],i.set(a,c)),c.push(d)}if(!i.size)return Array.from(o);const n=new Set,s=[];function r(a){if(!a.length)return[];const l=a[0];if(s.includes(l))return console.warn("Yield to cycle detected",l),a;if(n.has(l))return r(a.slice(1));let d=[];const c=i.get(l);return c&&(s.push(l),d=r(c),s.pop()),n.add(l),[...d,l,...r(a.slice(1))]}return r(Array.from(o))}var cEe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hEe=function(o,e){return function(t,i){e(t,i,o)}};const uEe=qe.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:e8,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class jR extends U{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=ne(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=ne("span.icon");this.domNode.append(t),t.classList.add(...Me.asClassNameArray(re.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(67);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(52)||n.hasChanged(67))&&i()})),this._register(z(this.domNode,ie.CLICK,n=>{this.delegate.cancel()}))}getId(){return jR.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}jR.baseId="editor.widget.inlineProgressWidget";let YI=class extends U{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new fn),this._currentWidget=new fn,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}async showWhile(e,t,i){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=Oh(()=>{const s=w.fromPositions(e);this._currentDecorations.set([{range:s,options:uEe}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(jR,this.id,this._editor,s,t,i))},this._showDelay);try{return await i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};YI=cEe([hEe(2,we)],YI);var fEe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},MU=function(o,e){return function(t,i){e(t,i,o)}},Jb;let Os=Jb=class{static get(e){return e.getContribution(Jb.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new fn,this._messageListeners=new X,this._mouseOverMessage=!1,this._editor=e,this._visible=Jb.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Qs(Oa(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=Oa(e)?uR(e,{actionHandler:{callback:n=>{this.closeMessage(),s2(this._openerService,n,Oa(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new PU(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(de.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&cn(Wn(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(z(this._messageWidget.value.getDomNode(),ie.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(z(this._messageWidget.value.getDomNode(),ie.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new w(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(PU.fadeOut(this._messageWidget.value))}};Os.ID="editor.contrib.messageController";Os.MESSAGE_VISIBLE=new he("messageVisible",!1,p("messageVisible","Whether the editor is currently showing an inline message"));Os=Jb=fEe([MU(1,Pe),MU(2,To)],Os);const gEe=sn.bindToContribution(Os.get);ce(new gEe({id:"leaveEditorMessage",precondition:Os.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:130,primary:9}}));let PU=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const r=document.createElement("div");typeof n=="string"?(r.classList.add("message"),r.textContent=n):(n.classList.add("message"),r.appendChild(n)),this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};bt(Os.ID,Os,4);function R1(o,e){return e&&(o.stack||o.stacktrace)?p("stackTrace.format","{0}: {1}",FU(o),kU(o.stack)||kU(o.stacktrace)):FU(o)}function kU(o){return Array.isArray(o)?o.join(`
|
|
1082
1082
|
`):o}function FU(o){return o.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${o.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof o.code=="string"&&typeof o.errno=="number"&&typeof o.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",o.message):o.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function qI(o=null,e=!1){if(!o)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(o)){const t=Ma(o),i=qI(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(Ds(o))return o;if(o.detail){const t=o.detail;if(t.error)return R1(t.error,e);if(t.exception)return R1(t.exception,e)}return o.stack?R1(o,e):o.message?o.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var pz=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jp=function(o,e){return function(t,i){e(t,i,o)}},Ox;let jI=Ox=class extends U{constructor(e,t,i,n,s,r,a,l,d,c){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=r,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(d),this.visibleContext.set(!0),this._register(Ie(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Ie(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(h=>{s.containsPosition(h.position)||this.dispose()})),this._register(de.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=ne(".post-edit-widget"),this.button=this._register(new vI(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(z(this.domNode,ie.CLICK,()=>this.showSelector()))}getId(){return Ox.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Ui(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>uf({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};jI.baseId="editor.widget.postEditWidget";jI=Ox=pz([jp(7,vo),jp(8,Pe),jp(9,At)],jI);let XI=class extends U{constructor(e,t,i,n,s,r,a){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=r,this._notificationService=a,this._currentWidget=this._register(new fn),this._register(de.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,n,s){const r=this._editor.getModel();if(!r||!e.length)return;const a=t.allEdits.at(t.activeEditIndex);if(!a)return;const l=async _=>{const E=this._editor.getModel();E&&(await E.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:_,allEdits:t.allEdits},i,n,s))},d=(_,E)=>{Zr(_)||(this._notificationService.error(E),i&&this.show(e[0],t,l))};let c;try{c=await n(a,s)}catch(_){return d(_,p("resolveError",`Error resolving edit '{0}':
|
|
@@ -1194,8 +1194,8 @@ If possible, please select a more specific dialect (like sqlite, postgresql, etc
|
|
|
1194
1194
|
${JSON.stringify(r,void 0,2)}`)}}}var fe;(function(o){o[o.SPACE=0]="SPACE",o[o.NO_SPACE=1]="NO_SPACE",o[o.NO_NEWLINE=2]="NO_NEWLINE",o[o.NEWLINE=3]="NEWLINE",o[o.MANDATORY_NEWLINE=4]="MANDATORY_NEWLINE",o[o.INDENT=5]="INDENT",o[o.SINGLE_INDENT=6]="SINGLE_INDENT"})(fe=fe||(fe={}));class QK{constructor(e){this.indentation=e,this.items=[]}add(...e){for(const t of e)switch(t){case fe.SPACE:this.items.push(fe.SPACE);break;case fe.NO_SPACE:this.trimHorizontalWhitespace();break;case fe.NO_NEWLINE:this.trimWhitespace();break;case fe.NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(fe.NEWLINE);break;case fe.MANDATORY_NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(fe.MANDATORY_NEWLINE);break;case fe.INDENT:this.addIndentation();break;case fe.SINGLE_INDENT:this.items.push(fe.SINGLE_INDENT);break;default:this.items.push(t)}}trimHorizontalWhitespace(){for(;Xye(sS(this.items));)this.items.pop()}trimWhitespace(){for(;Jye(sS(this.items));)this.items.pop()}addNewline(e){if(this.items.length>0)switch(sS(this.items)){case fe.NEWLINE:this.items.pop(),this.items.push(e);break;case fe.MANDATORY_NEWLINE:break;default:this.items.push(e);break}}addIndentation(){for(let e=0;e<this.indentation.getLevel();e++)this.items.push(fe.SINGLE_INDENT)}toString(){return this.items.map(e=>this.itemToString(e)).join("")}getLayoutItems(){return this.items}isAtStartOfLine(){for(let e=this.items.length-1;e>=0;e--){const t=this.items[e];if(t!==fe.SINGLE_INDENT)return t===fe.NEWLINE||t===fe.MANDATORY_NEWLINE}return!1}itemToString(e){switch(e){case fe.SPACE:return" ";case fe.NEWLINE:case fe.MANDATORY_NEWLINE:return`
|
|
1195
1195
|
`;case fe.SINGLE_INDENT:return this.indentation.getSingleIndent();default:return e}}}const Xye=o=>o===fe.SPACE||o===fe.SINGLE_INDENT,Jye=o=>o===fe.SPACE||o===fe.SINGLE_INDENT||o===fe.NEWLINE;function h3(o,e){if(e==="standard")return o;let t=[];return o.length>=10&&o.includes(" ")&&([o,...t]=o.split(" ")),e==="tabularLeft"?o=o.padEnd(9," "):o=o.padStart(9," "),o+["",...t].join(" ")}function u3(o){return LAe(o)||o===pe.RESERVED_CLAUSE||o===pe.RESERVED_SELECT||o===pe.RESERVED_SET_OPERATION||o===pe.RESERVED_JOIN||o===pe.LIMIT}const HN="top-level",Zye="block-level";class eY{constructor(e){this.indent=e,this.indentTypes=[]}getSingleIndent(){return this.indent}getLevel(){return this.indentTypes.length}increaseTopLevel(){this.indentTypes.push(HN)}increaseBlockLevel(){this.indentTypes.push(Zye)}decreaseTopLevel(){this.indentTypes.length>0&&sS(this.indentTypes)===HN&&this.indentTypes.pop()}decreaseBlockLevel(){for(;this.indentTypes.length>0&&this.indentTypes.pop()===HN;);}}class Qye extends QK{constructor(e){super(new eY("")),this.expressionWidth=e,this.length=0,this.trailingSpace=!1}add(...e){if(e.forEach(t=>this.addToLength(t)),this.length>this.expressionWidth)throw new gP;super.add(...e)}addToLength(e){if(typeof e=="string")this.length+=e.length,this.trailingSpace=!1;else{if(e===fe.MANDATORY_NEWLINE||e===fe.NEWLINE)throw new gP;e===fe.INDENT||e===fe.SINGLE_INDENT||e===fe.SPACE?this.trailingSpace||(this.length++,this.trailingSpace=!0):(e===fe.NO_NEWLINE||e===fe.NO_SPACE)&&this.trailingSpace&&(this.trailingSpace=!1,this.length--)}}}class gP extends Error{}class EL{constructor({cfg:e,dialectCfg:t,params:i,layout:n,inline:s=!1}){this.inline=!1,this.nodes=[],this.index=-1,this.cfg=e,this.dialectCfg=t,this.inline=s,this.params=i,this.layout=n}format(e){for(this.nodes=e,this.index=0;this.index<this.nodes.length;this.index++)this.formatNode(this.nodes[this.index]);return this.layout}formatNode(e){this.formatComments(e.leadingComments),this.formatNodeWithoutComments(e),this.formatComments(e.trailingComments)}formatNodeWithoutComments(e){switch(e.type){case et.function_call:return this.formatFunctionCall(e);case et.parameterized_data_type:return this.formatParameterizedDataType(e);case et.array_subscript:return this.formatArraySubscript(e);case et.property_access:return this.formatPropertyAccess(e);case et.parenthesis:return this.formatParenthesis(e);case et.between_predicate:return this.formatBetweenPredicate(e);case et.case_expression:return this.formatCaseExpression(e);case et.case_when:return this.formatCaseWhen(e);case et.case_else:return this.formatCaseElse(e);case et.clause:return this.formatClause(e);case et.set_operation:return this.formatSetOperation(e);case et.limit_clause:return this.formatLimitClause(e);case et.all_columns_asterisk:return this.formatAllColumnsAsterisk(e);case et.literal:return this.formatLiteral(e);case et.identifier:return this.formatIdentifier(e);case et.parameter:return this.formatParameter(e);case et.operator:return this.formatOperator(e);case et.comma:return this.formatComma(e);case et.line_comment:return this.formatLineComment(e);case et.block_comment:return this.formatBlockComment(e);case et.disable_comment:return this.formatBlockComment(e);case et.data_type:return this.formatDataType(e);case et.keyword:return this.formatKeywordNode(e)}}formatFunctionCall(e){this.withComments(e.nameKw,()=>{this.layout.add(this.showFunctionKw(e.nameKw))}),this.formatNode(e.parenthesis)}formatParameterizedDataType(e){this.withComments(e.dataType,()=>{this.layout.add(this.showDataType(e.dataType))}),this.formatNode(e.parenthesis)}formatArraySubscript(e){let t;switch(e.array.type){case et.data_type:t=this.showDataType(e.array);break;case et.keyword:t=this.showKw(e.array);break;default:t=this.showIdentifier(e.array);break}this.withComments(e.array,()=>{this.layout.add(t)}),this.formatNode(e.parenthesis)}formatPropertyAccess(e){this.formatNode(e.object),this.layout.add(fe.NO_SPACE,e.operator),this.formatNode(e.property)}formatParenthesis(e){const t=this.formatInlineExpression(e.children);t?(this.layout.add(e.openParen),this.layout.add(...t.getLayoutItems()),this.layout.add(fe.NO_SPACE,e.closeParen,fe.SPACE)):(this.layout.add(e.openParen,fe.NEWLINE),Kg(this.cfg)?(this.layout.add(fe.INDENT),this.layout=this.formatSubExpression(e.children)):(this.layout.indentation.increaseBlockLevel(),this.layout.add(fe.INDENT),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseBlockLevel()),this.layout.add(fe.NEWLINE,fe.INDENT,e.closeParen,fe.SPACE))}formatBetweenPredicate(e){this.layout.add(this.showKw(e.betweenKw),fe.SPACE),this.layout=this.formatSubExpression(e.expr1),this.layout.add(fe.NO_SPACE,fe.SPACE,this.showNonTabularKw(e.andKw),fe.SPACE),this.layout=this.formatSubExpression(e.expr2),this.layout.add(fe.SPACE)}formatCaseExpression(e){this.formatNode(e.caseKw),this.layout.indentation.increaseBlockLevel(),this.layout=this.formatSubExpression(e.expr),this.layout=this.formatSubExpression(e.clauses),this.layout.indentation.decreaseBlockLevel(),this.layout.add(fe.NEWLINE,fe.INDENT),this.formatNode(e.endKw)}formatCaseWhen(e){this.layout.add(fe.NEWLINE,fe.INDENT),this.formatNode(e.whenKw),this.layout=this.formatSubExpression(e.condition),this.formatNode(e.thenKw),this.layout=this.formatSubExpression(e.result)}formatCaseElse(e){this.layout.add(fe.NEWLINE,fe.INDENT),this.formatNode(e.elseKw),this.layout=this.formatSubExpression(e.result)}formatClause(e){this.isOnelineClause(e)?this.formatClauseInOnelineStyle(e):Kg(this.cfg)?this.formatClauseInTabularStyle(e):this.formatClauseInIndentedStyle(e)}isOnelineClause(e){return Kg(this.cfg)?this.dialectCfg.tabularOnelineClauses[e.nameKw.text]:this.dialectCfg.onelineClauses[e.nameKw.text]}formatClauseInIndentedStyle(e){this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e.nameKw),fe.NEWLINE),this.layout.indentation.increaseTopLevel(),this.layout.add(fe.INDENT),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatClauseInOnelineStyle(e){this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e.nameKw),fe.SPACE),this.layout=this.formatSubExpression(e.children)}formatClauseInTabularStyle(e){this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e.nameKw),fe.SPACE),this.layout.indentation.increaseTopLevel(),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatSetOperation(e){this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e.nameKw),fe.NEWLINE),this.layout.add(fe.INDENT),this.layout=this.formatSubExpression(e.children)}formatLimitClause(e){this.withComments(e.limitKw,()=>{this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e.limitKw))}),this.layout.indentation.increaseTopLevel(),Kg(this.cfg)?this.layout.add(fe.SPACE):this.layout.add(fe.NEWLINE,fe.INDENT),e.offset?(this.layout=this.formatSubExpression(e.offset),this.layout.add(fe.NO_SPACE,",",fe.SPACE),this.layout=this.formatSubExpression(e.count)):this.layout=this.formatSubExpression(e.count),this.layout.indentation.decreaseTopLevel()}formatAllColumnsAsterisk(e){this.layout.add("*",fe.SPACE)}formatLiteral(e){this.layout.add(e.text,fe.SPACE)}formatIdentifier(e){this.layout.add(this.showIdentifier(e),fe.SPACE)}formatParameter(e){this.layout.add(this.params.get(e),fe.SPACE)}formatOperator({text:e}){e==="-"&&this.dialectCfg.identifierDashes?this.layout.add(e,fe.SPACE):this.cfg.denseOperators||this.dialectCfg.alwaysDenseOperators.includes(e)?this.layout.add(fe.NO_SPACE,e):e===":"?this.layout.add(fe.NO_SPACE,e,fe.SPACE):this.layout.add(e,fe.SPACE)}formatComma(e){this.inline?this.layout.add(fe.NO_SPACE,",",fe.SPACE):this.layout.add(fe.NO_SPACE,",",fe.NEWLINE,fe.INDENT)}withComments(e,t){this.formatComments(e.leadingComments),t(),this.formatComments(e.trailingComments)}formatComments(e){e&&e.forEach(t=>{t.type===et.line_comment?this.formatLineComment(t):this.formatBlockComment(t)})}formatLineComment(e){kN(e.precedingWhitespace||"")?this.layout.add(fe.NEWLINE,fe.INDENT,e.text,fe.MANDATORY_NEWLINE,fe.INDENT):this.layout.getLayoutItems().length>0?this.layout.add(fe.NO_NEWLINE,fe.SPACE,e.text,fe.MANDATORY_NEWLINE,fe.INDENT):this.layout.add(e.text,fe.MANDATORY_NEWLINE,fe.INDENT)}formatBlockComment(e){e.type===et.block_comment&&this.isStandaloneBlockComment(e)?(this.splitBlockComment(e.text).forEach(t=>{this.layout.add(fe.NEWLINE,fe.INDENT,t)}),this.layout.add(fe.NEWLINE,fe.INDENT)):this.layout.add(e.text,fe.SPACE)}isStandaloneBlockComment(e){return kN(e.text)||kN(e.precedingWhitespace||"")||this.layout.isAtStartOfLine()}isDocComment(e){const t=e.split(/\n/);return/^\/\*\*?$/.test(t[0])&&t.slice(1,t.length-1).every(i=>/^\s*\*/.test(i))&&/^\s*\*\/$/.test(sS(t))}splitBlockComment(e){return this.isDocComment(e)?e.split(/\n/).map(t=>/^\s*\*/.test(t)?" "+t.replace(/^\s*/,""):t):e.split(/\n/).map(t=>t.replace(/^\s*/,""))}formatSubExpression(e){return new EL({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:this.layout,inline:this.inline}).format(e)}formatInlineExpression(e){const t=this.params.getPositionalParameterIndex();try{return new EL({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:new Qye(this.cfg.expressionWidth),inline:!0}).format(e)}catch(i){if(i instanceof gP){this.params.setPositionalParameterIndex(t);return}else throw i}}formatKeywordNode(e){switch(e.tokenType){case pe.RESERVED_JOIN:return this.formatJoin(e);case pe.AND:case pe.OR:case pe.XOR:return this.formatLogicalOperator(e);default:return this.formatKeyword(e)}}formatJoin(e){Kg(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e),fe.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e),fe.SPACE)}formatKeyword(e){this.layout.add(this.showKw(e),fe.SPACE)}formatLogicalOperator(e){this.cfg.logicalOperatorNewline==="before"?Kg(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e),fe.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(fe.NEWLINE,fe.INDENT,this.showKw(e),fe.SPACE):this.layout.add(this.showKw(e),fe.NEWLINE,fe.INDENT)}formatDataType(e){this.layout.add(this.showDataType(e),fe.SPACE)}showKw(e){return u3(e.tokenType)?h3(this.showNonTabularKw(e),this.cfg.indentStyle):this.showNonTabularKw(e)}showNonTabularKw(e){switch(this.cfg.keywordCase){case"preserve":return d0(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}showFunctionKw(e){return u3(e.tokenType)?h3(this.showNonTabularFunctionKw(e),this.cfg.indentStyle):this.showNonTabularFunctionKw(e)}showNonTabularFunctionKw(e){switch(this.cfg.functionCase){case"preserve":return d0(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}showIdentifier(e){if(e.quoted)return e.text;switch(this.cfg.identifierCase){case"preserve":return e.text;case"upper":return e.text.toUpperCase();case"lower":return e.text.toLowerCase()}}showDataType(e){switch(this.cfg.dataTypeCase){case"preserve":return d0(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}}class eDe{constructor(e,t){this.dialect=e,this.cfg=t,this.params=new Mye(this.cfg.params)}format(e){const t=this.parse(e);return this.formatAst(t).trimEnd()}parse(e){return jye(this.dialect.tokenizer).parse(e,this.cfg.paramTypes||{})}formatAst(e){return e.map(t=>this.formatStatement(t)).join(`
|
|
1196
1196
|
`.repeat(this.cfg.linesBetweenQueries+1))}formatStatement(e){const t=new EL({cfg:this.cfg,dialectCfg:this.dialect.formatOptions,params:this.params,layout:new QK(new eY(xye(this.cfg)))}).format(e.children);return e.hasSemicolon&&(this.cfg.newlineBeforeSemicolon?t.add(fe.NEWLINE,";"):t.add(fe.NO_NEWLINE,";")),t.toString()}}class c0 extends Error{}function tDe(o){const e=["multilineLists","newlineBeforeOpenParen","newlineBeforeCloseParen","aliasAs","commaPosition","tabulateAlias"];for(const t of e)if(t in o)throw new c0(`${t} config is no more supported.`);if(o.expressionWidth<=0)throw new c0(`expressionWidth config must be positive number. Received ${o.expressionWidth} instead.`);if(o.params&&!iDe(o.params)&&console.warn('WARNING: All "params" option values should be strings.'),o.paramTypes&&!nDe(o.paramTypes))throw new c0("Empty regex given in custom paramTypes. That would result in matching infinite amount of parameters.");return o}function iDe(o){return(o instanceof Array?o:Object.values(o)).every(t=>typeof t=="string")}function nDe(o){return o.custom&&Array.isArray(o.custom)?o.custom.every(e=>e.regex!==""):!0}var sDe=function(o,e){var t={};for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&e.indexOf(i)<0&&(t[i]=o[i]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(o);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(o,i[n])&&(t[i[n]]=o[i[n]]);return t};const tY={bigquery:"bigquery",clickhouse:"clickhouse",db2:"db2",db2i:"db2i",duckdb:"duckdb",hive:"hive",mariadb:"mariadb",mysql:"mysql",n1ql:"n1ql",plsql:"plsql",postgresql:"postgresql",redshift:"redshift",spark:"spark",sqlite:"sqlite",sql:"sql",tidb:"tidb",trino:"trino",transactsql:"transactsql",tsql:"transactsql",singlestoredb:"singlestoredb",snowflake:"snowflake"},oDe=Object.keys(tY),rDe={tabWidth:2,useTabs:!1,keywordCase:"preserve",identifierCase:"preserve",dataTypeCase:"preserve",functionCase:"preserve",indentStyle:"standard",logicalOperatorNewline:"before",expressionWidth:50,linesBetweenQueries:1,denseOperators:!1,newlineBeforeSemicolon:!1},aDe=(o,e={})=>{if(typeof e.language=="string"&&!oDe.includes(e.language))throw new c0(`Unsupported SQL dialect: ${e.language}`);const t=tY[e.language||"sql"];return lDe(o,Object.assign(Object.assign({},e),{dialect:mye[t]}))},lDe=(o,e)=>{var{dialect:t}=e,i=sDe(e,["dialect"]);if(typeof o!="string")throw new Error("Invalid query argument. Expected string, instead got "+typeof o);const n=tDe(Object.assign(Object.assign({},rDe),i));return new eDe(yye(t),n).format(o)};async function VA(o,e){if(!o||!o.trim())return o;try{switch(e){case"javascript":return P5.js(o,{indent_size:2,space_in_empty_paren:!1,jslint_happy:!1,preserve_newlines:!0,max_preserve_newlines:2,brace_style:"collapse",keep_array_indentation:!1,break_chained_methods:!1,end_with_newline:!1});case"json":try{const t=JSON.parse(o);return JSON.stringify(t,null,2)}catch{return P5.js(o,{indent_size:2})}case"sql":return aDe(o,{language:"sql",tabWidth:2,keywordCase:"upper",indentStyle:"standard",logicalOperatorNewline:"before",expressionWidth:50});default:return o}}catch(t){throw console.error("格式化失败:",t),new Error(`代码格式化失败: ${t instanceof Error?t.message:"未知错误"}`)}}function GA(o,e){if(!o||!o.trim())return o;try{switch(e){case"javascript":return o.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*/g,"").replace(/\s+/g," ").replace(/\s*([{}();,:])\s*/g,"$1").trim();case"json":try{const t=JSON.parse(o);return JSON.stringify(t)}catch{return o.replace(/\s+/g," ").trim()}case"sql":return o.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/(\n|\s)+/g," ").trim();default:return o}}catch(t){throw console.error("压缩失败:",t),new Error(`代码压缩失败: ${t instanceof Error?t.message:"未知错误"}`)}}const dDe={key:0,class:"tuoyuan-code-editor__toolbar"},cDe={class:"toolbar-left"},hDe={class:"toolbar-right"},uDe=["disabled"],fDe=["disabled"],gDe={class:"tuoyuan-code-editor__statusbar"},pDe={class:"statusbar-left"},mDe={class:"statusbar-item"},_De={class:"statusbar-item"},EDe={class:"statusbar-value"},SDe={class:"statusbar-item"},CDe={class:"statusbar-value"},vDe={class:"statusbar-right"},TDe={class:"statusbar-item"},bDe=K.defineComponent({name:"TuoyuanCodeEditor",__name:"CodeEditor",props:{modelValue:{default:""},language:{default:"javascript"},height:{default:"400px"},theme:{default:"vs"},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},options:{default:()=>({})}},emits:["update:modelValue","update:language","update:theme","change","blur","format","minify","save","copy","download","fullscreen"],setup(o,{expose:e,emit:t}){K.useCssVars(P=>({a65c4446:P.height}));const i=o,n=t,s=K.ref(null),r=K.ref(null),a=K.ref(1),l=K.ref(1),d=K.ref(0),c=K.ref(0),h=K.ref(!1),u=K.ref(i.language),f=K.ref(i.theme),g=P=>{d.value=P.split(`
|
|
1197
|
-
`).length,c.value=P.length},m=async()=>{if(!r.value)return!1;try{const P=K.toRaw(r.value).getValue();return await navigator.clipboard.writeText(P),n("copy",P),!0}catch(P){return console.error("复制失败:",P),!1}},_=P=>{if(!r.value)return;const H=K.toRaw(r.value).getValue(),q=new Blob([H],{type:"text/plain;charset=utf-8"}),ue=URL.createObjectURL(q),ve=document.createElement("a");if(!P){const _e={javascript:"js",json:"json",sql:"sql"}[i.language]||"txt";P=`code_${new Date().getTime()}.${_e}`}ve.href=ue,ve.download=P,document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),URL.revokeObjectURL(ue),n("download",H)},E=()=>{h.value=!h.value,setTimeout(()=>{r.value&&K.toRaw(r.value).layout()},300),n("fullscreen",h.value)},S=()=>{h.value||E()},C=()=>{h.value&&E()},v=P=>{P.key==="Escape"&&h.value&&E()};K.onMounted(()=>{window.addEventListener("keydown",v)}),K.onBeforeUnmount(()=>{window.removeEventListener("keydown",v)}),K.onMounted(async()=>{s.value&&(await K.nextTick(),r.value=Ur.create(s.value,{value:i.modelValue||"",language:i.language,theme:i.theme,readOnly:i.readonly,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:14,lineHeight:19,tabSize:2,fontFamily:'Consolas, Monaco, "Courier New", monospace',lineNumbers:"on",glyphMargin:!1,folding:!0,renderLineHighlight:"line",scrollbar:{verticalScrollbarSize:14,horizontalScrollbarSize:10},quickSuggestions:!1,suggestOnTriggerCharacters:!1,acceptSuggestionOnCommitCharacter:!1,tabCompletion:"off",wordBasedSuggestions:"off",parameterHints:{enabled:!1},suggest:{showWords:!1,showMethods:!1,showFunctions:!1,showConstructors:!1,showFields:!1,showVariables:!1,showClasses:!1,showStructs:!1,showInterfaces:!1,showModules:!1,showProperties:!1,showEvents:!1,showOperators:!1,showUnits:!1,showValues:!1,showConstants:!1,showEnums:!1,showEnumMembers:!1,showKeywords:!1,showSnippets:!1},"semanticHighlighting.enabled":!1,...i.options}),g(i.modelValue||""),r.value.onDidChangeModelContent(()=>{if(!r.value)return;const P=K.toRaw(r.value).getValue();g(P),n("update:modelValue",P),n("change",P)}),r.value.onDidBlurEditorText(()=>{if(!r.value)return;const P=K.toRaw(r.value).getValue();n("blur",P)}),r.value.onDidChangeCursorPosition(P=>{a.value=P.position.lineNumber,l.value=P.position.column}),r.value.addCommand(Lv.CtrlCmd|Iv.KeyS,()=>{I()}))}),K.watch(()=>i.modelValue,P=>{if(!r.value)return;K.toRaw(r.value).getValue()!==P&&(K.toRaw(r.value).setValue(P||""),g(P||""))}),K.watch(()=>i.language,P=>{if(u.value=P,!r.value)return;const H=K.toRaw(r.value).getModel();H&&Ur.setModelLanguage(H,P)}),K.watch(()=>i.theme,P=>{f.value=P,Ur.setTheme(P)}),K.watch(u,P=>{if(!r.value)return;const H=K.toRaw(r.value).getModel();H&&Ur.setModelLanguage(H,P),n("update:language",P)}),K.watch(f,P=>{Ur.setTheme(P),n("update:theme",P)}),K.watch(()=>i.readonly,P=>{r.value&&K.toRaw(r.value).updateOptions({readOnly:P})});const T=async()=>{if(!(!r.value||i.readonly))try{const P=K.toRaw(r.value).getValue(),H=await VA(P,i.language);K.toRaw(r.value).setValue(H),n("update:modelValue",H),n("format",H)}catch(P){console.error("代码格式化失败:",P)}},b=()=>{if(!(!r.value||i.readonly))try{const P=K.toRaw(r.value).getValue(),H=GA(P,i.language);K.toRaw(r.value).setValue(H),g(H),n("update:modelValue",H),n("minify",H)}catch(P){console.error("代码压缩失败:",P)}},I=()=>{if(!r.value)return;const P=K.toRaw(r.value).getValue();n("save",P)};return e({format:()=>{T()},minify:()=>{b()},getValue:()=>r.value?K.toRaw(r.value).getValue():"",setValue:P=>{r.value&&K.toRaw(r.value).setValue(P||"")},refresh:()=>{K.nextTick(()=>{r.value&&K.toRaw(r.value).layout()})},copyCode:m,downloadCode:_,toggleFullscreen:E,enterFullscreen:S,exitFullscreen:C,editor:r}),K.onBeforeUnmount(()=>{r.value&&K.toRaw(r.value).dispose()}),(P,H)=>(K.openBlock(),K.createElementBlock("div",{class:K.normalizeClass(["tuoyuan-code-editor",{"is-fullscreen":h.value}])},[P.showToolbar?(K.openBlock(),K.createElementBlock("div",dDe,[K.createElementVNode("div",cDe,[K.withDirectives(K.createElementVNode("select",{"onUpdate:modelValue":H[0]||(H[0]=q=>u.value=q),class:"tuoyuan-code-editor__select",title:"选择语言"},H[2]||(H[2]=[K.createElementVNode("option",{value:"javascript"},"JavaScript",-1),K.createElementVNode("option",{value:"json"},"JSON",-1),K.createElementVNode("option",{value:"sql"},"SQL",-1)]),512),[[K.vModelSelect,u.value]]),K.withDirectives(K.createElementVNode("select",{"onUpdate:modelValue":H[1]||(H[1]=q=>f.value=q),class:"tuoyuan-code-editor__select",title:"选择主题"},H[3]||(H[3]=[K.createElementVNode("option",{value:"vs"},"浅色主题",-1),K.createElementVNode("option",{value:"vs-dark"},"深色主题",-1),K.createElementVNode("option",{value:"hc-black"},"高对比度",-1)]),512),[[K.vModelSelect,f.value]])]),K.createElementVNode("div",hDe,[K.createElementVNode("button",{class:"tuoyuan-code-editor__btn tuoyuan-code-editor__btn--primary",onClick:T,disabled:P.readonly,title:"格式化代码"}," 美化代码 ",8,uDe),K.createElementVNode("button",{class:"tuoyuan-code-editor__btn",onClick:b,disabled:P.readonly,title:"压缩代码"}," 压缩代码 ",8,fDe)])])):K.createCommentVNode("",!0),K.createElementVNode("div",{ref_key:"containerRef",ref:s,class:"tuoyuan-code-editor__container"},null,512),K.createElementVNode("div",gDe,[K.createElementVNode("div",pDe,[K.createElementVNode("span",mDe,"Ln "+K.toDisplayString(a.value)+", Col "+K.toDisplayString(l.value),1),H[6]||(H[6]=K.createElementVNode("span",{class:"statusbar-separator"},"|",-1)),K.createElementVNode("span",_De,[H[4]||(H[4]=K.createElementVNode("span",{class:"statusbar-label"},"总行数",-1)),K.createElementVNode("span",EDe,K.toDisplayString(d.value),1)]),H[7]||(H[7]=K.createElementVNode("span",{class:"statusbar-separator"},"|",-1)),K.createElementVNode("span",SDe,[H[5]||(H[5]=K.createElementVNode("span",{class:"statusbar-label"},"字符数",-1)),K.createElementVNode("span",CDe,K.toDisplayString(c.value),1)])]),K.createElementVNode("div",vDe,[K.createElementVNode("button",{class:"statusbar-btn",onClick:I,title:"保存 (Ctrl+S)"},H[8]||(H[8]=[K.createElementVNode("span",{class:"statusbar-icon"},"💾",-1),K.createElementVNode("span",null,"保存代码",-1),K.createElementVNode("span",{class:"statusbar-shortcut"},"Ctrl + S",-1)])),H[9]||(H[9]=K.createElementVNode("span",{class:"statusbar-separator"},"|",-1)),K.createElementVNode("span",TDe,K.toDisplayString(P.language.toUpperCase()),1),H[10]||(H[10]=K.createElementVNode("span",{class:"statusbar-separator"},"|",-1)),H[11]||(H[11]=K.createElementVNode("span",{class:"statusbar-item"},"UTF-8",-1))])])],2))}}),zA=(o,e)=>{const t=o.__vccOpts||o;for(const[i,n]of e)t[i]=n;return t},IDe=zA(bDe,[["__scopeId","data-v-5a4cce36"]]),LDe={class:"javascript-editor"},RDe={key:0,class:"javascript-editor__toolbar"},ADe={class:"toolbar-right"},wDe=["disabled"],NDe=["disabled"],yDe=K.defineComponent({name:"JavascriptEditor",__name:"JavascriptEditor",props:{modelValue:{default:""},height:{default:"400px"},theme:{default:"vs-dark"},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},options:{default:()=>({})}},emits:["update:modelValue","change","blur","format","minify","save"],setup(o,{expose:e,emit:t}){K.useCssVars(S=>({"
|
|
1198
|
-
`).length,c.value=S.length},u=async()=>{if(!(!r.value||i.readonly))try{const S=K.toRaw(r.value).getValue(),C=await VA(S,"javascript");K.toRaw(r.value).setValue(C),n("update:modelValue",C),n("format",C)}catch(S){console.error("JavaScript 代码格式化失败:",S)}},f=()=>{if(!(!r.value||i.readonly))try{const S=K.toRaw(r.value).getValue(),C=GA(S,"javascript");K.toRaw(r.value).setValue(C),h(C),n("update:modelValue",C),n("minify",C)}catch(S){console.error("JavaScript 代码压缩失败:",S)}},g=()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();n("save",S)},m=()=>r.value?K.toRaw(r.value).getValue():"",_=S=>{r.value&&K.toRaw(r.value).setValue(S||"")},E=()=>{K.nextTick(()=>{r.value&&K.toRaw(r.value).layout()})};return K.onMounted(async()=>{s.value&&(await K.nextTick(),r.value=Ur.create(s.value,{value:i.modelValue||"",language:"javascript",theme:i.theme,readOnly:i.readonly,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:14,lineHeight:19,tabSize:2,fontFamily:'Consolas, Monaco, "Courier New", monospace',lineNumbers:"on",glyphMargin:!1,folding:!0,renderLineHighlight:"line",scrollbar:{verticalScrollbarSize:14,horizontalScrollbarSize:10},quickSuggestions:!1,suggestOnTriggerCharacters:!1,acceptSuggestionOnCommitCharacter:!1,tabCompletion:"off",wordBasedSuggestions:"off",parameterHints:{enabled:!1},suggest:{showWords:!1,showMethods:!1,showFunctions:!1,showConstructors:!1,showFields:!1,showVariables:!1,showClasses:!1,showStructs:!1,showInterfaces:!1,showModules:!1,showProperties:!1,showEvents:!1,showOperators:!1,showUnits:!1,showValues:!1,showConstants:!1,showEnums:!1,showEnumMembers:!1,showKeywords:!1,showSnippets:!1},"semanticHighlighting.enabled":!1,...i.options}),h(i.modelValue||""),r.value.onDidChangeModelContent(()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();h(S),n("update:modelValue",S),n("change",S)}),r.value.onDidBlurEditorText(()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();n("blur",S)}),r.value.onDidChangeCursorPosition(S=>{a.value=S.position.lineNumber,l.value=S.position.column}),r.value.addCommand(Lv.CtrlCmd|Iv.KeyS,()=>{g()}))}),K.watch(()=>i.modelValue,S=>{if(!r.value)return;K.toRaw(r.value).getValue()!==S&&(K.toRaw(r.value).setValue(S||""),h(S||""))}),K.watch(()=>i.theme,S=>{r.value&&Ur.setTheme(S)}),K.watch(()=>i.readonly,S=>{r.value&&K.toRaw(r.value).updateOptions({readOnly:S})}),e({formatJavascript:u,minifyJavascript:f,saveJavascript:g,getValue:m,setValue:_,refresh:E,editor:r}),K.onBeforeUnmount(()=>{r.value&&K.toRaw(r.value).dispose()}),(S,C)=>(K.openBlock(),K.createElementBlock("div",LDe,[S.showToolbar?(K.openBlock(),K.createElementBlock("div",RDe,[C[0]||(C[0]=K.createElementVNode("div",{class:"toolbar-left"},null,-1)),K.createElementVNode("div",ADe,[K.createElementVNode("button",{class:"javascript-editor__btn javascript-editor__btn--primary",onClick:u,disabled:S.readonly,title:"格式化 JavaScript 代码"}," 美化代码 ",8,wDe),K.createElementVNode("button",{class:"javascript-editor__btn",onClick:f,disabled:S.readonly,title:"压缩 JavaScript 代码"}," 压缩代码 ",8,NDe)])])):K.createCommentVNode("",!0),K.createElementVNode("div",{ref_key:"containerRef",ref:s,class:"javascript-editor__container"},null,512)]))}}),DDe=zA(yDe,[["__scopeId","data-v-
|
|
1197
|
+
`).length,c.value=P.length},m=async()=>{if(!r.value)return!1;try{const P=K.toRaw(r.value).getValue();return await navigator.clipboard.writeText(P),n("copy",P),!0}catch(P){return console.error("复制失败:",P),!1}},_=P=>{if(!r.value)return;const H=K.toRaw(r.value).getValue(),q=new Blob([H],{type:"text/plain;charset=utf-8"}),ue=URL.createObjectURL(q),ve=document.createElement("a");if(!P){const _e={javascript:"js",json:"json",sql:"sql"}[i.language]||"txt";P=`code_${new Date().getTime()}.${_e}`}ve.href=ue,ve.download=P,document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),URL.revokeObjectURL(ue),n("download",H)},E=()=>{h.value=!h.value,setTimeout(()=>{r.value&&K.toRaw(r.value).layout()},300),n("fullscreen",h.value)},S=()=>{h.value||E()},C=()=>{h.value&&E()},v=P=>{P.key==="Escape"&&h.value&&E()};K.onMounted(()=>{window.addEventListener("keydown",v)}),K.onBeforeUnmount(()=>{window.removeEventListener("keydown",v)}),K.onMounted(async()=>{s.value&&(await K.nextTick(),r.value=Ur.create(s.value,{value:i.modelValue||"",language:i.language,theme:i.theme,readOnly:i.readonly,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:14,lineHeight:19,tabSize:2,fontFamily:'Consolas, Monaco, "Courier New", monospace',lineNumbers:"on",glyphMargin:!1,folding:!0,renderLineHighlight:"line",scrollbar:{verticalScrollbarSize:14,horizontalScrollbarSize:10},quickSuggestions:!1,suggestOnTriggerCharacters:!1,acceptSuggestionOnCommitCharacter:!1,tabCompletion:"off",wordBasedSuggestions:"off",parameterHints:{enabled:!1},suggest:{showWords:!1,showMethods:!1,showFunctions:!1,showConstructors:!1,showFields:!1,showVariables:!1,showClasses:!1,showStructs:!1,showInterfaces:!1,showModules:!1,showProperties:!1,showEvents:!1,showOperators:!1,showUnits:!1,showValues:!1,showConstants:!1,showEnums:!1,showEnumMembers:!1,showKeywords:!1,showSnippets:!1},"semanticHighlighting.enabled":!1,...i.options}),g(i.modelValue||""),r.value.onDidChangeModelContent(()=>{if(!r.value)return;const P=K.toRaw(r.value).getValue();g(P),n("update:modelValue",P),n("change",P)}),r.value.onDidBlurEditorText(()=>{if(!r.value)return;const P=K.toRaw(r.value).getValue();n("blur",P)}),r.value.onDidChangeCursorPosition(P=>{a.value=P.position.lineNumber,l.value=P.position.column}),r.value.addCommand(Lv.CtrlCmd|Iv.KeyS,()=>{I()}))}),K.watch(()=>i.modelValue,P=>{if(!r.value)return;K.toRaw(r.value).getValue()!==P&&(K.toRaw(r.value).setValue(P||""),g(P||""))}),K.watch(()=>i.language,P=>{if(u.value=P,!r.value)return;const H=K.toRaw(r.value).getModel();H&&Ur.setModelLanguage(H,P)}),K.watch(()=>i.theme,P=>{f.value=P,Ur.setTheme(P)}),K.watch(u,P=>{if(!r.value)return;const H=K.toRaw(r.value).getModel();H&&Ur.setModelLanguage(H,P),n("update:language",P)}),K.watch(f,P=>{Ur.setTheme(P),n("update:theme",P)}),K.watch(()=>i.readonly,P=>{r.value&&K.toRaw(r.value).updateOptions({readOnly:P})});const T=async()=>{if(!(!r.value||i.readonly))try{const P=K.toRaw(r.value).getValue(),H=await VA(P,i.language);K.toRaw(r.value).setValue(H),n("update:modelValue",H),n("format",H)}catch(P){console.error("代码格式化失败:",P)}},b=()=>{if(!(!r.value||i.readonly))try{const P=K.toRaw(r.value).getValue(),H=GA(P,i.language);K.toRaw(r.value).setValue(H),g(H),n("update:modelValue",H),n("minify",H)}catch(P){console.error("代码压缩失败:",P)}},I=()=>{if(!r.value)return;const P=K.toRaw(r.value).getValue();n("save",P)};return e({format:()=>{T()},minify:()=>{b()},getValue:()=>r.value?K.toRaw(r.value).getValue():"",setValue:P=>{r.value&&K.toRaw(r.value).setValue(P||"")},refresh:()=>{K.nextTick(()=>{r.value&&K.toRaw(r.value).layout()})},copyCode:m,downloadCode:_,toggleFullscreen:E,enterFullscreen:S,exitFullscreen:C,editor:r}),K.onBeforeUnmount(()=>{r.value&&K.toRaw(r.value).dispose()}),(P,H)=>(K.openBlock(),K.createElementBlock("div",{class:K.normalizeClass(["tuoyuan-code-editor",{"is-fullscreen":h.value}])},[P.showToolbar?(K.openBlock(),K.createElementBlock("div",dDe,[K.createElementVNode("div",cDe,[K.withDirectives(K.createElementVNode("select",{"onUpdate:modelValue":H[0]||(H[0]=q=>u.value=q),class:"tuoyuan-code-editor__select",title:"选择语言"},H[2]||(H[2]=[K.createElementVNode("option",{value:"javascript"},"JavaScript",-1),K.createElementVNode("option",{value:"json"},"JSON",-1),K.createElementVNode("option",{value:"sql"},"SQL",-1)]),512),[[K.vModelSelect,u.value]]),K.withDirectives(K.createElementVNode("select",{"onUpdate:modelValue":H[1]||(H[1]=q=>f.value=q),class:"tuoyuan-code-editor__select",title:"选择主题"},H[3]||(H[3]=[K.createElementVNode("option",{value:"vs"},"浅色主题",-1),K.createElementVNode("option",{value:"vs-dark"},"深色主题",-1),K.createElementVNode("option",{value:"hc-black"},"高对比度",-1)]),512),[[K.vModelSelect,f.value]])]),K.createElementVNode("div",hDe,[K.createElementVNode("button",{class:"tuoyuan-code-editor__btn tuoyuan-code-editor__btn--primary",onClick:T,disabled:P.readonly,title:"格式化代码"}," 美化代码 ",8,uDe),K.createElementVNode("button",{class:"tuoyuan-code-editor__btn",onClick:b,disabled:P.readonly,title:"压缩代码"}," 压缩代码 ",8,fDe)])])):K.createCommentVNode("",!0),K.createElementVNode("div",{ref_key:"containerRef",ref:s,class:"tuoyuan-code-editor__container"},null,512),K.createElementVNode("div",gDe,[K.createElementVNode("div",pDe,[K.createElementVNode("span",mDe,"Ln "+K.toDisplayString(a.value)+", Col "+K.toDisplayString(l.value),1),H[6]||(H[6]=K.createElementVNode("span",{class:"statusbar-separator"},"|",-1)),K.createElementVNode("span",_De,[H[4]||(H[4]=K.createElementVNode("span",{class:"statusbar-label"},"总行数",-1)),K.createElementVNode("span",EDe,K.toDisplayString(d.value),1)]),H[7]||(H[7]=K.createElementVNode("span",{class:"statusbar-separator"},"|",-1)),K.createElementVNode("span",SDe,[H[5]||(H[5]=K.createElementVNode("span",{class:"statusbar-label"},"字符数",-1)),K.createElementVNode("span",CDe,K.toDisplayString(c.value),1)])]),K.createElementVNode("div",vDe,[K.createElementVNode("button",{class:"statusbar-btn",onClick:I,title:"保存 (Ctrl+S)"},H[8]||(H[8]=[K.createElementVNode("span",{class:"statusbar-icon"},"💾",-1),K.createElementVNode("span",null,"保存代码",-1),K.createElementVNode("span",{class:"statusbar-shortcut"},"Ctrl + S",-1)])),H[9]||(H[9]=K.createElementVNode("span",{class:"statusbar-separator"},"|",-1)),K.createElementVNode("span",TDe,K.toDisplayString(P.language.toUpperCase()),1),H[10]||(H[10]=K.createElementVNode("span",{class:"statusbar-separator"},"|",-1)),H[11]||(H[11]=K.createElementVNode("span",{class:"statusbar-item"},"UTF-8",-1))])])],2))}}),zA=(o,e)=>{const t=o.__vccOpts||o;for(const[i,n]of e)t[i]=n;return t},IDe=zA(bDe,[["__scopeId","data-v-5a4cce36"]]),LDe={class:"javascript-editor"},RDe={key:0,class:"javascript-editor__toolbar"},ADe={class:"toolbar-right"},wDe=["disabled"],NDe=["disabled"],yDe=K.defineComponent({name:"JavascriptEditor",__name:"JavascriptEditor",props:{modelValue:{default:""},height:{default:"400px"},width:{default:"100%"},theme:{default:"vs-dark"},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},options:{default:()=>({})}},emits:["update:modelValue","change","blur","format","minify","save"],setup(o,{expose:e,emit:t}){K.useCssVars(S=>({"183cd378":S.height,"4befdd55":S.width}));const i=o,n=t,s=K.ref(null),r=K.ref(null),a=K.ref(1),l=K.ref(1),d=K.ref(0),c=K.ref(0),h=S=>{d.value=S.split(`
|
|
1198
|
+
`).length,c.value=S.length},u=async()=>{if(!(!r.value||i.readonly))try{const S=K.toRaw(r.value).getValue(),C=await VA(S,"javascript");K.toRaw(r.value).setValue(C),n("update:modelValue",C),n("format",C)}catch(S){console.error("JavaScript 代码格式化失败:",S)}},f=()=>{if(!(!r.value||i.readonly))try{const S=K.toRaw(r.value).getValue(),C=GA(S,"javascript");K.toRaw(r.value).setValue(C),h(C),n("update:modelValue",C),n("minify",C)}catch(S){console.error("JavaScript 代码压缩失败:",S)}},g=()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();n("save",S)},m=()=>r.value?K.toRaw(r.value).getValue():"",_=S=>{r.value&&K.toRaw(r.value).setValue(S||"")},E=()=>{K.nextTick(()=>{r.value&&K.toRaw(r.value).layout()})};return K.onMounted(async()=>{s.value&&(await K.nextTick(),r.value=Ur.create(s.value,{value:i.modelValue||"",language:"javascript",theme:i.theme,readOnly:i.readonly,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:14,lineHeight:19,tabSize:2,fontFamily:'Consolas, Monaco, "Courier New", monospace',lineNumbers:"on",glyphMargin:!1,folding:!0,renderLineHighlight:"line",scrollbar:{verticalScrollbarSize:14,horizontalScrollbarSize:10},quickSuggestions:!1,suggestOnTriggerCharacters:!1,acceptSuggestionOnCommitCharacter:!1,tabCompletion:"off",wordBasedSuggestions:"off",parameterHints:{enabled:!1},suggest:{showWords:!1,showMethods:!1,showFunctions:!1,showConstructors:!1,showFields:!1,showVariables:!1,showClasses:!1,showStructs:!1,showInterfaces:!1,showModules:!1,showProperties:!1,showEvents:!1,showOperators:!1,showUnits:!1,showValues:!1,showConstants:!1,showEnums:!1,showEnumMembers:!1,showKeywords:!1,showSnippets:!1},"semanticHighlighting.enabled":!1,...i.options}),h(i.modelValue||""),r.value.onDidChangeModelContent(()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();h(S),n("update:modelValue",S),n("change",S)}),r.value.onDidBlurEditorText(()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();n("blur",S)}),r.value.onDidChangeCursorPosition(S=>{a.value=S.position.lineNumber,l.value=S.position.column}),r.value.addCommand(Lv.CtrlCmd|Iv.KeyS,()=>{g()}))}),K.watch(()=>i.modelValue,S=>{if(!r.value)return;K.toRaw(r.value).getValue()!==S&&(K.toRaw(r.value).setValue(S||""),h(S||""))}),K.watch(()=>i.theme,S=>{r.value&&Ur.setTheme(S)}),K.watch(()=>i.readonly,S=>{r.value&&K.toRaw(r.value).updateOptions({readOnly:S})}),e({formatJavascript:u,minifyJavascript:f,saveJavascript:g,getValue:m,setValue:_,refresh:E,editor:r}),K.onBeforeUnmount(()=>{r.value&&K.toRaw(r.value).dispose()}),(S,C)=>(K.openBlock(),K.createElementBlock("div",LDe,[S.showToolbar?(K.openBlock(),K.createElementBlock("div",RDe,[C[0]||(C[0]=K.createElementVNode("div",{class:"toolbar-left"},null,-1)),K.createElementVNode("div",ADe,[K.createElementVNode("button",{class:"javascript-editor__btn javascript-editor__btn--primary",onClick:u,disabled:S.readonly,title:"格式化 JavaScript 代码"}," 美化代码 ",8,wDe),K.createElementVNode("button",{class:"javascript-editor__btn",onClick:f,disabled:S.readonly,title:"压缩 JavaScript 代码"}," 压缩代码 ",8,NDe)])])):K.createCommentVNode("",!0),K.createElementVNode("div",{ref_key:"containerRef",ref:s,class:"javascript-editor__container"},null,512)]))}}),DDe=zA(yDe,[["__scopeId","data-v-595f0897"]]),ODe={class:"json-editor"},xDe={key:0,class:"json-editor__toolbar"},MDe={class:"toolbar-right"},PDe=["disabled"],kDe=["disabled"],FDe=K.defineComponent({name:"JsonEditor",__name:"JsonEditor",props:{modelValue:{default:""},height:{default:"400px"},width:{default:"100%"},theme:{default:"vs-dark"},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},options:{default:()=>({})}},emits:["update:modelValue","change","blur","format","minify","save","validate"],setup(o,{expose:e,emit:t}){K.useCssVars(v=>({"4a566bb5":v.height,"6653c978":v.width}));const i=o,n=t,s=K.ref(null),r=K.ref(null),a=K.ref(1),l=K.ref(1),d=K.ref(0),c=K.ref(0),h=K.ref(!0),u=v=>{d.value=v.split(`
|
|
1199
1199
|
`).length,c.value=v.length;try{v.trim()&&(JSON.parse(v),h.value=!0)}catch{h.value=!1}},f=async()=>{if(!(!r.value||i.readonly))try{const v=K.toRaw(r.value).getValue(),T=await VA(v,"json");K.toRaw(r.value).setValue(T),n("update:modelValue",T),n("format",T)}catch(v){console.error("JSON 代码格式化失败:",v)}},g=()=>{if(!(!r.value||i.readonly))try{const v=K.toRaw(r.value).getValue(),T=GA(v,"json");K.toRaw(r.value).setValue(T),u(T),n("update:modelValue",T),n("minify",T)}catch(v){console.error("JSON 代码压缩失败:",v)}},m=()=>{if(!r.value)return!1;try{const v=K.toRaw(r.value).getValue();return v.trim()?(JSON.parse(v),h.value=!0,n("validate",!0),alert("✅ JSON 格式正确"),!0):(n("validate",!0),!0)}catch(v){return h.value=!1,n("validate",!1,v.message),alert(`❌ JSON 格式错误:
|
|
1200
|
-
${v.message}`),!1}},_=()=>{if(!r.value)return;const v=K.toRaw(r.value).getValue();n("save",v)},E=()=>r.value?K.toRaw(r.value).getValue():"",S=v=>{r.value&&K.toRaw(r.value).setValue(v||"")},C=()=>{K.nextTick(()=>{r.value&&K.toRaw(r.value).layout()})};return K.onMounted(async()=>{s.value&&(await K.nextTick(),r.value=Ur.create(s.value,{value:i.modelValue||"",language:"json",theme:i.theme,readOnly:i.readonly,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:14,lineHeight:19,tabSize:2,fontFamily:'Consolas, Monaco, "Courier New", monospace',lineNumbers:"on",glyphMargin:!1,folding:!0,renderLineHighlight:"line",scrollbar:{verticalScrollbarSize:14,horizontalScrollbarSize:10},quickSuggestions:!1,suggestOnTriggerCharacters:!1,acceptSuggestionOnCommitCharacter:!1,tabCompletion:"off",wordBasedSuggestions:"off",parameterHints:{enabled:!1},suggest:{showWords:!1,showMethods:!1,showFunctions:!1,showConstructors:!1,showFields:!1,showVariables:!1,showClasses:!1,showStructs:!1,showInterfaces:!1,showModules:!1,showProperties:!1,showEvents:!1,showOperators:!1,showUnits:!1,showValues:!1,showConstants:!1,showEnums:!1,showEnumMembers:!1,showKeywords:!1,showSnippets:!1},"semanticHighlighting.enabled":!1,...i.options}),u(i.modelValue||""),r.value.onDidChangeModelContent(()=>{if(!r.value)return;const v=K.toRaw(r.value).getValue();u(v),n("update:modelValue",v),n("change",v)}),r.value.onDidBlurEditorText(()=>{if(!r.value)return;const v=K.toRaw(r.value).getValue();n("blur",v)}),r.value.onDidChangeCursorPosition(v=>{a.value=v.position.lineNumber,l.value=v.position.column}),r.value.addCommand(Lv.CtrlCmd|Iv.KeyS,()=>{_()}))}),K.watch(()=>i.modelValue,v=>{if(!r.value)return;K.toRaw(r.value).getValue()!==v&&(K.toRaw(r.value).setValue(v||""),u(v||""))}),K.watch(()=>i.theme,v=>{r.value&&Ur.setTheme(v)}),K.watch(()=>i.readonly,v=>{r.value&&K.toRaw(r.value).updateOptions({readOnly:v})}),e({formatJson:f,minifyJson:g,validateJson:m,saveJson:_,getValue:E,setValue:S,refresh:C,editor:r}),K.onBeforeUnmount(()=>{r.value&&K.toRaw(r.value).dispose()}),(v,T)=>(K.openBlock(),K.createElementBlock("div",ODe,[v.showToolbar?(K.openBlock(),K.createElementBlock("div",xDe,[T[0]||(T[0]=K.createElementVNode("div",{class:"toolbar-left"},null,-1)),K.createElementVNode("div",MDe,[K.createElementVNode("button",{class:"json-editor__btn json-editor__btn--primary",onClick:f,disabled:v.readonly,title:"格式化 JSON 代码"}," 美化代码 ",8,PDe),K.createElementVNode("button",{class:"json-editor__btn",onClick:g,disabled:v.readonly,title:"压缩 JSON 代码"}," 压缩代码 ",8,kDe)])])):K.createCommentVNode("",!0),K.createElementVNode("div",{ref_key:"containerRef",ref:s,class:"json-editor__container"},null,512)]))}}),BDe=zA(FDe,[["__scopeId","data-v-
|
|
1201
|
-
`).length,c.value=S.length},u=async()=>{if(!(!r.value||i.readonly))try{const S=K.toRaw(r.value).getValue(),C=await VA(S,"sql");K.toRaw(r.value).setValue(C),n("update:modelValue",C),n("format",C)}catch(S){console.error("SQL 代码格式化失败:",S)}},f=()=>{if(!(!r.value||i.readonly))try{const S=K.toRaw(r.value).getValue(),C=GA(S,"sql");K.toRaw(r.value).setValue(C),h(C),n("update:modelValue",C),n("minify",C)}catch(S){console.error("SQL 代码压缩失败:",S)}},g=()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();n("save",S)},m=()=>r.value?K.toRaw(r.value).getValue():"",_=S=>{r.value&&K.toRaw(r.value).setValue(S||"")},E=()=>{K.nextTick(()=>{r.value&&K.toRaw(r.value).layout()})};return K.onMounted(async()=>{s.value&&(await K.nextTick(),r.value=Ur.create(s.value,{value:i.modelValue||"",language:"sql",theme:i.theme,readOnly:i.readonly,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:14,lineHeight:19,tabSize:2,fontFamily:'Consolas, Monaco, "Courier New", monospace',lineNumbers:"on",glyphMargin:!1,folding:!0,renderLineHighlight:"line",scrollbar:{verticalScrollbarSize:14,horizontalScrollbarSize:10},quickSuggestions:!1,suggestOnTriggerCharacters:!1,acceptSuggestionOnCommitCharacter:!1,tabCompletion:"off",wordBasedSuggestions:"off",parameterHints:{enabled:!1},suggest:{showWords:!1,showMethods:!1,showFunctions:!1,showConstructors:!1,showFields:!1,showVariables:!1,showClasses:!1,showStructs:!1,showInterfaces:!1,showModules:!1,showProperties:!1,showEvents:!1,showOperators:!1,showUnits:!1,showValues:!1,showConstants:!1,showEnums:!1,showEnumMembers:!1,showKeywords:!1,showSnippets:!1},"semanticHighlighting.enabled":!1,...i.options}),h(i.modelValue||""),r.value.onDidChangeModelContent(()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();h(S),n("update:modelValue",S),n("change",S)}),r.value.onDidBlurEditorText(()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();n("blur",S)}),r.value.onDidChangeCursorPosition(S=>{a.value=S.position.lineNumber,l.value=S.position.column}),r.value.addCommand(Lv.CtrlCmd|Iv.KeyS,()=>{g()}))}),K.watch(()=>i.modelValue,S=>{if(!r.value)return;K.toRaw(r.value).getValue()!==S&&(K.toRaw(r.value).setValue(S||""),h(S||""))}),K.watch(()=>i.theme,S=>{r.value&&Ur.setTheme(S)}),K.watch(()=>i.readonly,S=>{r.value&&K.toRaw(r.value).updateOptions({readOnly:S})}),e({formatSql:u,minifySql:f,saveSql:g,getValue:m,setValue:_,refresh:E,editor:r}),K.onBeforeUnmount(()=>{r.value&&K.toRaw(r.value).dispose()}),(S,C)=>(K.openBlock(),K.createElementBlock("div",HDe,[S.showToolbar?(K.openBlock(),K.createElementBlock("div",WDe,[C[0]||(C[0]=K.createElementVNode("div",{class:"toolbar-left"},null,-1)),K.createElementVNode("div",UDe,[K.createElementVNode("button",{class:"sql-editor__btn sql-editor__btn--primary",onClick:u,disabled:S.readonly,title:"格式化 SQL 代码"}," 美化代码 ",8,VDe),K.createElementVNode("button",{class:"sql-editor__btn",onClick:f,disabled:S.readonly,title:"压缩 SQL 代码"}," 压缩代码 ",8,GDe)])])):K.createCommentVNode("",!0),K.createElementVNode("div",{ref_key:"containerRef",ref:s,class:"sql-editor__container"},null,512)]))}}),$De=zA(zDe,[["__scopeId","data-v-
|
|
1200
|
+
${v.message}`),!1}},_=()=>{if(!r.value)return;const v=K.toRaw(r.value).getValue();n("save",v)},E=()=>r.value?K.toRaw(r.value).getValue():"",S=v=>{r.value&&K.toRaw(r.value).setValue(v||"")},C=()=>{K.nextTick(()=>{r.value&&K.toRaw(r.value).layout()})};return K.onMounted(async()=>{s.value&&(await K.nextTick(),r.value=Ur.create(s.value,{value:i.modelValue||"",language:"json",theme:i.theme,readOnly:i.readonly,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:14,lineHeight:19,tabSize:2,fontFamily:'Consolas, Monaco, "Courier New", monospace',lineNumbers:"on",glyphMargin:!1,folding:!0,renderLineHighlight:"line",scrollbar:{verticalScrollbarSize:14,horizontalScrollbarSize:10},quickSuggestions:!1,suggestOnTriggerCharacters:!1,acceptSuggestionOnCommitCharacter:!1,tabCompletion:"off",wordBasedSuggestions:"off",parameterHints:{enabled:!1},suggest:{showWords:!1,showMethods:!1,showFunctions:!1,showConstructors:!1,showFields:!1,showVariables:!1,showClasses:!1,showStructs:!1,showInterfaces:!1,showModules:!1,showProperties:!1,showEvents:!1,showOperators:!1,showUnits:!1,showValues:!1,showConstants:!1,showEnums:!1,showEnumMembers:!1,showKeywords:!1,showSnippets:!1},"semanticHighlighting.enabled":!1,...i.options}),u(i.modelValue||""),r.value.onDidChangeModelContent(()=>{if(!r.value)return;const v=K.toRaw(r.value).getValue();u(v),n("update:modelValue",v),n("change",v)}),r.value.onDidBlurEditorText(()=>{if(!r.value)return;const v=K.toRaw(r.value).getValue();n("blur",v)}),r.value.onDidChangeCursorPosition(v=>{a.value=v.position.lineNumber,l.value=v.position.column}),r.value.addCommand(Lv.CtrlCmd|Iv.KeyS,()=>{_()}))}),K.watch(()=>i.modelValue,v=>{if(!r.value)return;K.toRaw(r.value).getValue()!==v&&(K.toRaw(r.value).setValue(v||""),u(v||""))}),K.watch(()=>i.theme,v=>{r.value&&Ur.setTheme(v)}),K.watch(()=>i.readonly,v=>{r.value&&K.toRaw(r.value).updateOptions({readOnly:v})}),e({formatJson:f,minifyJson:g,validateJson:m,saveJson:_,getValue:E,setValue:S,refresh:C,editor:r}),K.onBeforeUnmount(()=>{r.value&&K.toRaw(r.value).dispose()}),(v,T)=>(K.openBlock(),K.createElementBlock("div",ODe,[v.showToolbar?(K.openBlock(),K.createElementBlock("div",xDe,[T[0]||(T[0]=K.createElementVNode("div",{class:"toolbar-left"},null,-1)),K.createElementVNode("div",MDe,[K.createElementVNode("button",{class:"json-editor__btn json-editor__btn--primary",onClick:f,disabled:v.readonly,title:"格式化 JSON 代码"}," 美化代码 ",8,PDe),K.createElementVNode("button",{class:"json-editor__btn",onClick:g,disabled:v.readonly,title:"压缩 JSON 代码"}," 压缩代码 ",8,kDe)])])):K.createCommentVNode("",!0),K.createElementVNode("div",{ref_key:"containerRef",ref:s,class:"json-editor__container"},null,512)]))}}),BDe=zA(FDe,[["__scopeId","data-v-38e09abb"]]),HDe={class:"sql-editor"},WDe={key:0,class:"sql-editor__toolbar"},UDe={class:"toolbar-right"},VDe=["disabled"],GDe=["disabled"],zDe=K.defineComponent({name:"SqlEditor",__name:"SqlEditor",props:{modelValue:{default:""},height:{default:"400px"},width:{default:"100%"},theme:{default:"vs-dark"},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},options:{default:()=>({})}},emits:["update:modelValue","change","blur","format","minify","save"],setup(o,{expose:e,emit:t}){K.useCssVars(S=>({"3b13bceb":S.height,"7ea70cfc":S.width}));const i=o,n=t,s=K.ref(null),r=K.ref(null),a=K.ref(1),l=K.ref(1),d=K.ref(0),c=K.ref(0),h=S=>{d.value=S.split(`
|
|
1201
|
+
`).length,c.value=S.length},u=async()=>{if(!(!r.value||i.readonly))try{const S=K.toRaw(r.value).getValue(),C=await VA(S,"sql");K.toRaw(r.value).setValue(C),n("update:modelValue",C),n("format",C)}catch(S){console.error("SQL 代码格式化失败:",S)}},f=()=>{if(!(!r.value||i.readonly))try{const S=K.toRaw(r.value).getValue(),C=GA(S,"sql");K.toRaw(r.value).setValue(C),h(C),n("update:modelValue",C),n("minify",C)}catch(S){console.error("SQL 代码压缩失败:",S)}},g=()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();n("save",S)},m=()=>r.value?K.toRaw(r.value).getValue():"",_=S=>{r.value&&K.toRaw(r.value).setValue(S||"")},E=()=>{K.nextTick(()=>{r.value&&K.toRaw(r.value).layout()})};return K.onMounted(async()=>{s.value&&(await K.nextTick(),r.value=Ur.create(s.value,{value:i.modelValue||"",language:"sql",theme:i.theme,readOnly:i.readonly,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:14,lineHeight:19,tabSize:2,fontFamily:'Consolas, Monaco, "Courier New", monospace',lineNumbers:"on",glyphMargin:!1,folding:!0,renderLineHighlight:"line",scrollbar:{verticalScrollbarSize:14,horizontalScrollbarSize:10},quickSuggestions:!1,suggestOnTriggerCharacters:!1,acceptSuggestionOnCommitCharacter:!1,tabCompletion:"off",wordBasedSuggestions:"off",parameterHints:{enabled:!1},suggest:{showWords:!1,showMethods:!1,showFunctions:!1,showConstructors:!1,showFields:!1,showVariables:!1,showClasses:!1,showStructs:!1,showInterfaces:!1,showModules:!1,showProperties:!1,showEvents:!1,showOperators:!1,showUnits:!1,showValues:!1,showConstants:!1,showEnums:!1,showEnumMembers:!1,showKeywords:!1,showSnippets:!1},"semanticHighlighting.enabled":!1,...i.options}),h(i.modelValue||""),r.value.onDidChangeModelContent(()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();h(S),n("update:modelValue",S),n("change",S)}),r.value.onDidBlurEditorText(()=>{if(!r.value)return;const S=K.toRaw(r.value).getValue();n("blur",S)}),r.value.onDidChangeCursorPosition(S=>{a.value=S.position.lineNumber,l.value=S.position.column}),r.value.addCommand(Lv.CtrlCmd|Iv.KeyS,()=>{g()}))}),K.watch(()=>i.modelValue,S=>{if(!r.value)return;K.toRaw(r.value).getValue()!==S&&(K.toRaw(r.value).setValue(S||""),h(S||""))}),K.watch(()=>i.theme,S=>{r.value&&Ur.setTheme(S)}),K.watch(()=>i.readonly,S=>{r.value&&K.toRaw(r.value).updateOptions({readOnly:S})}),e({formatSql:u,minifySql:f,saveSql:g,getValue:m,setValue:_,refresh:E,editor:r}),K.onBeforeUnmount(()=>{r.value&&K.toRaw(r.value).dispose()}),(S,C)=>(K.openBlock(),K.createElementBlock("div",HDe,[S.showToolbar?(K.openBlock(),K.createElementBlock("div",WDe,[C[0]||(C[0]=K.createElementVNode("div",{class:"toolbar-left"},null,-1)),K.createElementVNode("div",UDe,[K.createElementVNode("button",{class:"sql-editor__btn sql-editor__btn--primary",onClick:u,disabled:S.readonly,title:"格式化 SQL 代码"}," 美化代码 ",8,VDe),K.createElementVNode("button",{class:"sql-editor__btn",onClick:f,disabled:S.readonly,title:"压缩 SQL 代码"}," 压缩代码 ",8,GDe)])])):K.createCommentVNode("",!0),K.createElementVNode("div",{ref_key:"containerRef",ref:s,class:"sql-editor__container"},null,512)]))}}),$De=zA(zDe,[["__scopeId","data-v-51b2dd57"]]);exports.CodeEditor=IDe;exports.JavascriptEditor=DDe;exports.JsonEditor=BDe;exports.SqlEditor=$De;exports.monaco_editor_core_star=n_;exports.typescriptDefaults=Y2;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./index-DBy21Q0J.cjs");exports.CodeEditor=o.CodeEditor;exports.JavascriptEditor=o.JavascriptEditor;exports.JsonEditor=o.JsonEditor;exports.SqlEditor=o.SqlEditor;exports.default=o.CodeEditor;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { conf as t, language as e } from "./typescript-
|
|
1
|
+
import { conf as t, language as e } from "./typescript-CYPxqy7s.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./typescript-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./typescript-DdqYMZZo.cjs");/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as Et } from "./index-
|
|
1
|
+
import { m as Et } from "./index-CLA4iUSf.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jt=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jt=require("./index-DBy21Q0J.cjs");/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as l } from "./index-
|
|
1
|
+
import { m as l } from "./index-CLA4iUSf.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-DBy21Q0J.cjs");/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as s } from "./index-
|
|
1
|
+
import { m as s } from "./index-CLA4iUSf.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|