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