@ws-ui/code-editor 0.1.6 → 0.1.8

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.
Files changed (38) hide show
  1. package/README.md +0 -0
  2. package/dist/demo/LSPDemo.d.ts +2 -2
  3. package/dist/demo/common.d.ts +2 -1
  4. package/dist/demo/index.d.ts +1 -1
  5. package/dist/editor/Alerts.d.ts +1 -1
  6. package/dist/editor/configurations/4d.d.ts +0 -0
  7. package/dist/editor/index.d.ts +1 -1
  8. package/dist/editor/keybindings.d.ts +0 -0
  9. package/dist/editor/plugins/index.d.ts +0 -0
  10. package/dist/editor/plugins/readonly/dom.d.ts +0 -0
  11. package/dist/editor/plugins/readonly/index.d.ts +0 -0
  12. package/dist/editor/plugins/readonly/intervals.d.ts +0 -0
  13. package/dist/editor/plugins/readonly/types.d.ts +0 -0
  14. package/dist/editor/providers/CodeEditorProvider.d.ts +1 -1
  15. package/dist/editor/providers/LSPProvider/WebSocketMessageReader.d.ts +0 -0
  16. package/dist/editor/providers/LSPProvider/WebSocketMessageWriter.d.ts +0 -0
  17. package/dist/editor/providers/LSPProvider/ZoomInit.d.ts +1 -1
  18. package/dist/editor/providers/LSPProvider/index.d.ts +2 -2
  19. package/dist/editor/providers/index.d.ts +0 -0
  20. package/dist/editor/services/CodeEditorService.d.ts +0 -0
  21. package/dist/editor/services/LanguageFeaturesService.d.ts +0 -0
  22. package/dist/editor/services/TextModelService.d.ts +0 -0
  23. package/dist/editor/snippets/4d.d.ts +0 -0
  24. package/dist/editor/snippets/css.d.ts +0 -0
  25. package/dist/editor/snippets/qodly.d.ts +0 -0
  26. package/dist/editor/themes/4d-dark.d.ts +0 -0
  27. package/dist/editor/themes/index.d.ts +0 -0
  28. package/dist/editor/utils.d.ts +0 -0
  29. package/dist/index.cjs.js +31 -29
  30. package/dist/index.cjs.js.map +1 -1
  31. package/dist/index.d.ts +0 -0
  32. package/dist/index.es.js +1006 -971
  33. package/dist/index.es.js.map +1 -1
  34. package/dist/main.d.ts +0 -0
  35. package/dist/monaco_theme.json +0 -0
  36. package/dist/style.css +0 -0
  37. package/dist/vite.svg +0 -0
  38. package/package.json +12 -11
