@ws-ui/code-editor 0.1.25 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,26 +1,26 @@
1
1
  var Pt = Object.defineProperty;
2
2
  var jt = (r, n, t) => n in r ? Pt(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
3
  var Y = (r, n, t) => (jt(r, typeof n != "symbol" ? n + "" : n, t), t);
4
- import z, { useEffect as J, createContext as Qe, useState as oe, useRef as Ue, useContext as et, memo as kt } from "react";
4
+ import z, { useEffect as H, createContext as Qe, useState as se, useRef as Ue, useContext as et, memo as kt } from "react";
5
5
  import { loader as At, useMonaco as Dt, Editor as Lt } from "@monaco-editor/react";
6
6
  import { getMonacoTheme as $t, lspSubject as Ft, LspActions as G, hasAttributesString as tt, FileFolderType as Mt } from "@ws-ui/shared";
7
7
  import { initServices as Wt, MonacoLanguageClient as qt } from "monaco-languageclient";
8
8
  import { ErrorAction as Kt, CloseAction as Yt } from "vscode-languageclient";
9
9
  import * as c from "monaco-editor";
10
- import { Selection as Ut, KeyMod as Q, KeyCode as ee, editor as nt, Uri as Vt } from "monaco-editor";
10
+ import { Selection as Ut, KeyMod as te, KeyCode as ne, editor as nt, Uri as Vt } from "monaco-editor";
11
11
  import { WebSocketMessageReader as Bt, WebSocketMessageWriter as zt, toSocket as Gt } from "vscode-ws-jsonrpc";
12
12
  import { WillSaveTextDocumentNotification as Zt, TextDocumentSaveReason as Jt, DidSaveTextDocumentNotification as Ht, WillCreateFilesRequest as Xt, WillRenameFilesRequest as Qt, WillDeleteFilesRequest as en, DidCreateFilesNotification as tn, DidRenameFilesNotification as nn, DidDeleteFilesNotification as rn } from "vscode-languageserver-protocol";
13
- import { ICodeEditorService as Ve, StandaloneServices as xe, ILanguageFeaturesService as Be, ITextModelService as ze } from "vscode/services";
14
- var Re = { exports: {} }, te = {};
13
+ import { ICodeEditorService as Ve, StandaloneServices as _e, ILanguageFeaturesService as Be, ITextModelService as ze } from "vscode/services";
14
+ var Se = { exports: {} }, re = {};
15
15
  /*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
19
  */
20
- var Ce, Ge;
20
+ var Ee, Ge;
21
21
  function rt() {
22
22
  if (Ge)
23
- return Ce;
23
+ return Ee;
24
24
  Ge = 1;
25
25
  var r = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
26
26
  function i(u) {
@@ -50,7 +50,7 @@ function rt() {
50
50
  return !1;
51
51
  }
52
52
  }
53
- return Ce = s() ? Object.assign : function(u, d) {
53
+ return Ee = s() ? Object.assign : function(u, d) {
54
54
  for (var l, f = i(u), h, b = 1; b < arguments.length; b++) {
55
55
  l = Object(arguments[b]);
56
56
  for (var y in l)
@@ -62,7 +62,7 @@ function rt() {
62
62
  }
63
63
  }
64
64
  return f;
65
- }, Ce;
65
+ }, Ee;
66
66
  }
67
67
  /** @license React v17.0.2
68
68
  * react-jsx-runtime.production.min.js
@@ -75,12 +75,12 @@ function rt() {
75
75
  var Ze;
76
76
  function on() {
77
77
  if (Ze)
78
- return te;
78
+ return re;
79
79
  Ze = 1, rt();
80
80
  var r = z, n = 60103;
81
- if (te.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
81
+ if (re.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
82
82
  var t = Symbol.for;
83
- n = t("react.element"), te.Fragment = t("react.fragment");
83
+ n = t("react.element"), re.Fragment = t("react.fragment");
84
84
  }
85
85
  var i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = Object.prototype.hasOwnProperty, u = { key: !0, ref: !0, __self: !0, __source: !0 };
86
86
  function d(l, f, h) {
@@ -93,9 +93,9 @@ function on() {
93
93
  y[b] === void 0 && (y[b] = f[b]);
94
94
  return { $$typeof: n, type: l, key: v, ref: N, props: y, _owner: i.current };
95
95
  }
96
- return te.jsx = d, te.jsxs = d, te;
96
+ return re.jsx = d, re.jsxs = d, re;
97
97
  }
98
- var Ee = {};
98
+ var ye = {};
99
99
  /** @license React v17.0.2
100
100
  * react-jsx-runtime.development.js
101
101
  *
@@ -110,13 +110,13 @@ function an() {
110
110
  process.env.NODE_ENV !== "production" && function() {
111
111
  var n = z, t = rt(), i = 60103, s = 60106;
112
112
  r.Fragment = 60107;
113
- var u = 60108, d = 60114, l = 60109, f = 60110, h = 60112, b = 60113, y = 60120, v = 60115, N = 60116, k = 60121, P = 60122, $ = 60117, _ = 60129, E = 60131;
113
+ var u = 60108, d = 60114, l = 60109, f = 60110, h = 60112, b = 60113, y = 60120, v = 60115, N = 60116, k = 60121, P = 60122, $ = 60117, w = 60129, R = 60131;
114
114
  if (typeof Symbol == "function" && Symbol.for) {
115
115
  var S = Symbol.for;
116
- i = S("react.element"), s = S("react.portal"), r.Fragment = S("react.fragment"), u = S("react.strict_mode"), d = S("react.profiler"), l = S("react.provider"), f = S("react.context"), h = S("react.forward_ref"), b = S("react.suspense"), y = S("react.suspense_list"), v = S("react.memo"), N = S("react.lazy"), k = S("react.block"), P = S("react.server.block"), $ = S("react.fundamental"), S("react.scope"), S("react.opaque.id"), _ = S("react.debug_trace_mode"), S("react.offscreen"), E = S("react.legacy_hidden");
116
+ i = S("react.element"), s = S("react.portal"), r.Fragment = S("react.fragment"), u = S("react.strict_mode"), d = S("react.profiler"), l = S("react.provider"), f = S("react.context"), h = S("react.forward_ref"), b = S("react.suspense"), y = S("react.suspense_list"), v = S("react.memo"), N = S("react.lazy"), k = S("react.block"), P = S("react.server.block"), $ = S("react.fundamental"), S("react.scope"), S("react.opaque.id"), w = S("react.debug_trace_mode"), S("react.offscreen"), R = S("react.legacy_hidden");
117
117
  }
118
118
  var g = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
119
- function M(e) {
119
+ function W(e) {
120
120
  if (e === null || typeof e != "object")
121
121
  return null;
122
122
  var o = g && e[g] || e[p];
@@ -134,24 +134,24 @@ function an() {
134
134
  {
135
135
  var m = F.ReactDebugCurrentFrame, T = m.getStackAddendum();
136
136
  T !== "" && (o += "%s", a = a.concat([T]));
137
- var O = a.map(function(R) {
138
- return "" + R;
137
+ var O = a.map(function(x) {
138
+ return "" + x;
139
139
  });
140
140
  O.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, O);
141
141
  }
142
142
  }
143
- var ce = !1;
144
- function x(e) {
145
- return !!(typeof e == "string" || typeof e == "function" || e === r.Fragment || e === d || e === _ || e === u || e === b || e === y || e === E || ce || typeof e == "object" && e !== null && (e.$$typeof === N || e.$$typeof === v || e.$$typeof === l || e.$$typeof === f || e.$$typeof === h || e.$$typeof === $ || e.$$typeof === k || e[0] === P));
143
+ var me = !1;
144
+ function E(e) {
145
+ return !!(typeof e == "string" || typeof e == "function" || e === r.Fragment || e === d || e === w || e === u || e === b || e === y || e === R || me || typeof e == "object" && e !== null && (e.$$typeof === N || e.$$typeof === v || e.$$typeof === l || e.$$typeof === f || e.$$typeof === h || e.$$typeof === $ || e.$$typeof === k || e[0] === P));
146
146
  }
147
147
  function I(e, o, a) {
148
148
  var m = o.displayName || o.name || "";
149
149
  return e.displayName || (m !== "" ? a + "(" + m + ")" : a);
150
150
  }
151
- function w(e) {
151
+ function _(e) {
152
152
  return e.displayName || "Context";
153
153
  }
154
- function W(e) {
154
+ function M(e) {
155
155
  if (e == null)
156
156
  return null;
157
157
  if (typeof e.tag == "number" && A("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -176,20 +176,20 @@ function an() {
176
176
  switch (e.$$typeof) {
177
177
  case f:
178
178
  var o = e;
179
- return w(o) + ".Consumer";
179
+ return _(o) + ".Consumer";
180
180
  case l:
181
181
  var a = e;
182
- return w(a._context) + ".Provider";
182
+ return _(a._context) + ".Provider";
183
183
  case h:
184
184
  return I(e, e.render, "ForwardRef");
185
185
  case v:
186
- return W(e.type);
186
+ return M(e.type);
187
187
  case k:
188
- return W(e._render);
188
+ return M(e._render);
189
189
  case N: {
190
190
  var m = e, T = m._payload, O = m._init;
191
191
  try {
192
- return W(O(T));
192
+ return M(O(T));
193
193
  } catch {
194
194
  return null;
195
195
  }
@@ -197,14 +197,14 @@ function an() {
197
197
  }
198
198
  return null;
199
199
  }
200
- var ne = 0, ye, Se, we, _e, Ie, Te, Oe;
200
+ var J = 0, X, ie, le, we, Ie, Te, Oe;
201
201
  function Ne() {
202
202
  }
203
203
  Ne.__reactDisabledLog = !0;
204
204
  function ct() {
205
205
  {
206
- if (ne === 0) {
207
- ye = console.log, Se = console.info, we = console.warn, _e = console.error, Ie = console.group, Te = console.groupCollapsed, Oe = console.groupEnd;
206
+ if (J === 0) {
207
+ X = console.log, ie = console.info, le = console.warn, we = console.error, Ie = console.group, Te = console.groupCollapsed, Oe = console.groupEnd;
208
208
  var e = {
209
209
  configurable: !0,
210
210
  enumerable: !0,
@@ -221,12 +221,12 @@ function an() {
221
221
  groupEnd: e
222
222
  });
223
223
  }
224
- ne++;
224
+ J++;
225
225
  }
226
226
  }
227
227
  function dt() {
228
228
  {
229
- if (ne--, ne === 0) {
229
+ if (J--, J === 0) {
230
230
  var e = {
231
231
  configurable: !0,
232
232
  enumerable: !0,
@@ -234,16 +234,16 @@ function an() {
234
234
  };
235
235
  Object.defineProperties(console, {
236
236
  log: t({}, e, {
237
- value: ye
237
+ value: X
238
238
  }),
239
239
  info: t({}, e, {
240
- value: Se
240
+ value: ie
241
241
  }),
242
242
  warn: t({}, e, {
243
- value: we
243
+ value: le
244
244
  }),
245
245
  error: t({}, e, {
246
- value: _e
246
+ value: we
247
247
  }),
248
248
  group: t({}, e, {
249
249
  value: Ie
@@ -256,65 +256,65 @@ function an() {
256
256
  })
257
257
  });
258
258
  }
259
- ne < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
259
+ J < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
260
260
  }
261
261
  }
262
- var de = F.ReactCurrentDispatcher, fe;
263
- function ae(e, o, a) {
262
+ var ge = F.ReactCurrentDispatcher, pe;
263
+ function ue(e, o, a) {
264
264
  {
265
- if (fe === void 0)
265
+ if (pe === void 0)
266
266
  try {
267
267
  throw Error();
268
268
  } catch (T) {
269
269
  var m = T.stack.trim().match(/\n( *(at )?)/);
270
- fe = m && m[1] || "";
270
+ pe = m && m[1] || "";
271
271
  }
272
272
  return `
273
- ` + fe + e;
273
+ ` + pe + e;
274
274
  }
275
275
  }
276
- var me = !1, se;
276
+ var ve = !1, ce;
277
277
  {
278
278
  var ft = typeof WeakMap == "function" ? WeakMap : Map;
279
- se = new ft();
279
+ ce = new ft();
280
280
  }
281
281
  function Pe(e, o) {
282
- if (!e || me)
282
+ if (!e || ve)
283
283
  return "";
284
284
  {
285
- var a = se.get(e);
285
+ var a = ce.get(e);
286
286
  if (a !== void 0)
287
287
  return a;
288
288
  }
289
289
  var m;
290
- me = !0;
290
+ ve = !0;
291
291
  var T = Error.prepareStackTrace;
292
292
  Error.prepareStackTrace = void 0;
293
293
  var O;
294
- O = de.current, de.current = null, ct();
294
+ O = ge.current, ge.current = null, ct();
295
295
  try {
296
296
  if (o) {
297
- var R = function() {
297
+ var x = function() {
298
298
  throw Error();
299
299
  };
300
- if (Object.defineProperty(R.prototype, "props", {
300
+ if (Object.defineProperty(x.prototype, "props", {
301
301
  set: function() {
302
302
  throw Error();
303
303
  }
304
304
  }), typeof Reflect == "object" && Reflect.construct) {
305
305
  try {
306
- Reflect.construct(R, []);
306
+ Reflect.construct(x, []);
307
307
  } catch (B) {
308
308
  m = B;
309
309
  }
310
- Reflect.construct(e, [], R);
310
+ Reflect.construct(e, [], x);
311
311
  } else {
312
312
  try {
313
- R.call();
313
+ x.call();
314
314
  } catch (B) {
315
315
  m = B;
316
316
  }
317
- e.call(R.prototype);
317
+ e.call(x.prototype);
318
318
  }
319
319
  } else {
320
320
  try {
@@ -337,17 +337,17 @@ function an() {
337
337
  if (D--, L--, L < 0 || C[D] !== q[L]) {
338
338
  var V = `
339
339
  ` + C[D].replace(" at new ", " at ");
340
- return typeof e == "function" && se.set(e, V), V;
340
+ return typeof e == "function" && ce.set(e, V), V;
341
341
  }
342
342
  while (D >= 1 && L >= 0);
343
343
  break;
344
344
  }
345
345
  }
346
346
  } finally {
347
- me = !1, de.current = O, dt(), Error.prepareStackTrace = T;
347
+ ve = !1, ge.current = O, dt(), Error.prepareStackTrace = T;
348
348
  }
349
- var X = e ? e.displayName || e.name : "", Ye = X ? ae(X) : "";
350
- return typeof e == "function" && se.set(e, Ye), Ye;
349
+ var ee = e ? e.displayName || e.name : "", Ye = ee ? ue(ee) : "";
350
+ return typeof e == "function" && ce.set(e, Ye), Ye;
351
351
  }
352
352
  function je(e, o, a) {
353
353
  return Pe(e, !1);
@@ -356,31 +356,31 @@ function an() {
356
356
  var o = e.prototype;
357
357
  return !!(o && o.isReactComponent);
358
358
  }
359
- function le(e, o, a) {
359
+ function de(e, o, a) {
360
360
  if (e == null)
361
361
  return "";
362
362
  if (typeof e == "function")
363
363
  return Pe(e, mt(e));
364
364
  if (typeof e == "string")
365
- return ae(e);
365
+ return ue(e);
366
366
  switch (e) {
367
367
  case b:
368
- return ae("Suspense");
368
+ return ue("Suspense");
369
369
  case y:
370
- return ae("SuspenseList");
370
+ return ue("SuspenseList");
371
371
  }
372
372
  if (typeof e == "object")
373
373
  switch (e.$$typeof) {
374
374
  case h:
375
375
  return je(e.render);
376
376
  case v:
377
- return le(e.type, o, a);
377
+ return de(e.type, o, a);
378
378
  case k:
379
379
  return je(e._render);
380
380
  case N: {
381
381
  var m = e, T = m._payload, O = m._init;
382
382
  try {
383
- return le(O(T), o, a);
383
+ return de(O(T), o, a);
384
384
  } catch {
385
385
  }
386
386
  }
@@ -388,9 +388,9 @@ function an() {
388
388
  return "";
389
389
  }
390
390
  var ke = {}, Ae = F.ReactDebugCurrentFrame;
391
- function ue(e) {
391
+ function fe(e) {
392
392
  if (e) {
393
- var o = e._owner, a = le(e.type, e._source, o ? o.type : null);
393
+ var o = e._owner, a = de(e.type, e._source, o ? o.type : null);
394
394
  Ae.setExtraStackFrame(a);
395
395
  } else
396
396
  Ae.setExtraStackFrame(null);
@@ -398,31 +398,31 @@ function an() {
398
398
  function gt(e, o, a, m, T) {
399
399
  {
400
400
  var O = Function.call.bind(Object.prototype.hasOwnProperty);
401
- for (var R in e)
402
- if (O(e, R)) {
401
+ for (var x in e)
402
+ if (O(e, x)) {
403
403
  var C = void 0;
404
404
  try {
405
- if (typeof e[R] != "function") {
406
- var q = Error((m || "React class") + ": " + a + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
405
+ if (typeof e[x] != "function") {
406
+ var q = Error((m || "React class") + ": " + a + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
407
407
  throw q.name = "Invariant Violation", q;
408
408
  }
409
- C = e[R](o, R, m, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
409
+ C = e[x](o, x, m, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
410
410
  } catch (D) {
411
411
  C = D;
412
412
  }
413
- C && !(C instanceof Error) && (ue(T), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", m || "React class", a, R, typeof C), ue(null)), C instanceof Error && !(C.message in ke) && (ke[C.message] = !0, ue(T), A("Failed %s type: %s", a, C.message), ue(null));
413
+ C && !(C instanceof Error) && (fe(T), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", m || "React class", a, x, typeof C), fe(null)), C instanceof Error && !(C.message in ke) && (ke[C.message] = !0, fe(T), A("Failed %s type: %s", a, C.message), fe(null));
414
414
  }
415
415
  }
416
416
  }
417
- var re = F.ReactCurrentOwner, ge = Object.prototype.hasOwnProperty, pt = {
417
+ var oe = F.ReactCurrentOwner, he = Object.prototype.hasOwnProperty, pt = {
418
418
  key: !0,
419
419
  ref: !0,
420
420
  __self: !0,
421
421
  __source: !0
422
- }, De, Le, pe;
423
- pe = {};
422
+ }, De, Le, be;
423
+ be = {};
424
424
  function vt(e) {
425
- if (ge.call(e, "ref")) {
425
+ if (he.call(e, "ref")) {
426
426
  var o = Object.getOwnPropertyDescriptor(e, "ref").get;
427
427
  if (o && o.isReactWarning)
428
428
  return !1;
@@ -430,7 +430,7 @@ function an() {
430
430
  return e.ref !== void 0;
431
431
  }
432
432
  function ht(e) {
433
- if (ge.call(e, "key")) {
433
+ if (he.call(e, "key")) {
434
434
  var o = Object.getOwnPropertyDescriptor(e, "key").get;
435
435
  if (o && o.isReactWarning)
436
436
  return !1;
@@ -438,9 +438,9 @@ function an() {
438
438
  return e.key !== void 0;
439
439
  }
440
440
  function bt(e, o) {
441
- if (typeof e.ref == "string" && re.current && o && re.current.stateNode !== o) {
442
- var a = W(re.current.type);
443
- pe[a] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', W(re.current.type), e.ref), pe[a] = !0);
441
+ if (typeof e.ref == "string" && oe.current && o && oe.current.stateNode !== o) {
442
+ var a = M(oe.current.type);
443
+ be[a] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', M(oe.current.type), e.ref), be[a] = !0);
444
444
  }
445
445
  }
446
446
  function Ct(e, o) {
@@ -454,7 +454,7 @@ function an() {
454
454
  });
455
455
  }
456
456
  }
457
- function Et(e, o) {
457
+ function Rt(e, o) {
458
458
  {
459
459
  var a = function() {
460
460
  Le || (Le = !0, A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", o));
@@ -465,7 +465,7 @@ function an() {
465
465
  });
466
466
  }
467
467
  }
468
- var Rt = function(e, o, a, m, T, O, R) {
468
+ var xt = function(e, o, a, m, T, O, x) {
469
469
  var C = {
470
470
  // This tag allows us to uniquely identify this as a React Element
471
471
  $$typeof: i,
@@ -473,7 +473,7 @@ function an() {
473
473
  type: e,
474
474
  key: o,
475
475
  ref: a,
476
- props: R,
476
+ props: x,
477
477
  // Record the component responsible for creating this element.
478
478
  _owner: O
479
479
  };
@@ -494,41 +494,41 @@ function an() {
494
494
  value: T
495
495
  }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
496
496
  };
497
- function xt(e, o, a, m, T) {
497
+ function Et(e, o, a, m, T) {
498
498
  {
499
- var O, R = {}, C = null, q = null;
499
+ var O, x = {}, C = null, q = null;
500
500
  a !== void 0 && (C = "" + a), ht(o) && (C = "" + o.key), vt(o) && (q = o.ref, bt(o, T));
501
501
  for (O in o)
502
- ge.call(o, O) && !pt.hasOwnProperty(O) && (R[O] = o[O]);
502
+ he.call(o, O) && !pt.hasOwnProperty(O) && (x[O] = o[O]);
503
503
  if (e && e.defaultProps) {
504
504
  var D = e.defaultProps;
505
505
  for (O in D)
506
- R[O] === void 0 && (R[O] = D[O]);
506
+ x[O] === void 0 && (x[O] = D[O]);
507
507
  }
508
508
  if (C || q) {
509
509
  var L = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
510
- C && Ct(R, L), q && Et(R, L);
510
+ C && Ct(x, L), q && Rt(x, L);
511
511
  }
512
- return Rt(e, C, q, T, m, re.current, R);
512
+ return xt(e, C, q, T, m, oe.current, x);
513
513
  }
514
514
  }
515
- var ve = F.ReactCurrentOwner, $e = F.ReactDebugCurrentFrame;
516
- function H(e) {
515
+ var Ce = F.ReactCurrentOwner, $e = F.ReactDebugCurrentFrame;
516
+ function Q(e) {
517
517
  if (e) {
518
- var o = e._owner, a = le(e.type, e._source, o ? o.type : null);
518
+ var o = e._owner, a = de(e.type, e._source, o ? o.type : null);
519
519
  $e.setExtraStackFrame(a);
520
520
  } else
521
521
  $e.setExtraStackFrame(null);
522
522
  }
523
- var he;
524
- he = !1;
525
- function be(e) {
523
+ var Re;
524
+ Re = !1;
525
+ function xe(e) {
526
526
  return typeof e == "object" && e !== null && e.$$typeof === i;
527
527
  }
528
528
  function Fe() {
529
529
  {
530
- if (ve.current) {
531
- var e = W(ve.current.type);
530
+ if (Ce.current) {
531
+ var e = M(Ce.current.type);
532
532
  if (e)
533
533
  return `
534
534
 
@@ -571,7 +571,7 @@ Check the top-level render call using <` + a + ">.");
571
571
  return;
572
572
  Me[a] = !0;
573
573
  var m = "";
574
- e && e._owner && e._owner !== ve.current && (m = " It was passed a child from " + W(e._owner.type) + "."), H(e), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, m), H(null);
574
+ e && e._owner && e._owner !== Ce.current && (m = " It was passed a child from " + M(e._owner.type) + "."), Q(e), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, m), Q(null);
575
575
  }
576
576
  }
577
577
  function qe(e, o) {
@@ -581,19 +581,19 @@ Check the top-level render call using <` + a + ">.");
581
581
  if (Array.isArray(e))
582
582
  for (var a = 0; a < e.length; a++) {
583
583
  var m = e[a];
584
- be(m) && We(m, o);
584
+ xe(m) && We(m, o);
585
585
  }
586
- else if (be(e))
586
+ else if (xe(e))
587
587
  e._store && (e._store.validated = !0);
588
588
  else if (e) {
589
- var T = M(e);
589
+ var T = W(e);
590
590
  if (typeof T == "function" && T !== e.entries)
591
- for (var O = T.call(e), R; !(R = O.next()).done; )
592
- be(R.value) && We(R.value, o);
591
+ for (var O = T.call(e), x; !(x = O.next()).done; )
592
+ xe(x.value) && We(x.value, o);
593
593
  }
594
594
  }
595
595
  }
596
- function wt(e) {
596
+ function _t(e) {
597
597
  {
598
598
  var o = e.type;
599
599
  if (o == null || typeof o == "string")
@@ -608,56 +608,56 @@ Check the top-level render call using <` + a + ">.");
608
608
  else
609
609
  return;
610
610
  if (a) {
611
- var m = W(o);
611
+ var m = M(o);
612
612
  gt(a, e.props, "prop", m, e);
613
- } else if (o.PropTypes !== void 0 && !he) {
614
- he = !0;
615
- var T = W(o);
613
+ } else if (o.PropTypes !== void 0 && !Re) {
614
+ Re = !0;
615
+ var T = M(o);
616
616
  A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
617
617
  }
618
618
  typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
619
619
  }
620
620
  }
621
- function _t(e) {
621
+ function wt(e) {
622
622
  {
623
623
  for (var o = Object.keys(e.props), a = 0; a < o.length; a++) {
624
624
  var m = o[a];
625
625
  if (m !== "children" && m !== "key") {
626
- H(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), H(null);
626
+ Q(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), Q(null);
627
627
  break;
628
628
  }
629
629
  }
630
- e.ref !== null && (H(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
630
+ e.ref !== null && (Q(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
631
631
  }
632
632
  }
633
633
  function Ke(e, o, a, m, T, O) {
634
634
  {
635
- var R = x(e);
636
- if (!R) {
635
+ var x = E(e);
636
+ if (!x) {
637
637
  var C = "";
638
638
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
639
639
  var q = yt(T);
640
640
  q ? C += q : C += Fe();
641
641
  var D;
642
- e === null ? D = "null" : Array.isArray(e) ? D = "array" : e !== void 0 && e.$$typeof === i ? (D = "<" + (W(e.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, C);
642
+ e === null ? D = "null" : Array.isArray(e) ? D = "array" : e !== void 0 && e.$$typeof === i ? (D = "<" + (M(e.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, C);
643
643
  }
644
- var L = xt(e, o, a, T, O);
644
+ var L = Et(e, o, a, T, O);
645
645
  if (L == null)
646
646
  return L;
647
- if (R) {
647
+ if (x) {
648
648
  var V = o.children;
649
649
  if (V !== void 0)
650
650
  if (m)
651
651
  if (Array.isArray(V)) {
652
- for (var X = 0; X < V.length; X++)
653
- qe(V[X], e);
652
+ for (var ee = 0; ee < V.length; ee++)
653
+ qe(V[ee], e);
654
654
  Object.freeze && Object.freeze(V);
655
655
  } else
656
656
  A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
657
657
  else
658
658
  qe(V, e);
659
659
  }
660
- return e === r.Fragment ? _t(L) : wt(L), L;
660
+ return e === r.Fragment ? wt(L) : _t(L), L;
661
661
  }
662
662
  }
663
663
  function It(e, o, a) {
@@ -669,10 +669,10 @@ Check the top-level render call using <` + a + ">.");
669
669
  var Ot = Tt, Nt = It;
670
670
  r.jsx = Ot, r.jsxs = Nt;
671
671
  }();
672
- }(Ee)), Ee;
672
+ }(ye)), ye;
673
673
  }
674
- process.env.NODE_ENV === "production" ? Re.exports = on() : Re.exports = an();
675
- var j = Re.exports;
674
+ process.env.NODE_ENV === "production" ? Se.exports = on() : Se.exports = an();
675
+ var j = Se.exports;
676
676
  class sn extends Bt {
677
677
  constructor(t, i) {
678
678
  super(t);
@@ -757,14 +757,14 @@ function zn(r, n, t) {
757
757
  const fn = {
758
758
  getServiceOverride: ({ openHandler: r }) => ({
759
759
  get [Ve.toString()]() {
760
- const n = xe.get(Ve);
760
+ const n = _e.get(Ve);
761
761
  return r && n.registerCodeEditorOpenHandler(r), n;
762
762
  }
763
763
  })
764
764
  }, mn = {
765
765
  getServiceOverride: () => ({
766
766
  get [Be.toString()]() {
767
- return xe.get(
767
+ return _e.get(
768
768
  Be
769
769
  );
770
770
  }
@@ -772,7 +772,7 @@ const fn = {
772
772
  }, gn = {
773
773
  getServiceOverride: () => ({
774
774
  get [ze.toString()]() {
775
- const r = xe.get(ze);
775
+ const r = _e.get(ze);
776
776
  return r.createModelReference = (n) => Promise.resolve({ dispose: () => {
777
777
  } }), r;
778
778
  }
@@ -1058,32 +1058,32 @@ const fn = {
1058
1058
  }, bn = [
1059
1059
  // zoom in
1060
1060
  {
1061
- keybinding: Q.CtrlCmd | ee.NumpadAdd,
1061
+ keybinding: te.CtrlCmd | ne.NumpadAdd,
1062
1062
  command: "editor.action.fontZoomIn"
1063
1063
  },
1064
1064
  {
1065
- keybinding: Q.CtrlCmd | ee.Equal,
1065
+ keybinding: te.CtrlCmd | ne.Equal,
1066
1066
  command: "editor.action.fontZoomIn"
1067
1067
  },
1068
1068
  // zoom out
1069
1069
  {
1070
- keybinding: Q.CtrlCmd | ee.NumpadSubtract,
1070
+ keybinding: te.CtrlCmd | ne.NumpadSubtract,
1071
1071
  command: "editor.action.fontZoomOut"
1072
1072
  },
1073
1073
  {
1074
- keybinding: Q.CtrlCmd | ee.Minus,
1074
+ keybinding: te.CtrlCmd | ne.Minus,
1075
1075
  command: "editor.action.fontZoomOut"
1076
1076
  },
1077
1077
  // zoom reset
1078
1078
  {
1079
- keybinding: Q.CtrlCmd | ee.Numpad0,
1079
+ keybinding: te.CtrlCmd | ne.Numpad0,
1080
1080
  command: "editor.action.fontZoomReset"
1081
1081
  },
1082
1082
  {
1083
- keybinding: Q.CtrlCmd | ee.Digit0,
1083
+ keybinding: te.CtrlCmd | ne.Digit0,
1084
1084
  command: "editor.action.fontZoomReset"
1085
1085
  }
1086
- ], Cn = ({ defaultZoom: r }) => (J(() => {
1086
+ ], Cn = ({ defaultZoom: r }) => (H(() => {
1087
1087
  r !== void 0 && nt.EditorZoom.setZoomLevel(r);
1088
1088
  }, []), null);
1089
1089
  ({}).VITE_DISABLE_MONACO_LOADER || At.config({
@@ -1092,9 +1092,17 @@ const fn = {
1092
1092
  // vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
1093
1093
  // },
1094
1094
  });
1095
- const ot = Qe(void 0), Gn = ({ children: r, url: n, qodly: t, defaultZoom: i, openHandler: s, language: u = "4d", defaultInited: d = !1 }) => {
1096
- const l = Dt(), [f, h] = oe(d), [b, y] = oe(null), v = Ue(), N = Ue(0);
1097
- J(() => {
1095
+ const ot = Qe(void 0), Gn = ({
1096
+ children: r,
1097
+ url: n,
1098
+ qodly: t,
1099
+ defaultZoom: i,
1100
+ openHandler: s,
1101
+ language: u = "4d",
1102
+ defaultInited: d = !1
1103
+ }) => {
1104
+ const l = Dt(), [f, h] = se(d), [b, y] = se(null), v = Ue(), N = Ue(0);
1105
+ H(() => {
1098
1106
  Wt({
1099
1107
  configureEditorOrViewsService: {
1100
1108
  enableViewsService: !1
@@ -1107,14 +1115,14 @@ const ot = Qe(void 0), Gn = ({ children: r, url: n, qodly: t, defaultZoom: i, op
1107
1115
  ...gn.getServiceOverride()
1108
1116
  }
1109
1117
  });
1110
- }, []), J(() => {
1118
+ }, []), H(() => {
1111
1119
  n && l && k();
1112
1120
  }, [n, l]);
1113
1121
  const k = async () => {
1114
1122
  if (!l)
1115
1123
  return;
1116
- const x = await $t();
1117
- l.editor.defineTheme("fd-dark", x || un), l.languages.register({
1124
+ const E = await $t();
1125
+ l.editor.defineTheme("fd-dark", E || un), l.languages.register({
1118
1126
  id: u,
1119
1127
  extensions: [".4dm", ".4qm", ".4qs"],
1120
1128
  aliases: ["4d", "4D"]
@@ -1124,16 +1132,16 @@ const ot = Qe(void 0), Gn = ({ children: r, url: n, qodly: t, defaultZoom: i, op
1124
1132
  ), nt.addKeybindingRules(bn), P();
1125
1133
  }, P = () => {
1126
1134
  y(null);
1127
- let x;
1135
+ let E;
1128
1136
  try {
1129
- x = new WebSocket(localStorage.LSP_SERVER || n);
1137
+ E = new WebSocket(localStorage.LSP_SERVER || n);
1130
1138
  } catch {
1131
1139
  y(new Event("INVALID_URL"));
1132
1140
  return;
1133
1141
  }
1134
- x.onopen = $, x.onclose = _, x.onerror = E, N.current = 0;
1142
+ E.onopen = $, E.onclose = w, E.onerror = R, N.current = 0;
1135
1143
  }, $ = async function() {
1136
- const x = Gt(this), I = new sn(x), w = new ln(x), W = new qt({
1144
+ const E = Gt(this), I = new sn(E), _ = new ln(E), M = new qt({
1137
1145
  name: "4D Language Client",
1138
1146
  clientOptions: {
1139
1147
  workspaceFolder: {
@@ -1151,119 +1159,125 @@ const ot = Qe(void 0), Gn = ({ children: r, url: n, qodly: t, defaultZoom: i, op
1151
1159
  connectionProvider: {
1152
1160
  get: () => Promise.resolve({
1153
1161
  reader: I,
1154
- writer: w
1162
+ writer: _
1155
1163
  })
1156
1164
  }
1157
1165
  });
1158
- v.current = W, I.onClose(() => {
1159
- W.stop(), N.current < 3 ? setTimeout(() => {
1166
+ v.current = M;
1167
+ const J = M.sendRequest.bind(M);
1168
+ v.current.sendRequest = function(X, ie, le) {
1169
+ return typeof X == "object" && X.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
1170
+ ie.textDocument.uri
1171
+ ) ? Promise.resolve() : J(X, ie, le);
1172
+ }, I.onClose(() => {
1173
+ M.stop(), N.current < 3 ? setTimeout(() => {
1160
1174
  N.current++, P();
1161
1175
  }, 1e3) : y(new Event("WEBSOCKET_CLOSED"));
1162
- }), W.needsStart() && await W.start(), h(!0);
1163
- }, _ = () => {
1164
- }, E = (x) => {
1165
- y(x);
1176
+ }), M.needsStart() && await M.start(), h(!0);
1177
+ }, w = () => {
1178
+ }, R = (E) => {
1179
+ y(E);
1166
1180
  };
1167
- J(() => {
1168
- const x = Ft.subscribe(({ action: I, payload: w }) => {
1181
+ H(() => {
1182
+ const E = Ft.subscribe(({ action: I, payload: _ }) => {
1169
1183
  switch (I) {
1170
1184
  case G.WILL_SAVE:
1171
- S(w.filePath);
1185
+ S(_.filePath);
1172
1186
  break;
1173
1187
  case G.DID_SAVE:
1174
- g(w.filePath, w.content);
1188
+ g(_.filePath, _.content);
1175
1189
  break;
1176
1190
  case G.WILL_CREATE:
1177
- p(w.filePath);
1191
+ p(_.filePath);
1178
1192
  break;
1179
1193
  case G.DID_CREATE:
1180
- A(w.filePath);
1194
+ A(_.filePath);
1181
1195
  break;
1182
1196
  case G.WILL_RENAME:
1183
- M(w.oldPath, w.newPath);
1197
+ W(_.oldPath, _.newPath);
1184
1198
  break;
1185
1199
  case G.DID_RENAME:
1186
- K(w.oldPath, w.newPath);
1200
+ K(_.oldPath, _.newPath);
1187
1201
  break;
1188
1202
  case G.WILL_DELETE:
1189
- F(w.filePath);
1203
+ F(_.filePath);
1190
1204
  break;
1191
1205
  case G.DID_DELETE:
1192
- ce(w.filePath);
1206
+ me(_.filePath);
1193
1207
  break;
1194
1208
  }
1195
1209
  });
1196
- return () => x.unsubscribe();
1210
+ return () => E.unsubscribe();
1197
1211
  }, []);
1198
- const S = (x, I = Jt.Manual) => {
1199
- var w;
1200
- (w = v.current) == null || w.sendNotification(Zt.type, {
1212
+ const S = (E, I = Jt.Manual) => {
1213
+ var _;
1214
+ (_ = v.current) == null || _.sendNotification(Zt.type, {
1201
1215
  textDocument: {
1202
- uri: U(x)
1216
+ uri: U(E)
1203
1217
  },
1204
1218
  reason: I
1205
1219
  });
1206
- }, g = (x, I) => {
1207
- var w;
1208
- (w = v.current) == null || w.sendNotification(Ht.type, {
1220
+ }, g = (E, I) => {
1221
+ var _;
1222
+ (_ = v.current) == null || _.sendNotification(Ht.type, {
1209
1223
  textDocument: {
1210
- uri: U(x)
1224
+ uri: U(E)
1211
1225
  },
1212
1226
  text: I
1213
1227
  });
1214
- }, p = (x) => {
1228
+ }, p = (E) => {
1215
1229
  var I;
1216
1230
  (I = v.current) == null || I.sendRequest(Xt.type, {
1217
1231
  files: [
1218
1232
  {
1219
- uri: U(x)
1233
+ uri: U(E)
1220
1234
  }
1221
1235
  ]
1222
1236
  });
1223
- }, M = (x, I) => {
1224
- var w;
1225
- (w = v.current) == null || w.sendRequest(Qt.type, {
1237
+ }, W = (E, I) => {
1238
+ var _;
1239
+ (_ = v.current) == null || _.sendRequest(Qt.type, {
1226
1240
  files: [
1227
1241
  {
1228
- oldUri: U(x),
1242
+ oldUri: U(E),
1229
1243
  newUri: U(I)
1230
1244
  }
1231
1245
  ]
1232
1246
  });
1233
- }, F = (x) => {
1247
+ }, F = (E) => {
1234
1248
  var I;
1235
1249
  (I = v.current) == null || I.sendRequest(en.type, {
1236
1250
  files: [
1237
1251
  {
1238
- uri: U(x)
1252
+ uri: U(E)
1239
1253
  }
1240
1254
  ]
1241
1255
  });
1242
- }, A = (x) => {
1256
+ }, A = (E) => {
1243
1257
  var I;
1244
1258
  (I = v.current) == null || I.sendNotification(tn.type, {
1245
1259
  files: [
1246
1260
  {
1247
- uri: U(x)
1261
+ uri: U(E)
1248
1262
  }
1249
1263
  ]
1250
1264
  });
1251
- }, K = (x, I) => {
1252
- var w;
1253
- (w = v.current) == null || w.sendNotification(nn.type, {
1265
+ }, K = (E, I) => {
1266
+ var _;
1267
+ (_ = v.current) == null || _.sendNotification(nn.type, {
1254
1268
  files: [
1255
1269
  {
1256
- oldUri: U(x),
1270
+ oldUri: U(E),
1257
1271
  newUri: U(I)
1258
1272
  }
1259
1273
  ]
1260
1274
  });
1261
- }, ce = (x) => {
1275
+ }, me = (E) => {
1262
1276
  var I;
1263
1277
  (I = v.current) == null || I.sendNotification(rn.type, {
1264
1278
  files: [
1265
1279
  {
1266
- uri: U(x)
1280
+ uri: U(E)
1267
1281
  }
1268
1282
  ]
1269
1283
  });
@@ -1293,7 +1307,7 @@ function Zn() {
1293
1307
  const at = Qe(
1294
1308
  void 0
1295
1309
  ), Jn = kt(({ children: r }) => {
1296
- const [n, t] = oe(null);
1310
+ const [n, t] = se(null);
1297
1311
  return /* @__PURE__ */ j.jsx(
1298
1312
  at.Provider,
1299
1313
  {
@@ -1305,8 +1319,8 @@ const at = Qe(
1305
1319
  }
1306
1320
  );
1307
1321
  });
