@kusto/monaco-kusto 13.0.2 → 13.1.0

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.
@@ -1,15 +1,15 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.2(e6cccc4de83964ccb5eb5b66e79d61333b0dc314)
3
+ * monaco-kusto version: 13.1.0(e13e2f4e51f8298799cd0893607366337e0bfa53)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
8
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
9
9
  import { editor } from 'monaco-editor/esm/vs/editor/editor.api';
10
- import { T as Token, L as LANGUAGE_ID } from './globals-ac8b7ea1.js';
11
- import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-0a4e5e41.js';
12
- export { s as showSchema } from './schema-0a4e5e41.js';
10
+ import { T as Token, L as LANGUAGE_ID } from './globals-7cadf160.js';
11
+ import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-36aecac4.js';
12
+ export { s as showSchema } from './schema-36aecac4.js';
13
13
 
14
14
  function getCurrentCommandRange(editor, cursorPosition) {
15
15
  const zeroBasedCursorLineNumber = cursorPosition.lineNumber - 1;
@@ -139,6 +139,34 @@ class KustoCommandFormatter {
139
139
  }
140
140
  }
141
141
 
142
+ function dateStringWrapper(editor) {
143
+ editor.onDidPaste(event => {
144
+ const {
145
+ range
146
+ } = event;
147
+ if (!range) return;
148
+ const model = editor.getModel();
149
+ const pasted = model.getValueInRange(range);
150
+ if (!isBareIsoDate(pasted)) return;
151
+ const wrapped = `datetime(${pasted})`;
152
+ const edit = {
153
+ range,
154
+ text: wrapped,
155
+ forceMoveMarkers: true
156
+ };
157
+ const cursorStateComputer = () => {
158
+ const startOffset = model.getOffsetAt(range.getStartPosition());
159
+ const endPos = model.getPositionAt(startOffset + wrapped.length);
160
+ return [new monaco.Selection(endPos.lineNumber, endPos.column, endPos.lineNumber, endPos.column)];
161
+ };
162
+ editor.executeEdits('paste-date', [edit], cursorStateComputer);
163
+ });
164
+ }
165
+ function isBareIsoDate(text) {
166
+ const s = text.trim();
167
+ return /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}Z)?$/.test(s);
168
+ }
169
+
142
170
  let ThemeName = /*#__PURE__*/function (ThemeName) {
143
171
  ThemeName["light"] = "kusto-light";
144
172
  ThemeName["dark"] = "kusto-dark";
@@ -361,6 +389,69 @@ function getRangeHtml(model, range) {
361
389
  return colorizedLines.join('<br/>');
362
390
  }
363
391
 
392
+ /**
393
+ * Registers a Kusto-specific action to close the IntelliSense suggestions popup.
394
+ *
395
+ * Note:
396
+ * We register the action on the first cursor movement, not on editor creation,
397
+ * because Monaco fires 'onDidCreateEditor' before the keybinding service is fully initialized.
398
+ * Waiting for a cursor event guarantees that the editor is fully ready
399
+ * and allows safe registration of actions with keybindings.
400
+ */
401
+ class CaseInvertor {
402
+ actionsRegistered = false;
403
+ constructor(editor) {
404
+ this.editor = editor;
405
+ this.ctrlKeyMod = this.isMac() ? monaco.KeyMod.WinCtrl : monaco.KeyMod.CtrlCmd;
406
+ this.editor.onDidChangeCursorSelection(() => {
407
+ if (this.editor.getModel()?.getLanguageId() !== 'kusto') {
408
+ return;
409
+ }
410
+ if (!this.actionsRegistered) {
411
+ this.registerUpperCaseHandler();
412
+ this.registerLowerCaseHandler();
413
+ this.actionsRegistered = true;
414
+ }
415
+ });
416
+ }
417
+ registerUpperCaseHandler() {
418
+ this.editor.addAction({
419
+ id: 'kusto.toUpperCase',
420
+ label: 'To Upper Case',
421
+ keybindings: [this.ctrlKeyMod | monaco.KeyMod.Shift | monaco.KeyCode.KeyU],
422
+ run: editor => {
423
+ const selectedRange = editor.getSelection();
424
+ const selectedText = editor.getModel().getValueInRange(selectedRange);
425
+ const upperCaseText = selectedText.toUpperCase();
426
+ editor.executeEdits('toUpperCase', [{
427
+ range: selectedRange,
428
+ text: upperCaseText
429
+ }]);
430
+ }
431
+ });
432
+ }
433
+ registerLowerCaseHandler() {
434
+ this.editor.addAction({
435
+ id: 'kusto.toLowerCase',
436
+ label: 'To Lower Case',
437
+ keybindings: [this.ctrlKeyMod | monaco.KeyMod.Shift | monaco.KeyCode.KeyL],
438
+ run: editor => {
439
+ const selectedRange = editor.getSelection();
440
+ const selectedText = editor.getModel().getValueInRange(selectedRange);
441
+ const lowerCaseText = selectedText.toLowerCase();
442
+ editor.executeEdits('toLowerCase', [{
443
+ range: selectedRange,
444
+ text: lowerCaseText
445
+ }]);
446
+ }
447
+ });
448
+ }
449
+ isMac() {
450
+ const uaData = navigator.userAgentData;
451
+ return uaData ? uaData.platform === 'macOS' : /Mac|iPod|iPhone|iPad/.test(navigator.platform);
452
+ }
453
+ }
454
+
364
455
  // --- Kusto configuration and defaults ---------
365
456
 
366
457
  class LanguageServiceDefaultsImpl {
@@ -454,8 +545,10 @@ monaco.editor.onDidCreateEditor(editor => {
454
545
  new KustoCommandHighlighter(editor);
455
546
  if (isStandaloneCodeEditor(editor)) {
456
547
  new KustoCommandFormatter(editor);
548
+ new CaseInvertor(editor);
457
549
  }
458
550
  triggerSuggestDialogWhenCompletionItemSelected(editor);
551
+ dateStringWrapper(editor);
459
552
  });
460
553
  function triggerSuggestDialogWhenCompletionItemSelected(editor) {
461
554
  editor.onDidChangeCursorSelection(event => {
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.2(e6cccc4de83964ccb5eb5b66e79d61333b0dc314)
3
+ * monaco-kusto version: 13.1.0(e13e2f4e51f8298799cd0893607366337e0bfa53)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -1,7 +1,7 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.2(e6cccc4de83964ccb5eb5b66e79d61333b0dc314)
3
+ * monaco-kusto version: 13.1.0(e13e2f4e51f8298799cd0893607366337e0bfa53)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
- define("vs/language/kusto/kustoMode",["exports","vs/editor/editor.main","./main-0cb1ed3d","./types-48ca9ca8"],(function(t,e,r,n){"use strict";function o(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var i=o(e),a=["onDidProvideCompletionItems"];function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:O(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function _(){}var x={};f(x,a,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(A([])));L&&L!==r&&n.call(L,a)&&(x=L);var S=_.prototype=b.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var s=p(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=d;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=I(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=_,o(S,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},E(j.prototype),f(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new j(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(S),f(S,l,"Generator"),f(S,a,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){s(i,n,o,a,u,"next",t)}function u(t){s(i,n,o,a,u,"throw",t)}a(void 0)}))}}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function h(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}var p=function(){return t=function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._monacoInstance=e,this._defaults=r,this._idleCheckInterval=self.setInterval((function(){return n._checkIfIdle()}),3e4),this._configChangeListener=this._defaults.onDidChange((function(){return n._saveStateAndStopWorker()}))},e=[{key:"_stopWorker",value:function(){var t=this._workerDetails;this._workerDetailsPromise=null,this._workerDetails=null,setTimeout(l(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t._worker&&t._worker.dispose();case 1:case"end":return e.stop()}}),e)}))),5e3)}},{key:"_saveStateAndStopWorker",value:function(){var t,e,r=this;null!==(t=this._workerDetails)&&void 0!==t&&t._worker&&(null===(e=this._workerDetails)||void 0===e||e._worker.getProxy().then((function(t){t.getSchema().then((function(t){r._storedState={schema:t},r._stopWorker()}))})))}},{key:"dispose",value:function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}},{key:"_checkIfIdle",value:function(){var t,e;if(null!==(t=this._workerDetails)&&void 0!==t&&t._worker){var r=this._defaults.getWorkerMaxIdleTime(),n=Date.now()-(null===(e=this._workerDetails)||void 0===e?void 0:e._lastUsedTime);r>0&&n>r&&this._saveStateAndStopWorker()}}},{key:"_getClient",value:function(){var t=this,e=this._defaults.languageSettings;e.onDidProvideCompletionItems;var r=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(e,a);if(!this._workerDetailsPromise){var n=this._monacoInstance.editor.createWebWorker({moduleId:"vs/language/kusto/kustoWorker",label:"kusto",createData:{languageSettings:r,languageId:"kusto"}}),o=n.getProxy().then((function(e){return t._storedState?e.setSchema(t._storedState.schema).then((function(){return e})):e}));this._workerDetailsPromise=o.then((function(e){return t._workerDetails={_worker:n,_client:e,_lastUsedTime:Date.now()},t._workerDetails}))}return this._workerDetailsPromise}},{key:"getLanguageServiceWorker",value:function(){for(var t,e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this._getClient().then((function(e){t=e._client})).then((function(t){var r;return null===(r=e._workerDetails)||void 0===r||null===(r=r._worker)||void 0===r?void 0:r.withSyncedResources(n)})).then((function(e){return t}))}}],e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function y(t){var e=d(t);return null!=t&&("object"==e||"function"==e)}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}var m="object"==("undefined"==typeof global?"undefined":v(global))&&global&&global.Object===Object&&global;function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}var b="object"==("undefined"==typeof self?"undefined":g(self))&&self&&self.Object===Object&&self,w=m||b||Function("return this")(),_=function(){return w.Date.now()},x=/\s/;var k=/^\s+/;function L(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&x.test(t.charAt(e)););return e}(t)+1).replace(k,""):t}var S=w.Symbol,E=Object.prototype,j=E.hasOwnProperty,O=E.toString,I=S?S.toStringTag:void 0;var P=Object.prototype.toString;var T="[object Null]",C="[object Undefined]",A=S?S.toStringTag:void 0;function N(t){return null==t?void 0===t?C:T:A&&A in Object(t)?function(t){var e=j.call(t,I),r=t[I];try{t[I]=void 0;var n=!0}catch(t){}var o=O.call(t);return n&&(e?t[I]=r:delete t[I]),o}(t):function(t){return P.call(t)}(t)}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}var F="[object Symbol]";function M(t){return"symbol"==G(t)||function(t){return null!=t&&"object"==D(t)}(t)&&N(t)==F}var U=NaN,K=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,V=/^0o[0-7]+$/i,W=parseInt;function q(t){if("number"==typeof t)return t;if(M(t))return U;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=L(t);var r=R.test(t);return r||V.test(t)?W(t.slice(2),r?2:8):K.test(t)?U:+t}var z=Math.max,Y=Math.min;function $(t,e,r){var n,o,i,a,u,c,s=0,l=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var r=n,i=o;return n=o=void 0,s=e,a=t.apply(i,r)}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-s>=i}function v(){var t=_();if(d(t))return m(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?Y(r,i-(t-s)):r}(t))}function m(t){return u=void 0,h&&n?p(t):(n=o=void 0,a)}function g(){var t=_(),r=d(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return function(t){return s=t,u=setTimeout(v,e),l?p(t):a}(c);if(f)return clearTimeout(u),u=setTimeout(v,e),p(c)}return void 0===u&&(u=setTimeout(v,e)),a}return e=q(e)||0,y(r)&&(l=!!r.leading,i=(f="maxWait"in r)?z(q(r.maxWait)||0,e):i,h="trailing"in r?!!r.trailing:h),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},g.flush=function(){return void 0===u?a:m(_())},g}function H(t,e){return t&&e.filterText.toLowerCase().includes(t.toLowerCase())?"".concat(t).concat(e.filterText):e.filterText}function Q(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=J(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function Z(t){return function(t){if(Array.isArray(t))return X(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||J(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){if(t){if("string"==typeof t)return X(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(t,e):void 0}}function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */tt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var k=b.prototype=m.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==B(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?y:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(B(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),s(k,c,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function et(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){et(i,n,o,a,u,"next",t)}function u(t){et(i,n,o,a,u,"throw",t)}a(void 0)}))}}function nt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ot(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ut(n.key),n)}}function it(t,e,r){return e&&ot(t.prototype,e),r&&ot(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function at(t,e,r){return(e=ut(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ut(t){var e=function(t,e){if("object"!=B(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==B(e)?e:e+""}var ct=function(){return it((function t(e,r,n,o,a){var u=this;nt(this,t),at(this,"_disposables",[]),at(this,"_contentListener",Object.create(null)),at(this,"_configurationListener",Object.create(null)),at(this,"_schemaListener",Object.create(null)),at(this,"_cursorListener",Object.create(null)),at(this,"_debouncedValidations",Object.create(null)),this._monacoInstance=e,this._languageId=r,this._worker=n,this.defaults=o;var c,s=function(t){var e=t.getLanguageId(),r=t.uri.toString();if(e===u._languageId){var n=u.getOrCreateDebouncedValidation(t,e);u._contentListener[r]=t.onDidChangeContent((function(t){var e=function(t){return t.changes.map((function(t){return{start:t.rangeOffset,end:t.rangeOffset+t.text.length}}))}(t);n(e)})),u._configurationListener[r]=u.defaults.onDidChange((function(){self.setTimeout((function(){return u._doValidate(t,e,[])}),0)})),u._schemaListener[r]=a((function(){self.setTimeout((function(){return u._doValidate(t,e,[])}),0)}))}},l=function(t){var e=t.getId();u._cursorListener[e]||(t.onDidDispose((function(){var t;null===(t=u._cursorListener[e])||void 0===t||t.dispose(),delete u._cursorListener[e]})),u._cursorListener[e]=t.onDidChangeCursorSelection((function(e){var r=t.getModel(),n=r.getLanguageId();if(n===u._languageId){var o=r.getOffsetAt(e.selection.getPosition());u.getOrCreateDebouncedValidation(r,n)([{start:o,end:o}])}})))},f=function(t){u._monacoInstance.editor.setModelMarkers(t,u._languageId,[]);var e=t.uri.toString(),r=u._contentListener[e];r&&(r.dispose(),delete u._contentListener[e]);var n=u._configurationListener[e];n&&(n.dispose(),delete u._configurationListener[e]);var o=u._schemaListener[e];o&&(o.dispose(),delete u._schemaListener[e]);var i=u._debouncedValidations[e];i&&(i.cancel(),delete u._debouncedValidations[e])};this.defaults.languageSettings.enableQuickFixes&&this._disposables.push(i.languages.registerCodeActionProvider(this._languageId,{provideCodeActions:(c=rt(tt().mark((function t(e,r,n,o){var i,a,c,s;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.getOffsetAt(r.getStartPosition()),a=e.getOffsetAt(r.getEndPosition()),c=n.markers.length>0,t.next=5,u.getMonacoCodeActions(e,i,a,c);case 5:return s=t.sent,t.abrupt("return",{actions:s,dispose:function(){}});case 7:case"end":return t.stop()}}),t)}))),function(t,e,r,n){return c.apply(this,arguments)})})),this._disposables.push(this._monacoInstance.editor.onDidCreateEditor(l)),this._disposables.push(this._monacoInstance.editor.onDidCreateModel(s)),this._disposables.push(this._monacoInstance.editor.onWillDisposeModel(f)),this._disposables.push(this._monacoInstance.editor.onDidChangeModelLanguage((function(t){f(t.model),s(t.model)}))),this._disposables.push({dispose:function(){for(var t in u._contentListener)u._contentListener[t].dispose();for(var e in u._cursorListener)u._cursorListener[e].dispose();for(var r in u._debouncedValidations)u._debouncedValidations[r].cancel()}}),this._monacoInstance.editor.getModels().forEach(s),this._monacoInstance.editor.getEditors().forEach(l)}),[{key:"getMonacoCodeActions",value:(t=rt(tt().mark((function t(e,r,n,o){var i,a,u,c,s,l,f,h=this;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=[],t.next=3,this._worker(e.uri);case 3:return a=t.sent,u=e.uri,t.next=7,a.getResultActions(u.toString(),r,n);case 7:c=t.sent,s=tt().mark((function t(){var r,n,a,u,s;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=c[f]).kind.includes("Extract Function")){t.next=3;break}return t.abrupt("return",0);case 3:if("quickfix"!=(a=null!==(r=h.defaults.languageSettings.quickFixCodeActions)&&void 0!==r&&r.find((function(t){return n.kind.includes(t)}))?"quickfix":"custom")||o){t.next=6;break}return t.abrupt("return",{v:void 0});case 6:u=n.changes,s=u.map((function(t){var r,n=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.deleteLength);return{resource:e.uri,textEdit:{range:{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:o.lineNumber,endColumn:o.column},text:null!==(r=t.insertText)&&void 0!==r?r:""}}})),i.push({title:n.title,diagnostics:[],kind:a,edit:{edits:Z(s)}});case 9:case"end":return t.stop()}}),t)})),f=0;case 10:if(!(f<c.length)){t.next=20;break}return t.delegateYield(s(),"t0",12);case 12:if(0!==(l=t.t0)){t.next=15;break}return t.abrupt("continue",17);case 15:if(!l){t.next=17;break}return t.abrupt("return",l.v);case 17:f++,t.next=10;break;case 20:return t.abrupt("return",i);case 21:case"end":return t.stop()}}),t,this)}))),function(e,r,n,o){return t.apply(this,arguments)})},{key:"getOrCreateDebouncedValidation",value:function(t,e){var r=this,n=t.uri.toString();return this._debouncedValidations[n]||(this._debouncedValidations[n]=$((function(n){return r._doValidate(t,e,n)}),500)),this._debouncedValidations[n]}},{key:"dispose",value:function(){this._disposables.forEach((function(t){return t&&t.dispose()})),this._disposables=[]}},{key:"_doValidate",value:function(t,e,r){var n=this;if(!t.isDisposed()){var o=t.uri,a=t.getVersionId();this._worker(o).then((function(t){return t.doValidation(o.toString(),r)})).then((function(t){if(n._monacoInstance.editor.getModel(o).getVersionId()===a){var r=t.map((function(t){return r="number"==typeof(e=t).code?String(e.code):e.code,{severity:st(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:r,source:e.source};var e,r})),u=n._monacoInstance.editor.getModel(o),c=u.getAllDecorations().filter((function(t){return"squiggly-error"==t.options.className})).map((function(t){return t.id}));if(u&&u.getLanguageId()===e){var s=n.defaults.languageSettings.syntaxErrorAsMarkDown;if(s&&s.enableSyntaxErrorAsMarkDown){var l=s.header?"**".concat(s.header,"** \n\n"):"",f=s.icon?"![](".concat(s.icon,")"):"",h="".concat(f," ").concat(l),p=r.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn},options:{hoverMessage:{value:h+t.message},className:"squiggly-error",zIndex:100,overviewRuler:{color:"rgb(255, 18, 18, 0.7)",position:i.editor.OverviewRulerLane.Right},minimap:{color:"rgb(255, 18, 18, 0.7)",position:i.editor.MinimapPosition.Inline}}}})),d=i.editor.getModelMarkers({owner:e,resource:o});d&&d.length>0&&(c=[],n._monacoInstance.editor.setModelMarkers(u,e,[])),u.deltaDecorations(c,p)}else u.deltaDecorations(c,[]),n._monacoInstance.editor.setModelMarkers(u,e,r)}}})).then(void 0,(function(t){console.error(t)}))}}}]);var t}();function st(t){switch(t){case r.DiagnosticSeverity.Error:return i.MarkerSeverity.Error;case r.DiagnosticSeverity.Warning:return i.MarkerSeverity.Warning;case r.DiagnosticSeverity.Information:return i.MarkerSeverity.Info;case r.DiagnosticSeverity.Hint:return i.MarkerSeverity.Hint;default:return i.MarkerSeverity.Info}}function lt(t){if(t)return{character:t.column-1,line:t.lineNumber-1}}function ft(t){if(t)return new i.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function ht(t){var e=i.languages.CompletionItemKind;switch(t){case r.CompletionItemKind.Text:return e.Text;case r.CompletionItemKind.Method:return e.Method;case r.CompletionItemKind.Function:return e.Function;case r.CompletionItemKind.Constructor:return e.Constructor;case r.CompletionItemKind.Field:return e.Field;case r.CompletionItemKind.Variable:return e.Variable;case r.CompletionItemKind.Class:return e.Class;case r.CompletionItemKind.Interface:return e.Interface;case r.CompletionItemKind.Module:return e.Module;case r.CompletionItemKind.Property:return e.Property;case r.CompletionItemKind.Unit:return e.Unit;case r.CompletionItemKind.Value:return e.Value;case r.CompletionItemKind.Enum:return e.Enum;case r.CompletionItemKind.Keyword:return e.Keyword;case r.CompletionItemKind.Snippet:return e.Snippet;case r.CompletionItemKind.Color:return e.Color;case r.CompletionItemKind.File:return e.File;case r.CompletionItemKind.Reference:return e.Reference}return e.Property}function pt(t){if(t)return{range:ft(t.range),text:t.newText}}var dt=function(){return it((function t(e,r){nt(this,t),this.languageSettings=r;var n=function(){var t=rt(tt().mark((function t(r,n){var o;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(r);case 2:return o=t.sent,t.abrupt("return",o.doComplete(r.toString(),n));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();this.completionCacheManager=function(t){var e,r,n;return{getCompletionItems:function(o,i,a){return(!n||n.line!==a.line||!r||!o||!(null!=o&&o.includes(r)))&&(e=t(i,a)),r=o,n=a,e}}}(n)}),[{key:"triggerCharacters",get:function(){return[" ",".","("]}},{key:"provideCompletionItems",value:function(t,e,n,o){var a,u=this,c=t.getWordUntilPosition(e),s=new i.Range(e.lineNumber,c.startColumn,e.lineNumber,c.endColumn),l=t.uri,f=null==t||null===(a=t.getWordAtPosition(e))||void 0===a?void 0:a.word,h=this.languageSettings.onDidProvideCompletionItems;return this.completionCacheManager.getCompletionItems(f,l,lt(e)).then((function(t){return h?h(t):t})).then((function(t){if(t){var e=function(t,e){var r=t[0];if(!e)return r;var n=t.find((function(t){var r;return null===(r=t.filterText)||void 0===r?void 0:r.toLowerCase().startsWith(e.toLowerCase())}));return null!=n?n:r}(t.items,f);return{incomplete:!0,suggestions:t.items.map((function(t,n){var o,a={label:t.label,insertText:t.insertText,sortText:t.sortText,filterText:H(f,t),documentation:u.formatDocLink(null===(o=t.documentation)||void 0===o?void 0:o.value),detail:t.detail,range:s,kind:ht(t.kind),preselect:e.filterText===t.filterText};return t.textEdit&&(a.range=ft(t.textEdit.range),a.insertText=t.textEdit.newText),t.insertTextFormat===r.InsertTextFormat.Snippet&&(a.insertTextRules=i.languages.CompletionItemInsertTextRule.InsertAsSnippet),a}))}}}))}},{key:"formatDocLink",value:function(t){if(t){var e=this.languageSettings,r=e.documentationBaseUrl,n=void 0===r?"https://learn.microsoft.com/azure/data-explorer/kusto/query":r,o=e.documentationSuffix;return{value:t,isTrusted:!0,uris:new Proxy({},{get:function(t,e,r){var a=e.toString().replace(".md","");a.startsWith("https")||(a="".concat(n,"/").concat(a));var u=i.Uri.parse(a);return o&&(u.toString=function(){return a+o}),u}})}}}}])}();function yt(t){return"string"==typeof t?{value:t}:(e=t)&&"object"===B(e)&&"string"==typeof e.kind?"plaintext"===t.kind?{value:t.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:t.value}:{value:"```"+t.value+"\n"+t.value+"\n```\n"};var e}function vt(t){if(t)return Array.isArray(t)?t.map(yt):[yt(t)]}function mt(t){return{uri:i.Uri.parse(t.uri),range:ft(t.range)}}var gt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideDefinition",value:function(t,e,r){var n=t.uri;return this._worker(n).then((function(t){return t.findDefinition(n.toString(),lt(e))})).then((function(t){if(t&&0!=t.length)return[mt(t[0])]}))}}])}(),bt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideReferences",value:function(t,e,r,n){var o=t.uri;return this._worker(o).then((function(t){return t.findReferences(o.toString(),lt(e))})).then((function(t){if(t)return t.map(mt)}))}}])}();var wt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideRenameEdits",value:function(t,e,r,n){var o=t.uri;return this._worker(o).then((function(t){return t.doRename(o.toString(),lt(e),r)})).then((function(t){return function(t){if(t&&t.changes){var e=[];for(var r in t.changes){var n,o=i.Uri.parse(r),a=Q(t.changes[r]);try{for(a.s();!(n=a.n()).done;){var u=n.value;e.push({resource:o,textEdit:{range:ft(u.range),text:u.newText},versionId:void 0})}}catch(t){a.e(t)}finally{a.f()}}return{edits:e}}}(t)}))}}])}(),_t=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideDocumentFormattingEdits",value:function(t,e,r){var n=t.uri;return this._worker(n).then((function(t){return t.doDocumentFormat(n.toString()).then((function(t){return t.map((function(t){return pt(t)}))}))}))}}])}(),xt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideDocumentRangeFormattingEdits",value:function(t,e,r,n){var o=t.uri;return this._worker(o).then((function(t){return t.doRangeFormat(o.toString(),function(t){if(t)return{start:lt(t.getStartPosition()),end:lt(t.getEndPosition())}}(e)).then((function(t){return t.map((function(t){return pt(t)}))}))}))}}])}(),kt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideFoldingRanges",value:function(t,e,r){var n=t.uri;return this._worker(n).then((function(t){return t.doFolding(n.toString()).then((function(t){return t.map((function(t){return function(t){return{start:t.startLine+1,end:t.endLine+1,kind:i.languages.FoldingRangeKind.Region}}(t)}))}))}))}}])}();var Lt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideHover",value:function(t,e,r){var n=t.uri;return this._worker(n).then((function(t){return t.doHover(n.toString(),lt(e))})).then((function(t){if(t)return{range:ft(t.range),contents:vt(t.contents)}}))}}])}(),St={name:n.LANGUAGE_ID,mimeTypes:["text/kusto"],displayName:"Kusto",defaultToken:"invalid",queryOperators:["as","consume","distinct","evaluate","extend","getschema","graph-match","graph-merge","graph-to-table","invoke","join","limit","lookup","make-graph","make-series","mv-apply","mv-expand","order","parse","parse-kv","parse-where","project","project-away","project-keep","project-rename","project-reorder","range","reduce","render","sample","sample-distinct","scan","serialize","sort","summarize","take","top","top-hitters","top-nested","union","where","filter","fork","facet","range","consume","find","search","print","partition","lookup"],queryParameters:["kind"],types:["bool","datetime","decimal","double","dynamic","guid","int","long","real","string","timespan"],commands:[".add",".alter",".alter-merge",".append",".as",".assert",".attach",".consume",".count",".create",".create-merge",".create-or-alter",".create-set",".datatable",".default",".define",".delete",".detach",".distinct",".drop",".drop-pretend",".dup-next-failed-ingest",".dup-next-ingest",".evaluate",".export",".extend",".externaldata",".filter",".find",".fork",".getschema",".ingest",".join",".limit",".load",".make-series",".materialize",".move",".mv-expand",".order",".parse",".parse-where",".partition",".pivot",".print",".project",".project-away",".project-keep",".project-rename",".reduce",".remove",".rename",".replace",".restrict",".run",".sample",".sample-distinct",".save",".search",".serialize",".set",".set-or-append",".set-or-replace",".show",".sort",".summarize",".take",".top",".top-hitters",".top-nested",".union"],functions:["abs","acos","ago","array_concat","array_length","array_slice","array_split","asin","atan","atan2","avg","bag_keys","base64_decodestring","base64_encodestring","bin","bin_at","binary_and","binary_not","binary_or","binary_shift_left","binary_shift_right","binary_xor","case","ceiling","coalesce","columnifexists","cos","count","countof","cot","cursor_after","datatable","datepart","datetime_add","datetime_diff","datetime_part","dayofmonth","dayofweek","dayofyear","dcount","dcount_hll","degrees","endofday","endofmonth","endofweek","endofyear","exp","exp10","exp2","extract","extractall","extractjson","format_datetime","format_timespan","floor","gamma","geo_distance_2points","geo_geohash_to_central_point","geo_point_in_circle","geo_point_in_polygon","geo_point_to_geohash","getmonth","gettype","getyear","hash","hash_sha256","hll_merge","iif","indexof","isempty","isfinite","isinf","isascii","isnan","isnotempty","isnotnull","isnull","isutf8","log","log10","log2","loggamma","make_datetime","make_string","make_timespan","materialize","max","max_of","min","min_of","monthofyear","next","not","pack","pack_array","pack_dictionary","parse_csv","parse_ipv4","parse_json","parse_path","parse_url","parse_urlquery","parse_user_agent","parse_version","parse_xml","parsejson","percentrank_tdigest","percentile_tdigest","pow","prev","radians","rand","rank_tdigest","repeat","replace","reverse","round","row_cumsum","row_window_session","series_add","series_decompose","series_decompose_anomalies","series_decompose_forecast","series_divide","series_equals","series_fill_backward","series_fill_const","series_fill_forward","series_fill_linear","series_fir","series_fit_2lines","series_fit_2lines_dynamic","series_fit_line","series_fit_line_dynamic","series_greater","series_greater_equals","series_iir","series_less","series_less_equals","series_multiply","series_not_equals","series_outliers","series_pearson_correlation","series_periods_detect","series_periods_validate","series_seasonal","series_stats","series_stats_dynamic","series_subtract","sign","sin","split","sqrt","startofday","startofmonth","startofweek","startofyear","strcat","strcat_array","strcat_delim","strcmp","strlen","strrep","string_size","substring","sum","tan","tdigest_merge","tobool","toboolean","todecimal","todouble","todynamic","tofloat","toguid","tohex","toint","tolong","tolower","toobject","toreal","toscalar","tostring","totimespan","toupper","translate","trim","trim_end","trim_start","typeof","url_decode","url_encode","week_of_year","welch_test"],keywords:["and","as","asc","between","by","contains","count","desc","extend","false","filter","find","from","has","in","inner","join","leftouter","let","not","on","or","policy","project","project-away","project-rename","project-reorder","project-keep","range","rename","retention","summarize","table","take","to","true","where","with"],tokenizer:{root:[[/(\/\/.*$)/,n.Token.Comment],[/[\(\)\{\}\|\[\]\:\=\,\<|\.\..]/,n.Token.Punctuation],[/[\+\-\*\/\%\!\<\<=\>\>=\=\==\!=\<>\:\;\,\=~\@\?\=>\!~]/,n.Token.MathOperator],[/"([^"\\]*(\\.[^"\\]*)*)"/,n.Token.StringLiteral],[/'([^"\\]*(\\.[^"\\]*)*)'/,n.Token.StringLiteral],[/[\w@#\-$\.]+/,{cases:{"@queryOperators":n.Token.QueryOperator,"@queryParameters":n.Token.QueryParameter,"@types":n.Token.Type,"@commands":n.Token.Command,"@functions":n.Token.Function,"@keywords":n.Token.Keyword,"@default":"identifier"}}]]}};function Et(t){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(t)}function jt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */jt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var k=b.prototype=m.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==Et(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?y:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Et(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),s(k,c,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Ot(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||Pt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Pt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Pt(t,e){if(t){if("string"==typeof t)return Tt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tt(t,e):void 0}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Ct(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function At(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nt(n.key),n)}}function Nt(t){var e=function(t,e){if("object"!=Et(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Et(e)?e:e+""}var Dt,Gt,Ft=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.classificationsGetter=e},e=[{key:"getLegend",value:function(){return{tokenTypes:n.tokenTypes,tokenModifiers:[]}}},{key:"provideDocumentSemanticTokens",value:(o=jt().mark((function t(e){var r,n,o,i,a,u,c,s,l,f,h,p,d,y,v,m,g,b,w,_;return jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.uri,t.next=3,this.classificationsGetter(r);case 3:n=t.sent,o=[],i=0,a=0,u=It(n);try{for(u.s();!(c=u.n()).done;)for(s=c.value,l=Mt(s,e),f=0,h=l;f<h.length;f++)p=h[f],d=Ot(p,5),y=d[0],v=d[1],m=d[2],g=d[3],b=d[4],_=0==(w=y-i)?v-a:v,o.push([w,_,m,g,b]),i=y,a=v}catch(t){u.e(t)}finally{u.f()}return t.abrupt("return",{data:new Uint32Array(o.flat(2)),resultId:e.getVersionId().toString()});case 10:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){Ct(i,r,n,a,u,"next",t)}function u(t){Ct(i,r,n,a,u,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"releaseDocumentSemanticTokens",value:function(){}}],e&&At(t.prototype,e),r&&At(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,o,i}();function Mt(t,e){for(var r=t.line,n=t.character,o=t.length,i=t.kind,a=[],u=o,c=r,s=n;u>0&&c<e.getLineCount();){var l=e.getLineLength(c+1)-s+1,f=Math.min(u,l);a.push([c,s,f,i,0]),u-=f,c++,s=0}return a}function Ut(t){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(t)}function Kt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Kt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var k=b.prototype=m.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==Ut(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?y:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ut(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),s(k,c,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Rt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Vt(){var t,e=function(e,r){t&&t.dispose(),t=e.languages.registerDocumentSemanticTokensProvider(n.LANGUAGE_ID,r)};return function(t,r){var n=function(t){var e=function(){var e,r=(e=Kt().mark((function e(r){var n;return Kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(r);case 2:return n=e.sent,e.abrupt("return",n.getClassifications(r.toString()));case 4:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){Rt(i,n,o,a,u,"next",t)}function u(t){Rt(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(t){return r.apply(this,arguments)}}();return new Ft(e)}(r);e(t,n)}}function Wt(t){return Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(t)}function qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(r),!0).forEach((function(e){Yt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Yt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=Wt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Wt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $t(t){return function(t){if(Array.isArray(t))return Ht(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ht(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ht(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Qt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Qt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var k=b.prototype=m.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==Wt(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?y:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Wt(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),s(k,c,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Bt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Zt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Bt(i,n,o,a,u,"next",t)}function u(t){Bt(i,n,o,a,u,"throw",t)}a(void 0)}))}}e.languages.LanguageConfiguration;var Jt=new Promise((function(t,e){Gt=t}));var Xt={folding:{offSide:!1,markers:{start:/^\s*[\r\n]/gm,end:/^\s*[\r\n]/gm}},comments:{lineComment:"//",blockComment:null},autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],brackets:[["[","]"],["{","}"],["(",")"]],colorizedBracketPairs:[],wordPattern:/[a-zA-Z0-9\-_]+/g};t.getKustoWorker=function(){return Jt.then((function(){return Dt}))},t.setupMode=function(t,e){var r=new i.Emitter,o=Vt(),a=new p(e,t),u=function t(n){for(var i=function(){var n=Zt(Qt().mark((function n(i,a){var u;return Qt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=a.setSchema(i),n.next=3,u.then((function(){r.fire(i)}));case 3:o(e,t);case 4:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}(),u=arguments.length,c=new Array(u>1?u-1:0),s=1;s<u;s++)c[s-1]=arguments[s];return a.getLanguageServiceWorker.apply(a,$t([n].concat(c))).then((function(t){return zt(zt({},t),{},{setSchema:function(e){return i(e,t)},setSchemaFromShowSchema:function(e,r,n,o,a){return Zt(Qt().mark((function u(){return Qt().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,t.normalizeSchema(e,r,n).then((function(e){(o||a)&&(e=zt(zt({},e),{},{globalScalarParameters:o,globalTabularParameters:a})),i(e,t)}));case 2:case"end":return u.stop()}}),u)})))()}})}))};e.languages.registerCompletionItemProvider(n.LANGUAGE_ID,new dt(u,t.languageSettings)),e.languages.setMonarchTokensProvider(n.LANGUAGE_ID,St),new ct(e,n.LANGUAGE_ID,u,t,r.event),e.languages.registerDocumentRangeFormattingEditProvider(n.LANGUAGE_ID,new xt(u)),e.languages.registerFoldingRangeProvider(n.LANGUAGE_ID,new kt(u)),e.languages.registerDefinitionProvider(n.LANGUAGE_ID,new gt(u)),e.languages.registerRenameProvider(n.LANGUAGE_ID,new wt(u)),e.languages.registerReferenceProvider(n.LANGUAGE_ID,new bt(u)),t.languageSettings.enableHover&&e.languages.registerHoverProvider(n.LANGUAGE_ID,new Lt(u)),e.languages.registerDocumentFormattingEditProvider(n.LANGUAGE_ID,new _t(u)),Dt=u,Gt(u),e.languages.setLanguageConfiguration(n.LANGUAGE_ID,Xt)}}));
7
+ define("vs/language/kusto/kustoMode",["exports","vs/editor/editor.main","./main-83804022","./types-1a3dbd57"],(function(t,e,r,n){"use strict";function o(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var i=o(e),a=["onDidProvideCompletionItems"];function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:O(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function _(){}var x={};f(x,a,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(A([])));L&&L!==r&&n.call(L,a)&&(x=L);var S=_.prototype=b.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var s=p(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=d;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=I(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=_,o(S,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},E(j.prototype),f(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new j(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(S),f(S,l,"Generator"),f(S,a,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){s(i,n,o,a,u,"next",t)}function u(t){s(i,n,o,a,u,"throw",t)}a(void 0)}))}}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function h(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}var p=function(){return t=function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._monacoInstance=e,this._defaults=r,this._idleCheckInterval=self.setInterval((function(){return n._checkIfIdle()}),3e4),this._configChangeListener=this._defaults.onDidChange((function(){return n._saveStateAndStopWorker()}))},e=[{key:"_stopWorker",value:function(){var t=this._workerDetails;this._workerDetailsPromise=null,this._workerDetails=null,setTimeout(l(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t._worker&&t._worker.dispose();case 1:case"end":return e.stop()}}),e)}))),5e3)}},{key:"_saveStateAndStopWorker",value:function(){var t,e,r=this;null!==(t=this._workerDetails)&&void 0!==t&&t._worker&&(null===(e=this._workerDetails)||void 0===e||e._worker.getProxy().then((function(t){t.getSchema().then((function(t){r._storedState={schema:t},r._stopWorker()}))})))}},{key:"dispose",value:function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}},{key:"_checkIfIdle",value:function(){var t,e;if(null!==(t=this._workerDetails)&&void 0!==t&&t._worker){var r=this._defaults.getWorkerMaxIdleTime(),n=Date.now()-(null===(e=this._workerDetails)||void 0===e?void 0:e._lastUsedTime);r>0&&n>r&&this._saveStateAndStopWorker()}}},{key:"_getClient",value:function(){var t=this,e=this._defaults.languageSettings;e.onDidProvideCompletionItems;var r=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(e,a);if(!this._workerDetailsPromise){var n=this._monacoInstance.editor.createWebWorker({moduleId:"vs/language/kusto/kustoWorker",label:"kusto",createData:{languageSettings:r,languageId:"kusto"}}),o=n.getProxy().then((function(e){return t._storedState?e.setSchema(t._storedState.schema).then((function(){return e})):e}));this._workerDetailsPromise=o.then((function(e){return t._workerDetails={_worker:n,_client:e,_lastUsedTime:Date.now()},t._workerDetails}))}return this._workerDetailsPromise}},{key:"getLanguageServiceWorker",value:function(){for(var t,e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this._getClient().then((function(e){t=e._client})).then((function(t){var r;return null===(r=e._workerDetails)||void 0===r||null===(r=r._worker)||void 0===r?void 0:r.withSyncedResources(n)})).then((function(e){return t}))}}],e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function y(t){var e=d(t);return null!=t&&("object"==e||"function"==e)}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}var m="object"==("undefined"==typeof global?"undefined":v(global))&&global&&global.Object===Object&&global;function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}var b="object"==("undefined"==typeof self?"undefined":g(self))&&self&&self.Object===Object&&self,w=m||b||Function("return this")(),_=function(){return w.Date.now()},x=/\s/;var k=/^\s+/;function L(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&x.test(t.charAt(e)););return e}(t)+1).replace(k,""):t}var S=w.Symbol,E=Object.prototype,j=E.hasOwnProperty,O=E.toString,I=S?S.toStringTag:void 0;var P=Object.prototype.toString;var T="[object Null]",C="[object Undefined]",A=S?S.toStringTag:void 0;function N(t){return null==t?void 0===t?C:T:A&&A in Object(t)?function(t){var e=j.call(t,I),r=t[I];try{t[I]=void 0;var n=!0}catch(t){}var o=O.call(t);return n&&(e?t[I]=r:delete t[I]),o}(t):function(t){return P.call(t)}(t)}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}var F="[object Symbol]";function M(t){return"symbol"==G(t)||function(t){return null!=t&&"object"==D(t)}(t)&&N(t)==F}var U=NaN,K=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,V=/^0o[0-7]+$/i,W=parseInt;function q(t){if("number"==typeof t)return t;if(M(t))return U;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=L(t);var r=R.test(t);return r||V.test(t)?W(t.slice(2),r?2:8):K.test(t)?U:+t}var z=Math.max,Y=Math.min;function $(t,e,r){var n,o,i,a,u,c,s=0,l=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var r=n,i=o;return n=o=void 0,s=e,a=t.apply(i,r)}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-s>=i}function v(){var t=_();if(d(t))return m(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?Y(r,i-(t-s)):r}(t))}function m(t){return u=void 0,h&&n?p(t):(n=o=void 0,a)}function g(){var t=_(),r=d(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return function(t){return s=t,u=setTimeout(v,e),l?p(t):a}(c);if(f)return clearTimeout(u),u=setTimeout(v,e),p(c)}return void 0===u&&(u=setTimeout(v,e)),a}return e=q(e)||0,y(r)&&(l=!!r.leading,i=(f="maxWait"in r)?z(q(r.maxWait)||0,e):i,h="trailing"in r?!!r.trailing:h),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},g.flush=function(){return void 0===u?a:m(_())},g}function H(t,e){return t&&e.filterText.toLowerCase().includes(t.toLowerCase())?"".concat(t).concat(e.filterText):e.filterText}function Q(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=J(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function Z(t){return function(t){if(Array.isArray(t))return X(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||J(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){if(t){if("string"==typeof t)return X(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(t,e):void 0}}function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */tt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var k=b.prototype=m.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==B(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?y:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(B(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),s(k,c,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function et(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){et(i,n,o,a,u,"next",t)}function u(t){et(i,n,o,a,u,"throw",t)}a(void 0)}))}}function nt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ot(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ut(n.key),n)}}function it(t,e,r){return e&&ot(t.prototype,e),r&&ot(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function at(t,e,r){return(e=ut(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ut(t){var e=function(t,e){if("object"!=B(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==B(e)?e:e+""}var ct=function(){return it((function t(e,r,n,o,a){var u=this;nt(this,t),at(this,"_disposables",[]),at(this,"_contentListener",Object.create(null)),at(this,"_configurationListener",Object.create(null)),at(this,"_schemaListener",Object.create(null)),at(this,"_cursorListener",Object.create(null)),at(this,"_debouncedValidations",Object.create(null)),this._monacoInstance=e,this._languageId=r,this._worker=n,this.defaults=o;var c,s=function(t){var e=t.getLanguageId(),r=t.uri.toString();if(e===u._languageId){var n=u.getOrCreateDebouncedValidation(t,e);u._contentListener[r]=t.onDidChangeContent((function(t){var e=function(t){return t.changes.map((function(t){return{start:t.rangeOffset,end:t.rangeOffset+t.text.length}}))}(t);n(e)})),u._configurationListener[r]=u.defaults.onDidChange((function(){self.setTimeout((function(){return u._doValidate(t,e,[])}),0)})),u._schemaListener[r]=a((function(){self.setTimeout((function(){return u._doValidate(t,e,[])}),0)}))}},l=function(t){var e=t.getId();u._cursorListener[e]||(t.onDidDispose((function(){var t;null===(t=u._cursorListener[e])||void 0===t||t.dispose(),delete u._cursorListener[e]})),u._cursorListener[e]=t.onDidChangeCursorSelection((function(e){var r=t.getModel(),n=r.getLanguageId();if(n===u._languageId){var o=r.getOffsetAt(e.selection.getPosition());u.getOrCreateDebouncedValidation(r,n)([{start:o,end:o}])}})))},f=function(t){u._monacoInstance.editor.setModelMarkers(t,u._languageId,[]);var e=t.uri.toString(),r=u._contentListener[e];r&&(r.dispose(),delete u._contentListener[e]);var n=u._configurationListener[e];n&&(n.dispose(),delete u._configurationListener[e]);var o=u._schemaListener[e];o&&(o.dispose(),delete u._schemaListener[e]);var i=u._debouncedValidations[e];i&&(i.cancel(),delete u._debouncedValidations[e])};this.defaults.languageSettings.enableQuickFixes&&this._disposables.push(i.languages.registerCodeActionProvider(this._languageId,{provideCodeActions:(c=rt(tt().mark((function t(e,r,n,o){var i,a,c,s;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.getOffsetAt(r.getStartPosition()),a=e.getOffsetAt(r.getEndPosition()),c=n.markers.length>0,t.next=5,u.getMonacoCodeActions(e,i,a,c);case 5:return s=t.sent,t.abrupt("return",{actions:s,dispose:function(){}});case 7:case"end":return t.stop()}}),t)}))),function(t,e,r,n){return c.apply(this,arguments)})})),this._disposables.push(this._monacoInstance.editor.onDidCreateEditor(l)),this._disposables.push(this._monacoInstance.editor.onDidCreateModel(s)),this._disposables.push(this._monacoInstance.editor.onWillDisposeModel(f)),this._disposables.push(this._monacoInstance.editor.onDidChangeModelLanguage((function(t){f(t.model),s(t.model)}))),this._disposables.push({dispose:function(){for(var t in u._contentListener)u._contentListener[t].dispose();for(var e in u._cursorListener)u._cursorListener[e].dispose();for(var r in u._debouncedValidations)u._debouncedValidations[r].cancel()}}),this._monacoInstance.editor.getModels().forEach(s),this._monacoInstance.editor.getEditors().forEach(l)}),[{key:"getMonacoCodeActions",value:(t=rt(tt().mark((function t(e,r,n,o){var i,a,u,c,s,l,f,h=this;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=[],t.next=3,this._worker(e.uri);case 3:return a=t.sent,u=e.uri,t.next=7,a.getResultActions(u.toString(),r,n);case 7:c=t.sent,s=tt().mark((function t(){var r,n,a,u,s;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=c[f]).kind.includes("Extract Function")){t.next=3;break}return t.abrupt("return",0);case 3:if("quickfix"!=(a=null!==(r=h.defaults.languageSettings.quickFixCodeActions)&&void 0!==r&&r.find((function(t){return n.kind.includes(t)}))?"quickfix":"custom")||o){t.next=6;break}return t.abrupt("return",{v:void 0});case 6:u=n.changes,s=u.map((function(t){var r,n=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.deleteLength);return{resource:e.uri,textEdit:{range:{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:o.lineNumber,endColumn:o.column},text:null!==(r=t.insertText)&&void 0!==r?r:""}}})),i.push({title:n.title,diagnostics:[],kind:a,edit:{edits:Z(s)}});case 9:case"end":return t.stop()}}),t)})),f=0;case 10:if(!(f<c.length)){t.next=20;break}return t.delegateYield(s(),"t0",12);case 12:if(0!==(l=t.t0)){t.next=15;break}return t.abrupt("continue",17);case 15:if(!l){t.next=17;break}return t.abrupt("return",l.v);case 17:f++,t.next=10;break;case 20:return t.abrupt("return",i);case 21:case"end":return t.stop()}}),t,this)}))),function(e,r,n,o){return t.apply(this,arguments)})},{key:"getOrCreateDebouncedValidation",value:function(t,e){var r=this,n=t.uri.toString();return this._debouncedValidations[n]||(this._debouncedValidations[n]=$((function(n){return r._doValidate(t,e,n)}),500)),this._debouncedValidations[n]}},{key:"dispose",value:function(){this._disposables.forEach((function(t){return t&&t.dispose()})),this._disposables=[]}},{key:"_doValidate",value:function(t,e,r){var n=this;if(!t.isDisposed()){var o=t.uri,a=t.getVersionId();this._worker(o).then((function(t){return t.doValidation(o.toString(),r)})).then((function(t){if(n._monacoInstance.editor.getModel(o).getVersionId()===a){var r=t.map((function(t){return r="number"==typeof(e=t).code?String(e.code):e.code,{severity:st(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:r,source:e.source};var e,r})),u=n._monacoInstance.editor.getModel(o),c=u.getAllDecorations().filter((function(t){return"squiggly-error"==t.options.className})).map((function(t){return t.id}));if(u&&u.getLanguageId()===e){var s=n.defaults.languageSettings.syntaxErrorAsMarkDown;if(s&&s.enableSyntaxErrorAsMarkDown){var l=s.header?"**".concat(s.header,"** \n\n"):"",f=s.icon?"![](".concat(s.icon,")"):"",h="".concat(f," ").concat(l),p=r.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn},options:{hoverMessage:{value:h+t.message},className:"squiggly-error",zIndex:100,overviewRuler:{color:"rgb(255, 18, 18, 0.7)",position:i.editor.OverviewRulerLane.Right},minimap:{color:"rgb(255, 18, 18, 0.7)",position:i.editor.MinimapPosition.Inline}}}})),d=i.editor.getModelMarkers({owner:e,resource:o});d&&d.length>0&&(c=[],n._monacoInstance.editor.setModelMarkers(u,e,[])),u.deltaDecorations(c,p)}else u.deltaDecorations(c,[]),n._monacoInstance.editor.setModelMarkers(u,e,r)}}})).then(void 0,(function(t){console.error(t)}))}}}]);var t}();function st(t){switch(t){case r.DiagnosticSeverity.Error:return i.MarkerSeverity.Error;case r.DiagnosticSeverity.Warning:return i.MarkerSeverity.Warning;case r.DiagnosticSeverity.Information:return i.MarkerSeverity.Info;case r.DiagnosticSeverity.Hint:return i.MarkerSeverity.Hint;default:return i.MarkerSeverity.Info}}function lt(t){if(t)return{character:t.column-1,line:t.lineNumber-1}}function ft(t){if(t)return new i.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function ht(t){var e=i.languages.CompletionItemKind;switch(t){case r.CompletionItemKind.Text:return e.Text;case r.CompletionItemKind.Method:return e.Method;case r.CompletionItemKind.Function:return e.Function;case r.CompletionItemKind.Constructor:return e.Constructor;case r.CompletionItemKind.Field:return e.Field;case r.CompletionItemKind.Variable:return e.Variable;case r.CompletionItemKind.Class:return e.Class;case r.CompletionItemKind.Interface:return e.Interface;case r.CompletionItemKind.Module:return e.Module;case r.CompletionItemKind.Property:return e.Property;case r.CompletionItemKind.Unit:return e.Unit;case r.CompletionItemKind.Value:return e.Value;case r.CompletionItemKind.Enum:return e.Enum;case r.CompletionItemKind.Keyword:return e.Keyword;case r.CompletionItemKind.Snippet:return e.Snippet;case r.CompletionItemKind.Color:return e.Color;case r.CompletionItemKind.File:return e.File;case r.CompletionItemKind.Reference:return e.Reference}return e.Property}function pt(t){if(t)return{range:ft(t.range),text:t.newText}}var dt=function(){return it((function t(e,r){nt(this,t),this.languageSettings=r;var n=function(){var t=rt(tt().mark((function t(r,n){var o;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(r);case 2:return o=t.sent,t.abrupt("return",o.doComplete(r.toString(),n));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();this.completionCacheManager=function(t){var e,r,n;return{getCompletionItems:function(o,i,a){return(!n||n.line!==a.line||!r||!o||!(null!=o&&o.includes(r)))&&(e=t(i,a)),r=o,n=a,e}}}(n)}),[{key:"triggerCharacters",get:function(){return[" ",".","("]}},{key:"provideCompletionItems",value:function(t,e,n,o){var a,u=this,c=t.getWordUntilPosition(e),s=new i.Range(e.lineNumber,c.startColumn,e.lineNumber,c.endColumn),l=t.uri,f=null==t||null===(a=t.getWordAtPosition(e))||void 0===a?void 0:a.word,h=this.languageSettings.onDidProvideCompletionItems;return this.completionCacheManager.getCompletionItems(f,l,lt(e)).then((function(t){return h?h(t):t})).then((function(t){if(t){var e=function(t,e){var r=t[0];if(!e)return r;var n=t.find((function(t){var r;return null===(r=t.filterText)||void 0===r?void 0:r.toLowerCase().startsWith(e.toLowerCase())}));return null!=n?n:r}(t.items,f);return{incomplete:!0,suggestions:t.items.map((function(t,n){var o,a={label:t.label,insertText:t.insertText,sortText:t.sortText,filterText:H(f,t),documentation:u.formatDocLink(null===(o=t.documentation)||void 0===o?void 0:o.value),detail:t.detail,range:s,kind:ht(t.kind),preselect:e.filterText===t.filterText};return t.textEdit&&(a.range=ft(t.textEdit.range),a.insertText=t.textEdit.newText),t.insertTextFormat===r.InsertTextFormat.Snippet&&(a.insertTextRules=i.languages.CompletionItemInsertTextRule.InsertAsSnippet),a}))}}}))}},{key:"formatDocLink",value:function(t){if(t){var e=this.languageSettings,r=e.documentationBaseUrl,n=void 0===r?"https://learn.microsoft.com/azure/data-explorer/kusto/query":r,o=e.documentationSuffix;return{value:t,isTrusted:!0,uris:new Proxy({},{get:function(t,e,r){var a=e.toString().replace(".md","");a.startsWith("https")||(a="".concat(n,"/").concat(a));var u=i.Uri.parse(a);return o&&(u.toString=function(){return a+o}),u}})}}}}])}();function yt(t){return"string"==typeof t?{value:t}:(e=t)&&"object"===B(e)&&"string"==typeof e.kind?"plaintext"===t.kind?{value:t.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:t.value}:{value:"```"+t.value+"\n"+t.value+"\n```\n"};var e}function vt(t){if(t)return Array.isArray(t)?t.map(yt):[yt(t)]}function mt(t){return{uri:i.Uri.parse(t.uri),range:ft(t.range)}}var gt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideDefinition",value:function(t,e,r){var n=t.uri;return this._worker(n).then((function(t){return t.findDefinition(n.toString(),lt(e))})).then((function(t){if(t&&0!=t.length)return[mt(t[0])]}))}}])}(),bt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideReferences",value:function(t,e,r,n){var o=t.uri;return this._worker(o).then((function(t){return t.findReferences(o.toString(),lt(e))})).then((function(t){if(t)return t.map(mt)}))}}])}();var wt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideRenameEdits",value:function(t,e,r,n){var o=t.uri;return this._worker(o).then((function(t){return t.doRename(o.toString(),lt(e),r)})).then((function(t){return function(t){if(t&&t.changes){var e=[];for(var r in t.changes){var n,o=i.Uri.parse(r),a=Q(t.changes[r]);try{for(a.s();!(n=a.n()).done;){var u=n.value;e.push({resource:o,textEdit:{range:ft(u.range),text:u.newText},versionId:void 0})}}catch(t){a.e(t)}finally{a.f()}}return{edits:e}}}(t)}))}}])}(),_t=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideDocumentFormattingEdits",value:function(t,e,r){var n=t.uri;return this._worker(n).then((function(t){return t.doDocumentFormat(n.toString()).then((function(t){return t.map((function(t){return pt(t)}))}))}))}}])}(),xt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideDocumentRangeFormattingEdits",value:function(t,e,r,n){var o=t.uri;return this._worker(o).then((function(t){return t.doRangeFormat(o.toString(),function(t){if(t)return{start:lt(t.getStartPosition()),end:lt(t.getEndPosition())}}(e)).then((function(t){return t.map((function(t){return pt(t)}))}))}))}}])}(),kt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideFoldingRanges",value:function(t,e,r){var n=t.uri;return this._worker(n).then((function(t){return t.doFolding(n.toString()).then((function(t){return t.map((function(t){return function(t){return{start:t.startLine+1,end:t.endLine+1,kind:i.languages.FoldingRangeKind.Region}}(t)}))}))}))}}])}();var Lt=function(){return it((function t(e){nt(this,t),this._worker=e}),[{key:"provideHover",value:function(t,e,r){var n=t.uri;return this._worker(n).then((function(t){return t.doHover(n.toString(),lt(e))})).then((function(t){if(t)return{range:ft(t.range),contents:vt(t.contents)}}))}}])}(),St={name:n.LANGUAGE_ID,mimeTypes:["text/kusto"],displayName:"Kusto",defaultToken:"invalid",queryOperators:["as","consume","distinct","evaluate","extend","getschema","graph-match","graph-merge","graph-to-table","invoke","join","limit","lookup","make-graph","make-series","mv-apply","mv-expand","order","parse","parse-kv","parse-where","project","project-away","project-keep","project-rename","project-reorder","range","reduce","render","sample","sample-distinct","scan","serialize","sort","summarize","take","top","top-hitters","top-nested","union","where","filter","fork","facet","range","consume","find","search","print","partition","lookup"],queryParameters:["kind"],types:["bool","datetime","decimal","double","dynamic","guid","int","long","real","string","timespan"],commands:[".add",".alter",".alter-merge",".append",".as",".assert",".attach",".consume",".count",".create",".create-merge",".create-or-alter",".create-set",".datatable",".default",".define",".delete",".detach",".distinct",".drop",".drop-pretend",".dup-next-failed-ingest",".dup-next-ingest",".evaluate",".export",".extend",".externaldata",".filter",".find",".fork",".getschema",".ingest",".join",".limit",".load",".make-series",".materialize",".move",".mv-expand",".order",".parse",".parse-where",".partition",".pivot",".print",".project",".project-away",".project-keep",".project-rename",".reduce",".remove",".rename",".replace",".restrict",".run",".sample",".sample-distinct",".save",".search",".serialize",".set",".set-or-append",".set-or-replace",".show",".sort",".summarize",".take",".top",".top-hitters",".top-nested",".union"],functions:["abs","acos","ago","array_concat","array_length","array_slice","array_split","asin","atan","atan2","avg","bag_keys","base64_decodestring","base64_encodestring","bin","bin_at","binary_and","binary_not","binary_or","binary_shift_left","binary_shift_right","binary_xor","case","ceiling","coalesce","columnifexists","cos","count","countof","cot","cursor_after","datatable","datepart","datetime_add","datetime_diff","datetime_part","dayofmonth","dayofweek","dayofyear","dcount","dcount_hll","degrees","endofday","endofmonth","endofweek","endofyear","exp","exp10","exp2","extract","extractall","extractjson","format_datetime","format_timespan","floor","gamma","geo_distance_2points","geo_geohash_to_central_point","geo_point_in_circle","geo_point_in_polygon","geo_point_to_geohash","getmonth","gettype","getyear","hash","hash_sha256","hll_merge","iif","indexof","isempty","isfinite","isinf","isascii","isnan","isnotempty","isnotnull","isnull","isutf8","log","log10","log2","loggamma","make_datetime","make_string","make_timespan","materialize","max","max_of","min","min_of","monthofyear","next","not","pack","pack_array","pack_dictionary","parse_csv","parse_ipv4","parse_json","parse_path","parse_url","parse_urlquery","parse_user_agent","parse_version","parse_xml","parsejson","percentrank_tdigest","percentile_tdigest","pow","prev","radians","rand","rank_tdigest","repeat","replace","reverse","round","row_cumsum","row_window_session","series_add","series_decompose","series_decompose_anomalies","series_decompose_forecast","series_divide","series_equals","series_fill_backward","series_fill_const","series_fill_forward","series_fill_linear","series_fir","series_fit_2lines","series_fit_2lines_dynamic","series_fit_line","series_fit_line_dynamic","series_greater","series_greater_equals","series_iir","series_less","series_less_equals","series_multiply","series_not_equals","series_outliers","series_pearson_correlation","series_periods_detect","series_periods_validate","series_seasonal","series_stats","series_stats_dynamic","series_subtract","sign","sin","split","sqrt","startofday","startofmonth","startofweek","startofyear","strcat","strcat_array","strcat_delim","strcmp","strlen","strrep","string_size","substring","sum","tan","tdigest_merge","tobool","toboolean","todecimal","todouble","todynamic","tofloat","toguid","tohex","toint","tolong","tolower","toobject","toreal","toscalar","tostring","totimespan","toupper","translate","trim","trim_end","trim_start","typeof","url_decode","url_encode","week_of_year","welch_test"],keywords:["and","as","asc","between","by","contains","count","desc","extend","false","filter","find","from","has","in","inner","join","leftouter","let","not","on","or","policy","project","project-away","project-rename","project-reorder","project-keep","range","rename","retention","summarize","table","take","to","true","where","with"],tokenizer:{root:[[/(\/\/.*$)/,n.Token.Comment],[/[\(\)\{\}\|\[\]\:\=\,\<|\.\..]/,n.Token.Punctuation],[/[\+\-\*\/\%\!\<\<=\>\>=\=\==\!=\<>\:\;\,\=~\@\?\=>\!~]/,n.Token.MathOperator],[/"([^"\\]*(\\.[^"\\]*)*)"/,n.Token.StringLiteral],[/'([^"\\]*(\\.[^"\\]*)*)'/,n.Token.StringLiteral],[/[\w@#\-$\.]+/,{cases:{"@queryOperators":n.Token.QueryOperator,"@queryParameters":n.Token.QueryParameter,"@types":n.Token.Type,"@commands":n.Token.Command,"@functions":n.Token.Function,"@keywords":n.Token.Keyword,"@default":"identifier"}}]]}};function Et(t){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(t)}function jt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */jt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var k=b.prototype=m.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==Et(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?y:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Et(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),s(k,c,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Ot(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||Pt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Pt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Pt(t,e){if(t){if("string"==typeof t)return Tt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tt(t,e):void 0}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Ct(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function At(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nt(n.key),n)}}function Nt(t){var e=function(t,e){if("object"!=Et(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Et(e)?e:e+""}var Dt,Gt,Ft=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.classificationsGetter=e},e=[{key:"getLegend",value:function(){return{tokenTypes:n.tokenTypes,tokenModifiers:[]}}},{key:"provideDocumentSemanticTokens",value:(o=jt().mark((function t(e){var r,n,o,i,a,u,c,s,l,f,h,p,d,y,v,m,g,b,w,_;return jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.uri,t.next=3,this.classificationsGetter(r);case 3:n=t.sent,o=[],i=0,a=0,u=It(n);try{for(u.s();!(c=u.n()).done;)for(s=c.value,l=Mt(s,e),f=0,h=l;f<h.length;f++)p=h[f],d=Ot(p,5),y=d[0],v=d[1],m=d[2],g=d[3],b=d[4],_=0==(w=y-i)?v-a:v,o.push([w,_,m,g,b]),i=y,a=v}catch(t){u.e(t)}finally{u.f()}return t.abrupt("return",{data:new Uint32Array(o.flat(2)),resultId:e.getVersionId().toString()});case 10:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){Ct(i,r,n,a,u,"next",t)}function u(t){Ct(i,r,n,a,u,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"releaseDocumentSemanticTokens",value:function(){}}],e&&At(t.prototype,e),r&&At(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,o,i}();function Mt(t,e){for(var r=t.line,n=t.character,o=t.length,i=t.kind,a=[],u=o,c=r,s=n;u>0&&c<e.getLineCount();){var l=e.getLineLength(c+1)-s+1,f=Math.min(u,l);a.push([c,s,f,i,0]),u-=f,c++,s=0}return a}function Ut(t){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(t)}function Kt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Kt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var k=b.prototype=m.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==Ut(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?y:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ut(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),s(k,c,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Rt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Vt(){var t,e=function(e,r){t&&t.dispose(),t=e.languages.registerDocumentSemanticTokensProvider(n.LANGUAGE_ID,r)};return function(t,r){var n=function(t){var e=function(){var e,r=(e=Kt().mark((function e(r){var n;return Kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(r);case 2:return n=e.sent,e.abrupt("return",n.getClassifications(r.toString()));case 4:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){Rt(i,n,o,a,u,"next",t)}function u(t){Rt(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(t){return r.apply(this,arguments)}}();return new Ft(e)}(r);e(t,n)}}function Wt(t){return Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(t)}function qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(r),!0).forEach((function(e){Yt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Yt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=Wt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Wt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $t(t){return function(t){if(Array.isArray(t))return Ht(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ht(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ht(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Qt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Qt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var k=b.prototype=m.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==Wt(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?y:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Wt(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),s(k,c,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Bt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Zt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Bt(i,n,o,a,u,"next",t)}function u(t){Bt(i,n,o,a,u,"throw",t)}a(void 0)}))}}e.languages.LanguageConfiguration;var Jt=new Promise((function(t,e){Gt=t}));var Xt={folding:{offSide:!1,markers:{start:/^\s*[\r\n]/gm,end:/^\s*[\r\n]/gm}},comments:{lineComment:"//",blockComment:null},autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],brackets:[["[","]"],["{","}"],["(",")"]],colorizedBracketPairs:[],wordPattern:/[a-zA-Z0-9\-_]+/g};t.getKustoWorker=function(){return Jt.then((function(){return Dt}))},t.setupMode=function(t,e){var r=new i.Emitter,o=Vt(),a=new p(e,t),u=function t(n){for(var i=function(){var n=Zt(Qt().mark((function n(i,a){var u;return Qt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=a.setSchema(i),n.next=3,u.then((function(){r.fire(i)}));case 3:o(e,t);case 4:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}(),u=arguments.length,c=new Array(u>1?u-1:0),s=1;s<u;s++)c[s-1]=arguments[s];return a.getLanguageServiceWorker.apply(a,$t([n].concat(c))).then((function(t){return zt(zt({},t),{},{setSchema:function(e){return i(e,t)},setSchemaFromShowSchema:function(e,r,n,o,a){return Zt(Qt().mark((function u(){return Qt().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,t.normalizeSchema(e,r,n).then((function(e){(o||a)&&(e=zt(zt({},e),{},{globalScalarParameters:o,globalTabularParameters:a})),i(e,t)}));case 2:case"end":return u.stop()}}),u)})))()}})}))};e.languages.registerCompletionItemProvider(n.LANGUAGE_ID,new dt(u,t.languageSettings)),e.languages.setMonarchTokensProvider(n.LANGUAGE_ID,St),new ct(e,n.LANGUAGE_ID,u,t,r.event),e.languages.registerDocumentRangeFormattingEditProvider(n.LANGUAGE_ID,new xt(u)),e.languages.registerFoldingRangeProvider(n.LANGUAGE_ID,new kt(u)),e.languages.registerDefinitionProvider(n.LANGUAGE_ID,new gt(u)),e.languages.registerRenameProvider(n.LANGUAGE_ID,new wt(u)),e.languages.registerReferenceProvider(n.LANGUAGE_ID,new bt(u)),t.languageSettings.enableHover&&e.languages.registerHoverProvider(n.LANGUAGE_ID,new Lt(u)),e.languages.registerDocumentFormattingEditProvider(n.LANGUAGE_ID,new _t(u)),Dt=u,Gt(u),e.languages.setLanguageConfiguration(n.LANGUAGE_ID,Xt)}}));
@@ -1,10 +1,10 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.2(e6cccc4de83964ccb5eb5b66e79d61333b0dc314)
3
+ * monaco-kusto version: 13.1.0(e13e2f4e51f8298799cd0893607366337e0bfa53)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
- define("vs/language/kusto/kustoWorker",["exports","./main-0cb1ed3d","./schema-ba14fa16"],(function(u,d,e){"use strict";function t(u,d){return function(u){if(Array.isArray(u))return u}(u)||function(u,d){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var t,n,a,r,c=[],f=!0,o=!1;try{if(a=(e=e.call(u)).next,0===d){if(Object(e)!==e)return;f=!1}else for(;!(f=(t=a.call(e)).done)&&(c.push(t.value),c.length!==d);f=!0);}catch(u){o=!0,n=u}finally{try{if(!f&&null!=e.return&&(r=e.return(),Object(r)!==r))return}finally{if(o)throw n}}return c}}(u,d)||a(u,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(u,d){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=a(u))||d&&u&&"number"==typeof u.length){e&&(u=e);var t=0,n=function(){};return{s:n,n:function(){return t>=u.length?{done:!0}:{done:!1,value:u[t++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,f=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return c=u.done,u},e:function(u){f=!0,r=u},f:function(){try{c||null==e.return||e.return()}finally{if(f)throw r}}}}function a(u,d){if(u){if("string"==typeof u)return r(u,d);var e={}.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(u,d):void 0}}function r(u,d){(null==d||d>u.length)&&(d=u.length);for(var e=0,t=Array(d);e<d;e++)t[e]=u[e];return t}
7
+ define("vs/language/kusto/kustoWorker",["exports","./main-83804022","./schema-e27c1e4a"],(function(u,d,e){"use strict";function t(u,d){return function(u){if(Array.isArray(u))return u}(u)||function(u,d){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var t,n,a,r,c=[],f=!0,o=!1;try{if(a=(e=e.call(u)).next,0===d){if(Object(e)!==e)return;f=!1}else for(;!(f=(t=a.call(e)).done)&&(c.push(t.value),c.length!==d);f=!0);}catch(u){o=!0,n=u}finally{try{if(!f&&null!=e.return&&(r=e.return(),Object(r)!==r))return}finally{if(o)throw n}}return c}}(u,d)||a(u,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(u,d){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=a(u))||d&&u&&"number"==typeof u.length){e&&(u=e);var t=0,n=function(){};return{s:n,n:function(){return t>=u.length?{done:!0}:{done:!1,value:u[t++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,f=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return c=u.done,u},e:function(u){f=!0,r=u},f:function(){try{c||null==e.return||e.return()}finally{if(f)throw r}}}}function a(u,d){if(u){if("string"==typeof u)return r(u,d);var e={}.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(u,d):void 0}}function r(u,d){(null==d||d>u.length)&&(d=u.length);for(var e=0,t=Array(d);e<d;e++)t[e]=u[e];return t}
8
8
  /*!
9
9
  * XRegExp 5.1.1
10
10
  * <xregexp.com>