package/dist/index.es.js CHANGED
@@ -1,19 +1,70 @@
1
- var Lt = Object.defineProperty;
2
- var At = (r, n, t) => n in r ? Lt(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
- var W = (r, n, t) => (At(r, typeof n != "symbol" ? n + "" : n, t), t);
4
- import z, { useEffect as J, createContext as Qe, useState as se, useRef as qe, useContext as et, memo as Dt } from "react";
5
- import { loader as Ft, useMonaco as $t, Editor as Mt } from "@monaco-editor/react";
6
- import { getMonacoTheme as Wt, lspSubject as Kt, LspActions as Z, hasAttributesString as tt, FileFolderType as Ut } from "@ws-ui/shared";
7
- import { initServices as Vt, MonacoLanguageClient as Yt } from "monaco-languageclient";
8
- import { ErrorAction as qt, CloseAction as zt } from "vscode-languageclient";
9
- import * as a from "monaco-editor";
10
- import { Selection as Bt, KeyMod as Q, KeyCode as ee, editor as nt, Uri as Zt } from "monaco-editor";
11
- import { WebSocketMessageReader as Gt, WebSocketMessageWriter as Jt, toSocket as Ht } from "vscode-ws-jsonrpc";
12
- import { WillSaveTextDocumentNotification as Xt, TextDocumentSaveReason as Qt, DidSaveTextDocumentNotification as en, WillCreateFilesRequest as tn, WillRenameFilesRequest as nn, WillDeleteFilesRequest as rn, DidCreateFilesNotification as on, DidRenameFilesNotification as sn, DidDeleteFilesNotification as an } from "vscode-languageserver-protocol";
13
- import { ICodeEditorService as ze, StandaloneServices as Se, ILanguageFeaturesService as Be, ITextModelService as Ze } from "vscode/services";
14
- var Ee = { exports: {} }, re = {};
15
- /**
16
- * @license React
1
+ var Pt = Object.defineProperty;
2
+ var jt = (r, n, t) => n in r ? Pt(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
+ var U = (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 Ve, useContext as et, memo as kt } from "react";
5
+ import { loader as At, useMonaco as Lt, Editor as Dt } from "@monaco-editor/react";
6
+ import { getMonacoTheme as $t, lspSubject as Ft, LspActions as G, hasAttributesString as tt, FileFolderType as Mt } from "@ws-ui/shared";
7
+ import { initServices as Wt, MonacoLanguageClient as Kt } from "monaco-languageclient";
8
+ import { ErrorAction as Yt, CloseAction as Ut } from "vscode-languageclient";
9
+ import * as c from "monaco-editor";
10
+ import { Selection as Vt, KeyMod as Q, KeyCode as ee, editor as nt, Uri as qt } from "monaco-editor";
11
+ import { WebSocketMessageReader as Bt, WebSocketMessageWriter as zt, toSocket as Gt } from "vscode-ws-jsonrpc";
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 qe, StandaloneServices as xe, ILanguageFeaturesService as Be, ITextModelService as ze } from "vscode/services";
14
+ var Re = { exports: {} }, te = {};
15
+ /*
16
+ object-assign
17
+ (c) Sindre Sorhus
18
+ @license MIT
19
+ */
20
+ var Ce, Ge;
21
+ function rt() {
22
+ if (Ge)
23
+ return Ce;
24
+ Ge = 1;
25
+ var r = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
26
+ function i(u) {
27
+ if (u == null)
28
+ throw new TypeError("Object.assign cannot be called with null or undefined");
29
+ return Object(u);
30
+ }
31
+ function l() {
32
+ try {
33
+ if (!Object.assign)
34
+ return !1;
35
+ var u = new String("abc");
36
+ if (u[5] = "de", Object.getOwnPropertyNames(u)[0] === "5")
37
+ return !1;
38
+ for (var f = {}, s = 0; s < 10; s++)
39
+ f["_" + String.fromCharCode(s)] = s;
40
+ var d = Object.getOwnPropertyNames(f).map(function(b) {
41
+ return f[b];
42
+ });
43
+ if (d.join("") !== "0123456789")
44
+ return !1;
45
+ var h = {};
46
+ return "abcdefghijklmnopqrst".split("").forEach(function(b) {
47
+ h[b] = b;
48
+ }), Object.keys(Object.assign({}, h)).join("") === "abcdefghijklmnopqrst";
49
+ } catch {
50
+ return !1;
51
+ }
52
+ }
53
+ return Ce = l() ? Object.assign : function(u, f) {
54
+ for (var s, d = i(u), h, b = 1; b < arguments.length; b++) {
55
+ s = Object(arguments[b]);
56
+ for (var S in s)
57
+ n.call(s, S) && (d[S] = s[S]);
58
+ if (r) {
59
+ h = r(s);
60
+ for (var v = 0; v < h.length; v++)
61
+ t.call(s, h[v]) && (d[h[v]] = s[h[v]]);
62
+ }
63
+ }
64
+ return d;
65
+ }, Ce;
66
+ }
67
+ /** @license React v17.0.2
17
68
  * react-jsx-runtime.production.min.js
18
69
  *
19
70
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -21,27 +72,31 @@ var Ee = { exports: {} }, re = {};
21
72
  * This source code is licensed under the MIT license found in the
22
73
  * LICENSE file in the root directory of this source tree.
23
74
  */
24
- var Ge;
25
- function ln() {
26
- if (Ge)
27
- return re;
28
- Ge = 1;
29
- var r = z, n = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, l = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
30
- function m(v, g, T) {
31
- var _, w = {}, x = null, P = null;
32
- T !== void 0 && (x = "" + T), g.key !== void 0 && (x = "" + g.key), g.ref !== void 0 && (P = g.ref);
33
- for (_ in g)
34
- i.call(g, _) && !p.hasOwnProperty(_) && (w[_] = g[_]);
35
- if (v && v.defaultProps)
36
- for (_ in g = v.defaultProps, g)
37
- w[_] === void 0 && (w[_] = g[_]);
38
- return { $$typeof: n, type: v, key: x, ref: P, props: w, _owner: l.current };
75
+ var Ze;
76
+ function on() {
77
+ if (Ze)
78
+ return te;
79
+ Ze = 1, rt();
80
+ var r = z, n = 60103;
81
+ if (te.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
82
+ var t = Symbol.for;
83
+ n = t("react.element"), te.Fragment = t("react.fragment");
84
+ }
85
+ var i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = Object.prototype.hasOwnProperty, u = { key: !0, ref: !0, __self: !0, __source: !0 };
86
+ function f(s, d, h) {
87
+ var b, S = {}, v = null, O = null;
88
+ h !== void 0 && (v = "" + h), d.key !== void 0 && (v = "" + d.key), d.ref !== void 0 && (O = d.ref);
89
+ for (b in d)
90
+ l.call(d, b) && !u.hasOwnProperty(b) && (S[b] = d[b]);
91
+ if (s && s.defaultProps)
92
+ for (b in d = s.defaultProps, d)
93
+ S[b] === void 0 && (S[b] = d[b]);
94
+ return { $$typeof: n, type: s, key: v, ref: O, props: S, _owner: i.current };
39
95
  }
40
- return re.Fragment = t, re.jsx = m, re.jsxs = m, re;
96
+ return te.jsx = f, te.jsxs = f, te;
41
97
  }
42
- var oe = {};
43
- /**
44
- * @license React
98
+ var Ee = {};
99
+ /** @license React v17.0.2
45
100
  * react-jsx-runtime.development.js
46
101
  *
47
102
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -50,598 +105,578 @@ var oe = {};
50
105
  * LICENSE file in the root directory of this source tree.
51
106
  */
52
107
  var Je;
53
- function un() {
54
- return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
55
- var r = z, n = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), v = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), j = Symbol.iterator, k = "@@iterator";
56
- function A(e) {
57
- if (e === null || typeof e != "object")
58
- return null;
59
- var o = j && e[j] || e[k];
60
- return typeof o == "function" ? o : null;
61
- }
62
- var R = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
63
- function c(e) {
64
- {
65
- for (var o = arguments.length, s = new Array(o > 1 ? o - 1 : 0), u = 1; u < o; u++)
66
- s[u - 1] = arguments[u];
67
- Y("error", e, s);
108
+ function an() {
109
+ return Je || (Je = 1, function(r) {
110
+ process.env.NODE_ENV !== "production" && function() {
111
+ var n = z, t = rt(), i = 60103, l = 60106;
112
+ r.Fragment = 60107;
113
+ var u = 60108, f = 60114, s = 60109, d = 60110, h = 60112, b = 60113, S = 60120, v = 60115, O = 60116, k = 60121, P = 60122, $ = 60117, _ = 60129, R = 60131;
114
+ if (typeof Symbol == "function" && Symbol.for) {
115
+ var y = Symbol.for;
116
+ i = y("react.element"), l = y("react.portal"), r.Fragment = y("react.fragment"), u = y("react.strict_mode"), f = y("react.profiler"), s = y("react.provider"), d = y("react.context"), h = y("react.forward_ref"), b = y("react.suspense"), S = y("react.suspense_list"), v = y("react.memo"), O = y("react.lazy"), k = y("react.block"), P = y("react.server.block"), $ = y("react.fundamental"), y("react.scope"), y("react.opaque.id"), _ = y("react.debug_trace_mode"), y("react.offscreen"), R = y("react.legacy_hidden");
68
117
  }
69
- }
70
- function Y(e, o, s) {
71
- {
72
- var u = R.ReactDebugCurrentFrame, S = u.getStackAddendum();
73
- S !== "" && (o += "%s", s = s.concat([S]));
74
- var I = s.map(function(C) {
75
- return String(C);
76
- });
77
- I.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, I);
118
+ var g = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
119
+ function M(e) {
120
+ if (e === null || typeof e != "object")
121
+ return null;
122
+ var o = g && e[g] || e[p];
123
+ return typeof o == "function" ? o : null;
78
124
  }
79
- }
80
- var f = !1, d = !1, D = !1, M = !1, B = !1, F;
81
- F = Symbol.for("react.module.reference");
82
- function de(e) {
83
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === p || B || e === l || e === T || e === _ || M || e === P || f || d || D || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === w || e.$$typeof === m || e.$$typeof === v || e.$$typeof === g || // This needs to include all possible module reference object
84
- // types supported by any Flight configuration anywhere since
85
- // we don't know which Flight build this will end up being used
86
- // with.
87
- e.$$typeof === F || e.getModuleId !== void 0));
88
- }
89
- function E(e, o, s) {
90
- var u = e.displayName;
91
- if (u)
92
- return u;
93
- var S = o.displayName || o.name || "";
94
- return S !== "" ? s + "(" + S + ")" : s;
95
- }
96
- function y(e) {
97
- return e.displayName || "Context";
98
- }
99
- function b(e) {
100
- if (e == null)
101
- return null;
102
- if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
103
- return e.displayName || e.name || null;
104
- if (typeof e == "string")
105
- return e;
106
- switch (e) {
107
- case i:
108
- return "Fragment";
109
- case t:
110
- return "Portal";
111
- case p:
112
- return "Profiler";
113
- case l:
114
- return "StrictMode";
115
- case T:
116
- return "Suspense";
117
- case _:
118
- return "SuspenseList";
119
- }
120
- if (typeof e == "object")
121
- switch (e.$$typeof) {
122
- case v:
123
- var o = e;
124
- return y(o) + ".Consumer";
125
- case m:
126
- var s = e;
127
- return y(s._context) + ".Provider";
128
- case g:
129
- return E(e, e.render, "ForwardRef");
130
- case w:
131
- var u = e.displayName || null;
132
- return u !== null ? u : b(e.type) || "Memo";
133
- case x: {
134
- var S = e, I = S._payload, C = S._init;
135
- try {
136
- return b(C(I));
137
- } catch {
138
- return null;
139
- }
140
- }
125
+ var F = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
126
+ function A(e) {
127
+ {
128
+ for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), m = 1; m < o; m++)
129
+ a[m - 1] = arguments[m];
130
+ Y("error", e, a);
141
131
  }
142
- return null;
143
- }
144
- var K = Object.assign, te = 0, xe, ye, Ie, we, Te, _e, Ne;
145
- function Pe() {
146
- }
147
- Pe.__reactDisabledLog = !0;
148
- function ut() {
149
- {
150
- if (te === 0) {
151
- xe = console.log, ye = console.info, Ie = console.warn, we = console.error, Te = console.group, _e = console.groupCollapsed, Ne = console.groupEnd;
152
- var e = {
153
- configurable: !0,
154
- enumerable: !0,
155
- value: Pe,
156
- writable: !0
157
- };
158
- Object.defineProperties(console, {
159
- info: e,
160
- log: e,
161
- warn: e,
162
- error: e,
163
- group: e,
164
- groupCollapsed: e,
165
- groupEnd: e
132
+ }
133
+ function Y(e, o, a) {
134
+ {
135
+ var m = F.ReactDebugCurrentFrame, T = m.getStackAddendum();
136
+ T !== "" && (o += "%s", a = a.concat([T]));
137
+ var N = a.map(function(E) {
138
+ return "" + E;
166
139
  });
140
+ N.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, N);
167
141
  }
168
- te++;
169
142
  }
170
- }
171
- function ct() {
172
- {
173
- if (te--, te === 0) {
174
- var e = {
175
- configurable: !0,
176
- enumerable: !0,
177
- writable: !0
178
- };
179
- Object.defineProperties(console, {
180
- log: K({}, e, {
181
- value: xe
182
- }),
183
- info: K({}, e, {
184
- value: ye
185
- }),
186
- warn: K({}, e, {
187
- value: Ie
188
- }),
189
- error: K({}, e, {
190
- value: we
191
- }),
192
- group: K({}, e, {
193
- value: Te
194
- }),
195
- groupCollapsed: K({}, e, {
196
- value: _e
197
- }),
198
- groupEnd: K({}, e, {
199
- value: Ne
200
- })
201
- });
143
+ var ce = !1;
144
+ function x(e) {
145
+ return !!(typeof e == "string" || typeof e == "function" || e === r.Fragment || e === f || e === _ || e === u || e === b || e === S || e === R || ce || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === v || e.$$typeof === s || e.$$typeof === d || e.$$typeof === h || e.$$typeof === $ || e.$$typeof === k || e[0] === P));
146
+ }
147
+ function I(e, o, a) {
148
+ var m = o.displayName || o.name || "";
149
+ return e.displayName || (m !== "" ? a + "(" + m + ")" : a);
150
+ }
151
+ function w(e) {
152
+ return e.displayName || "Context";
153
+ }
154
+ function W(e) {
155
+ if (e == null)
156
+ return null;
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")
158
+ return e.displayName || e.name || null;
159
+ if (typeof e == "string")
160
+ return e;
161
+ switch (e) {
162
+ case r.Fragment:
163
+ return "Fragment";
164
+ case l:
165
+ return "Portal";
166
+ case f:
167
+ return "Profiler";
168
+ case u:
169
+ return "StrictMode";
170
+ case b:
171
+ return "Suspense";
172
+ case S:
173
+ return "SuspenseList";
202
174
  }
203
- te < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
175
+ if (typeof e == "object")
176
+ switch (e.$$typeof) {
177
+ case d:
178
+ var o = e;
179
+ return w(o) + ".Consumer";
180
+ case s:
181
+ var a = e;
182
+ return w(a._context) + ".Provider";
183
+ case h:
184
+ return I(e, e.render, "ForwardRef");
185
+ case v:
186
+ return W(e.type);
187
+ case k:
188
+ return W(e._render);
189
+ case O: {
190
+ var m = e, T = m._payload, N = m._init;
191
+ try {
192
+ return W(N(T));
193
+ } catch {
194
+ return null;
195
+ }
196
+ }
197
+ }
198
+ return null;
204
199
  }
205
- }
206
- var me = R.ReactCurrentDispatcher, ge;
207
- function ae(e, o, s) {
208
- {
209
- if (ge === void 0)
210
- try {
211
- throw Error();
212
- } catch (S) {
213
- var u = S.stack.trim().match(/\n( *(at )?)/);
214
- ge = u && u[1] || "";
200
+ var ne = 0, Se, ye, we, _e, Ie, Te, Ne;
201
+ function Oe() {
202
+ }
203
+ Oe.__reactDisabledLog = !0;
204
+ function ct() {
205
+ {
206
+ if (ne === 0) {
207
+ Se = console.log, ye = console.info, we = console.warn, _e = console.error, Ie = console.group, Te = console.groupCollapsed, Ne = console.groupEnd;
208
+ var e = {
209
+ configurable: !0,
210
+ enumerable: !0,
211
+ value: Oe,
212
+ writable: !0
213
+ };
214
+ Object.defineProperties(console, {
215
+ info: e,
216
+ log: e,
217
+ warn: e,
218
+ error: e,
219
+ group: e,
220
+ groupCollapsed: e,
221
+ groupEnd: e
222
+ });
215
223
  }
216
- return `
217
- ` + ge + e;
224
+ ne++;
225
+ }
218
226
  }
219
- }
220
- var pe = !1, le;
221
- {
222
- var ft = typeof WeakMap == "function" ? WeakMap : Map;
223
- le = new ft();
224
- }
225
- function ke(e, o) {
226
- if (!e || pe)
227
- return "";
228
- {
229
- var s = le.get(e);
230
- if (s !== void 0)
231
- return s;
227
+ function ft() {
228
+ {
229
+ if (ne--, ne === 0) {
230
+ var e = {
231
+ configurable: !0,
232
+ enumerable: !0,
233
+ writable: !0
234
+ };
235
+ Object.defineProperties(console, {
236
+ log: t({}, e, {
237
+ value: Se
238
+ }),
239
+ info: t({}, e, {
240
+ value: ye
241
+ }),
242
+ warn: t({}, e, {
243
+ value: we
244
+ }),
245
+ error: t({}, e, {
246
+ value: _e
247
+ }),
248
+ group: t({}, e, {
249
+ value: Ie
250
+ }),
251
+ groupCollapsed: t({}, e, {
252
+ value: Te
253
+ }),
254
+ groupEnd: t({}, e, {
255
+ value: Ne
256
+ })
257
+ });
258
+ }
259
+ ne < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
260
+ }
232
261
  }
233
- var u;
234
- pe = !0;
235
- var S = Error.prepareStackTrace;
236
- Error.prepareStackTrace = void 0;
237
- var I;
238
- I = me.current, me.current = null, ut();
239
- try {
240
- if (o) {
241
- var C = function() {
242
- throw Error();
243
- };
244
- if (Object.defineProperty(C.prototype, "props", {
245
- set: function() {
262
+ var fe = F.ReactCurrentDispatcher, de;
263
+ function ae(e, o, a) {
264
+ {
265
+ if (de === void 0)
266
+ try {
246
267
  throw Error();
268
+ } catch (T) {
269
+ var m = T.stack.trim().match(/\n( *(at )?)/);
270
+ de = m && m[1] || "";
247
271
  }
248
- }), typeof Reflect == "object" && Reflect.construct) {
249
- try {
250
- Reflect.construct(C, []);
251
- } catch (q) {
252
- u = q;
272
+ return `
273
+ ` + de + e;
274
+ }
275
+ }
276
+ var me = !1, se;
277
+ {
278
+ var dt = typeof WeakMap == "function" ? WeakMap : Map;
279
+ se = new dt();
280
+ }
281
+ function Pe(e, o) {
282
+ if (!e || me)
283
+ return "";
284
+ {
285
+ var a = se.get(e);
286
+ if (a !== void 0)
287
+ return a;
288
+ }
289
+ var m;
290
+ me = !0;
291
+ var T = Error.prepareStackTrace;
292
+ Error.prepareStackTrace = void 0;
293
+ var N;
294
+ N = fe.current, fe.current = null, ct();
295
+ try {
296
+ if (o) {
297
+ var E = function() {
298
+ throw Error();
299
+ };
300
+ if (Object.defineProperty(E.prototype, "props", {
301
+ set: function() {
302
+ throw Error();
303
+ }
304
+ }), typeof Reflect == "object" && Reflect.construct) {
305
+ try {
306
+ Reflect.construct(E, []);
307
+ } catch (B) {
308
+ m = B;
309
+ }
310
+ Reflect.construct(e, [], E);
311
+ } else {
312
+ try {
313
+ E.call();
314
+ } catch (B) {
315
+ m = B;
316
+ }
317
+ e.call(E.prototype);
253
318
  }
254
- Reflect.construct(e, [], C);
255
319
  } else {
256
320
  try {
257
- C.call();
258
- } catch (q) {
259
- u = q;
321
+ throw Error();
322
+ } catch (B) {
323
+ m = B;
260
324
  }
261
- e.call(C.prototype);
325
+ e();
262
326
  }
263
- } else {
264
- try {
265
- throw Error();
266
- } catch (q) {
267
- u = q;
327
+ } catch (B) {
328
+ if (B && m && typeof B.stack == "string") {
329
+ for (var C = B.stack.split(`
330
+ `), K = m.stack.split(`
331
+ `), L = C.length - 1, D = K.length - 1; L >= 1 && D >= 0 && C[L] !== K[D]; )
332
+ D--;
333
+ for (; L >= 1 && D >= 0; L--, D--)
334
+ if (C[L] !== K[D]) {
335
+ if (L !== 1 || D !== 1)
336
+ do
337
+ if (L--, D--, D < 0 || C[L] !== K[D]) {
338
+ var q = `
339
+ ` + C[L].replace(" at new ", " at ");
340
+ return typeof e == "function" && se.set(e, q), q;
341
+ }
342
+ while (L >= 1 && D >= 0);
343
+ break;
344
+ }
268
345
  }
269
- e();
346
+ } finally {
347
+ me = !1, fe.current = N, ft(), Error.prepareStackTrace = T;
270
348
  }
271
- } catch (q) {
272
- if (q && u && typeof q.stack == "string") {
273
- for (var h = q.stack.split(`
274
- `), $ = u.stack.split(`
275
- `), O = h.length - 1, L = $.length - 1; O >= 1 && L >= 0 && h[O] !== $[L]; )
276
- L--;
277
- for (; O >= 1 && L >= 0; O--, L--)
278
- if (h[O] !== $[L]) {
279
- if (O !== 1 || L !== 1)
280
- do
281
- if (O--, L--, L < 0 || h[O] !== $[L]) {
282
- var U = `
283
- ` + h[O].replace(" at new ", " at ");
284
- return e.displayName && U.includes("<anonymous>") && (U = U.replace("<anonymous>", e.displayName)), typeof e == "function" && le.set(e, U), U;
285
- }
286
- while (O >= 1 && L >= 0);
287
- break;
288
- }
289
- }
290
- } finally {
291
- pe = !1, me.current = I, ct(), Error.prepareStackTrace = S;
349
+ var X = e ? e.displayName || e.name : "", Ue = X ? ae(X) : "";
350
+ return typeof e == "function" && se.set(e, Ue), Ue;
292
351
  }
293
- var X = e ? e.displayName || e.name : "", Ye = X ? ae(X) : "";
294
- return typeof e == "function" && le.set(e, Ye), Ye;
295
- }
296
- function dt(e, o, s) {
297
- return ke(e, !1);
298
- }
299
- function mt(e) {
300
- var o = e.prototype;
301
- return !!(o && o.isReactComponent);
302
- }
303
- function ue(e, o, s) {
304
- if (e == null)
305
- return "";
306
- if (typeof e == "function")
307
- return ke(e, mt(e));
308
- if (typeof e == "string")
309
- return ae(e);
310
- switch (e) {
311
- case T:
312
- return ae("Suspense");
313
- case _:
314
- return ae("SuspenseList");
352
+ function je(e, o, a) {
353
+ return Pe(e, !1);
315
354
  }
316
- if (typeof e == "object")
317
- switch (e.$$typeof) {
318
- case g:
319
- return dt(e.render);
320
- case w:
321
- return ue(e.type, o, s);
322
- case x: {
323
- var u = e, S = u._payload, I = u._init;
324
- try {
325
- return ue(I(S), o, s);
326
- } catch {
327
- }
328
- }
355
+ function mt(e) {
356
+ var o = e.prototype;
357
+ return !!(o && o.isReactComponent);
358
+ }
359
+ function le(e, o, a) {
360
+ if (e == null)
361
+ return "";
362
+ if (typeof e == "function")
363
+ return Pe(e, mt(e));
364
+ if (typeof e == "string")
365
+ return ae(e);
366
+ switch (e) {
367
+ case b:
368
+ return ae("Suspense");
369
+ case S:
370
+ return ae("SuspenseList");
329
371
  }
330
- return "";
331
- }
332
- var ce = Object.prototype.hasOwnProperty, Oe = {}, je = R.ReactDebugCurrentFrame;
333
- function fe(e) {
334
- if (e) {
335
- var o = e._owner, s = ue(e.type, e._source, o ? o.type : null);
336
- je.setExtraStackFrame(s);
337
- } else
338
- je.setExtraStackFrame(null);
339
- }
340
- function gt(e, o, s, u, S) {
341
- {
342
- var I = Function.call.bind(ce);
343
- for (var C in e)
344
- if (I(e, C)) {
345
- var h = void 0;
346
- try {
347
- if (typeof e[C] != "function") {
348
- var $ = Error((u || "React class") + ": " + s + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
349
- throw $.name = "Invariant Violation", $;
372
+ if (typeof e == "object")
373
+ switch (e.$$typeof) {
374
+ case h:
375
+ return je(e.render);
376
+ case v:
377
+ return le(e.type, o, a);
378
+ case k:
379
+ return je(e._render);
380
+ case O: {
381
+ var m = e, T = m._payload, N = m._init;
382
+ try {
383
+ return le(N(T), o, a);
384
+ } catch {
350
385
  }
351
- h = e[C](o, C, u, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
352
- } catch (O) {
353
- h = O;
354
386
  }
355
- h && !(h instanceof Error) && (fe(S), c("%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).", u || "React class", s, C, typeof h), fe(null)), h instanceof Error && !(h.message in Oe) && (Oe[h.message] = !0, fe(S), c("Failed %s type: %s", s, h.message), fe(null));
356
387
  }
388
+ return "";
357
389
  }
358
- }
359
- var pt = Array.isArray;
360
- function ve(e) {
361
- return pt(e);
362
- }
363
- function vt(e) {
364
- {
365
- var o = typeof Symbol == "function" && Symbol.toStringTag, s = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
366
- return s;
390
+ var ke = {}, Ae = F.ReactDebugCurrentFrame;
391
+ function ue(e) {
392
+ if (e) {
393
+ var o = e._owner, a = le(e.type, e._source, o ? o.type : null);
394
+ Ae.setExtraStackFrame(a);
395
+ } else
396
+ Ae.setExtraStackFrame(null);
367
397
  }
368
- }
369
- function ht(e) {
370
- try {
371
- return Le(e), !1;
372
- } catch {
373
- return !0;
398
+ function gt(e, o, a, m, T) {
399
+ {
400
+ var N = Function.call.bind(Object.prototype.hasOwnProperty);
401
+ for (var E in e)
402
+ if (N(e, E)) {
403
+ var C = void 0;
404
+ try {
405
+ if (typeof e[E] != "function") {
406
+ var K = Error((m || "React class") + ": " + a + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
407
+ throw K.name = "Invariant Violation", K;
408
+ }
409
+ C = e[E](o, E, m, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
410
+ } catch (L) {
411
+ C = L;
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, E, 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));
414
+ }
415
+ }
374
416
  }
375
- }
376
- function Le(e) {
377
- return "" + e;
378
- }
379
- function Ae(e) {
380
- if (ht(e))
381
- return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(e)), Le(e);
382
- }
383
- var ne = R.ReactCurrentOwner, bt = {
384
- key: !0,
385
- ref: !0,
386
- __self: !0,
387
- __source: !0
388
- }, De, Fe, he;
389
- he = {};
390
- function Ct(e) {
391
- if (ce.call(e, "ref")) {
392
- var o = Object.getOwnPropertyDescriptor(e, "ref").get;
393
- if (o && o.isReactWarning)
394
- return !1;
417
+ var re = F.ReactCurrentOwner, ge = Object.prototype.hasOwnProperty, pt = {
418
+ key: !0,
419
+ ref: !0,
420
+ __self: !0,
421
+ __source: !0
422
+ }, Le, De, pe;
423
+ pe = {};
424
+ function vt(e) {
425
+ if (ge.call(e, "ref")) {
426
+ var o = Object.getOwnPropertyDescriptor(e, "ref").get;
427
+ if (o && o.isReactWarning)
428
+ return !1;
429
+ }
430
+ return e.ref !== void 0;
395
431
  }
396
- return e.ref !== void 0;
397
- }
398
- function Rt(e) {
399
- if (ce.call(e, "key")) {
400
- var o = Object.getOwnPropertyDescriptor(e, "key").get;
401
- if (o && o.isReactWarning)
402
- return !1;
432
+ function ht(e) {
433
+ if (ge.call(e, "key")) {
434
+ var o = Object.getOwnPropertyDescriptor(e, "key").get;
435
+ if (o && o.isReactWarning)
436
+ return !1;
437
+ }
438
+ return e.key !== void 0;
403
439
  }
404
- return e.key !== void 0;
405
- }
406
- function Et(e, o) {
407
- if (typeof e.ref == "string" && ne.current && o && ne.current.stateNode !== o) {
408
- var s = b(ne.current.type);
409
- he[s] || (c('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', b(ne.current.type), e.ref), he[s] = !0);
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);
444
+ }
410
445
  }
411
- }
412
- function St(e, o) {
413
- {
414
- var s = function() {
415
- De || (De = !0, c("%s: `key` 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));
416
- };
417
- s.isReactWarning = !0, Object.defineProperty(e, "key", {
418
- get: s,
419
- configurable: !0
420
- });
446
+ function Ct(e, o) {
447
+ {
448
+ var a = function() {
449
+ Le || (Le = !0, A("%s: `key` 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));
450
+ };
451
+ a.isReactWarning = !0, Object.defineProperty(e, "key", {
452
+ get: a,
453
+ configurable: !0
454
+ });
455
+ }
421
456
  }
422
- }
423
- function xt(e, o) {
424
- {
425
- var s = function() {
426
- Fe || (Fe = !0, c("%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));
427
- };
428
- s.isReactWarning = !0, Object.defineProperty(e, "ref", {
429
- get: s,
430
- configurable: !0
431
- });
457
+ function Et(e, o) {
458
+ {
459
+ var a = function() {
460
+ De || (De = !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));
461
+ };
462
+ a.isReactWarning = !0, Object.defineProperty(e, "ref", {
463
+ get: a,
464
+ configurable: !0
465
+ });
466
+ }
432
467
  }
433
- }
434
- var yt = function(e, o, s, u, S, I, C) {
435
- var h = {
436
- // This tag allows us to uniquely identify this as a React Element
437
- $$typeof: n,
438
- // Built-in properties that belong on the element
439
- type: e,
440
- key: o,
441
- ref: s,
442
- props: C,
443
- // Record the component responsible for creating this element.
444
- _owner: I
468
+ var Rt = function(e, o, a, m, T, N, E) {
469
+ var C = {
470
+ // This tag allows us to uniquely identify this as a React Element
471
+ $$typeof: i,
472
+ // Built-in properties that belong on the element
473
+ type: e,
474
+ key: o,
475
+ ref: a,
476
+ props: E,
477
+ // Record the component responsible for creating this element.
478
+ _owner: N
479
+ };
480
+ return C._store = {}, Object.defineProperty(C._store, "validated", {
481
+ configurable: !1,
482
+ enumerable: !1,
483
+ writable: !0,
484
+ value: !1
485
+ }), Object.defineProperty(C, "_self", {
486
+ configurable: !1,
487
+ enumerable: !1,
488
+ writable: !1,
489
+ value: m
490
+ }), Object.defineProperty(C, "_source", {
491
+ configurable: !1,
492
+ enumerable: !1,
493
+ writable: !1,
494
+ value: T
495
+ }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
445
496
  };
446
- return h._store = {}, Object.defineProperty(h._store, "validated", {
447
- configurable: !1,
448
- enumerable: !1,
449
- writable: !0,
450
- value: !1
451
- }), Object.defineProperty(h, "_self", {
452
- configurable: !1,
453
- enumerable: !1,
454
- writable: !1,
455
- value: u
456
- }), Object.defineProperty(h, "_source", {
457
- configurable: !1,
458
- enumerable: !1,
459
- writable: !1,
460
- value: S
461
- }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
462
- };
463
- function It(e, o, s, u, S) {
464
- {
465
- var I, C = {}, h = null, $ = null;
466
- s !== void 0 && (Ae(s), h = "" + s), Rt(o) && (Ae(o.key), h = "" + o.key), Ct(o) && ($ = o.ref, Et(o, S));
467
- for (I in o)
468
- ce.call(o, I) && !bt.hasOwnProperty(I) && (C[I] = o[I]);
469
- if (e && e.defaultProps) {
470
- var O = e.defaultProps;
471
- for (I in O)
472
- C[I] === void 0 && (C[I] = O[I]);
473
- }
474
- if (h || $) {
475
- var L = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
476
- h && St(C, L), $ && xt(C, L);
497
+ function xt(e, o, a, m, T) {
498
+ {
499
+ var N, E = {}, C = null, K = null;
500
+ a !== void 0 && (C = "" + a), ht(o) && (C = "" + o.key), vt(o) && (K = o.ref, bt(o, T));
501
+ for (N in o)
502
+ ge.call(o, N) && !pt.hasOwnProperty(N) && (E[N] = o[N]);
503
+ if (e && e.defaultProps) {
504
+ var L = e.defaultProps;
505
+ for (N in L)
506
+ E[N] === void 0 && (E[N] = L[N]);
507
+ }
508
+ if (C || K) {
509
+ var D = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
510
+ C && Ct(E, D), K && Et(E, D);
511
+ }
512
+ return Rt(e, C, K, T, m, re.current, E);
477
513
  }
478
- return yt(e, h, $, S, u, ne.current, C);
479
514
  }
480
- }
481
- var be = R.ReactCurrentOwner, $e = R.ReactDebugCurrentFrame;
482
- function H(e) {
483
- if (e) {
484
- var o = e._owner, s = ue(e.type, e._source, o ? o.type : null);
485
- $e.setExtraStackFrame(s);
486
- } else
487
- $e.setExtraStackFrame(null);
488
- }
489
- var Ce;
490
- Ce = !1;
491
- function Re(e) {
492
- return typeof e == "object" && e !== null && e.$$typeof === n;
493
- }
494
- function Me() {
495
- {
496
- if (be.current) {
497
- var e = b(be.current.type);
498
- if (e)
499
- return `
515
+ var ve = F.ReactCurrentOwner, $e = F.ReactDebugCurrentFrame;
516
+ function H(e) {
517
+ if (e) {
518
+ var o = e._owner, a = le(e.type, e._source, o ? o.type : null);
519
+ $e.setExtraStackFrame(a);
520
+ } else
521
+ $e.setExtraStackFrame(null);
522
+ }
523
+ var he;
524
+ he = !1;
525
+ function be(e) {
526
+ return typeof e == "object" && e !== null && e.$$typeof === i;
527
+ }
528
+ function Fe() {
529
+ {
530
+ if (ve.current) {
531
+ var e = W(ve.current.type);
532
+ if (e)
533
+ return `
500
534
 
501
535
  Check the render method of \`` + e + "`.";
536
+ }
537
+ return "";
502
538
  }
503
- return "";
504
539
  }
505
- }
506
- function wt(e) {
507
- {
508
- if (e !== void 0) {
509
- var o = e.fileName.replace(/^.*[\\\/]/, ""), s = e.lineNumber;
510
- return `
540
+ function St(e) {
541
+ {
542
+ if (e !== void 0) {
543
+ var o = e.fileName.replace(/^.*[\\\/]/, ""), a = e.lineNumber;
544
+ return `
511
545
 
512
- Check your code at ` + o + ":" + s + ".";
546
+ Check your code at ` + o + ":" + a + ".";
547
+ }
548
+ return "";
513
549
  }
514
- return "";
515
550
  }
516
- }
517
- var We = {};
518
- function Tt(e) {
519
- {
520
- var o = Me();
521
- if (!o) {
522
- var s = typeof e == "string" ? e : e.displayName || e.name;
523
- s && (o = `
551
+ var Me = {};
552
+ function yt(e) {
553
+ {
554
+ var o = Fe();
555
+ if (!o) {
556
+ var a = typeof e == "string" ? e : e.displayName || e.name;
557
+ a && (o = `
524
558
 
525
- Check the top-level render call using <` + s + ">.");
559
+ Check the top-level render call using <` + a + ">.");
560
+ }
561
+ return o;
526
562
  }
527
- return o;
528
563
  }
529
- }
530
- function Ke(e, o) {
531
- {
532
- if (!e._store || e._store.validated || e.key != null)
533
- return;
534
- e._store.validated = !0;
535
- var s = Tt(o);
536
- if (We[s])
537
- return;
538
- We[s] = !0;
539
- var u = "";
540
- e && e._owner && e._owner !== be.current && (u = " It was passed a child from " + b(e._owner.type) + "."), H(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, u), H(null);
564
+ function We(e, o) {
565
+ {
566
+ if (!e._store || e._store.validated || e.key != null)
567
+ return;
568
+ e._store.validated = !0;
569
+ var a = yt(o);
570
+ if (Me[a])
571
+ return;
572
+ Me[a] = !0;
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);
575
+ }
541
576
  }
542
- }
543
- function Ue(e, o) {
544
- {
545
- if (typeof e != "object")
546
- return;
547
- if (ve(e))
548
- for (var s = 0; s < e.length; s++) {
549
- var u = e[s];
550
- Re(u) && Ke(u, o);
577
+ function Ke(e, o) {
578
+ {
579
+ if (typeof e != "object")
580
+ return;
581
+ if (Array.isArray(e))
582
+ for (var a = 0; a < e.length; a++) {
583
+ var m = e[a];
584
+ be(m) && We(m, o);
585
+ }
586
+ else if (be(e))
587
+ e._store && (e._store.validated = !0);
588
+ else if (e) {
589
+ var T = M(e);
590
+ if (typeof T == "function" && T !== e.entries)
591
+ for (var N = T.call(e), E; !(E = N.next()).done; )
592
+ be(E.value) && We(E.value, o);
551
593
  }
552
- else if (Re(e))
553
- e._store && (e._store.validated = !0);
554
- else if (e) {
555
- var S = A(e);
556
- if (typeof S == "function" && S !== e.entries)
557
- for (var I = S.call(e), C; !(C = I.next()).done; )
558
- Re(C.value) && Ke(C.value, o);
559
594
  }
560
595
  }
561
- }
562
- function _t(e) {
563
- {
564
- var o = e.type;
565
- if (o == null || typeof o == "string")
566
- return;
567
- var s;
568
- if (typeof o == "function")
569
- s = o.propTypes;
570
- else if (typeof o == "object" && (o.$$typeof === g || // Note: Memo only checks outer props here.
571
- // Inner props are checked in the reconciler.
572
- o.$$typeof === w))
573
- s = o.propTypes;
574
- else
575
- return;
576
- if (s) {
577
- var u = b(o);
578
- gt(s, e.props, "prop", u, e);
579
- } else if (o.PropTypes !== void 0 && !Ce) {
580
- Ce = !0;
581
- var S = b(o);
582
- c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", S || "Unknown");
596
+ function wt(e) {
597
+ {
598
+ var o = e.type;
599
+ if (o == null || typeof o == "string")
600
+ return;
601
+ var a;
602
+ if (typeof o == "function")
603
+ a = o.propTypes;
604
+ else if (typeof o == "object" && (o.$$typeof === h || // Note: Memo only checks outer props here.
605
+ // Inner props are checked in the reconciler.
606
+ o.$$typeof === v))
607
+ a = o.propTypes;
608
+ else
609
+ return;
610
+ if (a) {
611
+ var m = W(o);
612
+ gt(a, e.props, "prop", m, e);
613
+ } else if (o.PropTypes !== void 0 && !he) {
614
+ he = !0;
615
+ var T = W(o);
616
+ A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
617
+ }
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.");
583
619
  }
584
- typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
585
620
  }
586
- }
587
- function Nt(e) {
588
- {
589
- for (var o = Object.keys(e.props), s = 0; s < o.length; s++) {
590
- var u = o[s];
591
- if (u !== "children" && u !== "key") {
592
- H(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), H(null);
593
- break;
621
+ function _t(e) {
622
+ {
623
+ for (var o = Object.keys(e.props), a = 0; a < o.length; a++) {
624
+ var m = o[a];
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);
627
+ break;
628
+ }
594
629
  }
630
+ e.ref !== null && (H(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
595
631
  }
596
- e.ref !== null && (H(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
597
632
  }
598
- }
599
- function Ve(e, o, s, u, S, I) {
600
- {
601
- var C = de(e);
602
- if (!C) {
603
- var h = "";
604
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
605
- var $ = wt(S);
606
- $ ? h += $ : h += Me();
607
- var O;
608
- e === null ? O = "null" : ve(e) ? O = "array" : e !== void 0 && e.$$typeof === n ? (O = "<" + (b(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : O = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, h);
609
- }
610
- var L = It(e, o, s, S, I);
611
- if (L == null)
612
- return L;
613
- if (C) {
614
- var U = o.children;
615
- if (U !== void 0)
616
- if (u)
617
- if (ve(U)) {
618
- for (var X = 0; X < U.length; X++)
619
- Ue(U[X], e);
620
- Object.freeze && Object.freeze(U);
621
- } else
622
- c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
623
- else
624
- Ue(U, e);
633
+ function Ye(e, o, a, m, T, N) {
634
+ {
635
+ var E = x(e);
636
+ if (!E) {
637
+ var C = "";
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
+ var K = St(T);
640
+ K ? C += K : C += Fe();
641
+ var L;
642
+ e === null ? L = "null" : Array.isArray(e) ? L = "array" : e !== void 0 && e.$$typeof === i ? (L = "<" + (W(e.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : L = 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", L, C);
643
+ }
644
+ var D = xt(e, o, a, T, N);
645
+ if (D == null)
646
+ return D;
647
+ if (E) {
648
+ var q = o.children;
649
+ if (q !== void 0)
650
+ if (m)
651
+ if (Array.isArray(q)) {
652
+ for (var X = 0; X < q.length; X++)
653
+ Ke(q[X], e);
654
+ Object.freeze && Object.freeze(q);
655
+ } else
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
+ else
658
+ Ke(q, e);
659
+ }
660
+ return e === r.Fragment ? _t(D) : wt(D), D;
625
661
  }
626
- return e === i ? Nt(L) : _t(L), L;
627
662
  }
628
- }
629
- function Pt(e, o, s) {
630
- return Ve(e, o, s, !0);
631
- }
632
- function kt(e, o, s) {
633
- return Ve(e, o, s, !1);
634
- }
635
- var Ot = kt, jt = Pt;
636
- oe.Fragment = i, oe.jsx = Ot, oe.jsxs = jt;
637
- }()), oe;
663
+ function It(e, o, a) {
664
+ return Ye(e, o, a, !0);
665
+ }
666
+ function Tt(e, o, a) {
667
+ return Ye(e, o, a, !1);
668
+ }
669
+ var Nt = Tt, Ot = It;
670
+ r.jsx = Nt, r.jsxs = Ot;
671
+ }();
672
+ }(Ee)), Ee;
638
673
  }
639
- process.env.NODE_ENV === "production" ? Ee.exports = ln() : Ee.exports = un();
640
- var N = Ee.exports;
641
- class cn extends Gt {
674
+ process.env.NODE_ENV === "production" ? Re.exports = on() : Re.exports = an();
675
+ var j = Re.exports;
676
+ class sn extends Bt {
642
677
  constructor(t, i) {
643
678
  super(t);
644
- W(this, "onMessage");
679
+ U(this, "onMessage");
645
680
  this.onMessage = i;
646
681
  }
647
682
  readMessage(t) {
@@ -657,10 +692,10 @@ class cn extends Gt {
657
692
  }
658
693
  }
659
694
  }
660
- class fn extends Jt {
695
+ class ln extends zt {
661
696
  constructor(t, i) {
662
697
  super(t);
663
- W(this, "onSend");
698
+ U(this, "onSend");
664
699
  this.onSend = i;
665
700
  }
666
701
  async write(t) {
@@ -672,7 +707,7 @@ class fn extends Jt {
672
707
  }
673
708
  }
674
709
  }
675
- const dn = {
710
+ const un = {
676
711
  base: "vs-dark",
677
712
  inherit: !0,
678
713
  colors: {
@@ -688,61 +723,61 @@ const dn = {
688
723
  function V(r) {
689
724
  return `file:///PACKAGE/Project/Sources/${r}`;
690
725
  }
691
- function rt(r, n = 0) {
726
+ function it(r, n = 0) {
692
727
  setTimeout(r, n);
693
728
  }
694
- function mn(r, n) {
695
- const t = new Bt(
729
+ function cn(r, n) {
730
+ const t = new Vt(
696
731
  n.startLineNumber,
697
732
  n.startColumn,
698
733
  n.endLineNumber || n.startLineNumber,
699
734
  n.endColumn || n.startColumn
700
735
  );
701
- rt(() => {
736
+ it(() => {
702
737
  r.setSelection(t), r.revealRangeInCenter(t), r.focus();
703
738
  });
704
739
  }
705
- function gn(r, n, t = 0) {
706
- t > 0 && (n = t + n), rt(() => {
740
+ function fn(r, n, t = 0) {
741
+ t > 0 && (n = t + n), it(() => {
707
742
  r.setPosition({ lineNumber: n, column: 1 }), r.revealLineInCenter(n), r.focus();
708
743
  });
709
744
  }
710
- function Bn(r, n, t) {
745
+ function Vn(r, n, t) {
711
746
  const l = r.getModel();
712
747
  if (l && n) {
713
- const p = l.getLineCount();
714
- for (let m = 1; m <= p; m++) {
715
- const v = l.getLineContent(m);
716
- if (new RegExp(`(?:Function|function) ${t}`).test(v))
717
- return m;
748
+ const u = l.getLineCount();
749
+ for (let f = 1; f <= u; f++) {
750
+ const s = l.getLineContent(f);
751
+ if (new RegExp(`(?:Function|function) ${t}`).test(s))
752
+ return f;
718
753
  }
719
754
  }
720
755
  return 0;
721
756
  }
722
- const pn = {
757
+ const dn = {
723
758
  getServiceOverride: ({ openHandler: r }) => ({
724
- get [ze.toString()]() {
725
- const n = Se.get(ze);
759
+ get [qe.toString()]() {
760
+ const n = xe.get(qe);
726
761
  return r && n.registerCodeEditorOpenHandler(r), n;
727
762
  }
728
763
  })
729
- }, vn = {
764
+ }, mn = {
730
765
  getServiceOverride: () => ({
731
766
  get [Be.toString()]() {
732
- return Se.get(
767
+ return xe.get(
733
768
  Be
734
769
  );
735
770
  }
736
771
  })
737
- }, hn = {
772
+ }, gn = {
738
773
  getServiceOverride: () => ({
739
- get [Ze.toString()]() {
740
- const r = Se.get(Ze);
774
+ get [ze.toString()]() {
775
+ const r = xe.get(ze);
741
776
  return r.createModelReference = (n) => Promise.resolve({ dispose: () => {
742
777
  } }), r;
743
778
  }
744
779
  })
745
- }, bn = {
780
+ }, pn = {
746
781
  comments: {
747
782
  lineComment: "//",
748
783
  blockComment: ["/**", "**/"]
@@ -788,15 +823,15 @@ const pn = {
788
823
  action: { indentAction: 1 }
789
824
  }
790
825
  ]
791
- }, Cn = {
826
+ }, vn = {
792
827
  provideCompletionItems: async (r, n) => {
793
828
  const t = r.getWordUntilPosition(n);
794
829
  return {
795
830
  suggestions: [
796
831
  {
797
832
  label: "var",
798
- kind: a.languages.CompletionItemKind.Snippet,
799
- range: new a.Range(
833
+ kind: c.languages.CompletionItemKind.Snippet,
834
+ range: new c.Range(
800
835
  n.lineNumber,
801
836
  t.startColumn,
802
837
  n.lineNumber,
@@ -804,12 +839,12 @@ const pn = {
804
839
  ),
805
840
  insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
806
841
  `),
807
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
842
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
808
843
  },
809
844
  {
810
845
  label: "While",
811
- kind: a.languages.CompletionItemKind.Snippet,
812
- range: new a.Range(
846
+ kind: c.languages.CompletionItemKind.Snippet,
847
+ range: new c.Range(
813
848
  n.lineNumber,
814
849
  t.startColumn,
815
850
  n.lineNumber,
@@ -821,12 +856,12 @@ const pn = {
821
856
  "End while"
822
857
  ].join(`
823
858
  `),
824
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
859
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
825
860
  },
826
861
  {
827
862
  label: "Case of",
828
- kind: a.languages.CompletionItemKind.Snippet,
829
- range: new a.Range(
863
+ kind: c.languages.CompletionItemKind.Snippet,
864
+ range: new c.Range(
830
865
  n.lineNumber,
831
866
  t.startColumn,
832
867
  n.lineNumber,
@@ -839,12 +874,12 @@ const pn = {
839
874
  "End case"
840
875
  ].join(`
841
876
  `),
842
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
877
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
843
878
  },
844
879
  {
845
880
  label: "Else",
846
- kind: a.languages.CompletionItemKind.Snippet,
847
- range: new a.Range(
881
+ kind: c.languages.CompletionItemKind.Snippet,
882
+ range: new c.Range(
848
883
  n.lineNumber,
849
884
  t.startColumn,
850
885
  n.lineNumber,
@@ -852,12 +887,12 @@ const pn = {
852
887
  ),
853
888
  insertText: ["Else", " "].join(`
854
889
  `),
855
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
890
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
856
891
  },
857
892
  {
858
893
  label: "If",
859
- kind: a.languages.CompletionItemKind.Snippet,
860
- range: new a.Range(
894
+ kind: c.languages.CompletionItemKind.Snippet,
895
+ range: new c.Range(
861
896
  n.lineNumber,
862
897
  t.startColumn,
863
898
  n.lineNumber,
@@ -867,12 +902,12 @@ const pn = {
867
902
  `
868
903
  `
869
904
  ),
870
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
905
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
871
906
  },
872
907
  {
873
908
  label: "For",
874
- kind: a.languages.CompletionItemKind.Snippet,
875
- range: new a.Range(
909
+ kind: c.languages.CompletionItemKind.Snippet,
910
+ range: new c.Range(
876
911
  n.lineNumber,
877
912
  t.startColumn,
878
913
  n.lineNumber,
@@ -884,12 +919,12 @@ const pn = {
884
919
  "End for"
885
920
  ].join(`
886
921
  `),
887
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
922
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
888
923
  },
889
924
  {
890
925
  label: "Function",
891
- kind: a.languages.CompletionItemKind.Snippet,
892
- range: new a.Range(
926
+ kind: c.languages.CompletionItemKind.Snippet,
927
+ range: new c.Range(
893
928
  n.lineNumber,
894
929
  t.startColumn,
895
930
  n.lineNumber,
@@ -900,20 +935,20 @@ const pn = {
900
935
  " ${5:body}"
901
936
  ].join(`
902
937
  `),
903
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
938
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
904
939
  }
905
940
  ]
906
941
  };
907
942
  }
908
- }, Rn = {
943
+ }, hn = {
909
944
  provideCompletionItems: async (r, n) => {
910
945
  const t = r.getWordUntilPosition(n);
911
946
  return {
912
947
  suggestions: [
913
948
  {
914
949
  label: "var",
915
- kind: a.languages.CompletionItemKind.Snippet,
916
- range: new a.Range(
950
+ kind: c.languages.CompletionItemKind.Snippet,
951
+ range: new c.Range(
917
952
  n.lineNumber,
918
953
  t.startColumn,
919
954
  n.lineNumber,
@@ -921,12 +956,12 @@ const pn = {
921
956
  ),
922
957
  insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
923
958
  `),
924
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
959
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
925
960
  },
926
961
  {
927
962
  label: "while",
928
- kind: a.languages.CompletionItemKind.Snippet,
929
- range: new a.Range(
963
+ kind: c.languages.CompletionItemKind.Snippet,
964
+ range: new c.Range(
930
965
  n.lineNumber,
931
966
  t.startColumn,
932
967
  n.lineNumber,
@@ -936,12 +971,12 @@ const pn = {
936
971
  `
937
972
  `
938
973
  ),
939
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
974
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
940
975
  },
941
976
  {
942
977
  label: "switch",
943
- kind: a.languages.CompletionItemKind.Snippet,
944
- range: new a.Range(
978
+ kind: c.languages.CompletionItemKind.Snippet,
979
+ range: new c.Range(
945
980
  n.lineNumber,
946
981
  t.startColumn,
947
982
  n.lineNumber,
@@ -954,12 +989,12 @@ const pn = {
954
989
  "end"
955
990
  ].join(`
956
991
  `),
957
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
992
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
958
993
  },
959
994
  {
960
995
  label: "else",
961
- kind: a.languages.CompletionItemKind.Snippet,
962
- range: new a.Range(
996
+ kind: c.languages.CompletionItemKind.Snippet,
997
+ range: new c.Range(
963
998
  n.lineNumber,
964
999
  t.startColumn,
965
1000
  n.lineNumber,
@@ -967,12 +1002,12 @@ const pn = {
967
1002
  ),
968
1003
  insertText: ["else", " "].join(`
969
1004
  `),
970
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1005
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
971
1006
  },
972
1007
  {
973
1008
  label: "if",
974
- kind: a.languages.CompletionItemKind.Snippet,
975
- range: new a.Range(
1009
+ kind: c.languages.CompletionItemKind.Snippet,
1010
+ range: new c.Range(
976
1011
  n.lineNumber,
977
1012
  t.startColumn,
978
1013
  n.lineNumber,
@@ -982,12 +1017,12 @@ const pn = {
982
1017
  `
983
1018
  `
984
1019
  ),
985
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1020
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
986
1021
  },
987
1022
  {
988
1023
  label: "for",
989
- kind: a.languages.CompletionItemKind.Snippet,
990
- range: new a.Range(
1024
+ kind: c.languages.CompletionItemKind.Snippet,
1025
+ range: new c.Range(
991
1026
  n.lineNumber,
992
1027
  t.startColumn,
993
1028
  n.lineNumber,
@@ -999,12 +1034,12 @@ const pn = {
999
1034
  "end"
1000
1035
  ].join(`
1001
1036
  `),
1002
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1037
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
1003
1038
  },
1004
1039
  {
1005
1040
  label: "function",
1006
- kind: a.languages.CompletionItemKind.Snippet,
1007
- range: new a.Range(
1041
+ kind: c.languages.CompletionItemKind.Snippet,
1042
+ range: new c.Range(
1008
1043
  n.lineNumber,
1009
1044
  t.startColumn,
1010
1045
  n.lineNumber,
@@ -1015,12 +1050,12 @@ const pn = {
1015
1050
  " ${5:body}"
1016
1051
  ].join(`
1017
1052
  `),
1018
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1053
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
1019
1054
  }
1020
1055
  ]
1021
1056
  };
1022
1057
  }
1023
- }, En = [
1058
+ }, bn = [
1024
1059
  // zoom in
1025
1060
  {
1026
1061
  keybinding: Q.CtrlCmd | ee.NumpadAdd,
@@ -1048,219 +1083,219 @@ const pn = {
1048
1083
  keybinding: Q.CtrlCmd | ee.Digit0,
1049
1084
  command: "editor.action.fontZoomReset"
1050
1085
  }
1051
- ], Sn = ({ defaultZoom: r }) => (J(() => {
1086
+ ], Cn = ({ defaultZoom: r }) => (J(() => {
1052
1087
  r !== void 0 && nt.EditorZoom.setZoomLevel(r);
1053
1088
  }, []), null);
1054
- ({}).VITE_DISABLE_MONACO_LOADER || Ft.config({
1055
- monaco: a
1089
+ ({}).VITE_DISABLE_MONACO_LOADER || At.config({
1090
+ monaco: c
1056
1091
  // paths: {
1057
1092
  // vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
1058
1093
  // },
1059
1094
  });
1060
- const ot = Qe(void 0), Zn = ({ children: r, url: n, qodly: t, defaultZoom: i, openHandler: l, language: p = "4d", defaultInited: m = !1 }) => {
1061
- const v = $t(), [g, T] = se(m), [_, w] = se(null), x = qe(), P = qe(0);
1095
+ const ot = Qe(void 0), qn = ({ children: r, url: n, qodly: t, defaultZoom: i, openHandler: l, language: u = "4d", defaultInited: f = !1 }) => {
1096
+ const s = Lt(), [d, h] = oe(f), [b, S] = oe(null), v = Ve(), O = Ve(0);
1062
1097
  J(() => {
1063
- Vt({
1098
+ Wt({
1064
1099
  configureEditorOrViewsService: {
1065
1100
  enableViewsService: !1
1066
1101
  },
1067
1102
  debugLogging: !1,
1068
1103
  userServices: {
1069
1104
  // @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
1070
- ...pn.getServiceOverride({ openHandler: l }),
1071
- ...vn.getServiceOverride(),
1072
- ...hn.getServiceOverride()
1105
+ ...dn.getServiceOverride({ openHandler: l }),
1106
+ ...mn.getServiceOverride(),
1107
+ ...gn.getServiceOverride()
1073
1108
  }
1074
1109
  });
1075
1110
  }, []), J(() => {
1076
- n && v && j();
1077
- }, [n, v]);
1078
- const j = async () => {
1079
- if (!v)
1111
+ n && s && k();
1112
+ }, [n, s]);
1113
+ const k = async () => {
1114
+ if (!s)
1080
1115
  return;
1081
- const E = await Wt();
1082
- v.editor.defineTheme("fd-dark", E || dn), v.languages.register({
1083
- id: p,
1116
+ const x = await $t();
1117
+ s.editor.defineTheme("fd-dark", x || un), s.languages.register({
1118
+ id: u,
1084
1119
  extensions: [".4dm", ".4qm", ".4qs"],
1085
1120
  aliases: ["4d", "4D"]
1086
- }), v.languages.setLanguageConfiguration(p, bn), v.languages.registerCompletionItemProvider(
1087
- p,
1088
- t ? Rn : Cn
1089
- ), nt.addKeybindingRules(En), k();
1090
- }, k = () => {
1091
- w(null);
1092
- let E;
1121
+ }), s.languages.setLanguageConfiguration(u, pn), s.languages.registerCompletionItemProvider(
1122
+ u,
1123
+ t ? hn : vn
1124
+ ), nt.addKeybindingRules(bn), P();
1125
+ }, P = () => {
1126
+ S(null);
1127
+ let x;
1093
1128
  try {
1094
- E = new WebSocket(localStorage.LSP_SERVER || n);
1129
+ x = new WebSocket(localStorage.LSP_SERVER || n);
1095
1130
  } catch {
1096
- w(new Event("INVALID_URL"));
1131
+ S(new Event("INVALID_URL"));
1097
1132
  return;
1098
1133
  }
1099
- E.onopen = A, E.onclose = R, E.onerror = c, P.current = 0;
1100
- }, A = async function() {
1101
- const E = Ht(this), y = new cn(E), b = new fn(E), K = new Yt({
1134
+ x.onopen = $, x.onclose = _, x.onerror = R, O.current = 0;
1135
+ }, $ = async function() {
1136
+ const x = Gt(this), I = new sn(x), w = new ln(x), W = new Kt({
1102
1137
  name: "4D Language Client",
1103
1138
  clientOptions: {
1104
1139
  workspaceFolder: {
1105
- uri: Zt.parse("file:///PACKAGE")
1140
+ uri: qt.parse("file:///PACKAGE")
1106
1141
  },
1107
1142
  // use a language id as a document selector
1108
- documentSelector: [{ scheme: "file", language: p }],
1143
+ documentSelector: [{ scheme: "file", language: u }],
1109
1144
  // disable the default error handler
1110
1145
  errorHandler: {
1111
- error: () => ({ action: qt.Continue }),
1112
- closed: () => ({ action: zt.DoNotRestart })
1146
+ error: () => ({ action: Yt.Continue }),
1147
+ closed: () => ({ action: Ut.DoNotRestart })
1113
1148
  }
1114
1149
  },
1115
1150
  // create a language client connection from the JSON RPC connection on demand
1116
1151
  connectionProvider: {
1117
1152
  get: () => Promise.resolve({
1118
- reader: y,
1119
- writer: b
1153
+ reader: I,
1154
+ writer: w
1120
1155
  })
1121
1156
  }
1122
1157
  });
1123
- x.current = K, y.onClose(() => {
1124
- K.stop(), P.current < 3 ? setTimeout(() => {
1125
- P.current++, k();
1126
- }, 1e3) : w(new Event("WEBSOCKET_CLOSED"));
1127
- }), K.needsStart() && await K.start(), T(!0);
1128
- }, R = () => {
1129
- }, c = (E) => {
1130
- w(E);
1158
+ v.current = W, I.onClose(() => {
1159
+ W.stop(), O.current < 3 ? setTimeout(() => {
1160
+ O.current++, P();
1161
+ }, 1e3) : S(new Event("WEBSOCKET_CLOSED"));
1162
+ }), W.needsStart() && await W.start(), h(!0);
1163
+ }, _ = () => {
1164
+ }, R = (x) => {
1165
+ S(x);
1131
1166
  };
1132
1167
  J(() => {
1133
- const E = Kt.subscribe(({ action: y, payload: b }) => {
1134
- switch (y) {
1135
- case Z.WILL_SAVE:
1136
- Y(b.filePath);
1168
+ const x = Ft.subscribe(({ action: I, payload: w }) => {
1169
+ switch (I) {
1170
+ case G.WILL_SAVE:
1171
+ y(w.filePath);
1137
1172
  break;
1138
- case Z.DID_SAVE:
1139
- f(b.filePath, b.content);
1173
+ case G.DID_SAVE:
1174
+ g(w.filePath, w.content);
1140
1175
  break;
1141
- case Z.WILL_CREATE:
1142
- d(b.filePath);
1176
+ case G.WILL_CREATE:
1177
+ p(w.filePath);
1143
1178
  break;
1144
- case Z.DID_CREATE:
1145
- B(b.filePath);
1179
+ case G.DID_CREATE:
1180
+ A(w.filePath);
1146
1181
  break;
1147
- case Z.WILL_RENAME:
1148
- D(b.oldPath, b.newPath);
1182
+ case G.WILL_RENAME:
1183
+ M(w.oldPath, w.newPath);
1149
1184
  break;
1150
- case Z.DID_RENAME:
1151
- F(b.oldPath, b.newPath);
1185
+ case G.DID_RENAME:
1186
+ Y(w.oldPath, w.newPath);
1152
1187
  break;
1153
- case Z.WILL_DELETE:
1154
- M(b.filePath);
1188
+ case G.WILL_DELETE:
1189
+ F(w.filePath);
1155
1190
  break;
1156
- case Z.DID_DELETE:
1157
- de(b.filePath);
1191
+ case G.DID_DELETE:
1192
+ ce(w.filePath);
1158
1193
  break;
1159
1194
  }
1160
1195
  });
1161
- return () => E.unsubscribe();
1196
+ return () => x.unsubscribe();
1162
1197
  }, []);
1163
- const Y = (E, y = Qt.Manual) => {
1164
- var b;
1165
- (b = x.current) == null || b.sendNotification(Xt.type, {
1198
+ const y = (x, I = Jt.Manual) => {
1199
+ var w;
1200
+ (w = v.current) == null || w.sendNotification(Zt.type, {
1166
1201
  textDocument: {
1167
- uri: V(E)
1202
+ uri: V(x)
1168
1203
  },
1169
- reason: y
1204
+ reason: I
1170
1205
  });
1171
- }, f = (E, y) => {
1172
- var b;
1173
- (b = x.current) == null || b.sendNotification(en.type, {
1206
+ }, g = (x, I) => {
1207
+ var w;
1208
+ (w = v.current) == null || w.sendNotification(Ht.type, {
1174
1209
  textDocument: {
1175
- uri: V(E)
1210
+ uri: V(x)
1176
1211
  },
1177
- text: y
1212
+ text: I
1178
1213
  });
1179
- }, d = (E) => {
1180
- var y;
1181
- (y = x.current) == null || y.sendRequest(tn.type, {
1214
+ }, p = (x) => {
1215
+ var I;
1216
+ (I = v.current) == null || I.sendRequest(Xt.type, {
1182
1217
  files: [
1183
1218
  {
1184
- uri: V(E)
1219
+ uri: V(x)
1185
1220
  }
1186
1221
  ]
1187
1222
  });
1188
- }, D = (E, y) => {
1189
- var b;
1190
- (b = x.current) == null || b.sendRequest(nn.type, {
1223
+ }, M = (x, I) => {
1224
+ var w;
1225
+ (w = v.current) == null || w.sendRequest(Qt.type, {
1191
1226
  files: [
1192
1227
  {
1193
- oldUri: V(E),
1194
- newUri: V(y)
1228
+ oldUri: V(x),
1229
+ newUri: V(I)
1195
1230
  }
1196
1231
  ]
1197
1232
  });
1198
- }, M = (E) => {
1199
- var y;
1200
- (y = x.current) == null || y.sendRequest(rn.type, {
1233
+ }, F = (x) => {
1234
+ var I;
1235
+ (I = v.current) == null || I.sendRequest(en.type, {
1201
1236
  files: [
1202
1237
  {
1203
- uri: V(E)
1238
+ uri: V(x)
1204
1239
  }
1205
1240
  ]
1206
1241
  });
1207
- }, B = (E) => {
1208
- var y;
1209
- (y = x.current) == null || y.sendNotification(on.type, {
1242
+ }, A = (x) => {
1243
+ var I;
1244
+ (I = v.current) == null || I.sendNotification(tn.type, {
1210
1245
  files: [
1211
1246
  {
1212
- uri: V(E)
1247
+ uri: V(x)
1213
1248
  }
1214
1249
  ]
1215
1250
  });
1216
- }, F = (E, y) => {
1217
- var b;
1218
- (b = x.current) == null || b.sendNotification(sn.type, {
1251
+ }, Y = (x, I) => {
1252
+ var w;
1253
+ (w = v.current) == null || w.sendNotification(nn.type, {
1219
1254
  files: [
1220
1255
  {
1221
- oldUri: V(E),
1222
- newUri: V(y)
1256
+ oldUri: V(x),
1257
+ newUri: V(I)
1223
1258
  }
1224
1259
  ]
1225
1260
  });
1226
- }, de = (E) => {
1227
- var y;
1228
- (y = x.current) == null || y.sendNotification(an.type, {
1261
+ }, ce = (x) => {
1262
+ var I;
1263
+ (I = v.current) == null || I.sendNotification(rn.type, {
1229
1264
  files: [
1230
1265
  {
1231
- uri: V(E)
1266
+ uri: V(x)
1232
1267
  }
1233
1268
  ]
1234
1269
  });
1235
1270
  };
1236
- return /* @__PURE__ */ N.jsxs(
1271
+ return /* @__PURE__ */ j.jsxs(
1237
1272
  ot.Provider,
1238
1273
  {
1239
1274
  value: {
1240
- inited: g || !!_,
1241
- clientRef: x,
1242
- lastError: _,
1243
- reload: k
1275
+ inited: d || !!b,
1276
+ clientRef: v,
1277
+ lastError: b,
1278
+ reload: P
1244
1279
  },
1245
1280
  children: [
1246
1281
  r,
1247
- /* @__PURE__ */ N.jsx(Sn, { defaultZoom: i })
1282
+ /* @__PURE__ */ j.jsx(Cn, { defaultZoom: i })
1248
1283
  ]
1249
1284
  }
1250
1285
  );
1251
1286
  };
1252
- function Gn() {
1287
+ function Bn() {
1253
1288
  const r = et(ot);
1254
1289
  if (r === void 0)
1255
1290
  throw new Error("useLSP must be used within an LSPContext");
1256
1291
  return r;
1257
1292
  }
1258
- const it = Qe(
1293
+ const at = Qe(
1259
1294
  void 0
1260
- ), Jn = Dt(({ children: r }) => {
1261
- const [n, t] = se(null);
1262
- return /* @__PURE__ */ N.jsx(
1263
- it.Provider,
1295
+ ), zn = kt(({ children: r }) => {
1296
+ const [n, t] = oe(null);
1297
+ return /* @__PURE__ */ j.jsx(
1298
+ at.Provider,
1264
1299
  {
1265
1300
  value: {
1266
1301
  editor: n,
@@ -1270,8 +1305,8 @@ const it = Qe(
1270
1305
  }
1271
1306
  );
1272
1307
  });
1273
- function xn() {
1274
- const r = et(it), n = se(null);
1308
+ function En() {
1309
+ const r = et(at), n = oe(null);
1275
1310
  if (r === void 0) {
1276
1311
  const [t, i] = n;
1277
1312
  return {
@@ -1287,16 +1322,16 @@ var st = {
1287
1322
  className: void 0,
1288
1323
  style: void 0,
1289
1324
  attr: void 0
1290
- }, He = z.createContext && z.createContext(st), G = globalThis && globalThis.__assign || function() {
1291
- return G = Object.assign || function(r) {
1325
+ }, He = z.createContext && z.createContext(st), Z = globalThis && globalThis.__assign || function() {
1326
+ return Z = Object.assign || function(r) {
1292
1327
  for (var n, t = 1, i = arguments.length; t < i; t++) {
1293
1328
  n = arguments[t];
1294
1329
  for (var l in n)
1295
1330
  Object.prototype.hasOwnProperty.call(n, l) && (r[l] = n[l]);
1296
1331
  }
1297
1332
  return r;
1298
- }, G.apply(this, arguments);
1299
- }, yn = globalThis && globalThis.__rest || function(r, n) {
1333
+ }, Z.apply(this, arguments);
1334
+ }, Rn = globalThis && globalThis.__rest || function(r, n) {
1300
1335
  var t = {};
1301
1336
  for (var i in r)
1302
1337
  Object.prototype.hasOwnProperty.call(r, i) && n.indexOf(i) < 0 && (t[i] = r[i]);
@@ -1305,62 +1340,62 @@ var st = {
1305
1340
  n.indexOf(i[l]) < 0 && Object.prototype.propertyIsEnumerable.call(r, i[l]) && (t[i[l]] = r[i[l]]);
1306
1341
  return t;
1307
1342
  };
1308
- function at(r) {
1343
+ function lt(r) {
1309
1344
  return r && r.map(function(n, t) {
1310
- return z.createElement(n.tag, G({
1345
+ return z.createElement(n.tag, Z({
1311
1346
  key: t
1312
- }, n.attr), at(n.child));
1347
+ }, n.attr), lt(n.child));
1313
1348
  });
1314
1349
  }
1315
- function lt(r) {
1350
+ function ut(r) {
1316
1351
  return function(n) {
1317
- return z.createElement(In, G({
1318
- attr: G({}, r.attr)
1319
- }, n), at(r.child));
1352
+ return z.createElement(xn, Z({
1353
+ attr: Z({}, r.attr)
1354
+ }, n), lt(r.child));
1320
1355
  };
1321
1356
  }
1322
- function In(r) {
1357
+ function xn(r) {
1323
1358
  var n = function(t) {
1324
- var i = r.attr, l = r.size, p = r.title, m = yn(r, ["attr", "size", "title"]), v = l || t.size || "1em", g;
1325
- return t.className && (g = t.className), r.className && (g = (g ? g + " " : "") + r.className), z.createElement("svg", G({
1359
+ var i = r.attr, l = r.size, u = r.title, f = Rn(r, ["attr", "size", "title"]), s = l || t.size || "1em", d;
1360
+ return t.className && (d = t.className), r.className && (d = (d ? d + " " : "") + r.className), z.createElement("svg", Z({
1326
1361
  stroke: "currentColor",
1327
1362
  fill: "currentColor",
1328
1363
  strokeWidth: "0"
1329
- }, t.attr, i, m, {
1330
- className: g,
1331
- style: G(G({
1364
+ }, t.attr, i, f, {
1365
+ className: d,
1366
+ style: Z(Z({
1332
1367
  color: r.color || t.color
1333
1368
  }, t.style), r.style),
1334
- height: v,
1335
- width: v,
1369
+ height: s,
1370
+ width: s,
1336
1371
  xmlns: "http://www.w3.org/2000/svg"
1337
- }), p && z.createElement("title", null, p), r.children);
1372
+ }), u && z.createElement("title", null, u), r.children);
1338
1373
  };
1339
1374
  return He !== void 0 ? z.createElement(He.Consumer, null, function(t) {
1340
1375
  return n(t);
1341
1376
  }) : n(st);
1342
1377
  }
1343
- function wn(r) {
1344
- return lt({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z" } }] })(r);
1378
+ function Sn(r) {
1379
+ return ut({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z" } }] })(r);
1345
1380
  }
1346
- function Tn(r) {
1347
- return lt({ 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);
1381
+ function yn(r) {
1382
+ 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);
1348
1383
  }
1349
- const _n = ({ lspProps: { lastError: r, reload: n } }) => {
1350
- const [t, i] = se(!1), l = () => {
1384
+ const wn = ({ lspProps: { lastError: r, reload: n } }) => {
1385
+ const [t, i] = oe(!1), l = () => {
1351
1386
  n();
1352
- }, p = () => {
1387
+ }, u = () => {
1353
1388
  i(!1);
1354
1389
  };
1355
1390
  return J(() => {
1356
1391
  i(!!r);
1357
- }, [r]), t ? /* @__PURE__ */ N.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: [
1358
- /* @__PURE__ */ N.jsxs("span", { className: "flex flex-1 justify-center gap-1", children: [
1359
- /* @__PURE__ */ N.jsx(Tn, { className: "h-4 w-4 text-yellow-600" }),
1360
- /* @__PURE__ */ N.jsxs("span", { children: [
1392
+ }, [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
+ /* @__PURE__ */ j.jsxs("span", { className: "flex flex-1 justify-center gap-1", children: [
1394
+ /* @__PURE__ */ j.jsx(yn, { className: "h-4 w-4 text-yellow-600" }),
1395
+ /* @__PURE__ */ j.jsxs("span", { children: [
1361
1396
  "LSP not loaded.",
1362
1397
  " ",
1363
- /* @__PURE__ */ N.jsx(
1398
+ /* @__PURE__ */ j.jsx(
1364
1399
  "button",
1365
1400
  {
1366
1401
  className: "text-primary-dark underline",
@@ -1370,24 +1405,24 @@ const _n = ({ lspProps: { lastError: r, reload: n } }) => {
1370
1405
  )
1371
1406
  ] })
1372
1407
  ] }),
1373
- /* @__PURE__ */ N.jsx("button", { className: "focus:outline-none", children: /* @__PURE__ */ N.jsx(
1374
- wn,
1408
+ /* @__PURE__ */ j.jsx("button", { className: "focus:outline-none", children: /* @__PURE__ */ j.jsx(
1409
+ Sn,
1375
1410
  {
1376
1411
  className: "h-4 w-4 text-white",
1377
- onClick: p
1412
+ onClick: u
1378
1413
  }
1379
1414
  ) })
1380
1415
  ] }) : null;
1381
- }, Nn = {
1416
+ }, _n = {
1382
1417
  provideCompletionItems: (r, n) => {
1383
1418
  const t = r.getWordUntilPosition(n);
1384
1419
  return {
1385
1420
  suggestions: [
1386
1421
  {
1387
1422
  label: "device:xs",
1388
- kind: a.languages.CompletionItemKind.Snippet,
1423
+ kind: c.languages.CompletionItemKind.Snippet,
1389
1424
  documentation: "Media query for phone device",
1390
- range: new a.Range(
1425
+ range: new c.Range(
1391
1426
  n.lineNumber,
1392
1427
  t.startColumn,
1393
1428
  n.lineNumber,
@@ -1401,116 +1436,116 @@ const _n = ({ lspProps: { lastError: r, reload: n } }) => {
1401
1436
  "}"
1402
1437
  ].join(`
1403
1438
  `),
1404
- insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1439
+ insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
1405
1440
  }
1406
1441
  ]
1407
1442
  };
1408
1443
  }
1409
1444
  };
1410
- function Pn(r, n) {
1445
+ function In(r, n) {
1411
1446
  const t = document.createElement("style");
1412
1447
  t.dataset.id = n, t.textContent = r, document.head.append(t);
1413
1448
  }
1414
- function kn(r) {
1449
+ function Tn(r) {
1415
1450
  return Array.from(document.styleSheets).find(
1416
1451
  (n) => n.ownerNode.getAttribute("data-id") === r
1417
1452
  );
1418
1453
  }
1419
- function On(r, n) {
1454
+ function Nn(r, n) {
1420
1455
  const t = [];
1421
1456
  let i = [];
1422
- const l = [], p = (f, d, D, M) => {
1457
+ const l = [], u = (g, p, M, F) => {
1423
1458
  t.push({
1424
- startLineNumber: f,
1425
- endLineNumber: D,
1426
- startColumn: d,
1427
- endColumn: M
1428
- }), T(), g();
1429
- }, m = (f) => {
1430
- l.indexOf(f) < 0 && l.push(f);
1431
- }, v = (f) => {
1432
- const d = l.indexOf(f);
1433
- d < 0 || l.splice(d, 1);
1434
- }, g = () => {
1435
- for (const f of l)
1459
+ startLineNumber: g,
1460
+ endLineNumber: M,
1461
+ startColumn: p,
1462
+ endColumn: F
1463
+ }), h(), d();
1464
+ }, f = (g) => {
1465
+ l.indexOf(g) < 0 && l.push(g);
1466
+ }, s = (g) => {
1467
+ const p = l.indexOf(g);
1468
+ p < 0 || l.splice(p, 1);
1469
+ }, d = () => {
1470
+ for (const g of l)
1436
1471
  try {
1437
- f(i);
1438
- } catch (d) {
1439
- console.error(d);
1472
+ g(i);
1473
+ } catch (p) {
1474
+ console.error(p);
1440
1475
  }
1441
- }, T = () => {
1442
- const f = r.getModel();
1443
- f && (i = Ln(
1444
- t.map((d) => [
1445
- f.getOffsetAt({
1446
- lineNumber: d.startLineNumber,
1447
- column: d.startColumn
1476
+ }, h = () => {
1477
+ const g = r.getModel();
1478
+ g && (i = Pn(
1479
+ t.map((p) => [
1480
+ g.getOffsetAt({
1481
+ lineNumber: p.startLineNumber,
1482
+ column: p.startColumn
1448
1483
  }),
1449
- f.getOffsetAt({
1450
- lineNumber: d.endLineNumber,
1451
- column: d.endColumn
1484
+ g.getOffsetAt({
1485
+ lineNumber: p.endLineNumber,
1486
+ column: p.endColumn
1452
1487
  })
1453
1488
  ]),
1454
1489
  /*mergeJoins*/
1455
1490
  !0
1456
- ), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= f.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
1457
- }, _ = (f) => {
1458
- const d = {
1491
+ ), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= g.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
1492
+ }, b = (g) => {
1493
+ const p = {
1459
1494
  isDeletion: !1,
1460
1495
  isAddition: !1,
1461
1496
  isReplacement: !1
1462
1497
  };
1463
- return f.text === "" ? d.isDeletion = !0 : f.range.startLineNumber === f.range.endLineNumber && f.range.startColumn === f.range.endColumn ? d.isAddition = !0 : d.isReplacement = !0, d;
1464
- }, w = r.onDidChangeModel((f) => {
1465
- T(), c();
1466
- }), x = r.onDidChangeModelContent((f) => {
1467
- if (!f.isUndoing)
1468
- for (const d of f.changes) {
1469
- const D = _(d);
1470
- if (D.isReplacement || D.isDeletion || D.isAddition) {
1471
- const M = t.some(
1472
- (F) => d.range.startLineNumber >= F.startLineNumber && d.range.endLineNumber <= F.endLineNumber && d.range.startColumn >= F.startColumn && d.range.endColumn <= F.endColumn
1473
- ), B = !M && n && d.range.startLineNumber === 1 && d.range.startColumn === 1 && !tt(d.text);
1474
- if (M || B) {
1475
- const F = r.getModel();
1476
- if (F) {
1477
- F.undo();
1498
+ 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;
1499
+ }, S = r.onDidChangeModel((g) => {
1500
+ h(), R();
1501
+ }), v = r.onDidChangeModelContent((g) => {
1502
+ if (!g.isUndoing)
1503
+ for (const p of g.changes) {
1504
+ const M = b(p);
1505
+ if (M.isReplacement || M.isDeletion || M.isAddition) {
1506
+ const F = t.some(
1507
+ (Y) => p.range.startLineNumber >= Y.startLineNumber && p.range.endLineNumber <= Y.endLineNumber && p.range.startColumn >= Y.startColumn && p.range.endColumn <= Y.endColumn
1508
+ ), A = !F && n && p.range.startLineNumber === 1 && p.range.startColumn === 1 && !tt(p.text);
1509
+ if (F || A) {
1510
+ const Y = r.getModel();
1511
+ if (Y) {
1512
+ Y.undo();
1478
1513
  return;
1479
1514
  }
1480
1515
  }
1481
1516
  }
1482
1517
  }
1483
- }), P = () => {
1484
- w.dispose(), x.dispose();
1518
+ }), O = () => {
1519
+ S.dispose(), v.dispose();
1485
1520
  };
1486
- let j = [], k = `
1521
+ let k = [], P = `
1487
1522
  .idoc-readonly-mark {
1488
1523
  cursor: not-allowed;
1489
1524
  z-index: 1;
1490
1525
  }
1491
1526
  `;
1492
- if (k) {
1493
- const f = "monaco-read-only";
1494
- kn(f) || Pn(k, f), k = null;
1527
+ if (P) {
1528
+ const g = "monaco-read-only";
1529
+ Tn(g) || In(P, g), P = null;
1495
1530
  }
1496
- const A = () => {
1497
- m(c), c();
1531
+ const $ = () => {
1532
+ f(R), R();
1533
+ }, _ = () => {
1534
+ s(R), k = r.deltaDecorations(k, []);
1498
1535
  }, R = () => {
1499
- v(c), j = r.deltaDecorations(j, []);
1500
- }, c = () => {
1501
- const f = r.getModel();
1502
- f && (j = r.deltaDecorations(
1503
- j,
1504
- i.map(Y(f))
1536
+ const g = r.getModel();
1537
+ g && (k = r.deltaDecorations(
1538
+ k,
1539
+ i.map(y(g))
1505
1540
  ));
1506
- }, Y = (f) => (d) => {
1507
- const D = f.getPositionAt(d[0]), M = f.getPositionAt(d[1]);
1541
+ }, y = (g) => (p) => {
1542
+ const M = g.getPositionAt(p[0]), F = g.getPositionAt(p[1]);
1508
1543
  return {
1509
- range: new a.Range(
1510
- D.lineNumber,
1511
- D.column,
1544
+ range: new c.Range(
1512
1545
  M.lineNumber,
1513
- M.column
1546
+ M.column,
1547
+ F.lineNumber,
1548
+ F.column
1514
1549
  ),
1515
1550
  options: {
1516
1551
  className: "idoc-readonly-mark"
@@ -1521,70 +1556,70 @@ function On(r, n) {
1521
1556
  get buffer() {
1522
1557
  return i;
1523
1558
  },
1524
- exclude: p,
1525
- attach: m,
1526
- detach: v,
1527
- dispose: P,
1528
- show: A,
1529
- hide: R
1559
+ exclude: u,
1560
+ attach: f,
1561
+ detach: s,
1562
+ dispose: O,
1563
+ show: $,
1564
+ hide: _
1530
1565
  };
1531
1566
  }
1532
- function jn(r, n, t) {
1567
+ function On(r, n, t) {
1533
1568
  let i = !1;
1534
- const l = (R) => R[1] < R[0] ? (i = !0, [[R[1], R[0]]]) : [[...R]], p = (R) => i ? R.map((c) => c[1] > c[0] ? v(c) : c).reverse() : R;
1535
- let m;
1536
- const v = (R) => (m = R[1], R[1] = R[0], R[0] = m, R), g = l(r);
1537
- let T, _, w, x, P, j, k, A;
1538
- w = g[0];
1539
- for (_ of n)
1540
- for (k = _[0], A = _[1], x = 0; x < g.length; x++) {
1541
- if (w = g[x], P = w[0], j = w[1], P < k)
1542
- j < k ? T = [w] : j <= A ? T = [[P, k - 1]] : T = [
1543
- [P, k - 1],
1544
- [A + 1, j]
1569
+ const l = (_) => _[1] < _[0] ? (i = !0, [[_[1], _[0]]]) : [[..._]], u = (_) => i ? _.map((R) => R[1] > R[0] ? s(R) : R).reverse() : _;
1570
+ let f;
1571
+ const s = (_) => (f = _[1], _[1] = _[0], _[0] = f, _), d = l(r);
1572
+ let h, b, S, v, O, k, P, $;
1573
+ S = d[0];
1574
+ for (b of n)
1575
+ for (P = b[0], $ = b[1], v = 0; v < d.length; v++) {
1576
+ if (S = d[v], O = S[0], k = S[1], O < P)
1577
+ k < P ? h = [S] : k <= $ ? h = [[O, P - 1]] : h = [
1578
+ [O, P - 1],
1579
+ [$ + 1, k]
1545
1580
  ];
1546
- else if (P <= A)
1547
- if (k === Number.NEGATIVE_INFINITY) {
1548
- const R = A + 1;
1549
- T = t === 0 ? [] : [[R, j > R ? j : R]];
1581
+ else if (O <= $)
1582
+ if (P === Number.NEGATIVE_INFINITY) {
1583
+ const _ = $ + 1;
1584
+ h = t === 0 ? [] : [[_, k > _ ? k : _]];
1550
1585
  } else
1551
- A === Number.POSITIVE_INFINITY ? T = t === 0 ? [] : [[k - 1, k - 1]] : j <= A ? T = t < 0 ? [[k - 1, k - 1]] : t > 0 ? [[A + 1, A + 1]] : [] : T = [[A + 1, j]];
1586
+ $ === 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]];
1552
1587
  else
1553
- T = [w];
1554
- if (g.splice(x, 1, ...T), g.length === 1 && g[0][1] < k)
1555
- return p(g);
1588
+ h = [S];
1589
+ if (d.splice(v, 1, ...h), d.length === 1 && d[0][1] < P)
1590
+ return u(d);
1556
1591
  }
1557
- return p(g);
1592
+ return u(d);
1558
1593
  }
1559
- function Ln(r, n) {
1594
+ function Pn(r, n) {
1560
1595
  if (r.length < 2)
1561
1596
  return r;
1562
1597
  const t = [];
1563
- let i = null, l, p;
1598
+ let i = null, l, u;
1564
1599
  r = r.map(
1565
- (m) => (m[1] < m[0] && (l = m[1], m[1] = m[0], m[1] = l), m)
1566
- ).sort((m, v) => m[0] - v[0]), t.push(r[0]);
1567
- for (let m = 1; m < r.length; m++)
1568
- i = t[t.length - 1], p = r[m], i[1] === p[0] && !n ? t.push(p) : i[1] === p[0] - 1 && n ? (i[1] = p[1], t.splice(t.length - 1, 1, i)) : i[1] < p[0] ? t.push(p) : i[1] < p[1] && (i[1] = p[1], t.splice(t.length - 1, 1, i));
1600
+ (f) => (f[1] < f[0] && (l = f[1], f[1] = f[0], f[1] = l), f)
1601
+ ).sort((f, s) => f[0] - s[0]), t.push(r[0]);
1602
+ for (let f = 1; f < r.length; f++)
1603
+ i = t[t.length - 1], u = r[f], 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));
1569
1604
  return t;
1570
1605
  }
1571
1606
  function ie(r, n) {
1572
1607
  return n.bind(r);
1573
1608
  }
1574
- class An {
1609
+ class jn {
1575
1610
  constructor(n, t) {
1576
- W(this, "editor");
1577
- W(this, "intervals");
1578
- W(this, "disposables", []);
1611
+ U(this, "editor");
1612
+ U(this, "intervals");
1613
+ U(this, "disposables", []);
1579
1614
  /**
1580
1615
  * Flag for `excludeIntervals`
1581
1616
  */
1582
- W(this, "prefer", 1);
1583
- W(this, "lastPrefer", 1);
1617
+ U(this, "prefer", 1);
1618
+ U(this, "lastPrefer", 1);
1584
1619
  /**
1585
1620
  * Linked to ICodeEditor.onDidChangeCursorPosition event.
1586
1621
  */
1587
- W(this, "onCursor", ie(
1622
+ U(this, "onCursor", ie(
1588
1623
  this,
1589
1624
  function(n) {
1590
1625
  if (n.source === "api")
@@ -1593,17 +1628,17 @@ class An {
1593
1628
  t.length !== 0 && this.editor.setSelections(t);
1594
1629
  }
1595
1630
  ));
1596
- W(this, "onRectangleSelectionStart", ie(this, function({ event: n }) {
1631
+ U(this, "onRectangleSelectionStart", ie(this, function({ event: n }) {
1597
1632
  n.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
1598
1633
  }));
1599
- W(this, "onRectangleSelectionStop", ie(this, function() {
1634
+ U(this, "onRectangleSelectionStop", ie(this, function() {
1600
1635
  this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
1601
1636
  }));
1602
1637
  /**
1603
1638
  * Linked to ICodeEditor.onKeyDown event.
1604
1639
  */
1605
- W(this, "onKey", ie(this, function(n) {
1606
- const t = n.keyCode, i = a.KeyCode;
1640
+ U(this, "onKey", ie(this, function(n) {
1641
+ const t = n.keyCode, i = c.KeyCode;
1607
1642
  if (n.altKey || i.F1 <= t && t <= i.F19 || n.ctrlKey && t !== i.Backspace)
1608
1643
  return;
1609
1644
  if (t === i.UpArrow || t === i.LeftArrow || t === i.Home || t === i.PageUp) {
@@ -1614,24 +1649,24 @@ class An {
1614
1649
  this.prefer = 1;
1615
1650
  return;
1616
1651
  }
1617
- const l = this.getSelections(), p = this.intervals.buffer;
1618
- let m;
1652
+ const l = this.getSelections(), u = this.intervals.buffer;
1653
+ let f;
1619
1654
  if (t === i.Delete)
1620
- m = (v) => v[0] === v[1] && p.find((g) => v[1] + 1 === g[0]) != null;
1655
+ f = (s) => s[0] === s[1] && u.find((d) => s[1] + 1 === d[0]) != null;
1621
1656
  else if (t === i.Backspace)
1622
- m = (v) => v[0] === v[1] && p.find((g) => g[1] + 1 === v[0]) != null;
1657
+ f = (s) => s[0] === s[1] && u.find((d) => d[1] + 1 === s[0]) != null;
1623
1658
  else
1624
1659
  return;
1625
- l.findIndex(m) !== -1 && (n.stopPropagation(), n.preventDefault());
1660
+ l.findIndex(f) !== -1 && (n.stopPropagation(), n.preventDefault());
1626
1661
  }));
1627
- W(this, "getOffsetAt", ie(this, function(n) {
1662
+ U(this, "getOffsetAt", ie(this, function(n) {
1628
1663
  let t;
1629
1664
  for (let i = 0; i < this.intervals.buffer.length; i++)
1630
1665
  if (t = this.intervals.buffer[i], n <= t[1])
1631
1666
  return t[0] - n < n - t[1] ? t[0] : t[1];
1632
1667
  }));
1633
1668
  var i;
1634
- this.editor = n, this.intervals = On(n, t), (i = this.editor.getModel()) == null || i.setEOL(a.editor.EndOfLineSequence.LF);
1669
+ this.editor = n, this.intervals = Nn(n, t), (i = this.editor.getModel()) == null || i.setEOL(c.editor.EndOfLineSequence.LF);
1635
1670
  }
1636
1671
  enable() {
1637
1672
  this.disposables.push(
@@ -1651,18 +1686,18 @@ class An {
1651
1686
  getApprovedSelections() {
1652
1687
  const n = this.editor.getModel();
1653
1688
  return this.getSelections().map(
1654
- (i) => jn(
1689
+ (i) => On(
1655
1690
  i,
1656
1691
  this.intervals.buffer,
1657
1692
  this.prefer
1658
1693
  )
1659
1694
  ).flat().map((i) => {
1660
- const l = n.getPositionAt(i[0]), p = n.getPositionAt(i[1]);
1661
- return new a.Selection(
1695
+ const l = n.getPositionAt(i[0]), u = n.getPositionAt(i[1]);
1696
+ return new c.Selection(
1662
1697
  l.lineNumber,
1663
1698
  l.column,
1664
- p.lineNumber,
1665
- p.column
1699
+ u.lineNumber,
1700
+ u.column
1666
1701
  );
1667
1702
  });
1668
1703
  }
@@ -1680,102 +1715,102 @@ class An {
1680
1715
  ]);
1681
1716
  }
1682
1717
  }
1683
- const Dn = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__ */ N.jsx("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ N.jsx("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ N.jsxs("div", { className: "space-y-2", children: [
1684
- /* @__PURE__ */ N.jsx("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
1685
- /* @__PURE__ */ N.jsx("div", { className: "h-3 rounded bg-grey-200" }),
1686
- /* @__PURE__ */ N.jsx("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
1687
- /* @__PURE__ */ N.jsx("div", { className: "h-3 rounded bg-grey-200" }),
1688
- /* @__PURE__ */ N.jsx("div", { className: "h-3 rounded bg-grey-200" })
1689
- ] }) }) }), Hn = ({
1718
+ const kn = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__ */ j.jsx("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ j.jsx("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ j.jsxs("div", { className: "space-y-2", children: [
1719
+ /* @__PURE__ */ j.jsx("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
1720
+ /* @__PURE__ */ j.jsx("div", { className: "h-3 rounded bg-grey-200" }),
1721
+ /* @__PURE__ */ j.jsx("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
1722
+ /* @__PURE__ */ j.jsx("div", { className: "h-3 rounded bg-grey-200" }),
1723
+ /* @__PURE__ */ j.jsx("div", { className: "h-3 rounded bg-grey-200" })
1724
+ ] }) }) }), Gn = ({
1690
1725
  path: r,
1691
1726
  initialValue: n,
1692
1727
  theme: t = "fd-dark",
1693
1728
  type: i,
1694
1729
  language: l,
1695
- onChange: p,
1696
- options: m = {},
1697
- extra: v = {},
1698
- showAlerts: g = !1,
1699
- lspProps: T,
1700
- ..._
1730
+ onChange: u,
1731
+ options: f = {},
1732
+ extra: s = {},
1733
+ showAlerts: d = !1,
1734
+ lspProps: h,
1735
+ ...b
1701
1736
  }) => {
1702
- const { initialLineInfo: w, initialSelectionInfo: x } = v, { editor: P, setEditor: j } = xn(), { inited: k } = T;
1703
- function A(c) {
1704
- l === "css" && c.languages.registerCompletionItemProvider("css", Nn);
1737
+ const { initialLineInfo: S, initialSelectionInfo: v } = s, { editor: O, setEditor: k } = En(), { inited: P } = h;
1738
+ function $(R) {
1739
+ l === "css" && R.languages.registerCompletionItemProvider("css", _n);
1705
1740
  }
1706
- function R(c, Y) {
1707
- j(c);
1708
- const f = c.getModel();
1709
- if (f && (f.updateOptions({ insertSpaces: !1 }), c.onKeyUp(() => {
1710
- var D;
1711
- const d = (D = c.getPosition()) == null ? void 0 : D.lineNumber;
1712
- if (d) {
1713
- const M = f.getLineFirstNonWhitespaceColumn(d), B = f.getLineLength(d), F = f.getLineContent(d);
1714
- Dn.test(F) && c.executeEdits("edit-handler", [
1741
+ function _(R, y) {
1742
+ k(R);
1743
+ const g = R.getModel();
1744
+ if (g && (g.updateOptions({ insertSpaces: !1 }), R.onKeyUp(() => {
1745
+ var M;
1746
+ const p = (M = R.getPosition()) == null ? void 0 : M.lineNumber;
1747
+ if (p) {
1748
+ const F = g.getLineFirstNonWhitespaceColumn(p), A = g.getLineLength(p), Y = g.getLineContent(p);
1749
+ kn.test(Y) && R.executeEdits("edit-handler", [
1715
1750
  {
1716
- range: new Y.Range(
1717
- d,
1751
+ range: new y.Range(
1752
+ p,
1718
1753
  0,
1719
- d,
1720
- B
1754
+ p,
1755
+ A
1721
1756
  ),
1722
- text: F.substr(
1723
- M - 1,
1724
- B - M
1757
+ text: Y.substr(
1758
+ F - 1,
1759
+ A - F
1725
1760
  )
1726
1761
  }
1727
1762
  ]);
1728
1763
  }
1729
- })), i === Ut.METHOD && tt(n)) {
1730
- const d = new An(c, !0);
1731
- d.exclude(1, 1, 1, Number.POSITIVE_INFINITY), d.enable();
1764
+ })), i === Mt.METHOD && tt(n)) {
1765
+ const p = new jn(R, !0);
1766
+ p.exclude(1, 1, 1, Number.POSITIVE_INFINITY), p.enable();
1732
1767
  }
1733
1768
  }
1734
1769
  return J(() => {
1735
- if (!P)
1770
+ if (!O)
1736
1771
  return;
1737
- const { line: c, offset: Y } = w || {};
1738
- c && gn(P, c, Y);
1739
- }, [w, P]), J(() => {
1740
- if (!P)
1772
+ const { line: R, offset: y } = S || {};
1773
+ R && fn(O, R, y);
1774
+ }, [S, O]), J(() => {
1775
+ if (!O)
1741
1776
  return;
1742
- const { selection: c } = x || {};
1743
- c && mn(P, c);
1744
- }, [x, P]), k ? /* @__PURE__ */ N.jsxs(N.Fragment, { children: [
1745
- g ? /* @__PURE__ */ N.jsx(_n, { lspProps: T }) : null,
1746
- /* @__PURE__ */ N.jsx(
1747
- Mt,
1777
+ const { selection: R } = v || {};
1778
+ R && cn(O, R);
1779
+ }, [v, O]), P ? /* @__PURE__ */ j.jsxs(j.Fragment, { children: [
1780
+ d ? /* @__PURE__ */ j.jsx(wn, { lspProps: h }) : null,
1781
+ /* @__PURE__ */ j.jsx(
1782
+ Dt,
1748
1783
  {
1749
1784
  options: {
1750
1785
  readOnly: !0,
1751
1786
  fontSize: 12,
1752
1787
  "semanticHighlighting.enabled": !0,
1753
- ...m
1788
+ ...f
1754
1789
  },
1755
1790
  path: V(r),
1756
1791
  value: n,
1757
1792
  theme: "fd-dark",
1758
- onChange: (c) => p && p(c || ""),
1793
+ onChange: (R) => u && u(R || ""),
1759
1794
  language: l,
1760
- beforeMount: A,
1761
- onMount: R,
1762
- loading: /* @__PURE__ */ N.jsx(Xe, {}),
1763
- ..._
1795
+ beforeMount: $,
1796
+ onMount: _,
1797
+ loading: /* @__PURE__ */ j.jsx(Xe, {}),
1798
+ ...b
1764
1799
  }
1765
1800
  )
1766
- ] }) : /* @__PURE__ */ N.jsx(Xe, {});
1801
+ ] }) : /* @__PURE__ */ j.jsx(Xe, {});
1767
1802
  };
1768
1803
  export {
1769
- _n as Alerts,
1770
- Hn as CodeEditor,
1771
- Jn as CodeEditorProvider,
1772
- Zn as LSPProvider,
1773
- rt as _await,
1804
+ wn as Alerts,
1805
+ Gn as CodeEditor,
1806
+ zn as CodeEditorProvider,
1807
+ qn as LSPProvider,
1808
+ it as _await,
1774
1809
  V as getFileSystemPath,
1775
- Bn as getFunctionOffset,
1776
- gn as jumpToLine,
1777
- mn as jumpToSelection,
1778
- xn as useCodeEditor,
1779
- Gn as useLSP
1810
+ Vn as getFunctionOffset,
1811
+ fn as jumpToLine,
1812
+ cn as jumpToSelection,
1813
+ En as useCodeEditor,
1814
+ Bn as useLSP
1780
1815
  };
1781
1816
  //# sourceMappingURL=index.es.js.map