@omniviewdev/editors 3.0.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editors.css +1 -1
- package/dist/index.d.ts +30 -2
- package/dist/index.js +1381 -1337
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import { useTheme as zt, Checkbox as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import Qe, { forwardRef as ve, useRef as Y, useState as Pe, useMemo as Ae, useEffect as V, useImperativeHandle as vt, useCallback as Ne, Suspense as $t, lazy as It, Children as Wt, isValidElement as Bt, useId as Ht, useLayoutEffect as bt, useSyncExternalStore as Ut } from "react";
|
|
2
|
+
import * as $ from "monaco-editor";
|
|
3
|
+
import { useTheme as zt, Checkbox as He, Separator as Ft, Blockquote as Vt, Link as Yt, Table as ye, CodeBlock as qt, Code as Jt, Accordion as nt, CommandList as ue, useCommandListConfig as Gt, useCommandListStoreContext as Xt } from "@omniviewdev/base-ui";
|
|
4
|
+
import Qt from "remark-gfm";
|
|
5
|
+
import Zt from "rehype-raw";
|
|
6
|
+
import Kt, { defaultSchema as Ue } from "rehype-sanitize";
|
|
7
7
|
import "@xterm/xterm/css/xterm.css";
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
if (
|
|
12
|
-
|
|
8
|
+
var Ee = { exports: {} }, ke = {};
|
|
9
|
+
var ot;
|
|
10
|
+
function er() {
|
|
11
|
+
if (ot) return ke;
|
|
12
|
+
ot = 1;
|
|
13
13
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
14
|
-
function n
|
|
15
|
-
var
|
|
16
|
-
if (
|
|
17
|
-
|
|
14
|
+
function r(n, c, u) {
|
|
15
|
+
var l = null;
|
|
16
|
+
if (u !== void 0 && (l = "" + u), c.key !== void 0 && (l = "" + c.key), "key" in c) {
|
|
17
|
+
u = {};
|
|
18
18
|
for (var a in c)
|
|
19
|
-
a !== "key" && (
|
|
20
|
-
} else
|
|
21
|
-
return c =
|
|
19
|
+
a !== "key" && (u[a] = c[a]);
|
|
20
|
+
} else u = c;
|
|
21
|
+
return c = u.ref, {
|
|
22
22
|
$$typeof: e,
|
|
23
|
-
type:
|
|
24
|
-
key:
|
|
23
|
+
type: n,
|
|
24
|
+
key: l,
|
|
25
25
|
ref: c !== void 0 ? c : null,
|
|
26
|
-
props:
|
|
26
|
+
props: u
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
return ke.Fragment = t, ke.jsx =
|
|
29
|
+
return ke.Fragment = t, ke.jsx = r, ke.jsxs = r, ke;
|
|
30
30
|
}
|
|
31
31
|
var xe = {};
|
|
32
|
-
var
|
|
33
|
-
function
|
|
34
|
-
return
|
|
32
|
+
var it;
|
|
33
|
+
function tr() {
|
|
34
|
+
return it || (it = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
35
35
|
function e(o) {
|
|
36
36
|
if (o == null) return null;
|
|
37
37
|
if (typeof o == "function")
|
|
38
|
-
return o.$$typeof ===
|
|
38
|
+
return o.$$typeof === v ? null : o.displayName || o.name || null;
|
|
39
39
|
if (typeof o == "string") return o;
|
|
40
40
|
switch (o) {
|
|
41
|
-
case
|
|
41
|
+
case N:
|
|
42
42
|
return "Fragment";
|
|
43
|
-
case
|
|
43
|
+
case C:
|
|
44
44
|
return "Profiler";
|
|
45
|
-
case
|
|
45
|
+
case q:
|
|
46
46
|
return "StrictMode";
|
|
47
|
-
case
|
|
47
|
+
case P:
|
|
48
48
|
return "Suspense";
|
|
49
|
-
case
|
|
49
|
+
case F:
|
|
50
50
|
return "SuspenseList";
|
|
51
51
|
case ne:
|
|
52
52
|
return "Activity";
|
|
@@ -55,21 +55,21 @@ function Qt() {
|
|
|
55
55
|
switch (typeof o.tag == "number" && console.error(
|
|
56
56
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
57
57
|
), o.$$typeof) {
|
|
58
|
-
case
|
|
58
|
+
case H:
|
|
59
59
|
return "Portal";
|
|
60
|
-
case
|
|
60
|
+
case W:
|
|
61
61
|
return o.displayName || "Context";
|
|
62
|
-
case
|
|
62
|
+
case I:
|
|
63
63
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
64
64
|
case U:
|
|
65
|
-
var
|
|
66
|
-
return o = o.displayName, o || (o =
|
|
67
|
-
case
|
|
68
|
-
return
|
|
65
|
+
var w = o.render;
|
|
66
|
+
return o = o.displayName, o || (o = w.displayName || w.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
67
|
+
case D:
|
|
68
|
+
return w = o.displayName || null, w !== null ? w : e(o.type) || "Memo";
|
|
69
69
|
case X:
|
|
70
|
-
|
|
70
|
+
w = o._payload, o = o._init;
|
|
71
71
|
try {
|
|
72
|
-
return e(o(
|
|
72
|
+
return e(o(w));
|
|
73
73
|
} catch {
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -78,30 +78,30 @@ function Qt() {
|
|
|
78
78
|
function t(o) {
|
|
79
79
|
return "" + o;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function r(o) {
|
|
82
82
|
try {
|
|
83
83
|
t(o);
|
|
84
|
-
var
|
|
84
|
+
var w = !1;
|
|
85
85
|
} catch {
|
|
86
|
-
|
|
86
|
+
w = !0;
|
|
87
87
|
}
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
var
|
|
91
|
-
return
|
|
92
|
-
|
|
88
|
+
if (w) {
|
|
89
|
+
w = console;
|
|
90
|
+
var A = w.error, j = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
91
|
+
return A.call(
|
|
92
|
+
w,
|
|
93
93
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
94
|
-
|
|
94
|
+
j
|
|
95
95
|
), t(o);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
if (o ===
|
|
98
|
+
function n(o) {
|
|
99
|
+
if (o === N) return "<>";
|
|
100
100
|
if (typeof o == "object" && o !== null && o.$$typeof === X)
|
|
101
101
|
return "<...>";
|
|
102
102
|
try {
|
|
103
|
-
var
|
|
104
|
-
return
|
|
103
|
+
var w = e(o);
|
|
104
|
+
return w ? "<" + w + ">" : "<...>";
|
|
105
105
|
} catch {
|
|
106
106
|
return "<...>";
|
|
107
107
|
}
|
|
@@ -110,45 +110,45 @@ function Qt() {
|
|
|
110
110
|
var o = s.A;
|
|
111
111
|
return o === null ? null : o.getOwner();
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function u() {
|
|
114
114
|
return Error("react-stack-top-frame");
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
if (
|
|
118
|
-
var
|
|
119
|
-
if (
|
|
116
|
+
function l(o) {
|
|
117
|
+
if (_.call(o, "key")) {
|
|
118
|
+
var w = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
119
|
+
if (w && w.isReactWarning) return !1;
|
|
120
120
|
}
|
|
121
121
|
return o.key !== void 0;
|
|
122
122
|
}
|
|
123
|
-
function a(o,
|
|
124
|
-
function
|
|
125
|
-
|
|
123
|
+
function a(o, w) {
|
|
124
|
+
function A() {
|
|
125
|
+
d || (d = !0, console.error(
|
|
126
126
|
"%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://react.dev/link/special-props)",
|
|
127
|
-
|
|
127
|
+
w
|
|
128
128
|
));
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
get:
|
|
130
|
+
A.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
131
|
+
get: A,
|
|
132
132
|
configurable: !0
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function p() {
|
|
136
136
|
var o = e(this.type);
|
|
137
|
-
return
|
|
137
|
+
return h[o] || (h[o] = !0, console.error(
|
|
138
138
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
139
139
|
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
140
140
|
}
|
|
141
|
-
function g(o,
|
|
142
|
-
var
|
|
141
|
+
function g(o, w, A, j, B, O) {
|
|
142
|
+
var L = A.ref;
|
|
143
143
|
return o = {
|
|
144
|
-
$$typeof:
|
|
144
|
+
$$typeof: R,
|
|
145
145
|
type: o,
|
|
146
|
-
key:
|
|
147
|
-
props:
|
|
148
|
-
_owner:
|
|
149
|
-
}, (
|
|
146
|
+
key: w,
|
|
147
|
+
props: A,
|
|
148
|
+
_owner: j
|
|
149
|
+
}, (L !== void 0 ? L : null) !== null ? Object.defineProperty(o, "ref", {
|
|
150
150
|
enumerable: !1,
|
|
151
|
-
get:
|
|
151
|
+
get: p
|
|
152
152
|
}) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
153
153
|
configurable: !1,
|
|
154
154
|
enumerable: !1,
|
|
@@ -163,197 +163,197 @@ function Qt() {
|
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
166
|
+
value: B
|
|
167
167
|
}), Object.defineProperty(o, "_debugTask", {
|
|
168
168
|
configurable: !1,
|
|
169
169
|
enumerable: !1,
|
|
170
170
|
writable: !0,
|
|
171
|
-
value:
|
|
171
|
+
value: O
|
|
172
172
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
173
173
|
}
|
|
174
|
-
function x(o,
|
|
175
|
-
var
|
|
176
|
-
if (
|
|
177
|
-
if (
|
|
178
|
-
if (k(
|
|
179
|
-
for (
|
|
180
|
-
|
|
181
|
-
Object.freeze && Object.freeze(
|
|
174
|
+
function x(o, w, A, j, B, O) {
|
|
175
|
+
var L = w.children;
|
|
176
|
+
if (L !== void 0)
|
|
177
|
+
if (j)
|
|
178
|
+
if (k(L)) {
|
|
179
|
+
for (j = 0; j < L.length; j++)
|
|
180
|
+
M(L[j]);
|
|
181
|
+
Object.freeze && Object.freeze(L);
|
|
182
182
|
} else
|
|
183
183
|
console.error(
|
|
184
184
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
185
185
|
);
|
|
186
|
-
else
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
var
|
|
186
|
+
else M(L);
|
|
187
|
+
if (_.call(w, "key")) {
|
|
188
|
+
L = e(o);
|
|
189
|
+
var J = Object.keys(w).filter(function(oe) {
|
|
190
190
|
return oe !== "key";
|
|
191
191
|
});
|
|
192
|
-
|
|
192
|
+
j = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", b[L + j] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
193
193
|
`A props object containing a "key" prop is being spread into JSX:
|
|
194
194
|
let props = %s;
|
|
195
195
|
<%s {...props} />
|
|
196
196
|
React keys must be passed directly to JSX without using spread:
|
|
197
197
|
let props = %s;
|
|
198
198
|
<%s key={someKey} {...props} />`,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
), b[
|
|
199
|
+
j,
|
|
200
|
+
L,
|
|
201
|
+
J,
|
|
202
|
+
L
|
|
203
|
+
), b[L + j] = !0);
|
|
204
204
|
}
|
|
205
|
-
if (
|
|
206
|
-
|
|
207
|
-
for (var Q in
|
|
208
|
-
Q !== "key" && (
|
|
209
|
-
} else
|
|
210
|
-
return
|
|
211
|
-
|
|
205
|
+
if (L = null, A !== void 0 && (r(A), L = "" + A), l(w) && (r(w.key), L = "" + w.key), "key" in w) {
|
|
206
|
+
A = {};
|
|
207
|
+
for (var Q in w)
|
|
208
|
+
Q !== "key" && (A[Q] = w[Q]);
|
|
209
|
+
} else A = w;
|
|
210
|
+
return L && a(
|
|
211
|
+
A,
|
|
212
212
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
213
213
|
), g(
|
|
214
214
|
o,
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
L,
|
|
216
|
+
A,
|
|
217
217
|
c(),
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
B,
|
|
219
|
+
O
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
|
|
222
|
+
function M(o) {
|
|
223
|
+
m(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === X && (o._payload.status === "fulfilled" ? m(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return typeof o == "object" && o !== null && o.$$typeof ===
|
|
225
|
+
function m(o) {
|
|
226
|
+
return typeof o == "object" && o !== null && o.$$typeof === R;
|
|
227
227
|
}
|
|
228
|
-
var
|
|
228
|
+
var T = Qe, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), H = /* @__PURE__ */ Symbol.for("react.portal"), N = /* @__PURE__ */ Symbol.for("react.fragment"), q = /* @__PURE__ */ Symbol.for("react.strict_mode"), C = /* @__PURE__ */ Symbol.for("react.profiler"), I = /* @__PURE__ */ Symbol.for("react.consumer"), W = /* @__PURE__ */ Symbol.for("react.context"), U = /* @__PURE__ */ Symbol.for("react.forward_ref"), P = /* @__PURE__ */ Symbol.for("react.suspense"), F = /* @__PURE__ */ Symbol.for("react.suspense_list"), D = /* @__PURE__ */ Symbol.for("react.memo"), X = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), v = /* @__PURE__ */ Symbol.for("react.client.reference"), s = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _ = Object.prototype.hasOwnProperty, k = Array.isArray, i = console.createTask ? console.createTask : function() {
|
|
229
229
|
return null;
|
|
230
230
|
};
|
|
231
|
-
|
|
231
|
+
T = {
|
|
232
232
|
react_stack_bottom_frame: function(o) {
|
|
233
233
|
return o();
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
var
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
)(),
|
|
240
|
-
xe.Fragment =
|
|
241
|
-
var
|
|
236
|
+
var d, h = {}, f = T.react_stack_bottom_frame.bind(
|
|
237
|
+
T,
|
|
238
|
+
u
|
|
239
|
+
)(), y = i(n(u)), b = {};
|
|
240
|
+
xe.Fragment = N, xe.jsx = function(o, w, A) {
|
|
241
|
+
var j = 1e4 > s.recentlyCreatedOwnerStacks++;
|
|
242
242
|
return x(
|
|
243
243
|
o,
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
w,
|
|
245
|
+
A,
|
|
246
246
|
!1,
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
j ? Error("react-stack-top-frame") : f,
|
|
248
|
+
j ? i(n(o)) : y
|
|
249
249
|
);
|
|
250
|
-
}, xe.jsxs = function(o,
|
|
251
|
-
var
|
|
250
|
+
}, xe.jsxs = function(o, w, A) {
|
|
251
|
+
var j = 1e4 > s.recentlyCreatedOwnerStacks++;
|
|
252
252
|
return x(
|
|
253
253
|
o,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
w,
|
|
255
|
+
A,
|
|
256
256
|
!0,
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
j ? Error("react-stack-top-frame") : f,
|
|
258
|
+
j ? i(n(o)) : y
|
|
259
259
|
);
|
|
260
260
|
};
|
|
261
261
|
})()), xe;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
function
|
|
265
|
-
return
|
|
263
|
+
var st;
|
|
264
|
+
function rr() {
|
|
265
|
+
return st || (st = 1, process.env.NODE_ENV === "production" ? Ee.exports = er() : Ee.exports = tr()), Ee.exports;
|
|
266
266
|
}
|
|
267
|
-
var
|
|
268
|
-
var
|
|
269
|
-
function
|
|
270
|
-
if (
|
|
271
|
-
|
|
272
|
-
var e =
|
|
267
|
+
var S = rr(), Te = { exports: {} }, ze = {};
|
|
268
|
+
var at;
|
|
269
|
+
function nr() {
|
|
270
|
+
if (at) return ze;
|
|
271
|
+
at = 1;
|
|
272
|
+
var e = Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
273
273
|
return ze.c = function(t) {
|
|
274
274
|
return e.H.useMemoCache(t);
|
|
275
275
|
}, ze;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
return
|
|
281
|
-
var e =
|
|
282
|
-
|
|
283
|
-
var
|
|
284
|
-
return
|
|
277
|
+
var Fe = {};
|
|
278
|
+
var ct;
|
|
279
|
+
function or() {
|
|
280
|
+
return ct || (ct = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
281
|
+
var e = Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
282
|
+
Fe.c = function(t) {
|
|
283
|
+
var r = e.H;
|
|
284
|
+
return r === null && console.error(
|
|
285
285
|
`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
286
286
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
287
287
|
2. You might be breaking the Rules of Hooks
|
|
288
288
|
3. You might have more than one copy of React in the same app
|
|
289
289
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
290
|
-
),
|
|
290
|
+
), r.useMemoCache(t);
|
|
291
291
|
};
|
|
292
|
-
})()),
|
|
292
|
+
})()), Fe;
|
|
293
293
|
}
|
|
294
|
-
var
|
|
295
|
-
function
|
|
296
|
-
return
|
|
294
|
+
var lt;
|
|
295
|
+
function ir() {
|
|
296
|
+
return lt || (lt = 1, process.env.NODE_ENV === "production" ? Te.exports = nr() : Te.exports = or()), Te.exports;
|
|
297
297
|
}
|
|
298
|
-
var be =
|
|
299
|
-
function
|
|
298
|
+
var be = ir();
|
|
299
|
+
function wt(e) {
|
|
300
300
|
return typeof document > "u" ? null : e?.closest("[data-ov-theme]") ?? e ?? document.documentElement;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
const t =
|
|
302
|
+
function Ze(e) {
|
|
303
|
+
const t = wt(e);
|
|
304
304
|
return t ? getComputedStyle(t) : null;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
return
|
|
306
|
+
function io(e, t) {
|
|
307
|
+
return Ze(t)?.getPropertyValue(e).trim() ?? "";
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Ke() {
|
|
310
310
|
const e = be.c(2), {
|
|
311
311
|
activeTheme: t
|
|
312
312
|
} = zt();
|
|
313
|
-
let
|
|
314
|
-
return e[0] !== t ? (
|
|
313
|
+
let r;
|
|
314
|
+
return e[0] !== t ? (r = {
|
|
315
315
|
id: t.id,
|
|
316
316
|
base: t.base,
|
|
317
317
|
registration: t
|
|
318
|
-
}, e[0] = t, e[1] =
|
|
318
|
+
}, e[0] = t, e[1] = r) : r = e[1], r;
|
|
319
319
|
}
|
|
320
|
-
const
|
|
321
|
-
function
|
|
320
|
+
const sr = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, ar = /^rgba?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*(?:,|\/)\s*([\d.]+))?\s*\)$/i;
|
|
321
|
+
function he(e) {
|
|
322
322
|
return Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0");
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Ve(e) {
|
|
325
325
|
const t = e.trim();
|
|
326
|
-
if (
|
|
327
|
-
const
|
|
328
|
-
if (!
|
|
329
|
-
const
|
|
330
|
-
return
|
|
326
|
+
if (sr.test(t)) return t;
|
|
327
|
+
const r = t.match(ar);
|
|
328
|
+
if (!r) return "";
|
|
329
|
+
const n = r[4] === void 0 ? 1 : Number(r[4]), c = `#${he(Number(r[1]))}${he(Number(r[2]))}${he(Number(r[3]))}`;
|
|
330
|
+
return n >= 1 ? c : `${c}${he(n * 255)}`;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function cr(e) {
|
|
333
333
|
if (!e)
|
|
334
334
|
return {
|
|
335
|
-
normalize:
|
|
335
|
+
normalize: Ve,
|
|
336
336
|
dispose() {
|
|
337
337
|
}
|
|
338
338
|
};
|
|
339
339
|
const t = e.ownerDocument.createElement("canvas");
|
|
340
340
|
t.width = 1, t.height = 1, t.setAttribute("aria-hidden", "true"), t.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;visibility:hidden", e.append(t);
|
|
341
|
-
let
|
|
341
|
+
let r;
|
|
342
342
|
return {
|
|
343
|
-
normalize(
|
|
344
|
-
const c =
|
|
343
|
+
normalize(n) {
|
|
344
|
+
const c = Ve(n);
|
|
345
345
|
if (c) return c;
|
|
346
|
-
if (t.style.color = "", t.style.color =
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
349
|
-
if (!/^(?:color|lab|lch|oklab|oklch)\(/i.test(
|
|
346
|
+
if (t.style.color = "", t.style.color = n.trim(), !t.style.color) return "";
|
|
347
|
+
const u = getComputedStyle(t).color, l = Ve(u);
|
|
348
|
+
if (l) return l;
|
|
349
|
+
if (!/^(?:color|lab|lch|oklab|oklch)\(/i.test(u)) return "";
|
|
350
350
|
try {
|
|
351
|
-
if (
|
|
351
|
+
if (r ??= t.getContext("2d", {
|
|
352
352
|
willReadFrequently: !0
|
|
353
|
-
}), !
|
|
354
|
-
|
|
355
|
-
const a =
|
|
356
|
-
return a[3] === 255 ?
|
|
353
|
+
}), !r || (r.clearRect(0, 0, 1, 1), r.fillStyle = "#010203", r.fillStyle = u, r.fillStyle === "#010203")) return "";
|
|
354
|
+
r.fillRect(0, 0, 1, 1);
|
|
355
|
+
const a = r.getImageData(0, 0, 1, 1).data, p = `#${he(a[0])}${he(a[1])}${he(a[2])}`;
|
|
356
|
+
return a[3] === 255 ? p : `${p}${he(a[3])}`;
|
|
357
357
|
} catch {
|
|
358
358
|
return "";
|
|
359
359
|
}
|
|
@@ -363,7 +363,7 @@ function or(e) {
|
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function lr(e) {
|
|
367
367
|
switch (e) {
|
|
368
368
|
case "light":
|
|
369
369
|
case "solarized-light":
|
|
@@ -376,73 +376,73 @@ function ir(e) {
|
|
|
376
376
|
return "vs-dark";
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const
|
|
381
|
-
if (!
|
|
379
|
+
function ur(e, t, r, n, c, u) {
|
|
380
|
+
const l = n.normalize(r?.getPropertyValue(t).trim() ?? "");
|
|
381
|
+
if (!l) return null;
|
|
382
382
|
const a = {
|
|
383
383
|
token: e,
|
|
384
|
-
foreground:
|
|
384
|
+
foreground: l.slice(1)
|
|
385
385
|
};
|
|
386
|
-
return c && (a.fontStyle =
|
|
386
|
+
return c && (a.fontStyle = r?.getPropertyValue(c).trim() || u || ""), a;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function dr(e) {
|
|
389
389
|
const t = {};
|
|
390
|
-
for (const [
|
|
391
|
-
|
|
390
|
+
for (const [r, n] of Object.entries(e))
|
|
391
|
+
n && (t[r] = n);
|
|
392
392
|
return t;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const
|
|
394
|
+
function Oe(e, t) {
|
|
395
|
+
const r = wt(t), n = Ze(r), c = cr(r), u = (a, p, g, x) => ur(a, p, n, c, g, x), l = (a) => c.normalize(n?.getPropertyValue(a).trim() ?? "");
|
|
396
396
|
try {
|
|
397
|
-
const a = [
|
|
397
|
+
const a = [u("comment", "--ov-syntax-comment", "--ov-syntax-style-comment", "italic"), u("string", "--ov-syntax-string"), u("string.escape", "--ov-syntax-string-escape"), u("number", "--ov-syntax-number"), u("keyword", "--ov-syntax-keyword", "--ov-syntax-style-keyword"), u("keyword.control", "--ov-syntax-keyword-control"), u("keyword.operator", "--ov-syntax-keyword-operator"), u("type", "--ov-syntax-type", "--ov-syntax-style-type"), u("type.identifier", "--ov-syntax-type"), u("class", "--ov-syntax-class"), u("interface", "--ov-syntax-interface"), u("function", "--ov-syntax-function", "--ov-syntax-style-function"), u("function.declaration", "--ov-syntax-function"), u("method", "--ov-syntax-method"), u("variable", "--ov-syntax-variable"), u("parameter", "--ov-syntax-parameter"), u("property", "--ov-syntax-property"), u("namespace", "--ov-syntax-namespace"), u("decorator", "--ov-syntax-decorator"), u("regexp", "--ov-syntax-regexp"), u("operator", "--ov-syntax-operator"), u("delimiter", "--ov-syntax-punctuation"), u("delimiter.bracket", "--ov-syntax-punctuation")].filter((p) => p !== null);
|
|
398
398
|
return {
|
|
399
|
-
base:
|
|
399
|
+
base: lr(e),
|
|
400
400
|
inherit: !0,
|
|
401
401
|
rules: a,
|
|
402
|
-
colors:
|
|
403
|
-
"editor.background":
|
|
404
|
-
"editor.foreground":
|
|
405
|
-
"editorCursor.foreground":
|
|
406
|
-
"editor.selectionBackground":
|
|
407
|
-
"editor.inactiveSelectionBackground":
|
|
408
|
-
"editor.lineHighlightBackground":
|
|
409
|
-
"editor.lineHighlightBorder":
|
|
410
|
-
"editorLineNumber.foreground":
|
|
411
|
-
"editorLineNumber.activeForeground":
|
|
412
|
-
"editorWhitespace.foreground":
|
|
413
|
-
"editorIndentGuide.background":
|
|
414
|
-
"editorIndentGuide.activeBackground":
|
|
415
|
-
"editorRuler.foreground":
|
|
416
|
-
"editor.findMatchBackground":
|
|
417
|
-
"editor.findMatchBorder":
|
|
418
|
-
"editor.findMatchHighlightBackground":
|
|
419
|
-
"editorLink.activeForeground":
|
|
420
|
-
"editorBracketMatch.background":
|
|
421
|
-
"editorBracketMatch.border":
|
|
422
|
-
"editorBracketHighlight.foreground1":
|
|
423
|
-
"editorBracketHighlight.foreground2":
|
|
424
|
-
"editorBracketHighlight.foreground3":
|
|
425
|
-
"editorBracketHighlight.foreground4":
|
|
426
|
-
"editorBracketHighlight.foreground5":
|
|
427
|
-
"editorBracketHighlight.foreground6":
|
|
428
|
-
"editorGutter.background":
|
|
429
|
-
"editorGutter.addedBackground":
|
|
430
|
-
"editorGutter.modifiedBackground":
|
|
431
|
-
"editorGutter.deletedBackground":
|
|
432
|
-
"diffEditor.insertedTextBackground":
|
|
433
|
-
"diffEditor.removedTextBackground":
|
|
434
|
-
"minimap.background":
|
|
435
|
-
"minimap.selectionHighlight":
|
|
436
|
-
"minimap.errorHighlight":
|
|
437
|
-
"minimap.warningHighlight":
|
|
438
|
-
"minimap.findMatchHighlight":
|
|
402
|
+
colors: dr({
|
|
403
|
+
"editor.background": l("--ov-color-editor-bg"),
|
|
404
|
+
"editor.foreground": l("--ov-color-editor-fg"),
|
|
405
|
+
"editorCursor.foreground": l("--ov-color-editor-cursor"),
|
|
406
|
+
"editor.selectionBackground": l("--ov-color-editor-selection-bg"),
|
|
407
|
+
"editor.inactiveSelectionBackground": l("--ov-color-editor-selection-inactive-bg"),
|
|
408
|
+
"editor.lineHighlightBackground": l("--ov-color-editor-line-highlight-bg"),
|
|
409
|
+
"editor.lineHighlightBorder": l("--ov-color-editor-line-highlight-border"),
|
|
410
|
+
"editorLineNumber.foreground": l("--ov-color-editor-line-number"),
|
|
411
|
+
"editorLineNumber.activeForeground": l("--ov-color-editor-line-number-active"),
|
|
412
|
+
"editorWhitespace.foreground": l("--ov-color-editor-whitespace"),
|
|
413
|
+
"editorIndentGuide.background": l("--ov-color-editor-indent-guide"),
|
|
414
|
+
"editorIndentGuide.activeBackground": l("--ov-color-editor-indent-guide-active"),
|
|
415
|
+
"editorRuler.foreground": l("--ov-color-editor-ruler"),
|
|
416
|
+
"editor.findMatchBackground": l("--ov-color-editor-find-match-bg"),
|
|
417
|
+
"editor.findMatchBorder": l("--ov-color-editor-find-match-border"),
|
|
418
|
+
"editor.findMatchHighlightBackground": l("--ov-color-editor-find-range-bg"),
|
|
419
|
+
"editorLink.activeForeground": l("--ov-color-editor-link"),
|
|
420
|
+
"editorBracketMatch.background": l("--ov-color-editor-bracket-match-bg"),
|
|
421
|
+
"editorBracketMatch.border": l("--ov-color-editor-bracket-match-border"),
|
|
422
|
+
"editorBracketHighlight.foreground1": l("--ov-color-editor-bracket-1"),
|
|
423
|
+
"editorBracketHighlight.foreground2": l("--ov-color-editor-bracket-2"),
|
|
424
|
+
"editorBracketHighlight.foreground3": l("--ov-color-editor-bracket-3"),
|
|
425
|
+
"editorBracketHighlight.foreground4": l("--ov-color-editor-bracket-4"),
|
|
426
|
+
"editorBracketHighlight.foreground5": l("--ov-color-editor-bracket-5"),
|
|
427
|
+
"editorBracketHighlight.foreground6": l("--ov-color-editor-bracket-6"),
|
|
428
|
+
"editorGutter.background": l("--ov-color-gutter-bg"),
|
|
429
|
+
"editorGutter.addedBackground": l("--ov-color-gutter-added"),
|
|
430
|
+
"editorGutter.modifiedBackground": l("--ov-color-gutter-modified"),
|
|
431
|
+
"editorGutter.deletedBackground": l("--ov-color-gutter-deleted"),
|
|
432
|
+
"diffEditor.insertedTextBackground": l("--ov-color-diff-insert-bg"),
|
|
433
|
+
"diffEditor.removedTextBackground": l("--ov-color-diff-remove-bg"),
|
|
434
|
+
"minimap.background": l("--ov-color-minimap-bg"),
|
|
435
|
+
"minimap.selectionHighlight": l("--ov-color-minimap-selection"),
|
|
436
|
+
"minimap.errorHighlight": l("--ov-color-minimap-error"),
|
|
437
|
+
"minimap.warningHighlight": l("--ov-color-minimap-warning"),
|
|
438
|
+
"minimap.findMatchHighlight": l("--ov-color-minimap-find-match")
|
|
439
439
|
})
|
|
440
440
|
};
|
|
441
441
|
} finally {
|
|
442
442
|
c.dispose();
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
const ge = "ov-theme",
|
|
445
|
+
const ge = "ov-theme", fr = {
|
|
446
446
|
js: "javascript",
|
|
447
447
|
jsx: "javascript",
|
|
448
448
|
ts: "typescript",
|
|
@@ -501,32 +501,32 @@ const ge = "ov-theme", cr = {
|
|
|
501
501
|
vue: "html",
|
|
502
502
|
svelte: "html"
|
|
503
503
|
};
|
|
504
|
-
function
|
|
505
|
-
const t = e.toLowerCase(),
|
|
506
|
-
if (
|
|
507
|
-
if (
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
510
|
-
return
|
|
504
|
+
function mr(e) {
|
|
505
|
+
const t = e.toLowerCase(), r = t.split("/").pop() ?? t;
|
|
506
|
+
if (r === "dockerfile") return "dockerfile";
|
|
507
|
+
if (r === "makefile") return "makefile";
|
|
508
|
+
const n = r.split(".").pop();
|
|
509
|
+
if (n)
|
|
510
|
+
return fr[n];
|
|
511
511
|
}
|
|
512
512
|
function se(...e) {
|
|
513
513
|
}
|
|
514
|
-
function
|
|
515
|
-
let
|
|
516
|
-
for (;
|
|
517
|
-
if (
|
|
518
|
-
|
|
519
|
-
else if (
|
|
520
|
-
c =
|
|
514
|
+
function hr(e, t) {
|
|
515
|
+
let r = 0, n = 0, c = -1, u = -1;
|
|
516
|
+
for (; n < t.length; )
|
|
517
|
+
if (r < e.length && (e[r] === t[n] || e[r] === "?"))
|
|
518
|
+
r++, n++;
|
|
519
|
+
else if (r < e.length && e[r] === "*")
|
|
520
|
+
c = r, u = n, r++;
|
|
521
521
|
else if (c >= 0)
|
|
522
|
-
|
|
522
|
+
r = c + 1, u++, n = u;
|
|
523
523
|
else
|
|
524
524
|
return !1;
|
|
525
|
-
for (;
|
|
526
|
-
|
|
527
|
-
return
|
|
525
|
+
for (; r < e.length && e[r] === "*"; )
|
|
526
|
+
r++;
|
|
527
|
+
return r === e.length;
|
|
528
528
|
}
|
|
529
|
-
class
|
|
529
|
+
class gr {
|
|
530
530
|
_schemas = /* @__PURE__ */ new Map();
|
|
531
531
|
_listeners = /* @__PURE__ */ new Set();
|
|
532
532
|
_yamlHandle = null;
|
|
@@ -551,15 +551,15 @@ class dr {
|
|
|
551
551
|
}
|
|
552
552
|
/** Register multiple schemas at once. */
|
|
553
553
|
registerAll(t) {
|
|
554
|
-
se("registerAll() —", t.length, "schemas:", t.map((
|
|
555
|
-
for (const
|
|
556
|
-
this._schemas.set(
|
|
554
|
+
se("registerAll() —", t.length, "schemas:", t.map((r) => r.uri));
|
|
555
|
+
for (const r of t)
|
|
556
|
+
this._schemas.set(r.uri, r);
|
|
557
557
|
this._notify();
|
|
558
558
|
}
|
|
559
559
|
/** Unregister a schema by URI. */
|
|
560
560
|
unregister(t) {
|
|
561
|
-
const
|
|
562
|
-
return
|
|
561
|
+
const r = this._schemas.delete(t);
|
|
562
|
+
return r && this._notify(), r;
|
|
563
563
|
}
|
|
564
564
|
/** Clear all registered schemas. */
|
|
565
565
|
clear() {
|
|
@@ -570,7 +570,7 @@ class dr {
|
|
|
570
570
|
* model URI string. Uses the same glob-like matching that monaco-yaml uses.
|
|
571
571
|
*/
|
|
572
572
|
getSchemasForUri(t) {
|
|
573
|
-
return this.schemas.filter((
|
|
573
|
+
return this.schemas.filter((r) => r.fileMatch.some((n) => hr(n, t)));
|
|
574
574
|
}
|
|
575
575
|
/** Whether the YAML handle has been injected (workers initialized). */
|
|
576
576
|
get isYamlReady() {
|
|
@@ -589,22 +589,22 @@ class dr {
|
|
|
589
589
|
applyYamlSchemas() {
|
|
590
590
|
if (!this._yamlHandle)
|
|
591
591
|
return;
|
|
592
|
-
const t = this.schemas,
|
|
593
|
-
uri:
|
|
594
|
-
fileMatch:
|
|
595
|
-
schema:
|
|
592
|
+
const t = this.schemas, r = t.map((n) => ({
|
|
593
|
+
uri: n.uri,
|
|
594
|
+
fileMatch: n.fileMatch,
|
|
595
|
+
schema: n.schema,
|
|
596
596
|
// name/description are passed through to yaml-language-server's
|
|
597
597
|
// registerExternalSchema — they appear in hover tooltips.
|
|
598
|
-
...
|
|
599
|
-
name:
|
|
598
|
+
...n.name && {
|
|
599
|
+
name: n.name
|
|
600
600
|
},
|
|
601
|
-
...
|
|
602
|
-
description:
|
|
601
|
+
...n.description && {
|
|
602
|
+
description: n.description
|
|
603
603
|
}
|
|
604
604
|
}));
|
|
605
605
|
se("applyYamlSchemas() — pushing", t.length, "schemas"), this._yamlHandle.update({
|
|
606
606
|
enableSchemaRequest: !1,
|
|
607
|
-
schemas:
|
|
607
|
+
schemas: r
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
610
|
/**
|
|
@@ -613,21 +613,21 @@ class dr {
|
|
|
613
613
|
* `monaco-editor` — keeping it usable before Monaco loads.
|
|
614
614
|
*/
|
|
615
615
|
applyJsonSchemas(t) {
|
|
616
|
-
const
|
|
616
|
+
const r = t, n = {
|
|
617
617
|
validate: !0,
|
|
618
|
-
schemas: this.schemas.map((
|
|
619
|
-
uri:
|
|
620
|
-
fileMatch:
|
|
621
|
-
schema:
|
|
618
|
+
schemas: this.schemas.map((u) => ({
|
|
619
|
+
uri: u.uri,
|
|
620
|
+
fileMatch: u.fileMatch,
|
|
621
|
+
schema: u.schema
|
|
622
622
|
}))
|
|
623
|
-
}, c =
|
|
624
|
-
se("applyJsonSchemas() —", this.schemas.length, "schemas, jsonDefaults available:", !!c), c?.setDiagnosticsOptions(
|
|
623
|
+
}, c = r.json?.jsonDefaults ?? r.languages?.json?.jsonDefaults;
|
|
624
|
+
se("applyJsonSchemas() —", this.schemas.length, "schemas, jsonDefaults available:", !!c), c?.setDiagnosticsOptions(n);
|
|
625
625
|
}
|
|
626
626
|
/** Log the current state of the registry for debugging. */
|
|
627
627
|
debugState() {
|
|
628
628
|
se(" Schemas:", this._schemas.size);
|
|
629
|
-
for (const [t,
|
|
630
|
-
se(` ${t} → fileMatch: ${JSON.stringify(
|
|
629
|
+
for (const [t, r] of this._schemas)
|
|
630
|
+
se(` ${t} → fileMatch: ${JSON.stringify(r.fileMatch)}`);
|
|
631
631
|
se(" Listeners:", this._listeners.size), se(" YAML handle:", this._yamlHandle ? "SET" : "NOT SET");
|
|
632
632
|
}
|
|
633
633
|
_notify() {
|
|
@@ -635,43 +635,43 @@ class dr {
|
|
|
635
635
|
for (const t of this._listeners)
|
|
636
636
|
try {
|
|
637
637
|
t();
|
|
638
|
-
} catch (
|
|
639
|
-
console.error("[schema-registry] listener threw during _notify():",
|
|
638
|
+
} catch (r) {
|
|
639
|
+
console.error("[schema-registry] listener threw during _notify():", r);
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
const
|
|
644
|
-
Root:
|
|
645
|
-
Inner:
|
|
643
|
+
const fe = new gr(), pr = "_Root_1729c_1", yr = "_Inner_1729c_17", ut = {
|
|
644
|
+
Root: pr,
|
|
645
|
+
Inner: yr
|
|
646
646
|
};
|
|
647
647
|
function Me(...e) {
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function vr(...e) {
|
|
650
650
|
return e.filter(Boolean).join(" ");
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
if (
|
|
654
|
-
const
|
|
655
|
-
Me("getOrCreateModel — parsed URI:",
|
|
656
|
-
const c =
|
|
657
|
-
return c ||
|
|
652
|
+
function dt(e, t, r) {
|
|
653
|
+
if (r) {
|
|
654
|
+
const n = $.Uri.parse(r);
|
|
655
|
+
Me("getOrCreateModel — parsed URI:", n.toString(), "| language:", t);
|
|
656
|
+
const c = $.editor.getModel(n);
|
|
657
|
+
return c || $.editor.createModel(e, t, n);
|
|
658
658
|
}
|
|
659
|
-
return
|
|
659
|
+
return $.editor.createModel(e, t);
|
|
660
660
|
}
|
|
661
661
|
function _t(e) {
|
|
662
662
|
switch (e) {
|
|
663
|
-
case
|
|
663
|
+
case $.MarkerSeverity.Error:
|
|
664
664
|
return "error";
|
|
665
|
-
case
|
|
665
|
+
case $.MarkerSeverity.Warning:
|
|
666
666
|
return "warning";
|
|
667
|
-
case
|
|
667
|
+
case $.MarkerSeverity.Info:
|
|
668
668
|
return "info";
|
|
669
669
|
default:
|
|
670
670
|
return "hint";
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
return
|
|
673
|
+
function ft(e) {
|
|
674
|
+
return $.editor.getModelMarkers({
|
|
675
675
|
resource: e.uri
|
|
676
676
|
}).map((t) => ({
|
|
677
677
|
message: t.message,
|
|
@@ -684,28 +684,28 @@ function ut(e) {
|
|
|
684
684
|
code: typeof t.code == "string" ? t.code : t.code?.value
|
|
685
685
|
}));
|
|
686
686
|
}
|
|
687
|
-
const
|
|
687
|
+
const br = ve(function({
|
|
688
688
|
value: t,
|
|
689
|
-
onChange:
|
|
690
|
-
onMount:
|
|
689
|
+
onChange: r,
|
|
690
|
+
onMount: n,
|
|
691
691
|
onDiagnostics: c,
|
|
692
|
-
onCursorChange:
|
|
693
|
-
language:
|
|
692
|
+
onCursorChange: u,
|
|
693
|
+
language: l,
|
|
694
694
|
filename: a,
|
|
695
|
-
readOnly:
|
|
695
|
+
readOnly: p = !1,
|
|
696
696
|
lineNumbers: g = !0,
|
|
697
697
|
minimap: x = !1,
|
|
698
|
-
wordWrap:
|
|
699
|
-
tabSize:
|
|
700
|
-
diagnostics:
|
|
701
|
-
quickSuggestions:
|
|
702
|
-
syntaxHighlighting:
|
|
703
|
-
height:
|
|
704
|
-
width:
|
|
705
|
-
bordered:
|
|
706
|
-
className:
|
|
707
|
-
},
|
|
708
|
-
const U =
|
|
698
|
+
wordWrap: M = !1,
|
|
699
|
+
tabSize: m = 2,
|
|
700
|
+
diagnostics: T = !1,
|
|
701
|
+
quickSuggestions: R = !1,
|
|
702
|
+
syntaxHighlighting: H = !0,
|
|
703
|
+
height: N = "100%",
|
|
704
|
+
width: q = "100%",
|
|
705
|
+
bordered: C = !0,
|
|
706
|
+
className: I
|
|
707
|
+
}, W) {
|
|
708
|
+
const U = Ke(), P = Y(null), F = Y(null), [D, X] = Pe(!1), ne = Y(!1), v = Y(null), s = Y(null), _ = Y(null), k = l ?? (a ? mr(a) : void 0), i = Ae(() => {
|
|
709
709
|
if (k === "json" && t)
|
|
710
710
|
try {
|
|
711
711
|
return JSON.stringify(JSON.parse(t), null, 2);
|
|
@@ -714,9 +714,9 @@ const gr = ve(function({
|
|
|
714
714
|
}
|
|
715
715
|
return t;
|
|
716
716
|
}, [k, t]);
|
|
717
|
-
|
|
718
|
-
if (!
|
|
719
|
-
|
|
717
|
+
V(() => {
|
|
718
|
+
if (!F.current) return;
|
|
719
|
+
$.editor.defineTheme(ge, Oe(U.base, F.current)), $.editor.setTheme(ge), $.languages.typescript.typescriptDefaults.setCompilerOptions({
|
|
720
720
|
jsx: 2,
|
|
721
721
|
// JsxEmit.React
|
|
722
722
|
jsxFactory: "React.createElement",
|
|
@@ -725,17 +725,17 @@ const gr = ve(function({
|
|
|
725
725
|
target: 99
|
|
726
726
|
// ESNext
|
|
727
727
|
});
|
|
728
|
-
const
|
|
729
|
-
Me(" model created — uri:",
|
|
730
|
-
const
|
|
731
|
-
model:
|
|
732
|
-
readOnly:
|
|
728
|
+
const f = dt(i, H ? k : "plaintext", a);
|
|
729
|
+
Me(" model created — uri:", f.uri.toString());
|
|
730
|
+
const y = $.editor.create(F.current, {
|
|
731
|
+
model: f,
|
|
732
|
+
readOnly: p,
|
|
733
733
|
lineNumbers: g ? "on" : "off",
|
|
734
734
|
minimap: {
|
|
735
735
|
enabled: x
|
|
736
736
|
},
|
|
737
|
-
wordWrap:
|
|
738
|
-
quickSuggestions:
|
|
737
|
+
wordWrap: M ? "on" : "off",
|
|
738
|
+
quickSuggestions: R ? {
|
|
739
739
|
other: !0,
|
|
740
740
|
strings: !0,
|
|
741
741
|
comments: !1
|
|
@@ -744,1321 +744,1365 @@ const gr = ve(function({
|
|
|
744
744
|
automaticLayout: !0,
|
|
745
745
|
fontSize: 13,
|
|
746
746
|
fontFamily: "var(--ov-font-family-mono, monospace)",
|
|
747
|
-
tabSize:
|
|
748
|
-
renderValidationDecorations:
|
|
747
|
+
tabSize: m,
|
|
748
|
+
renderValidationDecorations: T ? "on" : "off"
|
|
749
749
|
});
|
|
750
|
-
return
|
|
751
|
-
|
|
752
|
-
const b =
|
|
753
|
-
|
|
750
|
+
return P.current = y, fe.applyYamlSchemas(), fe.applyJsonSchemas($), n?.(y, $), X(!0), () => {
|
|
751
|
+
v.current?.dispose(), v.current = null, s.current?.dispose(), s.current = null, _.current?.dispose(), _.current = null;
|
|
752
|
+
const b = y.getModel();
|
|
753
|
+
y.setModel(null), b?.dispose(), y.dispose(), P.current = null, X(!1);
|
|
754
754
|
};
|
|
755
|
-
}, []),
|
|
756
|
-
const
|
|
757
|
-
if (!(!
|
|
758
|
-
if (
|
|
759
|
-
|
|
760
|
-
else if (i !==
|
|
761
|
-
const
|
|
762
|
-
if (!
|
|
763
|
-
ne.current = !0,
|
|
764
|
-
range:
|
|
755
|
+
}, []), V(() => {
|
|
756
|
+
const f = P.current;
|
|
757
|
+
if (!(!f || !D || i === void 0)) {
|
|
758
|
+
if (f.getOption($.editor.EditorOption.readOnly))
|
|
759
|
+
f.setValue(i);
|
|
760
|
+
else if (i !== f.getValue()) {
|
|
761
|
+
const y = f.getModel();
|
|
762
|
+
if (!y) return;
|
|
763
|
+
ne.current = !0, f.executeEdits("", [{
|
|
764
|
+
range: y.getFullModelRange(),
|
|
765
765
|
text: i,
|
|
766
766
|
forceMoveMarkers: !0
|
|
767
|
-
}]),
|
|
767
|
+
}]), f.pushUndoStop(), ne.current = !1;
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
}, [i,
|
|
771
|
-
!
|
|
772
|
-
readOnly:
|
|
770
|
+
}, [i, D]), V(() => {
|
|
771
|
+
!P.current || !D || P.current.updateOptions({
|
|
772
|
+
readOnly: p,
|
|
773
773
|
lineNumbers: g ? "on" : "off",
|
|
774
774
|
minimap: {
|
|
775
775
|
enabled: x
|
|
776
776
|
},
|
|
777
|
-
wordWrap:
|
|
778
|
-
quickSuggestions:
|
|
777
|
+
wordWrap: M ? "on" : "off",
|
|
778
|
+
quickSuggestions: R ? {
|
|
779
779
|
other: !0,
|
|
780
780
|
strings: !0,
|
|
781
781
|
comments: !1
|
|
782
782
|
} : !1,
|
|
783
|
-
tabSize:
|
|
784
|
-
renderValidationDecorations:
|
|
783
|
+
tabSize: m,
|
|
784
|
+
renderValidationDecorations: T ? "on" : "off"
|
|
785
785
|
});
|
|
786
|
-
}, [
|
|
787
|
-
if (!
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
791
|
-
|
|
786
|
+
}, [p, g, x, M, R, m, T, D]), V(() => {
|
|
787
|
+
if (!P.current || !D) return;
|
|
788
|
+
const f = P.current.getModel();
|
|
789
|
+
if (f) {
|
|
790
|
+
const y = H ? k ?? "plaintext" : "plaintext";
|
|
791
|
+
$.editor.setModelLanguage(f, y);
|
|
792
792
|
}
|
|
793
|
-
}, [k,
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
if (!
|
|
798
|
-
Me("filename changed:",
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
const o =
|
|
802
|
-
|
|
803
|
-
}, [a,
|
|
804
|
-
|
|
805
|
-
}, [
|
|
806
|
-
!
|
|
807
|
-
ne.current ||
|
|
793
|
+
}, [k, H, D]);
|
|
794
|
+
const d = Y(a);
|
|
795
|
+
V(() => {
|
|
796
|
+
const f = P.current;
|
|
797
|
+
if (!f || !D || d.current === a) return;
|
|
798
|
+
Me("filename changed:", d.current, "→", a), d.current = a;
|
|
799
|
+
const y = f.getModel(), b = y?.getValue?.() ?? i;
|
|
800
|
+
f.setModel(null), y?.dispose();
|
|
801
|
+
const o = dt(b, H ? k : "plaintext", a);
|
|
802
|
+
f.setModel(o), Me(" new model set — uri:", o.uri.toString());
|
|
803
|
+
}, [a, D, k, H, i]), V(() => {
|
|
804
|
+
D && ($.editor.defineTheme(ge, Oe(U.base, F.current)), $.editor.setTheme(ge));
|
|
805
|
+
}, [D, U.registration]), V(() => {
|
|
806
|
+
!P.current || !D || (v.current?.dispose(), r && (v.current = P.current.onDidChangeModelContent(() => {
|
|
807
|
+
ne.current || r(P.current.getValue());
|
|
808
808
|
})));
|
|
809
|
-
}, [
|
|
810
|
-
|
|
811
|
-
const
|
|
812
|
-
if (!
|
|
813
|
-
const b =
|
|
814
|
-
|
|
809
|
+
}, [r, D]), V(() => {
|
|
810
|
+
D && (s.current?.dispose(), c && (s.current = $.editor.onDidChangeMarkers((f) => {
|
|
811
|
+
const y = P.current?.getModel();
|
|
812
|
+
if (!y) return;
|
|
813
|
+
const b = y.uri.toString();
|
|
814
|
+
f.some((o) => o.toString() === b) && c(ft(y));
|
|
815
815
|
})));
|
|
816
|
-
}, [c,
|
|
817
|
-
!
|
|
818
|
-
|
|
819
|
-
lineNumber:
|
|
820
|
-
column:
|
|
816
|
+
}, [c, D]), V(() => {
|
|
817
|
+
!P.current || !D || (_.current?.dispose(), u && (_.current = P.current.onDidChangeCursorPosition((f) => {
|
|
818
|
+
u({
|
|
819
|
+
lineNumber: f.position.lineNumber,
|
|
820
|
+
column: f.position.column
|
|
821
821
|
});
|
|
822
822
|
})));
|
|
823
|
-
}, [
|
|
824
|
-
if (
|
|
825
|
-
return
|
|
826
|
-
|
|
823
|
+
}, [u, D]), V(() => {
|
|
824
|
+
if (D)
|
|
825
|
+
return fe.onChange(() => {
|
|
826
|
+
fe.applyYamlSchemas(), fe.applyJsonSchemas($);
|
|
827
827
|
});
|
|
828
|
-
}, [
|
|
829
|
-
getEditor: () =>
|
|
830
|
-
getMonaco: () =>
|
|
831
|
-
focus: () =>
|
|
828
|
+
}, [D]), vt(W, () => ({
|
|
829
|
+
getEditor: () => P.current,
|
|
830
|
+
getMonaco: () => $,
|
|
831
|
+
focus: () => P.current?.focus(),
|
|
832
832
|
getDiagnostics: () => {
|
|
833
|
-
const
|
|
834
|
-
return
|
|
833
|
+
const f = P.current?.getModel();
|
|
834
|
+
return f ? ft(f) : [];
|
|
835
835
|
},
|
|
836
836
|
getDebugState: () => {
|
|
837
|
-
const
|
|
838
|
-
resource:
|
|
839
|
-
}) : [], o =
|
|
837
|
+
const f = P.current, y = f?.getModel() ?? null, b = y ? $.editor.getModelMarkers({
|
|
838
|
+
resource: y.uri
|
|
839
|
+
}) : [], o = y?.uri.toString() ?? null, w = {
|
|
840
840
|
error: 0,
|
|
841
841
|
warning: 0,
|
|
842
842
|
info: 0,
|
|
843
843
|
hint: 0
|
|
844
|
-
},
|
|
845
|
-
for (const
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
const Q =
|
|
849
|
-
|
|
844
|
+
}, A = {};
|
|
845
|
+
for (const L of b) {
|
|
846
|
+
const J = _t(L.severity);
|
|
847
|
+
w[J]++;
|
|
848
|
+
const Q = L.source ?? "unknown";
|
|
849
|
+
A[Q] = (A[Q] ?? 0) + 1;
|
|
850
850
|
}
|
|
851
|
-
const
|
|
852
|
-
uri:
|
|
853
|
-
name:
|
|
854
|
-
fileMatch:
|
|
855
|
-
})) : [],
|
|
851
|
+
const j = o ? fe.getSchemasForUri(o).map((L) => ({
|
|
852
|
+
uri: L.uri,
|
|
853
|
+
name: L.name,
|
|
854
|
+
fileMatch: L.fileMatch
|
|
855
|
+
})) : [], B = f?.getPosition() ?? null, O = f?.getSelections() ?? [];
|
|
856
856
|
return {
|
|
857
857
|
modelUri: o,
|
|
858
|
-
modelLanguage:
|
|
859
|
-
modelLineCount:
|
|
860
|
-
modelContentLength:
|
|
861
|
-
modelVersionId:
|
|
862
|
-
modelEOL:
|
|
863
|
-
cursorPosition:
|
|
864
|
-
lineNumber:
|
|
865
|
-
column:
|
|
858
|
+
modelLanguage: y?.getLanguageId() ?? null,
|
|
859
|
+
modelLineCount: y?.getLineCount() ?? 0,
|
|
860
|
+
modelContentLength: y?.getValueLength() ?? 0,
|
|
861
|
+
modelVersionId: y?.getVersionId() ?? 0,
|
|
862
|
+
modelEOL: y?.getEOL() ?? null,
|
|
863
|
+
cursorPosition: B ? {
|
|
864
|
+
lineNumber: B.lineNumber,
|
|
865
|
+
column: B.column
|
|
866
866
|
} : null,
|
|
867
|
-
selections:
|
|
868
|
-
startLineNumber:
|
|
869
|
-
startColumn:
|
|
870
|
-
endLineNumber:
|
|
871
|
-
endColumn:
|
|
867
|
+
selections: O.map((L) => ({
|
|
868
|
+
startLineNumber: L.startLineNumber,
|
|
869
|
+
startColumn: L.startColumn,
|
|
870
|
+
endLineNumber: L.endLineNumber,
|
|
871
|
+
endColumn: L.endColumn
|
|
872
872
|
})),
|
|
873
873
|
diagnosticsTotal: b.length,
|
|
874
|
-
diagnosticsBySeverity:
|
|
875
|
-
diagnosticsBySource:
|
|
876
|
-
registeredSchemaCount:
|
|
877
|
-
matchingSchemas:
|
|
878
|
-
isReadOnly:
|
|
879
|
-
isFocused:
|
|
880
|
-
totalModelCount:
|
|
881
|
-
registeredLanguageCount:
|
|
882
|
-
yamlHandleSet:
|
|
874
|
+
diagnosticsBySeverity: w,
|
|
875
|
+
diagnosticsBySource: A,
|
|
876
|
+
registeredSchemaCount: fe.schemas.length,
|
|
877
|
+
matchingSchemas: j,
|
|
878
|
+
isReadOnly: f?.getOption($.editor.EditorOption.readOnly) ?? !1,
|
|
879
|
+
isFocused: f?.hasWidgetFocus() ?? !1,
|
|
880
|
+
totalModelCount: $.editor.getModels().length,
|
|
881
|
+
registeredLanguageCount: $.languages.getLanguages().length,
|
|
882
|
+
yamlHandleSet: fe.isYamlReady
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
885
|
}));
|
|
886
|
-
const
|
|
887
|
-
return /* @__PURE__ */
|
|
888
|
-
"--_editor-height":
|
|
889
|
-
"--_editor-width":
|
|
890
|
-
}, "data-testid": "code-editor", ...
|
|
886
|
+
const h = (f) => typeof f == "number" ? `${f}px` : f;
|
|
887
|
+
return /* @__PURE__ */ S.jsx("div", { className: vr(ut.Root, I), style: {
|
|
888
|
+
"--_editor-height": h(N),
|
|
889
|
+
"--_editor-width": h(q)
|
|
890
|
+
}, "data-testid": "code-editor", ...C ? {} : {
|
|
891
891
|
"data-borderless": ""
|
|
892
|
-
}, children: /* @__PURE__ */
|
|
892
|
+
}, children: /* @__PURE__ */ S.jsx("div", { ref: F, className: ut.Inner }) });
|
|
893
893
|
});
|
|
894
|
-
|
|
895
|
-
const
|
|
896
|
-
Root:
|
|
897
|
-
Inner:
|
|
894
|
+
br.displayName = "CodeEditor";
|
|
895
|
+
const wr = "_Root_1ltbg_1", _r = "_Inner_1ltbg_16", mt = {
|
|
896
|
+
Root: wr,
|
|
897
|
+
Inner: _r
|
|
898
898
|
};
|
|
899
|
-
function
|
|
899
|
+
function kr(...e) {
|
|
900
900
|
return e.filter(Boolean).join(" ");
|
|
901
901
|
}
|
|
902
|
-
const
|
|
902
|
+
const xr = ve(function({
|
|
903
903
|
original: t,
|
|
904
|
-
modified:
|
|
905
|
-
language:
|
|
904
|
+
modified: r,
|
|
905
|
+
language: n,
|
|
906
906
|
mode: c = "side-by-side",
|
|
907
|
-
readOnly:
|
|
908
|
-
height:
|
|
907
|
+
readOnly: u = !0,
|
|
908
|
+
height: l = "100%",
|
|
909
909
|
bordered: a = !0,
|
|
910
|
-
className:
|
|
910
|
+
className: p
|
|
911
911
|
}, g) {
|
|
912
|
-
const x =
|
|
913
|
-
|
|
914
|
-
if (!
|
|
915
|
-
|
|
916
|
-
const
|
|
917
|
-
readOnly:
|
|
912
|
+
const x = Ke(), M = Y(null), m = Y(null), [T, R] = Pe(!1);
|
|
913
|
+
V(() => {
|
|
914
|
+
if (!M.current) return;
|
|
915
|
+
$.editor.defineTheme(ge, Oe(x.base, M.current)), $.editor.setTheme(ge);
|
|
916
|
+
const N = $.editor.createDiffEditor(M.current, {
|
|
917
|
+
readOnly: u,
|
|
918
918
|
renderSideBySide: c === "side-by-side",
|
|
919
919
|
renderValidationDecorations: "off",
|
|
920
920
|
scrollBeyondLastLine: !1,
|
|
921
921
|
automaticLayout: !0,
|
|
922
922
|
fontSize: 13,
|
|
923
923
|
fontFamily: "var(--ov-font-family-mono, monospace)"
|
|
924
|
-
}),
|
|
925
|
-
return
|
|
926
|
-
original:
|
|
927
|
-
modified:
|
|
928
|
-
}),
|
|
929
|
-
|
|
924
|
+
}), q = $.editor.createModel(t, n), C = $.editor.createModel(r, n);
|
|
925
|
+
return N.setModel({
|
|
926
|
+
original: q,
|
|
927
|
+
modified: C
|
|
928
|
+
}), m.current = N, R(!0), () => {
|
|
929
|
+
N.getModel()?.original?.dispose(), N.getModel()?.modified?.dispose(), N.dispose(), m.current = null, R(!1);
|
|
930
930
|
};
|
|
931
|
-
}, []),
|
|
932
|
-
if (!
|
|
933
|
-
const
|
|
934
|
-
|
|
935
|
-
}, [t,
|
|
936
|
-
if (!
|
|
937
|
-
const
|
|
938
|
-
|
|
939
|
-
}, [
|
|
940
|
-
if (!
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
}, [
|
|
944
|
-
!
|
|
945
|
-
readOnly:
|
|
931
|
+
}, []), V(() => {
|
|
932
|
+
if (!m.current || !T) return;
|
|
933
|
+
const N = m.current.getModel()?.original;
|
|
934
|
+
N && t !== N.getValue() && N.setValue(t);
|
|
935
|
+
}, [t, T]), V(() => {
|
|
936
|
+
if (!m.current || !T) return;
|
|
937
|
+
const N = m.current.getModifiedEditor();
|
|
938
|
+
r !== N.getValue() && m.current.getModel()?.modified?.setValue(r);
|
|
939
|
+
}, [r, T]), V(() => {
|
|
940
|
+
if (!m.current || !T) return;
|
|
941
|
+
const N = n ?? "plaintext", q = m.current.getModel();
|
|
942
|
+
q?.original && $.editor.setModelLanguage(q.original, N), q?.modified && $.editor.setModelLanguage(q.modified, N);
|
|
943
|
+
}, [n, T]), V(() => {
|
|
944
|
+
!m.current || !T || m.current.updateOptions({
|
|
945
|
+
readOnly: u,
|
|
946
946
|
renderSideBySide: c === "side-by-side"
|
|
947
947
|
});
|
|
948
|
-
}, [
|
|
949
|
-
|
|
950
|
-
}, [
|
|
951
|
-
const
|
|
952
|
-
return /* @__PURE__ */
|
|
953
|
-
"--_diff-height":
|
|
948
|
+
}, [u, c, T]), V(() => {
|
|
949
|
+
T && ($.editor.defineTheme(ge, Oe(x.base, M.current)), $.editor.setTheme(ge));
|
|
950
|
+
}, [T, x.registration]);
|
|
951
|
+
const H = (N) => typeof N == "number" ? `${N}px` : N;
|
|
952
|
+
return /* @__PURE__ */ S.jsx("div", { ref: g, className: kr(mt.Root, p), style: {
|
|
953
|
+
"--_diff-height": H(l ?? "100%")
|
|
954
954
|
}, "data-testid": "diff-viewer", ...a ? {} : {
|
|
955
955
|
"data-borderless": ""
|
|
956
|
-
}, children: /* @__PURE__ */
|
|
956
|
+
}, children: /* @__PURE__ */ S.jsx("div", { ref: M, className: mt.Inner }) });
|
|
957
957
|
});
|
|
958
|
-
|
|
959
|
-
function
|
|
960
|
-
const t =
|
|
958
|
+
xr.displayName = "DiffViewer";
|
|
959
|
+
function Ye(e) {
|
|
960
|
+
const t = Ze(e), r = (n, c = "") => t?.getPropertyValue(n).trim() || c;
|
|
961
961
|
return {
|
|
962
|
-
background:
|
|
963
|
-
foreground:
|
|
964
|
-
cursor:
|
|
965
|
-
selectionBackground:
|
|
966
|
-
selectionForeground:
|
|
967
|
-
black:
|
|
968
|
-
red:
|
|
969
|
-
green:
|
|
970
|
-
yellow:
|
|
971
|
-
blue:
|
|
972
|
-
magenta:
|
|
973
|
-
cyan:
|
|
974
|
-
white:
|
|
975
|
-
brightBlack:
|
|
976
|
-
brightRed:
|
|
977
|
-
brightGreen:
|
|
978
|
-
brightYellow:
|
|
979
|
-
brightBlue:
|
|
980
|
-
brightMagenta:
|
|
981
|
-
brightCyan:
|
|
982
|
-
brightWhite:
|
|
962
|
+
background: r("--ov-color-terminal-bg", "#0d0e10"),
|
|
963
|
+
foreground: r("--ov-color-terminal-fg", "#e2e7ee"),
|
|
964
|
+
cursor: r("--ov-color-terminal-cursor", "#89a7ee"),
|
|
965
|
+
selectionBackground: r("--ov-color-terminal-selection-bg", "rgba(90,127,226,0.18)"),
|
|
966
|
+
selectionForeground: r("--ov-color-terminal-selection-fg") || void 0,
|
|
967
|
+
black: r("--ov-color-ansi-black", "#3b4252"),
|
|
968
|
+
red: r("--ov-color-ansi-red", "#bf616a"),
|
|
969
|
+
green: r("--ov-color-ansi-green", "#a3be8c"),
|
|
970
|
+
yellow: r("--ov-color-ansi-yellow", "#ebcb8b"),
|
|
971
|
+
blue: r("--ov-color-ansi-blue", "#81a1c1"),
|
|
972
|
+
magenta: r("--ov-color-ansi-magenta", "#b48ead"),
|
|
973
|
+
cyan: r("--ov-color-ansi-cyan", "#88c0d0"),
|
|
974
|
+
white: r("--ov-color-ansi-white", "#e5e9f0"),
|
|
975
|
+
brightBlack: r("--ov-color-ansi-bright-black", "#4c566a"),
|
|
976
|
+
brightRed: r("--ov-color-ansi-bright-red", "#d08770"),
|
|
977
|
+
brightGreen: r("--ov-color-ansi-bright-green", "#a3be8c"),
|
|
978
|
+
brightYellow: r("--ov-color-ansi-bright-yellow", "#ebcb8b"),
|
|
979
|
+
brightBlue: r("--ov-color-ansi-bright-blue", "#81a1c1"),
|
|
980
|
+
brightMagenta: r("--ov-color-ansi-bright-magenta", "#b48ead"),
|
|
981
|
+
brightCyan: r("--ov-color-ansi-bright-cyan", "#8fbcbb"),
|
|
982
|
+
brightWhite: r("--ov-color-ansi-bright-white", "#eceff4")
|
|
983
983
|
};
|
|
984
984
|
}
|
|
985
|
-
const
|
|
986
|
-
Root:
|
|
985
|
+
const Cr = "_Root_1s8vo_1", Rr = {
|
|
986
|
+
Root: Cr
|
|
987
987
|
};
|
|
988
|
-
function
|
|
988
|
+
function Sr(...e) {
|
|
989
989
|
return e.filter(Boolean).join(" ");
|
|
990
990
|
}
|
|
991
|
-
function
|
|
992
|
-
let
|
|
991
|
+
function Er(e, t) {
|
|
992
|
+
let r = null;
|
|
993
993
|
return {
|
|
994
|
-
run: (...
|
|
995
|
-
|
|
996
|
-
|
|
994
|
+
run: (...n) => {
|
|
995
|
+
r !== null && clearTimeout(r), r = setTimeout(() => {
|
|
996
|
+
r = null, e(...n);
|
|
997
997
|
}, t);
|
|
998
998
|
},
|
|
999
999
|
cancel: () => {
|
|
1000
|
-
|
|
1000
|
+
r !== null && (clearTimeout(r), r = null);
|
|
1001
1001
|
}
|
|
1002
1002
|
};
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1004
|
+
const Tr = ve(function({
|
|
1005
1005
|
onData: t,
|
|
1006
|
-
onBinaryData:
|
|
1007
|
-
onResize:
|
|
1006
|
+
onBinaryData: r,
|
|
1007
|
+
onResize: n,
|
|
1008
1008
|
onSignal: c,
|
|
1009
|
-
onError:
|
|
1010
|
-
onClose:
|
|
1009
|
+
onError: u,
|
|
1010
|
+
onClose: l,
|
|
1011
1011
|
onReady: a,
|
|
1012
|
-
onBell:
|
|
1012
|
+
onBell: p,
|
|
1013
1013
|
onTitleChange: g,
|
|
1014
1014
|
onKey: x,
|
|
1015
|
-
onSelectionChange:
|
|
1016
|
-
onLineFeed:
|
|
1017
|
-
onScroll:
|
|
1018
|
-
onWriteParsed:
|
|
1019
|
-
fontSize:
|
|
1020
|
-
fontFamily:
|
|
1021
|
-
fontWeight:
|
|
1022
|
-
fontWeightBold:
|
|
1023
|
-
scrollback:
|
|
1024
|
-
cursorBlink:
|
|
1015
|
+
onSelectionChange: M,
|
|
1016
|
+
onLineFeed: m,
|
|
1017
|
+
onScroll: T,
|
|
1018
|
+
onWriteParsed: R,
|
|
1019
|
+
fontSize: H = 13,
|
|
1020
|
+
fontFamily: N,
|
|
1021
|
+
fontWeight: q,
|
|
1022
|
+
fontWeightBold: C,
|
|
1023
|
+
scrollback: I = 5e3,
|
|
1024
|
+
cursorBlink: W = !0,
|
|
1025
1025
|
cursorStyle: U,
|
|
1026
|
-
cursorWidth:
|
|
1027
|
-
lineHeight:
|
|
1028
|
-
letterSpacing:
|
|
1026
|
+
cursorWidth: P,
|
|
1027
|
+
lineHeight: F,
|
|
1028
|
+
letterSpacing: D,
|
|
1029
1029
|
drawBoldTextInBrightColors: X = !0,
|
|
1030
1030
|
convertEol: ne = !0,
|
|
1031
|
-
allowTransparency:
|
|
1031
|
+
allowTransparency: v = !0,
|
|
1032
1032
|
macOptionIsMeta: s = !0,
|
|
1033
|
-
macOptionClickForcesSelection:
|
|
1033
|
+
macOptionClickForcesSelection: _ = !0,
|
|
1034
1034
|
linkHandling: k = !0,
|
|
1035
1035
|
disableStdin: i,
|
|
1036
|
-
customKeyEventHandler:
|
|
1037
|
-
autoFocus:
|
|
1038
|
-
renderer:
|
|
1039
|
-
rows:
|
|
1036
|
+
customKeyEventHandler: d,
|
|
1037
|
+
autoFocus: h = !1,
|
|
1038
|
+
renderer: f = "auto",
|
|
1039
|
+
rows: y,
|
|
1040
1040
|
cols: b,
|
|
1041
1041
|
screenReaderMode: o,
|
|
1042
|
-
minimumContrastRatio:
|
|
1043
|
-
className:
|
|
1044
|
-
},
|
|
1045
|
-
const
|
|
1042
|
+
minimumContrastRatio: w,
|
|
1043
|
+
className: A
|
|
1044
|
+
}, j) {
|
|
1045
|
+
const B = Y(null), O = Y(null), L = Y(null), J = Y(null), Q = Y(null), oe = Y([]), le = Y(null), ae = Y(null), G = Y(null), ce = Ke(), ee = Y({
|
|
1046
1046
|
onData: t,
|
|
1047
|
-
onBinaryData:
|
|
1048
|
-
onResize:
|
|
1047
|
+
onBinaryData: r,
|
|
1048
|
+
onResize: n,
|
|
1049
1049
|
onSignal: c,
|
|
1050
|
-
onError:
|
|
1051
|
-
onClose:
|
|
1050
|
+
onError: u,
|
|
1051
|
+
onClose: l,
|
|
1052
1052
|
onReady: a,
|
|
1053
|
-
onBell:
|
|
1053
|
+
onBell: p,
|
|
1054
1054
|
onTitleChange: g,
|
|
1055
1055
|
onKey: x,
|
|
1056
|
-
onSelectionChange:
|
|
1057
|
-
onLineFeed:
|
|
1058
|
-
onScroll:
|
|
1059
|
-
onWriteParsed:
|
|
1056
|
+
onSelectionChange: M,
|
|
1057
|
+
onLineFeed: m,
|
|
1058
|
+
onScroll: T,
|
|
1059
|
+
onWriteParsed: R
|
|
1060
1060
|
});
|
|
1061
1061
|
ee.current = {
|
|
1062
1062
|
onData: t,
|
|
1063
|
-
onBinaryData:
|
|
1064
|
-
onResize:
|
|
1063
|
+
onBinaryData: r,
|
|
1064
|
+
onResize: n,
|
|
1065
1065
|
onSignal: c,
|
|
1066
|
-
onError:
|
|
1067
|
-
onClose:
|
|
1066
|
+
onError: u,
|
|
1067
|
+
onClose: l,
|
|
1068
1068
|
onReady: a,
|
|
1069
|
-
onBell:
|
|
1069
|
+
onBell: p,
|
|
1070
1070
|
onTitleChange: g,
|
|
1071
1071
|
onKey: x,
|
|
1072
|
-
onSelectionChange:
|
|
1073
|
-
onLineFeed:
|
|
1074
|
-
onScroll:
|
|
1075
|
-
onWriteParsed:
|
|
1072
|
+
onSelectionChange: M,
|
|
1073
|
+
onLineFeed: m,
|
|
1074
|
+
onScroll: T,
|
|
1075
|
+
onWriteParsed: R
|
|
1076
1076
|
};
|
|
1077
|
-
const
|
|
1077
|
+
const Le = Ne(() => {
|
|
1078
1078
|
try {
|
|
1079
|
-
|
|
1079
|
+
L.current?.fit?.();
|
|
1080
1080
|
} catch {
|
|
1081
1081
|
}
|
|
1082
1082
|
}, []);
|
|
1083
|
-
return
|
|
1084
|
-
write: (
|
|
1085
|
-
|
|
1083
|
+
return vt(j, () => ({
|
|
1084
|
+
write: (E) => {
|
|
1085
|
+
O.current?.write?.(E);
|
|
1086
1086
|
},
|
|
1087
|
-
writeln: (
|
|
1088
|
-
|
|
1087
|
+
writeln: (E) => {
|
|
1088
|
+
O.current?.writeln?.(E);
|
|
1089
1089
|
},
|
|
1090
1090
|
clear: () => {
|
|
1091
|
-
|
|
1091
|
+
O.current?.clear?.();
|
|
1092
1092
|
},
|
|
1093
1093
|
focus: () => {
|
|
1094
|
-
|
|
1094
|
+
O.current?.focus?.();
|
|
1095
1095
|
},
|
|
1096
1096
|
blur: () => {
|
|
1097
|
-
|
|
1097
|
+
O.current?.blur?.();
|
|
1098
1098
|
},
|
|
1099
|
-
fit:
|
|
1099
|
+
fit: Le,
|
|
1100
1100
|
getDimensions: () => {
|
|
1101
|
-
const
|
|
1102
|
-
return
|
|
1103
|
-
cols:
|
|
1104
|
-
rows:
|
|
1101
|
+
const E = O.current;
|
|
1102
|
+
return E && typeof E.cols == "number" && typeof E.rows == "number" ? {
|
|
1103
|
+
cols: E.cols,
|
|
1104
|
+
rows: E.rows
|
|
1105
1105
|
} : null;
|
|
1106
1106
|
},
|
|
1107
1107
|
reset: () => {
|
|
1108
|
-
|
|
1108
|
+
O.current?.reset?.();
|
|
1109
1109
|
},
|
|
1110
1110
|
scrollToBottom: () => {
|
|
1111
|
-
|
|
1111
|
+
O.current?.scrollToBottom?.();
|
|
1112
1112
|
},
|
|
1113
|
-
findNext: (
|
|
1114
|
-
findPrevious: (
|
|
1113
|
+
findNext: (E, te) => J.current?.findNext?.(E, te) ?? !1,
|
|
1114
|
+
findPrevious: (E, te) => J.current?.findPrevious?.(E, te) ?? !1,
|
|
1115
1115
|
clearSearch: () => {
|
|
1116
|
-
|
|
1116
|
+
J.current?.clearDecorations?.();
|
|
1117
1117
|
},
|
|
1118
|
-
getSelection: () =>
|
|
1119
|
-
hasSelection: () =>
|
|
1118
|
+
getSelection: () => O.current?.getSelection?.() ?? "",
|
|
1119
|
+
hasSelection: () => O.current?.hasSelection?.() ?? !1,
|
|
1120
1120
|
selectAll: () => {
|
|
1121
|
-
|
|
1121
|
+
O.current?.selectAll?.();
|
|
1122
1122
|
},
|
|
1123
1123
|
clearSelection: () => {
|
|
1124
|
-
|
|
1124
|
+
O.current?.clearSelection?.();
|
|
1125
1125
|
},
|
|
1126
|
-
scrollToLine: (
|
|
1127
|
-
|
|
1126
|
+
scrollToLine: (E) => {
|
|
1127
|
+
O.current?.scrollToLine?.(E);
|
|
1128
1128
|
},
|
|
1129
|
-
scrollUp: (
|
|
1130
|
-
|
|
1129
|
+
scrollUp: (E) => {
|
|
1130
|
+
O.current?.scrollLines?.(-E);
|
|
1131
1131
|
},
|
|
1132
|
-
scrollDown: (
|
|
1133
|
-
|
|
1132
|
+
scrollDown: (E) => {
|
|
1133
|
+
O.current?.scrollLines?.(E);
|
|
1134
1134
|
},
|
|
1135
|
-
paste: (
|
|
1136
|
-
|
|
1135
|
+
paste: (E) => {
|
|
1136
|
+
O.current?.paste?.(E);
|
|
1137
1137
|
},
|
|
1138
1138
|
getBufferContent: () => Q.current?.serialize?.() ?? ""
|
|
1139
|
-
})),
|
|
1140
|
-
const
|
|
1141
|
-
if (!
|
|
1139
|
+
})), V(() => {
|
|
1140
|
+
const E = B.current;
|
|
1141
|
+
if (!E) return;
|
|
1142
1142
|
let te = !1;
|
|
1143
|
-
async function
|
|
1143
|
+
async function De() {
|
|
1144
1144
|
await document.fonts.ready;
|
|
1145
1145
|
const [{
|
|
1146
1146
|
Terminal: pe
|
|
1147
1147
|
}, {
|
|
1148
|
-
FitAddon:
|
|
1148
|
+
FitAddon: $e
|
|
1149
1149
|
}, {
|
|
1150
|
-
SearchAddon:
|
|
1150
|
+
SearchAddon: Ot
|
|
1151
1151
|
}, {
|
|
1152
|
-
SerializeAddon:
|
|
1152
|
+
SerializeAddon: Pt
|
|
1153
1153
|
}, {
|
|
1154
|
-
Unicode11Addon:
|
|
1154
|
+
Unicode11Addon: Lt
|
|
1155
1155
|
}] = await Promise.all([import("@xterm/xterm"), import("@xterm/addon-fit"), import("@xterm/addon-search"), import("@xterm/addon-serialize"), import("@xterm/addon-unicode11")]);
|
|
1156
1156
|
if (te) return;
|
|
1157
|
-
const
|
|
1158
|
-
fontSize:
|
|
1159
|
-
fontFamily:
|
|
1160
|
-
theme:
|
|
1161
|
-
allowTransparency:
|
|
1162
|
-
cursorBlink:
|
|
1157
|
+
const Dt = Ye(E), ie = {
|
|
1158
|
+
fontSize: H,
|
|
1159
|
+
fontFamily: N || "'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
|
|
1160
|
+
theme: Dt,
|
|
1161
|
+
allowTransparency: v,
|
|
1162
|
+
cursorBlink: W,
|
|
1163
1163
|
convertEol: ne,
|
|
1164
|
-
scrollback:
|
|
1164
|
+
scrollback: I,
|
|
1165
1165
|
macOptionIsMeta: s,
|
|
1166
|
-
macOptionClickForcesSelection:
|
|
1166
|
+
macOptionClickForcesSelection: _,
|
|
1167
1167
|
allowProposedApi: !0,
|
|
1168
1168
|
drawBoldTextInBrightColors: X
|
|
1169
1169
|
};
|
|
1170
|
-
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1174
|
-
if (
|
|
1170
|
+
q !== void 0 && (ie.fontWeight = q), C !== void 0 && (ie.fontWeightBold = C), i !== void 0 && (ie.disableStdin = i), U !== void 0 && (ie.cursorStyle = U), P !== void 0 && (ie.cursorWidth = P), F !== void 0 && (ie.lineHeight = F), D !== void 0 && (ie.letterSpacing = D), y !== void 0 && (ie.rows = y), b !== void 0 && (ie.cols = b), o !== void 0 && (ie.screenReaderMode = o), w !== void 0 && (ie.minimumContrastRatio = w);
|
|
1171
|
+
const z = new pe(ie);
|
|
1172
|
+
d && z.attachCustomKeyEventHandler(d);
|
|
1173
|
+
const we = [], _e = new $e(), Ie = new Ot(), We = new Pt(), et = new Lt();
|
|
1174
|
+
if (z.loadAddon(_e), z.loadAddon(Ie), z.loadAddon(We), z.loadAddon(et), we.push(_e, Ie, We, et), z.unicode.activeVersion = "11", k)
|
|
1175
1175
|
try {
|
|
1176
1176
|
const {
|
|
1177
1177
|
WebLinksAddon: Z
|
|
1178
1178
|
} = await import("@xterm/addon-web-links");
|
|
1179
1179
|
if (!te) {
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1180
|
+
const de = new Z();
|
|
1181
|
+
z.loadAddon(de), we.push(de);
|
|
1182
1182
|
}
|
|
1183
1183
|
} catch {
|
|
1184
1184
|
}
|
|
1185
1185
|
if (te) {
|
|
1186
|
-
|
|
1186
|
+
z.dispose();
|
|
1187
1187
|
return;
|
|
1188
1188
|
}
|
|
1189
|
-
if (
|
|
1189
|
+
if (z.open(E), f === "auto" || f === "webgl")
|
|
1190
1190
|
try {
|
|
1191
1191
|
const {
|
|
1192
1192
|
WebglAddon: Z
|
|
1193
1193
|
} = await import("@xterm/addon-webgl");
|
|
1194
1194
|
if (!te) {
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
}),
|
|
1195
|
+
const de = new Z();
|
|
1196
|
+
de.onContextLoss(() => {
|
|
1197
|
+
de.dispose();
|
|
1198
|
+
}), z.loadAddon(de), we.push(de);
|
|
1199
1199
|
}
|
|
1200
1200
|
} catch {
|
|
1201
1201
|
}
|
|
1202
1202
|
if (te) {
|
|
1203
|
-
for (const Z of
|
|
1203
|
+
for (const Z of we)
|
|
1204
1204
|
try {
|
|
1205
1205
|
Z.dispose();
|
|
1206
1206
|
} catch {
|
|
1207
1207
|
}
|
|
1208
|
-
|
|
1208
|
+
z.dispose();
|
|
1209
1209
|
return;
|
|
1210
1210
|
}
|
|
1211
|
-
|
|
1211
|
+
z.options.theme = Ye(E), _e.fit(), O.current = z, L.current = _e, J.current = Ie, Q.current = We, oe.current = we, z.onData((Z) => {
|
|
1212
1212
|
ee.current.onData?.(Z);
|
|
1213
|
-
}),
|
|
1213
|
+
}), z.onBinary((Z) => {
|
|
1214
1214
|
ee.current.onBinaryData?.(Z);
|
|
1215
|
-
}),
|
|
1215
|
+
}), z.onResize(({
|
|
1216
1216
|
cols: Z,
|
|
1217
|
-
rows:
|
|
1217
|
+
rows: de
|
|
1218
1218
|
}) => {
|
|
1219
|
-
ee.current.onResize?.(Z,
|
|
1220
|
-
}),
|
|
1219
|
+
ee.current.onResize?.(Z, de);
|
|
1220
|
+
}), z.onBell(() => {
|
|
1221
1221
|
ee.current.onBell?.();
|
|
1222
|
-
}),
|
|
1222
|
+
}), z.onTitleChange((Z) => {
|
|
1223
1223
|
ee.current.onTitleChange?.(Z);
|
|
1224
|
-
}),
|
|
1224
|
+
}), z.onKey((Z) => {
|
|
1225
1225
|
ee.current.onKey?.(Z);
|
|
1226
|
-
}),
|
|
1226
|
+
}), z.onSelectionChange(() => {
|
|
1227
1227
|
ee.current.onSelectionChange?.();
|
|
1228
|
-
}),
|
|
1228
|
+
}), z.onLineFeed(() => {
|
|
1229
1229
|
ee.current.onLineFeed?.();
|
|
1230
|
-
}),
|
|
1230
|
+
}), z.onScroll((Z) => {
|
|
1231
1231
|
ee.current.onScroll?.(Z);
|
|
1232
|
-
}),
|
|
1232
|
+
}), z.onWriteParsed(() => {
|
|
1233
1233
|
ee.current.onWriteParsed?.();
|
|
1234
1234
|
});
|
|
1235
|
-
const
|
|
1235
|
+
const Be = Er(() => {
|
|
1236
1236
|
try {
|
|
1237
|
-
|
|
1237
|
+
_e.fit();
|
|
1238
1238
|
} catch {
|
|
1239
1239
|
}
|
|
1240
1240
|
}, 10);
|
|
1241
|
-
ae.current =
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1241
|
+
ae.current = Be;
|
|
1242
|
+
const tt = new ResizeObserver(() => {
|
|
1243
|
+
Be.run();
|
|
1244
1244
|
});
|
|
1245
|
-
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1245
|
+
tt.observe(E), le.current = tt;
|
|
1246
|
+
const rt = () => {
|
|
1247
|
+
Be.run();
|
|
1248
1248
|
};
|
|
1249
|
-
window.addEventListener("resize",
|
|
1250
|
-
window.removeEventListener("resize",
|
|
1251
|
-
},
|
|
1252
|
-
cols:
|
|
1253
|
-
rows:
|
|
1249
|
+
window.addEventListener("resize", rt), G.current = () => {
|
|
1250
|
+
window.removeEventListener("resize", rt);
|
|
1251
|
+
}, h && z.focus(), ee.current.onReady?.({
|
|
1252
|
+
cols: z.cols,
|
|
1253
|
+
rows: z.rows
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
|
-
return
|
|
1256
|
+
return De().catch((pe) => {
|
|
1257
1257
|
ee.current.onError?.(pe instanceof Error ? pe : new Error(String(pe)));
|
|
1258
1258
|
}), () => {
|
|
1259
1259
|
te = !0, ae.current?.cancel(), ae.current = null, le.current?.disconnect(), le.current = null, G.current?.(), G.current = null;
|
|
1260
|
-
for (const
|
|
1260
|
+
for (const $e of oe.current)
|
|
1261
1261
|
try {
|
|
1262
|
-
|
|
1262
|
+
$e.dispose();
|
|
1263
1263
|
} catch {
|
|
1264
1264
|
}
|
|
1265
1265
|
oe.current = [];
|
|
1266
|
-
const pe =
|
|
1266
|
+
const pe = O.current;
|
|
1267
1267
|
try {
|
|
1268
1268
|
pe?.dispose?.();
|
|
1269
1269
|
} catch {
|
|
1270
1270
|
}
|
|
1271
|
-
|
|
1271
|
+
O.current = null, L.current = null, J.current = null, Q.current = null;
|
|
1272
1272
|
};
|
|
1273
|
-
}, []),
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1276
|
-
}, [ce.registration]),
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1279
|
-
}, [
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1282
|
-
}, [
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
}, [U]),
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
}, [
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1291
|
-
}, [
|
|
1292
|
-
const
|
|
1293
|
-
|
|
1294
|
-
}, [
|
|
1273
|
+
}, []), V(() => {
|
|
1274
|
+
const E = O.current;
|
|
1275
|
+
E?.options && (E.options.theme = Ye(B.current));
|
|
1276
|
+
}, [ce.registration]), V(() => {
|
|
1277
|
+
const E = O.current;
|
|
1278
|
+
E?.options && (E.options.fontSize = H, ae.current?.run());
|
|
1279
|
+
}, [H]), V(() => {
|
|
1280
|
+
const E = O.current;
|
|
1281
|
+
E?.options && W !== void 0 && (E.options.cursorBlink = W);
|
|
1282
|
+
}, [W]), V(() => {
|
|
1283
|
+
const E = O.current;
|
|
1284
|
+
E?.options && U !== void 0 && (E.options.cursorStyle = U);
|
|
1285
|
+
}, [U]), V(() => {
|
|
1286
|
+
const E = O.current;
|
|
1287
|
+
E?.options && I !== void 0 && (E.options.scrollback = I);
|
|
1288
|
+
}, [I]), V(() => {
|
|
1289
|
+
const E = O.current;
|
|
1290
|
+
E?.options && F !== void 0 && (E.options.lineHeight = F, ae.current?.run());
|
|
1291
|
+
}, [F]), V(() => {
|
|
1292
|
+
const E = O.current;
|
|
1293
|
+
E?.options && D !== void 0 && (E.options.letterSpacing = D, ae.current?.run());
|
|
1294
|
+
}, [D]), /* @__PURE__ */ S.jsx("div", { ref: B, className: Sr(Rr.Root, A), "data-testid": "terminal" });
|
|
1295
1295
|
});
|
|
1296
|
-
|
|
1297
|
-
const
|
|
1298
|
-
Root:
|
|
1299
|
-
Loading:
|
|
1300
|
-
},
|
|
1301
|
-
function
|
|
1296
|
+
Tr.displayName = "Terminal";
|
|
1297
|
+
const jr = "_Root_1wl3o_1", Mr = "_Loading_1wl3o_92", ht = {
|
|
1298
|
+
Root: jr,
|
|
1299
|
+
Loading: Mr
|
|
1300
|
+
}, Ar = [Qt], Nr = It(() => import("react-markdown"));
|
|
1301
|
+
function Or(...e) {
|
|
1302
1302
|
return e.filter(Boolean).join(" ");
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(
|
|
1304
|
+
function kt(e) {
|
|
1305
|
+
return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(kt).join("") : "" : "";
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function Pr(e) {
|
|
1308
1308
|
const t = be.c(4), {
|
|
1309
|
-
summaryText:
|
|
1310
|
-
children:
|
|
1311
|
-
} = e,
|
|
1312
|
-
let
|
|
1313
|
-
return t[0] !==
|
|
1309
|
+
summaryText: r,
|
|
1310
|
+
children: n
|
|
1311
|
+
} = e, u = `md-details-${Ht()}`;
|
|
1312
|
+
let l;
|
|
1313
|
+
return t[0] !== n || t[1] !== u || t[2] !== r ? (l = /* @__PURE__ */ S.jsx(nt, { animation: "fast", children: /* @__PURE__ */ S.jsx(nt.Item, { id: u, title: r, children: n }) }), t[0] = n, t[1] = u, t[2] = r, t[3] = l) : l = t[3], l;
|
|
1314
1314
|
}
|
|
1315
|
-
const
|
|
1315
|
+
const Lr = {
|
|
1316
1316
|
// Code blocks & inline code
|
|
1317
1317
|
pre: ({
|
|
1318
1318
|
children: e
|
|
1319
|
-
}) => /* @__PURE__ */
|
|
1319
|
+
}) => /* @__PURE__ */ S.jsx(S.Fragment, { children: e }),
|
|
1320
1320
|
code: ({
|
|
1321
1321
|
className: e,
|
|
1322
1322
|
children: t
|
|
1323
1323
|
}) => {
|
|
1324
|
-
const
|
|
1325
|
-
return
|
|
1326
|
-
`) ? /* @__PURE__ */
|
|
1324
|
+
const r = /language-([^\s]+)/.exec(e ?? ""), n = String(t).replace(/\n$/, "");
|
|
1325
|
+
return r || n.includes(`
|
|
1326
|
+
`) ? /* @__PURE__ */ S.jsx(qt, { language: r?.[1], copyable: !0, children: n }) : /* @__PURE__ */ S.jsx(Jt, { children: t });
|
|
1327
1327
|
},
|
|
1328
1328
|
// Tables
|
|
1329
1329
|
table: ({
|
|
1330
1330
|
children: e
|
|
1331
|
-
}) => /* @__PURE__ */
|
|
1331
|
+
}) => /* @__PURE__ */ S.jsx(ye.Root, { striped: !0, hoverable: !0, size: "sm", children: e }),
|
|
1332
1332
|
thead: ({
|
|
1333
1333
|
children: e
|
|
1334
|
-
}) => /* @__PURE__ */
|
|
1334
|
+
}) => /* @__PURE__ */ S.jsx(ye.Head, { children: e }),
|
|
1335
1335
|
tbody: ({
|
|
1336
1336
|
children: e
|
|
1337
|
-
}) => /* @__PURE__ */
|
|
1337
|
+
}) => /* @__PURE__ */ S.jsx(ye.Body, { children: e }),
|
|
1338
1338
|
tr: ({
|
|
1339
1339
|
children: e
|
|
1340
|
-
}) => /* @__PURE__ */
|
|
1340
|
+
}) => /* @__PURE__ */ S.jsx(ye.Row, { children: e }),
|
|
1341
1341
|
th: ({
|
|
1342
1342
|
children: e,
|
|
1343
1343
|
style: t
|
|
1344
|
-
}) => /* @__PURE__ */
|
|
1344
|
+
}) => /* @__PURE__ */ S.jsx(ye.HeaderCell, { style: t, children: e }),
|
|
1345
1345
|
td: ({
|
|
1346
1346
|
children: e,
|
|
1347
1347
|
style: t
|
|
1348
|
-
}) => /* @__PURE__ */
|
|
1348
|
+
}) => /* @__PURE__ */ S.jsx(ye.Cell, { style: t, children: e }),
|
|
1349
1349
|
// Links
|
|
1350
1350
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1351
1351
|
a: ({
|
|
1352
1352
|
children: e,
|
|
1353
1353
|
href: t,
|
|
1354
|
-
node:
|
|
1355
|
-
...
|
|
1356
|
-
}) => /* @__PURE__ */
|
|
1354
|
+
node: r,
|
|
1355
|
+
...n
|
|
1356
|
+
}) => /* @__PURE__ */ S.jsx(Yt, { ...n, href: t, target: "_blank", rel: "noopener noreferrer", underline: "hover", children: e }),
|
|
1357
1357
|
// Blockquotes
|
|
1358
1358
|
blockquote: ({
|
|
1359
1359
|
children: e
|
|
1360
|
-
}) => /* @__PURE__ */
|
|
1360
|
+
}) => /* @__PURE__ */ S.jsx(Vt, { variant: "plain", children: e }),
|
|
1361
1361
|
// Horizontal rules
|
|
1362
|
-
hr: () => /* @__PURE__ */
|
|
1362
|
+
hr: () => /* @__PURE__ */ S.jsx(Ft, {}),
|
|
1363
1363
|
// Details/summary → Accordion — extract title from the hast node's summary child
|
|
1364
1364
|
details: ({
|
|
1365
1365
|
children: e,
|
|
1366
1366
|
node: t
|
|
1367
1367
|
}) => {
|
|
1368
|
-
let
|
|
1368
|
+
let r = "Details";
|
|
1369
1369
|
if (t?.children) {
|
|
1370
|
-
const c = t.children.find((
|
|
1370
|
+
const c = t.children.find((u) => u.tagName === "summary");
|
|
1371
1371
|
if (c) {
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1372
|
+
const u = kt(c).trim();
|
|
1373
|
+
u && (r = u);
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1377
|
-
return
|
|
1378
|
-
|
|
1379
|
-
}), /* @__PURE__ */
|
|
1376
|
+
const n = [];
|
|
1377
|
+
return Wt.forEach(e, (c) => {
|
|
1378
|
+
Bt(c) && c.props?.["data-md-summary"] || n.push(c);
|
|
1379
|
+
}), /* @__PURE__ */ S.jsx(Pr, { summaryText: r, children: n });
|
|
1380
1380
|
},
|
|
1381
1381
|
// Mark summary so details can filter it out; text is extracted from hast node
|
|
1382
1382
|
summary: ({
|
|
1383
1383
|
children: e
|
|
1384
|
-
}) => /* @__PURE__ */
|
|
1384
|
+
}) => /* @__PURE__ */ S.jsx("span", { hidden: !0, "data-md-summary": !0, children: e }),
|
|
1385
1385
|
// Task list checkboxes — use compound parts for inline rendering
|
|
1386
1386
|
input: ({
|
|
1387
1387
|
type: e,
|
|
1388
1388
|
checked: t,
|
|
1389
|
-
disabled:
|
|
1390
|
-
}) => e === "checkbox" ? /* @__PURE__ */
|
|
1391
|
-
},
|
|
1392
|
-
const
|
|
1393
|
-
let c,
|
|
1394
|
-
|
|
1395
|
-
content:
|
|
1389
|
+
disabled: r
|
|
1390
|
+
}) => e === "checkbox" ? /* @__PURE__ */ S.jsx(He.Root, { checked: t, disabled: r, size: "sm", className: "ov-md-checkbox", children: /* @__PURE__ */ S.jsx(He.Control, { children: /* @__PURE__ */ S.jsx(He.Indicator, { keepMounted: !0 }) }) }) : null
|
|
1391
|
+
}, Dr = ve(function(t, r) {
|
|
1392
|
+
const n = be.c(16);
|
|
1393
|
+
let c, u, l, a;
|
|
1394
|
+
n[0] !== t ? ({
|
|
1395
|
+
content: u,
|
|
1396
1396
|
allowHtml: a,
|
|
1397
1397
|
className: c,
|
|
1398
|
-
...
|
|
1399
|
-
} = t,
|
|
1400
|
-
const
|
|
1398
|
+
...l
|
|
1399
|
+
} = t, n[0] = t, n[1] = c, n[2] = u, n[3] = l, n[4] = a) : (c = n[1], u = n[2], l = n[3], a = n[4]);
|
|
1400
|
+
const p = a === void 0 ? !1 : a;
|
|
1401
1401
|
let g;
|
|
1402
|
-
|
|
1402
|
+
n[5] !== c ? (g = Or(ht.Root, c), n[5] = c, n[6] = g) : g = n[6];
|
|
1403
1403
|
let x;
|
|
1404
|
-
|
|
1405
|
-
let
|
|
1406
|
-
|
|
1407
|
-
let
|
|
1408
|
-
return
|
|
1404
|
+
n[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ S.jsx("div", { className: ht.Loading, "data-testid": "markdown-loading", children: "Loading…" }), n[7] = x) : x = n[7];
|
|
1405
|
+
let M;
|
|
1406
|
+
n[8] !== p || n[9] !== u ? (M = /* @__PURE__ */ S.jsx($t, { fallback: x, children: /* @__PURE__ */ S.jsx(Ir, { content: u, allowHtml: p }) }), n[8] = p, n[9] = u, n[10] = M) : M = n[10];
|
|
1407
|
+
let m;
|
|
1408
|
+
return n[11] !== l || n[12] !== r || n[13] !== g || n[14] !== M ? (m = /* @__PURE__ */ S.jsx("div", { ref: r, className: g, "data-testid": "markdown-preview", ...l, children: M }), n[11] = l, n[12] = r, n[13] = g, n[14] = M, n[15] = m) : m = n[15], m;
|
|
1409
1409
|
});
|
|
1410
|
-
|
|
1411
|
-
const
|
|
1412
|
-
...
|
|
1410
|
+
Dr.displayName = "MarkdownPreview";
|
|
1411
|
+
const $r = {
|
|
1412
|
+
...Ue,
|
|
1413
1413
|
attributes: {
|
|
1414
|
-
...
|
|
1415
|
-
"*": [...
|
|
1414
|
+
...Ue.attributes,
|
|
1415
|
+
"*": [...Ue.attributes?.["*"] ?? [], "className"]
|
|
1416
1416
|
}
|
|
1417
1417
|
};
|
|
1418
|
-
function
|
|
1418
|
+
function Ir(e) {
|
|
1419
1419
|
const t = be.c(6), {
|
|
1420
|
-
content:
|
|
1421
|
-
allowHtml:
|
|
1420
|
+
content: r,
|
|
1421
|
+
allowHtml: n
|
|
1422
1422
|
} = e;
|
|
1423
1423
|
let c;
|
|
1424
|
-
t[0] !==
|
|
1425
|
-
const
|
|
1426
|
-
let
|
|
1427
|
-
return t[2] !==
|
|
1428
|
-
}
|
|
1429
|
-
const
|
|
1430
|
-
Overlay:
|
|
1431
|
-
Root:
|
|
1432
|
-
CommandList:
|
|
1433
|
-
Results:
|
|
1424
|
+
t[0] !== n ? (c = n ? [Zt, [Kt, $r]] : [], t[0] = n, t[1] = c) : c = t[1];
|
|
1425
|
+
const u = c, l = !n, a = u;
|
|
1426
|
+
let p;
|
|
1427
|
+
return t[2] !== r || t[3] !== l || t[4] !== a ? (p = /* @__PURE__ */ S.jsx(Nr, { skipHtml: l, remarkPlugins: Ar, rehypePlugins: a, components: Lr, children: r }), t[2] = r, t[3] = l, t[4] = a, t[5] = p) : p = t[5], p;
|
|
1428
|
+
}
|
|
1429
|
+
const Wr = "_Overlay_pgin5_1", Br = "_Root_pgin5_12", Hr = "_CommandList_pgin5_25", Ur = "_Results_pgin5_30", zr = "_Message_pgin5_35", Ce = {
|
|
1430
|
+
Overlay: Wr,
|
|
1431
|
+
Root: Br,
|
|
1432
|
+
CommandList: Hr,
|
|
1433
|
+
Results: Ur,
|
|
1434
|
+
Message: zr
|
|
1434
1435
|
};
|
|
1435
|
-
function
|
|
1436
|
+
function Fr(e) {
|
|
1436
1437
|
return e.id;
|
|
1437
1438
|
}
|
|
1438
|
-
function
|
|
1439
|
-
const
|
|
1439
|
+
function qe(e, t) {
|
|
1440
|
+
const r = e.toLowerCase(), n = t.toLowerCase();
|
|
1440
1441
|
let c = 0;
|
|
1441
|
-
for (let
|
|
1442
|
-
|
|
1443
|
-
return c ===
|
|
1444
|
-
}
|
|
1445
|
-
const Br = ve(function(t, n) {
|
|
1446
|
-
const r = be.c(22), {
|
|
1447
|
-
open: c,
|
|
1448
|
-
onClose: l,
|
|
1449
|
-
commands: f,
|
|
1450
|
-
onSelect: a,
|
|
1451
|
-
placeholder: v
|
|
1452
|
-
} = t, g = v === void 0 ? "Type a command…" : v;
|
|
1453
|
-
let x;
|
|
1454
|
-
r[0] !== f ? (x = f.filter(zr), r[0] = f, r[1] = x) : x = r[1];
|
|
1455
|
-
const A = x;
|
|
1456
|
-
if (!c)
|
|
1457
|
-
return null;
|
|
1458
|
-
let h;
|
|
1459
|
-
r[2] !== l ? (h = (J) => {
|
|
1460
|
-
J.key === "Escape" && l();
|
|
1461
|
-
}, r[2] = l, r[3] = h) : h = r[3];
|
|
1462
|
-
let S;
|
|
1463
|
-
r[4] !== l || r[5] !== a ? (S = (J, U) => {
|
|
1464
|
-
a(U), l();
|
|
1465
|
-
}, r[4] = l, r[5] = a, r[6] = S) : S = r[6];
|
|
1466
|
-
let C, I, j;
|
|
1467
|
-
r[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ T.jsx(fe.Input, { "data-testid": "command-palette-input" }), I = /* @__PURE__ */ T.jsx(fe.Results, { className: Ee.Results, "data-testid": "command-palette-list" }), j = /* @__PURE__ */ T.jsx(fe.Empty, { "data-testid": "command-palette-empty", children: "No matching commands" }), r[7] = C, r[8] = I, r[9] = j) : (C = r[7], I = r[8], j = r[9]);
|
|
1468
|
-
let W;
|
|
1469
|
-
r[10] !== A || r[11] !== l || r[12] !== g || r[13] !== S ? (W = /* @__PURE__ */ T.jsxs(fe.Root, { className: Ee.CommandList, items: A, itemKey: Wr, renderItem: Vr, filterFn: Fr, groupBy: Yr, onAction: S, onDismiss: l, placeholder: g, density: "compact", children: [
|
|
1470
|
-
C,
|
|
1471
|
-
I,
|
|
1472
|
-
j
|
|
1473
|
-
] }), r[10] = A, r[11] = l, r[12] = g, r[13] = S, r[14] = W) : W = r[14];
|
|
1474
|
-
let H;
|
|
1475
|
-
r[15] !== n || r[16] !== W ? (H = /* @__PURE__ */ T.jsx("div", { ref: n, className: Ee.Root, onClick: Hr, onKeyDown: Ur, role: "dialog", "aria-modal": "true", "aria-label": "Command palette", "data-testid": "command-palette", children: W }), r[15] = n, r[16] = W, r[17] = H) : H = r[17];
|
|
1476
|
-
let q;
|
|
1477
|
-
return r[18] !== l || r[19] !== h || r[20] !== H ? (q = /* @__PURE__ */ T.jsx("div", { role: "presentation", className: Ee.Overlay, onClick: l, onKeyDown: h, "data-testid": "command-palette-overlay", children: H }), r[18] = l, r[19] = h, r[20] = H, r[21] = q) : q = r[21], q;
|
|
1478
|
-
});
|
|
1479
|
-
Br.displayName = "CommandPalette";
|
|
1480
|
-
function zr(e) {
|
|
1481
|
-
return !e.disabled;
|
|
1482
|
-
}
|
|
1483
|
-
function Hr(e) {
|
|
1484
|
-
return e.stopPropagation();
|
|
1485
|
-
}
|
|
1486
|
-
function Ur(e) {
|
|
1487
|
-
return e.stopPropagation();
|
|
1442
|
+
for (let u = 0; u < r.length && c < n.length; u++)
|
|
1443
|
+
r[u] === n[c] && c++;
|
|
1444
|
+
return c === n.length;
|
|
1488
1445
|
}
|
|
1489
1446
|
function Vr(e, t) {
|
|
1490
|
-
return
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1447
|
+
return qe(e.label, t) || (e.description ? qe(e.description, t) : !1) || (e.group ? qe(e.group, t) : !1);
|
|
1448
|
+
}
|
|
1449
|
+
const Yr = [];
|
|
1450
|
+
function qr(e) {
|
|
1451
|
+
const t = be.c(7), {
|
|
1452
|
+
inputRef: r
|
|
1453
|
+
} = e, {
|
|
1454
|
+
listId: n
|
|
1455
|
+
} = Gt(), c = Xt(), {
|
|
1456
|
+
activeKey: u
|
|
1457
|
+
} = Ut(c.subscribe, c.getSnapshot, c.getSnapshot), l = u != null ? `${n}-item-${u}` : void 0;
|
|
1458
|
+
let a, p;
|
|
1459
|
+
t[0] !== l || t[1] !== r ? (a = () => {
|
|
1460
|
+
l && r.current?.ownerDocument.getElementById(l)?.scrollIntoView?.({
|
|
1461
|
+
block: "nearest"
|
|
1462
|
+
});
|
|
1463
|
+
}, p = [l, r], t[0] = l, t[1] = r, t[2] = a, t[3] = p) : (a = t[2], p = t[3]), bt(a, p);
|
|
1464
|
+
let g;
|
|
1465
|
+
return t[4] !== l || t[5] !== r ? (g = /* @__PURE__ */ S.jsx(ue.Input, { ref: r, autoFocus: !1, role: "combobox", "aria-label": "Search commands", "aria-expanded": "true", "aria-haspopup": "listbox", "aria-activedescendant": l, autoComplete: "off", spellCheck: !1, "data-testid": "command-palette-input" }), t[4] = l, t[5] = r, t[6] = g) : g = t[6], g;
|
|
1466
|
+
}
|
|
1467
|
+
const Jr = ve(function({
|
|
1468
|
+
open: t,
|
|
1469
|
+
onClose: r,
|
|
1470
|
+
commands: n,
|
|
1471
|
+
onSelect: c,
|
|
1472
|
+
placeholder: u = "Type a command…",
|
|
1473
|
+
loading: l = !1,
|
|
1474
|
+
error: a
|
|
1475
|
+
}, p) {
|
|
1476
|
+
const g = Y(null), x = Y(null), M = Y(!1), m = a !== void 0, T = Ae(() => n.filter((C) => !C.disabled), [n]), R = m || l ? Yr : T, H = Ae(() => {
|
|
1477
|
+
const C = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map();
|
|
1478
|
+
let W, U = -1;
|
|
1479
|
+
for (const P of R) {
|
|
1480
|
+
const F = P.group || "Other commands";
|
|
1481
|
+
F !== W && U++, W = F;
|
|
1482
|
+
const D = String(U);
|
|
1483
|
+
C.set(P.id, D), I.set(D, F);
|
|
1484
|
+
}
|
|
1485
|
+
return {
|
|
1486
|
+
keys: C,
|
|
1487
|
+
labels: I,
|
|
1488
|
+
grouped: R.some((P) => P.group)
|
|
1489
|
+
};
|
|
1490
|
+
}, [R]), N = Ne((C) => H.keys.get(C.id), [H]), q = Ne((C) => H.labels.get(C), [H]);
|
|
1491
|
+
return bt(() => {
|
|
1492
|
+
if (!t) return;
|
|
1493
|
+
const C = g.current, I = C?.ownerDocument, W = I?.activeElement;
|
|
1494
|
+
return M.current = !1, x.current?.focus({
|
|
1495
|
+
preventScroll: !0
|
|
1496
|
+
}), () => {
|
|
1497
|
+
W instanceof HTMLElement && W.isConnected && (I?.activeElement === I?.body || C?.contains(I?.activeElement ?? null)) && W.focus({
|
|
1498
|
+
preventScroll: !0
|
|
1499
|
+
});
|
|
1500
|
+
};
|
|
1501
|
+
}, [t]), t ? /* @__PURE__ */ S.jsx("div", { role: "presentation", className: Ce.Overlay, onClick: r, "data-testid": "command-palette-overlay", children: /* @__PURE__ */ S.jsx("div", { ref: (C) => {
|
|
1502
|
+
if (g.current = C, typeof p == "function") return p(C);
|
|
1503
|
+
p && (p.current = C);
|
|
1504
|
+
}, className: Ce.Root, onClick: (C) => C.stopPropagation(), onMouseDown: (C) => {
|
|
1505
|
+
C.button === 0 && C.target instanceof Element && !C.target.closest("input, button") && (C.preventDefault(), x.current?.focus({
|
|
1506
|
+
preventScroll: !0
|
|
1507
|
+
}));
|
|
1508
|
+
}, onKeyDown: (C) => C.stopPropagation(), onCompositionStartCapture: () => {
|
|
1509
|
+
M.current = !0;
|
|
1510
|
+
}, onCompositionEndCapture: () => {
|
|
1511
|
+
M.current = !1;
|
|
1512
|
+
}, onKeyDownCapture: (C) => {
|
|
1513
|
+
if (M.current || C.nativeEvent.isComposing || C.keyCode === 229) {
|
|
1514
|
+
C.stopPropagation();
|
|
1515
|
+
return;
|
|
1516
|
+
}
|
|
1517
|
+
if (C.target instanceof HTMLButtonElement && C.key !== "Escape" && C.key !== "Tab") {
|
|
1518
|
+
C.stopPropagation();
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
if (C.key === "Escape")
|
|
1522
|
+
C.preventDefault(), C.stopPropagation(), r();
|
|
1523
|
+
else if (C.key === "Tab") {
|
|
1524
|
+
const I = g.current?.querySelectorAll("input:not(:disabled), button:not(:disabled)");
|
|
1525
|
+
if (!I?.length) return;
|
|
1526
|
+
const W = I[0], U = I[I.length - 1], P = W.ownerDocument.activeElement;
|
|
1527
|
+
(C.shiftKey && P === W || !C.shiftKey && P === U) && (C.preventDefault(), (C.shiftKey ? U : W).focus());
|
|
1528
|
+
}
|
|
1529
|
+
}, role: "dialog", "aria-modal": "true", "aria-label": "Command palette", "data-testid": "command-palette", children: /* @__PURE__ */ S.jsxs(ue.Root, { className: Ce.CommandList, role: "presentation", "aria-expanded": void 0, "aria-haspopup": void 0, "aria-owns": void 0, "aria-activedescendant": void 0, items: R, itemKey: Fr, renderItem: (C, I) => /* @__PURE__ */ S.jsxs(ue.Item, { itemKey: I.key, "data-testid": `command-item-${C.id}`, children: [
|
|
1530
|
+
C.icon && /* @__PURE__ */ S.jsx(ue.ItemIcon, { "aria-hidden": "true", children: C.icon }),
|
|
1531
|
+
/* @__PURE__ */ S.jsx(ue.ItemLabel, { children: C.label }),
|
|
1532
|
+
C.description && /* @__PURE__ */ S.jsx(ue.ItemDescription, { children: C.description }),
|
|
1533
|
+
C.shortcut && /* @__PURE__ */ S.jsx(ue.ItemShortcut, { children: C.shortcut })
|
|
1534
|
+
] }), filterFn: Vr, sortByScore: !1, groupBy: H.grouped ? N : void 0, groupLabel: q, loading: l && !m, onAction: (C) => {
|
|
1535
|
+
const I = R.find((W) => W.id === C && !W.disabled);
|
|
1536
|
+
I && (c(I), r());
|
|
1537
|
+
}, onDismiss: r, placeholder: u, density: "compact", children: [
|
|
1538
|
+
/* @__PURE__ */ S.jsx(qr, { inputRef: x }),
|
|
1539
|
+
/* @__PURE__ */ S.jsx(ue.Results, { className: Ce.Results, "aria-label": "Commands", "aria-busy": l && !m, "data-testid": "command-palette-list" }),
|
|
1540
|
+
m ? /* @__PURE__ */ S.jsx("div", { role: "alert", className: Ce.Message, "data-testid": "command-palette-error", children: a || "Unable to load commands." }) : /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
|
1541
|
+
/* @__PURE__ */ S.jsx(ue.Loading, { role: "status", "data-testid": "command-palette-loading", children: "Loading commands…" }),
|
|
1542
|
+
/* @__PURE__ */ S.jsx(ue.Empty, { role: "status", "data-testid": "command-palette-empty", children: "No matching commands" })
|
|
1543
|
+
] })
|
|
1544
|
+
] }) }) }) : null;
|
|
1545
|
+
});
|
|
1546
|
+
Jr.displayName = "CommandPalette";
|
|
1547
|
+
const Gr = "_Root_1b5sv_1", Xr = "_Toolbar_1b5sv_12", Qr = "_SearchInput_1b5sv_20", Zr = "_CopyButton_1b5sv_41", Kr = "_Tree_1b5sv_55", en = "_Node_1b5sv_59", tn = "_Row_1b5sv_63", rn = "_RowHighlight_1b5sv_76", nn = "_Chevron_1b5sv_80", on = "_ChevronExpanded_1b5sv_93", sn = "_ChevronSpacer_1b5sv_97", an = "_Key_1b5sv_103", cn = "_Colon_1b5sv_107", ln = "_Value_1b5sv_111", un = "_Preview_1b5sv_129", dn = "_Comma_1b5sv_134", re = {
|
|
1548
|
+
Root: Gr,
|
|
1549
|
+
Toolbar: Xr,
|
|
1550
|
+
SearchInput: Qr,
|
|
1551
|
+
CopyButton: Zr,
|
|
1552
|
+
Tree: Kr,
|
|
1553
|
+
Node: en,
|
|
1554
|
+
Row: tn,
|
|
1555
|
+
RowHighlight: rn,
|
|
1556
|
+
Chevron: nn,
|
|
1557
|
+
ChevronExpanded: on,
|
|
1558
|
+
ChevronSpacer: sn,
|
|
1559
|
+
Key: an,
|
|
1560
|
+
Colon: cn,
|
|
1561
|
+
Value: ln,
|
|
1562
|
+
Preview: un,
|
|
1563
|
+
Comma: dn
|
|
1520
1564
|
};
|
|
1521
|
-
function
|
|
1565
|
+
function Je(...e) {
|
|
1522
1566
|
return e.filter(Boolean).join(" ");
|
|
1523
1567
|
}
|
|
1524
|
-
function
|
|
1568
|
+
function xt(e) {
|
|
1525
1569
|
return e === null ? "null" : e === void 0 ? "undefined" : Array.isArray(e) ? "array" : typeof e;
|
|
1526
1570
|
}
|
|
1527
|
-
function
|
|
1571
|
+
function fn(e) {
|
|
1528
1572
|
return e === null ? "null" : e === void 0 ? "undefined" : typeof e == "string" ? JSON.stringify(e) : String(e);
|
|
1529
1573
|
}
|
|
1530
|
-
function
|
|
1574
|
+
function mn(e, t) {
|
|
1531
1575
|
return typeof e == "boolean" ? e : t < e;
|
|
1532
1576
|
}
|
|
1533
|
-
function
|
|
1534
|
-
const
|
|
1535
|
-
return !!(e.toLowerCase().includes(
|
|
1577
|
+
function Ct(e, t, r) {
|
|
1578
|
+
const n = r.toLowerCase();
|
|
1579
|
+
return !!(e.toLowerCase().includes(n) || typeof t == "string" && t.toLowerCase().includes(n) || typeof t == "number" && String(t).includes(n) || typeof t == "boolean" && String(t).includes(n));
|
|
1536
1580
|
}
|
|
1537
|
-
function
|
|
1581
|
+
function Se(e) {
|
|
1538
1582
|
return e !== null && (typeof e == "object" || typeof e == "function");
|
|
1539
1583
|
}
|
|
1540
|
-
function
|
|
1584
|
+
function Rt(e, t, r, n) {
|
|
1541
1585
|
if (!t) return !1;
|
|
1542
|
-
const c =
|
|
1543
|
-
if (c !== "object" && c !== "array" || e == null ||
|
|
1544
|
-
if (
|
|
1545
|
-
const
|
|
1546
|
-
has: (a) => a === e ||
|
|
1586
|
+
const c = xt(e);
|
|
1587
|
+
if (c !== "object" && c !== "array" || e == null || Se(e) && r.has(e)) return !1;
|
|
1588
|
+
if (Se(e) && n.has(e)) return n.get(e);
|
|
1589
|
+
const u = {
|
|
1590
|
+
has: (a) => a === e || r.has(a)
|
|
1547
1591
|
};
|
|
1548
|
-
let
|
|
1549
|
-
for (const [a,
|
|
1550
|
-
if (
|
|
1551
|
-
|
|
1592
|
+
let l = !1;
|
|
1593
|
+
for (const [a, p] of Object.entries(e))
|
|
1594
|
+
if (Ct(a, p, t) || Rt(p, t, u, n)) {
|
|
1595
|
+
l = !0;
|
|
1552
1596
|
break;
|
|
1553
1597
|
}
|
|
1554
|
-
return
|
|
1598
|
+
return Se(e) && n.set(e, l), l;
|
|
1555
1599
|
}
|
|
1556
|
-
function
|
|
1600
|
+
function St(e) {
|
|
1557
1601
|
const t = be.c(80), {
|
|
1558
|
-
nodeKey:
|
|
1559
|
-
value:
|
|
1602
|
+
nodeKey: r,
|
|
1603
|
+
value: n,
|
|
1560
1604
|
depth: c,
|
|
1561
|
-
defaultExpanded:
|
|
1562
|
-
searchQuery:
|
|
1605
|
+
defaultExpanded: u,
|
|
1606
|
+
searchQuery: l,
|
|
1563
1607
|
isLast: a,
|
|
1564
|
-
ancestors:
|
|
1608
|
+
ancestors: p,
|
|
1565
1609
|
searchCache: g
|
|
1566
1610
|
} = e;
|
|
1567
1611
|
let x;
|
|
1568
|
-
t[0] !==
|
|
1569
|
-
const
|
|
1570
|
-
let
|
|
1571
|
-
t[2] !==
|
|
1572
|
-
const
|
|
1573
|
-
let
|
|
1574
|
-
t[6] !==
|
|
1575
|
-
const [
|
|
1576
|
-
let
|
|
1577
|
-
t[11] !==
|
|
1578
|
-
const U =
|
|
1579
|
-
let
|
|
1580
|
-
t[16] !==
|
|
1581
|
-
|
|
1582
|
-
},
|
|
1583
|
-
let
|
|
1612
|
+
t[0] !== n ? (x = xt(n), t[0] = n, t[1] = x) : x = t[1];
|
|
1613
|
+
const M = x, m = M === "object" || M === "array";
|
|
1614
|
+
let T;
|
|
1615
|
+
t[2] !== p || t[3] !== m || t[4] !== n ? (T = m && Se(n) && p.has(n), t[2] = p, t[3] = m, t[4] = n, t[5] = T) : T = t[5];
|
|
1616
|
+
const R = T;
|
|
1617
|
+
let H;
|
|
1618
|
+
t[6] !== u || t[7] !== c || t[8] !== R || t[9] !== m ? (H = () => m && !R && mn(u, c), t[6] = u, t[7] = c, t[8] = R, t[9] = m, t[10] = H) : H = t[10];
|
|
1619
|
+
const [N, q] = Pe(H), C = Y(!1), I = Y(!1);
|
|
1620
|
+
let W;
|
|
1621
|
+
t[11] !== p || t[12] !== g || t[13] !== l || t[14] !== n ? (W = l ? Rt(n, l, p, g) : !1, t[11] = p, t[12] = g, t[13] = l, t[14] = n, t[15] = W) : W = t[15];
|
|
1622
|
+
const U = W;
|
|
1623
|
+
let P, F;
|
|
1624
|
+
t[16] !== N || t[17] !== U || t[18] !== R || t[19] !== m || t[20] !== l ? (P = () => {
|
|
1625
|
+
l && U && m && !R && !N && (C.current || (I.current = N), C.current = !0, q(!0)), C.current && (!l || !U) && (C.current = !1, q(I.current));
|
|
1626
|
+
}, F = [l, U, m, R, N], t[16] = N, t[17] = U, t[18] = R, t[19] = m, t[20] = l, t[21] = P, t[22] = F) : (P = t[21], F = t[22]), V(P, F);
|
|
1627
|
+
let D;
|
|
1584
1628
|
e: {
|
|
1585
|
-
if (!
|
|
1586
|
-
|
|
1629
|
+
if (!m || !Se(n) || R) {
|
|
1630
|
+
D = p;
|
|
1587
1631
|
break e;
|
|
1588
1632
|
}
|
|
1589
1633
|
let G;
|
|
1590
|
-
t[23] !==
|
|
1591
|
-
has: (ce) => ce ===
|
|
1592
|
-
}, t[23] =
|
|
1634
|
+
t[23] !== p || t[24] !== n ? (G = {
|
|
1635
|
+
has: (ce) => ce === n || p.has(ce)
|
|
1636
|
+
}, t[23] = p, t[24] = n, t[25] = G) : G = t[25], D = G;
|
|
1593
1637
|
}
|
|
1594
|
-
const X =
|
|
1638
|
+
const X = D;
|
|
1595
1639
|
let ne;
|
|
1596
1640
|
e: {
|
|
1597
|
-
if (!
|
|
1641
|
+
if (!m || n === null || n === void 0 || R) {
|
|
1598
1642
|
let ce;
|
|
1599
1643
|
t[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = [], t[26] = ce) : ce = t[26], ne = ce;
|
|
1600
1644
|
break e;
|
|
1601
1645
|
}
|
|
1602
1646
|
let G;
|
|
1603
|
-
t[27] !==
|
|
1647
|
+
t[27] !== n ? (G = Object.entries(n), t[27] = n, t[28] = G) : G = t[28], ne = G;
|
|
1604
1648
|
}
|
|
1605
|
-
const
|
|
1649
|
+
const v = ne;
|
|
1606
1650
|
let s;
|
|
1607
|
-
t[29] !==
|
|
1608
|
-
|
|
1609
|
-
}, t[29] =
|
|
1610
|
-
const
|
|
1651
|
+
t[29] !== R || t[30] !== m ? (s = () => {
|
|
1652
|
+
m && !R && q(hn);
|
|
1653
|
+
}, t[29] = R, t[30] = m, t[31] = s) : s = t[31];
|
|
1654
|
+
const _ = s;
|
|
1611
1655
|
let k;
|
|
1612
|
-
t[32] !==
|
|
1613
|
-
const i = k,
|
|
1614
|
-
let
|
|
1615
|
-
t[36] !==
|
|
1616
|
-
const
|
|
1656
|
+
t[32] !== r || t[33] !== l || t[34] !== n ? (k = l && Ct(r, n, l), t[32] = r, t[33] = l, t[34] = n, t[35] = k) : k = t[35];
|
|
1657
|
+
const i = k, d = R ? "[Circular]" : m ? M === "array" ? `Array(${n.length})` : `{${v.length}}` : null, h = i && re.RowHighlight;
|
|
1658
|
+
let f;
|
|
1659
|
+
t[36] !== h ? (f = Je(re.Row, h), t[36] = h, t[37] = f) : f = t[37];
|
|
1660
|
+
const y = `${c * 16}px`;
|
|
1617
1661
|
let b;
|
|
1618
|
-
t[38] !==
|
|
1619
|
-
"--_inspector-depth-indent":
|
|
1620
|
-
}, t[38] =
|
|
1662
|
+
t[38] !== y ? (b = {
|
|
1663
|
+
"--_inspector-depth-indent": y
|
|
1664
|
+
}, t[38] = y, t[39] = b) : b = t[39];
|
|
1621
1665
|
const o = b;
|
|
1622
|
-
let
|
|
1623
|
-
t[40] !==
|
|
1624
|
-
(G.key === "Enter" || G.key === " ") && (G.preventDefault(),
|
|
1625
|
-
}, t[40] =
|
|
1626
|
-
const
|
|
1627
|
-
let
|
|
1628
|
-
t[42] !==
|
|
1629
|
-
let N;
|
|
1630
|
-
t[46] !== n ? (N = /* @__PURE__ */ T.jsx("span", { className: re.Key, children: n }), t[46] = n, t[47] = N) : N = t[47];
|
|
1666
|
+
let w;
|
|
1667
|
+
t[40] !== _ ? (w = (G) => {
|
|
1668
|
+
(G.key === "Enter" || G.key === " ") && (G.preventDefault(), _());
|
|
1669
|
+
}, t[40] = _, t[41] = w) : w = t[41];
|
|
1670
|
+
const A = m && !R ? N : void 0, j = `inspector-node-${r}`;
|
|
1671
|
+
let B;
|
|
1672
|
+
t[42] !== N || t[43] !== R || t[44] !== m ? (B = m && !R ? /* @__PURE__ */ S.jsx("span", { className: Je(re.Chevron, N && re.ChevronExpanded), children: "▸" }) : /* @__PURE__ */ S.jsx("span", { className: re.ChevronSpacer }), t[42] = N, t[43] = R, t[44] = m, t[45] = B) : B = t[45];
|
|
1631
1673
|
let O;
|
|
1632
|
-
t[
|
|
1633
|
-
let
|
|
1634
|
-
t[
|
|
1674
|
+
t[46] !== r ? (O = /* @__PURE__ */ S.jsx("span", { className: re.Key, children: r }), t[46] = r, t[47] = O) : O = t[47];
|
|
1675
|
+
let L;
|
|
1676
|
+
t[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ S.jsx("span", { className: re.Colon, children: ": " }), t[48] = L) : L = t[48];
|
|
1677
|
+
let J;
|
|
1678
|
+
t[49] !== m || t[50] !== d || t[51] !== M || t[52] !== n ? (J = m ? /* @__PURE__ */ S.jsx("span", { className: re.Preview, children: d }) : /* @__PURE__ */ S.jsx("span", { className: re.Value, "data-type": M, children: fn(n) }), t[49] = m, t[50] = d, t[51] = M, t[52] = n, t[53] = J) : J = t[53];
|
|
1635
1679
|
let Q;
|
|
1636
|
-
t[54] !==
|
|
1680
|
+
t[54] !== N || t[55] !== a ? (Q = !a && !N && /* @__PURE__ */ S.jsx("span", { className: re.Comma, children: "," }), t[54] = N, t[55] = a, t[56] = Q) : Q = t[56];
|
|
1637
1681
|
let oe;
|
|
1638
|
-
t[57] !==
|
|
1639
|
-
|
|
1640
|
-
N,
|
|
1682
|
+
t[57] !== f || t[58] !== o || t[59] !== w || t[60] !== A || t[61] !== j || t[62] !== B || t[63] !== O || t[64] !== J || t[65] !== Q || t[66] !== _ ? (oe = /* @__PURE__ */ S.jsxs("div", { className: f, style: o, onClick: _, onKeyDown: w, tabIndex: 0, role: "treeitem", "aria-expanded": A, "data-testid": j, children: [
|
|
1683
|
+
B,
|
|
1641
1684
|
O,
|
|
1642
|
-
|
|
1685
|
+
L,
|
|
1686
|
+
J,
|
|
1643
1687
|
Q
|
|
1644
|
-
] }), t[57] =
|
|
1688
|
+
] }), t[57] = f, t[58] = o, t[59] = w, t[60] = A, t[61] = j, t[62] = B, t[63] = O, t[64] = J, t[65] = Q, t[66] = _, t[67] = oe) : oe = t[67];
|
|
1645
1689
|
let le;
|
|
1646
|
-
t[68] !== X || t[69] !==
|
|
1647
|
-
const [ee,
|
|
1648
|
-
return /* @__PURE__ */
|
|
1649
|
-
}), t[68] = X, t[69] =
|
|
1690
|
+
t[68] !== X || t[69] !== u || t[70] !== c || t[71] !== v || t[72] !== N || t[73] !== g || t[74] !== l ? (le = N && v.map((G, ce) => {
|
|
1691
|
+
const [ee, Le] = G;
|
|
1692
|
+
return /* @__PURE__ */ S.jsx(St, { nodeKey: ee, value: Le, depth: c + 1, defaultExpanded: u, searchQuery: l, isLast: ce === v.length - 1, ancestors: X, searchCache: g }, ee);
|
|
1693
|
+
}), t[68] = X, t[69] = u, t[70] = c, t[71] = v, t[72] = N, t[73] = g, t[74] = l, t[75] = le) : le = t[75];
|
|
1650
1694
|
let ae;
|
|
1651
|
-
return t[76] !== c || t[77] !== oe || t[78] !== le ? (ae = /* @__PURE__ */
|
|
1695
|
+
return t[76] !== c || t[77] !== oe || t[78] !== le ? (ae = /* @__PURE__ */ S.jsxs("div", { className: re.Node, "data-depth": c, children: [
|
|
1652
1696
|
oe,
|
|
1653
1697
|
le
|
|
1654
1698
|
] }), t[76] = c, t[77] = oe, t[78] = le, t[79] = ae) : ae = t[79], ae;
|
|
1655
1699
|
}
|
|
1656
|
-
function
|
|
1700
|
+
function hn(e) {
|
|
1657
1701
|
return !e;
|
|
1658
1702
|
}
|
|
1659
|
-
const
|
|
1703
|
+
const gn = /* @__PURE__ */ new WeakSet(), pn = ve(function({
|
|
1660
1704
|
data: t,
|
|
1661
|
-
format:
|
|
1662
|
-
defaultExpanded:
|
|
1705
|
+
format: r = "json",
|
|
1706
|
+
defaultExpanded: n = 1,
|
|
1663
1707
|
searchable: c = !1,
|
|
1664
|
-
copyable:
|
|
1665
|
-
className:
|
|
1708
|
+
copyable: u = !1,
|
|
1709
|
+
className: l,
|
|
1666
1710
|
...a
|
|
1667
|
-
},
|
|
1668
|
-
const [g, x] =
|
|
1711
|
+
}, p) {
|
|
1712
|
+
const [g, x] = Pe(""), M = Ne(async () => {
|
|
1669
1713
|
try {
|
|
1670
|
-
let
|
|
1671
|
-
|
|
1714
|
+
let R;
|
|
1715
|
+
r === "yaml" ? R = Ge(t) : R = yn(t), await navigator.clipboard.writeText(R);
|
|
1672
1716
|
} catch {
|
|
1673
1717
|
}
|
|
1674
|
-
}, [t,
|
|
1675
|
-
return /* @__PURE__ */
|
|
1676
|
-
(c ||
|
|
1677
|
-
c && /* @__PURE__ */
|
|
1678
|
-
|
|
1718
|
+
}, [t, r]), m = gn, T = Ae(() => /* @__PURE__ */ new WeakMap(), [g]);
|
|
1719
|
+
return /* @__PURE__ */ S.jsxs("div", { ref: p, className: Je(re.Root, l), "data-testid": "object-inspector", "data-format": r, ...a, children: [
|
|
1720
|
+
(c || u) && /* @__PURE__ */ S.jsxs("div", { className: re.Toolbar, children: [
|
|
1721
|
+
c && /* @__PURE__ */ S.jsx("input", { className: re.SearchInput, type: "text", value: g, onChange: (R) => x(R.target.value), placeholder: "Search keys/values…", "aria-label": "Search object", "data-testid": "inspector-search" }),
|
|
1722
|
+
u && /* @__PURE__ */ S.jsx("button", { className: re.CopyButton, onClick: M, "data-testid": "inspector-copy", type: "button", children: "Copy" })
|
|
1679
1723
|
] }),
|
|
1680
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ S.jsx("div", { className: re.Tree, role: "tree", "data-testid": "inspector-tree", children: /* @__PURE__ */ S.jsx(St, { nodeKey: "root", value: t, depth: 0, defaultExpanded: n, searchQuery: g, isLast: !0, ancestors: m, searchCache: T }) })
|
|
1681
1725
|
] });
|
|
1682
1726
|
});
|
|
1683
|
-
|
|
1684
|
-
function
|
|
1727
|
+
pn.displayName = "ObjectInspector";
|
|
1728
|
+
function yn(e) {
|
|
1685
1729
|
const t = [];
|
|
1686
|
-
return JSON.stringify(e, function(
|
|
1687
|
-
if (typeof
|
|
1730
|
+
return JSON.stringify(e, function(r, n) {
|
|
1731
|
+
if (typeof n != "object" || n === null) return n;
|
|
1688
1732
|
for (; t.length > 0 && t[t.length - 1] !== this; )
|
|
1689
1733
|
t.pop();
|
|
1690
|
-
return t.includes(
|
|
1734
|
+
return t.includes(n) ? "[Circular]" : (t.push(n), n);
|
|
1691
1735
|
}, 2);
|
|
1692
1736
|
}
|
|
1693
|
-
function
|
|
1737
|
+
function Et(e) {
|
|
1694
1738
|
return !!(e === "" || /^[\s]/.test(e) || /[\s]$/.test(e) || /^[-?:,[\]{}#&*!|>'"%@`]/.test(e) || /[:\s]#|:\s|[{}[\],]/.test(e) || /^(true|false|yes|no|on|off|null|~)$/i.test(e) || /^[+-]?(\d+\.?\d*|\.inf|\.nan)$/i.test(e));
|
|
1695
1739
|
}
|
|
1696
1740
|
function Tt(e) {
|
|
1697
1741
|
return '"' + e.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r") + '"';
|
|
1698
1742
|
}
|
|
1699
|
-
function
|
|
1700
|
-
const
|
|
1743
|
+
function vn(e, t) {
|
|
1744
|
+
const r = " ".repeat(t);
|
|
1701
1745
|
return e.includes(`
|
|
1702
1746
|
`) ? `|
|
|
1703
|
-
${
|
|
1747
|
+
${r} ${e.split(`
|
|
1704
1748
|
`).join(`
|
|
1705
|
-
${
|
|
1749
|
+
${r} `)}` : Et(e) ? Tt(e) : e;
|
|
1706
1750
|
}
|
|
1707
|
-
function
|
|
1708
|
-
const
|
|
1751
|
+
function Ge(e, t = 0, r) {
|
|
1752
|
+
const n = " ".repeat(t);
|
|
1709
1753
|
if (e === null || e === void 0) return "null";
|
|
1710
|
-
if (typeof e == "string") return
|
|
1754
|
+
if (typeof e == "string") return vn(e, t);
|
|
1711
1755
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
1712
1756
|
if (typeof e == "object") {
|
|
1713
|
-
const c =
|
|
1757
|
+
const c = r ?? [];
|
|
1714
1758
|
if (c.includes(e)) return '"[Circular]"';
|
|
1715
|
-
const
|
|
1759
|
+
const u = [...c, e];
|
|
1716
1760
|
if (Array.isArray(e))
|
|
1717
|
-
return e.length === 0 ? "[]" : e.map((a) => `${
|
|
1761
|
+
return e.length === 0 ? "[]" : e.map((a) => `${n}- ${Ge(a, t + 1, u).trimStart()}`).join(`
|
|
1718
1762
|
`);
|
|
1719
|
-
const
|
|
1720
|
-
return
|
|
1721
|
-
const g =
|
|
1722
|
-
return typeof
|
|
1723
|
-
${x}` : `${
|
|
1763
|
+
const l = Object.entries(e);
|
|
1764
|
+
return l.length === 0 ? "{}" : l.map(([a, p]) => {
|
|
1765
|
+
const g = Et(a) ? Tt(a) : a, x = Ge(p, t + 1, u);
|
|
1766
|
+
return typeof p == "object" && p !== null && (Array.isArray(p) ? p.length > 0 : Object.keys(p).length > 0) ? `${n}${g}:
|
|
1767
|
+
${x}` : `${n}${g}: ${x}`;
|
|
1724
1768
|
}).join(`
|
|
1725
1769
|
`);
|
|
1726
1770
|
}
|
|
1727
1771
|
return String(e);
|
|
1728
1772
|
}
|
|
1729
|
-
var
|
|
1773
|
+
var jt;
|
|
1730
1774
|
(() => {
|
|
1731
|
-
var e = { 975: (
|
|
1775
|
+
var e = { 975: (v) => {
|
|
1732
1776
|
function s(i) {
|
|
1733
1777
|
if (typeof i != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(i));
|
|
1734
1778
|
}
|
|
1735
|
-
function
|
|
1736
|
-
for (var
|
|
1737
|
-
if (
|
|
1779
|
+
function _(i, d) {
|
|
1780
|
+
for (var h, f = "", y = 0, b = -1, o = 0, w = 0; w <= i.length; ++w) {
|
|
1781
|
+
if (w < i.length) h = i.charCodeAt(w);
|
|
1738
1782
|
else {
|
|
1739
|
-
if (
|
|
1740
|
-
|
|
1783
|
+
if (h === 47) break;
|
|
1784
|
+
h = 47;
|
|
1741
1785
|
}
|
|
1742
|
-
if (
|
|
1743
|
-
if (!(b ===
|
|
1744
|
-
if (
|
|
1745
|
-
if (
|
|
1746
|
-
var
|
|
1747
|
-
if (
|
|
1748
|
-
|
|
1786
|
+
if (h === 47) {
|
|
1787
|
+
if (!(b === w - 1 || o === 1)) if (b !== w - 1 && o === 2) {
|
|
1788
|
+
if (f.length < 2 || y !== 2 || f.charCodeAt(f.length - 1) !== 46 || f.charCodeAt(f.length - 2) !== 46) {
|
|
1789
|
+
if (f.length > 2) {
|
|
1790
|
+
var A = f.lastIndexOf("/");
|
|
1791
|
+
if (A !== f.length - 1) {
|
|
1792
|
+
A === -1 ? (f = "", y = 0) : y = (f = f.slice(0, A)).length - 1 - f.lastIndexOf("/"), b = w, o = 0;
|
|
1749
1793
|
continue;
|
|
1750
1794
|
}
|
|
1751
|
-
} else if (
|
|
1752
|
-
|
|
1795
|
+
} else if (f.length === 2 || f.length === 1) {
|
|
1796
|
+
f = "", y = 0, b = w, o = 0;
|
|
1753
1797
|
continue;
|
|
1754
1798
|
}
|
|
1755
1799
|
}
|
|
1756
|
-
|
|
1757
|
-
} else
|
|
1758
|
-
b =
|
|
1759
|
-
} else
|
|
1800
|
+
d && (f.length > 0 ? f += "/.." : f = "..", y = 2);
|
|
1801
|
+
} else f.length > 0 ? f += "/" + i.slice(b + 1, w) : f = i.slice(b + 1, w), y = w - b - 1;
|
|
1802
|
+
b = w, o = 0;
|
|
1803
|
+
} else h === 46 && o !== -1 ? ++o : o = -1;
|
|
1760
1804
|
}
|
|
1761
|
-
return
|
|
1805
|
+
return f;
|
|
1762
1806
|
}
|
|
1763
1807
|
var k = { resolve: function() {
|
|
1764
|
-
for (var i,
|
|
1765
|
-
var
|
|
1766
|
-
|
|
1808
|
+
for (var i, d = "", h = !1, f = arguments.length - 1; f >= -1 && !h; f--) {
|
|
1809
|
+
var y;
|
|
1810
|
+
f >= 0 ? y = arguments[f] : (i === void 0 && (i = process.cwd()), y = i), s(y), y.length !== 0 && (d = y + "/" + d, h = y.charCodeAt(0) === 47);
|
|
1767
1811
|
}
|
|
1768
|
-
return
|
|
1812
|
+
return d = _(d, !h), h ? d.length > 0 ? "/" + d : "/" : d.length > 0 ? d : ".";
|
|
1769
1813
|
}, normalize: function(i) {
|
|
1770
1814
|
if (s(i), i.length === 0) return ".";
|
|
1771
|
-
var
|
|
1772
|
-
return (i =
|
|
1815
|
+
var d = i.charCodeAt(0) === 47, h = i.charCodeAt(i.length - 1) === 47;
|
|
1816
|
+
return (i = _(i, !d)).length !== 0 || d || (i = "."), i.length > 0 && h && (i += "/"), d ? "/" + i : i;
|
|
1773
1817
|
}, isAbsolute: function(i) {
|
|
1774
1818
|
return s(i), i.length > 0 && i.charCodeAt(0) === 47;
|
|
1775
1819
|
}, join: function() {
|
|
1776
1820
|
if (arguments.length === 0) return ".";
|
|
1777
|
-
for (var i,
|
|
1778
|
-
var
|
|
1779
|
-
s(
|
|
1821
|
+
for (var i, d = 0; d < arguments.length; ++d) {
|
|
1822
|
+
var h = arguments[d];
|
|
1823
|
+
s(h), h.length > 0 && (i === void 0 ? i = h : i += "/" + h);
|
|
1780
1824
|
}
|
|
1781
1825
|
return i === void 0 ? "." : k.normalize(i);
|
|
1782
|
-
}, relative: function(i,
|
|
1783
|
-
if (s(i), s(
|
|
1784
|
-
for (var
|
|
1785
|
-
for (var
|
|
1786
|
-
for (var o =
|
|
1787
|
-
if (
|
|
1788
|
-
if (o >
|
|
1789
|
-
if (
|
|
1790
|
-
if (
|
|
1791
|
-
} else
|
|
1826
|
+
}, relative: function(i, d) {
|
|
1827
|
+
if (s(i), s(d), i === d || (i = k.resolve(i)) === (d = k.resolve(d))) return "";
|
|
1828
|
+
for (var h = 1; h < i.length && i.charCodeAt(h) === 47; ++h) ;
|
|
1829
|
+
for (var f = i.length, y = f - h, b = 1; b < d.length && d.charCodeAt(b) === 47; ++b) ;
|
|
1830
|
+
for (var o = d.length - b, w = y < o ? y : o, A = -1, j = 0; j <= w; ++j) {
|
|
1831
|
+
if (j === w) {
|
|
1832
|
+
if (o > w) {
|
|
1833
|
+
if (d.charCodeAt(b + j) === 47) return d.slice(b + j + 1);
|
|
1834
|
+
if (j === 0) return d.slice(b + j);
|
|
1835
|
+
} else y > w && (i.charCodeAt(h + j) === 47 ? A = j : j === 0 && (A = 0));
|
|
1792
1836
|
break;
|
|
1793
1837
|
}
|
|
1794
|
-
var
|
|
1795
|
-
if (
|
|
1796
|
-
|
|
1838
|
+
var B = i.charCodeAt(h + j);
|
|
1839
|
+
if (B !== d.charCodeAt(b + j)) break;
|
|
1840
|
+
B === 47 && (A = j);
|
|
1797
1841
|
}
|
|
1798
|
-
var
|
|
1799
|
-
for (
|
|
1800
|
-
return
|
|
1842
|
+
var O = "";
|
|
1843
|
+
for (j = h + A + 1; j <= f; ++j) j !== f && i.charCodeAt(j) !== 47 || (O.length === 0 ? O += ".." : O += "/..");
|
|
1844
|
+
return O.length > 0 ? O + d.slice(b + A) : (b += A, d.charCodeAt(b) === 47 && ++b, d.slice(b));
|
|
1801
1845
|
}, _makeLong: function(i) {
|
|
1802
1846
|
return i;
|
|
1803
1847
|
}, dirname: function(i) {
|
|
1804
1848
|
if (s(i), i.length === 0) return ".";
|
|
1805
|
-
for (var
|
|
1806
|
-
if (!
|
|
1807
|
-
|
|
1849
|
+
for (var d = i.charCodeAt(0), h = d === 47, f = -1, y = !0, b = i.length - 1; b >= 1; --b) if ((d = i.charCodeAt(b)) === 47) {
|
|
1850
|
+
if (!y) {
|
|
1851
|
+
f = b;
|
|
1808
1852
|
break;
|
|
1809
1853
|
}
|
|
1810
|
-
} else
|
|
1811
|
-
return
|
|
1812
|
-
}, basename: function(i,
|
|
1813
|
-
if (
|
|
1854
|
+
} else y = !1;
|
|
1855
|
+
return f === -1 ? h ? "/" : "." : h && f === 1 ? "//" : i.slice(0, f);
|
|
1856
|
+
}, basename: function(i, d) {
|
|
1857
|
+
if (d !== void 0 && typeof d != "string") throw new TypeError('"ext" argument must be a string');
|
|
1814
1858
|
s(i);
|
|
1815
|
-
var
|
|
1816
|
-
if (
|
|
1817
|
-
if (
|
|
1818
|
-
var o =
|
|
1819
|
-
for (
|
|
1820
|
-
var
|
|
1821
|
-
if (
|
|
1859
|
+
var h, f = 0, y = -1, b = !0;
|
|
1860
|
+
if (d !== void 0 && d.length > 0 && d.length <= i.length) {
|
|
1861
|
+
if (d.length === i.length && d === i) return "";
|
|
1862
|
+
var o = d.length - 1, w = -1;
|
|
1863
|
+
for (h = i.length - 1; h >= 0; --h) {
|
|
1864
|
+
var A = i.charCodeAt(h);
|
|
1865
|
+
if (A === 47) {
|
|
1822
1866
|
if (!b) {
|
|
1823
|
-
|
|
1867
|
+
f = h + 1;
|
|
1824
1868
|
break;
|
|
1825
1869
|
}
|
|
1826
|
-
} else
|
|
1870
|
+
} else w === -1 && (b = !1, w = h + 1), o >= 0 && (A === d.charCodeAt(o) ? --o == -1 && (y = h) : (o = -1, y = w));
|
|
1827
1871
|
}
|
|
1828
|
-
return
|
|
1872
|
+
return f === y ? y = w : y === -1 && (y = i.length), i.slice(f, y);
|
|
1829
1873
|
}
|
|
1830
|
-
for (
|
|
1874
|
+
for (h = i.length - 1; h >= 0; --h) if (i.charCodeAt(h) === 47) {
|
|
1831
1875
|
if (!b) {
|
|
1832
|
-
|
|
1876
|
+
f = h + 1;
|
|
1833
1877
|
break;
|
|
1834
1878
|
}
|
|
1835
|
-
} else
|
|
1836
|
-
return
|
|
1879
|
+
} else y === -1 && (b = !1, y = h + 1);
|
|
1880
|
+
return y === -1 ? "" : i.slice(f, y);
|
|
1837
1881
|
}, extname: function(i) {
|
|
1838
1882
|
s(i);
|
|
1839
|
-
for (var
|
|
1840
|
-
var
|
|
1841
|
-
if (
|
|
1842
|
-
else if (!
|
|
1843
|
-
|
|
1883
|
+
for (var d = -1, h = 0, f = -1, y = !0, b = 0, o = i.length - 1; o >= 0; --o) {
|
|
1884
|
+
var w = i.charCodeAt(o);
|
|
1885
|
+
if (w !== 47) f === -1 && (y = !1, f = o + 1), w === 46 ? d === -1 ? d = o : b !== 1 && (b = 1) : d !== -1 && (b = -1);
|
|
1886
|
+
else if (!y) {
|
|
1887
|
+
h = o + 1;
|
|
1844
1888
|
break;
|
|
1845
1889
|
}
|
|
1846
1890
|
}
|
|
1847
|
-
return
|
|
1891
|
+
return d === -1 || f === -1 || b === 0 || b === 1 && d === f - 1 && d === h + 1 ? "" : i.slice(d, f);
|
|
1848
1892
|
}, format: function(i) {
|
|
1849
1893
|
if (i === null || typeof i != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof i);
|
|
1850
|
-
return (function(
|
|
1851
|
-
var
|
|
1852
|
-
return
|
|
1894
|
+
return (function(d, h) {
|
|
1895
|
+
var f = h.dir || h.root, y = h.base || (h.name || "") + (h.ext || "");
|
|
1896
|
+
return f ? f === h.root ? f + y : f + "/" + y : y;
|
|
1853
1897
|
})(0, i);
|
|
1854
1898
|
}, parse: function(i) {
|
|
1855
1899
|
s(i);
|
|
1856
|
-
var
|
|
1857
|
-
if (i.length === 0) return
|
|
1858
|
-
var
|
|
1859
|
-
|
|
1860
|
-
for (var b = -1, o = 0,
|
|
1861
|
-
else if (!
|
|
1862
|
-
o =
|
|
1900
|
+
var d = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
1901
|
+
if (i.length === 0) return d;
|
|
1902
|
+
var h, f = i.charCodeAt(0), y = f === 47;
|
|
1903
|
+
y ? (d.root = "/", h = 1) : h = 0;
|
|
1904
|
+
for (var b = -1, o = 0, w = -1, A = !0, j = i.length - 1, B = 0; j >= h; --j) if ((f = i.charCodeAt(j)) !== 47) w === -1 && (A = !1, w = j + 1), f === 46 ? b === -1 ? b = j : B !== 1 && (B = 1) : b !== -1 && (B = -1);
|
|
1905
|
+
else if (!A) {
|
|
1906
|
+
o = j + 1;
|
|
1863
1907
|
break;
|
|
1864
1908
|
}
|
|
1865
|
-
return b === -1 ||
|
|
1909
|
+
return b === -1 || w === -1 || B === 0 || B === 1 && b === w - 1 && b === o + 1 ? w !== -1 && (d.base = d.name = o === 0 && y ? i.slice(1, w) : i.slice(o, w)) : (o === 0 && y ? (d.name = i.slice(1, b), d.base = i.slice(1, w)) : (d.name = i.slice(o, b), d.base = i.slice(o, w)), d.ext = i.slice(b, w)), o > 0 ? d.dir = i.slice(0, o - 1) : y && (d.dir = "/"), d;
|
|
1866
1910
|
}, sep: "/", delimiter: ":", win32: null, posix: null };
|
|
1867
|
-
k.posix = k,
|
|
1911
|
+
k.posix = k, v.exports = k;
|
|
1868
1912
|
} }, t = {};
|
|
1869
|
-
function
|
|
1870
|
-
var s = t[
|
|
1913
|
+
function r(v) {
|
|
1914
|
+
var s = t[v];
|
|
1871
1915
|
if (s !== void 0) return s.exports;
|
|
1872
|
-
var
|
|
1873
|
-
return e[
|
|
1916
|
+
var _ = t[v] = { exports: {} };
|
|
1917
|
+
return e[v](_, _.exports, r), _.exports;
|
|
1874
1918
|
}
|
|
1875
|
-
|
|
1876
|
-
for (var
|
|
1877
|
-
},
|
|
1878
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(
|
|
1919
|
+
r.d = (v, s) => {
|
|
1920
|
+
for (var _ in s) r.o(s, _) && !r.o(v, _) && Object.defineProperty(v, _, { enumerable: !0, get: s[_] });
|
|
1921
|
+
}, r.o = (v, s) => Object.prototype.hasOwnProperty.call(v, s), r.r = (v) => {
|
|
1922
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(v, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(v, "__esModule", { value: !0 });
|
|
1879
1923
|
};
|
|
1880
|
-
var
|
|
1924
|
+
var n = {};
|
|
1881
1925
|
let c;
|
|
1882
|
-
|
|
1883
|
-
const
|
|
1884
|
-
function v
|
|
1885
|
-
if (!
|
|
1886
|
-
if (
|
|
1887
|
-
if (
|
|
1888
|
-
if (
|
|
1889
|
-
if (!
|
|
1890
|
-
} else if (a.test(
|
|
1926
|
+
r.r(n), r.d(n, { URI: () => m, Utils: () => ne }), typeof process == "object" ? c = process.platform === "win32" : typeof navigator == "object" && (c = navigator.userAgent.indexOf("Windows") >= 0);
|
|
1927
|
+
const u = /^\w[\w\d+.-]*$/, l = /^\//, a = /^\/\//;
|
|
1928
|
+
function p(v, s) {
|
|
1929
|
+
if (!v.scheme && s) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${v.authority}", path: "${v.path}", query: "${v.query}", fragment: "${v.fragment}"}`);
|
|
1930
|
+
if (v.scheme && !u.test(v.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
|
|
1931
|
+
if (v.path) {
|
|
1932
|
+
if (v.authority) {
|
|
1933
|
+
if (!l.test(v.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
|
|
1934
|
+
} else if (a.test(v.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
|
|
1891
1935
|
}
|
|
1892
1936
|
}
|
|
1893
|
-
const g = "", x = "/",
|
|
1894
|
-
class
|
|
1937
|
+
const g = "", x = "/", M = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
|
|
1938
|
+
class m {
|
|
1895
1939
|
static isUri(s) {
|
|
1896
|
-
return s instanceof
|
|
1940
|
+
return s instanceof m || !!s && typeof s.authority == "string" && typeof s.fragment == "string" && typeof s.path == "string" && typeof s.query == "string" && typeof s.scheme == "string" && typeof s.fsPath == "string" && typeof s.with == "function" && typeof s.toString == "function";
|
|
1897
1941
|
}
|
|
1898
1942
|
scheme;
|
|
1899
1943
|
authority;
|
|
1900
1944
|
path;
|
|
1901
1945
|
query;
|
|
1902
1946
|
fragment;
|
|
1903
|
-
constructor(s,
|
|
1904
|
-
typeof s == "object" ? (this.scheme = s.scheme || g, this.authority = s.authority || g, this.path = s.path || g, this.query = s.query || g, this.fragment = s.fragment || g) : (this.scheme = /* @__PURE__ */ (function(
|
|
1905
|
-
return
|
|
1906
|
-
})(s,
|
|
1907
|
-
switch (
|
|
1947
|
+
constructor(s, _, k, i, d, h = !1) {
|
|
1948
|
+
typeof s == "object" ? (this.scheme = s.scheme || g, this.authority = s.authority || g, this.path = s.path || g, this.query = s.query || g, this.fragment = s.fragment || g) : (this.scheme = /* @__PURE__ */ (function(f, y) {
|
|
1949
|
+
return f || y ? f : "file";
|
|
1950
|
+
})(s, h), this.authority = _ || g, this.path = (function(f, y) {
|
|
1951
|
+
switch (f) {
|
|
1908
1952
|
case "https":
|
|
1909
1953
|
case "http":
|
|
1910
1954
|
case "file":
|
|
1911
|
-
|
|
1955
|
+
y ? y[0] !== x && (y = x + y) : y = x;
|
|
1912
1956
|
}
|
|
1913
|
-
return
|
|
1914
|
-
})(this.scheme, k || g), this.query = i || g, this.fragment =
|
|
1957
|
+
return y;
|
|
1958
|
+
})(this.scheme, k || g), this.query = i || g, this.fragment = d || g, p(this, h));
|
|
1915
1959
|
}
|
|
1916
1960
|
get fsPath() {
|
|
1917
|
-
return
|
|
1961
|
+
return C(this);
|
|
1918
1962
|
}
|
|
1919
1963
|
with(s) {
|
|
1920
1964
|
if (!s) return this;
|
|
1921
|
-
let { scheme:
|
|
1922
|
-
return
|
|
1965
|
+
let { scheme: _, authority: k, path: i, query: d, fragment: h } = s;
|
|
1966
|
+
return _ === void 0 ? _ = this.scheme : _ === null && (_ = g), k === void 0 ? k = this.authority : k === null && (k = g), i === void 0 ? i = this.path : i === null && (i = g), d === void 0 ? d = this.query : d === null && (d = g), h === void 0 ? h = this.fragment : h === null && (h = g), _ === this.scheme && k === this.authority && i === this.path && d === this.query && h === this.fragment ? this : new R(_, k, i, d, h);
|
|
1923
1967
|
}
|
|
1924
|
-
static parse(s,
|
|
1925
|
-
const k =
|
|
1926
|
-
return k ? new
|
|
1968
|
+
static parse(s, _ = !1) {
|
|
1969
|
+
const k = M.exec(s);
|
|
1970
|
+
return k ? new R(k[2] || g, P(k[4] || g), P(k[5] || g), P(k[7] || g), P(k[9] || g), _) : new R(g, g, g, g, g);
|
|
1927
1971
|
}
|
|
1928
1972
|
static file(s) {
|
|
1929
|
-
let
|
|
1973
|
+
let _ = g;
|
|
1930
1974
|
if (c && (s = s.replace(/\\/g, x)), s[0] === x && s[1] === x) {
|
|
1931
1975
|
const k = s.indexOf(x, 2);
|
|
1932
|
-
k === -1 ? (
|
|
1976
|
+
k === -1 ? (_ = s.substring(2), s = x) : (_ = s.substring(2, k), s = s.substring(k) || x);
|
|
1933
1977
|
}
|
|
1934
|
-
return new
|
|
1978
|
+
return new R("file", _, s, g, g);
|
|
1935
1979
|
}
|
|
1936
1980
|
static from(s) {
|
|
1937
|
-
const
|
|
1938
|
-
return
|
|
1981
|
+
const _ = new R(s.scheme, s.authority, s.path, s.query, s.fragment);
|
|
1982
|
+
return p(_, !0), _;
|
|
1939
1983
|
}
|
|
1940
1984
|
toString(s = !1) {
|
|
1941
|
-
return
|
|
1985
|
+
return I(this, s);
|
|
1942
1986
|
}
|
|
1943
1987
|
toJSON() {
|
|
1944
1988
|
return this;
|
|
1945
1989
|
}
|
|
1946
1990
|
static revive(s) {
|
|
1947
1991
|
if (s) {
|
|
1948
|
-
if (s instanceof
|
|
1992
|
+
if (s instanceof m) return s;
|
|
1949
1993
|
{
|
|
1950
|
-
const
|
|
1951
|
-
return
|
|
1994
|
+
const _ = new R(s);
|
|
1995
|
+
return _._formatted = s.external, _._fsPath = s._sep === T ? s.fsPath : null, _;
|
|
1952
1996
|
}
|
|
1953
1997
|
}
|
|
1954
1998
|
return s;
|
|
1955
1999
|
}
|
|
1956
2000
|
}
|
|
1957
|
-
const
|
|
1958
|
-
class
|
|
2001
|
+
const T = c ? 1 : void 0;
|
|
2002
|
+
class R extends m {
|
|
1959
2003
|
_formatted = null;
|
|
1960
2004
|
_fsPath = null;
|
|
1961
2005
|
get fsPath() {
|
|
1962
|
-
return this._fsPath || (this._fsPath =
|
|
2006
|
+
return this._fsPath || (this._fsPath = C(this)), this._fsPath;
|
|
1963
2007
|
}
|
|
1964
2008
|
toString(s = !1) {
|
|
1965
|
-
return s ?
|
|
2009
|
+
return s ? I(this, !0) : (this._formatted || (this._formatted = I(this, !1)), this._formatted);
|
|
1966
2010
|
}
|
|
1967
2011
|
toJSON() {
|
|
1968
2012
|
const s = { $mid: 1 };
|
|
1969
|
-
return this._fsPath && (s.fsPath = this._fsPath, s._sep =
|
|
2013
|
+
return this._fsPath && (s.fsPath = this._fsPath, s._sep = T), this._formatted && (s.external = this._formatted), this.path && (s.path = this.path), this.scheme && (s.scheme = this.scheme), this.authority && (s.authority = this.authority), this.query && (s.query = this.query), this.fragment && (s.fragment = this.fragment), s;
|
|
1970
2014
|
}
|
|
1971
2015
|
}
|
|
1972
|
-
const
|
|
1973
|
-
function
|
|
2016
|
+
const H = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
|
|
2017
|
+
function N(v, s, _) {
|
|
1974
2018
|
let k, i = -1;
|
|
1975
|
-
for (let
|
|
1976
|
-
const
|
|
1977
|
-
if (
|
|
2019
|
+
for (let d = 0; d < v.length; d++) {
|
|
2020
|
+
const h = v.charCodeAt(d);
|
|
2021
|
+
if (h >= 97 && h <= 122 || h >= 65 && h <= 90 || h >= 48 && h <= 57 || h === 45 || h === 46 || h === 95 || h === 126 || s && h === 47 || _ && h === 91 || _ && h === 93 || _ && h === 58) i !== -1 && (k += encodeURIComponent(v.substring(i, d)), i = -1), k !== void 0 && (k += v.charAt(d));
|
|
1978
2022
|
else {
|
|
1979
|
-
k === void 0 && (k =
|
|
1980
|
-
const
|
|
1981
|
-
|
|
2023
|
+
k === void 0 && (k = v.substr(0, d));
|
|
2024
|
+
const f = H[h];
|
|
2025
|
+
f !== void 0 ? (i !== -1 && (k += encodeURIComponent(v.substring(i, d)), i = -1), k += f) : i === -1 && (i = d);
|
|
1982
2026
|
}
|
|
1983
2027
|
}
|
|
1984
|
-
return i !== -1 && (k += encodeURIComponent(
|
|
2028
|
+
return i !== -1 && (k += encodeURIComponent(v.substring(i))), k !== void 0 ? k : v;
|
|
1985
2029
|
}
|
|
1986
|
-
function
|
|
2030
|
+
function q(v) {
|
|
1987
2031
|
let s;
|
|
1988
|
-
for (let
|
|
1989
|
-
const k =
|
|
1990
|
-
k === 35 || k === 63 ? (s === void 0 && (s =
|
|
2032
|
+
for (let _ = 0; _ < v.length; _++) {
|
|
2033
|
+
const k = v.charCodeAt(_);
|
|
2034
|
+
k === 35 || k === 63 ? (s === void 0 && (s = v.substr(0, _)), s += H[k]) : s !== void 0 && (s += v[_]);
|
|
1991
2035
|
}
|
|
1992
|
-
return s !== void 0 ? s :
|
|
2036
|
+
return s !== void 0 ? s : v;
|
|
1993
2037
|
}
|
|
1994
|
-
function
|
|
1995
|
-
let
|
|
1996
|
-
return
|
|
2038
|
+
function C(v, s) {
|
|
2039
|
+
let _;
|
|
2040
|
+
return _ = v.authority && v.path.length > 1 && v.scheme === "file" ? `//${v.authority}${v.path}` : v.path.charCodeAt(0) === 47 && (v.path.charCodeAt(1) >= 65 && v.path.charCodeAt(1) <= 90 || v.path.charCodeAt(1) >= 97 && v.path.charCodeAt(1) <= 122) && v.path.charCodeAt(2) === 58 ? v.path[1].toLowerCase() + v.path.substr(2) : v.path, c && (_ = _.replace(/\//g, "\\")), _;
|
|
1997
2041
|
}
|
|
1998
|
-
function
|
|
1999
|
-
const
|
|
2000
|
-
let k = "", { scheme: i, authority:
|
|
2001
|
-
if (i && (k += i, k += ":"), (
|
|
2002
|
-
let b =
|
|
2042
|
+
function I(v, s) {
|
|
2043
|
+
const _ = s ? q : N;
|
|
2044
|
+
let k = "", { scheme: i, authority: d, path: h, query: f, fragment: y } = v;
|
|
2045
|
+
if (i && (k += i, k += ":"), (d || i === "file") && (k += x, k += x), d) {
|
|
2046
|
+
let b = d.indexOf("@");
|
|
2003
2047
|
if (b !== -1) {
|
|
2004
|
-
const o =
|
|
2005
|
-
|
|
2048
|
+
const o = d.substr(0, b);
|
|
2049
|
+
d = d.substr(b + 1), b = o.lastIndexOf(":"), b === -1 ? k += _(o, !1, !1) : (k += _(o.substr(0, b), !1, !1), k += ":", k += _(o.substr(b + 1), !1, !0)), k += "@";
|
|
2006
2050
|
}
|
|
2007
|
-
|
|
2051
|
+
d = d.toLowerCase(), b = d.lastIndexOf(":"), b === -1 ? k += _(d, !1, !0) : (k += _(d.substr(0, b), !1, !0), k += d.substr(b));
|
|
2008
2052
|
}
|
|
2009
|
-
if (
|
|
2010
|
-
if (
|
|
2011
|
-
const b =
|
|
2012
|
-
b >= 65 && b <= 90 && (
|
|
2013
|
-
} else if (
|
|
2014
|
-
const b =
|
|
2015
|
-
b >= 65 && b <= 90 && (
|
|
2053
|
+
if (h) {
|
|
2054
|
+
if (h.length >= 3 && h.charCodeAt(0) === 47 && h.charCodeAt(2) === 58) {
|
|
2055
|
+
const b = h.charCodeAt(1);
|
|
2056
|
+
b >= 65 && b <= 90 && (h = `/${String.fromCharCode(b + 32)}:${h.substr(3)}`);
|
|
2057
|
+
} else if (h.length >= 2 && h.charCodeAt(1) === 58) {
|
|
2058
|
+
const b = h.charCodeAt(0);
|
|
2059
|
+
b >= 65 && b <= 90 && (h = `${String.fromCharCode(b + 32)}:${h.substr(2)}`);
|
|
2016
2060
|
}
|
|
2017
|
-
k +=
|
|
2061
|
+
k += _(h, !0, !1);
|
|
2018
2062
|
}
|
|
2019
|
-
return
|
|
2063
|
+
return f && (k += "?", k += _(f, !1, !1)), y && (k += "#", k += s ? y : N(y, !1, !1)), k;
|
|
2020
2064
|
}
|
|
2021
|
-
function
|
|
2065
|
+
function W(v) {
|
|
2022
2066
|
try {
|
|
2023
|
-
return decodeURIComponent(
|
|
2067
|
+
return decodeURIComponent(v);
|
|
2024
2068
|
} catch {
|
|
2025
|
-
return
|
|
2069
|
+
return v.length > 3 ? v.substr(0, 3) + W(v.substr(3)) : v;
|
|
2026
2070
|
}
|
|
2027
2071
|
}
|
|
2028
2072
|
const U = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
|
|
2029
|
-
function
|
|
2030
|
-
return
|
|
2073
|
+
function P(v) {
|
|
2074
|
+
return v.match(U) ? v.replace(U, ((s) => W(s))) : v;
|
|
2031
2075
|
}
|
|
2032
|
-
var
|
|
2033
|
-
const
|
|
2076
|
+
var F = r(975);
|
|
2077
|
+
const D = F.posix || F, X = "/";
|
|
2034
2078
|
var ne;
|
|
2035
|
-
(function(
|
|
2036
|
-
|
|
2037
|
-
return s.with({ path:
|
|
2038
|
-
},
|
|
2079
|
+
(function(v) {
|
|
2080
|
+
v.joinPath = function(s, ..._) {
|
|
2081
|
+
return s.with({ path: D.join(s.path, ..._) });
|
|
2082
|
+
}, v.resolvePath = function(s, ..._) {
|
|
2039
2083
|
let k = s.path, i = !1;
|
|
2040
2084
|
k[0] !== X && (k = X + k, i = !0);
|
|
2041
|
-
let
|
|
2042
|
-
return i &&
|
|
2043
|
-
},
|
|
2085
|
+
let d = D.resolve(k, ..._);
|
|
2086
|
+
return i && d[0] === X && !s.authority && (d = d.substring(1)), s.with({ path: d });
|
|
2087
|
+
}, v.dirname = function(s) {
|
|
2044
2088
|
if (s.path.length === 0 || s.path === X) return s;
|
|
2045
|
-
let
|
|
2046
|
-
return
|
|
2047
|
-
},
|
|
2048
|
-
return
|
|
2049
|
-
},
|
|
2050
|
-
return
|
|
2089
|
+
let _ = D.dirname(s.path);
|
|
2090
|
+
return _.length === 1 && _.charCodeAt(0) === 46 && (_ = ""), s.with({ path: _ });
|
|
2091
|
+
}, v.basename = function(s) {
|
|
2092
|
+
return D.basename(s.path);
|
|
2093
|
+
}, v.extname = function(s) {
|
|
2094
|
+
return D.extname(s.path);
|
|
2051
2095
|
};
|
|
2052
|
-
})(ne || (ne = {})),
|
|
2096
|
+
})(ne || (ne = {})), jt = n;
|
|
2053
2097
|
})();
|
|
2054
|
-
const { URI:
|
|
2055
|
-
function
|
|
2098
|
+
const { URI: me, Utils: so } = jt;
|
|
2099
|
+
function bn(e) {
|
|
2056
2100
|
return e === 4 ? 1 : e === 3 ? 2 : e === 2 ? 4 : 8;
|
|
2057
2101
|
}
|
|
2058
|
-
function
|
|
2102
|
+
function wn(e) {
|
|
2059
2103
|
return e;
|
|
2060
2104
|
}
|
|
2061
|
-
function
|
|
2105
|
+
function _n(e) {
|
|
2062
2106
|
return {
|
|
2063
2107
|
start: { line: e.startLineNumber - 1, character: e.startColumn - 1 },
|
|
2064
2108
|
end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
|
|
@@ -2072,263 +2116,263 @@ function K(e) {
|
|
|
2072
2116
|
endColumn: e.end.character + 1
|
|
2073
2117
|
};
|
|
2074
2118
|
}
|
|
2075
|
-
function
|
|
2119
|
+
function kn(e) {
|
|
2076
2120
|
return {
|
|
2077
2121
|
...K(e.location.range),
|
|
2078
2122
|
message: e.message,
|
|
2079
|
-
resource:
|
|
2123
|
+
resource: me.parse(e.location.uri)
|
|
2080
2124
|
};
|
|
2081
2125
|
}
|
|
2082
|
-
function
|
|
2126
|
+
function Mt(e) {
|
|
2083
2127
|
const t = {
|
|
2084
2128
|
...K(e.range),
|
|
2085
2129
|
message: e.message,
|
|
2086
|
-
severity: e.severity ?
|
|
2130
|
+
severity: e.severity ? bn(e.severity) : 8
|
|
2087
2131
|
};
|
|
2088
|
-
return e.code != null && (t.code = e.codeDescription == null ? String(e.code) : { value: String(e.code), target:
|
|
2132
|
+
return e.code != null && (t.code = e.codeDescription == null ? String(e.code) : { value: String(e.code), target: me.parse(e.codeDescription.href) }), e.relatedInformation && (t.relatedInformation = e.relatedInformation.map(kn)), e.tags && (t.tags = e.tags.map(wn)), e.source != null && (t.source = e.source), t;
|
|
2089
2133
|
}
|
|
2090
|
-
function
|
|
2134
|
+
function Xe(e) {
|
|
2091
2135
|
return {
|
|
2092
2136
|
range: K(e.range),
|
|
2093
2137
|
text: e.newText
|
|
2094
2138
|
};
|
|
2095
2139
|
}
|
|
2096
|
-
function
|
|
2140
|
+
function xn(e) {
|
|
2097
2141
|
const t = {};
|
|
2098
2142
|
return e.ignoreIfExists != null && (t.ignoreIfExists = e.ignoreIfExists), e.ignoreIfNotExists != null && (t.ignoreIfNotExists = e.ignoreIfNotExists), e.overwrite != null && (t.overwrite = e.overwrite), e.recursive != null && (t.recursive = e.recursive), t;
|
|
2099
2143
|
}
|
|
2100
|
-
function
|
|
2101
|
-
const t = e.kind === "create" ? { newResource:
|
|
2102
|
-
oldResource:
|
|
2103
|
-
newResource:
|
|
2144
|
+
function Cn(e) {
|
|
2145
|
+
const t = e.kind === "create" ? { newResource: me.parse(e.uri) } : e.kind === "delete" ? { oldResource: me.parse(e.uri) } : {
|
|
2146
|
+
oldResource: me.parse(e.oldUri),
|
|
2147
|
+
newResource: me.parse(e.newUri)
|
|
2104
2148
|
};
|
|
2105
|
-
return e.options && (t.options =
|
|
2149
|
+
return e.options && (t.options = xn(e.options)), t;
|
|
2106
2150
|
}
|
|
2107
|
-
function
|
|
2151
|
+
function gt(e, t, r) {
|
|
2108
2152
|
return {
|
|
2109
|
-
resource:
|
|
2110
|
-
versionId:
|
|
2111
|
-
textEdit:
|
|
2153
|
+
resource: me.parse(t),
|
|
2154
|
+
versionId: r,
|
|
2155
|
+
textEdit: Xe(e)
|
|
2112
2156
|
};
|
|
2113
2157
|
}
|
|
2114
|
-
function
|
|
2158
|
+
function Rn(e) {
|
|
2115
2159
|
var t;
|
|
2116
|
-
const
|
|
2160
|
+
const r = [];
|
|
2117
2161
|
if (e.changes)
|
|
2118
|
-
for (const [
|
|
2119
|
-
for (const
|
|
2120
|
-
|
|
2162
|
+
for (const [n, c] of Object.entries(e.changes))
|
|
2163
|
+
for (const u of c)
|
|
2164
|
+
r.push(gt(u, n));
|
|
2121
2165
|
if (e.documentChanges)
|
|
2122
|
-
for (const
|
|
2123
|
-
if ("textDocument" in
|
|
2124
|
-
for (const c of
|
|
2125
|
-
|
|
2166
|
+
for (const n of e.documentChanges)
|
|
2167
|
+
if ("textDocument" in n)
|
|
2168
|
+
for (const c of n.edits)
|
|
2169
|
+
r.push(gt(c, n.textDocument.uri, (t = n.textDocument.version) !== null && t !== void 0 ? t : void 0));
|
|
2126
2170
|
else
|
|
2127
|
-
|
|
2171
|
+
r.push(Cn(n));
|
|
2128
2172
|
return {
|
|
2129
|
-
edits:
|
|
2173
|
+
edits: r
|
|
2130
2174
|
};
|
|
2131
2175
|
}
|
|
2132
|
-
function
|
|
2176
|
+
function Sn(e) {
|
|
2133
2177
|
const t = {
|
|
2134
2178
|
title: e.title,
|
|
2135
2179
|
isPreferred: e.isPreferred
|
|
2136
2180
|
};
|
|
2137
|
-
return e.diagnostics && (t.diagnostics = e.diagnostics.map(
|
|
2181
|
+
return e.diagnostics && (t.diagnostics = e.diagnostics.map(Mt)), e.disabled && (t.disabled = e.disabled.reason), e.edit && (t.edit = Rn(e.edit)), e.isPreferred != null && (t.isPreferred = e.isPreferred), e.kind && (t.kind = e.kind), t;
|
|
2138
2182
|
}
|
|
2139
|
-
function
|
|
2183
|
+
function En(e) {
|
|
2140
2184
|
const t = {
|
|
2141
2185
|
title: e.title,
|
|
2142
2186
|
id: e.command
|
|
2143
2187
|
};
|
|
2144
2188
|
return e.arguments && (t.arguments = e.arguments), t;
|
|
2145
2189
|
}
|
|
2146
|
-
function
|
|
2190
|
+
function Tn(e) {
|
|
2147
2191
|
return e === 1 ? 18 : e === 2 ? 0 : e === 3 ? 1 : e === 4 ? 2 : e === 5 ? 3 : e === 6 ? 4 : e === 7 ? 5 : e === 8 ? 7 : e === 9 ? 8 : e === 10 ? 9 : e === 11 ? 12 : e === 12 ? 13 : e === 13 ? 15 : e === 14 ? 17 : e === 15 ? 27 : e === 16 ? 19 : e === 17 ? 20 : e === 18 ? 21 : e === 19 ? 23 : e === 20 ? 16 : e === 21 ? 14 : e === 22 ? 6 : e === 23 ? 10 : e === 24 ? 11 : 24;
|
|
2148
2192
|
}
|
|
2149
|
-
function
|
|
2193
|
+
function jn(e) {
|
|
2150
2194
|
return e;
|
|
2151
2195
|
}
|
|
2152
|
-
function
|
|
2196
|
+
function At(e) {
|
|
2153
2197
|
return {
|
|
2154
2198
|
value: e.value
|
|
2155
2199
|
};
|
|
2156
2200
|
}
|
|
2157
|
-
function
|
|
2201
|
+
function Mn(e) {
|
|
2158
2202
|
return {
|
|
2159
2203
|
range: K(e.range),
|
|
2160
2204
|
text: e.newText
|
|
2161
2205
|
};
|
|
2162
2206
|
}
|
|
2163
|
-
function
|
|
2207
|
+
function An(e) {
|
|
2164
2208
|
return "range" in e ? K(e.range) : "insert" in e && "replace" in e ? {
|
|
2165
2209
|
insert: K(e.insert),
|
|
2166
2210
|
replace: K(e.replace)
|
|
2167
2211
|
} : K(e);
|
|
2168
2212
|
}
|
|
2169
|
-
function
|
|
2170
|
-
var
|
|
2171
|
-
const a = (
|
|
2172
|
-
let
|
|
2173
|
-
|
|
2174
|
-
const
|
|
2175
|
-
insertText:
|
|
2176
|
-
kind: e.kind == null ? 18 :
|
|
2213
|
+
function Nn(e, t) {
|
|
2214
|
+
var r, n, c, u, l;
|
|
2215
|
+
const a = (r = t.itemDefaults) !== null && r !== void 0 ? r : {}, p = (n = e.textEdit) !== null && n !== void 0 ? n : a.editRange, g = (c = e.commitCharacters) !== null && c !== void 0 ? c : a.commitCharacters, x = (u = e.insertTextFormat) !== null && u !== void 0 ? u : a.insertTextFormat, M = (l = e.insertTextMode) !== null && l !== void 0 ? l : a.insertTextMode;
|
|
2216
|
+
let m = e.insertText, T;
|
|
2217
|
+
p ? (T = An(p), "newText" in p && (m = p.newText)) : T = { ...t.range };
|
|
2218
|
+
const R = {
|
|
2219
|
+
insertText: m ?? e.label,
|
|
2220
|
+
kind: e.kind == null ? 18 : Tn(e.kind),
|
|
2177
2221
|
label: e.label,
|
|
2178
|
-
range:
|
|
2222
|
+
range: T
|
|
2179
2223
|
};
|
|
2180
|
-
return e.additionalTextEdits && (
|
|
2224
|
+
return e.additionalTextEdits && (R.additionalTextEdits = e.additionalTextEdits.map(Mn)), e.command && (R.command = En(e.command)), g && (R.commitCharacters = g), e.detail != null && (R.detail = e.detail), typeof e.documentation == "string" ? R.documentation = e.documentation : e.documentation && (R.documentation = At(e.documentation)), e.filterText != null && (R.filterText = e.filterText), x === 2 ? R.insertTextRules = 4 : M === 2 && (R.insertTextRules = 1), e.preselect != null && (R.preselect = e.preselect), e.sortText != null && (R.sortText = e.sortText), e.tags && (R.tags = e.tags.map(jn)), R;
|
|
2181
2225
|
}
|
|
2182
|
-
function
|
|
2226
|
+
function On(e, t) {
|
|
2183
2227
|
return {
|
|
2184
2228
|
incomplete: !!e.isIncomplete,
|
|
2185
|
-
suggestions: e.items.map((
|
|
2229
|
+
suggestions: e.items.map((r) => Nn(r, { range: t.range, itemDefaults: e.itemDefaults }))
|
|
2186
2230
|
};
|
|
2187
2231
|
}
|
|
2188
|
-
function
|
|
2232
|
+
function Pn(e) {
|
|
2189
2233
|
return e === 1 ? 0 : e === 2 ? 1 : e === 3 ? 2 : e === 4 ? 3 : e === 5 ? 4 : e === 6 ? 5 : e === 7 ? 6 : e === 8 ? 7 : e === 9 ? 8 : e === 10 ? 9 : e === 11 ? 10 : e === 12 ? 11 : e === 13 ? 12 : e === 14 ? 13 : e === 15 ? 14 : e === 16 ? 15 : e === 17 ? 16 : e === 18 ? 17 : e === 19 ? 18 : e === 20 ? 19 : e === 21 ? 20 : e === 22 ? 21 : e === 23 ? 22 : e === 24 ? 23 : e === 25 ? 24 : 25;
|
|
2190
2234
|
}
|
|
2191
|
-
function
|
|
2235
|
+
function Ln(e) {
|
|
2192
2236
|
return e;
|
|
2193
2237
|
}
|
|
2194
|
-
function
|
|
2195
|
-
var t,
|
|
2238
|
+
function Nt(e) {
|
|
2239
|
+
var t, r, n;
|
|
2196
2240
|
const c = {
|
|
2197
2241
|
detail: (t = e.detail) !== null && t !== void 0 ? t : "",
|
|
2198
|
-
kind:
|
|
2242
|
+
kind: Pn(e.kind),
|
|
2199
2243
|
name: e.name,
|
|
2200
2244
|
range: K(e.range),
|
|
2201
2245
|
selectionRange: K(e.selectionRange),
|
|
2202
|
-
tags: (
|
|
2246
|
+
tags: (n = (r = e.tags) === null || r === void 0 ? void 0 : r.map(Ln)) !== null && n !== void 0 ? n : []
|
|
2203
2247
|
};
|
|
2204
|
-
return e.children && (c.children = e.children.map(
|
|
2248
|
+
return e.children && (c.children = e.children.map(Nt)), c;
|
|
2205
2249
|
}
|
|
2206
|
-
function
|
|
2250
|
+
function Dn(e) {
|
|
2207
2251
|
const t = {
|
|
2208
2252
|
start: e.startLine + 1,
|
|
2209
2253
|
end: e.endLine + 1
|
|
2210
2254
|
};
|
|
2211
2255
|
return e.kind != null && (t.kind = { value: e.kind }), t;
|
|
2212
2256
|
}
|
|
2213
|
-
function
|
|
2257
|
+
function $n(e) {
|
|
2214
2258
|
return {
|
|
2215
2259
|
insertSpaces: e.insertSpaces,
|
|
2216
2260
|
tabSize: e.tabSize
|
|
2217
2261
|
};
|
|
2218
2262
|
}
|
|
2219
|
-
function
|
|
2263
|
+
function pt(e) {
|
|
2220
2264
|
return typeof e == "string" ? { value: e } : { value: `\`\`\`${e.language}
|
|
2221
2265
|
${e.value}
|
|
2222
2266
|
\`\`\`` };
|
|
2223
2267
|
}
|
|
2224
|
-
function
|
|
2225
|
-
return typeof e == "string" || "language" in e ? [
|
|
2268
|
+
function In(e) {
|
|
2269
|
+
return typeof e == "string" || "language" in e ? [pt(e)] : Array.isArray(e) ? e.map(pt) : [At(e)];
|
|
2226
2270
|
}
|
|
2227
|
-
function
|
|
2271
|
+
function Wn(e) {
|
|
2228
2272
|
const t = {
|
|
2229
|
-
contents:
|
|
2273
|
+
contents: In(e.contents)
|
|
2230
2274
|
};
|
|
2231
2275
|
return e.range && (t.range = K(e.range)), t;
|
|
2232
2276
|
}
|
|
2233
|
-
function
|
|
2277
|
+
function Re(e) {
|
|
2234
2278
|
return { character: e.column - 1, line: e.lineNumber - 1 };
|
|
2235
2279
|
}
|
|
2236
|
-
function
|
|
2280
|
+
function Bn(e) {
|
|
2237
2281
|
const t = {
|
|
2238
2282
|
range: K(e.range)
|
|
2239
2283
|
};
|
|
2240
|
-
return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url =
|
|
2284
|
+
return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url = me.parse(e.target)), t;
|
|
2241
2285
|
}
|
|
2242
|
-
function
|
|
2286
|
+
function Hn(e) {
|
|
2243
2287
|
const t = {
|
|
2244
2288
|
range: K(e.targetRange),
|
|
2245
2289
|
targetSelectionRange: K(e.targetSelectionRange),
|
|
2246
|
-
uri:
|
|
2290
|
+
uri: me.parse(e.targetUri)
|
|
2247
2291
|
};
|
|
2248
2292
|
return e.originSelectionRange && (t.originSelectionRange = K(e.originSelectionRange)), t;
|
|
2249
2293
|
}
|
|
2250
|
-
function
|
|
2294
|
+
function Un(e) {
|
|
2251
2295
|
const t = [];
|
|
2252
|
-
let
|
|
2253
|
-
for (;
|
|
2296
|
+
let r = e;
|
|
2297
|
+
for (; r; )
|
|
2254
2298
|
t.push({
|
|
2255
|
-
range: K(
|
|
2256
|
-
}),
|
|
2299
|
+
range: K(r.range)
|
|
2300
|
+
}), r = r.parent;
|
|
2257
2301
|
return t;
|
|
2258
2302
|
}
|
|
2259
|
-
function zn(e, t,
|
|
2260
|
-
const
|
|
2261
|
-
const
|
|
2262
|
-
!
|
|
2263
|
-
},
|
|
2264
|
-
if (!c(
|
|
2303
|
+
function zn(e, t, r) {
|
|
2304
|
+
const n = /* @__PURE__ */ new Map(), c = (m) => Array.isArray(t) ? t.includes(m) : t === m, u = async (m) => {
|
|
2305
|
+
const T = m.getVersionId(), R = await r.provideMarkerData(m);
|
|
2306
|
+
!m.isDisposed() && T === m.getVersionId() && c(m.getLanguageId()) && e.editor.setModelMarkers(m, r.owner, R ?? []);
|
|
2307
|
+
}, l = (m) => {
|
|
2308
|
+
if (!c(m.getLanguageId()))
|
|
2265
2309
|
return;
|
|
2266
|
-
let
|
|
2267
|
-
const
|
|
2268
|
-
clearTimeout(
|
|
2269
|
-
|
|
2310
|
+
let T;
|
|
2311
|
+
const R = m.onDidChangeContent(() => {
|
|
2312
|
+
clearTimeout(T), T = setTimeout(() => {
|
|
2313
|
+
u(m);
|
|
2270
2314
|
}, 500);
|
|
2271
2315
|
});
|
|
2272
|
-
|
|
2316
|
+
n.set(m, {
|
|
2273
2317
|
dispose() {
|
|
2274
|
-
clearTimeout(
|
|
2318
|
+
clearTimeout(T), R.dispose();
|
|
2275
2319
|
}
|
|
2276
|
-
}),
|
|
2277
|
-
}, a = (
|
|
2278
|
-
e.editor.setModelMarkers(
|
|
2279
|
-
const
|
|
2280
|
-
|
|
2320
|
+
}), u(m);
|
|
2321
|
+
}, a = (m) => {
|
|
2322
|
+
e.editor.setModelMarkers(m, r.owner, []);
|
|
2323
|
+
const T = n.get(m);
|
|
2324
|
+
T && (T.dispose(), n.delete(m));
|
|
2281
2325
|
};
|
|
2282
|
-
function
|
|
2283
|
-
|
|
2326
|
+
function p(m, T = m.getLanguageId()) {
|
|
2327
|
+
r.doReset && c(T) && r.doReset(m);
|
|
2284
2328
|
}
|
|
2285
|
-
const g = e.editor.onDidCreateModel(
|
|
2286
|
-
a(
|
|
2287
|
-
}),
|
|
2288
|
-
a(
|
|
2329
|
+
const g = e.editor.onDidCreateModel(l), x = e.editor.onWillDisposeModel((m) => {
|
|
2330
|
+
a(m), p(m);
|
|
2331
|
+
}), M = e.editor.onDidChangeModelLanguage(({ model: m, oldLanguage: T }) => {
|
|
2332
|
+
a(m), l(m), p(m, T);
|
|
2289
2333
|
});
|
|
2290
|
-
for (const
|
|
2291
|
-
|
|
2334
|
+
for (const m of e.editor.getModels())
|
|
2335
|
+
l(m);
|
|
2292
2336
|
return {
|
|
2293
2337
|
dispose() {
|
|
2294
|
-
for (const
|
|
2295
|
-
a(
|
|
2296
|
-
g.dispose(), x.dispose(),
|
|
2338
|
+
for (const m of n.keys())
|
|
2339
|
+
a(m);
|
|
2340
|
+
g.dispose(), x.dispose(), M.dispose();
|
|
2297
2341
|
},
|
|
2298
2342
|
async revalidate() {
|
|
2299
|
-
await Promise.all(e.editor.getModels().map(
|
|
2343
|
+
await Promise.all(e.editor.getModels().map(u));
|
|
2300
2344
|
}
|
|
2301
2345
|
};
|
|
2302
2346
|
}
|
|
2303
|
-
function
|
|
2304
|
-
let { createData:
|
|
2347
|
+
function Fn(e, t) {
|
|
2348
|
+
let { createData: r, interval: n = 3e4, label: c, moduleId: u, stopWhenIdleFor: l = 12e4 } = t, a, p = 0, g = !1;
|
|
2305
2349
|
const x = () => {
|
|
2306
2350
|
a && (a.dispose(), a = void 0);
|
|
2307
|
-
},
|
|
2351
|
+
}, M = setInterval(() => {
|
|
2308
2352
|
if (!a)
|
|
2309
2353
|
return;
|
|
2310
|
-
Date.now() -
|
|
2311
|
-
},
|
|
2354
|
+
Date.now() - p > l && x();
|
|
2355
|
+
}, n);
|
|
2312
2356
|
return {
|
|
2313
2357
|
dispose() {
|
|
2314
|
-
g = !0, clearInterval(
|
|
2358
|
+
g = !0, clearInterval(M), x();
|
|
2315
2359
|
},
|
|
2316
|
-
getWorker(...
|
|
2360
|
+
getWorker(...m) {
|
|
2317
2361
|
if (g)
|
|
2318
2362
|
throw new Error("Worker manager has been disposed");
|
|
2319
|
-
return
|
|
2320
|
-
createData:
|
|
2363
|
+
return p = Date.now(), a || (a = e.editor.createWebWorker({
|
|
2364
|
+
createData: r,
|
|
2321
2365
|
label: c,
|
|
2322
|
-
moduleId:
|
|
2323
|
-
})), a.withSyncedResources(
|
|
2366
|
+
moduleId: u
|
|
2367
|
+
})), a.withSyncedResources(m);
|
|
2324
2368
|
},
|
|
2325
|
-
updateCreateData(
|
|
2326
|
-
|
|
2369
|
+
updateCreateData(m) {
|
|
2370
|
+
r = m, x();
|
|
2327
2371
|
}
|
|
2328
2372
|
};
|
|
2329
2373
|
}
|
|
2330
|
-
function
|
|
2331
|
-
const
|
|
2374
|
+
function Vn(e, t) {
|
|
2375
|
+
const r = {
|
|
2332
2376
|
completion: !0,
|
|
2333
2377
|
customTags: [],
|
|
2334
2378
|
enableSchemaRequest: !1,
|
|
@@ -2346,84 +2390,84 @@ function Un(e, t) {
|
|
|
2346
2390
|
aliases: ["YAML", "yaml", "YML", "yml"],
|
|
2347
2391
|
mimetypes: ["application/x-yaml"]
|
|
2348
2392
|
});
|
|
2349
|
-
const
|
|
2393
|
+
const n = Fn(e, {
|
|
2350
2394
|
label: "yaml",
|
|
2351
2395
|
moduleId: "monaco-yaml/yaml.worker",
|
|
2352
|
-
createData:
|
|
2353
|
-
}), c = /* @__PURE__ */ new WeakMap(),
|
|
2396
|
+
createData: r
|
|
2397
|
+
}), c = /* @__PURE__ */ new WeakMap(), u = zn(e, "yaml", {
|
|
2354
2398
|
owner: "yaml",
|
|
2355
2399
|
async provideMarkerData(a) {
|
|
2356
|
-
const g = await (await
|
|
2357
|
-
return c.set(a, g), g?.map(
|
|
2400
|
+
const g = await (await n.getWorker(a.uri)).doValidation(String(a.uri));
|
|
2401
|
+
return c.set(a, g), g?.map(Mt);
|
|
2358
2402
|
},
|
|
2359
2403
|
async doReset(a) {
|
|
2360
|
-
await (await
|
|
2404
|
+
await (await n.getWorker(a.uri)).resetSchema(String(a.uri));
|
|
2361
2405
|
}
|
|
2362
|
-
}),
|
|
2363
|
-
|
|
2364
|
-
|
|
2406
|
+
}), l = [
|
|
2407
|
+
n,
|
|
2408
|
+
u,
|
|
2365
2409
|
e.languages.registerCompletionItemProvider("yaml", {
|
|
2366
2410
|
triggerCharacters: [" ", ":"],
|
|
2367
|
-
async provideCompletionItems(a,
|
|
2368
|
-
const g = a.getWordUntilPosition(
|
|
2369
|
-
if (
|
|
2370
|
-
return
|
|
2411
|
+
async provideCompletionItems(a, p) {
|
|
2412
|
+
const g = a.getWordUntilPosition(p), M = await (await n.getWorker(a.uri)).doComplete(String(a.uri), Re(p));
|
|
2413
|
+
if (M)
|
|
2414
|
+
return On(M, {
|
|
2371
2415
|
range: {
|
|
2372
|
-
startLineNumber:
|
|
2416
|
+
startLineNumber: p.lineNumber,
|
|
2373
2417
|
startColumn: g.startColumn,
|
|
2374
|
-
endLineNumber:
|
|
2418
|
+
endLineNumber: p.lineNumber,
|
|
2375
2419
|
endColumn: g.endColumn
|
|
2376
2420
|
}
|
|
2377
2421
|
});
|
|
2378
2422
|
}
|
|
2379
2423
|
}),
|
|
2380
2424
|
e.languages.registerHoverProvider("yaml", {
|
|
2381
|
-
async provideHover(a,
|
|
2382
|
-
const x = await (await
|
|
2425
|
+
async provideHover(a, p) {
|
|
2426
|
+
const x = await (await n.getWorker(a.uri)).doHover(String(a.uri), Re(p));
|
|
2383
2427
|
if (x)
|
|
2384
|
-
return
|
|
2428
|
+
return Wn(x);
|
|
2385
2429
|
}
|
|
2386
2430
|
}),
|
|
2387
2431
|
e.languages.registerDefinitionProvider("yaml", {
|
|
2388
|
-
async provideDefinition(a,
|
|
2389
|
-
const x = await (await
|
|
2390
|
-
return x?.map(
|
|
2432
|
+
async provideDefinition(a, p) {
|
|
2433
|
+
const x = await (await n.getWorker(a.uri)).doDefinition(String(a.uri), Re(p));
|
|
2434
|
+
return x?.map(Hn);
|
|
2391
2435
|
}
|
|
2392
2436
|
}),
|
|
2393
2437
|
e.languages.registerDocumentSymbolProvider("yaml", {
|
|
2394
2438
|
displayName: "yaml",
|
|
2395
2439
|
async provideDocumentSymbols(a) {
|
|
2396
|
-
const g = await (await
|
|
2397
|
-
return g?.map(
|
|
2440
|
+
const g = await (await n.getWorker(a.uri)).findDocumentSymbols(String(a.uri));
|
|
2441
|
+
return g?.map(Nt);
|
|
2398
2442
|
}
|
|
2399
2443
|
}),
|
|
2400
2444
|
e.languages.registerDocumentFormattingEditProvider("yaml", {
|
|
2401
2445
|
displayName: "yaml",
|
|
2402
2446
|
async provideDocumentFormattingEdits(a) {
|
|
2403
|
-
const g = await (await
|
|
2404
|
-
return g?.map(
|
|
2447
|
+
const g = await (await n.getWorker(a.uri)).format(String(a.uri));
|
|
2448
|
+
return g?.map(Xe);
|
|
2405
2449
|
}
|
|
2406
2450
|
}),
|
|
2407
2451
|
e.languages.registerLinkProvider("yaml", {
|
|
2408
2452
|
async provideLinks(a) {
|
|
2409
|
-
const g = await (await
|
|
2453
|
+
const g = await (await n.getWorker(a.uri)).findLinks(String(a.uri));
|
|
2410
2454
|
if (g)
|
|
2411
2455
|
return {
|
|
2412
|
-
links: g.map(
|
|
2456
|
+
links: g.map(Bn)
|
|
2413
2457
|
};
|
|
2414
2458
|
}
|
|
2415
2459
|
}),
|
|
2416
2460
|
e.languages.registerCodeActionProvider("yaml", {
|
|
2417
|
-
async provideCodeActions(a,
|
|
2461
|
+
async provideCodeActions(a, p, g) {
|
|
2418
2462
|
var x;
|
|
2419
|
-
const
|
|
2420
|
-
diagnostics: ((x = c.get(a)) == null ? void 0 : x.filter((
|
|
2463
|
+
const m = await (await n.getWorker(a.uri)).getCodeAction(String(a.uri), _n(p), {
|
|
2464
|
+
diagnostics: ((x = c.get(a)) == null ? void 0 : x.filter((T) => p.intersectRanges(K(T.range)))) || [],
|
|
2421
2465
|
only: g.only ? [g.only] : void 0,
|
|
2422
2466
|
triggerKind: g.trigger
|
|
2423
2467
|
});
|
|
2424
|
-
if (
|
|
2468
|
+
if (m)
|
|
2425
2469
|
return {
|
|
2426
|
-
actions:
|
|
2470
|
+
actions: m.map(Sn),
|
|
2427
2471
|
dispose() {
|
|
2428
2472
|
}
|
|
2429
2473
|
};
|
|
@@ -2431,8 +2475,8 @@ function Un(e, t) {
|
|
|
2431
2475
|
}),
|
|
2432
2476
|
e.languages.registerFoldingRangeProvider("yaml", {
|
|
2433
2477
|
async provideFoldingRanges(a) {
|
|
2434
|
-
const g = await (await
|
|
2435
|
-
return g?.map(
|
|
2478
|
+
const g = await (await n.getWorker(a.uri)).getFoldingRanges(String(a.uri));
|
|
2479
|
+
return g?.map(Dn);
|
|
2436
2480
|
}
|
|
2437
2481
|
}),
|
|
2438
2482
|
e.languages.setLanguageConfiguration("yaml", {
|
|
@@ -2462,145 +2506,145 @@ function Un(e, t) {
|
|
|
2462
2506
|
e.languages.registerOnTypeFormattingEditProvider("yaml", {
|
|
2463
2507
|
autoFormatTriggerCharacters: [`
|
|
2464
2508
|
`],
|
|
2465
|
-
async provideOnTypeFormattingEdits(a,
|
|
2466
|
-
const
|
|
2509
|
+
async provideOnTypeFormattingEdits(a, p, g, x) {
|
|
2510
|
+
const m = await (await n.getWorker(a.uri)).doDocumentOnTypeFormatting(
|
|
2467
2511
|
String(a.uri),
|
|
2468
|
-
|
|
2512
|
+
Re(p),
|
|
2469
2513
|
g,
|
|
2470
|
-
|
|
2514
|
+
$n(x)
|
|
2471
2515
|
);
|
|
2472
|
-
return
|
|
2516
|
+
return m?.map(Xe);
|
|
2473
2517
|
}
|
|
2474
2518
|
}),
|
|
2475
2519
|
e.languages.registerSelectionRangeProvider("yaml", {
|
|
2476
|
-
async provideSelectionRanges(a,
|
|
2477
|
-
const x = await (await
|
|
2520
|
+
async provideSelectionRanges(a, p) {
|
|
2521
|
+
const x = await (await n.getWorker(a.uri)).getSelectionRanges(
|
|
2478
2522
|
String(a.uri),
|
|
2479
|
-
|
|
2523
|
+
p.map(Re)
|
|
2480
2524
|
);
|
|
2481
|
-
return x?.map(
|
|
2525
|
+
return x?.map(Un);
|
|
2482
2526
|
}
|
|
2483
2527
|
})
|
|
2484
2528
|
];
|
|
2485
2529
|
return {
|
|
2486
2530
|
dispose() {
|
|
2487
|
-
for (const a of
|
|
2531
|
+
for (const a of l)
|
|
2488
2532
|
a.dispose();
|
|
2489
2533
|
},
|
|
2490
2534
|
async update(a) {
|
|
2491
|
-
|
|
2535
|
+
n.updateCreateData(Object.assign(r, a)), await u.revalidate();
|
|
2492
2536
|
},
|
|
2493
2537
|
getOptions() {
|
|
2494
|
-
return
|
|
2538
|
+
return r;
|
|
2495
2539
|
}
|
|
2496
2540
|
};
|
|
2497
2541
|
}
|
|
2498
|
-
function
|
|
2542
|
+
function Yn(e) {
|
|
2499
2543
|
return new Worker("/assets/editor.worker-CpuX8TSY.js", {
|
|
2500
2544
|
name: e?.name
|
|
2501
2545
|
});
|
|
2502
2546
|
}
|
|
2503
|
-
function
|
|
2547
|
+
function qn(e) {
|
|
2504
2548
|
return new Worker("/assets/json.worker-B4VHhH6h.js", {
|
|
2505
2549
|
name: e?.name
|
|
2506
2550
|
});
|
|
2507
2551
|
}
|
|
2508
|
-
function
|
|
2552
|
+
function Jn(e) {
|
|
2509
2553
|
return new Worker("/assets/ts.worker-sl17zBDo.js", {
|
|
2510
2554
|
name: e?.name
|
|
2511
2555
|
});
|
|
2512
2556
|
}
|
|
2513
|
-
function
|
|
2557
|
+
function Gn(e) {
|
|
2514
2558
|
return new Worker("/assets/css.worker-Dmf38jDD.js", {
|
|
2515
2559
|
name: e?.name
|
|
2516
2560
|
});
|
|
2517
2561
|
}
|
|
2518
|
-
function
|
|
2562
|
+
function Xn(e) {
|
|
2519
2563
|
return new Worker("/assets/html.worker-DotaEs7v.js", {
|
|
2520
2564
|
name: e?.name
|
|
2521
2565
|
});
|
|
2522
2566
|
}
|
|
2523
|
-
function
|
|
2567
|
+
function Qn(e) {
|
|
2524
2568
|
return new Worker("/assets/yaml.worker-JJoHBMla.js", {
|
|
2525
2569
|
name: e?.name
|
|
2526
2570
|
});
|
|
2527
2571
|
}
|
|
2528
2572
|
function je(...e) {
|
|
2529
2573
|
}
|
|
2530
|
-
function
|
|
2574
|
+
function Zn(...e) {
|
|
2531
2575
|
}
|
|
2532
|
-
const
|
|
2533
|
-
if (!globalThis[
|
|
2534
|
-
globalThis[
|
|
2576
|
+
const yt = "__omniview_monaco_setup__";
|
|
2577
|
+
if (!globalThis[yt]) {
|
|
2578
|
+
globalThis[yt] = !0;
|
|
2535
2579
|
const e = self.MonacoEnvironment ?? {};
|
|
2536
2580
|
self.MonacoEnvironment = {
|
|
2537
2581
|
...e,
|
|
2538
|
-
getWorker(t,
|
|
2539
|
-
let
|
|
2582
|
+
getWorker(t, r) {
|
|
2583
|
+
let n;
|
|
2540
2584
|
try {
|
|
2541
|
-
switch (
|
|
2585
|
+
switch (r) {
|
|
2542
2586
|
case "yaml":
|
|
2543
|
-
|
|
2587
|
+
n = new Qn();
|
|
2544
2588
|
break;
|
|
2545
2589
|
case "json":
|
|
2546
|
-
|
|
2590
|
+
n = new qn();
|
|
2547
2591
|
break;
|
|
2548
2592
|
case "typescript":
|
|
2549
2593
|
case "javascript":
|
|
2550
|
-
|
|
2594
|
+
n = new Jn();
|
|
2551
2595
|
break;
|
|
2552
2596
|
case "css":
|
|
2553
2597
|
case "scss":
|
|
2554
2598
|
case "less":
|
|
2555
|
-
|
|
2599
|
+
n = new Gn();
|
|
2556
2600
|
break;
|
|
2557
2601
|
case "html":
|
|
2558
2602
|
case "handlebars":
|
|
2559
2603
|
case "razor":
|
|
2560
|
-
|
|
2604
|
+
n = new Xn();
|
|
2561
2605
|
break;
|
|
2562
2606
|
default:
|
|
2563
|
-
|
|
2607
|
+
n = new Yn();
|
|
2564
2608
|
break;
|
|
2565
2609
|
}
|
|
2566
|
-
je(`Worker created for "${
|
|
2610
|
+
je(`Worker created for "${r}" — instanceof Worker: ${n instanceof Worker}`);
|
|
2567
2611
|
} catch (c) {
|
|
2568
2612
|
throw c;
|
|
2569
2613
|
}
|
|
2570
|
-
return
|
|
2571
|
-
|
|
2572
|
-
},
|
|
2573
|
-
je(`Worker "${
|
|
2614
|
+
return n.onerror = (c) => {
|
|
2615
|
+
Zn(`Worker "${r}" error:`, c.message, "| filename:", c.filename);
|
|
2616
|
+
}, n.addEventListener("message", (c) => {
|
|
2617
|
+
je(`Worker "${r}" first message:`, JSON.stringify(c.data).slice(0, 200));
|
|
2574
2618
|
}, {
|
|
2575
2619
|
once: !0
|
|
2576
|
-
}),
|
|
2620
|
+
}), n;
|
|
2577
2621
|
}
|
|
2578
2622
|
};
|
|
2579
2623
|
try {
|
|
2580
|
-
const t =
|
|
2624
|
+
const t = Vn($, {
|
|
2581
2625
|
enableSchemaRequest: !1,
|
|
2582
2626
|
schemas: []
|
|
2583
2627
|
});
|
|
2584
|
-
je("configureMonacoYaml succeeded — handle keys:", Object.keys(t)),
|
|
2628
|
+
je("configureMonacoYaml succeeded — handle keys:", Object.keys(t)), fe._setYamlHandle(t), je("YAML handle injected into EditorSchemaRegistry");
|
|
2585
2629
|
} catch (t) {
|
|
2586
2630
|
console.error("[monaco-setup] configureMonacoYaml FAILED:", t);
|
|
2587
2631
|
}
|
|
2588
2632
|
}
|
|
2589
|
-
function
|
|
2633
|
+
function ao() {
|
|
2590
2634
|
}
|
|
2591
2635
|
export {
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2636
|
+
br as CodeEditor,
|
|
2637
|
+
Jr as CommandPalette,
|
|
2638
|
+
xr as DiffViewer,
|
|
2639
|
+
Dr as MarkdownPreview,
|
|
2596
2640
|
ge as OV_MONACO_THEME,
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2641
|
+
pn as ObjectInspector,
|
|
2642
|
+
Tr as Terminal,
|
|
2643
|
+
Oe as buildMonacoTheme,
|
|
2644
|
+
Ye as buildXtermTheme,
|
|
2645
|
+
fe as editorSchemas,
|
|
2646
|
+
io as getComputedToken,
|
|
2647
|
+
ao as setupMonacoWorkers,
|
|
2648
|
+
Ke as useEditorTheme
|
|
2605
2649
|
};
|
|
2606
2650
|
//# sourceMappingURL=index.js.map
|