@arcgis/coding-components 4.31.5 → 4.31.6
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/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +1 -1
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-f627e723.js → p-0e1fbd8a.js} +1 -1
- package/dist/arcgis-coding-components/{p-255cb727.entry.js → p-23c494e7.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-3fb08b49.js → p-3407848d.js} +1 -1
- package/dist/arcgis-coding-components/{p-03bf19d2.js → p-4ae6ac05.js} +2 -2
- package/dist/arcgis-coding-components/{p-0914e437.js → p-53e3b4ac.js} +2 -2
- package/dist/arcgis-coding-components/{p-a6b682c4.entry.js → p-66fcf2fd.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-199ba340.entry.js → p-734becde.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-daf061ab.js → p-73844468.js} +2 -2
- package/dist/arcgis-coding-components/{p-aa99056d.js → p-82a15bcf.js} +2 -2
- package/dist/arcgis-coding-components/{p-b1f96803.js → p-8e2a8522.js} +2 -2
- package/dist/arcgis-coding-components/{p-bfc1bca8.js → p-98b3a749.js} +10 -10
- package/dist/arcgis-coding-components/{p-a4f29db0.js → p-9a87e0be.js} +2 -2
- package/dist/arcgis-coding-components/{p-a8bca87a.js → p-a2967dd6.js} +1 -1
- package/dist/arcgis-coding-components/{p-f4d57e7f.js → p-a49b800e.js} +2 -2
- package/dist/arcgis-coding-components/{p-398c21cf.js → p-d18fab08.js} +3 -3
- package/dist/arcgis-coding-components/{p-1101b0e4.js → p-e33e73c7.js} +2 -2
- package/dist/arcgis-coding-components/{p-0395fbb3.js → p-e9ae57c5.js} +2 -2
- package/dist/arcgis-coding-components/{p-ac06d96a.js → p-f81d34bb.js} +2 -2
- package/dist/cjs/{app-globals-6f525f70.js → app-globals-2c54b2b6.js} +1 -1
- package/dist/cjs/{arcade-defaults-c1f0857c.js → arcade-defaults-eebcc938.js} +3 -3
- package/dist/cjs/{arcade-mode-58825bba.js → arcade-mode-be827eb4.js} +3 -3
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-6b94c5fd.js → css-14a24649.js} +1 -1
- package/dist/cjs/{cssMode-ce367250.js → cssMode-9fa64d31.js} +3 -3
- package/dist/cjs/{html-e43436b1.js → html-e1c07d55.js} +3 -3
- package/dist/cjs/{htmlMode-dd65c4cb.js → htmlMode-3e701990.js} +3 -3
- package/dist/cjs/{index-a193f422.js → index-8eb4e2d1.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-1cae57eb.js → javascript-95a0b242.js} +4 -4
- package/dist/cjs/{jsonMode-37c1dfcd.js → jsonMode-f6fa032f.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-c6bd0d1b.js → sql-expr-defaults-508276bc.js} +10 -10
- package/dist/cjs/{sql-expr-mode-6a98f850.js → sql-expr-mode-8a1c9f15.js} +3 -3
- package/dist/cjs/{tsMode-ca34d120.js → tsMode-0994fa26.js} +3 -3
- package/dist/cjs/{typescript-afa63033.js → typescript-297b72e8.js} +3 -3
- package/dist/cjs/{useT9n-2e938278.js → useT9n-d3c22597.js} +3 -3
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +1 -1
- package/dist/components/arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +1 -1
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/arcgis-editor-variables.js +1 -1
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +1 -1
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/chunk-UFIZBDFE.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/editor-variables.js +1 -1
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/language-api-panel.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1 -1
- package/dist/components/sql-expr-mode.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-8c223bb3.js → app-globals-016737a8.js} +1 -1
- package/dist/esm/{arcade-defaults-8b60f649.js → arcade-defaults-8895ea07.js} +3 -3
- package/dist/esm/{arcade-mode-5bece6a4.js → arcade-mode-3502091e.js} +3 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +7 -7
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-e0a3902d.js → css-33ba16f7.js} +1 -1
- package/dist/esm/{cssMode-a882cbe6.js → cssMode-4afc8a45.js} +3 -3
- package/dist/esm/{html-dfd00b6f.js → html-0c302211.js} +3 -3
- package/dist/esm/{htmlMode-ac8bc52b.js → htmlMode-5e85eb85.js} +3 -3
- package/dist/esm/{index-862f6e02.js → index-07000579.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-b416aac7.js → javascript-d496a490.js} +4 -4
- package/dist/esm/{jsonMode-d349ad7e.js → jsonMode-5a0104ea.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-e2c7f032.js → sql-expr-defaults-68a11ad1.js} +10 -10
- package/dist/esm/{sql-expr-mode-41e80592.js → sql-expr-mode-14fb2806.js} +3 -3
- package/dist/esm/{tsMode-abbc733a.js → tsMode-de7e136d.js} +3 -3
- package/dist/esm/{typescript-6235d9d8.js → typescript-7de42909.js} +3 -3
- package/dist/esm/{useT9n-f0fb04ee.js → useT9n-66de25eb.js} +3 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/package.json +6 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
|
-
import{conf as e,language as t}from"./p-
|
|
6
|
+
import{conf as e,language as t}from"./p-4ae6ac05.js";import"./p-98b3a749.js";import"./p-3407848d.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
|
-
import{O as t}from"./p-
|
|
6
|
+
import{O as t}from"./p-98b3a749.js";import"./p-3407848d.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
|
-
import{O as t}from"./p-
|
|
6
|
+
import{O as t}from"./p-98b3a749.js";import"./p-3407848d.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
10
10
|
* Released under the MIT license
|
|
11
11
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
12
|
-
*-----------------------------------------------------------------------------*/var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,e=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(t,o,u,s)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let c of e(o))i.call(t,c)||c===u||r(t,c,{get:()=>o[c],enumerable:!(s=n(o,c))||s.enumerable});return t},u={};o(u,t,"default");var s,c,a,f,h,v,d,l,g,b,m,w,k,p,j,x,S,I,y,T,E,O,C,_,D,R,N,L,W,A,M,z,F,P,q,U,H,V,$,B,G,J,K,Q,X,Y,Z,tt,rt,nt=class{_defaults;_idleCheckInterval;_lastUsedTime;_configChangeListener;_worker;_client;constructor(t){this._defaults=t,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=u.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...t){let r;return this._getClient().then((t=>{r=t})).then((()=>{if(this._worker)return this._worker.withSyncedResources(t)})).then((()=>r))}};(c=s||(s={})).MIN_VALUE=-2147483648,c.MAX_VALUE=2147483647,(f=a||(a={})).MIN_VALUE=0,f.MAX_VALUE=2147483647,(v=h||(h={})).create=function(t,r){return t===Number.MAX_VALUE&&(t=a.MAX_VALUE),r===Number.MAX_VALUE&&(r=a.MAX_VALUE),{line:t,character:r}},v.is=function(t){var r=t;return nr.objectLiteral(r)&&nr.uinteger(r.line)&&nr.uinteger(r.character)},(l=d||(d={})).create=function(t,r,n,e){if(nr.uinteger(t)&&nr.uinteger(r)&&nr.uinteger(n)&&nr.uinteger(e))return{start:h.create(t,r),end:h.create(n,e)};if(h.is(t)&&h.is(r))return{start:t,end:r};throw new Error("Range#create called with invalid arguments["+t+", "+r+", "+n+", "+e+"]")},l.is=function(t){var r=t;return nr.objectLiteral(r)&&h.is(r.start)&&h.is(r.end)},(b=g||(g={})).create=function(t,r){return{uri:t,range:r}},b.is=function(t){var r=t;return nr.defined(r)&&d.is(r.range)&&(nr.string(r.uri)||nr.undefined(r.uri))},(w=m||(m={})).create=function(t,r,n,e){return{targetUri:t,targetRange:r,targetSelectionRange:n,originSelectionRange:e}},w.is=function(t){var r=t;return nr.defined(r)&&d.is(r.targetRange)&&nr.string(r.targetUri)&&(d.is(r.targetSelectionRange)||nr.undefined(r.targetSelectionRange))&&(d.is(r.originSelectionRange)||nr.undefined(r.originSelectionRange))},(p=k||(k={})).create=function(t,r,n,e){return{red:t,green:r,blue:n,alpha:e}},p.is=function(t){var r=t;return nr.numberRange(r.red,0,1)&&nr.numberRange(r.green,0,1)&&nr.numberRange(r.blue,0,1)&&nr.numberRange(r.alpha,0,1)},(x=j||(j={})).create=function(t,r){return{range:t,color:r}},x.is=function(t){var r=t;return d.is(r.range)&&k.is(r.color)},(I=S||(S={})).create=function(t,r,n){return{label:t,textEdit:r,additionalTextEdits:n}},I.is=function(t){var r=t;return nr.string(r.label)&&(nr.undefined(r.textEdit)||P.is(r))&&(nr.undefined(r.additionalTextEdits)||nr.typedArray(r.additionalTextEdits,P.is))},(T=y||(y={})).Comment="comment",T.Imports="imports",T.Region="region",(O=E||(E={})).create=function(t,r,n,e,i){var o={startLine:t,endLine:r};return nr.defined(n)&&(o.startCharacter=n),nr.defined(e)&&(o.endCharacter=e),nr.defined(i)&&(o.kind=i),o},O.is=function(t){var r=t;return nr.uinteger(r.startLine)&&nr.uinteger(r.startLine)&&(nr.undefined(r.startCharacter)||nr.uinteger(r.startCharacter))&&(nr.undefined(r.endCharacter)||nr.uinteger(r.endCharacter))&&(nr.undefined(r.kind)||nr.string(r.kind))},(_=C||(C={})).create=function(t,r){return{location:t,message:r}},_.is=function(t){var r=t;return nr.defined(r)&&g.is(r.location)&&nr.string(r.message)},(R=D||(D={})).Error=1,R.Warning=2,R.Information=3,R.Hint=4,(L=N||(N={})).Unnecessary=1,L.Deprecated=2,(W||(W={})).is=function(t){return null!=t&&nr.string(t.href)},(M=A||(A={})).create=function(t,r,n,e,i,o){var u={range:t,message:r};return nr.defined(n)&&(u.severity=n),nr.defined(e)&&(u.code=e),nr.defined(i)&&(u.source=i),nr.defined(o)&&(u.relatedInformation=o),u},M.is=function(t){var r,n=t;return nr.defined(n)&&d.is(n.range)&&nr.string(n.message)&&(nr.number(n.severity)||nr.undefined(n.severity))&&(nr.integer(n.code)||nr.string(n.code)||nr.undefined(n.code))&&(nr.undefined(n.codeDescription)||nr.string(null===(r=n.codeDescription)||void 0===r?void 0:r.href))&&(nr.string(n.source)||nr.undefined(n.source))&&(nr.undefined(n.relatedInformation)||nr.typedArray(n.relatedInformation,C.is))},(F=z||(z={})).create=function(t,r){for(var n=[],e=2;e<arguments.length;e++)n[e-2]=arguments[e];var i={title:t,command:r};return nr.defined(n)&&n.length>0&&(i.arguments=n),i},F.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.title)&&nr.string(r.command)},(q=P||(P={})).replace=function(t,r){return{range:t,newText:r}},q.insert=function(t,r){return{range:{start:t,end:t},newText:r}},q.del=function(t){return{range:t,newText:""}},q.is=function(t){var r=t;return nr.objectLiteral(r)&&nr.string(r.newText)&&d.is(r.range)},(H=U||(U={})).create=function(t,r,n){var e={label:t};return void 0!==r&&(e.needsConfirmation=r),void 0!==n&&(e.description=n),e},H.is=function(t){var r=t;return void 0!==r&&nr.objectLiteral(r)&&nr.string(r.label)&&(nr.boolean(r.needsConfirmation)||void 0===r.needsConfirmation)&&(nr.string(r.description)||void 0===r.description)},(V||(V={})).is=function(t){return"string"==typeof t},(B=$||($={})).replace=function(t,r,n){return{range:t,newText:r,annotationId:n}},B.insert=function(t,r,n){return{range:{start:t,end:t},newText:r,annotationId:n}},B.del=function(t,r){return{range:t,newText:"",annotationId:r}},B.is=function(t){var r=t;return P.is(r)&&(U.is(r.annotationId)||V.is(r.annotationId))},(J=G||(G={})).create=function(t,r){return{textDocument:t,edits:r}},J.is=function(t){var r=t;return nr.defined(r)&&st.is(r.textDocument)&&Array.isArray(r.edits)},(Q=K||(K={})).create=function(t,r,n){var e={kind:"create",uri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(e.options=r),void 0!==n&&(e.annotationId=n),e},Q.is=function(t){var r=t;return r&&"create"===r.kind&&nr.string(r.uri)&&(void 0===r.options||(void 0===r.options.overwrite||nr.boolean(r.options.overwrite))&&(void 0===r.options.ignoreIfExists||nr.boolean(r.options.ignoreIfExists)))&&(void 0===r.annotationId||V.is(r.annotationId))},(Y=X||(X={})).create=function(t,r,n,e){var i={kind:"rename",oldUri:t,newUri:r};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==e&&(i.annotationId=e),i},Y.is=function(t){var r=t;return r&&"rename"===r.kind&&nr.string(r.oldUri)&&nr.string(r.newUri)&&(void 0===r.options||(void 0===r.options.overwrite||nr.boolean(r.options.overwrite))&&(void 0===r.options.ignoreIfExists||nr.boolean(r.options.ignoreIfExists)))&&(void 0===r.annotationId||V.is(r.annotationId))},(tt=Z||(Z={})).create=function(t,r,n){var e={kind:"delete",uri:t};return void 0===r||void 0===r.recursive&&void 0===r.ignoreIfNotExists||(e.options=r),void 0!==n&&(e.annotationId=n),e},tt.is=function(t){var r=t;return r&&"delete"===r.kind&&nr.string(r.uri)&&(void 0===r.options||(void 0===r.options.recursive||nr.boolean(r.options.recursive))&&(void 0===r.options.ignoreIfNotExists||nr.boolean(r.options.ignoreIfNotExists)))&&(void 0===r.annotationId||V.is(r.annotationId))},(rt||(rt={})).is=function(t){return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(t){return nr.string(t.kind)?K.is(t)||X.is(t)||Z.is(t):G.is(t)})))};var et,it,ot,ut,st,ct,at,ft,ht,vt,dt,lt,gt,bt,mt,wt,kt,pt,jt,xt,St,It,yt,Tt,Et,Ot,Ct,_t,Dt,Rt,Nt,Lt,Wt,At,Mt,zt,Ft,Pt,qt,Ut,Ht,Vt,$t,Bt,Gt,Jt,Kt,Qt,Xt,Yt,Zt,tr=function(){function t(t,r){this.edits=t,this.changeAnnotations=r}return t.prototype.insert=function(t,r,n){var e,i;if(void 0===n?e=P.insert(t,r):V.is(n)?(i=n,e=$.insert(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),e=$.insert(t,r,i)),this.edits.push(e),void 0!==i)return i},t.prototype.replace=function(t,r,n){var e,i;if(void 0===n?e=P.replace(t,r):V.is(n)?(i=n,e=$.replace(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),e=$.replace(t,r,i)),this.edits.push(e),void 0!==i)return i},t.prototype.delete=function(t,r){var n,e;if(void 0===r?n=P.del(t):V.is(r)?(e=r,n=$.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(r),n=$.del(t,e)),this.edits.push(n),void 0!==e)return e},t.prototype.add=function(t){this.edits.push(t)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(t){if(void 0===t)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),rr=function(){function t(t){this._annotations=void 0===t?Object.create(null):t,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(t,r){var n;if(V.is(t)?n=t:(n=this.nextId(),r=t),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===r)throw new Error("No annotation provided for id "+n);return this._annotations[n]=r,this._size++,n},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}();!function(){function t(t){var r=this;this._textEditChanges=Object.create(null),void 0!==t?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new rr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach((function(t){if(G.is(t)){var n=new tr(t.edits,r._changeAnnotations);r._textEditChanges[t.textDocument.uri]=n}}))):t.changes&&Object.keys(t.changes).forEach((function(n){var e=new tr(t.changes[n]);r._textEditChanges[n]=e}))):this._workspaceEdit={}}Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(this._workspaceEdit.changeAnnotations=0===this._changeAnnotations.size?void 0:this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(t){if(st.is(t)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r={uri:t.uri,version:t.version};return(n=this._textEditChanges[r.uri])||(this._workspaceEdit.documentChanges.push({textDocument:r,edits:e=[]}),n=new tr(e,this._changeAnnotations),this._textEditChanges[r.uri]=n),n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n,e;return(n=this._textEditChanges[t])||(this._workspaceEdit.changes[t]=e=[],n=new tr(e),this._textEditChanges[t]=n),n},t.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new rr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var e,i,o;if(U.is(r)||V.is(r)?e=r:n=r,void 0===e?i=K.create(t,n):(o=V.is(e)?e:this._changeAnnotations.manage(e),i=K.create(t,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},t.prototype.renameFile=function(t,r,n,e){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,u;if(U.is(n)||V.is(n)?i=n:e=n,void 0===i?o=X.create(t,r,e):(u=V.is(i)?i:this._changeAnnotations.manage(i),o=X.create(t,r,e,u)),this._workspaceEdit.documentChanges.push(o),void 0!==u)return u},t.prototype.deleteFile=function(t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var e,i,o;if(U.is(r)||V.is(r)?e=r:n=r,void 0===e?i=Z.create(t,n):(o=V.is(e)?e:this._changeAnnotations.manage(e),i=Z.create(t,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}}(),(it=et||(et={})).create=function(t){return{uri:t}},it.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.uri)},(ut=ot||(ot={})).create=function(t,r){return{uri:t,version:r}},ut.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.uri)&&nr.integer(r.version)},(ct=st||(st={})).create=function(t,r){return{uri:t,version:r}},ct.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.uri)&&(null===r.version||nr.integer(r.version))},(ft=at||(at={})).create=function(t,r,n,e){return{uri:t,languageId:r,version:n,text:e}},ft.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.uri)&&nr.string(r.languageId)&&nr.integer(r.version)&&nr.string(r.text)},(vt=ht||(ht={})).PlainText="plaintext",vt.Markdown="markdown",function(t){t.is=function(r){return r===t.PlainText||r===t.Markdown}}(ht||(ht={})),(dt||(dt={})).is=function(t){var r=t;return nr.objectLiteral(t)&&ht.is(r.kind)&&nr.string(r.value)},(gt=lt||(lt={})).Text=1,gt.Method=2,gt.Function=3,gt.Constructor=4,gt.Field=5,gt.Variable=6,gt.Class=7,gt.Interface=8,gt.Module=9,gt.Property=10,gt.Unit=11,gt.Value=12,gt.Enum=13,gt.Keyword=14,gt.Snippet=15,gt.Color=16,gt.File=17,gt.Reference=18,gt.Folder=19,gt.EnumMember=20,gt.Constant=21,gt.Struct=22,gt.Event=23,gt.Operator=24,gt.TypeParameter=25,(mt=bt||(bt={})).PlainText=1,mt.Snippet=2,(wt||(wt={})).Deprecated=1,(pt=kt||(kt={})).create=function(t,r,n){return{newText:t,insert:r,replace:n}},pt.is=function(t){var r=t;return r&&nr.string(r.newText)&&d.is(r.insert)&&d.is(r.replace)},(xt=jt||(jt={})).asIs=1,xt.adjustIndentation=2,(St||(St={})).create=function(t){return{label:t}},(It||(It={})).create=function(t,r){return{items:t||[],isIncomplete:!!r}},(Tt=yt||(yt={})).fromPlainText=function(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},Tt.is=function(t){var r=t;return nr.string(r)||nr.objectLiteral(r)&&nr.string(r.language)&&nr.string(r.value)},(Et||(Et={})).is=function(t){var r=t;return!!r&&nr.objectLiteral(r)&&(dt.is(r.contents)||yt.is(r.contents)||nr.typedArray(r.contents,yt.is))&&(void 0===t.range||d.is(t.range))},(Ot||(Ot={})).create=function(t,r){return r?{label:t,documentation:r}:{label:t}},(Ct||(Ct={})).create=function(t,r){for(var n=[],e=2;e<arguments.length;e++)n[e-2]=arguments[e];var i={label:t};return nr.defined(r)&&(i.documentation=r),i.parameters=nr.defined(n)?n:[],i},(Dt=_t||(_t={})).Text=1,Dt.Read=2,Dt.Write=3,(Rt||(Rt={})).create=function(t,r){var n={range:t};return nr.number(r)&&(n.kind=r),n},(Lt=Nt||(Nt={})).File=1,Lt.Module=2,Lt.Namespace=3,Lt.Package=4,Lt.Class=5,Lt.Method=6,Lt.Property=7,Lt.Field=8,Lt.Constructor=9,Lt.Enum=10,Lt.Interface=11,Lt.Function=12,Lt.Variable=13,Lt.Constant=14,Lt.String=15,Lt.Number=16,Lt.Boolean=17,Lt.Array=18,Lt.Object=19,Lt.Key=20,Lt.Null=21,Lt.EnumMember=22,Lt.Struct=23,Lt.Event=24,Lt.Operator=25,Lt.TypeParameter=26,(Wt||(Wt={})).Deprecated=1,(At||(At={})).create=function(t,r,n,e,i){var o={name:t,kind:r,location:{uri:e,range:n}};return i&&(o.containerName=i),o},(zt=Mt||(Mt={})).create=function(t,r,n,e,i,o){var u={name:t,detail:r,kind:n,range:e,selectionRange:i};return void 0!==o&&(u.children=o),u},zt.is=function(t){var r=t;return r&&nr.string(r.name)&&nr.number(r.kind)&&d.is(r.range)&&d.is(r.selectionRange)&&(void 0===r.detail||nr.string(r.detail))&&(void 0===r.deprecated||nr.boolean(r.deprecated))&&(void 0===r.children||Array.isArray(r.children))&&(void 0===r.tags||Array.isArray(r.tags))},(Pt=Ft||(Ft={})).Empty="",Pt.QuickFix="quickfix",Pt.Refactor="refactor",Pt.RefactorExtract="refactor.extract",Pt.RefactorInline="refactor.inline",Pt.RefactorRewrite="refactor.rewrite",Pt.Source="source",Pt.SourceOrganizeImports="source.organizeImports",Pt.SourceFixAll="source.fixAll",(Ut=qt||(qt={})).create=function(t,r){var n={diagnostics:t};return null!=r&&(n.only=r),n},Ut.is=function(t){var r=t;return nr.defined(r)&&nr.typedArray(r.diagnostics,A.is)&&(void 0===r.only||nr.typedArray(r.only,nr.string))},(Vt=Ht||(Ht={})).create=function(t,r,n){var e={title:t},i=!0;return"string"==typeof r?(i=!1,e.kind=r):z.is(r)?e.command=r:e.edit=r,i&&void 0!==n&&(e.kind=n),e},Vt.is=function(t){var r=t;return r&&nr.string(r.title)&&(void 0===r.diagnostics||nr.typedArray(r.diagnostics,A.is))&&(void 0===r.kind||nr.string(r.kind))&&(void 0!==r.edit||void 0!==r.command)&&(void 0===r.command||z.is(r.command))&&(void 0===r.isPreferred||nr.boolean(r.isPreferred))&&(void 0===r.edit||rt.is(r.edit))},(Bt=$t||($t={})).create=function(t,r){var n={range:t};return nr.defined(r)&&(n.data=r),n},Bt.is=function(t){var r=t;return nr.defined(r)&&d.is(r.range)&&(nr.undefined(r.command)||z.is(r.command))},(Jt=Gt||(Gt={})).create=function(t,r){return{tabSize:t,insertSpaces:r}},Jt.is=function(t){var r=t;return nr.defined(r)&&nr.uinteger(r.tabSize)&&nr.boolean(r.insertSpaces)},(Qt=Kt||(Kt={})).create=function(t,r,n){return{range:t,target:r,data:n}},Qt.is=function(t){var r=t;return nr.defined(r)&&d.is(r.range)&&(nr.undefined(r.target)||nr.string(r.target))},(Yt=Xt||(Xt={})).create=function(t,r){return{range:t,parent:r}},Yt.is=function(t){var r=t;return void 0!==r&&d.is(r.range)&&(void 0===r.parent||Yt.is(r.parent))},function(t){function r(t,n){if(t.length<=1)return t;var e=t.length/2|0,i=t.slice(0,e),o=t.slice(e);r(i,n),r(o,n);for(var u=0,s=0,c=0;u<i.length&&s<o.length;){var a=n(i[u],o[s]);t[c++]=a<=0?i[u++]:o[s++]}for(;u<i.length;)t[c++]=i[u++];for(;s<o.length;)t[c++]=o[s++];return t}t.create=function(t,r,n,e){return new or(t,r,n,e)},t.is=function(t){var r=t;return!!(nr.defined(r)&&nr.string(r.uri)&&(nr.undefined(r.languageId)||nr.string(r.languageId))&&nr.uinteger(r.lineCount)&&nr.func(r.getText)&&nr.func(r.positionAt)&&nr.func(r.offsetAt))},t.applyEdits=function(t,n){for(var e=t.getText(),i=r(n,(function(t,r){var n=t.range.start.line-r.range.start.line;return 0===n?t.range.start.character-r.range.start.character:n})),o=e.length,u=i.length-1;u>=0;u--){var s=i[u],c=t.offsetAt(s.range.start),a=t.offsetAt(s.range.end);if(!(a<=o))throw new Error("Overlapping edit");e=e.substring(0,c)+s.newText+e.substring(a,e.length),o=c}return e}}(Zt||(Zt={}));var nr,er,ir,or=function(){function t(t,r,n,e){this._uri=t,this._languageId=r,this._version=n,this._content=e,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},t.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},t.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var t=[],r=this._content,n=!0,e=0;e<r.length;e++){n&&(t.push(e),n=!1);var i=r.charAt(e);n="\r"===i||"\n"===i,"\r"===i&&e+1<r.length&&"\n"===r.charAt(e+1)&&e++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},t.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,e=r.length;if(0===e)return h.create(0,t);for(;n<e;){var i=Math.floor((n+e)/2);r[i]>t?e=i:n=i+1}var o=n-1;return h.create(o,t-r[o])},t.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line];return Math.max(Math.min(n+t.character,t.line+1<r.length?r[t.line+1]:this._content.length),n)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),t}();er=nr||(nr={}),ir=Object.prototype.toString,er.defined=function(t){return void 0!==t},er.undefined=function(t){return void 0===t},er.boolean=function(t){return!0===t||!1===t},er.string=function(t){return"[object String]"===ir.call(t)},er.number=function(t){return"[object Number]"===ir.call(t)},er.numberRange=function(t,r,n){return"[object Number]"===ir.call(t)&&r<=t&&t<=n},er.integer=function(t){return"[object Number]"===ir.call(t)&&-2147483648<=t&&t<=2147483647},er.uinteger=function(t){return"[object Number]"===ir.call(t)&&0<=t&&t<=2147483647},er.func=function(t){return"[object Function]"===ir.call(t)},er.objectLiteral=function(t){return null!==t&&"object"==typeof t},er.typedArray=function(t,r){return Array.isArray(t)&&t.every(r)};var ur=class{constructor(t,r,n){this._languageId=t,this._worker=r;const e=t=>{let r,n=t.getLanguageId();n===this._languageId&&(this._listener[t.uri.toString()]=t.onDidChangeContent((()=>{window.clearTimeout(r),r=window.setTimeout((()=>this._doValidate(t.uri,n)),500)})),this._doValidate(t.uri,n))},i=t=>{u.editor.setModelMarkers(t,this._languageId,[]);let r=t.uri.toString(),n=this._listener[r];n&&(n.dispose(),delete this._listener[r])};this._disposables.push(u.editor.onDidCreateModel(e)),this._disposables.push(u.editor.onWillDisposeModel(i)),this._disposables.push(u.editor.onDidChangeModelLanguage((t=>{i(t.model),e(t.model)}))),this._disposables.push(n((()=>{u.editor.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&(i(t),e(t))}))}))),this._disposables.push({dispose:()=>{u.editor.getModels().forEach(i);for(let t in this._listener)this._listener[t].dispose()}}),u.editor.getModels().forEach(e)}_disposables=[];_listener=Object.create(null);dispose(){this._disposables.forEach((t=>t&&t.dispose())),this._disposables.length=0}_doValidate(t,r){this._worker(t).then((r=>r.doValidation(t.toString()))).then((n=>{const e=n.map((t=>function(t,r){let n="number"==typeof r.code?String(r.code):r.code;return{severity:sr(r.severity),startLineNumber:r.range.start.line+1,startColumn:r.range.start.character+1,endLineNumber:r.range.end.line+1,endColumn:r.range.end.character+1,message:r.message,code:n,source:r.source}}(0,t)));let i=u.editor.getModel(t);i&&i.getLanguageId()===r&&u.editor.setModelMarkers(i,r,e)})).then(void 0,(t=>{console.error(t)}))}};function sr(t){switch(t){case D.Error:return u.MarkerSeverity.Error;case D.Warning:return u.MarkerSeverity.Warning;case D.Information:return u.MarkerSeverity.Info;case D.Hint:return u.MarkerSeverity.Hint;default:return u.MarkerSeverity.Info}}var cr=class{constructor(t,r){this._worker=t,this._triggerCharacters=r}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(t,r,n,e){const i=t.uri;return this._worker(i).then((t=>t.doComplete(i.toString(),ar(r)))).then((n=>{if(!n)return;const e=t.getWordUntilPosition(r),i=new u.Range(r.lineNumber,e.startColumn,r.lineNumber,e.endColumn),o=n.items.map((t=>{const r={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,documentation:t.documentation,detail:t.detail,command:(n=t.command,n&&"editor.action.triggerSuggest"===n.command?{id:n.command,title:n.title,arguments:n.arguments}:void 0),range:i,kind:vr(t.kind)};var n,e;return t.textEdit&&(r.range=void 0!==(e=t.textEdit).insert&&void 0!==e.replace?{insert:hr(t.textEdit.insert),replace:hr(t.textEdit.replace)}:hr(t.textEdit.range),r.insertText=t.textEdit.newText),t.additionalTextEdits&&(r.additionalTextEdits=t.additionalTextEdits.map(dr)),t.insertTextFormat===bt.Snippet&&(r.insertTextRules=u.languages.CompletionItemInsertTextRule.InsertAsSnippet),r}));return{isIncomplete:n.isIncomplete,suggestions:o}}))}};function ar(t){if(t)return{character:t.column-1,line:t.lineNumber-1}}function fr(t){if(t)return{start:{line:t.startLineNumber-1,character:t.startColumn-1},end:{line:t.endLineNumber-1,character:t.endColumn-1}}}function hr(t){if(t)return new u.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function vr(t){const r=u.languages.CompletionItemKind;switch(t){case lt.Text:return r.Text;case lt.Method:return r.Method;case lt.Function:return r.Function;case lt.Constructor:return r.Constructor;case lt.Field:return r.Field;case lt.Variable:return r.Variable;case lt.Class:return r.Class;case lt.Interface:return r.Interface;case lt.Module:return r.Module;case lt.Property:return r.Property;case lt.Unit:return r.Unit;case lt.Value:return r.Value;case lt.Enum:return r.Enum;case lt.Keyword:return r.Keyword;case lt.Snippet:return r.Snippet;case lt.Color:return r.Color;case lt.File:return r.File;case lt.Reference:return r.Reference}return r.Property}function dr(t){if(t)return{range:hr(t.range),text:t.newText}}var lr=class{constructor(t){this._worker=t}provideHover(t,r,n){let e=t.uri;return this._worker(e).then((t=>t.doHover(e.toString(),ar(r)))).then((t=>{if(t)return{range:hr(t.range),contents:br(t.contents)}}))}};function gr(t){return"string"==typeof t?{value:t}:(r=t)&&"object"==typeof r&&"string"==typeof r.kind?"plaintext"===t.kind?{value:t.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:t.value}:{value:"```"+t.language+"\n"+t.value+"\n```\n"};var r}function br(t){if(t)return Array.isArray(t)?t.map(gr):[gr(t)]}var mr=class{constructor(t){this._worker=t}provideDocumentHighlights(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.findDocumentHighlights(e.toString(),ar(r)))).then((t=>{if(t)return t.map((t=>({range:hr(t.range),kind:wr(t.kind)})))}))}};function wr(t){switch(t){case _t.Read:return u.languages.DocumentHighlightKind.Read;case _t.Write:return u.languages.DocumentHighlightKind.Write;case _t.Text:return u.languages.DocumentHighlightKind.Text}return u.languages.DocumentHighlightKind.Text}var kr=class{constructor(t){this._worker=t}provideDefinition(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.findDefinition(e.toString(),ar(r)))).then((t=>{if(t)return[pr(t)]}))}};function pr(t){return{uri:u.Uri.parse(t.uri),range:hr(t.range)}}var jr=class{constructor(t){this._worker=t}provideReferences(t,r,n,e){const i=t.uri;return this._worker(i).then((t=>t.findReferences(i.toString(),ar(r)))).then((t=>{if(t)return t.map(pr)}))}},xr=class{constructor(t){this._worker=t}provideRenameEdits(t,r,n,e){const i=t.uri;return this._worker(i).then((t=>t.doRename(i.toString(),ar(r),n))).then((t=>function(t){if(!t||!t.changes)return;let r=[];for(let n in t.changes){const e=u.Uri.parse(n);for(let i of t.changes[n])r.push({resource:e,versionId:void 0,textEdit:{range:hr(i.range),text:i.newText}})}return{edits:r}}(t)))}},Sr=class{constructor(t){this._worker=t}provideDocumentSymbols(t,r){const n=t.uri;return this._worker(n).then((t=>t.findDocumentSymbols(n.toString()))).then((t=>{if(t)return t.map((t=>({name:t.name,detail:"",containerName:t.containerName,kind:Ir(t.kind),range:hr(t.location.range),selectionRange:hr(t.location.range),tags:[]})))}))}};function Ir(t){let r=u.languages.SymbolKind;switch(t){case Nt.File:return r.Array;case Nt.Module:return r.Module;case Nt.Namespace:return r.Namespace;case Nt.Package:return r.Package;case Nt.Class:return r.Class;case Nt.Method:return r.Method;case Nt.Property:return r.Property;case Nt.Field:return r.Field;case Nt.Constructor:return r.Constructor;case Nt.Enum:return r.Enum;case Nt.Interface:return r.Interface;case Nt.Function:return r.Function;case Nt.Variable:return r.Variable;case Nt.Constant:return r.Constant;case Nt.String:return r.String;case Nt.Number:return r.Number;case Nt.Boolean:return r.Boolean;case Nt.Array:return r.Array}return r.Function}var yr=class{constructor(t){this._worker=t}provideLinks(t,r){const n=t.uri;return this._worker(n).then((t=>t.findDocumentLinks(n.toString()))).then((t=>{if(t)return{links:t.map((t=>({range:hr(t.range),url:t.target})))}}))}},Tr=class{constructor(t){this._worker=t}provideDocumentFormattingEdits(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.format(e.toString(),null,Or(r)).then((t=>{if(t&&0!==t.length)return t.map(dr)}))))}},Er=class{constructor(t){this._worker=t}canFormatMultipleRanges=!1;provideDocumentRangeFormattingEdits(t,r,n,e){const i=t.uri;return this._worker(i).then((t=>t.format(i.toString(),fr(r),Or(n)).then((t=>{if(t&&0!==t.length)return t.map(dr)}))))}};function Or(t){return{tabSize:t.tabSize,insertSpaces:t.insertSpaces}}var Cr,_r=class{constructor(t){this._worker=t}provideDocumentColors(t,r){const n=t.uri;return this._worker(n).then((t=>t.findDocumentColors(n.toString()))).then((t=>{if(t)return t.map((t=>({color:t.color,range:hr(t.range)})))}))}provideColorPresentations(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.getColorPresentations(e.toString(),r.color,fr(r.range)))).then((t=>{if(t)return t.map((t=>{let r={label:t.label};return t.textEdit&&(r.textEdit=dr(t.textEdit)),t.additionalTextEdits&&(r.additionalTextEdits=t.additionalTextEdits.map(dr)),r}))}))}},Dr=class{constructor(t){this._worker=t}provideFoldingRanges(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.getFoldingRanges(e.toString(),r))).then((t=>{if(t)return t.map((t=>{const r={start:t.startLine+1,end:t.endLine+1};return void 0!==t.kind&&(r.kind=function(t){switch(t){case y.Comment:return u.languages.FoldingRangeKind.Comment;case y.Imports:return u.languages.FoldingRangeKind.Imports;case y.Region:return u.languages.FoldingRangeKind.Region}}(t.kind)),r}))}))}},Rr=class{constructor(t){this._worker=t}provideSelectionRanges(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.getSelectionRanges(e.toString(),r.map(ar)))).then((t=>{if(t)return t.map((t=>{const r=[];for(;t;)r.push({range:hr(t.range)}),t=t.parent;return r}))}))}};function Nr(t){return 32===t||9===t||11===t||12===t||160===t||5760===t||t>=8192&&t<=8203||8239===t||8287===t||12288===t||65279===t}function Lr(t){return 10===t||13===t||8232===t||8233===t}function Wr(t){return t>=48&&t<=57}(Cr||(Cr={})).DEFAULT={allowTrailingComma:!1};var Ar=function(t,r){void 0===r&&(r=!1);var n=t.length,e=0,i="",o=0,u=16,s=0,c=0,a=0,f=0,h=0;function v(r,n){for(var i=0,o=0;i<r||!n;){var u=t.charCodeAt(e);if(u>=48&&u<=57)o=16*o+u-48;else if(u>=65&&u<=70)o=16*o+u-65+10;else{if(!(u>=97&&u<=102))break;o=16*o+u-97+10}e++,i++}return i<r&&(o=-1),o}function d(){if(i="",h=0,o=e,c=s,f=a,e>=n)return o=n,u=17;var r=t.charCodeAt(e);if(Nr(r)){do{e++,i+=String.fromCharCode(r),r=t.charCodeAt(e)}while(Nr(r));return u=15}if(Lr(r))return e++,i+=String.fromCharCode(r),13===r&&10===t.charCodeAt(e)&&(e++,i+="\n"),s++,a=e,u=14;switch(r){case 123:return e++,u=1;case 125:return e++,u=2;case 91:return e++,u=3;case 93:return e++,u=4;case 58:return e++,u=6;case 44:return e++,u=5;case 34:return e++,i=function(){for(var r="",i=e;;){if(e>=n){r+=t.substring(i,e),h=2;break}var o=t.charCodeAt(e);if(34===o){r+=t.substring(i,e),e++;break}if(92!==o){if(o>=0&&o<=31){if(Lr(o)){r+=t.substring(i,e),h=2;break}h=6}e++}else{if(r+=t.substring(i,e),++e>=n){h=2;break}switch(t.charCodeAt(e++)){case 34:r+='"';break;case 92:r+="\\";break;case 47:r+="/";break;case 98:r+="\b";break;case 102:r+="\f";break;case 110:r+="\n";break;case 114:r+="\r";break;case 116:r+="\t";break;case 117:var u=v(4,!0);u>=0?r+=String.fromCharCode(u):h=4;break;default:h=5}i=e}}return r}(),u=10;case 47:var d=e-1;if(47===t.charCodeAt(e+1)){for(e+=2;e<n&&!Lr(t.charCodeAt(e));)e++;return i=t.substring(d,e),u=12}if(42===t.charCodeAt(e+1)){e+=2;for(var g=n-1,b=!1;e<g;){var m=t.charCodeAt(e);if(42===m&&47===t.charCodeAt(e+1)){e+=2,b=!0;break}e++,Lr(m)&&(13===m&&10===t.charCodeAt(e)&&e++,s++,a=e)}return b||(e++,h=1),i=t.substring(d,e),u=13}return i+=String.fromCharCode(r),e++,u=16;case 45:if(i+=String.fromCharCode(r),++e===n||!Wr(t.charCodeAt(e)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=function(){var r=e;if(48===t.charCodeAt(e))e++;else for(e++;e<t.length&&Wr(t.charCodeAt(e));)e++;if(e<t.length&&46===t.charCodeAt(e)){if(!(++e<t.length&&Wr(t.charCodeAt(e))))return h=3,t.substring(r,e);for(e++;e<t.length&&Wr(t.charCodeAt(e));)e++}var n=e;if(e<t.length&&(69===t.charCodeAt(e)||101===t.charCodeAt(e)))if((++e<t.length&&43===t.charCodeAt(e)||45===t.charCodeAt(e))&&e++,e<t.length&&Wr(t.charCodeAt(e))){for(e++;e<t.length&&Wr(t.charCodeAt(e));)e++;n=e}else h=3;return t.substring(r,n)}(),u=11;default:for(;e<n&&l(r);)e++,r=t.charCodeAt(e);if(o!==e){switch(i=t.substring(o,e)){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return i+=String.fromCharCode(r),e++,u=16}}function l(t){if(Nr(t)||Lr(t))return!1;switch(t){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(t){e=t,i="",o=0,u=16,h=0},getPosition:function(){return e},scan:r?function(){var t;do{t=d()}while(t>=12&&t<=15);return t}:d,getToken:function(){return u},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return e-o},getTokenStartLine:function(){return c},getTokenStartCharacter:function(){return o-f},getTokenError:function(){return h}}};var Mr="delimiter.bracket.json",zr="delimiter.array.json",Fr="delimiter.colon.json",Pr="delimiter.comma.json",qr="keyword.json",Ur="keyword.json",Hr="string.value.json",Vr="number.json",$r="string.key.json",Br="comment.block.json",Gr="comment.line.json",Jr=class{constructor(t,r){this.parent=t,this.type=r}static pop(t){return t?t.parent:null}static push(t,r){return new Jr(t,r)}static equals(t,r){if(!t&&!r)return!0;if(!t||!r)return!1;for(;t&&r;){if(t===r)return!0;if(t.type!==r.type)return!1;t=t.parent,r=r.parent}return!0}},Kr=class{_state;scanError;lastWasColon;parents;constructor(t,r,n,e){this._state=t,this.scanError=r,this.lastWasColon=n,this.parents=e}clone(){return new Kr(this._state,this.scanError,this.lastWasColon,this.parents)}equals(t){return t===this||!!(t&&t instanceof Kr)&&this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon&&Jr.equals(this.parents,t.parents)}getStateData(){return this._state}setStateData(t){this._state=t}},Qr=class extends ur{constructor(t,r,n){super(t,r,n.onDidChange),this._disposables.push(u.editor.onWillDisposeModel((t=>{this._resetSchema(t.uri)}))),this._disposables.push(u.editor.onDidChangeModelLanguage((t=>{this._resetSchema(t.model.uri)})))}_resetSchema(t){this._worker().then((r=>{r.resetSchema(t.toString())}))}};function Xr(t){const r=[],n=[],e=new nt(t);r.push(e);const i=(...t)=>e.getLanguageServiceWorker(...t);function o(){const{languageId:r,modeConfiguration:e}=t;var o;Zr(n),e.documentFormattingEdits&&n.push(u.languages.registerDocumentFormattingEditProvider(r,new Tr(i))),e.documentRangeFormattingEdits&&n.push(u.languages.registerDocumentRangeFormattingEditProvider(r,new Er(i))),e.completionItems&&n.push(u.languages.registerCompletionItemProvider(r,new cr(i,[" ",":",'"']))),e.hovers&&n.push(u.languages.registerHoverProvider(r,new lr(i))),e.documentSymbols&&n.push(u.languages.registerDocumentSymbolProvider(r,new Sr(i))),e.tokens&&n.push(u.languages.setTokensProvider(r,(o=!0,{getInitialState:()=>new Kr(null,null,!1,null),tokenize:(t,r)=>function(t,r,n,e=0){let i=0,o=!1;switch(n.scanError){case 2:r='"'+r,i=1;break;case 1:r="/*"+r,i=2}const u=Ar(r);let s=n.lastWasColon,c=n.parents;const a={tokens:[],endState:n.clone()};for(;;){let f=e+u.getPosition(),h="";const v=u.scan();if(17===v)break;if(f===e+u.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+r.substr(u.getPosition(),3));switch(o&&(f-=i),o=i>0,v){case 1:c=Jr.push(c,0),h=Mr,s=!1;break;case 2:c=Jr.pop(c),h=Mr,s=!1;break;case 3:c=Jr.push(c,1),h=zr,s=!1;break;case 4:c=Jr.pop(c),h=zr,s=!1;break;case 6:h=Fr,s=!0;break;case 5:h=Pr,s=!1;break;case 8:case 9:h=qr,s=!1;break;case 7:h=Ur,s=!1;break;case 10:h=s||1===(c?c.type:0)?Hr:$r,s=!1;break;case 11:h=Vr,s=!1}if(t)switch(v){case 12:h=Gr;break;case 13:h=Br}a.endState=new Kr(n.getStateData(),u.getTokenError(),s,c),a.tokens.push({startIndex:f,scopes:h})}return a}(o,t,r)}))),e.colors&&n.push(u.languages.registerColorProvider(r,new _r(i))),e.foldingRanges&&n.push(u.languages.registerFoldingRangeProvider(r,new Dr(i))),e.diagnostics&&n.push(new Qr(r,i,t)),e.selectionRanges&&n.push(u.languages.registerSelectionRangeProvider(r,new Rr(i)))}o(),r.push(u.languages.setLanguageConfiguration(t.languageId,tn));let s=t.modeConfiguration;return t.onDidChange((t=>{t.modeConfiguration!==s&&(s=t.modeConfiguration,o())})),r.push(Yr(n)),Yr(r)}function Yr(t){return{dispose:()=>Zr(t)}}function Zr(t){for(;t.length;)t.pop().dispose()}var tn={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]};export{cr as CompletionAdapter,kr as DefinitionAdapter,ur as DiagnosticsAdapter,_r as DocumentColorAdapter,Tr as DocumentFormattingEditProvider,mr as DocumentHighlightAdapter,yr as DocumentLinkAdapter,Er as DocumentRangeFormattingEditProvider,Sr as DocumentSymbolAdapter,Dr as FoldingRangeAdapter,lr as HoverAdapter,jr as ReferenceAdapter,xr as RenameAdapter,Rr as SelectionRangeAdapter,nt as WorkerManager,ar as fromPosition,fr as fromRange,Xr as setupMode,hr as toRange,dr as toTextEdit}
|
|
12
|
+
*-----------------------------------------------------------------------------*/var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,e=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(t,o,u,s)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let a of e(o))i.call(t,a)||a===u||r(t,a,{get:()=>o[a],enumerable:!(s=n(o,a))||s.enumerable});return t},u={};o(u,t,"default");var s,a,c,f,h,v,d,l,g,b,m,w,k,p,j,x,S,I,y,T,E,O,C,_,D,R,N,L,W,A,M,z,F,P,q,U,H,V,$,B,G,J,K,Q,X,Y,Z,tt,rt,nt=class{_defaults;_idleCheckInterval;_lastUsedTime;_configChangeListener;_worker;_client;constructor(t){this._defaults=t,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=u.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...t){let r;return this._getClient().then((t=>{r=t})).then((()=>{if(this._worker)return this._worker.withSyncedResources(t)})).then((()=>r))}};(a=s||(s={})).MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647,(f=c||(c={})).MIN_VALUE=0,f.MAX_VALUE=2147483647,(v=h||(h={})).create=function(t,r){return t===Number.MAX_VALUE&&(t=c.MAX_VALUE),r===Number.MAX_VALUE&&(r=c.MAX_VALUE),{line:t,character:r}},v.is=function(t){var r=t;return nr.objectLiteral(r)&&nr.uinteger(r.line)&&nr.uinteger(r.character)},(l=d||(d={})).create=function(t,r,n,e){if(nr.uinteger(t)&&nr.uinteger(r)&&nr.uinteger(n)&&nr.uinteger(e))return{start:h.create(t,r),end:h.create(n,e)};if(h.is(t)&&h.is(r))return{start:t,end:r};throw new Error("Range#create called with invalid arguments["+t+", "+r+", "+n+", "+e+"]")},l.is=function(t){var r=t;return nr.objectLiteral(r)&&h.is(r.start)&&h.is(r.end)},(b=g||(g={})).create=function(t,r){return{uri:t,range:r}},b.is=function(t){var r=t;return nr.defined(r)&&d.is(r.range)&&(nr.string(r.uri)||nr.undefined(r.uri))},(w=m||(m={})).create=function(t,r,n,e){return{targetUri:t,targetRange:r,targetSelectionRange:n,originSelectionRange:e}},w.is=function(t){var r=t;return nr.defined(r)&&d.is(r.targetRange)&&nr.string(r.targetUri)&&(d.is(r.targetSelectionRange)||nr.undefined(r.targetSelectionRange))&&(d.is(r.originSelectionRange)||nr.undefined(r.originSelectionRange))},(p=k||(k={})).create=function(t,r,n,e){return{red:t,green:r,blue:n,alpha:e}},p.is=function(t){var r=t;return nr.numberRange(r.red,0,1)&&nr.numberRange(r.green,0,1)&&nr.numberRange(r.blue,0,1)&&nr.numberRange(r.alpha,0,1)},(x=j||(j={})).create=function(t,r){return{range:t,color:r}},x.is=function(t){var r=t;return d.is(r.range)&&k.is(r.color)},(I=S||(S={})).create=function(t,r,n){return{label:t,textEdit:r,additionalTextEdits:n}},I.is=function(t){var r=t;return nr.string(r.label)&&(nr.undefined(r.textEdit)||P.is(r))&&(nr.undefined(r.additionalTextEdits)||nr.typedArray(r.additionalTextEdits,P.is))},(T=y||(y={})).Comment="comment",T.Imports="imports",T.Region="region",(O=E||(E={})).create=function(t,r,n,e,i){var o={startLine:t,endLine:r};return nr.defined(n)&&(o.startCharacter=n),nr.defined(e)&&(o.endCharacter=e),nr.defined(i)&&(o.kind=i),o},O.is=function(t){var r=t;return nr.uinteger(r.startLine)&&nr.uinteger(r.startLine)&&(nr.undefined(r.startCharacter)||nr.uinteger(r.startCharacter))&&(nr.undefined(r.endCharacter)||nr.uinteger(r.endCharacter))&&(nr.undefined(r.kind)||nr.string(r.kind))},(_=C||(C={})).create=function(t,r){return{location:t,message:r}},_.is=function(t){var r=t;return nr.defined(r)&&g.is(r.location)&&nr.string(r.message)},(R=D||(D={})).Error=1,R.Warning=2,R.Information=3,R.Hint=4,(L=N||(N={})).Unnecessary=1,L.Deprecated=2,(W||(W={})).is=function(t){return null!=t&&nr.string(t.href)},(M=A||(A={})).create=function(t,r,n,e,i,o){var u={range:t,message:r};return nr.defined(n)&&(u.severity=n),nr.defined(e)&&(u.code=e),nr.defined(i)&&(u.source=i),nr.defined(o)&&(u.relatedInformation=o),u},M.is=function(t){var r,n=t;return nr.defined(n)&&d.is(n.range)&&nr.string(n.message)&&(nr.number(n.severity)||nr.undefined(n.severity))&&(nr.integer(n.code)||nr.string(n.code)||nr.undefined(n.code))&&(nr.undefined(n.codeDescription)||nr.string(null===(r=n.codeDescription)||void 0===r?void 0:r.href))&&(nr.string(n.source)||nr.undefined(n.source))&&(nr.undefined(n.relatedInformation)||nr.typedArray(n.relatedInformation,C.is))},(F=z||(z={})).create=function(t,r){for(var n=[],e=2;e<arguments.length;e++)n[e-2]=arguments[e];var i={title:t,command:r};return nr.defined(n)&&n.length>0&&(i.arguments=n),i},F.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.title)&&nr.string(r.command)},(q=P||(P={})).replace=function(t,r){return{range:t,newText:r}},q.insert=function(t,r){return{range:{start:t,end:t},newText:r}},q.del=function(t){return{range:t,newText:""}},q.is=function(t){var r=t;return nr.objectLiteral(r)&&nr.string(r.newText)&&d.is(r.range)},(H=U||(U={})).create=function(t,r,n){var e={label:t};return void 0!==r&&(e.needsConfirmation=r),void 0!==n&&(e.description=n),e},H.is=function(t){var r=t;return void 0!==r&&nr.objectLiteral(r)&&nr.string(r.label)&&(nr.boolean(r.needsConfirmation)||void 0===r.needsConfirmation)&&(nr.string(r.description)||void 0===r.description)},(V||(V={})).is=function(t){return"string"==typeof t},(B=$||($={})).replace=function(t,r,n){return{range:t,newText:r,annotationId:n}},B.insert=function(t,r,n){return{range:{start:t,end:t},newText:r,annotationId:n}},B.del=function(t,r){return{range:t,newText:"",annotationId:r}},B.is=function(t){var r=t;return P.is(r)&&(U.is(r.annotationId)||V.is(r.annotationId))},(J=G||(G={})).create=function(t,r){return{textDocument:t,edits:r}},J.is=function(t){var r=t;return nr.defined(r)&&st.is(r.textDocument)&&Array.isArray(r.edits)},(Q=K||(K={})).create=function(t,r,n){var e={kind:"create",uri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(e.options=r),void 0!==n&&(e.annotationId=n),e},Q.is=function(t){var r=t;return r&&"create"===r.kind&&nr.string(r.uri)&&(void 0===r.options||(void 0===r.options.overwrite||nr.boolean(r.options.overwrite))&&(void 0===r.options.ignoreIfExists||nr.boolean(r.options.ignoreIfExists)))&&(void 0===r.annotationId||V.is(r.annotationId))},(Y=X||(X={})).create=function(t,r,n,e){var i={kind:"rename",oldUri:t,newUri:r};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==e&&(i.annotationId=e),i},Y.is=function(t){var r=t;return r&&"rename"===r.kind&&nr.string(r.oldUri)&&nr.string(r.newUri)&&(void 0===r.options||(void 0===r.options.overwrite||nr.boolean(r.options.overwrite))&&(void 0===r.options.ignoreIfExists||nr.boolean(r.options.ignoreIfExists)))&&(void 0===r.annotationId||V.is(r.annotationId))},(tt=Z||(Z={})).create=function(t,r,n){var e={kind:"delete",uri:t};return void 0===r||void 0===r.recursive&&void 0===r.ignoreIfNotExists||(e.options=r),void 0!==n&&(e.annotationId=n),e},tt.is=function(t){var r=t;return r&&"delete"===r.kind&&nr.string(r.uri)&&(void 0===r.options||(void 0===r.options.recursive||nr.boolean(r.options.recursive))&&(void 0===r.options.ignoreIfNotExists||nr.boolean(r.options.ignoreIfNotExists)))&&(void 0===r.annotationId||V.is(r.annotationId))},(rt||(rt={})).is=function(t){return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(t){return nr.string(t.kind)?K.is(t)||X.is(t)||Z.is(t):G.is(t)})))};var et,it,ot,ut,st,at,ct,ft,ht,vt,dt,lt,gt,bt,mt,wt,kt,pt,jt,xt,St,It,yt,Tt,Et,Ot,Ct,_t,Dt,Rt,Nt,Lt,Wt,At,Mt,zt,Ft,Pt,qt,Ut,Ht,Vt,$t,Bt,Gt,Jt,Kt,Qt,Xt,Yt,Zt,tr=function(){function t(t,r){this.edits=t,this.changeAnnotations=r}return t.prototype.insert=function(t,r,n){var e,i;if(void 0===n?e=P.insert(t,r):V.is(n)?(i=n,e=$.insert(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),e=$.insert(t,r,i)),this.edits.push(e),void 0!==i)return i},t.prototype.replace=function(t,r,n){var e,i;if(void 0===n?e=P.replace(t,r):V.is(n)?(i=n,e=$.replace(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),e=$.replace(t,r,i)),this.edits.push(e),void 0!==i)return i},t.prototype.delete=function(t,r){var n,e;if(void 0===r?n=P.del(t):V.is(r)?(e=r,n=$.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(r),n=$.del(t,e)),this.edits.push(n),void 0!==e)return e},t.prototype.add=function(t){this.edits.push(t)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(t){if(void 0===t)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),rr=function(){function t(t){this._annotations=void 0===t?Object.create(null):t,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(t,r){var n;if(V.is(t)?n=t:(n=this.nextId(),r=t),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===r)throw new Error("No annotation provided for id "+n);return this._annotations[n]=r,this._size++,n},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}();!function(){function t(t){var r=this;this._textEditChanges=Object.create(null),void 0!==t?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new rr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach((function(t){if(G.is(t)){var n=new tr(t.edits,r._changeAnnotations);r._textEditChanges[t.textDocument.uri]=n}}))):t.changes&&Object.keys(t.changes).forEach((function(n){var e=new tr(t.changes[n]);r._textEditChanges[n]=e}))):this._workspaceEdit={}}Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(this._workspaceEdit.changeAnnotations=0===this._changeAnnotations.size?void 0:this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(t){if(st.is(t)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r={uri:t.uri,version:t.version};return(n=this._textEditChanges[r.uri])||(this._workspaceEdit.documentChanges.push({textDocument:r,edits:e=[]}),n=new tr(e,this._changeAnnotations),this._textEditChanges[r.uri]=n),n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n,e;return(n=this._textEditChanges[t])||(this._workspaceEdit.changes[t]=e=[],n=new tr(e),this._textEditChanges[t]=n),n},t.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new rr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var e,i,o;if(U.is(r)||V.is(r)?e=r:n=r,void 0===e?i=K.create(t,n):(o=V.is(e)?e:this._changeAnnotations.manage(e),i=K.create(t,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},t.prototype.renameFile=function(t,r,n,e){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,u;if(U.is(n)||V.is(n)?i=n:e=n,void 0===i?o=X.create(t,r,e):(u=V.is(i)?i:this._changeAnnotations.manage(i),o=X.create(t,r,e,u)),this._workspaceEdit.documentChanges.push(o),void 0!==u)return u},t.prototype.deleteFile=function(t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var e,i,o;if(U.is(r)||V.is(r)?e=r:n=r,void 0===e?i=Z.create(t,n):(o=V.is(e)?e:this._changeAnnotations.manage(e),i=Z.create(t,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}}(),(it=et||(et={})).create=function(t){return{uri:t}},it.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.uri)},(ut=ot||(ot={})).create=function(t,r){return{uri:t,version:r}},ut.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.uri)&&nr.integer(r.version)},(at=st||(st={})).create=function(t,r){return{uri:t,version:r}},at.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.uri)&&(null===r.version||nr.integer(r.version))},(ft=ct||(ct={})).create=function(t,r,n,e){return{uri:t,languageId:r,version:n,text:e}},ft.is=function(t){var r=t;return nr.defined(r)&&nr.string(r.uri)&&nr.string(r.languageId)&&nr.integer(r.version)&&nr.string(r.text)},(vt=ht||(ht={})).PlainText="plaintext",vt.Markdown="markdown",function(t){t.is=function(r){return r===t.PlainText||r===t.Markdown}}(ht||(ht={})),(dt||(dt={})).is=function(t){var r=t;return nr.objectLiteral(t)&&ht.is(r.kind)&&nr.string(r.value)},(gt=lt||(lt={})).Text=1,gt.Method=2,gt.Function=3,gt.Constructor=4,gt.Field=5,gt.Variable=6,gt.Class=7,gt.Interface=8,gt.Module=9,gt.Property=10,gt.Unit=11,gt.Value=12,gt.Enum=13,gt.Keyword=14,gt.Snippet=15,gt.Color=16,gt.File=17,gt.Reference=18,gt.Folder=19,gt.EnumMember=20,gt.Constant=21,gt.Struct=22,gt.Event=23,gt.Operator=24,gt.TypeParameter=25,(mt=bt||(bt={})).PlainText=1,mt.Snippet=2,(wt||(wt={})).Deprecated=1,(pt=kt||(kt={})).create=function(t,r,n){return{newText:t,insert:r,replace:n}},pt.is=function(t){var r=t;return r&&nr.string(r.newText)&&d.is(r.insert)&&d.is(r.replace)},(xt=jt||(jt={})).asIs=1,xt.adjustIndentation=2,(St||(St={})).create=function(t){return{label:t}},(It||(It={})).create=function(t,r){return{items:t||[],isIncomplete:!!r}},(Tt=yt||(yt={})).fromPlainText=function(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},Tt.is=function(t){var r=t;return nr.string(r)||nr.objectLiteral(r)&&nr.string(r.language)&&nr.string(r.value)},(Et||(Et={})).is=function(t){var r=t;return!!r&&nr.objectLiteral(r)&&(dt.is(r.contents)||yt.is(r.contents)||nr.typedArray(r.contents,yt.is))&&(void 0===t.range||d.is(t.range))},(Ot||(Ot={})).create=function(t,r){return r?{label:t,documentation:r}:{label:t}},(Ct||(Ct={})).create=function(t,r){for(var n=[],e=2;e<arguments.length;e++)n[e-2]=arguments[e];var i={label:t};return nr.defined(r)&&(i.documentation=r),i.parameters=nr.defined(n)?n:[],i},(Dt=_t||(_t={})).Text=1,Dt.Read=2,Dt.Write=3,(Rt||(Rt={})).create=function(t,r){var n={range:t};return nr.number(r)&&(n.kind=r),n},(Lt=Nt||(Nt={})).File=1,Lt.Module=2,Lt.Namespace=3,Lt.Package=4,Lt.Class=5,Lt.Method=6,Lt.Property=7,Lt.Field=8,Lt.Constructor=9,Lt.Enum=10,Lt.Interface=11,Lt.Function=12,Lt.Variable=13,Lt.Constant=14,Lt.String=15,Lt.Number=16,Lt.Boolean=17,Lt.Array=18,Lt.Object=19,Lt.Key=20,Lt.Null=21,Lt.EnumMember=22,Lt.Struct=23,Lt.Event=24,Lt.Operator=25,Lt.TypeParameter=26,(Wt||(Wt={})).Deprecated=1,(At||(At={})).create=function(t,r,n,e,i){var o={name:t,kind:r,location:{uri:e,range:n}};return i&&(o.containerName=i),o},(zt=Mt||(Mt={})).create=function(t,r,n,e,i,o){var u={name:t,detail:r,kind:n,range:e,selectionRange:i};return void 0!==o&&(u.children=o),u},zt.is=function(t){var r=t;return r&&nr.string(r.name)&&nr.number(r.kind)&&d.is(r.range)&&d.is(r.selectionRange)&&(void 0===r.detail||nr.string(r.detail))&&(void 0===r.deprecated||nr.boolean(r.deprecated))&&(void 0===r.children||Array.isArray(r.children))&&(void 0===r.tags||Array.isArray(r.tags))},(Pt=Ft||(Ft={})).Empty="",Pt.QuickFix="quickfix",Pt.Refactor="refactor",Pt.RefactorExtract="refactor.extract",Pt.RefactorInline="refactor.inline",Pt.RefactorRewrite="refactor.rewrite",Pt.Source="source",Pt.SourceOrganizeImports="source.organizeImports",Pt.SourceFixAll="source.fixAll",(Ut=qt||(qt={})).create=function(t,r){var n={diagnostics:t};return null!=r&&(n.only=r),n},Ut.is=function(t){var r=t;return nr.defined(r)&&nr.typedArray(r.diagnostics,A.is)&&(void 0===r.only||nr.typedArray(r.only,nr.string))},(Vt=Ht||(Ht={})).create=function(t,r,n){var e={title:t},i=!0;return"string"==typeof r?(i=!1,e.kind=r):z.is(r)?e.command=r:e.edit=r,i&&void 0!==n&&(e.kind=n),e},Vt.is=function(t){var r=t;return r&&nr.string(r.title)&&(void 0===r.diagnostics||nr.typedArray(r.diagnostics,A.is))&&(void 0===r.kind||nr.string(r.kind))&&(void 0!==r.edit||void 0!==r.command)&&(void 0===r.command||z.is(r.command))&&(void 0===r.isPreferred||nr.boolean(r.isPreferred))&&(void 0===r.edit||rt.is(r.edit))},(Bt=$t||($t={})).create=function(t,r){var n={range:t};return nr.defined(r)&&(n.data=r),n},Bt.is=function(t){var r=t;return nr.defined(r)&&d.is(r.range)&&(nr.undefined(r.command)||z.is(r.command))},(Jt=Gt||(Gt={})).create=function(t,r){return{tabSize:t,insertSpaces:r}},Jt.is=function(t){var r=t;return nr.defined(r)&&nr.uinteger(r.tabSize)&&nr.boolean(r.insertSpaces)},(Qt=Kt||(Kt={})).create=function(t,r,n){return{range:t,target:r,data:n}},Qt.is=function(t){var r=t;return nr.defined(r)&&d.is(r.range)&&(nr.undefined(r.target)||nr.string(r.target))},(Yt=Xt||(Xt={})).create=function(t,r){return{range:t,parent:r}},Yt.is=function(t){var r=t;return void 0!==r&&d.is(r.range)&&(void 0===r.parent||Yt.is(r.parent))},function(t){function r(t,n){if(t.length<=1)return t;var e=t.length/2|0,i=t.slice(0,e),o=t.slice(e);r(i,n),r(o,n);for(var u=0,s=0,a=0;u<i.length&&s<o.length;){var c=n(i[u],o[s]);t[a++]=c<=0?i[u++]:o[s++]}for(;u<i.length;)t[a++]=i[u++];for(;s<o.length;)t[a++]=o[s++];return t}t.create=function(t,r,n,e){return new or(t,r,n,e)},t.is=function(t){var r=t;return!!(nr.defined(r)&&nr.string(r.uri)&&(nr.undefined(r.languageId)||nr.string(r.languageId))&&nr.uinteger(r.lineCount)&&nr.func(r.getText)&&nr.func(r.positionAt)&&nr.func(r.offsetAt))},t.applyEdits=function(t,n){for(var e=t.getText(),i=r(n,(function(t,r){var n=t.range.start.line-r.range.start.line;return 0===n?t.range.start.character-r.range.start.character:n})),o=e.length,u=i.length-1;u>=0;u--){var s=i[u],a=t.offsetAt(s.range.start),c=t.offsetAt(s.range.end);if(!(c<=o))throw new Error("Overlapping edit");e=e.substring(0,a)+s.newText+e.substring(c,e.length),o=a}return e}}(Zt||(Zt={}));var nr,er,ir,or=function(){function t(t,r,n,e){this._uri=t,this._languageId=r,this._version=n,this._content=e,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},t.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},t.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var t=[],r=this._content,n=!0,e=0;e<r.length;e++){n&&(t.push(e),n=!1);var i=r.charAt(e);n="\r"===i||"\n"===i,"\r"===i&&e+1<r.length&&"\n"===r.charAt(e+1)&&e++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},t.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,e=r.length;if(0===e)return h.create(0,t);for(;n<e;){var i=Math.floor((n+e)/2);r[i]>t?e=i:n=i+1}var o=n-1;return h.create(o,t-r[o])},t.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line];return Math.max(Math.min(n+t.character,t.line+1<r.length?r[t.line+1]:this._content.length),n)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),t}();er=nr||(nr={}),ir=Object.prototype.toString,er.defined=function(t){return void 0!==t},er.undefined=function(t){return void 0===t},er.boolean=function(t){return!0===t||!1===t},er.string=function(t){return"[object String]"===ir.call(t)},er.number=function(t){return"[object Number]"===ir.call(t)},er.numberRange=function(t,r,n){return"[object Number]"===ir.call(t)&&r<=t&&t<=n},er.integer=function(t){return"[object Number]"===ir.call(t)&&-2147483648<=t&&t<=2147483647},er.uinteger=function(t){return"[object Number]"===ir.call(t)&&0<=t&&t<=2147483647},er.func=function(t){return"[object Function]"===ir.call(t)},er.objectLiteral=function(t){return null!==t&&"object"==typeof t},er.typedArray=function(t,r){return Array.isArray(t)&&t.every(r)};var ur=class{constructor(t,r,n){this._languageId=t,this._worker=r;const e=t=>{let r,n=t.getLanguageId();n===this._languageId&&(this._listener[t.uri.toString()]=t.onDidChangeContent((()=>{window.clearTimeout(r),r=window.setTimeout((()=>this._doValidate(t.uri,n)),500)})),this._doValidate(t.uri,n))},i=t=>{u.editor.setModelMarkers(t,this._languageId,[]);let r=t.uri.toString(),n=this._listener[r];n&&(n.dispose(),delete this._listener[r])};this._disposables.push(u.editor.onDidCreateModel(e)),this._disposables.push(u.editor.onWillDisposeModel(i)),this._disposables.push(u.editor.onDidChangeModelLanguage((t=>{i(t.model),e(t.model)}))),this._disposables.push(n((()=>{u.editor.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&(i(t),e(t))}))}))),this._disposables.push({dispose:()=>{u.editor.getModels().forEach(i);for(let t in this._listener)this._listener[t].dispose()}}),u.editor.getModels().forEach(e)}_disposables=[];_listener=Object.create(null);dispose(){this._disposables.forEach((t=>t&&t.dispose())),this._disposables.length=0}_doValidate(t,r){this._worker(t).then((r=>r.doValidation(t.toString()))).then((n=>{const e=n.map((t=>function(t,r){let n="number"==typeof r.code?String(r.code):r.code;return{severity:sr(r.severity),startLineNumber:r.range.start.line+1,startColumn:r.range.start.character+1,endLineNumber:r.range.end.line+1,endColumn:r.range.end.character+1,message:r.message,code:n,source:r.source}}(0,t)));let i=u.editor.getModel(t);i&&i.getLanguageId()===r&&u.editor.setModelMarkers(i,r,e)})).then(void 0,(t=>{console.error(t)}))}};function sr(t){switch(t){case D.Error:return u.MarkerSeverity.Error;case D.Warning:return u.MarkerSeverity.Warning;case D.Information:return u.MarkerSeverity.Info;case D.Hint:return u.MarkerSeverity.Hint;default:return u.MarkerSeverity.Info}}var ar=class{constructor(t,r){this._worker=t,this._triggerCharacters=r}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(t,r,n,e){const i=t.uri;return this._worker(i).then((t=>t.doComplete(i.toString(),cr(r)))).then((n=>{if(!n)return;const e=t.getWordUntilPosition(r),i=new u.Range(r.lineNumber,e.startColumn,r.lineNumber,e.endColumn),o=n.items.map((t=>{const r={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,documentation:t.documentation,detail:t.detail,command:(n=t.command,n&&"editor.action.triggerSuggest"===n.command?{id:n.command,title:n.title,arguments:n.arguments}:void 0),range:i,kind:vr(t.kind)};var n,e;return t.textEdit&&(r.range=void 0!==(e=t.textEdit).insert&&void 0!==e.replace?{insert:hr(t.textEdit.insert),replace:hr(t.textEdit.replace)}:hr(t.textEdit.range),r.insertText=t.textEdit.newText),t.additionalTextEdits&&(r.additionalTextEdits=t.additionalTextEdits.map(dr)),t.insertTextFormat===bt.Snippet&&(r.insertTextRules=u.languages.CompletionItemInsertTextRule.InsertAsSnippet),r}));return{isIncomplete:n.isIncomplete,suggestions:o}}))}};function cr(t){if(t)return{character:t.column-1,line:t.lineNumber-1}}function fr(t){if(t)return{start:{line:t.startLineNumber-1,character:t.startColumn-1},end:{line:t.endLineNumber-1,character:t.endColumn-1}}}function hr(t){if(t)return new u.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function vr(t){const r=u.languages.CompletionItemKind;switch(t){case lt.Text:return r.Text;case lt.Method:return r.Method;case lt.Function:return r.Function;case lt.Constructor:return r.Constructor;case lt.Field:return r.Field;case lt.Variable:return r.Variable;case lt.Class:return r.Class;case lt.Interface:return r.Interface;case lt.Module:return r.Module;case lt.Property:return r.Property;case lt.Unit:return r.Unit;case lt.Value:return r.Value;case lt.Enum:return r.Enum;case lt.Keyword:return r.Keyword;case lt.Snippet:return r.Snippet;case lt.Color:return r.Color;case lt.File:return r.File;case lt.Reference:return r.Reference}return r.Property}function dr(t){if(t)return{range:hr(t.range),text:t.newText}}var lr=class{constructor(t){this._worker=t}provideHover(t,r,n){let e=t.uri;return this._worker(e).then((t=>t.doHover(e.toString(),cr(r)))).then((t=>{if(t)return{range:hr(t.range),contents:br(t.contents)}}))}};function gr(t){return"string"==typeof t?{value:t}:(r=t)&&"object"==typeof r&&"string"==typeof r.kind?"plaintext"===t.kind?{value:t.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:t.value}:{value:"```"+t.language+"\n"+t.value+"\n```\n"};var r}function br(t){if(t)return Array.isArray(t)?t.map(gr):[gr(t)]}var mr=class{constructor(t){this._worker=t}provideDocumentHighlights(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.findDocumentHighlights(e.toString(),cr(r)))).then((t=>{if(t)return t.map((t=>({range:hr(t.range),kind:wr(t.kind)})))}))}};function wr(t){switch(t){case _t.Read:return u.languages.DocumentHighlightKind.Read;case _t.Write:return u.languages.DocumentHighlightKind.Write;case _t.Text:return u.languages.DocumentHighlightKind.Text}return u.languages.DocumentHighlightKind.Text}var kr=class{constructor(t){this._worker=t}provideDefinition(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.findDefinition(e.toString(),cr(r)))).then((t=>{if(t)return[pr(t)]}))}};function pr(t){return{uri:u.Uri.parse(t.uri),range:hr(t.range)}}var jr=class{constructor(t){this._worker=t}provideReferences(t,r,n,e){const i=t.uri;return this._worker(i).then((t=>t.findReferences(i.toString(),cr(r)))).then((t=>{if(t)return t.map(pr)}))}},xr=class{constructor(t){this._worker=t}provideRenameEdits(t,r,n,e){const i=t.uri;return this._worker(i).then((t=>t.doRename(i.toString(),cr(r),n))).then((t=>function(t){if(!t||!t.changes)return;let r=[];for(let n in t.changes){const e=u.Uri.parse(n);for(let i of t.changes[n])r.push({resource:e,versionId:void 0,textEdit:{range:hr(i.range),text:i.newText}})}return{edits:r}}(t)))}},Sr=class{constructor(t){this._worker=t}provideDocumentSymbols(t,r){const n=t.uri;return this._worker(n).then((t=>t.findDocumentSymbols(n.toString()))).then((t=>{if(t)return t.map((t=>({name:t.name,detail:"",containerName:t.containerName,kind:Ir(t.kind),range:hr(t.location.range),selectionRange:hr(t.location.range),tags:[]})))}))}};function Ir(t){let r=u.languages.SymbolKind;switch(t){case Nt.File:return r.Array;case Nt.Module:return r.Module;case Nt.Namespace:return r.Namespace;case Nt.Package:return r.Package;case Nt.Class:return r.Class;case Nt.Method:return r.Method;case Nt.Property:return r.Property;case Nt.Field:return r.Field;case Nt.Constructor:return r.Constructor;case Nt.Enum:return r.Enum;case Nt.Interface:return r.Interface;case Nt.Function:return r.Function;case Nt.Variable:return r.Variable;case Nt.Constant:return r.Constant;case Nt.String:return r.String;case Nt.Number:return r.Number;case Nt.Boolean:return r.Boolean;case Nt.Array:return r.Array}return r.Function}var yr=class{constructor(t){this._worker=t}provideLinks(t,r){const n=t.uri;return this._worker(n).then((t=>t.findDocumentLinks(n.toString()))).then((t=>{if(t)return{links:t.map((t=>({range:hr(t.range),url:t.target})))}}))}},Tr=class{constructor(t){this._worker=t}provideDocumentFormattingEdits(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.format(e.toString(),null,Or(r)).then((t=>{if(t&&0!==t.length)return t.map(dr)}))))}},Er=class{constructor(t){this._worker=t}canFormatMultipleRanges=!1;provideDocumentRangeFormattingEdits(t,r,n,e){const i=t.uri;return this._worker(i).then((t=>t.format(i.toString(),fr(r),Or(n)).then((t=>{if(t&&0!==t.length)return t.map(dr)}))))}};function Or(t){return{tabSize:t.tabSize,insertSpaces:t.insertSpaces}}var Cr,_r=class{constructor(t){this._worker=t}provideDocumentColors(t,r){const n=t.uri;return this._worker(n).then((t=>t.findDocumentColors(n.toString()))).then((t=>{if(t)return t.map((t=>({color:t.color,range:hr(t.range)})))}))}provideColorPresentations(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.getColorPresentations(e.toString(),r.color,fr(r.range)))).then((t=>{if(t)return t.map((t=>{let r={label:t.label};return t.textEdit&&(r.textEdit=dr(t.textEdit)),t.additionalTextEdits&&(r.additionalTextEdits=t.additionalTextEdits.map(dr)),r}))}))}},Dr=class{constructor(t){this._worker=t}provideFoldingRanges(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.getFoldingRanges(e.toString(),r))).then((t=>{if(t)return t.map((t=>{const r={start:t.startLine+1,end:t.endLine+1};return void 0!==t.kind&&(r.kind=function(t){switch(t){case y.Comment:return u.languages.FoldingRangeKind.Comment;case y.Imports:return u.languages.FoldingRangeKind.Imports;case y.Region:return u.languages.FoldingRangeKind.Region}}(t.kind)),r}))}))}},Rr=class{constructor(t){this._worker=t}provideSelectionRanges(t,r,n){const e=t.uri;return this._worker(e).then((t=>t.getSelectionRanges(e.toString(),r.map(cr)))).then((t=>{if(t)return t.map((t=>{const r=[];for(;t;)r.push({range:hr(t.range)}),t=t.parent;return r}))}))}};function Nr(t){return 32===t||9===t||11===t||12===t||160===t||5760===t||t>=8192&&t<=8203||8239===t||8287===t||12288===t||65279===t}function Lr(t){return 10===t||13===t||8232===t||8233===t}function Wr(t){return t>=48&&t<=57}(Cr||(Cr={})).DEFAULT={allowTrailingComma:!1};var Ar=function(t,r){void 0===r&&(r=!1);var n=t.length,e=0,i="",o=0,u=16,s=0,a=0,c=0,f=0,h=0;function v(r,n){for(var i=0,o=0;i<r||!n;){var u=t.charCodeAt(e);if(u>=48&&u<=57)o=16*o+u-48;else if(u>=65&&u<=70)o=16*o+u-65+10;else{if(!(u>=97&&u<=102))break;o=16*o+u-97+10}e++,i++}return i<r&&(o=-1),o}function d(){if(i="",h=0,o=e,a=s,f=c,e>=n)return o=n,u=17;var r=t.charCodeAt(e);if(Nr(r)){do{e++,i+=String.fromCharCode(r),r=t.charCodeAt(e)}while(Nr(r));return u=15}if(Lr(r))return e++,i+=String.fromCharCode(r),13===r&&10===t.charCodeAt(e)&&(e++,i+="\n"),s++,c=e,u=14;switch(r){case 123:return e++,u=1;case 125:return e++,u=2;case 91:return e++,u=3;case 93:return e++,u=4;case 58:return e++,u=6;case 44:return e++,u=5;case 34:return e++,i=function(){for(var r="",i=e;;){if(e>=n){r+=t.substring(i,e),h=2;break}var o=t.charCodeAt(e);if(34===o){r+=t.substring(i,e),e++;break}if(92!==o){if(o>=0&&o<=31){if(Lr(o)){r+=t.substring(i,e),h=2;break}h=6}e++}else{if(r+=t.substring(i,e),++e>=n){h=2;break}switch(t.charCodeAt(e++)){case 34:r+='"';break;case 92:r+="\\";break;case 47:r+="/";break;case 98:r+="\b";break;case 102:r+="\f";break;case 110:r+="\n";break;case 114:r+="\r";break;case 116:r+="\t";break;case 117:var u=v(4,!0);u>=0?r+=String.fromCharCode(u):h=4;break;default:h=5}i=e}}return r}(),u=10;case 47:var d=e-1;if(47===t.charCodeAt(e+1)){for(e+=2;e<n&&!Lr(t.charCodeAt(e));)e++;return i=t.substring(d,e),u=12}if(42===t.charCodeAt(e+1)){e+=2;for(var g=n-1,b=!1;e<g;){var m=t.charCodeAt(e);if(42===m&&47===t.charCodeAt(e+1)){e+=2,b=!0;break}e++,Lr(m)&&(13===m&&10===t.charCodeAt(e)&&e++,s++,c=e)}return b||(e++,h=1),i=t.substring(d,e),u=13}return i+=String.fromCharCode(r),e++,u=16;case 45:if(i+=String.fromCharCode(r),++e===n||!Wr(t.charCodeAt(e)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=function(){var r=e;if(48===t.charCodeAt(e))e++;else for(e++;e<t.length&&Wr(t.charCodeAt(e));)e++;if(e<t.length&&46===t.charCodeAt(e)){if(!(++e<t.length&&Wr(t.charCodeAt(e))))return h=3,t.substring(r,e);for(e++;e<t.length&&Wr(t.charCodeAt(e));)e++}var n=e;if(e<t.length&&(69===t.charCodeAt(e)||101===t.charCodeAt(e)))if((++e<t.length&&43===t.charCodeAt(e)||45===t.charCodeAt(e))&&e++,e<t.length&&Wr(t.charCodeAt(e))){for(e++;e<t.length&&Wr(t.charCodeAt(e));)e++;n=e}else h=3;return t.substring(r,n)}(),u=11;default:for(;e<n&&l(r);)e++,r=t.charCodeAt(e);if(o!==e){switch(i=t.substring(o,e)){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return i+=String.fromCharCode(r),e++,u=16}}function l(t){if(Nr(t)||Lr(t))return!1;switch(t){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(t){e=t,i="",o=0,u=16,h=0},getPosition:function(){return e},scan:r?function(){var t;do{t=d()}while(t>=12&&t<=15);return t}:d,getToken:function(){return u},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return e-o},getTokenStartLine:function(){return a},getTokenStartCharacter:function(){return o-f},getTokenError:function(){return h}}};var Mr="delimiter.bracket.json",zr="delimiter.array.json",Fr="delimiter.colon.json",Pr="delimiter.comma.json",qr="keyword.json",Ur="keyword.json",Hr="string.value.json",Vr="number.json",$r="string.key.json",Br="comment.block.json",Gr="comment.line.json",Jr=class{constructor(t,r){this.parent=t,this.type=r}static pop(t){return t?t.parent:null}static push(t,r){return new Jr(t,r)}static equals(t,r){if(!t&&!r)return!0;if(!t||!r)return!1;for(;t&&r;){if(t===r)return!0;if(t.type!==r.type)return!1;t=t.parent,r=r.parent}return!0}},Kr=class{_state;scanError;lastWasColon;parents;constructor(t,r,n,e){this._state=t,this.scanError=r,this.lastWasColon=n,this.parents=e}clone(){return new Kr(this._state,this.scanError,this.lastWasColon,this.parents)}equals(t){return t===this||!!(t&&t instanceof Kr)&&this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon&&Jr.equals(this.parents,t.parents)}getStateData(){return this._state}setStateData(t){this._state=t}},Qr=class extends ur{constructor(t,r,n){super(t,r,n.onDidChange),this._disposables.push(u.editor.onWillDisposeModel((t=>{this._resetSchema(t.uri)}))),this._disposables.push(u.editor.onDidChangeModelLanguage((t=>{this._resetSchema(t.model.uri)})))}_resetSchema(t){this._worker().then((r=>{r.resetSchema(t.toString())}))}};function Xr(t){const r=[],n=[],e=new nt(t);r.push(e);const i=(...t)=>e.getLanguageServiceWorker(...t);function o(){const{languageId:r,modeConfiguration:e}=t;var o;Zr(n),e.documentFormattingEdits&&n.push(u.languages.registerDocumentFormattingEditProvider(r,new Tr(i))),e.documentRangeFormattingEdits&&n.push(u.languages.registerDocumentRangeFormattingEditProvider(r,new Er(i))),e.completionItems&&n.push(u.languages.registerCompletionItemProvider(r,new ar(i,[" ",":",'"']))),e.hovers&&n.push(u.languages.registerHoverProvider(r,new lr(i))),e.documentSymbols&&n.push(u.languages.registerDocumentSymbolProvider(r,new Sr(i))),e.tokens&&n.push(u.languages.setTokensProvider(r,(o=!0,{getInitialState:()=>new Kr(null,null,!1,null),tokenize:(t,r)=>function(t,r,n,e=0){let i=0,o=!1;switch(n.scanError){case 2:r='"'+r,i=1;break;case 1:r="/*"+r,i=2}const u=Ar(r);let s=n.lastWasColon,a=n.parents;const c={tokens:[],endState:n.clone()};for(;;){let f=e+u.getPosition(),h="";const v=u.scan();if(17===v)break;if(f===e+u.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+r.substr(u.getPosition(),3));switch(o&&(f-=i),o=i>0,v){case 1:a=Jr.push(a,0),h=Mr,s=!1;break;case 2:a=Jr.pop(a),h=Mr,s=!1;break;case 3:a=Jr.push(a,1),h=zr,s=!1;break;case 4:a=Jr.pop(a),h=zr,s=!1;break;case 6:h=Fr,s=!0;break;case 5:h=Pr,s=!1;break;case 8:case 9:h=qr,s=!1;break;case 7:h=Ur,s=!1;break;case 10:h=s||1===(a?a.type:0)?Hr:$r,s=!1;break;case 11:h=Vr,s=!1}if(t)switch(v){case 12:h=Gr;break;case 13:h=Br}c.endState=new Kr(n.getStateData(),u.getTokenError(),s,a),c.tokens.push({startIndex:f,scopes:h})}return c}(o,t,r)}))),e.colors&&n.push(u.languages.registerColorProvider(r,new _r(i))),e.foldingRanges&&n.push(u.languages.registerFoldingRangeProvider(r,new Dr(i))),e.diagnostics&&n.push(new Qr(r,i,t)),e.selectionRanges&&n.push(u.languages.registerSelectionRangeProvider(r,new Rr(i)))}o(),r.push(u.languages.setLanguageConfiguration(t.languageId,tn));let s=t.modeConfiguration;return t.onDidChange((t=>{t.modeConfiguration!==s&&(s=t.modeConfiguration,o())})),r.push(Yr(n)),Yr(r)}function Yr(t){return{dispose:()=>Zr(t)}}function Zr(t){for(;t.length;)t.pop().dispose()}var tn={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]};export{ar as CompletionAdapter,kr as DefinitionAdapter,ur as DiagnosticsAdapter,_r as DocumentColorAdapter,Tr as DocumentFormattingEditProvider,mr as DocumentHighlightAdapter,yr as DocumentLinkAdapter,Er as DocumentRangeFormattingEditProvider,Sr as DocumentSymbolAdapter,Dr as FoldingRangeAdapter,lr as HoverAdapter,jr as ReferenceAdapter,xr as RenameAdapter,Rr as SelectionRangeAdapter,nt as WorkerManager,cr as fromPosition,fr as fromRange,Xr as setupMode,hr as toRange,dr as toTextEdit}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
|
-
import{m as e,r as t,Q as s,R as r,w as n,T as i,D as a,V as o}from"./p-bfc1bca8.js";import"./p-3fb08b49.js";var c=[[],[],[]];["++","--"].forEach((e=>c[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>c[e.length-1]?.push(e))),["||","&&"].forEach((e=>c[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>c[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>c[e.length-1]?.push(e)));var u=Object.values({Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.exports.CompletionItemKind.Constant}))),u.map((t=>({label:t,kind:e.exports.CompletionItemKind.Keyword})));const l={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},g={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:u.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class p{constructor(e,s,{defaults:r,diagnosticsService:n}){this._languageId=e,this._worker=s,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=n,this._defaults=r;const a=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const s=i((()=>{this._doValidate(e,t).catch((e=>{throw e}))})),r=e.onDidChangeContent(s),n=e.onDidChangeAttached(s);this._modelListeners.set(e.uri.toString(),[r,n]),this._doValidate(e,t).catch(console.error)},o=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const r=this._modelListeners.get(s);if(r){for(;r.length;)r.pop()?.dispose();this._modelListeners.delete(s)}};this._disposables.push(t.onDidCreateModel(a)),this._disposables.push(t.onWillDisposeModel((e=>{o(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{o(e.model),a(e.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),a(e))}))}))),this._disposables.push(r.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._modelListeners.forEach((e=>e.forEach((e=>e.dispose())))),this._modelListeners.clear()}}),t.getModels().forEach(a)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}async _doValidate(e,s){if(e.isAttachedToEditor())try{const r=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),i=await r.doValidation(e.uri.toString(),n),a=i.map((e=>{return{severity:d((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,i),t.setModelMarkers(e,s,a)}catch(e){console.error(e)}}}function d(t){switch(t){case e.exports.DiagnosticSeverity.Error:return s.Error;case e.exports.DiagnosticSeverity.Warning:return s.Warning;case e.exports.DiagnosticSeverity.Information:return s.Info;case e.exports.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function h(e){return new r(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function m(e){return{range:h(e.range),text:e.newText}}function x(t){const s=n.CompletionItemKind;switch(t){case e.exports.CompletionItemKind.Text:return s.Text;case e.exports.CompletionItemKind.Method:return s.Method;case e.exports.CompletionItemKind.Function:return s.Function;case e.exports.CompletionItemKind.Constructor:return s.Constructor;case e.exports.CompletionItemKind.Field:return s.Field;case e.exports.CompletionItemKind.Variable:return s.Variable;case e.exports.CompletionItemKind.Class:return s.Class;case e.exports.CompletionItemKind.Interface:return s.Interface;case e.exports.CompletionItemKind.Module:return s.Module;case e.exports.CompletionItemKind.Property:return s.Property;case e.exports.CompletionItemKind.Unit:return s.Unit;case e.exports.CompletionItemKind.Value:return s.Value;case e.exports.CompletionItemKind.Enum:return s.Enum;case e.exports.CompletionItemKind.Keyword:return s.Keyword;case e.exports.CompletionItemKind.Snippet:return s.Snippet;case e.exports.CompletionItemKind.Color:return s.Color;case e.exports.CompletionItemKind.File:return s.File;case e.exports.CompletionItemKind.Reference:return s.Reference;case e.exports.CompletionItemKind.Folder:return s.Folder;case e.exports.CompletionItemKind.EnumMember:return s.EnumMember;case e.exports.CompletionItemKind.Constant:return s.Constant;case e.exports.CompletionItemKind.Struct:return s.Struct;case e.exports.CompletionItemKind.Event:return s.Event;case e.exports.CompletionItemKind.Operator:return s.Operator;case e.exports.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class f{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const i=await this._worker(t.uri),a=this._defaults.getApiContextForModel(t.uri),o=await i.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(s),a),c=t.getWordUntilPosition(s),u=new r(s.lineNumber,c.startColumn,s.lineNumber,c.endColumn),l=o.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:u,kind:x(t.kind)};var r;return t.textEdit&&(s.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:h(t.textEdit.insert),replace:h(t.textEdit.replace)}:h(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(m)),t.insertTextFormat===e.exports.InsertTextFormat.Snippet&&(s.insertTextRules=n.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:o.isIncomplete,suggestions:l}}}class w{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),s=this._defaults.getApiContextForModel(e.uri.toString());return(await t.doFormat(e.uri.toString(),s)).map((e=>({range:h(e.range),text:e.newText})))}}let b,k=new a;class y{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,k=new a),this._client=null}static async waitForWorker(){return await k.promise}async _getClientProxy(){if(!this._client){const{languageId:e}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e},host:this._defaults.workerHost}),k.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}async function v(...e){return await y.waitForWorker(),await new Promise(((t,s)=>{b?t(b(...e)):s(new Error("Arcade not registered!"))}))}const C=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function _(){return C}function F(e){const t=new y(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);b=s,n.setMonarchTokensProvider(e.languageId,g),n.setLanguageConfiguration(e.languageId,l),n.registerCompletionItemProvider(e.languageId,new f(s,e)),n.registerDocumentFormattingEditProvider(e.languageId,new w(s,e)),new p(e.languageId,s,{defaults:e,diagnosticsService:C})}export{_ as getArcadeDiagnosticService,v as getArcadeWorker,F as setupMode}
|
|
6
|
+
import{m as e,r as t,Q as s,R as r,w as n,T as i,D as a,V as o}from"./p-98b3a749.js";import"./p-3407848d.js";var c=[[],[],[]];["++","--"].forEach((e=>c[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>c[e.length-1]?.push(e))),["||","&&"].forEach((e=>c[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>c[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>c[e.length-1]?.push(e)));var u=Object.values({Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.exports.CompletionItemKind.Constant}))),u.map((t=>({label:t,kind:e.exports.CompletionItemKind.Keyword})));const l={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},g={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:u.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class p{constructor(e,s,{defaults:r,diagnosticsService:n}){this._languageId=e,this._worker=s,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=n,this._defaults=r;const a=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const s=i((()=>{this._doValidate(e,t).catch((e=>{throw e}))})),r=e.onDidChangeContent(s),n=e.onDidChangeAttached(s);this._modelListeners.set(e.uri.toString(),[r,n]),this._doValidate(e,t).catch(console.error)},o=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const r=this._modelListeners.get(s);if(r){for(;r.length;)r.pop()?.dispose();this._modelListeners.delete(s)}};this._disposables.push(t.onDidCreateModel(a)),this._disposables.push(t.onWillDisposeModel((e=>{o(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{o(e.model),a(e.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),a(e))}))}))),this._disposables.push(r.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._modelListeners.forEach((e=>e.forEach((e=>e.dispose())))),this._modelListeners.clear()}}),t.getModels().forEach(a)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}async _doValidate(e,s){if(e.isAttachedToEditor())try{const r=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),i=await r.doValidation(e.uri.toString(),n),a=i.map((e=>{return{severity:d((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,i),t.setModelMarkers(e,s,a)}catch(e){console.error(e)}}}function d(t){switch(t){case e.exports.DiagnosticSeverity.Error:return s.Error;case e.exports.DiagnosticSeverity.Warning:return s.Warning;case e.exports.DiagnosticSeverity.Information:return s.Info;case e.exports.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function h(e){return new r(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function m(e){return{range:h(e.range),text:e.newText}}function x(t){const s=n.CompletionItemKind;switch(t){case e.exports.CompletionItemKind.Text:return s.Text;case e.exports.CompletionItemKind.Method:return s.Method;case e.exports.CompletionItemKind.Function:return s.Function;case e.exports.CompletionItemKind.Constructor:return s.Constructor;case e.exports.CompletionItemKind.Field:return s.Field;case e.exports.CompletionItemKind.Variable:return s.Variable;case e.exports.CompletionItemKind.Class:return s.Class;case e.exports.CompletionItemKind.Interface:return s.Interface;case e.exports.CompletionItemKind.Module:return s.Module;case e.exports.CompletionItemKind.Property:return s.Property;case e.exports.CompletionItemKind.Unit:return s.Unit;case e.exports.CompletionItemKind.Value:return s.Value;case e.exports.CompletionItemKind.Enum:return s.Enum;case e.exports.CompletionItemKind.Keyword:return s.Keyword;case e.exports.CompletionItemKind.Snippet:return s.Snippet;case e.exports.CompletionItemKind.Color:return s.Color;case e.exports.CompletionItemKind.File:return s.File;case e.exports.CompletionItemKind.Reference:return s.Reference;case e.exports.CompletionItemKind.Folder:return s.Folder;case e.exports.CompletionItemKind.EnumMember:return s.EnumMember;case e.exports.CompletionItemKind.Constant:return s.Constant;case e.exports.CompletionItemKind.Struct:return s.Struct;case e.exports.CompletionItemKind.Event:return s.Event;case e.exports.CompletionItemKind.Operator:return s.Operator;case e.exports.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class w{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const i=await this._worker(t.uri),a=this._defaults.getApiContextForModel(t.uri),o=await i.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(s),a),c=t.getWordUntilPosition(s),u=new r(s.lineNumber,c.startColumn,s.lineNumber,c.endColumn),l=o.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:u,kind:x(t.kind)};var r;return t.textEdit&&(s.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:h(t.textEdit.insert),replace:h(t.textEdit.replace)}:h(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(m)),t.insertTextFormat===e.exports.InsertTextFormat.Snippet&&(s.insertTextRules=n.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:o.isIncomplete,suggestions:l}}}class f{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),s=this._defaults.getApiContextForModel(e.uri.toString());return(await t.doFormat(e.uri.toString(),s)).map((e=>({range:h(e.range),text:e.newText})))}}let k,b=new a;class y{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,b=new a),this._client=null}static async waitForWorker(){return await b.promise}async _getClientProxy(){if(!this._client){const{languageId:e}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e},host:this._defaults.workerHost}),b.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}async function v(...e){return await y.waitForWorker(),await new Promise(((t,s)=>{k?t(k(...e)):s(new Error("Arcade not registered!"))}))}const C=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function _(){return C}function F(e){const t=new y(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);k=s,n.setMonarchTokensProvider(e.languageId,g),n.setLanguageConfiguration(e.languageId,l),n.registerCompletionItemProvider(e.languageId,new w(s,e)),n.registerDocumentFormattingEditProvider(e.languageId,new f(s,e)),new p(e.languageId,s,{defaults:e,diagnosticsService:C})}export{_ as getArcadeDiagnosticService,v as getArcadeWorker,F as setupMode}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
|
-
import{F as t,D as i,G as s,H as o,J as e,M as n,N as h}from"./p-bfc1bca8.js";import{g as c}from"./p-3fb08b49.js";var r,a=(t,i)=>t.manager.internals.members?.[i]?.[0],d=Symbol.for("controller");function u(t){r!==t&&(r=t,queueMicrotask((()=>{r===t&&(r=void 0)})))}function f(){return r}var l,v=[];function y(t){if(void 0===t)return void(v=[]);const i=v.indexOf(t);v=-1===i?[...v,t]:v.slice(0,i+1),queueMicrotask((()=>{v=[]}))}var p,g=async(t,i)=>{const s=w(t);if(void 0===s)return t;if(await s.ready,"function"==typeof i){const t=s.watchExports((s=>i(s,t)))}return s.exports},b=async t=>{const i=w(t);return await i.ready,i},w=t=>{const i=function(){const t=l;return l=void 0,t}();if(void 0!==i)return i;const s=f().manager.internals.resolveExports(t);return void 0!==s?s:(t=>"object"==typeof t&&null!==t&&(d in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t)?t:void 0},m={setter:!1,getter:!1,readOnly:!1},_=new WeakMap;p=d;var j=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new i,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[p]=!0,this.ready=this._ready.promise,this._exports=M(this),this._exportWatchers=new Set;const s=t??f();this.component=s,this.component.addController(this),y(this),void 0===this.component.manager||queueMicrotask((()=>this.catchUpLifecycle()))}catchUpLifecycle(){const{manager:t}=this.component;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t._loadCalled||this.triggerLoad().then((()=>{!t.loadedCalled||this.triggerLoaded()})).catch(console.error)}get exports(){return this._exports}set exports(t){const i=this._exports;i!==t&&(this._exports=t,this._exportWatchers.forEach(e),this.connectedCalled&&!1!==this.assignedProperty&&this.component.requestUpdate(this.assignedProperty,i)),this._ready.resolve(t)}setProvisionalExports(t){this._exports=M(t),this._exportWatchers.forEach(e)}watchExports(t){const i=()=>t(this._exports);return this._exportWatchers.add(i),()=>{this._exportWatchers.delete(i)}}get use(){return u(this.component),g}get useRef(){return u(this.component),b}get useRefSync(){return u(this.component),w}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){const t=this;t.hostConnected&&e(t.hostConnected,t),this._callbacks.hostConnected.forEach(e),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&e(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(e),this._lifecycleCleanups.forEach(e),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;const t=this;t.hostLoad&&await s(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(s)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;const t=this;t.hostLoaded&&e(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(e),this.loadedCalled=!0}triggerUpdate(t){const i=this;i.hostUpdate&&e(i.hostUpdate,i,t),this._callbacks.hostUpdate.forEach(k,t)}triggerUpdated(t){const i=this;i.hostUpdated&&e(i.hostUpdated,i,t),this._callbacks.hostUpdated.forEach(k,t)}triggerDestroy(){const t=this;t.hostDestroy&&e(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(e)}triggerLifecycle(){const t=this;t.hostLifecycle&&this._callLifecycle((()=>t.hostLifecycle())),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){u(this.component);const i=e(t);(Array.isArray(i)?i:[i]).forEach((t=>{"function"==typeof t?this._lifecycleCleanups.push(t):"object"==typeof t&&"function"==typeof t.remove&&this._lifecycleCleanups.push(t.remove)}))}};function k(t){e(t,void 0,this)}var L=j;function M(t){if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const i=new Proxy(t,{get(t,s,o){if(!O.has(s)||!(s in t)||t[s]!==i)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,o):void 0},set:(t,i,s,o)=>Reflect.set(t,i,s,o)});return i}var O=new Set(["exports","_exports"]),U=void 0;function x(){Array.from(U?.entries()??[]).forEach((([t,{callbacks:i}])=>{const s=Object.keys(t);i.forEach((t=>t(s)))})),U=void 0}function C(t,i,s){var o;const n=i,h=t.manager.internals;(o=h.allWatchers)[n]??(o[n]=[]);const c=h.allWatchers[n],r=s,a=(t,i,s)=>e(r,null,t,i,s);return c.push(a),()=>{const t=c.indexOf(a);-1!==t&&c.splice(t,1)}}var D=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;const t=this.component.manager.internals;Object.entries(t.members).forEach((([i,[s]])=>{var o;2048&s&&((o=t.setters)[i]??(o[i]=[]),t.setters[i].push(t.readonlySetter))}))},this.trackedValue=P,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this.reactiveUtilsIntegrations=new Set,this._exports=new WeakMap,this.readonlySetter=(t,i,s)=>{if(m.readOnly)return t;throw new Error(`Cannot assign to read-only property "${s}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(t)}"`)},this.component=t}firePropTrackers(t,i){const s=this.keyTrackers;this.trackedValue=P,this.keyTrackers=[],s.forEach((s=>s(t,i)))}getSetProxy(t){const i=this.component,s=i.constructor.prototype;if(this._getSetProxy(s,t,"class"),i.manager.isLit)return;const o=i.el.constructor.prototype;s!==o&&this._getSetProxy(o,t,"html")}_getSetProxy(t,i,s){const o=a(this.component,i);let e;do{e=Object.getOwnPropertyDescriptor(t,i)}while(!e&&(t=Object.getPrototypeOf(t)));if(!e)return;const n=e.get,h=e.set,c=q in n,r=q in h;if(c&&r)return;const d=!c,u=!r,f=d?function(){let t=n.call(this);const s=_.get(this);if(void 0===s)return t;const o=s.manager.internals;t=o.accessorGetter[i](t,i);const e=o.getters[i]??S;for(let s=0;s<e.length;s++)t=e[s](t,i);return t}:n,l=u?function(t){const s=n.call(this),e=_.get(this);if(void 0===e)return void h.call(this,t);let c=e.manager.isLit?t??void 0:function(t,i=8){return null==t||"object"==typeof t||"function"==typeof t?t:4&i?"false"!==t&&(""===t||!!t):2&i?Number.parseFloat(t):1&i?String(t):t}(t,o);const r=e.manager.internals;if(c===s)h.call(this,c);else{const t=m.setter?S:r.setters[i]??S;for(let o=0;o<t.length&&(c=t[o](c,s,i),c!==s);o++);c=r.accessorSetter[i](c,s,i),h.call(this,c),c!==s&&r.enabledWatchers[i]?.forEach((t=>t(c,s,i)))}r.keyTrackers.length>0&&r?.firePropTrackers(i,t)}:h;d&&(f[q]=!0),u&&(l[q]=!0),Object.defineProperty(t,i,{...e,get:f,set:l})}markExports(t,i){("object"==typeof i&&null!==i||"function"==typeof i)&&this._exports.set(i,t)}resolveExports(t){return"object"==typeof t&&null!==t||"function"==typeof t?this._exports.get(t):void 0}},S=[],q=Symbol(),P=Symbol(),R=(t,i)=>new E(t,i),E=class extends L{constructor(s,o){const e="addController"in s,n=new Set,h=s;if(h.addController=function(t){n.add(t),!(d in t)&&s.renderRoot&&s.el.isConnected&&t.hostConnected?.()},h.removeController=function(t){n.delete(t),t.controllerRemoved?.()},!e){const t=o??s.constructor.__forceUpdate;h.requestUpdate=()=>t(s)}super(s),this.internals=new D(this.component),this.destroyed=!1,this._updatePromise=new i,this._originalLifecycles={},this.isLit=e,this.component.manager=this,function(i,s){if(s)i.manager.internals.members=Object.fromEntries(Array.from(i.constructor.elementProperties,(([t,i])=>i.noAccessor?void 0:[t,[(i.readOnly?2048:0)|(i.state?32:16)]])).filter(t));else{const t=i.constructor,s=t.__registerControllers?.(i)??void 0;if(t.__registerControllers=void 0,"object"!=typeof s)throw new Error("Failed to retrieve component meta");i.manager.internals.members=Object.fromEntries(Object.entries(s).filter((([t,[i]])=>!!(63&i))))}}(s,e),this._controllers=n,this.exports=void 0,this.hasDestroy=A in this.component&&"function"==typeof this.component.destroy,this._bindLifecycleMethods();const c=this.internals;Object.keys(c.members).forEach((t=>{c.accessorGetter[t]=$,c.accessorSetter[t]=$,c.getSetProxy(t)})),e?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(s,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),y(void 0),u(s),_.set(s.el,s),_.set(s,s)}_bindLifecycleMethods(){const t=this.component,i=this.isLit,s=t.el===t;this._originalLifecycles={_connectedCallback:i||s?void 0:t.connectedCallback,_disconnectedCallback:i||s?void 0:t.disconnectedCallback,_load:i?t.load:t.componentWillLoad,_loaded:i?t.loaded:t.componentDidLoad,_willUpdate:i?void 0:t.componentWillUpdate,_updated:i?void 0:t.componentDidUpdate,_destroy:t.destroy};const o=this._connectedCallback.bind(this),e=this._disconnectedCallback.bind(this),n=this._update.bind(this),h=this._updated.bind(this);i?t.constructor.prototype.addController.call(t,{hostConnected:o,hostDisconnected:e,hostUpdate:n,hostUpdated:h}):(t.connectedCallback=o,t.disconnectedCallback=e,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=n,t.componentDidUpdate=h),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){const t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${A} prop.`)}void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout);const t=this.internals;t.enabledWatchers=t.allWatchers,x(),t.enableReadonly?.(),this._controllers.forEach(F),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(I),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){const t=this.internals.reactiveUtilsIntegrations;if(t.size>0)for(const i of t)"triggerLoad"in i?await i.triggerLoad():await s(i.hostLoad,i);await Promise.allSettled(Array.from(this._controllers,N,t)),await(this._originalLifecycles._load?.call(this.component)),this.hasDestroy&&C(this.component,A,(()=>this._setAutoDestroyTimeout()))}_loaded(){this._controllers.forEach(W),this._originalLifecycles._loaded?.call(this.component)}_update(){this._controllers.forEach(G,this.component.$changes),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){const t=this.component;if(this._controllers.forEach(H,t.$changes),this._originalLifecycles._updated?.call(this.component),this.isLit)t.$changes=new Map;else{const t=this._updatePromise;this._updatePromise=new i,t.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(J),this._controllers.clear(),await(this._originalLifecycles._destroy?.call(this.component))}}_setAutoDestroyTimeout(){void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout),this.component.el.isConnected||this.component.autoDestroyDisabled||(this._autoDestroyTimeout=o((()=>{this.destroy().catch(console.error)}),T))}},A="autoDestroyDisabled",T=1e3,$=t=>t;function F(t){"triggerConnected"in t?t.triggerConnected():e(t.hostConnected,t)}function I(t){"triggerDisconnected"in t?t.triggerDisconnected():e(t.hostDisconnected,t)}async function N(t){this.has(t)||("triggerLoad"in t?await t.triggerLoad():await s(t.hostLoad,t))}function W(t){"triggerLoaded"in t?t.triggerLoaded():e(t.hostLoaded,t)}function G(t){"triggerUpdate"in t?t.triggerUpdate(this):e(t.hostUpdate,t,this)}function H(t){"triggerUpdated"in t?t.triggerUpdated(this):e(t.hostUpdated,t,this)}function J(t){"triggerDestroy"in t?t.triggerDestroy():e(t.hostDestroy,t)}function z(t,i,s){const o=t.manager.internals;return o.trackedValue!==P&&o.trackedValue!==s&&o.firePropTrackers(void 0,void 0),0===o.keyTrackers.length&&queueMicrotask((()=>o.firePropTrackers(void 0,void 0))),o.trackedValue=s,o.keyTrackers.push(((t,o)=>e(i,void 0,s===o?t:void 0))),s}function B(t,i){const s=f();return z(s,(o=>{const e=o,n=s.manager,h=s,c=h[e];if(null!=c&&c!==t&&"function"==typeof i.set){const s=i.set(c,t,e);if(s!==c)if(n.isLit)h[e]=s;else{let t=!0;n.onConnected((()=>{t&&(t=!0,function(){m.setter=!0;try{return void(h[e]=s)}finally{m.setter=!1}}())}))}}!function(t,i,s){var o,e;const n=s,h=t.manager.internals,c="function"==typeof n.get?n.get:void 0;c&&((o=h.getters)[i]??(o[i]=[]),h.getters[i].unshift(c));const r="ignore"===n.set?Q:n.set;r&&((e=h.setters)[i]??(e[i]=[]),h.setters[i].unshift(r))}(s,e,i)}),t)}var K,Q=(t,i)=>i,V=(K=class extends j{constructor(t,i){super(t);const s=this.exports;try{u(this.component);const t=i(this.component,this),o=this.exports!==s;if(t instanceof Promise){o||this.setProvisionalExports(t);const i=t.then((t=>{this.exports=t,super.catchUpLifecycle()})).catch((t=>{this._ready.reject(t),console.error(t)}));this.onLoad((async()=>await i))}else o&&void 0===t||(this.exports=t),queueMicrotask((()=>super.catchUpLifecycle()))}catch(t){this._ready.reject(t),console.error(t)}}catchUpLifecycle(){}},(...t)=>{const i=v,s=new K(...t),o=s.exports;y(i.at(-1));const n=s.component.manager.internals;var h;return n.markExports(s,o),s.watchExports((t=>n.markExports(s,t))),l!==(h=s)&&(l=h,queueMicrotask((()=>{l===h&&(l=void 0)}))),function(t,i,s){const o=Array.isArray(t)?t:[t];let n=o.length+1;const h=t=>{n-=1,void 0!==t&&(n=Math.min(n,0)),0===n&&i(t)};o.forEach((t=>function(t,i,s){const o=Object.keys(t),n=o.length;void 0===U&&queueMicrotask(x),U??(U=new Map);let h=U.get(t);return void 0===h&&(h={callbacks:[],keyCount:n},U.set(t,h)),h.keyCount!==n&&(h.callbacks.forEach((t=>t(o))),h.callbacks=[],h.keyCount=n),h.callbacks.push((o=>{const h=o[n];e(i,null,void 0===h?void 0:t[h]===s?h:void 0)})),s}(t,(i=>h(void 0===i?void 0:{key:i,host:t,isReactive:!1})),s)));const c=o.find((t=>"manager"in t&&"object"==typeof t.manager&&t.manager.component===t));return c&&z(c,(t=>h(void 0===t?void 0:{key:t,host:c,isReactive:void 0!==a(c,t)})),s),s}([s.component,...i].reverse(),(t=>void 0===t?void 0:function(t,{host:i,key:s,isReactive:o},e){const n=i,h=n[s]!==e;n[s]!==t.exports&&!h&&e!==t.exports&&(n[s]=t.exports);if(i===t.component){if(o){const i=t.component.manager.internals;h&&i.markExports(t,n[s]),C(t.component,s,(s=>{s!==t.exports&&i.markExports(t,s)}))}t.assignedProperty=o?void 0:s}t.watchExports((()=>{if(n[s]===t.exports)return;const i=t.component.manager,o=i.internals.setters[s]?.includes(i.internals.readonlySetter);o?function(){m.readOnly=!0;try{return void(n[s]=t.exports)}finally{m.readOnly=!1}}():n[s]=t.exports}))}(s,t,o)),o)});function X(t,i){if(!i)return t;const s={...t};return Object.entries(i).forEach((([i,o])=>{s[i]="object"==typeof o?X(t[i],o):o??t[i]})),s}const Y=(t=>(i={})=>V(void 0,((s,o)=>{const e=s;function c(t){const i=o.exports,s=i._original??i,e=X(s,t);t&&(e._original=s),o.exports=e}if(queueMicrotask((()=>o.onLifecycle((()=>n(s.el,t("./assets"),(({t9nLocale:t,t9nStrings:i,lang:n})=>{const h={...i,_lang:n,_t9nLocale:t,_loading:!1};o.exports=h;const r=i.componentLabel??i.widgetLabel;"string"==typeof r&&"label"in s&&null==s.label&&(s.label??(s.label=r)),c(e.messageOverrides)}),i.name))))),"messageOverrides"in e&&o.onLifecycle((()=>C(e,"messageOverrides",c))),i.blocking)return o.ready;const r=h(s.el);return{_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0}})))(c);export{Y as a,B as g,R as u}
|
|
6
|
+
import{F as t,D as i,G as s,H as o,J as e,M as n,N as h}from"./p-98b3a749.js";import{g as c}from"./p-3407848d.js";var r,a=(t,i)=>t.manager.internals.members?.[i]?.[0],d=Symbol.for("controller");function u(t){r!==t&&(r=t,queueMicrotask((()=>{r===t&&(r=void 0)})))}function f(){return r}var l,v=[];function y(t){if(void 0===t)return void(v=[]);const i=v.indexOf(t);v=-1===i?[...v,t]:v.slice(0,i+1),queueMicrotask((()=>{v=[]}))}var p,g=async(t,i)=>{const s=w(t);if(void 0===s)return t;if(await s.ready,"function"==typeof i){const t=s.watchExports((s=>i(s,t)))}return s.exports},b=async t=>{const i=w(t);return await i.ready,i},w=t=>{const i=function(){const t=l;return l=void 0,t}();if(void 0!==i)return i;const s=f().manager.internals.resolveExports(t);return void 0!==s?s:(t=>"object"==typeof t&&null!==t&&(d in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t)?t:void 0},m={setter:!1,getter:!1,readOnly:!1},_=new WeakMap;p=d;var j=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new i,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[p]=!0,this.ready=this._ready.promise,this._exports=M(this),this._exportWatchers=new Set;const s=t??f();this.component=s,this.component.addController(this),y(this),void 0===this.component.manager||queueMicrotask((()=>this.catchUpLifecycle()))}catchUpLifecycle(){const{manager:t}=this.component;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t._loadCalled||this.triggerLoad().then((()=>{!t.loadedCalled||this.triggerLoaded()})).catch(console.error)}get exports(){return this._exports}set exports(t){const i=this._exports;i!==t&&(this._exports=t,this._exportWatchers.forEach(e),this.connectedCalled&&!1!==this.assignedProperty&&this.component.requestUpdate(this.assignedProperty,i)),this._ready.resolve(t)}setProvisionalExports(t){this._exports=M(t),this._exportWatchers.forEach(e)}watchExports(t){const i=()=>t(this._exports);return this._exportWatchers.add(i),()=>{this._exportWatchers.delete(i)}}get use(){return u(this.component),g}get useRef(){return u(this.component),b}get useRefSync(){return u(this.component),w}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){const t=this;t.hostConnected&&e(t.hostConnected,t),this._callbacks.hostConnected.forEach(e),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&e(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(e),this._lifecycleCleanups.forEach(e),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;const t=this;t.hostLoad&&await s(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(s)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;const t=this;t.hostLoaded&&e(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(e),this.loadedCalled=!0}triggerUpdate(t){const i=this;i.hostUpdate&&e(i.hostUpdate,i,t),this._callbacks.hostUpdate.forEach(k,t)}triggerUpdated(t){const i=this;i.hostUpdated&&e(i.hostUpdated,i,t),this._callbacks.hostUpdated.forEach(k,t)}triggerDestroy(){const t=this;t.hostDestroy&&e(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(e)}triggerLifecycle(){const t=this;t.hostLifecycle&&this._callLifecycle((()=>t.hostLifecycle())),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){u(this.component);const i=e(t);(Array.isArray(i)?i:[i]).forEach((t=>{"function"==typeof t?this._lifecycleCleanups.push(t):"object"==typeof t&&"function"==typeof t.remove&&this._lifecycleCleanups.push(t.remove)}))}};function k(t){e(t,void 0,this)}var L=j;function M(t){if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const i=new Proxy(t,{get(t,s,o){if(!O.has(s)||!(s in t)||t[s]!==i)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,o):void 0},set:(t,i,s,o)=>Reflect.set(t,i,s,o)});return i}var O=new Set(["exports","_exports"]),U=void 0;function x(){Array.from(U?.entries()??[]).forEach((([t,{callbacks:i}])=>{const s=Object.keys(t);i.forEach((t=>t(s)))})),U=void 0}function C(t,i,s){var o;const n=i,h=t.manager.internals;(o=h.allWatchers)[n]??(o[n]=[]);const c=h.allWatchers[n],r=s,a=(t,i,s)=>e(r,null,t,i,s);return c.push(a),()=>{const t=c.indexOf(a);-1!==t&&c.splice(t,1)}}var D=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;const t=this.component.manager.internals;Object.entries(t.members).forEach((([i,[s]])=>{var o;2048&s&&((o=t.setters)[i]??(o[i]=[]),t.setters[i].push(t.readonlySetter))}))},this.trackedValue=P,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this.reactiveUtilsIntegrations=new Set,this._exports=new WeakMap,this.readonlySetter=(t,i,s)=>{if(m.readOnly)return t;throw new Error(`Cannot assign to read-only property "${s}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(t)}"`)},this.component=t}firePropTrackers(t,i){const s=this.keyTrackers;this.trackedValue=P,this.keyTrackers=[],s.forEach((s=>s(t,i)))}getSetProxy(t){const i=this.component,s=i.constructor.prototype;if(this._getSetProxy(s,t,"class"),i.manager.isLit)return;const o=i.el.constructor.prototype;s!==o&&this._getSetProxy(o,t,"html")}_getSetProxy(t,i,s){const o=a(this.component,i);let e;do{e=Object.getOwnPropertyDescriptor(t,i)}while(!e&&(t=Object.getPrototypeOf(t)));if(!e)return;const n=e.get,h=e.set,c=q in n,r=q in h;if(c&&r)return;const d=!c,u=!r,f=d?function(){let t=n.call(this);const s=_.get(this);if(void 0===s)return t;const o=s.manager.internals;t=o.accessorGetter[i](t,i);const e=o.getters[i]??S;for(let s=0;s<e.length;s++)t=e[s](t,i);return t}:n,l=u?function(t){const s=n.call(this),e=_.get(this);if(void 0===e)return void h.call(this,t);let c=e.manager.isLit?t??void 0:function(t,i=8){return null==t||"object"==typeof t||"function"==typeof t?t:4&i?"false"!==t&&(""===t||!!t):2&i?Number.parseFloat(t):1&i?String(t):t}(t,o);const r=e.manager.internals;if(c===s)h.call(this,c);else{const t=m.setter?S:r.setters[i]??S;for(let o=0;o<t.length&&(c=t[o](c,s,i),c!==s);o++);c=r.accessorSetter[i](c,s,i),h.call(this,c),c!==s&&r.enabledWatchers[i]?.forEach((t=>t(c,s,i)))}r.keyTrackers.length>0&&r?.firePropTrackers(i,t)}:h;d&&(f[q]=!0),u&&(l[q]=!0),Object.defineProperty(t,i,{...e,get:f,set:l})}markExports(t,i){("object"==typeof i&&null!==i||"function"==typeof i)&&this._exports.set(i,t)}resolveExports(t){return"object"==typeof t&&null!==t||"function"==typeof t?this._exports.get(t):void 0}},S=[],q=Symbol(),P=Symbol(),R=(t,i)=>new E(t,i),E=class extends L{constructor(s,o){const e="addController"in s,n=new Set,h=s;if(h.addController=function(t){n.add(t),!(d in t)&&s.renderRoot&&s.el.isConnected&&t.hostConnected?.()},h.removeController=function(t){n.delete(t),t.controllerRemoved?.()},!e){const t=o??s.constructor.__forceUpdate;h.requestUpdate=()=>t(s)}super(s),this.internals=new D(this.component),this.destroyed=!1,this._updatePromise=new i,this._originalLifecycles={},this.isLit=e,this.component.manager=this,function(i,s){if(s)i.manager.internals.members=Object.fromEntries(Array.from(i.constructor.elementProperties,(([t,i])=>i.noAccessor?void 0:[t,[(i.readOnly?2048:0)|(i.state?32:16)]])).filter(t));else{const t=i.constructor,s=t.__registerControllers?.(i)??void 0;if(t.__registerControllers=void 0,"object"!=typeof s)throw new Error("Failed to retrieve component meta");i.manager.internals.members=Object.fromEntries(Object.entries(s).filter((([t,[i]])=>!!(63&i))))}}(s,e),this._controllers=n,this.exports=void 0,this.hasDestroy=A in this.component&&"function"==typeof this.component.destroy,this._bindLifecycleMethods();const c=this.internals;Object.keys(c.members).forEach((t=>{c.accessorGetter[t]=$,c.accessorSetter[t]=$,c.getSetProxy(t)})),e?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(s,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),y(void 0),u(s),_.set(s.el,s),_.set(s,s)}_bindLifecycleMethods(){const t=this.component,i=this.isLit,s=t.el===t;this._originalLifecycles={_connectedCallback:i||s?void 0:t.connectedCallback,_disconnectedCallback:i||s?void 0:t.disconnectedCallback,_load:i?t.load:t.componentWillLoad,_loaded:i?t.loaded:t.componentDidLoad,_willUpdate:i?void 0:t.componentWillUpdate,_updated:i?void 0:t.componentDidUpdate,_destroy:t.destroy};const o=this._connectedCallback.bind(this),e=this._disconnectedCallback.bind(this),n=this._update.bind(this),h=this._updated.bind(this);i?t.constructor.prototype.addController.call(t,{hostConnected:o,hostDisconnected:e,hostUpdate:n,hostUpdated:h}):(t.connectedCallback=o,t.disconnectedCallback=e,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=n,t.componentDidUpdate=h),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){const t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${A} prop.`)}void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout);const t=this.internals;t.enabledWatchers=t.allWatchers,x(),t.enableReadonly?.(),this._controllers.forEach(F),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(I),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){const t=this.internals.reactiveUtilsIntegrations;if(t.size>0)for(const i of t)"triggerLoad"in i?await i.triggerLoad():await s(i.hostLoad,i);await Promise.allSettled(Array.from(this._controllers,N,t)),await(this._originalLifecycles._load?.call(this.component)),this.hasDestroy&&C(this.component,A,(()=>this._setAutoDestroyTimeout()))}_loaded(){this._controllers.forEach(W),this._originalLifecycles._loaded?.call(this.component)}_update(){this._controllers.forEach(G,this.component.$changes),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){const t=this.component;if(this._controllers.forEach(H,t.$changes),this._originalLifecycles._updated?.call(this.component),this.isLit)t.$changes=new Map;else{const t=this._updatePromise;this._updatePromise=new i,t.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(J),this._controllers.clear(),await(this._originalLifecycles._destroy?.call(this.component))}}_setAutoDestroyTimeout(){void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout),this.component.el.isConnected||this.component.autoDestroyDisabled||(this._autoDestroyTimeout=o((()=>{this.destroy().catch(console.error)}),T))}},A="autoDestroyDisabled",T=1e3,$=t=>t;function F(t){"triggerConnected"in t?t.triggerConnected():e(t.hostConnected,t)}function I(t){"triggerDisconnected"in t?t.triggerDisconnected():e(t.hostDisconnected,t)}async function N(t){this.has(t)||("triggerLoad"in t?await t.triggerLoad():await s(t.hostLoad,t))}function W(t){"triggerLoaded"in t?t.triggerLoaded():e(t.hostLoaded,t)}function G(t){"triggerUpdate"in t?t.triggerUpdate(this):e(t.hostUpdate,t,this)}function H(t){"triggerUpdated"in t?t.triggerUpdated(this):e(t.hostUpdated,t,this)}function J(t){"triggerDestroy"in t?t.triggerDestroy():e(t.hostDestroy,t)}function z(t,i,s){const o=t.manager.internals;return o.trackedValue!==P&&o.trackedValue!==s&&o.firePropTrackers(void 0,void 0),0===o.keyTrackers.length&&queueMicrotask((()=>o.firePropTrackers(void 0,void 0))),o.trackedValue=s,o.keyTrackers.push(((t,o)=>e(i,void 0,s===o?t:void 0))),s}function B(t,i){const s=f();return z(s,(o=>{const e=o,n=s.manager,h=s,c=h[e];if(null!=c&&c!==t&&"function"==typeof i.set){const s=i.set(c,t,e);if(s!==c)if(n.isLit)h[e]=s;else{let t=!0;n.onConnected((()=>{t&&(t=!0,function(){m.setter=!0;try{return void(h[e]=s)}finally{m.setter=!1}}())}))}}!function(t,i,s){var o,e;const n=s,h=t.manager.internals,c="function"==typeof n.get?n.get:void 0;c&&((o=h.getters)[i]??(o[i]=[]),h.getters[i].unshift(c));const r="ignore"===n.set?Q:n.set;r&&((e=h.setters)[i]??(e[i]=[]),h.setters[i].unshift(r))}(s,e,i)}),t)}var K,Q=(t,i)=>i,V=(K=class extends j{constructor(t,i){super(t);const s=this.exports;try{u(this.component);const t=i(this.component,this),o=this.exports!==s;if(t instanceof Promise){o||this.setProvisionalExports(t);const i=t.then((t=>{this.exports=t,super.catchUpLifecycle()})).catch((t=>{this._ready.reject(t),console.error(t)}));this.onLoad((async()=>await i))}else o&&void 0===t||(this.exports=t),queueMicrotask((()=>super.catchUpLifecycle()))}catch(t){this._ready.reject(t),console.error(t)}}catchUpLifecycle(){}},(...t)=>{const i=v,s=new K(...t),o=s.exports;y(i.at(-1));const n=s.component.manager.internals;var h;return n.markExports(s,o),s.watchExports((t=>n.markExports(s,t))),l!==(h=s)&&(l=h,queueMicrotask((()=>{l===h&&(l=void 0)}))),function(t,i,s){const o=Array.isArray(t)?t:[t];let n=o.length+1;const h=t=>{n-=1,void 0!==t&&(n=Math.min(n,0)),0===n&&i(t)};o.forEach((t=>function(t,i,s){const o=Object.keys(t),n=o.length;void 0===U&&queueMicrotask(x),U??(U=new Map);let h=U.get(t);return void 0===h&&(h={callbacks:[],keyCount:n},U.set(t,h)),h.keyCount!==n&&(h.callbacks.forEach((t=>t(o))),h.callbacks=[],h.keyCount=n),h.callbacks.push((o=>{const h=o[n];e(i,null,void 0===h?void 0:t[h]===s?h:void 0)})),s}(t,(i=>h(void 0===i?void 0:{key:i,host:t,isReactive:!1})),s)));const c=o.find((t=>"manager"in t&&"object"==typeof t.manager&&t.manager.component===t));return c&&z(c,(t=>h(void 0===t?void 0:{key:t,host:c,isReactive:void 0!==a(c,t)})),s),s}([s.component,...i].reverse(),(t=>void 0===t?void 0:function(t,{host:i,key:s,isReactive:o},e){const n=i,h=n[s]!==e;n[s]!==t.exports&&!h&&e!==t.exports&&(n[s]=t.exports);if(i===t.component){if(o){const i=t.component.manager.internals;h&&i.markExports(t,n[s]),C(t.component,s,(s=>{s!==t.exports&&i.markExports(t,s)}))}t.assignedProperty=o?void 0:s}t.watchExports((()=>{if(n[s]===t.exports)return;const i=t.component.manager,o=i.internals.setters[s]?.includes(i.internals.readonlySetter);o?function(){m.readOnly=!0;try{return void(n[s]=t.exports)}finally{m.readOnly=!1}}():n[s]=t.exports}))}(s,t,o)),o)});function X(t,i){if(!i)return t;const s={...t};return Object.entries(i).forEach((([i,o])=>{s[i]="object"==typeof o?X(t[i],o):o??t[i]})),s}const Y=(t=>(i={})=>V(void 0,((s,o)=>{const e=s;function c(t){const i=o.exports,s=i._original??i,e=X(s,t);t&&(e._original=s),o.exports=e}if(queueMicrotask((()=>o.onLifecycle((()=>n(s.el,t("./assets"),(({t9nLocale:t,t9nStrings:i,lang:n})=>{const h={...i,_lang:n,_t9nLocale:t,_loading:!1};o.exports=h;const r=i.componentLabel??i.widgetLabel;"string"==typeof r&&"label"in s&&null==s.label&&(s.label??(s.label=r)),c(e.messageOverrides)}),i.name))))),"messageOverrides"in e&&o.onLifecycle((()=>C(e,"messageOverrides",c))),i.blocking)return o.ready;const r=h(s.el);return{_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0}})))(c);export{Y as a,B as g,R as u}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
|
-
import{O as e}from"./p-
|
|
6
|
+
import{O as e}from"./p-98b3a749.js";import"./p-3407848d.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const sqlExprDefaults = require('./sql-expr-defaults-
|
|
9
|
-
const index = require('./index-
|
|
8
|
+
const sqlExprDefaults = require('./sql-expr-defaults-508276bc.js');
|
|
9
|
+
const index = require('./index-8eb4e2d1.js');
|
|
10
10
|
|
|
11
11
|
// #region convert editor profile to apiProfile
|
|
12
12
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const sqlExprDefaults = require('./sql-expr-defaults-
|
|
9
|
-
require('./index-
|
|
8
|
+
const sqlExprDefaults = require('./sql-expr-defaults-508276bc.js');
|
|
9
|
+
require('./index-8eb4e2d1.js');
|
|
10
10
|
|
|
11
11
|
var V={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},xe=["++","--"],Ge=["-","+","!","~"],Je=["=","/=","*=","%=","+=","-="],Qe=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];xe.forEach(e=>U[e.length-1]?.push(e));Ge.forEach(e=>U[e.length-1]?.push(e));Qe.forEach(e=>U[e.length-1]?.push(e));Je.forEach(e=>U[e.length-1]?.push(e));Lt.forEach(e=>U[e.length-1]?.push(e));var lt=Object.values(f),pt=Object.values(V);pt.map(e=>({label:e,kind:sqlExprDefaults.main.exports.CompletionItemKind.Constant}));lt.map(e=>({label:e,kind:sqlExprDefaults.main.exports.CompletionItemKind.Keyword}));
|
|
12
12
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const index = require('./index-
|
|
11
|
-
const sqlExprDefaults = require('./sql-expr-defaults-
|
|
12
|
-
const useT9n = require('./useT9n-
|
|
13
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
10
|
+
const index = require('./index-8eb4e2d1.js');
|
|
11
|
+
const sqlExprDefaults = require('./sql-expr-defaults-508276bc.js');
|
|
12
|
+
const useT9n = require('./useT9n-d3c22597.js');
|
|
13
|
+
const arcadeDefaults = require('./arcade-defaults-eebcc938.js');
|
|
14
14
|
|
|
15
15
|
const DevelopersWebSitePath = "https://developers.arcgis.com/arcade/";
|
|
16
16
|
const MaxArrayItems = 100;
|
|
@@ -307,7 +307,7 @@ async function getArcadeDiagnosticService() {
|
|
|
307
307
|
* @returns arcade mode module
|
|
308
308
|
*/
|
|
309
309
|
async function getMode$1() {
|
|
310
|
-
return await Promise.resolve().then(function () { return require('./arcade-mode-
|
|
310
|
+
return await Promise.resolve().then(function () { return require('./arcade-mode-be827eb4.js'); });
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
const arcadeEditorCss = "arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}arcgis-arcade-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-arcade-editor .flex-panel{flex:1 0 auto}arcgis-arcade-editor .position-relative{position:relative}arcgis-arcade-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-arcade-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-arcade-editor .border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}arcgis-arcade-editor .border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}arcgis-arcade-editor .sticky{position:sticky;top:0px;z-index:10}arcgis-arcade-editor .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}arcgis-arcade-editor .side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}arcgis-arcade-editor .side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w)}arcgis-arcade-editor .side-panel calcite-flow{height:100%}arcgis-arcade-editor .main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto}arcgis-arcade-editor .main-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group:last-child{border-inline-end-width:0px}arcgis-arcade-editor .main-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}arcgis-arcade-editor arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}arcgis-arcade-editor calcite-flow [slot=footer]{word-break:break-word}";
|
|
@@ -3957,7 +3957,7 @@ sqlExprDefaults.languages.onLanguage(arcadeDefaults.arcadeDefaults.languageId, (
|
|
|
3957
3957
|
* @returns sql-expression mode module
|
|
3958
3958
|
*/
|
|
3959
3959
|
async function getMode() {
|
|
3960
|
-
return await Promise.resolve().then(function () { return require('./sql-expr-mode-
|
|
3960
|
+
return await Promise.resolve().then(function () { return require('./sql-expr-mode-8a1c9f15.js'); });
|
|
3961
3961
|
}
|
|
3962
3962
|
|
|
3963
3963
|
// Register the language in Monaco
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const index = require('./index-
|
|
11
|
-
const appGlobals = require('./app-globals-
|
|
10
|
+
const index = require('./index-8eb4e2d1.js');
|
|
11
|
+
const appGlobals = require('./app-globals-2c54b2b6.js');
|
|
12
12
|
|
|
13
13
|
/*
|
|
14
14
|
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const index = require('./index-
|
|
11
|
-
const useT9n = require('./useT9n-
|
|
12
|
-
const sqlExprDefaults = require('./sql-expr-defaults-
|
|
10
|
+
const index = require('./index-8eb4e2d1.js');
|
|
11
|
+
const useT9n = require('./useT9n-d3c22597.js');
|
|
12
|
+
const sqlExprDefaults = require('./sql-expr-defaults-508276bc.js');
|
|
13
13
|
|
|
14
14
|
const sqlExpressionEditorCss = "arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}arcgis-sql-expression-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-sql-expression-editor .flex-panel{flex:1 0 auto}arcgis-sql-expression-editor .position-relative{position:relative}arcgis-sql-expression-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-sql-expression-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-sql-expression-editor .border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}arcgis-sql-expression-editor .border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}arcgis-sql-expression-editor .side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}arcgis-sql-expression-editor .side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w)}arcgis-sql-expression-editor .side-panel calcite-flow{height:100%}";
|
|
15
15
|
const ArcgisSqlExpressionEditorStyle0 = sqlExpressionEditorCss;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const index = require('./index-
|
|
11
|
-
const useT9n = require('./useT9n-
|
|
12
|
-
const sqlExprDefaults = require('./sql-expr-defaults-
|
|
10
|
+
const index = require('./index-8eb4e2d1.js');
|
|
11
|
+
const useT9n = require('./useT9n-d3c22597.js');
|
|
12
|
+
const sqlExprDefaults = require('./sql-expr-defaults-508276bc.js');
|
|
13
13
|
|
|
14
14
|
const sqlExpressionFieldsCss = ":host calcite-flow{height:100%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
|
|
15
15
|
const ArcgisSqlExpressionFieldsStyle0 = sqlExpressionFieldsCss;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.
|
|
4
|
+
* v4.31.6
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const sqlExprDefaults = require('./sql-expr-defaults-
|
|
9
|
-
require('./index-
|
|
8
|
+
const sqlExprDefaults = require('./sql-expr-defaults-508276bc.js');
|
|
9
|
+
require('./index-8eb4e2d1.js');
|
|
10
10
|
|
|
11
11
|
/*!-----------------------------------------------------------------------------
|
|
12
12
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|