@onerjs/code-input 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { defineComponent as mt, ref as $, computed as P, watch as Ie, nextTick as O, onMounted as ht, onBeforeUnmount as bt, openBlock as T, createElementBlock as C, normalizeStyle as te, normalizeClass as ne, createElementVNode as I, Fragment as Me, renderList as He, toDisplayString as F, createCommentVNode as z, withModifiers as gt, createTextVNode as vt } from "vue";
2
- const yt = [
1
+ import { defineComponent as bt, ref as C, computed as V, watch as Me, nextTick as j, onMounted as gt, onBeforeUnmount as vt, openBlock as T, createElementBlock as S, normalizeStyle as oe, normalizeClass as ie, createElementVNode as M, Fragment as He, renderList as Ae, toDisplayString as K, createCommentVNode as D, withModifiers as yt, createTextVNode as kt } from "vue";
2
+ const wt = [
3
3
  {
4
4
  label: "Math",
5
5
  kind: "class",
@@ -134,7 +134,7 @@ const yt = [
134
134
  kind: "function",
135
135
  detail: "(id: number) => void"
136
136
  }
137
- ], Ae = [
137
+ ], Be = [
138
138
  "break",
139
139
  "case",
140
140
  "catch",
@@ -179,7 +179,7 @@ const yt = [
179
179
  "undefined",
180
180
  "NaN",
181
181
  "Infinity"
182
- ], kt = [
182
+ ], xt = [
183
183
  "abstract",
184
184
  "any",
185
185
  "as",
@@ -209,414 +209,508 @@ const yt = [
209
209
  "type",
210
210
  "unknown"
211
211
  ];
212
- function Fe(o) {
213
- return o === "typescript" ? [...Ae, ...kt] : Ae;
212
+ function Ke(l) {
213
+ return l === "typescript" ? [...Be, ...xt] : Be;
214
214
  }
215
- function Le(o) {
216
- return new Set(Fe(o));
215
+ function Le(l) {
216
+ return new Set(Ke(l));
217
217
  }
218
- const wt = /((?:[A-Za-z_$][\w$]*\??\.)*)([A-Za-z_$][\w$]*)?$/, Be = /\b(?:const|let|var|function|class)\s+([A-Za-z_$][\w$]*)/g, xt = /^[A-Za-z_$]/;
219
- function $t(o, r) {
220
- const i = o.slice(0, r), n = wt.exec(i);
218
+ const $t = /((?:[A-Za-z_$][\w$]*\??\.)*)([A-Za-z_$][\w$]*)?$/, Oe = /\b(?:const|let|var|function|class)\s+([A-Za-z_$][\w$]*)/g, Ct = /^[A-Za-z_$]/;
219
+ function Tt(l, r) {
220
+ const a = l.slice(0, r), n = $t.exec(a);
221
221
  if (!n) return { prefix: "", chain: [] };
222
- const l = n[1] ?? "", c = n[2] ?? "", u = l.split(".").filter(Boolean).map((d) => d.replace(/\?$/, ""));
222
+ const o = n[1] ?? "", c = n[2] ?? "", u = o.split(".").filter(Boolean).map((d) => d.replace(/\?$/, ""));
223
223
  return { prefix: c, chain: u };
224
224
  }
225
- function Oe(o, r) {
226
- const i = [], n = /* @__PURE__ */ new Set();
227
- let l;
228
- for (Be.lastIndex = 0; (l = Be.exec(o)) && !(l.index >= r); ) {
229
- const c = l[1];
225
+ function Ne(l, r) {
226
+ const a = [], n = /* @__PURE__ */ new Set();
227
+ let o;
228
+ for (Oe.lastIndex = 0; (o = Oe.exec(l)) && !(o.index >= r); ) {
229
+ const c = o[1];
230
230
  if (n.has(c)) continue;
231
231
  n.add(c);
232
- const u = l[0].slice(0, l[0].indexOf(c)).trim();
233
- i.push({
232
+ const u = o[0].slice(0, o[0].indexOf(c)).trim();
233
+ a.push({
234
234
  label: c,
235
235
  kind: u === "function" ? "function" : u === "class" ? "class" : "variable",
236
236
  detail: "当前文件"
237
237
  });
238
238
  }
239
- return i;
239
+ return a;
240
240
  }
241
- function Ve(o, r) {
242
- let i = r;
243
- for (const n of o) {
244
- if (!i) return null;
245
- const l = i.find((c) => c.label === n);
246
- if (!l) return null;
247
- i = l.members ?? [];
241
+ function Ze(l, r) {
242
+ let a = r;
243
+ for (const n of l) {
244
+ if (!a) return null;
245
+ const o = a.find((c) => c.label === n);
246
+ if (!o) return null;
247
+ a = o.members ?? [];
248
248
  }
249
- return i;
249
+ return a;
250
250
  }
251
- function Tt(o, r) {
252
- const i = o.toLowerCase(), n = r.toLowerCase(), l = i.indexOf(n);
253
- if (l === 0) return 1e3 - i.length;
254
- if (l > 0) return 800 - l;
251
+ function St(l, r) {
252
+ const a = l.toLowerCase(), n = r.toLowerCase(), o = a.indexOf(n);
253
+ if (o === 0) return 1e3 - a.length;
254
+ if (o > 0) return 800 - o;
255
255
  let c = 0, u = 0, d = -1;
256
- for (let a = 0; a < i.length && c < n.length; a++)
257
- i[a] === n[c] && (d >= 0 && (u += a - d - 1), d = a, c++);
258
- return c !== n.length ? null : 400 - u - i.length;
256
+ for (let i = 0; i < a.length && c < n.length; i++)
257
+ a[i] === n[c] && (d >= 0 && (u += i - d - 1), d = i, c++);
258
+ return c !== n.length ? null : 400 - u - a.length;
259
259
  }
260
- function Ct(o, r) {
261
- if (!r) return o;
262
- const i = [];
263
- for (const n of o) {
264
- const l = Tt(n.label, r);
265
- l !== null && i.push({ item: n, score: l });
260
+ function Et(l, r) {
261
+ if (!r) return l;
262
+ const a = [];
263
+ for (const n of l) {
264
+ const o = St(n.label, r);
265
+ o !== null && a.push({ item: n, score: o });
266
266
  }
267
- return i.sort((n, l) => l.score - n.score || n.item.label.localeCompare(l.item.label)), i.map((n) => n.item);
267
+ return a.sort((n, o) => o.score - n.score || n.item.label.localeCompare(o.item.label)), a.map((n) => n.item);
268
268
  }
269
- function St(o) {
270
- const r = /* @__PURE__ */ new Set(), i = [];
271
- for (const n of o)
272
- r.has(n.label) || (r.add(n.label), i.push(n));
273
- return i;
269
+ function _t(l) {
270
+ const r = /* @__PURE__ */ new Set(), a = [];
271
+ for (const n of l)
272
+ r.has(n.label) || (r.add(n.label), a.push(n));
273
+ return a;
274
274
  }
275
- function Et(o, r, i) {
276
- const { prefix: n, chain: l } = $t(o, r);
277
- if (i.auto && (!n && l.length === 0 || n && !xt.test(n)))
275
+ function Rt(l, r, a) {
276
+ const { prefix: n, chain: o } = Tt(l, r);
277
+ if (a.auto && (!n && o.length === 0 || n && !Ct.test(n)))
278
278
  return null;
279
- const c = i.declared ?? [], u = [...c, ...i.completions];
279
+ const c = a.declared ?? [], u = [...c, ...a.completions];
280
280
  let d;
281
- if (l.length > 0) {
282
- const f = Ve(l, u);
281
+ if (o.length > 0) {
282
+ const f = Ze(o, u);
283
283
  if (!f || f.length === 0) return null;
284
284
  d = f;
285
285
  } else
286
286
  d = [
287
- ...i.completions,
287
+ ...a.completions,
288
288
  ...c,
289
- ...Fe(i.language).map((f) => ({
289
+ ...Ke(a.language).map((f) => ({
290
290
  label: f,
291
291
  kind: "keyword"
292
292
  }))
293
293
  ];
294
- const a = Ct(St(d), n);
295
- return a.length === 0 ? null : {
296
- items: a,
294
+ const i = Et(_t(d), n);
295
+ return i.length === 0 ? null : {
296
+ items: i,
297
297
  start: r - n.length,
298
298
  end: r
299
299
  };
300
300
  }
301
- const _t = /([A-Za-z_$][\w$]*(?:\??\.[A-Za-z_$][\w$]*)*)\??\.\s*$/;
302
- function Rt(o, r, i, n) {
303
- const l = o.slice(r, i);
304
- if (!l) return null;
305
- const c = [...n.declared ?? [], ...n.completions], u = _t.exec(o.slice(0, r));
301
+ const It = /([A-Za-z_$][\w$]*(?:\??\.[A-Za-z_$][\w$]*)*)\??\.\s*$/;
302
+ function Mt(l, r, a, n) {
303
+ const o = l.slice(r, a);
304
+ if (!o) return null;
305
+ const c = [...n.declared ?? [], ...n.completions], u = It.exec(l.slice(0, r));
306
306
  if (u) {
307
- const d = u[1].split(".").filter(Boolean).map((b) => b.replace(/\?$/, "")), a = Ve(d, c), f = a == null ? void 0 : a.find((b) => b.label === l);
307
+ const d = u[1].split(".").filter(Boolean).map((_) => _.replace(/\?$/, "")), i = Ze(d, c), f = i == null ? void 0 : i.find((_) => _.label === o);
308
308
  if (f) return f;
309
309
  }
310
- return c.find((d) => d.label === l) ?? null;
310
+ return c.find((d) => d.label === o) ?? null;
311
311
  }
312
- const V = "[A-Za-z_$][\\w$]*", Ne = "(?:readonly\\s+|public\\s+|private\\s+|protected\\s+|static\\s+|abstract\\s+)*";
313
- function We(o, r) {
314
- let i = 0, n = !1, l = r;
315
- for (let c = r; c < o.length; c++) {
316
- const u = o[c];
312
+ const Z = "[A-Za-z_$][\\w$]*", je = "(?:readonly\\s+|public\\s+|private\\s+|protected\\s+|static\\s+|abstract\\s+)*";
313
+ function ze(l, r) {
314
+ let a = 0, n = !1, o = r;
315
+ for (let c = r; c < l.length; c++) {
316
+ const u = l[c];
317
317
  for (let d = 0; d < u.length; d++) {
318
- const a = u[d];
319
- a === "{" ? (i++, n = !0) : a === "}" && i--;
318
+ const i = u[d];
319
+ i === "{" ? (a++, n = !0) : i === "}" && a--;
320
320
  }
321
- if (n && i <= 0) {
322
- l = c;
321
+ if (n && a <= 0) {
322
+ o = c;
323
323
  break;
324
324
  }
325
325
  }
326
- return { end: l, body: o.slice(r + 1, l) };
326
+ return { end: o, body: l.slice(r + 1, o) };
327
+ }
328
+ function De(l) {
329
+ return l.trim().replace(/[,;]$/, "").trim();
327
330
  }
328
- function ze(o) {
329
- return o.trim().replace(/[,;]$/, "").trim();
331
+ function U(l) {
332
+ return l.length ? l.join(`
333
+ `).replace(/^\s*\/\*\*?/, "").replace(/\*\/\s*$/, "").split(`
334
+ `).map((r) => r.replace(/^\s*\*+\s?/, "").replace(/^\s*\/\/\s?/, "")).join(`
335
+ `).replace(/\n{3,}/g, `
336
+
337
+ `).trim() : "";
330
338
  }
331
- function De(o) {
332
- const r = [], i = /* @__PURE__ */ new Set(), n = new RegExp(`^${Ne}(${V})(\\?)?\\s*\\((.*)\\)\\s*:\\s*(.+?);?$`), l = new RegExp(`^${Ne}(${V})(\\?)?\\s*:\\s*(.+?);?$`);
333
- for (const c of o) {
334
- const u = c.trim();
335
- if (!u || u.startsWith("//") || u.startsWith("/*") || u.startsWith("*") || u.startsWith("}"))
339
+ function We(l) {
340
+ return l.split(`
341
+ `).filter((r) => !/^\s*(\/\/|\/\*|\*)/.test(r)).join(`
342
+ `).replace(/\n{2,}/g, `
343
+ `).trim();
344
+ }
345
+ function Pe(l) {
346
+ const r = [], a = /* @__PURE__ */ new Set(), n = new RegExp(`^${je}(${Z})(\\?)?\\s*\\((.*)\\)\\s*:\\s*(.+?);?$`), o = new RegExp(`^${je}(${Z})(\\?)?\\s*:\\s*(.+?);?$`);
347
+ let c = [], u = !1;
348
+ for (const d of l) {
349
+ const i = d.trim();
350
+ if (u) {
351
+ c.push(i), i.includes("*/") && (u = !1);
336
352
  continue;
337
- const d = n.exec(u);
338
- if (d) {
339
- const f = d[1];
340
- if (i.has(f)) continue;
341
- i.add(f), r.push({
342
- label: f,
353
+ }
354
+ if (i.startsWith("/*")) {
355
+ c.push(i), i.includes("*/") || (u = !0);
356
+ continue;
357
+ }
358
+ if (i.startsWith("//")) {
359
+ c.push(i);
360
+ continue;
361
+ }
362
+ if (!i || i.startsWith("}") || i.startsWith("[")) {
363
+ c = [];
364
+ continue;
365
+ }
366
+ const f = n.exec(i);
367
+ if (f) {
368
+ const W = U(c);
369
+ c = [];
370
+ const g = f[1];
371
+ if (a.has(g)) continue;
372
+ a.add(g), r.push({
373
+ label: g,
343
374
  kind: "function",
344
- detail: `(${d[3].trim()}) => ${ze(d[4])}`
375
+ detail: `(${f[3].trim()}) => ${De(f[4])}`,
376
+ documentation: W || void 0
345
377
  });
346
378
  continue;
347
379
  }
348
- const a = l.exec(u);
349
- if (a) {
350
- const f = a[1];
351
- if (i.has(f)) continue;
352
- i.add(f);
353
- const b = ze(a[3]), y = /^\(|=>/.test(b) ? "function" : "property";
354
- r.push({ label: f, kind: y, detail: b });
380
+ const _ = o.exec(i);
381
+ if (_) {
382
+ const W = U(c);
383
+ c = [];
384
+ const g = _[1];
385
+ if (a.has(g)) continue;
386
+ a.add(g);
387
+ const b = De(_[3]), H = /^\(|=>/.test(b) ? "function" : "property";
388
+ r.push({
389
+ label: g,
390
+ kind: H,
391
+ detail: b,
392
+ documentation: W || void 0
393
+ });
355
394
  }
356
395
  }
357
396
  return r;
358
397
  }
359
- function Ke(o) {
360
- const r = o.replace(/\[\]/g, "").replace(/<[^>]*>/g, "").replace(/\s*\|\s*null\s*/g, "").trim(), i = new RegExp(`^(${V})$`).exec(r);
361
- return i ? i[1] : null;
398
+ function qe(l) {
399
+ const r = l.replace(/\[\]/g, "").replace(/<[^>]*>/g, "").replace(/\s*\|\s*null\s*/g, "").trim(), a = new RegExp(`^(${Z})$`).exec(r);
400
+ return a ? a[1] : null;
362
401
  }
363
- function It(o) {
364
- const r = o.trim();
402
+ function Ht(l) {
403
+ const r = l.trim();
365
404
  if (!r || r.endsWith(";")) return !1;
366
- const i = (r.match(/[(<[{]/g) ?? []).length, n = (r.match(/[)>\]}]/g) ?? []).length;
367
- return /[|&,(<]\s*$/.test(r) || i > n;
405
+ const a = (r.match(/[(<[{]/g) ?? []).length, n = (r.match(/[)>\]}]/g) ?? []).length;
406
+ return /[|&,(<]\s*$/.test(r) || a > n;
368
407
  }
369
- function Ze(o, r, i, n = 0) {
370
- return n > 6 ? o : o.map((l) => {
371
- if (l.kind !== "property" || !l.detail) return l;
372
- const c = Ke(l.detail), u = c ? r.get(c) : void 0;
373
- if (!u || i.has(u.label)) return l;
374
- const d = new Set(i);
408
+ function Ue(l, r, a, n = 0) {
409
+ return n > 6 ? l : l.map((o) => {
410
+ if (o.kind !== "property" || !o.detail) return o;
411
+ const c = qe(o.detail), u = c ? r.get(c) : void 0;
412
+ if (!u || a.has(u.label)) return o;
413
+ const d = new Set(a);
375
414
  return d.add(u.label), {
376
- ...l,
415
+ ...o,
377
416
  type: u.type,
378
- members: Ze(u.members, r, d, n + 1)
417
+ members: Ue(u.members, r, d, n + 1)
379
418
  };
380
419
  });
381
420
  }
382
- function Mt(o) {
383
- if (!o || !o.trim()) return [];
384
- const r = o.split(`
385
- `), i = /* @__PURE__ */ new Map(), n = new RegExp(`^(?:export\\s+)?(?:declare\\s+)?interface\\s+(${V})`), l = new RegExp(`^(?:export\\s+)?(?:declare\\s+)?(?:abstract\\s+)?class\\s+(${V})`), c = new RegExp(`^(?:export\\s+)?(?:declare\\s+)?type\\s+(${V})\\s*=`);
386
- for (let b = 0; b < r.length; b++) {
387
- const y = r[b].trim();
388
- if (!y || y.startsWith("//") || y.startsWith("/*") || y.startsWith("*")) continue;
389
- const A = n.exec(y);
390
- if (A && y.includes("{")) {
391
- const { end: w, body: x } = We(r, b), g = A[1];
392
- i.set(g, {
393
- label: g,
394
- type: r.slice(b, w + 1).join(`
395
- `).replace(/^\s*export\s+/, "").trim(),
396
- members: De(x),
397
- kind: "interface"
398
- }), b = w;
421
+ function At(l) {
422
+ if (!l || !l.trim()) return [];
423
+ const r = l.split(`
424
+ `), a = /* @__PURE__ */ new Map(), n = new RegExp(`^(?:export\\s+)?(?:declare\\s+)?interface\\s+(${Z})`), o = new RegExp(`^(?:export\\s+)?(?:declare\\s+)?(?:abstract\\s+)?class\\s+(${Z})`), c = new RegExp(`^(?:export\\s+)?(?:declare\\s+)?type\\s+(${Z})\\s*=`);
425
+ let u = [], d = !1;
426
+ for (let g = 0; g < r.length; g++) {
427
+ const b = r[g].trim();
428
+ if (d) {
429
+ u.push(b), b.includes("*/") && (d = !1);
399
430
  continue;
400
431
  }
401
- const L = l.exec(y);
402
- if (L && y.includes("{")) {
403
- const { end: w, body: x } = We(r, b), g = L[1];
404
- i.set(g, {
405
- label: g,
406
- type: r.slice(b, w + 1).join(`
407
- `).replace(/^\s*export\s+/, "").trim(),
408
- members: De(x),
409
- kind: "class"
410
- }), b = w;
432
+ if (b.startsWith("/*")) {
433
+ u.push(b), b.includes("*/") || (d = !0);
434
+ continue;
435
+ }
436
+ if (b.startsWith("//")) {
437
+ u.push(b);
438
+ continue;
439
+ }
440
+ if (!b) {
441
+ u = [];
411
442
  continue;
412
443
  }
413
- const S = c.exec(y);
414
- if (S) {
415
- const w = [r[b]];
416
- let x = b;
417
- for (; It(w.join(`
418
- `)) && x + 1 < r.length; )
419
- x++, w.push(r[x]);
420
- const g = w.join(`
444
+ const H = n.exec(b);
445
+ if (H && b.includes("{")) {
446
+ const k = U(u);
447
+ u = [];
448
+ const { end: w, body: E } = ze(r, g), v = H[1];
449
+ a.set(v, {
450
+ label: v,
451
+ type: We(
452
+ r.slice(g, w + 1).join(`
453
+ `).replace(/^\s*export\s+/, "")
454
+ ),
455
+ members: Pe(E),
456
+ kind: "interface",
457
+ documentation: k || void 0
458
+ }), g = w;
459
+ continue;
460
+ }
461
+ const O = o.exec(b);
462
+ if (O && b.includes("{")) {
463
+ const k = U(u);
464
+ u = [];
465
+ const { end: w, body: E } = ze(r, g), v = O[1];
466
+ a.set(v, {
467
+ label: v,
468
+ type: We(
469
+ r.slice(g, w + 1).join(`
470
+ `).replace(/^\s*export\s+/, "")
471
+ ),
472
+ members: Pe(E),
473
+ kind: "class",
474
+ documentation: k || void 0
475
+ }), g = w;
476
+ continue;
477
+ }
478
+ const A = c.exec(b);
479
+ if (A) {
480
+ const k = U(u);
481
+ u = [];
482
+ const w = [r[g]];
483
+ let E = g;
484
+ for (; Ht(w.join(`
485
+ `)) && E + 1 < r.length; )
486
+ E++, w.push(r[E]);
487
+ const v = w.join(`
421
488
  `).replace(/^\s*export\s+/, "").replace(/;\s*$/, "").trim();
422
- i.set(S[1], {
423
- label: S[1],
424
- type: g,
489
+ a.set(A[1], {
490
+ label: A[1],
491
+ type: v,
425
492
  members: [],
426
- kind: "type"
427
- }), b = x;
493
+ kind: "type",
494
+ documentation: k || void 0
495
+ }), g = E;
496
+ continue;
428
497
  }
498
+ u = [];
429
499
  }
430
- const u = [], d = /* @__PURE__ */ new Set(), a = new RegExp(
431
- `^(?:export\\s+)?(?:declare\\s+)?function\\s+(${V})\\s*\\(([^)]*)\\)\\s*:\\s*([^;{]+)`
432
- ), f = new RegExp(
433
- `^(?:export\\s+)?(?:declare\\s+)?(?:const|let|var)\\s+(${V})\\s*:\\s*([^=;]+)`
500
+ const i = [], f = /* @__PURE__ */ new Set(), _ = new RegExp(
501
+ `^(?:export\\s+)?(?:declare\\s+)?function\\s+(${Z})\\s*\\(([^)]*)\\)\\s*:\\s*([^;{]+)`
502
+ ), W = new RegExp(
503
+ `^(?:export\\s+)?(?:declare\\s+)?(?:const|let|var)\\s+(${Z})\\s*:\\s*([^=;]+)`
434
504
  );
435
- for (const b of r) {
436
- const y = b.trim();
437
- if (!y || y.startsWith("//") || y.startsWith("/*") || y.startsWith("*")) continue;
438
- const A = a.exec(y);
439
- if (A) {
440
- const S = A[1];
441
- d.has(S) || (d.add(S), u.push({
442
- label: S,
505
+ u = [], d = !1;
506
+ for (const g of r) {
507
+ const b = g.trim();
508
+ if (d) {
509
+ u.push(b), b.includes("*/") && (d = !1);
510
+ continue;
511
+ }
512
+ if (b.startsWith("/*")) {
513
+ u.push(b), b.includes("*/") || (d = !0);
514
+ continue;
515
+ }
516
+ if (b.startsWith("//")) {
517
+ u.push(b);
518
+ continue;
519
+ }
520
+ if (!b) {
521
+ u = [];
522
+ continue;
523
+ }
524
+ const H = _.exec(b);
525
+ if (H) {
526
+ const A = U(u);
527
+ u = [];
528
+ const k = H[1];
529
+ f.has(k) || (f.add(k), i.push({
530
+ label: k,
443
531
  kind: "function",
444
- detail: `(${A[2].trim()}) => ${A[3].trim()}`
532
+ detail: `(${H[2].trim()}) => ${H[3].trim()}`,
533
+ documentation: A || void 0
445
534
  }));
446
535
  continue;
447
536
  }
448
- const L = f.exec(y);
449
- if (L) {
450
- const S = L[1];
451
- if (d.has(S)) continue;
452
- d.add(S);
453
- const w = L[2].trim(), x = Ke(w), g = x ? i.get(x) : void 0, N = (g == null ? void 0 : g.kind) === "class" ? "class" : /^\(|=>/.test(w) ? "function" : "variable";
454
- u.push({
455
- label: S,
456
- kind: N,
537
+ const O = W.exec(b);
538
+ if (O) {
539
+ const A = U(u);
540
+ u = [];
541
+ const k = O[1];
542
+ if (f.has(k)) continue;
543
+ f.add(k);
544
+ const w = O[2].trim(), E = qe(w), v = E ? a.get(E) : void 0, $ = (v == null ? void 0 : v.kind) === "class" ? "class" : /^\(|=>/.test(w) ? "function" : "variable";
545
+ i.push({
546
+ label: k,
547
+ kind: $,
457
548
  detail: w,
458
- type: g == null ? void 0 : g.type,
459
- members: g ? Ze(g.members, i, /* @__PURE__ */ new Set([g.label])) : void 0
549
+ type: v == null ? void 0 : v.type,
550
+ documentation: A || (v == null ? void 0 : v.documentation) || void 0,
551
+ members: v ? Ue(v.members, a, /* @__PURE__ */ new Set([v.label])) : void 0
460
552
  });
553
+ continue;
461
554
  }
555
+ u = [];
462
556
  }
463
- return u;
557
+ return i;
464
558
  }
465
- function pe(o, r, i, n) {
466
- if (!i || !n) return null;
467
- const l = Math.max(0, r - 1), c = o.lastIndexOf(i, l);
468
- if (c === -1 || o.lastIndexOf(n, l) > c) return null;
469
- const d = o.indexOf(n, c + i.length);
559
+ function he(l, r, a, n) {
560
+ if (!a || !n) return null;
561
+ const o = Math.max(0, r - 1), c = l.lastIndexOf(a, o);
562
+ if (c === -1 || l.lastIndexOf(n, o) > c) return null;
563
+ const d = l.indexOf(n, c + a.length);
470
564
  return {
471
- start: c + i.length,
472
- end: d === -1 ? o.length : d
565
+ start: c + a.length,
566
+ end: d === -1 ? l.length : d
473
567
  };
474
568
  }
475
- function tn(o, r, i, n) {
476
- return pe(o, r, i, n) !== null;
569
+ function ln(l, r, a, n) {
570
+ return he(l, r, a, n) !== null;
477
571
  }
478
- const je = /[A-Za-z_$]/, Ht = /[\w$]/, Pe = /\s/;
479
- function le(o, r) {
480
- const i = [], n = o.length;
481
- let l = 0;
482
- for (; l < n; ) {
483
- const c = o[l], u = o[l + 1];
484
- if (Pe.test(c)) {
485
- l++;
572
+ const Fe = /[A-Za-z_$]/, Bt = /[\w$]/, Ve = /\s/;
573
+ function ae(l, r) {
574
+ const a = [], n = l.length;
575
+ let o = 0;
576
+ for (; o < n; ) {
577
+ const c = l[o], u = l[o + 1];
578
+ if (Ve.test(c)) {
579
+ o++;
486
580
  continue;
487
581
  }
488
582
  if (c === "/" && u === "/") {
489
- let a = o.indexOf(`
490
- `, l);
491
- a === -1 && (a = n), i.push({ start: l, end: a, type: "comment" }), l = a;
583
+ let i = l.indexOf(`
584
+ `, o);
585
+ i === -1 && (i = n), a.push({ start: o, end: i, type: "comment" }), o = i;
492
586
  continue;
493
587
  }
494
588
  if (c === "/" && u === "*") {
495
- const a = o.indexOf("*/", l + 2), f = a === -1 ? n : a + 2;
496
- i.push({ start: l, end: f, type: "comment" }), l = f;
589
+ const i = l.indexOf("*/", o + 2), f = i === -1 ? n : i + 2;
590
+ a.push({ start: o, end: f, type: "comment" }), o = f;
497
591
  continue;
498
592
  }
499
593
  if (c === '"' || c === "'") {
500
- let a = l + 1;
501
- for (; a < n; ) {
502
- if (o[a] === "\\") {
503
- a += 2;
594
+ let i = o + 1;
595
+ for (; i < n; ) {
596
+ if (l[i] === "\\") {
597
+ i += 2;
504
598
  continue;
505
599
  }
506
- if (o[a] === `
600
+ if (l[i] === `
507
601
  `) break;
508
- if (o[a] === c) {
509
- a++;
602
+ if (l[i] === c) {
603
+ i++;
510
604
  break;
511
605
  }
512
- a++;
606
+ i++;
513
607
  }
514
- i.push({ start: l, end: a, type: "string" }), l = a;
608
+ a.push({ start: o, end: i, type: "string" }), o = i;
515
609
  continue;
516
610
  }
517
611
  if (c === "`") {
518
- let a = l + 1;
519
- for (; a < n; ) {
520
- if (o[a] === "\\") {
521
- a += 2;
612
+ let i = o + 1;
613
+ for (; i < n; ) {
614
+ if (l[i] === "\\") {
615
+ i += 2;
522
616
  continue;
523
617
  }
524
- if (o[a] === "`") {
525
- a++;
618
+ if (l[i] === "`") {
619
+ i++;
526
620
  break;
527
621
  }
528
- a++;
622
+ i++;
529
623
  }
530
- i.push({ start: l, end: a, type: "template" }), l = a;
624
+ a.push({ start: o, end: i, type: "template" }), o = i;
531
625
  continue;
532
626
  }
533
627
  if (/[0-9]/.test(c) || c === "." && /[0-9]/.test(u ?? "")) {
534
- let a = l + 1;
535
- for (; a < n && /[\w.]/.test(o[a]); ) a++;
536
- i.push({ start: l, end: a, type: "number" }), l = a;
628
+ let i = o + 1;
629
+ for (; i < n && /[\w.]/.test(l[i]); ) i++;
630
+ a.push({ start: o, end: i, type: "number" }), o = i;
537
631
  continue;
538
632
  }
539
- if (je.test(c)) {
540
- let a = l + 1;
541
- for (; a < n && Ht.test(o[a]); ) a++;
542
- const f = o.slice(l, a), b = r.keywords.has(f) ? "keyword" : r.builtins.has(f) ? "builtin" : "identifier";
543
- i.push({ start: l, end: a, type: b }), l = a;
633
+ if (Fe.test(c)) {
634
+ let i = o + 1;
635
+ for (; i < n && Bt.test(l[i]); ) i++;
636
+ const f = l.slice(o, i), _ = r.keywords.has(f) ? "keyword" : r.builtins.has(f) ? "builtin" : "identifier";
637
+ a.push({ start: o, end: i, type: _ }), o = i;
544
638
  continue;
545
639
  }
546
- let d = l + 1;
640
+ let d = o + 1;
547
641
  for (; d < n; ) {
548
- const a = o[d];
549
- if (Pe.test(a) || je.test(a) || /[0-9]/.test(a) || a === '"' || a === "'" || a === "`" || a === "/") break;
642
+ const i = l[d];
643
+ if (Ve.test(i) || Fe.test(i) || /[0-9]/.test(i) || i === '"' || i === "'" || i === "`" || i === "/") break;
550
644
  d++;
551
645
  }
552
- i.push({ start: l, end: d, type: "punctuation" }), l = d;
646
+ a.push({ start: o, end: d, type: "punctuation" }), o = d;
553
647
  }
554
- return i;
648
+ return a;
555
649
  }
556
- const At = {
650
+ const Lt = {
557
651
  "&": "&amp;",
558
652
  "<": "&lt;",
559
653
  ">": "&gt;"
560
654
  };
561
- function Z(o) {
562
- return o.replace(/[&<>]/g, (r) => At[r] ?? r);
655
+ function Y(l) {
656
+ return l.replace(/[&<>]/g, (r) => Lt[r] ?? r);
563
657
  }
564
- function oe(o, r, i = 0) {
565
- let n = "", l = 0;
658
+ function se(l, r, a = 0) {
659
+ let n = "", o = 0;
566
660
  for (const c of r) {
567
- c.start > l && (n += Z(o.slice(l, c.start)));
568
- const u = Z(o.slice(c.start, c.end));
569
- n += `<span class="tok-${c.type}" data-start="${c.start + i}" data-end="${c.end + i}">${u}</span>`, l = c.end;
661
+ c.start > o && (n += Y(l.slice(o, c.start)));
662
+ const u = Y(l.slice(c.start, c.end));
663
+ n += `<span class="tok-${c.type}" data-start="${c.start + a}" data-end="${c.end + a}">${u}</span>`, o = c.end;
570
664
  }
571
- return l < o.length && (n += Z(o.slice(l))), n;
665
+ return o < l.length && (n += Y(l.slice(o))), n;
572
666
  }
573
- function Lt(o, r, i, n) {
574
- if (!i || !n) return oe(o, le(o, r));
575
- let l = "", c = 0;
576
- for (; c < o.length; ) {
577
- const u = o.indexOf(i, c);
667
+ function Ot(l, r, a, n) {
668
+ if (!a || !n) return se(l, ae(l, r));
669
+ let o = "", c = 0;
670
+ for (; c < l.length; ) {
671
+ const u = l.indexOf(a, c);
578
672
  if (u === -1) {
579
- l += Z(o.slice(c));
673
+ o += Y(l.slice(c));
580
674
  break;
581
675
  }
582
- l += Z(o.slice(c, u));
583
- const d = o.indexOf(n, u + i.length), a = d === -1 ? o.length : d, f = o.slice(u + i.length, a);
584
- l += `<span class="tok-brace">${Z(i)}</span>`, l += oe(f, le(f, r), u + i.length), d === -1 ? c = a : (l += `<span class="tok-brace">${Z(n)}</span>`, c = d + n.length);
676
+ o += Y(l.slice(c, u));
677
+ const d = l.indexOf(n, u + a.length), i = d === -1 ? l.length : d, f = l.slice(u + a.length, i);
678
+ o += `<span class="tok-brace">${Y(a)}</span>`, o += se(f, ae(f, r), u + a.length), d === -1 ? c = i : (o += `<span class="tok-brace">${Y(n)}</span>`, c = d + n.length);
585
679
  }
586
- return l;
680
+ return o;
587
681
  }
588
- const Bt = {
682
+ const Nt = {
589
683
  key: 0,
590
684
  class: "gutter",
591
685
  "aria-hidden": "true"
592
- }, Ot = ["innerHTML"], Nt = ["value", "readonly", "placeholder"], Wt = ["onMouseenter", "onClick"], zt = { class: "popup-label" }, Dt = {
686
+ }, jt = ["innerHTML"], zt = ["value", "readonly", "placeholder"], Dt = ["onMouseenter", "onClick"], Wt = { class: "popup-label" }, Pt = {
593
687
  key: 0,
594
688
  class: "popup-detail"
595
- }, jt = { class: "hover-head" }, Pt = { class: "hover-name" }, Ft = {
689
+ }, Ft = { class: "hover-head" }, Vt = { class: "hover-name" }, Kt = {
596
690
  key: 0,
597
691
  class: "hover-colon"
598
- }, Vt = {
692
+ }, Zt = {
599
693
  key: 0,
600
694
  class: "hover-type"
601
- }, Kt = {
695
+ }, qt = {
602
696
  key: 0,
603
697
  class: "hover-doc"
604
- }, Zt = {
698
+ }, Ut = {
605
699
  key: 1,
606
700
  class: "hover-def"
607
- }, qt = ["innerHTML"], Ut = ["title", "aria-label"], Yt = {
701
+ }, Yt = ["innerHTML"], Jt = ["title", "aria-label"], Gt = {
608
702
  key: 0,
609
703
  viewBox: "0 0 16 16",
610
704
  width: "14",
611
705
  height: "14",
612
706
  "aria-hidden": "true"
613
- }, Jt = {
707
+ }, Xt = {
614
708
  key: 1,
615
709
  viewBox: "0 0 16 16",
616
710
  width: "14",
617
711
  height: "14",
618
712
  "aria-hidden": "true"
619
- }, Gt = /* @__PURE__ */ mt({
713
+ }, Qt = /* @__PURE__ */ bt({
620
714
  __name: "CodeEditor",
621
715
  props: {
622
716
  modelValue: {},
@@ -639,8 +733,8 @@ const Bt = {
639
733
  minHeight: { default: "260px" }
640
734
  },
641
735
  emits: ["update:modelValue", "change", "expand", "collapse"],
642
- setup(o, { expose: r, emit: i }) {
643
- const n = o, l = i, c = {
736
+ setup(l, { expose: r, emit: a }) {
737
+ const n = l, o = a, c = {
644
738
  variable: "变量",
645
739
  function: "函数",
646
740
  property: "属性",
@@ -661,90 +755,90 @@ const Bt = {
661
755
  "End",
662
756
  "PageUp",
663
757
  "PageDown"
664
- ]), a = $(n.modelValue), f = $(), b = $(), y = $(), A = $(), L = $(), S = $(), w = $(), x = $([]), g = $(0), N = $(!1), ie = $({ start: 0, end: 0 }), me = $({}), E = $(null), he = $({}), qe = P(
665
- () => n.tsTypes ? Mt(n.tsTypes) : []
666
- ), be = P(() => [
667
- ...yt,
668
- ...qe.value,
758
+ ]), i = C(n.modelValue), f = C(), _ = C(), W = C(), g = C(), b = C(), H = C(), O = C(), A = C([]), k = C(0), w = C(!1), E = C({ start: 0, end: 0 }), v = C({}), $ = C(null), be = C({}), Ye = V(
759
+ () => n.tsTypes ? At(n.tsTypes) : []
760
+ ), ge = V(() => [
761
+ ...wt,
762
+ ...Ye.value,
669
763
  ...n.completions
670
- ]), ae = P(
671
- () => n.mode === "template" ? [...n.templateCompletions, ...be.value] : be.value
672
- ), Ue = P(() => {
764
+ ]), re = V(
765
+ () => n.mode === "template" ? [...n.templateCompletions, ...ge.value] : ge.value
766
+ ), Je = V(() => {
673
767
  const e = {
674
768
  keywords: Le(n.language),
675
- builtins: new Set(ae.value.map((t) => t.label))
769
+ builtins: new Set(re.value.map((t) => t.label))
676
770
  };
677
- return n.mode === "template" ? `${Lt(a.value, e, n.templateOpen, n.templateClose)}
678
- ` : `${oe(a.value, le(a.value, e))}
771
+ return n.mode === "template" ? `${Ot(i.value, e, n.templateOpen, n.templateClose)}
772
+ ` : `${se(i.value, ae(i.value, e))}
679
773
  `;
680
- }), Ye = P(() => a.value.split(`
681
- `).length), W = $(n.defaultExpanded), q = P(() => n.collapsible && !W.value), Je = P(() => q.value ? { "--ce-collapsed-height": n.collapsedHeight } : { height: n.minHeight }), Ge = P(
682
- () => q.value ? { height: n.collapsedHeight } : {}
774
+ }), Ge = V(() => i.value.split(`
775
+ `).length), z = C(n.defaultExpanded), J = V(() => n.collapsible && !z.value), Xe = V(() => J.value ? { "--ce-collapsed-height": n.collapsedHeight } : { height: n.minHeight }), Qe = V(
776
+ () => J.value ? { height: n.collapsedHeight } : {}
683
777
  );
684
- let ge = 0;
685
- function ve(e) {
686
- if (W.value === e) return;
778
+ let ve = 0;
779
+ function ye(e) {
780
+ if (z.value === e) return;
687
781
  const t = f.value;
688
- e && t && (ge = t.scrollTop), W.value = e, l(e ? "expand" : "collapse"), _(), H(), O(() => {
689
- if (se(), !W.value && t) {
782
+ e && t && (ve = t.scrollTop), z.value = e, o(e ? "expand" : "collapse"), R(), L(), j(() => {
783
+ if (ce(), !z.value && t) {
690
784
  const s = Math.max(0, t.scrollHeight - t.clientHeight);
691
- t.scrollTop = Math.max(0, Math.min(ge, s)), B(!0), document.activeElement === t && Y();
785
+ t.scrollTop = Math.max(0, Math.min(ve, s)), N(!0), document.activeElement === t && X();
692
786
  return;
693
787
  }
694
- B(!0), e && n.collapseOnBlur && t && document.activeElement !== t && t.focus();
788
+ N(!0), e && n.collapseOnBlur && t && document.activeElement !== t && t.focus();
695
789
  });
696
790
  }
697
- function Xe() {
698
- ve(!W.value);
791
+ function et() {
792
+ ye(!z.value);
699
793
  }
700
- Ie(
794
+ Me(
701
795
  () => n.modelValue,
702
796
  (e) => {
703
- e !== a.value && (a.value = e, _());
797
+ e !== i.value && (i.value = e, R());
704
798
  }
705
- ), Ie(a, () => {
706
- O(() => B(!0));
799
+ ), Me(i, () => {
800
+ j(() => N(!0));
707
801
  });
708
- function ye(e) {
802
+ function ke(e) {
709
803
  return c[e];
710
804
  }
711
- function Qe(e) {
712
- return e ? oe(
805
+ function tt(e) {
806
+ return e ? se(
713
807
  e,
714
- le(e, { keywords: Le("typescript"), builtins: /* @__PURE__ */ new Set() })
808
+ ae(e, { keywords: Le("typescript"), builtins: /* @__PURE__ */ new Set() })
715
809
  ) : "";
716
810
  }
717
- let U = { top: 14, bottom: 14, lineHeight: 22 };
718
- function se() {
811
+ let G = { top: 14, bottom: 14, lineHeight: 22 };
812
+ function ce() {
719
813
  const e = f.value;
720
814
  if (!e) return;
721
815
  const t = window.getComputedStyle(e);
722
- U = {
816
+ G = {
723
817
  top: parseFloat(t.paddingTop) || 0,
724
818
  bottom: parseFloat(t.paddingBottom) || 0,
725
819
  lineHeight: parseFloat(t.lineHeight) || 22
726
820
  };
727
821
  }
728
- function B(e = !1) {
822
+ function N(e = !1) {
729
823
  const t = f.value;
730
824
  if (!t) return;
731
- const s = A.value;
732
- if (s && (s.style.transform = `translate(${-t.scrollLeft}px, ${-t.scrollTop}px)`), L.value && (L.value.style.transform = `translateY(${-t.scrollTop}px)`), e) {
733
- const m = `${a.value}|${n.mode}|${t.clientWidth}|${t.clientHeight}`;
734
- m !== we && (we = m, et());
825
+ const s = g.value;
826
+ if (s && (s.style.transform = `translate(${-t.scrollLeft}px, ${-t.scrollTop}px)`), b.value && (b.value.style.transform = `translateY(${-t.scrollTop}px)`), e) {
827
+ const m = `${i.value}|${n.mode}|${t.clientWidth}|${t.clientHeight}`;
828
+ m !== xe && (xe = m, nt());
735
829
  }
736
830
  }
737
- function Y() {
831
+ function X() {
738
832
  const e = f.value;
739
- if (!e || !q.value) return;
740
- const t = xe();
833
+ if (!e || !J.value) return;
834
+ const t = $e();
741
835
  if (!t) return;
742
- const s = e.clientHeight - U.top - U.bottom, h = t.top + e.scrollTop - U.top - Math.max(0, (s - t.lineHeight) / 2), p = Math.max(0, e.scrollHeight - e.clientHeight), k = Math.max(0, Math.min(h, p));
743
- Math.abs(k - e.scrollTop) > 0.5 && (e.scrollTop = k, B());
836
+ const s = e.clientHeight - G.top - G.bottom, h = t.top + e.scrollTop - G.top - Math.max(0, (s - t.lineHeight) / 2), p = Math.max(0, e.scrollHeight - e.clientHeight), x = Math.max(0, Math.min(h, p));
837
+ Math.abs(x - e.scrollTop) > 0.5 && (e.scrollTop = x, N());
744
838
  }
745
- let ke = [], we = "", Q = 0, re = -1, ce = -1, ue = { x: 0, y: 0 };
746
- function et() {
747
- const e = f.value, t = y.value;
839
+ let we = [], xe = "", ne = 0, ue = -1, de = -1, fe = { x: 0, y: 0 };
840
+ function nt() {
841
+ const e = f.value, t = W.value;
748
842
  if (!e || !t) return;
749
843
  const s = e.getBoundingClientRect(), m = [];
750
844
  t.querySelectorAll("[data-start]").forEach((h) => {
@@ -757,63 +851,63 @@ const Bt = {
757
851
  top: p.top - s.top + e.scrollTop,
758
852
  bottom: p.bottom - s.top + e.scrollTop
759
853
  });
760
- }), ke = m;
854
+ }), we = m;
761
855
  }
762
- function tt(e, t) {
763
- for (const s of ke)
856
+ function lt(e, t) {
857
+ for (const s of we)
764
858
  if (e >= s.left - 1 && e <= s.right + 1 && t >= s.top && t <= s.bottom)
765
859
  return s;
766
860
  return null;
767
861
  }
768
- function H() {
769
- E.value = null, Q = 0, re = -1, ce = -1;
862
+ function L() {
863
+ $.value = null, ne = 0, ue = -1, de = -1;
770
864
  }
771
- function nt(e) {
772
- const t = w.value, s = f.value;
865
+ function ot(e) {
866
+ const t = O.value, s = f.value;
773
867
  if (!t || !s) return;
774
- const m = s.getBoundingClientRect(), h = m.left + e.left - s.scrollLeft, p = m.left + e.right - s.scrollLeft, k = m.top + e.top - s.scrollTop, v = m.top + e.bottom - s.scrollTop, R = 12, M = 8, D = t.offsetWidth, G = t.offsetHeight;
775
- let j = h, K = v + M;
776
- j + D > window.innerWidth - R && (j = p - D), K + G > window.innerHeight - R && (K = k - G - M), j = Math.max(R, Math.min(j, window.innerWidth - R - D)), K = Math.max(R, K), he.value = { left: `${j}px`, top: `${K}px` };
868
+ const m = s.getBoundingClientRect(), h = m.left + e.left - s.scrollLeft, p = m.left + e.right - s.scrollLeft, x = m.top + e.top - s.scrollTop, y = m.top + e.bottom - s.scrollTop, I = 12, B = 8, P = t.offsetWidth, ee = t.offsetHeight;
869
+ let F = h, q = y + B;
870
+ F + P > window.innerWidth - I && (F = p - P), q + ee > window.innerHeight - I && (q = x - ee - B), F = Math.max(I, Math.min(F, window.innerWidth - I - P)), q = Math.max(I, q), be.value = { left: `${F}px`, top: `${q}px` };
777
871
  }
778
- function lt(e, t) {
872
+ function it(e, t) {
779
873
  const s = f.value;
780
- if (!s || n.readonly || !n.hover || N.value) {
781
- H();
874
+ if (!s || n.readonly || !n.hover || w.value) {
875
+ L();
782
876
  return;
783
877
  }
784
878
  if (s.selectionStart !== s.selectionEnd) {
785
- H();
879
+ L();
786
880
  return;
787
881
  }
788
- const m = w.value;
789
- if (E.value && m) {
790
- const v = m.getBoundingClientRect();
791
- if (e >= v.left && e <= v.right && t >= v.top && t <= v.bottom)
882
+ const m = O.value;
883
+ if ($.value && m) {
884
+ const y = m.getBoundingClientRect();
885
+ if (e >= y.left && e <= y.right && t >= y.top && t <= y.bottom)
792
886
  return;
793
887
  }
794
- const h = s.getBoundingClientRect(), p = tt(e - h.left + s.scrollLeft, t - h.top + s.scrollTop);
888
+ const h = s.getBoundingClientRect(), p = lt(e - h.left + s.scrollLeft, t - h.top + s.scrollTop);
795
889
  if (!p) {
796
- H();
890
+ L();
797
891
  return;
798
892
  }
799
- if (E.value && re === p.start && ce === p.end)
893
+ if ($.value && ue === p.start && de === p.end)
800
894
  return;
801
- const k = Rt(s.value, p.start, p.end, {
802
- completions: ae.value,
803
- declared: Oe(s.value, p.start)
895
+ const x = Mt(s.value, p.start, p.end, {
896
+ completions: re.value,
897
+ declared: Ne(s.value, p.start)
804
898
  });
805
- if (!k) {
806
- H();
899
+ if (!x) {
900
+ L();
807
901
  return;
808
902
  }
809
- E.value = k, re = p.start, ce = p.end, O(() => nt(p));
903
+ $.value = x, ue = p.start, de = p.end, j(() => ot(p));
810
904
  }
811
- function ot(e) {
812
- ue = { x: e.clientX, y: e.clientY }, !Q && (Q = requestAnimationFrame(() => {
813
- Q = 0, lt(ue.x, ue.y);
905
+ function at(e) {
906
+ fe = { x: e.clientX, y: e.clientY }, !ne && (ne = requestAnimationFrame(() => {
907
+ ne = 0, it(fe.x, fe.y);
814
908
  }));
815
909
  }
816
- function xe() {
910
+ function $e() {
817
911
  const e = f.value;
818
912
  if (!e) return null;
819
913
  const t = window.getComputedStyle(e), s = document.createElement("div"), m = parseFloat(t.paddingLeft) || 0, h = parseFloat(t.paddingRight) || 0, p = e.getBoundingClientRect();
@@ -844,161 +938,161 @@ const Bt = {
844
938
  textTransform: t.textTransform,
845
939
  tabSize: t.tabSize
846
940
  }), s.textContent = e.value.slice(0, e.selectionStart);
847
- const k = document.createElement("span");
848
- k.textContent = "​", s.appendChild(k), document.body.appendChild(s);
849
- const v = k.getBoundingClientRect();
941
+ const x = document.createElement("span");
942
+ x.textContent = "​", s.appendChild(x), document.body.appendChild(s);
943
+ const y = x.getBoundingClientRect();
850
944
  document.body.removeChild(s);
851
- const R = parseFloat(t.lineHeight) || 22, M = v.height, D = M > 0 && M < R ? (R - M) / 2 : 0;
945
+ const I = parseFloat(t.lineHeight) || 22, B = y.height, P = B > 0 && B < I ? (I - B) / 2 : 0;
852
946
  return {
853
- left: v.left - p.left - e.scrollLeft,
854
- top: v.top - p.top - e.scrollTop - D,
855
- lineHeight: R
947
+ left: y.left - p.left - e.scrollLeft,
948
+ top: y.top - p.top - e.scrollTop - P,
949
+ lineHeight: I
856
950
  };
857
951
  }
858
- async function it() {
859
- await O();
860
- const e = b.value, t = S.value, s = xe();
952
+ async function st() {
953
+ await j();
954
+ const e = _.value, t = H.value, s = $e();
861
955
  if (!e || !t || !s) return;
862
- const m = 4, h = 8, p = window.innerWidth, k = window.innerHeight, v = e.getBoundingClientRect(), R = t.scrollHeight, M = k - (v.top + s.top + s.lineHeight) - m - h, D = v.top + s.top - m - h, G = M >= Math.min(R, 180) || M >= D, j = Math.min(248, Math.max(G ? M : D, 96)), K = Math.min(R, j), Re = t.offsetWidth || 280;
863
- let X = s.left;
864
- v.left + X + Re > p - h && (X = p - h - Re - v.left), X = Math.max(X, h - v.left), me.value = {
865
- left: `${X}px`,
866
- top: `${G ? s.top + s.lineHeight + m : s.top - m - K}px`,
867
- maxHeight: `${j}px`
956
+ const m = 4, h = 8, p = window.innerWidth, x = window.innerHeight, y = e.getBoundingClientRect(), I = t.scrollHeight, B = x - (y.top + s.top + s.lineHeight) - m - h, P = y.top + s.top - m - h, ee = B >= Math.min(I, 180) || B >= P, F = Math.min(248, Math.max(ee ? B : P, 96)), q = Math.min(I, F), Ie = t.offsetWidth || 280;
957
+ let te = s.left;
958
+ y.left + te + Ie > p - h && (te = p - h - Ie - y.left), te = Math.max(te, h - y.left), v.value = {
959
+ left: `${te}px`,
960
+ top: `${ee ? s.top + s.lineHeight + m : s.top - m - q}px`,
961
+ maxHeight: `${F}px`
868
962
  };
869
963
  }
870
- function _() {
871
- N.value = !1, x.value = [], g.value = 0, H();
964
+ function R() {
965
+ w.value = !1, A.value = [], k.value = 0, L();
872
966
  }
873
- function J(e = !1) {
967
+ function Q(e = !1) {
874
968
  const t = f.value;
875
969
  if (!t || n.readonly) return;
876
970
  if (t.selectionStart !== t.selectionEnd) {
877
- _();
971
+ R();
878
972
  return;
879
973
  }
880
974
  const s = t.selectionStart;
881
975
  let m = !e;
882
976
  if (n.mode === "template") {
883
- const p = pe(
977
+ const p = he(
884
978
  t.value,
885
979
  s,
886
980
  n.templateOpen,
887
981
  n.templateClose
888
982
  );
889
983
  if (!p) {
890
- _();
984
+ R();
891
985
  return;
892
986
  }
893
987
  e && t.value.slice(p.start, s).trim() === "" && (m = !0);
894
988
  }
895
- const h = Et(t.value, s, {
989
+ const h = Rt(t.value, s, {
896
990
  language: n.language,
897
- completions: ae.value,
898
- declared: Oe(t.value, s),
991
+ completions: re.value,
992
+ declared: Ne(t.value, s),
899
993
  auto: !m
900
994
  });
901
995
  if (!h) {
902
- _();
996
+ R();
903
997
  return;
904
998
  }
905
- x.value = h.items, ie.value = { start: h.start, end: h.end }, g.value = 0, N.value = !0, it();
999
+ A.value = h.items, E.value = { start: h.start, end: h.end }, k.value = 0, w.value = !0, st();
906
1000
  }
907
- function at(e) {
908
- a.value = e, l("update:modelValue", e), l("change", e);
1001
+ function rt(e) {
1002
+ i.value = e, o("update:modelValue", e), o("change", e);
909
1003
  }
910
- function ee(e, t, s, m = e + s.length) {
1004
+ function le(e, t, s, m = e + s.length) {
911
1005
  const h = f.value;
912
1006
  if (!h) return;
913
1007
  const p = h.value.slice(0, e) + s + h.value.slice(t);
914
- at(p), _(), O(() => {
915
- h.value = p, h.setSelectionRange(m, m), h.focus(), B(!0), Y();
1008
+ rt(p), R(), j(() => {
1009
+ h.value = p, h.setSelectionRange(m, m), h.focus(), N(!0), X();
916
1010
  });
917
1011
  }
918
- function $e(e = x.value[g.value]) {
1012
+ function Ce(e = A.value[k.value]) {
919
1013
  if (!e) return;
920
1014
  const t = e.insertText ?? e.label;
921
- ee(ie.value.start, ie.value.end, t), _();
1015
+ le(E.value.start, E.value.end, t), R();
922
1016
  }
923
1017
  function Te(e) {
924
- const t = x.value.length;
925
- t && (g.value = (g.value + e + t) % t, O(() => {
1018
+ const t = A.value.length;
1019
+ t && (k.value = (k.value + e + t) % t, j(() => {
926
1020
  var s, m;
927
- (m = (s = S.value) == null ? void 0 : s.querySelector(".is-active")) == null || m.scrollIntoView({ block: "nearest" });
1021
+ (m = (s = H.value) == null ? void 0 : s.querySelector(".is-active")) == null || m.scrollIntoView({ block: "nearest" });
928
1022
  }));
929
1023
  }
930
- function st(e) {
1024
+ function ct(e) {
931
1025
  const t = e.target;
932
- a.value = t.value, l("update:modelValue", t.value), l("change", t.value), H(), B(), O(Y), J(!0);
1026
+ i.value = t.value, o("update:modelValue", t.value), o("change", t.value), L(), N(), j(X), Q(!0);
933
1027
  }
934
- function rt(e) {
935
- if (_(), H(), !n.collapsible || !n.collapseOnBlur || !W.value) return;
1028
+ function ut(e) {
1029
+ if (R(), L(), !n.collapsible || !n.collapseOnBlur || !z.value) return;
936
1030
  const t = e.relatedTarget;
937
- t && t.closest(".expand-toggle") || ve(!1);
1031
+ t && t.closest(".expand-toggle") || ye(!1);
938
1032
  }
939
- function ct() {
940
- Ce(), Y();
1033
+ function dt() {
1034
+ Se(), X();
941
1035
  }
942
- function Ce() {
1036
+ function Se() {
943
1037
  const e = f.value;
944
1038
  if (!e || n.readonly) return;
945
1039
  if (e.selectionStart !== e.selectionEnd) {
946
- _();
1040
+ R();
947
1041
  return;
948
1042
  }
949
1043
  const t = e.selectionStart;
950
1044
  if (t > 0 && e.value[t - 1] === ".") {
951
- J(!0);
1045
+ Q(!0);
952
1046
  return;
953
1047
  }
954
1048
  if (n.mode === "template") {
955
- const s = pe(
1049
+ const s = he(
956
1050
  e.value,
957
1051
  t,
958
1052
  n.templateOpen,
959
1053
  n.templateClose
960
1054
  );
961
1055
  if (s && e.value.slice(s.start, t).trim() === "") {
962
- J(!0);
1056
+ Q(!0);
963
1057
  return;
964
1058
  }
965
1059
  }
966
- _();
1060
+ R();
967
1061
  }
968
- let de = 0;
969
- function Se() {
970
- window.clearTimeout(de), de = window.setTimeout(() => {
971
- de = 0, Ce(), Y();
1062
+ let pe = 0;
1063
+ function Ee() {
1064
+ window.clearTimeout(pe), pe = window.setTimeout(() => {
1065
+ pe = 0, Se(), X();
972
1066
  }, 0);
973
1067
  }
974
- function Ee(e) {
975
- e.target !== f.value && N.value && _();
1068
+ function _e(e) {
1069
+ e.target !== f.value && w.value && R();
976
1070
  }
977
- function ut() {
978
- H(), B(), q.value && dt();
1071
+ function ft() {
1072
+ L(), N(), J.value && pt();
979
1073
  }
980
- let fe = 0;
981
- function dt() {
982
- window.clearTimeout(fe), fe = window.setTimeout(() => {
983
- fe = 0, ft();
1074
+ let me = 0;
1075
+ function pt() {
1076
+ window.clearTimeout(me), me = window.setTimeout(() => {
1077
+ me = 0, mt();
984
1078
  }, 120);
985
1079
  }
986
- function ft() {
1080
+ function mt() {
987
1081
  const e = f.value;
988
1082
  if (!e) return;
989
- const t = U.lineHeight, s = e.scrollTop, m = Math.round(s / t) * t;
990
- Math.abs(m - s) < 0.5 || (e.scrollTop = m, B());
1083
+ const t = G.lineHeight, s = e.scrollTop, m = Math.round(s / t) * t;
1084
+ Math.abs(m - s) < 0.5 || (e.scrollTop = m, N());
991
1085
  }
992
- function pt(e) {
1086
+ function ht(e) {
993
1087
  var h;
994
1088
  const t = f.value;
995
1089
  if (!t) return;
996
1090
  const s = e.metaKey || e.ctrlKey, m = d.has(e.key);
997
1091
  if (e.key === " " && s) {
998
- e.preventDefault(), J(!1);
1092
+ e.preventDefault(), Q(!1);
999
1093
  return;
1000
1094
  }
1001
- if (N.value) {
1095
+ if (w.value) {
1002
1096
  if (e.key === "ArrowDown") {
1003
1097
  e.preventDefault(), Te(1);
1004
1098
  return;
@@ -1008,172 +1102,172 @@ const Bt = {
1008
1102
  return;
1009
1103
  }
1010
1104
  if (e.key === "Enter" || e.key === "Tab") {
1011
- e.preventDefault(), $e();
1105
+ e.preventDefault(), Ce();
1012
1106
  return;
1013
1107
  }
1014
1108
  if (e.key === "Escape") {
1015
- e.preventDefault(), _();
1109
+ e.preventDefault(), R();
1016
1110
  return;
1017
1111
  }
1018
1112
  if (m || s) {
1019
- _(), m && !s && Se();
1113
+ R(), m && !s && Ee();
1020
1114
  return;
1021
1115
  }
1022
1116
  }
1023
1117
  if (m && !s) {
1024
- Se();
1118
+ Ee();
1025
1119
  return;
1026
1120
  }
1027
1121
  if (e.key === "Enter" && !s && !e.shiftKey) {
1028
1122
  const p = t.selectionStart;
1029
1123
  if (p !== t.selectionEnd) return;
1030
- const k = t.value.lastIndexOf(`
1031
- `, p - 1) + 1, v = t.value.slice(k, p), R = ((h = v.match(/^[ \t]*/)) == null ? void 0 : h[0]) ?? "", M = /[{[(]$/.test(v.trimEnd()) ? " " : "";
1032
- e.preventDefault(), ee(p, p, `
1033
- ${R}${M}`);
1124
+ const x = t.value.lastIndexOf(`
1125
+ `, p - 1) + 1, y = t.value.slice(x, p), I = ((h = y.match(/^[ \t]*/)) == null ? void 0 : h[0]) ?? "", B = /[{[(]$/.test(y.trimEnd()) ? " " : "";
1126
+ e.preventDefault(), le(p, p, `
1127
+ ${I}${B}`);
1034
1128
  return;
1035
1129
  }
1036
1130
  if (e.key === "Tab") {
1037
- e.preventDefault(), ee(t.selectionStart, t.selectionEnd, " ");
1131
+ e.preventDefault(), le(t.selectionStart, t.selectionEnd, " ");
1038
1132
  return;
1039
1133
  }
1040
1134
  if (e.key.length === 1 && !s && !e.altKey && u[e.key]) {
1041
1135
  if (t.selectionStart !== t.selectionEnd) return;
1042
- const p = t.selectionStart, k = t.value[p - 1], v = t.value[p];
1043
- if ((e.key === '"' || e.key === "'") && k && /[\w$]/.test(k) || v !== void 0 && !/[\s)\]},;:]/.test(v)) return;
1044
- e.preventDefault(), ee(p, p, e.key + u[e.key], p + 1), n.mode === "template" && O(() => J(!0));
1136
+ const p = t.selectionStart, x = t.value[p - 1], y = t.value[p];
1137
+ if ((e.key === '"' || e.key === "'") && x && /[\w$]/.test(x) || y !== void 0 && !/[\s)\]},;:]/.test(y)) return;
1138
+ e.preventDefault(), le(p, p, e.key + u[e.key], p + 1), n.mode === "template" && j(() => Q(!0));
1045
1139
  }
1046
1140
  }
1047
- function _e() {
1048
- N.value && _(), H(), O(() => {
1049
- se(), B(!0);
1141
+ function Re() {
1142
+ w.value && R(), L(), j(() => {
1143
+ ce(), N(!0);
1050
1144
  });
1051
1145
  }
1052
- return ht(() => {
1053
- window.addEventListener("resize", _e), window.addEventListener("scroll", Ee, !0), O(() => {
1054
- se(), B(!0);
1146
+ return gt(() => {
1147
+ window.addEventListener("resize", Re), window.addEventListener("scroll", _e, !0), j(() => {
1148
+ ce(), N(!0);
1055
1149
  });
1056
- }), bt(() => {
1057
- window.removeEventListener("resize", _e), window.removeEventListener("scroll", Ee, !0);
1150
+ }), vt(() => {
1151
+ window.removeEventListener("resize", Re), window.removeEventListener("scroll", _e, !0);
1058
1152
  }), r({ focus: () => {
1059
1153
  var e;
1060
1154
  return (e = f.value) == null ? void 0 : e.focus();
1061
- } }), (e, t) => (T(), C("div", {
1062
- class: ne(["code-editor", {
1063
- "is-readonly": o.readonly,
1064
- "is-dark": o.theme === "dark",
1065
- "is-collapsed": q.value
1155
+ } }), (e, t) => (T(), S("div", {
1156
+ class: ie(["code-editor", {
1157
+ "is-readonly": l.readonly,
1158
+ "is-dark": l.theme === "dark",
1159
+ "is-collapsed": J.value
1066
1160
  }]),
1067
- style: te(Je.value)
1161
+ style: oe(Xe.value)
1068
1162
  }, [
1069
- o.lineNumbers && !q.value ? (T(), C("div", Bt, [
1070
- I("div", {
1163
+ l.lineNumbers && !J.value ? (T(), S("div", Nt, [
1164
+ M("div", {
1071
1165
  ref_key: "gutterInner",
1072
- ref: L,
1166
+ ref: b,
1073
1167
  class: "gutter-inner code-font"
1074
1168
  }, [
1075
- (T(!0), C(Me, null, He(Ye.value, (s) => (T(), C("div", {
1169
+ (T(!0), S(He, null, Ae(Ge.value, (s) => (T(), S("div", {
1076
1170
  key: s,
1077
1171
  class: "gutter-line"
1078
- }, F(s), 1))), 128))
1172
+ }, K(s), 1))), 128))
1079
1173
  ], 512)
1080
- ])) : z("", !0),
1081
- I("div", {
1174
+ ])) : D("", !0),
1175
+ M("div", {
1082
1176
  ref_key: "stage",
1083
- ref: b,
1177
+ ref: _,
1084
1178
  class: "stage",
1085
- style: te(Ge.value)
1179
+ style: oe(Qe.value)
1086
1180
  }, [
1087
- I("div", {
1181
+ M("div", {
1088
1182
  ref_key: "highlightLayer",
1089
- ref: y,
1183
+ ref: W,
1090
1184
  class: "highlight code-font"
1091
1185
  }, [
1092
- I("pre", {
1186
+ M("pre", {
1093
1187
  ref_key: "highlightInner",
1094
- ref: A,
1188
+ ref: g,
1095
1189
  class: "code-font"
1096
1190
  }, [
1097
- I("code", { innerHTML: Ue.value }, null, 8, Ot)
1191
+ M("code", { innerHTML: Je.value }, null, 8, jt)
1098
1192
  ], 512)
1099
1193
  ], 512),
1100
- I("textarea", {
1194
+ M("textarea", {
1101
1195
  ref_key: "textarea",
1102
1196
  ref: f,
1103
1197
  class: "code-font input",
1104
- value: a.value,
1105
- readonly: o.readonly,
1106
- placeholder: o.placeholder,
1198
+ value: i.value,
1199
+ readonly: l.readonly,
1200
+ placeholder: l.placeholder,
1107
1201
  spellcheck: "false",
1108
1202
  autocomplete: "off",
1109
1203
  autocapitalize: "off",
1110
1204
  autocorrect: "off",
1111
1205
  wrap: "soft",
1112
- onInput: st,
1113
- onKeydown: pt,
1114
- onScroll: ut,
1115
- onClick: ct,
1116
- onMousemove: ot,
1117
- onMouseleave: H,
1118
- onBlur: rt
1119
- }, null, 40, Nt),
1120
- N.value ? (T(), C("ul", {
1206
+ onInput: ct,
1207
+ onKeydown: ht,
1208
+ onScroll: ft,
1209
+ onClick: dt,
1210
+ onMousemove: at,
1211
+ onMouseleave: L,
1212
+ onBlur: ut
1213
+ }, null, 40, zt),
1214
+ w.value ? (T(), S("ul", {
1121
1215
  key: 0,
1122
1216
  ref_key: "popup",
1123
- ref: S,
1217
+ ref: H,
1124
1218
  class: "popup",
1125
- style: te(me.value),
1126
- onMousedown: t[0] || (t[0] = gt(() => {
1219
+ style: oe(v.value),
1220
+ onMousedown: t[0] || (t[0] = yt(() => {
1127
1221
  }, ["prevent"]))
1128
1222
  }, [
1129
- (T(!0), C(Me, null, He(x.value, (s, m) => (T(), C("li", {
1223
+ (T(!0), S(He, null, Ae(A.value, (s, m) => (T(), S("li", {
1130
1224
  key: `${s.label}-${m}`,
1131
- class: ne(["popup-item", { "is-active": m === g.value }]),
1132
- onMouseenter: (h) => g.value = m,
1133
- onClick: (h) => $e(s)
1225
+ class: ie(["popup-item", { "is-active": m === k.value }]),
1226
+ onMouseenter: (h) => k.value = m,
1227
+ onClick: (h) => Ce(s)
1134
1228
  }, [
1135
- I("span", {
1136
- class: ne(["badge", `badge-${s.kind}`])
1137
- }, F(ye(s.kind)), 3),
1138
- I("span", zt, F(s.label), 1),
1139
- s.detail ? (T(), C("span", Dt, F(s.detail), 1)) : z("", !0)
1140
- ], 42, Wt))), 128))
1141
- ], 36)) : z("", !0),
1142
- E.value ? (T(), C("div", {
1229
+ M("span", {
1230
+ class: ie(["badge", `badge-${s.kind}`])
1231
+ }, K(ke(s.kind)), 3),
1232
+ M("span", Wt, K(s.label), 1),
1233
+ s.detail ? (T(), S("span", Pt, K(s.detail), 1)) : D("", !0)
1234
+ ], 42, Dt))), 128))
1235
+ ], 36)) : D("", !0),
1236
+ $.value ? (T(), S("div", {
1143
1237
  key: 1,
1144
1238
  ref_key: "hoverCard",
1145
- ref: w,
1239
+ ref: O,
1146
1240
  class: "hover-card",
1147
- style: te(he.value)
1241
+ style: oe(be.value)
1148
1242
  }, [
1149
- I("div", jt, [
1150
- I("span", {
1151
- class: ne(["badge", `badge-${E.value.kind}`])
1152
- }, F(ye(E.value.kind)), 3),
1153
- I("span", Pt, [
1154
- vt(F(E.value.label), 1),
1155
- E.value.detail ? (T(), C("span", Ft, ":")) : z("", !0)
1243
+ M("div", Ft, [
1244
+ M("span", {
1245
+ class: ie(["badge", `badge-${$.value.kind}`])
1246
+ }, K(ke($.value.kind)), 3),
1247
+ M("span", Vt, [
1248
+ kt(K($.value.label), 1),
1249
+ $.value.detail ? (T(), S("span", Kt, ":")) : D("", !0)
1156
1250
  ]),
1157
- E.value.detail ? (T(), C("span", Vt, F(E.value.detail), 1)) : z("", !0)
1251
+ $.value.detail ? (T(), S("span", Zt, K($.value.detail), 1)) : D("", !0)
1158
1252
  ]),
1159
- E.value.documentation ? (T(), C("p", Kt, F(E.value.documentation), 1)) : z("", !0),
1160
- E.value.type ? (T(), C("pre", Zt, [
1161
- I("code", {
1162
- innerHTML: Qe(E.value.type)
1163
- }, null, 8, qt)
1164
- ])) : z("", !0)
1165
- ], 4)) : z("", !0)
1253
+ $.value.documentation ? (T(), S("p", qt, K($.value.documentation), 1)) : D("", !0),
1254
+ $.value.type ? (T(), S("pre", Ut, [
1255
+ M("code", {
1256
+ innerHTML: tt($.value.type)
1257
+ }, null, 8, Yt)
1258
+ ])) : D("", !0)
1259
+ ], 4)) : D("", !0)
1166
1260
  ], 4),
1167
- o.collapsible ? (T(), C("button", {
1261
+ l.collapsible ? (T(), S("button", {
1168
1262
  key: 1,
1169
1263
  type: "button",
1170
1264
  class: "expand-toggle",
1171
- title: W.value ? "收起" : "展开",
1172
- "aria-label": W.value ? "收起编辑器" : "展开编辑器",
1173
- onClick: Xe
1265
+ title: z.value ? "收起" : "展开",
1266
+ "aria-label": z.value ? "收起编辑器" : "展开编辑器",
1267
+ onClick: et
1174
1268
  }, [
1175
- W.value ? (T(), C("svg", Jt, [...t[2] || (t[2] = [
1176
- I("path", {
1269
+ z.value ? (T(), S("svg", Xt, [...t[2] || (t[2] = [
1270
+ M("path", {
1177
1271
  d: "M11 2 5 8 11 14",
1178
1272
  fill: "none",
1179
1273
  stroke: "currentColor",
@@ -1181,8 +1275,8 @@ ${R}${M}`);
1181
1275
  "stroke-linecap": "round",
1182
1276
  "stroke-linejoin": "round"
1183
1277
  }, null, -1)
1184
- ])])) : (T(), C("svg", Yt, [...t[1] || (t[1] = [
1185
- I("path", {
1278
+ ])])) : (T(), S("svg", Gt, [...t[1] || (t[1] = [
1279
+ M("path", {
1186
1280
  d: "M6 2 12 8 6 14",
1187
1281
  fill: "none",
1188
1282
  stroke: "currentColor",
@@ -1191,32 +1285,32 @@ ${R}${M}`);
1191
1285
  "stroke-linejoin": "round"
1192
1286
  }, null, -1)
1193
1287
  ])]))
1194
- ], 8, Ut)) : z("", !0)
1288
+ ], 8, Jt)) : D("", !0)
1195
1289
  ], 6));
1196
1290
  }
1197
- }), Xt = (o, r) => {
1198
- const i = o.__vccOpts || o;
1199
- for (const [n, l] of r)
1200
- i[n] = l;
1201
- return i;
1202
- }, Qt = /* @__PURE__ */ Xt(Gt, [["__scopeId", "data-v-dc3651c9"]]), nn = {
1203
- install(o) {
1204
- o.component("CodeInput", Qt);
1291
+ }), en = (l, r) => {
1292
+ const a = l.__vccOpts || l;
1293
+ for (const [n, o] of r)
1294
+ a[n] = o;
1295
+ return a;
1296
+ }, tn = /* @__PURE__ */ en(Qt, [["__scopeId", "data-v-dc3651c9"]]), on = {
1297
+ install(l) {
1298
+ l.component("CodeInput", tn);
1205
1299
  }
1206
1300
  };
1207
1301
  export {
1208
- Qt as CodeEditor,
1209
- Et as collectCompletions,
1210
- nn as default,
1211
- yt as defaultCompletions,
1212
- pe as findTemplateRange,
1302
+ tn as CodeEditor,
1303
+ Rt as collectCompletions,
1304
+ on as default,
1305
+ wt as defaultCompletions,
1306
+ he as findTemplateRange,
1213
1307
  Le as getKeywordSet,
1214
- Fe as getKeywords,
1215
- oe as highlight,
1216
- Lt as highlightTemplate,
1217
- tn as isInsideTemplate,
1218
- Mt as parseTsCompletions,
1219
- Rt as resolveHoverItem,
1220
- Oe as scanDeclarations,
1221
- le as tokenize
1308
+ Ke as getKeywords,
1309
+ se as highlight,
1310
+ Ot as highlightTemplate,
1311
+ ln as isInsideTemplate,
1312
+ At as parseTsCompletions,
1313
+ Mt as resolveHoverItem,
1314
+ Ne as scanDeclarations,
1315
+ ae as tokenize
1222
1316
  };