1308
- function En() {
1309
- const r = et(at), n = oe(null);
1322
+ function Rn() {
1323
+ const r = et(at), n = se(null);
1310
1324
  if (r === void 0) {
1311
1325
  const [t, i] = n;
1312
1326
  return {
@@ -1331,7 +1345,7 @@ var st = {
1331
1345
  }
1332
1346
  return r;
1333
1347
  }, Z.apply(this, arguments);
1334
- }, Rn = globalThis && globalThis.__rest || function(r, n) {
1348
+ }, xn = globalThis && globalThis.__rest || function(r, n) {
1335
1349
  var t = {};
1336
1350
  for (var i in r)
1337
1351
  Object.prototype.hasOwnProperty.call(r, i) && n.indexOf(i) < 0 && (t[i] = r[i]);
@@ -1349,14 +1363,14 @@ function lt(r) {
1349
1363
  }
1350
1364
  function ut(r) {
1351
1365
  return function(n) {
1352
- return z.createElement(xn, Z({
1366
+ return z.createElement(En, Z({
1353
1367
  attr: Z({}, r.attr)
1354
1368
  }, n), lt(r.child));
1355
1369
  };
1356
1370
  }
1357
- function xn(r) {
1371
+ function En(r) {
1358
1372
  var n = function(t) {
1359
- var i = r.attr, s = r.size, u = r.title, d = Rn(r, ["attr", "size", "title"]), l = s || t.size || "1em", f;
1373
+ var i = r.attr, s = r.size, u = r.title, d = xn(r, ["attr", "size", "title"]), l = s || t.size || "1em", f;
1360
1374
  return t.className && (f = t.className), r.className && (f = (f ? f + " " : "") + r.className), z.createElement("svg", Z({
1361
1375
  stroke: "currentColor",
1362
1376
  fill: "currentColor",
@@ -1381,13 +1395,13 @@ function yn(r) {
1381
1395
  function Sn(r) {
1382
1396
  return ut({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z" } }] })(r);
1383
1397
  }
1384
- const wn = ({ lspProps: { lastError: r, reload: n } }) => {
1385
- const [t, i] = oe(!1), s = () => {
1398
+ const _n = ({ lspProps: { lastError: r, reload: n } }) => {
1399
+ const [t, i] = se(!1), s = () => {
1386
1400
  n();
1387
1401
  }, u = () => {
1388
1402
  i(!1);
1389
1403
  };
1390
- return J(() => {
1404
+ return H(() => {
1391
1405
  i(!!r);
1392
1406
  }, [r]), t ? /* @__PURE__ */ j.jsxs("div", { className: "flex items-center border-b border-fd-gray-darker bg-grey-800 px-2 py-1.5 text-xs text-grey-50", children: [
1393
1407
  /* @__PURE__ */ j.jsxs("span", { className: "flex flex-1 justify-center gap-1", children: [
@@ -1413,7 +1427,7 @@ const wn = ({ lspProps: { lastError: r, reload: n } }) => {
1413
1427
  }
1414
1428
  ) })
1415
1429
  ] }) : null;
1416
- }, _n = {
1430
+ }, wn = {
1417
1431
  provideCompletionItems: (r, n) => {
1418
1432
  const t = r.getWordUntilPosition(n);
1419
1433
  return {
@@ -1725,10 +1739,10 @@ function Pn(r) {
1725
1739
  function jn(r, n) {
1726
1740
  const t = [];
1727
1741
  let i = [];
1728
- const s = [], u = (g, p, M, F) => {
1742
+ const s = [], u = (g, p, W, F) => {
1729
1743
  t.push({
1730
1744
  startLineNumber: g,
1731
- endLineNumber: M,
1745
+ endLineNumber: W,
1732
1746
  startColumn: p,
1733
1747
  endColumn: F
1734
1748
  }), h(), f();
@@ -1768,12 +1782,12 @@ function jn(r, n) {
1768
1782
  };
1769
1783
  return g.text === "" ? p.isDeletion = !0 : g.range.startLineNumber === g.range.endLineNumber && g.range.startColumn === g.range.endColumn ? p.isAddition = !0 : p.isReplacement = !0, p;
1770
1784
  }, y = r.onDidChangeModel((g) => {
1771
- h(), E();
1785
+ h(), R();
1772
1786
  }), v = r.onDidChangeModelContent((g) => {
1773
1787
  if (!g.isUndoing)
1774
1788
  for (const p of g.changes) {
1775
- const M = b(p);
1776
- if (M.isReplacement || M.isDeletion || M.isAddition) {
1789
+ const W = b(p);
1790
+ if (W.isReplacement || W.isDeletion || W.isAddition) {
1777
1791
  const F = t.some(
1778
1792
  (K) => p.range.startLineNumber >= K.startLineNumber && p.range.endLineNumber <= K.endLineNumber && p.range.startColumn >= K.startColumn && p.range.endColumn <= K.endColumn
1779
1793
  ), A = !F && n && p.range.startLineNumber === 1 && p.range.startColumn === 1 && !tt(p.text);
@@ -1800,21 +1814,21 @@ function jn(r, n) {
1800
1814
  Pn(g) || Nn(P, g), P = null;
1801
1815
  }
1802
1816
  const $ = () => {
1803
- d(E), E();
1804
- }, _ = () => {
1805
- l(E), k = r.deltaDecorations(k, []);
1806
- }, E = () => {
1817
+ d(R), R();
1818
+ }, w = () => {
1819
+ l(R), k = r.deltaDecorations(k, []);
1820
+ }, R = () => {
1807
1821
  const g = r.getModel();
1808
1822
  g && (k = r.deltaDecorations(
1809
1823
  k,
1810
1824
  i.map(S(g))
1811
1825
  ));
1812
1826
  }, S = (g) => (p) => {
1813
- const M = g.getPositionAt(p[0]), F = g.getPositionAt(p[1]);
1827
+ const W = g.getPositionAt(p[0]), F = g.getPositionAt(p[1]);
1814
1828
  return {
1815
1829
  range: new c.Range(
1816
- M.lineNumber,
1817
- M.column,
1830
+ W.lineNumber,
1831
+ W.column,
1818
1832
  F.lineNumber,
1819
1833
  F.column
1820
1834
  ),
@@ -1832,14 +1846,14 @@ function jn(r, n) {
1832
1846
  detach: l,
1833
1847
  dispose: N,
1834
1848
  show: $,
1835
- hide: _
1849
+ hide: w
1836
1850
  };
1837
1851
  }
1838
1852
  function kn(r, n, t) {
1839
1853
  let i = !1;
1840
- const s = (_) => _[1] < _[0] ? (i = !0, [[_[1], _[0]]]) : [[..._]], u = (_) => i ? _.map((E) => E[1] > E[0] ? l(E) : E).reverse() : _;
1854
+ const s = (w) => w[1] < w[0] ? (i = !0, [[w[1], w[0]]]) : [[...w]], u = (w) => i ? w.map((R) => R[1] > R[0] ? l(R) : R).reverse() : w;
1841
1855
  let d;
1842
- const l = (_) => (d = _[1], _[1] = _[0], _[0] = d, _), f = s(r);
1856
+ const l = (w) => (d = w[1], w[1] = w[0], w[0] = d, w), f = s(r);
1843
1857
  let h, b, y, v, N, k, P, $;
1844
1858
  y = f[0];
1845
1859
  for (b of n)
@@ -1851,8 +1865,8 @@ function kn(r, n, t) {
1851
1865
  ];
1852
1866
  else if (N <= $)
1853
1867
  if (P === Number.NEGATIVE_INFINITY) {
1854
- const _ = $ + 1;
1855
- h = t === 0 ? [] : [[_, k > _ ? k : _]];
1868
+ const w = $ + 1;
1869
+ h = t === 0 ? [] : [[w, k > w ? k : w]];
1856
1870
  } else
1857
1871
  $ === Number.POSITIVE_INFINITY ? h = t === 0 ? [] : [[P - 1, P - 1]] : k <= $ ? h = t < 0 ? [[P - 1, P - 1]] : t > 0 ? [[$ + 1, $ + 1]] : [] : h = [[$ + 1, k]];
1858
1872
  else
@@ -1874,7 +1888,7 @@ function An(r, n) {
1874
1888
  i = t[t.length - 1], u = r[d], i[1] === u[0] && !n ? t.push(u) : i[1] === u[0] - 1 && n ? (i[1] = u[1], t.splice(t.length - 1, 1, i)) : i[1] < u[0] ? t.push(u) : i[1] < u[1] && (i[1] = u[1], t.splice(t.length - 1, 1, i));
1875
1889
  return t;
1876
1890
  }
1877
- function ie(r, n) {
1891
+ function ae(r, n) {
1878
1892
  return n.bind(r);
1879
1893
  }
1880
1894
  class Dn {
@@ -1890,7 +1904,7 @@ class Dn {
1890
1904
  /**
1891
1905
  * Linked to ICodeEditor.onDidChangeCursorPosition event.
1892
1906
  */
1893
- Y(this, "onCursor", ie(
1907
+ Y(this, "onCursor", ae(
1894
1908
  this,
1895
1909
  function(n) {
1896
1910
  if (n.source === "api")
@@ -1899,16 +1913,16 @@ class Dn {
1899
1913
  t.length !== 0 && this.editor.setSelections(t);
1900
1914
  }
1901
1915
  ));
1902
- Y(this, "onRectangleSelectionStart", ie(this, function({ event: n }) {
1916
+ Y(this, "onRectangleSelectionStart", ae(this, function({ event: n }) {
1903
1917
  n.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
1904
1918
  }));
1905
- Y(this, "onRectangleSelectionStop", ie(this, function() {
1919
+ Y(this, "onRectangleSelectionStop", ae(this, function() {
1906
1920
  this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
1907
1921
  }));
1908
1922
  /**
1909
1923
  * Linked to ICodeEditor.onKeyDown event.
1910
1924
  */
1911
- Y(this, "onKey", ie(this, function(n) {
1925
+ Y(this, "onKey", ae(this, function(n) {
1912
1926
  const t = n.keyCode, i = c.KeyCode;
1913
1927
  if (n.altKey || i.F1 <= t && t <= i.F19 || n.ctrlKey && t !== i.Backspace)
1914
1928
  return;
@@ -1930,7 +1944,7 @@ class Dn {
1930
1944
  return;
1931
1945
  s.findIndex(d) !== -1 && (n.stopPropagation(), n.preventDefault());
1932
1946
  }));
1933
- Y(this, "getOffsetAt", ie(this, function(n) {
1947
+ Y(this, "getOffsetAt", ae(this, function(n) {
1934
1948
  let t;
1935
1949
  for (let i = 0; i < this.intervals.buffer.length; i++)
1936
1950
  if (t = this.intervals.buffer[i], n <= t[1])
@@ -2005,9 +2019,9 @@ const Ln = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__
2005
2019
  lspProps: h,
2006
2020
  ...b
2007
2021
  }) => {
2008
- const { initialLineInfo: y, initialSelectionInfo: v } = l, { editor: N, setEditor: k } = En(), { inited: P } = h;
2009
- function $(E) {
2010
- s === "css" && E.languages.registerCompletionItemProvider("css", _n), s === "json" && E.languages.json && E.languages.json.jsonDefaults.setDiagnosticsOptions({
2022
+ const { initialLineInfo: y, initialSelectionInfo: v } = l, { editor: N, setEditor: k } = Rn(), { inited: P } = h;
2023
+ function $(R) {
2024
+ s === "css" && R.languages.registerCompletionItemProvider("css", wn), s === "json" && R.languages.json && R.languages.json.jsonDefaults.setDiagnosticsOptions({
2011
2025
  validate: !0,
2012
2026
  schemas: [
2013
2027
  {
@@ -2018,15 +2032,15 @@ const Ln = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__
2018
2032
  ]
2019
2033
  });
2020
2034
  }
2021
- function _(E, S) {
2022
- k(E);
2023
- const g = E.getModel();
2024
- if (g && (g.updateOptions({ insertSpaces: !1 }), E.onKeyUp(() => {
2025
- var M;
2026
- const p = (M = E.getPosition()) == null ? void 0 : M.lineNumber;
2035
+ function w(R, S) {
2036
+ k(R);
2037
+ const g = R.getModel();
2038
+ if (g && (g.updateOptions({ insertSpaces: !1 }), R.onKeyUp(() => {
2039
+ var W;
2040
+ const p = (W = R.getPosition()) == null ? void 0 : W.lineNumber;
2027
2041
  if (p) {
2028
2042
  const F = g.getLineFirstNonWhitespaceColumn(p), A = g.getLineLength(p), K = g.getLineContent(p);
2029
- Ln.test(K) && E.executeEdits("edit-handler", [
2043
+ Ln.test(K) && R.executeEdits("edit-handler", [
2030
2044
  {
2031
2045
  range: new S.Range(
2032
2046
  p,
@@ -2042,22 +2056,22 @@ const Ln = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__
2042
2056
  ]);
2043
2057
  }
2044
2058
  })), i === Mt.METHOD && tt(n)) {
2045
- const p = new Dn(E, !0);
2059
+ const p = new Dn(R, !0);
2046
2060
  p.exclude(1, 1, 1, Number.POSITIVE_INFINITY), p.enable();
2047
2061
  }
2048
2062
  }
2049
- return J(() => {
2063
+ return H(() => {
2050
2064
  if (!N)
2051
2065
  return;
2052
- const { line: E, offset: S } = y || {};
2053
- E && dn(N, E, S);
2054
- }, [y, N]), J(() => {
2066
+ const { line: R, offset: S } = y || {};
2067
+ R && dn(N, R, S);
2068
+ }, [y, N]), H(() => {
2055
2069
  if (!N)
2056
2070
  return;
2057
- const { selection: E } = v || {};
2058
- E && cn(N, E);
2071
+ const { selection: R } = v || {};
2072
+ R && cn(N, R);
2059
2073
  }, [v, N]), P ? /* @__PURE__ */ j.jsxs(j.Fragment, { children: [
2060
- f ? /* @__PURE__ */ j.jsx(wn, { lspProps: h }) : null,
2074
+ f ? /* @__PURE__ */ j.jsx(_n, { lspProps: h }) : null,
2061
2075
  /* @__PURE__ */ j.jsx(
2062
2076
  Lt,
2063
2077
  {
@@ -2071,10 +2085,10 @@ const Ln = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__
2071
2085
  path: U(r),
2072
2086
  value: n,
2073
2087
  theme: "fd-dark",
2074
- onChange: (E) => u && u(E || ""),
2088
+ onChange: (R) => u && u(R || ""),
2075
2089
  language: s,
2076
2090
  beforeMount: $,
2077
- onMount: _,
2091
+ onMount: w,
2078
2092
  loading: /* @__PURE__ */ j.jsx(Xe, {}),
2079
2093
  ...b
2080
2094
  }
@@ -2082,7 +2096,7 @@ const Ln = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__
2082
2096
  ] }) : /* @__PURE__ */ j.jsx(Xe, {});
2083
2097
  };
2084
2098
  export {
2085
- wn as Alerts,
2099
+ _n as Alerts,
2086
2100
  Hn as CodeEditor,
2087
2101
  Jn as CodeEditorProvider,
2088
2102
  Gn as LSPProvider,
@@ -2091,7 +2105,7 @@ export {
2091
2105
  zn as getFunctionOffset,
2092
2106
  dn as jumpToLine,
2093
2107
  cn as jumpToSelection,
2094
- En as useCodeEditor,
2108
+ Rn as useCodeEditor,
2095
2109
  Zn as useLSP
2096
2110
  };
2097
2111
  //# sourceMappingURL=index.es.js.map