@hep-code-runner/vue2 1.5.1 → 1.5.2

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var ae = Object.defineProperty, ie = (r, e, t) => e in r ? ae(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, q = (r, e, t) => ie(r, typeof e != "symbol" ? e + "" : e, t);
1
+ var ae = Object.defineProperty, ie = (n, e, t) => e in n ? ae(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, q = (n, e, t) => ie(n, typeof e != "symbol" ? e + "" : e, t);
2
2
  let W = null;
3
3
  class se {
4
4
  constructor(e = {}) {
@@ -206,17 +206,17 @@ h1 {
206
206
 
207
207
  This is a sample markdown document.`
208
208
  };
209
- function z(r) {
210
- const e = r.toLowerCase();
211
- return oe[e] || `// ${r}
209
+ function z(n) {
210
+ const e = n.toLowerCase();
211
+ return oe[e] || `// ${n}
212
212
  // Write your code here`;
213
213
  }
214
214
  var J = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
215
- function le(r) {
216
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
215
+ function le(n) {
216
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
217
217
  }
218
218
  var Q = { exports: {} };
219
- (function(r) {
219
+ (function(n) {
220
220
  var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
221
221
  /**
222
222
  * Prism: Lightweight, robust, elegant syntax highlighting
@@ -282,8 +282,8 @@ var Q = { exports: {} };
282
282
  * @memberof Prism
283
283
  */
284
284
  util: {
285
- encode: function a(n) {
286
- return n instanceof h ? new h(n.type, a(n.content), n.alias) : Array.isArray(n) ? n.map(a) : n.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
285
+ encode: function a(r) {
286
+ return r instanceof h ? new h(r.type, a(r.content), r.alias) : Array.isArray(r) ? r.map(a) : r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
287
287
  },
288
288
  /**
289
289
  * Returns the name of the type of the given value.
@@ -323,30 +323,30 @@ var Q = { exports: {} };
323
323
  * @returns {T}
324
324
  * @template T
325
325
  */
326
- clone: function a(n, i) {
326
+ clone: function a(r, i) {
327
327
  i = i || {};
328
328
  var s, o;
329
- switch (u.util.type(n)) {
329
+ switch (u.util.type(r)) {
330
330
  case "Object":
331
- if (o = u.util.objId(n), i[o])
331
+ if (o = u.util.objId(r), i[o])
332
332
  return i[o];
333
333
  s = /** @type {Record<string, any>} */
334
334
  {}, i[o] = s;
335
- for (var d in n)
336
- n.hasOwnProperty(d) && (s[d] = a(n[d], i));
335
+ for (var d in r)
336
+ r.hasOwnProperty(d) && (s[d] = a(r[d], i));
337
337
  return (
338
338
  /** @type {any} */
339
339
  s
340
340
  );
341
341
  case "Array":
342
- return o = u.util.objId(n), i[o] ? i[o] : (s = [], i[o] = s, /** @type {Array} */
342
+ return o = u.util.objId(r), i[o] ? i[o] : (s = [], i[o] = s, /** @type {Array} */
343
343
  /** @type {any} */
344
- n.forEach(function(g, c) {
344
+ r.forEach(function(g, c) {
345
345
  s[c] = a(g, i);
346
346
  }), /** @type {any} */
347
347
  s);
348
348
  default:
349
- return n;
349
+ return r;
350
350
  }
351
351
  },
352
352
  /**
@@ -359,9 +359,9 @@ var Q = { exports: {} };
359
359
  */
360
360
  getLanguage: function(a) {
361
361
  for (; a; ) {
362
- var n = p.exec(a.className);
363
- if (n)
364
- return n[1].toLowerCase();
362
+ var r = p.exec(a.className);
363
+ if (r)
364
+ return r[1].toLowerCase();
365
365
  a = a.parentElement;
366
366
  }
367
367
  return "none";
@@ -373,8 +373,8 @@ var Q = { exports: {} };
373
373
  * @param {string} language
374
374
  * @returns {void}
375
375
  */
376
- setLanguage: function(a, n) {
377
- a.className = a.className.replace(RegExp(p, "gi"), ""), a.classList.add("language-" + n);
376
+ setLanguage: function(a, r) {
377
+ a.className = a.className.replace(RegExp(p, "gi"), ""), a.classList.add("language-" + r);
378
378
  },
379
379
  /**
380
380
  * Returns the script element that is currently executing.
@@ -396,10 +396,10 @@ var Q = { exports: {} };
396
396
  } catch (s) {
397
397
  var a = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack) || [])[1];
398
398
  if (a) {
399
- var n = document.getElementsByTagName("script");
400
- for (var i in n)
401
- if (n[i].src == a)
402
- return n[i];
399
+ var r = document.getElementsByTagName("script");
400
+ for (var i in r)
401
+ if (r[i].src == a)
402
+ return r[i];
403
403
  }
404
404
  return null;
405
405
  }
@@ -423,10 +423,10 @@ var Q = { exports: {} };
423
423
  * @param {boolean} [defaultActivation=false]
424
424
  * @returns {boolean}
425
425
  */
426
- isActive: function(a, n, i) {
427
- for (var s = "no-" + n; a; ) {
426
+ isActive: function(a, r, i) {
427
+ for (var s = "no-" + r; a; ) {
428
428
  var o = a.classList;
429
- if (o.contains(n))
429
+ if (o.contains(r))
430
430
  return !0;
431
431
  if (o.contains(s))
432
432
  return !1;
@@ -478,10 +478,10 @@ var Q = { exports: {} };
478
478
  * 'color': /\b(?:red|green|blue)\b/
479
479
  * });
480
480
  */
481
- extend: function(a, n) {
481
+ extend: function(a, r) {
482
482
  var i = u.util.clone(u.languages[a]);
483
- for (var s in n)
484
- i[s] = n[s];
483
+ for (var s in r)
484
+ i[s] = r[s];
485
485
  return i;
486
486
  },
487
487
  /**
@@ -559,13 +559,13 @@ var Q = { exports: {} };
559
559
  * @returns {Grammar} The new grammar object.
560
560
  * @public
561
561
  */
562
- insertBefore: function(a, n, i, s) {
562
+ insertBefore: function(a, r, i, s) {
563
563
  s = s || /** @type {any} */
564
564
  u.languages;
565
565
  var o = s[a], d = {};
566
566
  for (var g in o)
567
567
  if (o.hasOwnProperty(g)) {
568
- if (g == n)
568
+ if (g == r)
569
569
  for (var c in i)
570
570
  i.hasOwnProperty(c) && (d[c] = i[c]);
571
571
  i.hasOwnProperty(g) || (d[g] = o[g]);
@@ -576,13 +576,13 @@ var Q = { exports: {} };
576
576
  }), d;
577
577
  },
578
578
  // Traverse a language definition with Depth First Search
579
- DFS: function a(n, i, s, o) {
579
+ DFS: function a(r, i, s, o) {
580
580
  o = o || {};
581
581
  var d = u.util.objId;
582
- for (var g in n)
583
- if (n.hasOwnProperty(g)) {
584
- i.call(n, g, n[g], s || g);
585
- var c = n[g], E = u.util.type(c);
582
+ for (var g in r)
583
+ if (r.hasOwnProperty(g)) {
584
+ i.call(r, g, r[g], s || g);
585
+ var c = r[g], E = u.util.type(c);
586
586
  E === "Object" && !o[d(c)] ? (o[d(c)] = !0, a(c, i, null, o)) : E === "Array" && !o[d(c)] && (o[d(c)] = !0, a(c, i, g, o));
587
587
  }
588
588
  }
@@ -600,8 +600,8 @@ var Q = { exports: {} };
600
600
  * @memberof Prism
601
601
  * @public
602
602
  */
603
- highlightAll: function(a, n) {
604
- u.highlightAllUnder(document, a, n);
603
+ highlightAll: function(a, r) {
604
+ u.highlightAllUnder(document, a, r);
605
605
  },
606
606
  /**
607
607
  * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
@@ -618,7 +618,7 @@ var Q = { exports: {} };
618
618
  * @memberof Prism
619
619
  * @public
620
620
  */
621
- highlightAllUnder: function(a, n, i) {
621
+ highlightAllUnder: function(a, r, i) {
622
622
  var s = {
623
623
  callback: i,
624
624
  container: a,
@@ -626,7 +626,7 @@ var Q = { exports: {} };
626
626
  };
627
627
  u.hooks.run("before-highlightall", s), s.elements = Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)), u.hooks.run("before-all-elements-highlight", s);
628
628
  for (var o = 0, d; d = s.elements[o++]; )
629
- u.highlightElement(d, n === !0, s.callback);
629
+ u.highlightElement(d, r === !0, s.callback);
630
630
  },
631
631
  /**
632
632
  * Highlights the code inside a single element.
@@ -656,7 +656,7 @@ var Q = { exports: {} };
656
656
  * @memberof Prism
657
657
  * @public
658
658
  */
659
- highlightElement: function(a, n, i) {
659
+ highlightElement: function(a, r, i) {
660
660
  var s = u.util.getLanguage(a), o = u.languages[s];
661
661
  u.util.setLanguage(a, s);
662
662
  var d = a.parentElement;
@@ -678,7 +678,7 @@ var Q = { exports: {} };
678
678
  E(u.util.encode(c.code));
679
679
  return;
680
680
  }
681
- if (n && l.Worker) {
681
+ if (r && l.Worker) {
682
682
  var S = new Worker(u.filename);
683
683
  S.onmessage = function(F) {
684
684
  E(F.data);
@@ -710,10 +710,10 @@ var Q = { exports: {} };
710
710
  * @example
711
711
  * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
712
712
  */
713
- highlight: function(a, n, i) {
713
+ highlight: function(a, r, i) {
714
714
  var s = {
715
715
  code: a,
716
- grammar: n,
716
+ grammar: r,
717
717
  language: i
718
718
  };
719
719
  if (u.hooks.run("before-tokenize", s), !s.grammar)
@@ -744,15 +744,15 @@ var Q = { exports: {} };
744
744
  * }
745
745
  * });
746
746
  */
747
- tokenize: function(a, n) {
748
- var i = n.rest;
747
+ tokenize: function(a, r) {
748
+ var i = r.rest;
749
749
  if (i) {
750
750
  for (var s in i)
751
- n[s] = i[s];
752
- delete n.rest;
751
+ r[s] = i[s];
752
+ delete r.rest;
753
753
  }
754
754
  var o = new x();
755
- return I(o, o.head, a), _(a, o, n, o.head, 0), O(o);
755
+ return I(o, o.head, a), _(a, o, r, o.head, 0), O(o);
756
756
  },
757
757
  /**
758
758
  * @namespace
@@ -773,9 +773,9 @@ var Q = { exports: {} };
773
773
  * @param {HookCallback} callback The callback function which is given environment variables.
774
774
  * @public
775
775
  */
776
- add: function(a, n) {
776
+ add: function(a, r) {
777
777
  var i = u.hooks.all;
778
- i[a] = i[a] || [], i[a].push(n);
778
+ i[a] = i[a] || [], i[a].push(r);
779
779
  },
780
780
  /**
781
781
  * Runs a hook invoking all registered callbacks with the given environment variables.
@@ -786,44 +786,44 @@ var Q = { exports: {} };
786
786
  * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
787
787
  * @public
788
788
  */
789
- run: function(a, n) {
789
+ run: function(a, r) {
790
790
  var i = u.hooks.all[a];
791
791
  if (!(!i || !i.length))
792
792
  for (var s = 0, o; o = i[s++]; )
793
- o(n);
793
+ o(r);
794
794
  }
795
795
  },
796
796
  Token: h
797
797
  };
798
798
  l.Prism = u;
799
- function h(a, n, i, s) {
800
- this.type = a, this.content = n, this.alias = i, this.length = (s || "").length | 0;
799
+ function h(a, r, i, s) {
800
+ this.type = a, this.content = r, this.alias = i, this.length = (s || "").length | 0;
801
801
  }
802
- h.stringify = function a(n, i) {
803
- if (typeof n == "string")
804
- return n;
805
- if (Array.isArray(n)) {
802
+ h.stringify = function a(r, i) {
803
+ if (typeof r == "string")
804
+ return r;
805
+ if (Array.isArray(r)) {
806
806
  var s = "";
807
- return n.forEach(function(E) {
807
+ return r.forEach(function(E) {
808
808
  s += a(E, i);
809
809
  }), s;
810
810
  }
811
811
  var o = {
812
- type: n.type,
813
- content: a(n.content, i),
812
+ type: r.type,
813
+ content: a(r.content, i),
814
814
  tag: "span",
815
- classes: ["token", n.type],
815
+ classes: ["token", r.type],
816
816
  attributes: {},
817
817
  language: i
818
- }, d = n.alias;
818
+ }, d = r.alias;
819
819
  d && (Array.isArray(d) ? Array.prototype.push.apply(o.classes, d) : o.classes.push(d)), u.hooks.run("wrap", o);
820
820
  var g = "";
821
821
  for (var c in o.attributes)
822
822
  g += " " + c + '="' + (o.attributes[c] || "").replace(/"/g, "&quot;") + '"';
823
823
  return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + g + ">" + o.content + "</" + o.tag + ">";
824
824
  };
825
- function A(a, n, i, s) {
826
- a.lastIndex = n;
825
+ function A(a, r, i, s) {
826
+ a.lastIndex = r;
827
827
  var o = a.exec(i);
828
828
  if (o && s && o[1]) {
829
829
  var d = o[1].length;
@@ -831,7 +831,7 @@ var Q = { exports: {} };
831
831
  }
832
832
  return o;
833
833
  }
834
- function _(a, n, i, s, o, d) {
834
+ function _(a, r, i, s, o, d) {
835
835
  for (var g in i)
836
836
  if (!(!i.hasOwnProperty(g) || !i[g])) {
837
837
  var c = i[g];
@@ -844,21 +844,21 @@ var Q = { exports: {} };
844
844
  var te = S.pattern.toString().match(/[imsuy]*$/)[0];
845
845
  S.pattern = RegExp(S.pattern.source, te + "g");
846
846
  }
847
- for (var K = S.pattern || S, T = s.next, k = o; T !== n.tail && !(d && k >= d.reach); k += T.value.length, T = T.next) {
847
+ for (var K = S.pattern || S, T = s.next, k = o; T !== r.tail && !(d && k >= d.reach); k += T.value.length, T = T.next) {
848
848
  var C = T.value;
849
- if (n.length > a.length)
849
+ if (r.length > a.length)
850
850
  return;
851
851
  if (!(C instanceof h)) {
852
852
  var N = 1, w;
853
853
  if (Z) {
854
854
  if (w = A(K, k, a, X), !w || w.index >= a.length)
855
855
  break;
856
- var D = w.index, ne = w.index + w[0].length, R = k;
856
+ var D = w.index, re = w.index + w[0].length, R = k;
857
857
  for (R += T.value.length; D >= R; )
858
858
  T = T.next, R += T.value.length;
859
859
  if (R -= T.value.length, k = R, T.value instanceof h)
860
860
  continue;
861
- for (var L = T; L !== n.tail && (R < ne || typeof L.value == "string"); L = L.next)
861
+ for (var L = T; L !== r.tail && (R < re || typeof L.value == "string"); L = L.next)
862
862
  N++, R += L.value.length;
863
863
  N--, C = a.slice(k, R), w.index -= k;
864
864
  } else if (w = A(K, 0, C, X), !w)
@@ -866,14 +866,14 @@ var Q = { exports: {} };
866
866
  var D = w.index, P = w[0], H = C.slice(0, D), V = C.slice(D + P.length), B = k + C.length;
867
867
  d && B > d.reach && (d.reach = B);
868
868
  var $ = T.prev;
869
- H && ($ = I(n, $, H), k += H.length), U(n, $, N);
870
- var re = new h(g, F ? u.tokenize(P, F) : P, ee, P);
871
- if (T = I(n, $, re), V && I(n, T, V), N > 1) {
869
+ H && ($ = I(r, $, H), k += H.length), U(r, $, N);
870
+ var ne = new h(g, F ? u.tokenize(P, F) : P, ee, P);
871
+ if (T = I(r, $, ne), V && I(r, T, V), N > 1) {
872
872
  var G = {
873
873
  cause: g + "," + E,
874
874
  reach: B
875
875
  };
876
- _(a, n, i, T.prev, k, G), d && G.reach > d.reach && (d.reach = G.reach);
876
+ _(a, r, i, T.prev, k, G), d && G.reach > d.reach && (d.reach = G.reach);
877
877
  }
878
878
  }
879
879
  }
@@ -881,26 +881,26 @@ var Q = { exports: {} };
881
881
  }
882
882
  }
883
883
  function x() {
884
- var a = { value: null, prev: null, next: null }, n = { value: null, prev: a, next: null };
885
- a.next = n, this.head = a, this.tail = n, this.length = 0;
884
+ var a = { value: null, prev: null, next: null }, r = { value: null, prev: a, next: null };
885
+ a.next = r, this.head = a, this.tail = r, this.length = 0;
886
886
  }
887
- function I(a, n, i) {
888
- var s = n.next, o = { value: i, prev: n, next: s };
889
- return n.next = o, s.prev = o, a.length++, o;
887
+ function I(a, r, i) {
888
+ var s = r.next, o = { value: i, prev: r, next: s };
889
+ return r.next = o, s.prev = o, a.length++, o;
890
890
  }
891
- function U(a, n, i) {
892
- for (var s = n.next, o = 0; o < i && s !== a.tail; o++)
891
+ function U(a, r, i) {
892
+ for (var s = r.next, o = 0; o < i && s !== a.tail; o++)
893
893
  s = s.next;
894
- n.next = s, s.prev = n, a.length -= o;
894
+ r.next = s, s.prev = r, a.length -= o;
895
895
  }
896
896
  function O(a) {
897
- for (var n = [], i = a.head.next; i !== a.tail; )
898
- n.push(i.value), i = i.next;
899
- return n;
897
+ for (var r = [], i = a.head.next; i !== a.tail; )
898
+ r.push(i.value), i = i.next;
899
+ return r;
900
900
  }
901
901
  if (!l.document)
902
902
  return l.addEventListener && (u.disableWorkerMessageHandler || l.addEventListener("message", function(a) {
903
- var n = JSON.parse(a.data), i = n.language, s = n.code, o = n.immediateClose;
903
+ var r = JSON.parse(a.data), i = r.language, s = r.code, o = r.immediateClose;
904
904
  l.postMessage(u.highlight(s, u.languages[i], i)), o && l.close();
905
905
  }, !1)), u;
906
906
  var v = u.util.currentScript();
@@ -914,7 +914,7 @@ var Q = { exports: {} };
914
914
  }
915
915
  return u;
916
916
  }(e);
917
- r.exports && (r.exports = t), typeof J < "u" && (J.Prism = t), t.languages.markup = {
917
+ n.exports && (n.exports = t), typeof J < "u" && (J.Prism = t), t.languages.markup = {
918
918
  comment: {
919
919
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
920
920
  greedy: !0
@@ -1314,8 +1314,8 @@ var Q = { exports: {} };
1314
1314
  function U(v) {
1315
1315
  var f = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v || "");
1316
1316
  if (f) {
1317
- var y = Number(f[1]), a = f[2], n = f[3];
1318
- return a ? n ? [y, Number(n)] : [y, void 0] : [y, y];
1317
+ var y = Number(f[1]), a = f[2], r = f[3];
1318
+ return a ? r ? [y, Number(r)] : [y, void 0] : [y, y];
1319
1319
  }
1320
1320
  }
1321
1321
  t.hooks.add("before-highlightall", function(v) {
@@ -1329,14 +1329,14 @@ var Q = { exports: {} };
1329
1329
  v.code = "", f.setAttribute(u, h);
1330
1330
  var y = f.appendChild(document.createElement("CODE"));
1331
1331
  y.textContent = l;
1332
- var a = f.getAttribute("data-src"), n = v.language;
1333
- if (n === "none") {
1332
+ var a = f.getAttribute("data-src"), r = v.language;
1333
+ if (r === "none") {
1334
1334
  var i = (/\.(\w+)$/.exec(a) || [, "none"])[1];
1335
- n = b[i] || i;
1335
+ r = b[i] || i;
1336
1336
  }
1337
- t.util.setLanguage(y, n), t.util.setLanguage(f, n);
1337
+ t.util.setLanguage(y, r), t.util.setLanguage(f, r);
1338
1338
  var s = t.plugins.autoloader;
1339
- s && s.loadLanguages(n), I(
1339
+ s && s.loadLanguages(r), I(
1340
1340
  a,
1341
1341
  function(o) {
1342
1342
  f.setAttribute(u, A);
@@ -1362,8 +1362,8 @@ var Q = { exports: {} };
1362
1362
  * @param {ParentNode} [container=document]
1363
1363
  */
1364
1364
  highlight: function(f) {
1365
- for (var y = (f || document).querySelectorAll(x), a = 0, n; n = y[a++]; )
1366
- t.highlightElement(n);
1365
+ for (var y = (f || document).querySelectorAll(x), a = 0, r; r = y[a++]; )
1366
+ t.highlightElement(r);
1367
1367
  }
1368
1368
  };
1369
1369
  var O = !1;
@@ -1631,7 +1631,7 @@ Prism.languages.insertBefore("go", "string", {
1631
1631
  }
1632
1632
  });
1633
1633
  delete Prism.languages.go["class-name"];
1634
- (function(r) {
1634
+ (function(n) {
1635
1635
  var e = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, t = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, l = {
1636
1636
  pattern: RegExp(/(^|[^\w.])/.source + t + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
1637
1637
  lookbehind: !0,
@@ -1645,7 +1645,7 @@ delete Prism.languages.go["class-name"];
1645
1645
  punctuation: /\./
1646
1646
  }
1647
1647
  };
1648
- r.languages.java = r.languages.extend("clike", {
1648
+ n.languages.java = n.languages.extend("clike", {
1649
1649
  string: {
1650
1650
  pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
1651
1651
  lookbehind: !0,
@@ -1670,7 +1670,7 @@ delete Prism.languages.go["class-name"];
1670
1670
  ],
1671
1671
  keyword: e,
1672
1672
  function: [
1673
- r.languages.clike.function,
1673
+ n.languages.clike.function,
1674
1674
  {
1675
1675
  pattern: /(::\s*)[a-z_]\w*/,
1676
1676
  lookbehind: !0
@@ -1682,7 +1682,7 @@ delete Prism.languages.go["class-name"];
1682
1682
  lookbehind: !0
1683
1683
  },
1684
1684
  constant: /\b[A-Z][A-Z_\d]+\b/
1685
- }), r.languages.insertBefore("java", "string", {
1685
+ }), n.languages.insertBefore("java", "string", {
1686
1686
  "triple-quoted-string": {
1687
1687
  // http://openjdk.java.net/jeps/355#Description
1688
1688
  pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
@@ -1693,7 +1693,7 @@ delete Prism.languages.go["class-name"];
1693
1693
  pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
1694
1694
  greedy: !0
1695
1695
  }
1696
- }), r.languages.insertBefore("java", "class-name", {
1696
+ }), n.languages.insertBefore("java", "class-name", {
1697
1697
  annotation: {
1698
1698
  pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
1699
1699
  lookbehind: !0,
@@ -1821,14 +1821,14 @@ Prism.languages.insertBefore("c", "function", {
1821
1821
  constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
1822
1822
  });
1823
1823
  delete Prism.languages.c.boolean;
1824
- (function(r) {
1824
+ (function(n) {
1825
1825
  for (var e = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, t = 0; t < 2; t++)
1826
1826
  e = e.replace(/<self>/g, function() {
1827
1827
  return e;
1828
1828
  });
1829
1829
  e = e.replace(/<self>/g, function() {
1830
1830
  return /[^\s\S]/.source;
1831
- }), r.languages.rust = {
1831
+ }), n.languages.rust = {
1832
1832
  comment: [
1833
1833
  {
1834
1834
  pattern: RegExp(/(^|[^\\])/.source + e),
@@ -1935,7 +1935,7 @@ delete Prism.languages.c.boolean;
1935
1935
  boolean: /\b(?:false|true)\b/,
1936
1936
  punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
1937
1937
  operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
1938
- }, r.languages.rust["closure-params"].inside.rest = r.languages.rust, r.languages.rust.attribute.inside.string = r.languages.rust.string;
1938
+ }, n.languages.rust["closure-params"].inside.rest = n.languages.rust, n.languages.rust.attribute.inside.string = n.languages.rust.string;
1939
1939
  })(Prism);
1940
1940
  Prism.languages.sql = {
1941
1941
  comment: {
@@ -1970,7 +1970,7 @@ Prism.languages.sql = {
1970
1970
  operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
1971
1971
  punctuation: /[;[\]()`,.]/
1972
1972
  };
1973
- (function(r) {
1973
+ (function(n) {
1974
1974
  var e = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", t = {
1975
1975
  pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
1976
1976
  lookbehind: !0,
@@ -2032,7 +2032,7 @@ Prism.languages.sql = {
2032
2032
  // Escape sequences from echo and printf's manuals, and escaped quotes.
2033
2033
  entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
2034
2034
  };
2035
- r.languages.bash = {
2035
+ n.languages.bash = {
2036
2036
  shebang: {
2037
2037
  pattern: /^#!\s*\/.*/,
2038
2038
  alias: "important"
@@ -2168,7 +2168,7 @@ Prism.languages.sql = {
2168
2168
  pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
2169
2169
  lookbehind: !0
2170
2170
  }
2171
- }, t.inside = r.languages.bash;
2171
+ }, t.inside = n.languages.bash;
2172
2172
  for (var p = [
2173
2173
  "comment",
2174
2174
  "function-name",
@@ -2186,8 +2186,8 @@ Prism.languages.sql = {
2186
2186
  "punctuation",
2187
2187
  "number"
2188
2188
  ], m = l.variable[1].inside, b = 0; b < p.length; b++)
2189
- m[p[b]] = r.languages.bash[p[b]];
2190
- r.languages.sh = r.languages.bash, r.languages.shell = r.languages.bash;
2189
+ m[p[b]] = n.languages.bash[p[b]];
2190
+ n.languages.sh = n.languages.bash, n.languages.shell = n.languages.bash;
2191
2191
  })(Prism);
2192
2192
  Prism.languages.json = {
2193
2193
  property: {
@@ -2215,6 +2215,12 @@ Prism.languages.json = {
2215
2215
  };
2216
2216
  Prism.languages.webmanifest = Prism.languages.json;
2217
2217
  const ce = `
2218
+ /* 默认代码颜色 */
2219
+ .hep-cr-editor .hep-cr-highlight code,
2220
+ .hep-cr-editor .hep-cr-highlight pre {
2221
+ color: #f8f8f2 !important;
2222
+ }
2223
+
2218
2224
  .hep-cr-editor .token.comment,
2219
2225
  .hep-cr-editor .token.prolog,
2220
2226
  .hep-cr-editor .token.doctype,
@@ -2234,6 +2240,12 @@ const ce = `
2234
2240
  color: #f92672 !important;
2235
2241
  }
2236
2242
 
2243
+ /* console 单独处理 - 必须是白色 */
2244
+ .hep-cr-editor .token.property.console,
2245
+ .hep-cr-editor .token.console {
2246
+ color: #f8f8f2 !important;
2247
+ }
2248
+
2237
2249
  .hep-cr-editor .token.boolean,
2238
2250
  .hep-cr-editor .token.number {
2239
2251
  color: #ae81ff !important;
@@ -2273,7 +2285,26 @@ const ce = `
2273
2285
  .hep-cr-editor .token.important {
2274
2286
  color: #fd971f !important;
2275
2287
  }
2288
+
2289
+ /* 覆盖用户项目的 text-shadow 样式,避免白边 */
2290
+ .hep-cr-editor code[class*="language-"],
2291
+ .hep-cr-editor pre[class*="language-"],
2292
+ .hep-cr-editor .hep-cr-highlight code,
2293
+ .hep-cr-editor .hep-cr-highlight pre {
2294
+ text-shadow: none !important;
2295
+ }
2296
+
2297
+ /* 覆盖 console 等内置对象 */
2298
+ .hep-cr-editor .token.console {
2299
+ color: #f8f8f2 !important;
2300
+ }
2276
2301
  `, de = `
2302
+ /* 默认代码颜色 */
2303
+ .hep-cr-editor .hep-cr-highlight code,
2304
+ .hep-cr-editor .hep-cr-highlight pre {
2305
+ color: #333 !important;
2306
+ }
2307
+
2277
2308
  .hep-cr-editor .token.comment,
2278
2309
  .hep-cr-editor .token.prolog,
2279
2310
  .hep-cr-editor .token.doctype,
@@ -2331,11 +2362,24 @@ const ce = `
2331
2362
  .hep-cr-editor .token.important {
2332
2363
  color: #e36209;
2333
2364
  }
2365
+
2366
+ /* 覆盖用户项目的 text-shadow 样式,避免白边 */
2367
+ .hep-cr-editor code[class*="language-"],
2368
+ .hep-cr-editor pre[class*="language-"],
2369
+ .hep-cr-editor .hep-cr-highlight code,
2370
+ .hep-cr-editor .hep-cr-highlight pre {
2371
+ text-shadow: none !important;
2372
+ }
2373
+
2374
+ /* 覆盖 console 等内置对象 */
2375
+ .hep-cr-editor .token.console {
2376
+ color: #333 !important;
2377
+ }
2334
2378
  `;
2335
- function Y(r, e, t, l, p, m, b, u) {
2336
- var h = typeof r == "function" ? r.options : r;
2379
+ function Y(n, e, t, l, p, m, b, u) {
2380
+ var h = typeof n == "function" ? n.options : n;
2337
2381
  return e && (h.render = e, h.staticRenderFns = t, h._compiled = !0), m && (h._scopeId = "data-v-" + m), {
2338
- exports: r,
2382
+ exports: n,
2339
2383
  options: h
2340
2384
  };
2341
2385
  }
@@ -2369,8 +2413,8 @@ const pe = {
2369
2413
  this.loadPrismTheme(this.theme);
2370
2414
  },
2371
2415
  watch: {
2372
- theme(r) {
2373
- this.loadPrismTheme(r);
2416
+ theme(n) {
2417
+ this.loadPrismTheme(n);
2374
2418
  }
2375
2419
  },
2376
2420
  computed: {
@@ -2416,11 +2460,11 @@ const pe = {
2416
2460
  },
2417
2461
  highlightedCode: function() {
2418
2462
  try {
2419
- var r = j.languages[this.prismLanguage];
2420
- if (r)
2463
+ var n = j.languages[this.prismLanguage];
2464
+ if (n)
2421
2465
  return j.highlight(
2422
2466
  this.value || "",
2423
- r,
2467
+ n,
2424
2468
  this.prismLanguage
2425
2469
  );
2426
2470
  } catch {
@@ -2429,27 +2473,27 @@ const pe = {
2429
2473
  }
2430
2474
  },
2431
2475
  methods: {
2432
- loadPrismTheme(r) {
2433
- const e = "hep-cr-prism-styles", t = document.getElementById(e), l = r === "dark" ? ce : de;
2476
+ loadPrismTheme(n) {
2477
+ const e = "hep-cr-prism-styles", t = document.getElementById(e), l = n === "dark" ? ce : de;
2434
2478
  t && t.remove();
2435
2479
  const p = document.createElement("style");
2436
2480
  p.id = e, p.textContent = l, document.head.appendChild(p);
2437
2481
  },
2438
- escapeHtml: function(r) {
2482
+ escapeHtml: function(n) {
2439
2483
  var e = document.createElement("div");
2440
- return e.textContent = r, e.innerHTML;
2484
+ return e.textContent = n, e.innerHTML;
2441
2485
  },
2442
- handleInput: function(r) {
2443
- this.$emit("input", r.target.value), this.$emit("update:value", r.target.value);
2486
+ handleInput: function(n) {
2487
+ this.$emit("input", n.target.value), this.$emit("update:value", n.target.value);
2444
2488
  },
2445
- handleScroll: function(r) {
2489
+ handleScroll: function(n) {
2446
2490
  var e = this.$refs.highlightRef;
2447
- e && (e.scrollTop = r.target.scrollTop, e.scrollLeft = r.target.scrollLeft);
2491
+ e && (e.scrollTop = n.target.scrollTop, e.scrollLeft = n.target.scrollLeft);
2448
2492
  },
2449
- handleKeydown: function(r) {
2450
- if (r.key === "Tab") {
2451
- r.preventDefault();
2452
- var e = r.target, t = e.selectionStart, l = e.selectionEnd, p = e.value;
2493
+ handleKeydown: function(n) {
2494
+ if (n.key === "Tab") {
2495
+ n.preventDefault();
2496
+ var e = n.target, t = e.selectionStart, l = e.selectionEnd, p = e.value;
2453
2497
  e.value = p.substring(0, t) + " " + p.substring(l), e.selectionStart = e.selectionEnd = t + 2, this.$emit("input", e.value), this.$emit("update:value", e.value);
2454
2498
  }
2455
2499
  }
@@ -2464,7 +2508,7 @@ var ge = function() {
2464
2508
  he,
2465
2509
  !1,
2466
2510
  null,
2467
- "9d5753e0"
2511
+ "54283826"
2468
2512
  );
2469
2513
  const fe = me.exports, be = {
2470
2514
  name: "CodeRunner",
@@ -2483,8 +2527,8 @@ const fe = me.exports, be = {
2483
2527
  theme: {
2484
2528
  type: String,
2485
2529
  default: "light",
2486
- validator: function(r) {
2487
- return ["light", "dark"].indexOf(r) !== -1;
2530
+ validator: function(n) {
2531
+ return ["light", "dark"].indexOf(n) !== -1;
2488
2532
  }
2489
2533
  },
2490
2534
  showLanguageSelector: {
@@ -2530,21 +2574,21 @@ const fe = me.exports, be = {
2530
2574
  return "hep-cr-runner-" + this.currentTheme;
2531
2575
  },
2532
2576
  languageOptions: function() {
2533
- return this.runtimes.map(function(r) {
2577
+ return this.runtimes.map(function(n) {
2534
2578
  return {
2535
- value: r.language + ":" + r.version,
2536
- label: r.language.charAt(0).toUpperCase() + r.language.slice(1) + " " + r.version
2579
+ value: n.language + ":" + n.version,
2580
+ label: n.language.charAt(0).toUpperCase() + n.language.slice(1) + " " + n.version
2537
2581
  };
2538
2582
  });
2539
2583
  },
2540
2584
  languageName: function() {
2541
- var r = this.currentLanguage;
2542
- return r.includes(":") ? r.split(":")[0] : r;
2585
+ var n = this.currentLanguage;
2586
+ return n.includes(":") ? n.split(":")[0] : n;
2543
2587
  }
2544
2588
  },
2545
2589
  watch: {
2546
- currentLanguage: function(r) {
2547
- var e = r.includes(":") ? r.split(":")[0] : r;
2590
+ currentLanguage: function(n) {
2591
+ var e = n.includes(":") ? n.split(":")[0] : n;
2548
2592
  this.code = z(e), this.$emit("language-change", e, this.code);
2549
2593
  }
2550
2594
  },
@@ -2553,36 +2597,36 @@ const fe = me.exports, be = {
2553
2597
  },
2554
2598
  methods: {
2555
2599
  loadRuntimes: function() {
2556
- var r = this;
2600
+ var n = this;
2557
2601
  this.runtimesLoading = !0, this.error = null, this.client.getRuntimes().then(function(e) {
2558
- r.runtimes = e;
2602
+ n.runtimes = e;
2559
2603
  }).catch(function(e) {
2560
- r.error = e.message || "Failed to load runtimes";
2604
+ n.error = e.message || "Failed to load runtimes";
2561
2605
  }).finally(function() {
2562
- r.runtimesLoading = !1;
2606
+ n.runtimesLoading = !1;
2563
2607
  });
2564
2608
  },
2565
2609
  execute: function() {
2566
- var r = this;
2610
+ var n = this;
2567
2611
  this.isRunning || (this.isRunning = !0, this.output = "", this.stderr = "", this.executionTime = null, this.error = null, this.activeTab = "stdout", this.$emit("execute-start"), this.client.execute(this.languageName, this.code).then(function(e) {
2568
- r.output = e.output, r.stderr = e.stderr, r.executionTime = e.executionTime || null, r.activeTab = e.stderr ? "stderr" : "stdout", r.$emit("execute-end", e);
2612
+ n.output = e.output, n.stderr = e.stderr, n.executionTime = e.executionTime || null, n.activeTab = e.stderr ? "stderr" : "stdout", n.$emit("execute-end", e);
2569
2613
  }).catch(function(e) {
2570
- r.error = e.message || "Execution failed", r.$emit("execute-end", {
2614
+ n.error = e.message || "Execution failed", n.$emit("execute-end", {
2571
2615
  success: !1,
2572
2616
  output: "",
2573
- stderr: r.error,
2617
+ stderr: n.error,
2574
2618
  code: -1
2575
2619
  });
2576
2620
  }).finally(function() {
2577
- r.isRunning = !1;
2621
+ n.isRunning = !1;
2578
2622
  }));
2579
2623
  },
2580
2624
  clearOutput: function() {
2581
2625
  this.output = "", this.stderr = "", this.executionTime = null, this.error = null;
2582
2626
  },
2583
2627
  copyOutput: function() {
2584
- var r = this.activeTab === "stdout" ? this.output : this.stderr;
2585
- navigator.clipboard.writeText(r);
2628
+ var n = this.activeTab === "stdout" ? this.output : this.stderr;
2629
+ navigator.clipboard.writeText(n);
2586
2630
  },
2587
2631
  resetCode: function() {
2588
2632
  this.code = z(this.languageName);
@@ -2590,7 +2634,7 @@ const fe = me.exports, be = {
2590
2634
  toggleTheme: function() {
2591
2635
  this.currentTheme = this.currentTheme === "light" ? "dark" : "light";
2592
2636
  },
2593
- startDrag: function(r) {
2637
+ startDrag: function(n) {
2594
2638
  var e = this, t = document.querySelector(".hep-cr-runner-main");
2595
2639
  if (t) {
2596
2640
  var l = function(m) {
@@ -2665,16 +2709,16 @@ const M = ye.exports, Ae = {
2665
2709
  }
2666
2710
  },
2667
2711
  watch: {
2668
- value(r) {
2669
- this.localVisible = r;
2712
+ value(n) {
2713
+ this.localVisible = n;
2670
2714
  }
2671
2715
  },
2672
2716
  methods: {
2673
2717
  close() {
2674
2718
  this.localVisible = !1, this.$emit("input", !1), this.$emit("update:value", !1), this.$emit("close");
2675
2719
  },
2676
- handleOverlayClick(r) {
2677
- r.target === r.currentTarget && this.close();
2720
+ handleOverlayClick(n) {
2721
+ n.target === n.currentTarget && this.close();
2678
2722
  }
2679
2723
  },
2680
2724
  expose: ["close"]
@@ -2691,12 +2735,12 @@ var Se = function() {
2691
2735
  "ec700b03"
2692
2736
  );
2693
2737
  const ke = we.exports;
2694
- M.install = (r) => {
2695
- r.component("CodeRunner", M);
2738
+ M.install = (n) => {
2739
+ n.component("CodeRunner", M);
2696
2740
  };
2697
2741
  const _e = {
2698
- install(r) {
2699
- r.component("CodeRunner", M);
2742
+ install(n) {
2743
+ n.component("CodeRunner", M);
2700
2744
  }
2701
2745
  };
2702
2746
  export {