@splunk/react-ui 5.3.0 → 5.4.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.
Files changed (60) hide show
  1. package/Accordion.js +31 -31
  2. package/Avatar.js +13 -13
  3. package/Breadcrumbs.js +66 -63
  4. package/ButtonSimple.js +52 -52
  5. package/CHANGELOG.md +16 -0
  6. package/CardLayout.js +39 -36
  7. package/Clickable.js +5 -6
  8. package/Code.js +424 -528
  9. package/CollapsiblePanel.js +1 -1
  10. package/Color.js +903 -1025
  11. package/DefinitionList.js +1 -1
  12. package/FormRows.js +13 -11
  13. package/JSONTree.js +682 -1408
  14. package/Link.js +5 -5
  15. package/Markdown.js +9 -5
  16. package/Menu.js +72 -67
  17. package/Multiselect.js +2692 -2780
  18. package/Popover.js +201 -196
  19. package/Resize.js +11 -8
  20. package/ResultsMenu.js +913 -1030
  21. package/ScreenReaderContent.js +86 -130
  22. package/Scroll.js +366 -425
  23. package/Select.js +1741 -1832
  24. package/Slider.js +1 -1
  25. package/SlidingPanels.js +129 -127
  26. package/StepBar.js +123 -97
  27. package/Switch.js +115 -111
  28. package/TabBar.js +10 -10
  29. package/Table.js +1239 -1240
  30. package/TextArea.js +596 -684
  31. package/Tree.js +638 -682
  32. package/package.json +11 -11
  33. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +1 -5
  34. package/types/src/Breadcrumbs/BreadcrumbsContext.d.ts +7 -0
  35. package/types/src/Breadcrumbs/Item.d.ts +1 -1
  36. package/types/src/ButtonSimple/mixin.d.ts +1 -1
  37. package/types/src/JSONTree/JSONTreeItem.d.ts +1 -1
  38. package/types/src/JSONTree/renderTreeItems.d.ts +1 -1
  39. package/types/src/Modal/ModalContext.d.ts +1 -1
  40. package/types/src/Multiselect/Compact.d.ts +2 -2
  41. package/types/src/Multiselect/Normal.d.ts +2 -2
  42. package/types/src/Number/utils.d.ts +1 -1
  43. package/types/src/Popover/getPlacement.d.ts +1 -1
  44. package/types/src/RadioList/Option.d.ts +1 -1
  45. package/types/src/RadioList/RadioListContext.d.ts +1 -1
  46. package/types/src/StepBar/StepBar.d.ts +4 -1
  47. package/types/src/StepBar/StepBarContext.d.ts +1 -0
  48. package/types/src/StepBar/docs/examples/Vertical.d.ts +6 -0
  49. package/types/src/Switch/Switch.d.ts +7 -1
  50. package/types/src/TabBar/Tab.d.ts +3 -1
  51. package/types/src/TabBar/docs/examples/Icons.d.ts +4 -0
  52. package/types/src/TabBar/docs/examples/Tooltips.d.ts +3 -0
  53. package/types/src/TabLayout/Panel.d.ts +2 -0
  54. package/types/src/Table/Head.d.ts +1 -1
  55. package/types/src/Table/Row.d.ts +1 -1
  56. package/types/src/Table/Table.d.ts +1 -0
  57. package/types/src/Tree/TreeContext.d.ts +1 -1
  58. package/useControlled.js +61 -97
  59. package/usePrevious.js +30 -62
  60. package/useResizeObserver.js +95 -127
package/Code.js CHANGED
@@ -1,113 +1,13 @@
1
1
  /******/ (() => {
2
2
  // webpackBootstrap
3
3
  /******/ var e = {
4
- /***/ 6283:
5
- /***/ (e, t, n) => {
6
- "use strict";
7
- // EXPORTS
8
- n.d(t, {
9
- default: () => /* reexport */ p
10
- });
11
- // EXTERNAL MODULE: external "react"
12
- var r = n(9497);
13
- // CONCATENATED MODULE: ./src/useResizeObserver/useResizeObserver.ts
14
- function a(e, t) {
15
- return u(e) || l(e, t) || s(e, t) || i();
16
- }
17
- function i() {
18
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19
- }
20
- function s(e, t) {
21
- if (e) {
22
- if ("string" == typeof e) return o(e, t);
23
- var n = {}.toString.call(e).slice(8, -1);
24
- return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? o(e, t) : void 0;
25
- }
26
- }
27
- function o(e, t) {
28
- (null == t || t > e.length) && (t = e.length);
29
- for (var n = 0, r = Array(t); n < t; n++) {
30
- r[n] = e[n];
31
- }
32
- return r;
33
- }
34
- function l(e, t) {
35
- var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
36
- if (null != n) {
37
- var r, a, i, s, o = [], l = !0, u = !1;
38
- try {
39
- if (i = (n = n.call(e)).next, 0 === t) {
40
- if (Object(n) !== n) return;
41
- l = !1;
42
- } else for (;!(l = (r = i.call(n)).done) && (o.push(r.value), o.length !== t); l = !0) {
43
- }
44
- } catch (e) {
45
- u = !0, a = e;
46
- } finally {
47
- try {
48
- if (!l && null != n["return"] && (s = n["return"](), Object(s) !== s)) return;
49
- } finally {
50
- if (u) throw a;
51
- }
52
- }
53
- return o;
54
- }
55
- }
56
- function u(e) {
57
- if (Array.isArray(e)) return e;
58
- }
59
- /**
60
- * Watches a React ref element for changes in size.
61
- *
62
- * @param ref - The React ref to observe size changes on
63
- */ var c = function e(t, n) {
64
- var i = (0, r.useState)({
65
- width: 0,
66
- height: 0
67
- }), s = a(i, 2), o = s[0], l = s[1];
68
- (0, r.useEffect)((function() {
69
- var e = t.current;
70
- if (typeof window !== "undefined" && window.ResizeObserver) {
71
- var r = new ResizeObserver((function(e) {
72
- if (e[0]) {
73
- var r, a;
74
- var i = {
75
- width: (t === null || t === void 0 ? void 0 : (r = t.current) === null || r === void 0 ? void 0 : r.getBoundingClientRect().width) || 0,
76
- height: (t === null || t === void 0 ? void 0 : (a = t.current) === null || a === void 0 ? void 0 : a.getBoundingClientRect().height) || 0
77
- };
78
- l((function(e) {
79
- if (e.height !== i.height || e.width !== i.width) {
80
- n === null || n === void 0 ? void 0 : n(i);
81
- return i;
82
- }
83
- return e;
84
- }));
85
- }
86
- }));
87
- if (e) {
88
- r.observe(e);
89
- }
90
- return function() {
91
- if (e) {
92
- r.unobserve(e);
93
- }
94
- };
95
- }
96
- // Return a no-op function to satisfy consistent-return rule
97
- return function() {};
98
- }), [ n, t ]);
99
- return o;
100
- };
101
- /* harmony default export */ const p = c;
102
- } // CONCATENATED MODULE: ./src/useResizeObserver/index.ts
103
- /***/ ,
104
4
  /***/ 74:
105
5
  /***/ e => {
106
6
  (function() {
107
7
  var t = undefined;
108
8
  var n = undefined;
109
9
  /// <reference lib="WebWorker"/>
110
- var r = typeof t !== "undefined" ? t : typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope ? self : {};
10
+ var a = typeof t !== "undefined" ? t : typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope ? self : {};
111
11
  /**
112
12
  * Prism: Lightweight, robust, elegant syntax highlighting
113
13
  *
@@ -115,12 +15,12 @@
115
15
  * @author Lea Verou <https://lea.verou.me>
116
16
  * @namespace
117
17
  * @public
118
- */ var a = function(e) {
18
+ */ var r = function(e) {
119
19
  // Private helper vars
120
20
  var n = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;
121
- var r = 0;
21
+ var a = 0;
122
22
  // The grammar object for plaintext
123
- var a = {};
23
+ var r = {};
124
24
  var i = {
125
25
  /**
126
26
  * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
@@ -213,7 +113,7 @@
213
113
  objId: function(e) {
214
114
  if (!e["__id"]) {
215
115
  Object.defineProperty(e, "__id", {
216
- value: ++r
116
+ value: ++a
217
117
  });
218
118
  }
219
119
  return e["__id"];
@@ -230,36 +130,36 @@
230
130
  */
231
131
  clone: function e(t, n) {
232
132
  n = n || {};
233
- var r;
234
133
  var a;
134
+ var r;
235
135
  switch (i.util.type(t)) {
236
136
  case "Object":
237
- a = i.util.objId(t);
238
- if (n[a]) {
239
- return n[a];
137
+ r = i.util.objId(t);
138
+ if (n[r]) {
139
+ return n[r];
240
140
  }
241
- r = /** @type {Record<string, any>} */ {};
242
- n[a] = r;
141
+ a = /** @type {Record<string, any>} */ {};
142
+ n[r] = a;
243
143
  for (var s in t) {
244
144
  if (t.hasOwnProperty(s)) {
245
- r[s] = e(t[s], n);
145
+ a[s] = e(t[s], n);
246
146
  }
247
147
  }
248
148
  /** @type {any} */
249
- return r;
149
+ return a;
250
150
 
251
151
  case "Array":
252
- a = i.util.objId(t);
253
- if (n[a]) {
254
- return n[a];
152
+ r = i.util.objId(t);
153
+ if (n[r]) {
154
+ return n[r];
255
155
  }
256
- r = [];
257
- n[a] = r;
258
- /** @type {Array} */ /** @type {any} */ t.forEach((function(t, a) {
259
- r[a] = e(t, n);
156
+ a = [];
157
+ n[r] = a;
158
+ /** @type {Array} */ /** @type {any} */ t.forEach((function(t, r) {
159
+ a[r] = e(t, n);
260
160
  }));
261
161
  /** @type {any} */
262
- return r;
162
+ return a;
263
163
 
264
164
  default:
265
165
  return t;
@@ -318,13 +218,13 @@
318
218
  // this will not work for inline scripts
319
219
  try {
320
220
  throw new Error;
321
- } catch (r) {
221
+ } catch (a) {
322
222
  // Get file src url from stack. Specifically works with the format of stack traces in IE.
323
223
  // A stack will look like this:
324
224
  // Error
325
225
  // at _.util.currentScript (http://localhost/components/prism-core.js:119:5)
326
226
  // at Global code (http://localhost/components/prism-core.js:606:1)
327
- var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) || [])[1];
227
+ var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(a.stack) || [])[1];
328
228
  if (e) {
329
229
  var t = document.getElementsByTagName("script");
330
230
  for (var n in t) {
@@ -356,13 +256,13 @@
356
256
  * @returns {boolean}
357
257
  */
358
258
  isActive: function(e, t, n) {
359
- var r = "no-" + t;
259
+ var a = "no-" + t;
360
260
  while (e) {
361
- var a = e.classList;
362
- if (a.contains(t)) {
261
+ var r = e.classList;
262
+ if (r.contains(t)) {
363
263
  return true;
364
264
  }
365
- if (a.contains(r)) {
265
+ if (r.contains(a)) {
366
266
  return false;
367
267
  }
368
268
  e = e.parentElement;
@@ -381,10 +281,10 @@
381
281
  /**
382
282
  * The grammar for plain, unformatted text.
383
283
  */
384
- plain: a,
385
- plaintext: a,
386
- text: a,
387
- txt: a,
284
+ plain: r,
285
+ plaintext: r,
286
+ text: r,
287
+ txt: r,
388
288
  /**
389
289
  * Creates a deep copy of the language with the given id and appends the given tokens.
390
290
  *
@@ -415,8 +315,8 @@
415
315
  */
416
316
  extend: function(e, t) {
417
317
  var n = i.util.clone(i.languages[e]);
418
- for (var r in t) {
419
- n[r] = t[r];
318
+ for (var a in t) {
319
+ n[a] = t[a];
420
320
  }
421
321
  return n;
422
322
  },
@@ -495,12 +395,12 @@
495
395
  * @returns {Grammar} The new grammar object.
496
396
  * @public
497
397
  */
498
- insertBefore: function(e, t, n, r) {
499
- r = r || /** @type {any} */ i.languages;
500
- var a = r[e];
398
+ insertBefore: function(e, t, n, a) {
399
+ a = a || /** @type {any} */ i.languages;
400
+ var r = a[e];
501
401
  /** @type {Grammar} */ var s = {};
502
- for (var o in a) {
503
- if (a.hasOwnProperty(o)) {
402
+ for (var o in r) {
403
+ if (r.hasOwnProperty(o)) {
504
404
  if (o == t) {
505
405
  for (var l in n) {
506
406
  if (n.hasOwnProperty(l)) {
@@ -510,12 +410,12 @@
510
410
  }
511
411
  // Do not insert token which also occur in insert. See #1525
512
412
  if (!n.hasOwnProperty(o)) {
513
- s[o] = a[o];
413
+ s[o] = r[o];
514
414
  }
515
415
  }
516
416
  }
517
- var u = r[e];
518
- r[e] = s;
417
+ var u = a[e];
418
+ a[e] = s;
519
419
  // Update references in other language definitions
520
420
  i.languages.DFS(i.languages, (function(t, n) {
521
421
  if (n === u && t != e) {
@@ -525,20 +425,20 @@
525
425
  return s;
526
426
  },
527
427
  // Traverse a language definition with Depth First Search
528
- DFS: function e(t, n, r, a) {
529
- a = a || {};
428
+ DFS: function e(t, n, a, r) {
429
+ r = r || {};
530
430
  var s = i.util.objId;
531
431
  for (var o in t) {
532
432
  if (t.hasOwnProperty(o)) {
533
- n.call(t, o, t[o], r || o);
433
+ n.call(t, o, t[o], a || o);
534
434
  var l = t[o];
535
435
  var u = i.util.type(l);
536
- if (u === "Object" && !a[s(l)]) {
537
- a[s(l)] = true;
538
- e(l, n, null, a);
539
- } else if (u === "Array" && !a[s(l)]) {
540
- a[s(l)] = true;
541
- e(l, n, o, a);
436
+ if (u === "Object" && !r[s(l)]) {
437
+ r[s(l)] = true;
438
+ e(l, n, null, r);
439
+ } else if (u === "Array" && !r[s(l)]) {
440
+ r[s(l)] = true;
441
+ e(l, n, o, r);
542
442
  }
543
443
  }
544
444
  }
@@ -576,16 +476,16 @@
576
476
  * @public
577
477
  */
578
478
  highlightAllUnder: function(e, t, n) {
579
- var r = {
479
+ var a = {
580
480
  callback: n,
581
481
  container: e,
582
482
  selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
583
483
  };
584
- i.hooks.run("before-highlightall", r);
585
- r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector));
586
- i.hooks.run("before-all-elements-highlight", r);
587
- for (var a = 0, s; s = r.elements[a++]; ) {
588
- i.highlightElement(s, t === true, r.callback);
484
+ i.hooks.run("before-highlightall", a);
485
+ a.elements = Array.prototype.slice.apply(a.container.querySelectorAll(a.selector));
486
+ i.hooks.run("before-all-elements-highlight", a);
487
+ for (var r = 0, s; s = a.elements[r++]; ) {
488
+ i.highlightElement(s, t === true, a.callback);
589
489
  }
590
490
  },
591
491
  /**
@@ -616,21 +516,21 @@
616
516
  * @memberof Prism
617
517
  * @public
618
518
  */
619
- highlightElement: function(t, n, r) {
519
+ highlightElement: function(t, n, a) {
620
520
  // Find language
621
- var a = i.util.getLanguage(t);
622
- var s = i.languages[a];
521
+ var r = i.util.getLanguage(t);
522
+ var s = i.languages[r];
623
523
  // Set language on the element, if not present
624
- i.util.setLanguage(t, a);
524
+ i.util.setLanguage(t, r);
625
525
  // Set language on the parent, for styling
626
526
  var o = t.parentElement;
627
527
  if (o && o.nodeName.toLowerCase() === "pre") {
628
- i.util.setLanguage(o, a);
528
+ i.util.setLanguage(o, r);
629
529
  }
630
530
  var l = t.textContent;
631
531
  var u = {
632
532
  element: t,
633
- language: a,
533
+ language: r,
634
534
  grammar: s,
635
535
  code: l
636
536
  };
@@ -640,7 +540,7 @@
640
540
  u.element.innerHTML = u.highlightedCode;
641
541
  i.hooks.run("after-highlight", u);
642
542
  i.hooks.run("complete", u);
643
- r && r.call(u.element);
543
+ a && a.call(u.element);
644
544
  }
645
545
  i.hooks.run("before-sanity-check", u);
646
546
  // plugins may change/add the parent/element
@@ -650,7 +550,7 @@
650
550
  }
651
551
  if (!u.code) {
652
552
  i.hooks.run("complete", u);
653
- r && r.call(u.element);
553
+ a && a.call(u.element);
654
554
  return;
655
555
  }
656
556
  i.hooks.run("before-highlight", u);
@@ -693,18 +593,18 @@
693
593
  * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
694
594
  */
695
595
  highlight: function(e, t, n) {
696
- var r = {
596
+ var a = {
697
597
  code: e,
698
598
  grammar: t,
699
599
  language: n
700
600
  };
701
- i.hooks.run("before-tokenize", r);
702
- if (!r.grammar) {
703
- throw new Error('The language "' + r.language + '" has no grammar.');
601
+ i.hooks.run("before-tokenize", a);
602
+ if (!a.grammar) {
603
+ throw new Error('The language "' + a.language + '" has no grammar.');
704
604
  }
705
- r.tokens = i.tokenize(r.code, r.grammar);
706
- i.hooks.run("after-tokenize", r);
707
- return s.stringify(i.util.encode(r.tokens), r.language);
605
+ a.tokens = i.tokenize(a.code, a.grammar);
606
+ i.hooks.run("after-tokenize", a);
607
+ return s.stringify(i.util.encode(a.tokens), a.language);
708
608
  },
709
609
  /**
710
610
  * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
@@ -733,15 +633,15 @@
733
633
  tokenize: function(e, t) {
734
634
  var n = t.rest;
735
635
  if (n) {
736
- for (var r in n) {
737
- t[r] = n[r];
636
+ for (var a in n) {
637
+ t[a] = n[a];
738
638
  }
739
639
  delete t.rest;
740
640
  }
741
- var a = new u;
742
- c(a, a.head, e);
743
- l(e, a, t, a.head, 0);
744
- return d(a);
641
+ var r = new u;
642
+ c(r, r.head, e);
643
+ l(e, r, t, r.head, 0);
644
+ return d(r);
745
645
  },
746
646
  /**
747
647
  * @namespace
@@ -781,8 +681,8 @@
781
681
  if (!n || !n.length) {
782
682
  return;
783
683
  }
784
- for (var r = 0, a; a = n[r++]; ) {
785
- a(t);
684
+ for (var a = 0, r; r = n[a++]; ) {
685
+ r(t);
786
686
  }
787
687
  }
788
688
  },
@@ -803,7 +703,7 @@
803
703
  * @class
804
704
  * @global
805
705
  * @public
806
- */ function s(e, t, n, r) {
706
+ */ function s(e, t, n, a) {
807
707
  /**
808
708
  * The type of the token.
809
709
  *
@@ -830,7 +730,7 @@
830
730
  * @public
831
731
  */ this.alias = n;
832
732
  // Copy of the full string this token was created from
833
- this.length = (r || "").length | 0;
733
+ this.length = (a || "").length | 0;
834
734
  }
835
735
  /**
836
736
  * A token stream is an array of strings and {@link Token Token} objects.
@@ -863,13 +763,13 @@
863
763
  return t;
864
764
  }
865
765
  if (Array.isArray(t)) {
866
- var r = "";
766
+ var a = "";
867
767
  t.forEach((function(t) {
868
- r += e(t, n);
768
+ a += e(t, n);
869
769
  }));
870
- return r;
770
+ return a;
871
771
  }
872
- var a = {
772
+ var r = {
873
773
  type: t.type,
874
774
  content: e(t.content, n),
875
775
  tag: "span",
@@ -880,17 +780,17 @@
880
780
  var s = t.alias;
881
781
  if (s) {
882
782
  if (Array.isArray(s)) {
883
- Array.prototype.push.apply(a.classes, s);
783
+ Array.prototype.push.apply(r.classes, s);
884
784
  } else {
885
- a.classes.push(s);
785
+ r.classes.push(s);
886
786
  }
887
787
  }
888
- i.hooks.run("wrap", a);
788
+ i.hooks.run("wrap", r);
889
789
  var o = "";
890
- for (var l in a.attributes) {
891
- o += " " + l + '="' + (a.attributes[l] || "").replace(/"/g, "&quot;") + '"';
790
+ for (var l in r.attributes) {
791
+ o += " " + l + '="' + (r.attributes[l] || "").replace(/"/g, "&quot;") + '"';
892
792
  }
893
- return "<" + a.tag + ' class="' + a.classes.join(" ") + '"' + o + ">" + a.content + "</" + a.tag + ">";
793
+ return "<" + r.tag + ' class="' + r.classes.join(" ") + '"' + o + ">" + r.content + "</" + r.tag + ">";
894
794
  };
895
795
  /**
896
796
  * @param {RegExp} pattern
@@ -898,16 +798,16 @@
898
798
  * @param {string} text
899
799
  * @param {boolean} lookbehind
900
800
  * @returns {RegExpExecArray | null}
901
- */ function o(e, t, n, r) {
801
+ */ function o(e, t, n, a) {
902
802
  e.lastIndex = t;
903
- var a = e.exec(n);
904
- if (a && r && a[1]) {
803
+ var r = e.exec(n);
804
+ if (r && a && r[1]) {
905
805
  // change the match to remove the text matched by the Prism lookbehind group
906
- var i = a[1].length;
907
- a.index += i;
908
- a[0] = a[0].slice(i);
806
+ var i = r[1].length;
807
+ r.index += i;
808
+ r[0] = r[0].slice(i);
909
809
  }
910
- return a;
810
+ return r;
911
811
  }
912
812
  /**
913
813
  * @param {string} text
@@ -922,7 +822,7 @@
922
822
  * @typedef RematchOptions
923
823
  * @property {string} cause
924
824
  * @property {number} reach
925
- */ function l(e, t, n, r, a, u) {
825
+ */ function l(e, t, n, a, r, u) {
926
826
  for (var d in n) {
927
827
  if (!n.hasOwnProperty(d) || !n[d]) {
928
828
  continue;
@@ -934,18 +834,18 @@
934
834
  return;
935
835
  }
936
836
  var m = g[f];
937
- var v = m.inside;
938
- var h = !!m.lookbehind;
939
- var E = !!m.greedy;
837
+ var E = m.inside;
838
+ var v = !!m.lookbehind;
839
+ var h = !!m.greedy;
940
840
  var b = m.alias;
941
- if (E && !m.pattern.global) {
841
+ if (h && !m.pattern.global) {
942
842
  // Without the global flag, lastIndex won't work
943
843
  var y = m.pattern.toString().match(/[imsuy]*$/)[0];
944
844
  m.pattern = RegExp(m.pattern.source, y + "g");
945
845
  }
946
846
  /** @type {RegExp} */ var S = m.pattern || m;
947
847
  for (// iterate the token list and keep track of the current token/string position
948
- var A = r.next, T = a; A !== t.tail; T += A.value.length, A = A.next) {
848
+ var A = a.next, T = r; A !== t.tail; T += A.value.length, A = A.next) {
949
849
  if (u && T >= u.reach) {
950
850
  break;
951
851
  }
@@ -960,8 +860,8 @@
960
860
  var O = 1;
961
861
  // this is the to parameter of removeBetween
962
862
  var N;
963
- if (E) {
964
- N = o(S, T, e, h);
863
+ if (h) {
864
+ N = o(S, T, e, v);
965
865
  if (!N || N.index >= e.length) {
966
866
  break;
967
867
  }
@@ -991,7 +891,7 @@
991
891
  I = e.slice(T, k);
992
892
  N.index -= T;
993
893
  } else {
994
- N = o(S, 0, I, h);
894
+ N = o(S, 0, I, v);
995
895
  if (!N) {
996
896
  continue;
997
897
  }
@@ -1011,7 +911,7 @@
1011
911
  T += w.length;
1012
912
  }
1013
913
  p(t, P, O);
1014
- var _ = new s(d, v ? i.tokenize(F, v) : F, b, F);
914
+ var _ = new s(d, E ? i.tokenize(F, E) : F, b, F);
1015
915
  A = c(t, P, _);
1016
916
  if (C) {
1017
917
  c(t, A, C);
@@ -1072,16 +972,16 @@
1072
972
  * @template T
1073
973
  */ function c(e, t, n) {
1074
974
  // assumes that node != list.tail && values.length >= 0
1075
- var r = t.next;
1076
- var a = {
975
+ var a = t.next;
976
+ var r = {
1077
977
  value: n,
1078
978
  prev: t,
1079
- next: r
979
+ next: a
1080
980
  };
1081
- t.next = a;
1082
- r.prev = a;
981
+ t.next = r;
982
+ a.prev = r;
1083
983
  e.length++;
1084
- return a;
984
+ return r;
1085
985
  }
1086
986
  /**
1087
987
  * Removes `count` nodes after the given node. The given node will not be removed.
@@ -1091,13 +991,13 @@
1091
991
  * @param {number} count
1092
992
  * @template T
1093
993
  */ function p(e, t, n) {
1094
- var r = t.next;
1095
- for (var a = 0; a < n && r !== e.tail; a++) {
1096
- r = r.next;
994
+ var a = t.next;
995
+ for (var r = 0; r < n && a !== e.tail; r++) {
996
+ a = a.next;
1097
997
  }
1098
- t.next = r;
1099
- r.prev = t;
1100
- e.length -= a;
998
+ t.next = a;
999
+ a.prev = t;
1000
+ e.length -= r;
1101
1001
  }
1102
1002
  /**
1103
1003
  * @param {LinkedList<T>} list
@@ -1121,10 +1021,10 @@
1121
1021
  // In worker
1122
1022
  e.addEventListener("message", (function(t) {
1123
1023
  var n = JSON.parse(t.data);
1124
- var r = n.language;
1125
- var a = n.code;
1024
+ var a = n.language;
1025
+ var r = n.code;
1126
1026
  var s = n.immediateClose;
1127
- e.postMessage(i.highlight(a, i.languages[r], r));
1027
+ e.postMessage(i.highlight(r, i.languages[a], a));
1128
1028
  if (s) {
1129
1029
  e.close();
1130
1030
  }
@@ -1164,13 +1064,13 @@
1164
1064
  }
1165
1065
  }
1166
1066
  return i;
1167
- }(r);
1067
+ }(a);
1168
1068
  if (true && e.exports) {
1169
- e.exports = a;
1069
+ e.exports = r;
1170
1070
  }
1171
1071
  // hack for components to work correctly in node.js
1172
1072
  if (typeof n !== "undefined") {
1173
- n.Prism = a;
1073
+ n.Prism = r;
1174
1074
  }
1175
1075
  // some additional documentation/types
1176
1076
  /**
@@ -1217,7 +1117,7 @@
1217
1117
  * @public
1218
1118
  */
1219
1119
  // https://www.json.org/json-en.html
1220
- a.languages.json = {
1120
+ r.languages.json = {
1221
1121
  property: {
1222
1122
  pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
1223
1123
  lookbehind: true,
@@ -1241,8 +1141,8 @@
1241
1141
  alias: "keyword"
1242
1142
  }
1243
1143
  };
1244
- a.languages.webmanifest = a.languages.json;
1245
- a.languages.markup = {
1144
+ r.languages.webmanifest = r.languages.json;
1145
+ r.languages.markup = {
1246
1146
  comment: {
1247
1147
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
1248
1148
  greedy: true
@@ -1313,15 +1213,15 @@
1313
1213
  alias: "named-entity"
1314
1214
  }, /&#x?[\da-f]{1,8};/i ]
1315
1215
  };
1316
- a.languages.markup["tag"].inside["attr-value"].inside["entity"] = a.languages.markup["entity"];
1317
- a.languages.markup["doctype"].inside["internal-subset"].inside = a.languages.markup;
1216
+ r.languages.markup["tag"].inside["attr-value"].inside["entity"] = r.languages.markup["entity"];
1217
+ r.languages.markup["doctype"].inside["internal-subset"].inside = r.languages.markup;
1318
1218
  // Plugin to make entity title show the real entity, idea by Roman Komarov
1319
- a.hooks.add("wrap", (function(e) {
1219
+ r.hooks.add("wrap", (function(e) {
1320
1220
  if (e.type === "entity") {
1321
1221
  e.attributes["title"] = e.content.replace(/&amp;/, "&");
1322
1222
  }
1323
1223
  }));
1324
- Object.defineProperty(a.languages.markup.tag, "addInlined", {
1224
+ Object.defineProperty(r.languages.markup.tag, "addInlined", {
1325
1225
  /**
1326
1226
  * Adds an inlined language to markup.
1327
1227
  *
@@ -1334,22 +1234,22 @@
1334
1234
  * addInlined('style', 'css');
1335
1235
  */
1336
1236
  value: function e(t, n) {
1337
- var r = {};
1338
- r["language-" + n] = {
1237
+ var a = {};
1238
+ a["language-" + n] = {
1339
1239
  pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
1340
1240
  lookbehind: true,
1341
- inside: a.languages[n]
1241
+ inside: r.languages[n]
1342
1242
  };
1343
- r["cdata"] = /^<!\[CDATA\[|\]\]>$/i;
1243
+ a["cdata"] = /^<!\[CDATA\[|\]\]>$/i;
1344
1244
  var i = {
1345
1245
  "included-cdata": {
1346
1246
  pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1347
- inside: r
1247
+ inside: a
1348
1248
  }
1349
1249
  };
1350
1250
  i["language-" + n] = {
1351
1251
  pattern: /[\s\S]+/,
1352
- inside: a.languages[n]
1252
+ inside: r.languages[n]
1353
1253
  };
1354
1254
  var s = {};
1355
1255
  s[t] = {
@@ -1360,10 +1260,10 @@
1360
1260
  greedy: true,
1361
1261
  inside: i
1362
1262
  };
1363
- a.languages.insertBefore("markup", "cdata", s);
1263
+ r.languages.insertBefore("markup", "cdata", s);
1364
1264
  }
1365
1265
  });
1366
- Object.defineProperty(a.languages.markup.tag, "addAttribute", {
1266
+ Object.defineProperty(r.languages.markup.tag, "addAttribute", {
1367
1267
  /**
1368
1268
  * Adds an pattern to highlight languages embedded in HTML attributes.
1369
1269
  *
@@ -1376,7 +1276,7 @@
1376
1276
  * addAttribute('style', 'css');
1377
1277
  */
1378
1278
  value: function(e, t) {
1379
- a.languages.markup.tag.inside["special-attr"].push({
1279
+ r.languages.markup.tag.inside["special-attr"].push({
1380
1280
  pattern: RegExp(/(^|["'\s])/.source + "(?:" + e + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"),
1381
1281
  lookbehind: true,
1382
1282
  inside: {
@@ -1388,7 +1288,7 @@
1388
1288
  pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
1389
1289
  lookbehind: true,
1390
1290
  alias: [ t, "language-" + t ],
1391
- inside: a.languages[t]
1291
+ inside: r.languages[t]
1392
1292
  },
1393
1293
  punctuation: [ {
1394
1294
  pattern: /^=/,
@@ -1400,14 +1300,14 @@
1400
1300
  });
1401
1301
  }
1402
1302
  });
1403
- a.languages.html = a.languages.markup;
1404
- a.languages.mathml = a.languages.markup;
1405
- a.languages.svg = a.languages.markup;
1406
- a.languages.xml = a.languages.extend("markup", {});
1407
- a.languages.ssml = a.languages.xml;
1408
- a.languages.atom = a.languages.xml;
1409
- a.languages.rss = a.languages.xml;
1410
- a.languages.clike = {
1303
+ r.languages.html = r.languages.markup;
1304
+ r.languages.mathml = r.languages.markup;
1305
+ r.languages.svg = r.languages.markup;
1306
+ r.languages.xml = r.languages.extend("markup", {});
1307
+ r.languages.ssml = r.languages.xml;
1308
+ r.languages.atom = r.languages.xml;
1309
+ r.languages.rss = r.languages.xml;
1310
+ r.languages.clike = {
1411
1311
  comment: [ {
1412
1312
  pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
1413
1313
  lookbehind: true,
@@ -1435,8 +1335,8 @@
1435
1335
  operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
1436
1336
  punctuation: /[{}[\];(),.:]/
1437
1337
  };
1438
- a.languages.javascript = a.languages.extend("clike", {
1439
- "class-name": [ a.languages.clike["class-name"], {
1338
+ r.languages.javascript = r.languages.extend("clike", {
1339
+ "class-name": [ r.languages.clike["class-name"], {
1440
1340
  pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
1441
1341
  lookbehind: true
1442
1342
  } ],
@@ -1467,8 +1367,8 @@
1467
1367
  },
1468
1368
  operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
1469
1369
  });
1470
- a.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
1471
- a.languages.insertBefore("javascript", "keyword", {
1370
+ r.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
1371
+ r.languages.insertBefore("javascript", "keyword", {
1472
1372
  regex: {
1473
1373
  pattern: RegExp(
1474
1374
  // lookbehind
@@ -1490,7 +1390,7 @@
1490
1390
  pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
1491
1391
  lookbehind: true,
1492
1392
  alias: "language-regex",
1493
- inside: a.languages.regex
1393
+ inside: r.languages.regex
1494
1394
  },
1495
1395
  "regex-delimiter": /^\/|\/$/,
1496
1396
  "regex-flags": /^[a-z]+$/
@@ -1504,23 +1404,23 @@
1504
1404
  parameter: [ {
1505
1405
  pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1506
1406
  lookbehind: true,
1507
- inside: a.languages.javascript
1407
+ inside: r.languages.javascript
1508
1408
  }, {
1509
1409
  pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1510
1410
  lookbehind: true,
1511
- inside: a.languages.javascript
1411
+ inside: r.languages.javascript
1512
1412
  }, {
1513
1413
  pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1514
1414
  lookbehind: true,
1515
- inside: a.languages.javascript
1415
+ inside: r.languages.javascript
1516
1416
  }, {
1517
1417
  pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
1518
1418
  lookbehind: true,
1519
- inside: a.languages.javascript
1419
+ inside: r.languages.javascript
1520
1420
  } ],
1521
1421
  constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
1522
1422
  });
1523
- a.languages.insertBefore("javascript", "string", {
1423
+ r.languages.insertBefore("javascript", "string", {
1524
1424
  hashbang: {
1525
1425
  pattern: /^#!.*/,
1526
1426
  greedy: true,
@@ -1542,7 +1442,7 @@
1542
1442
  pattern: /^\$\{|\}$/,
1543
1443
  alias: "punctuation"
1544
1444
  },
1545
- rest: a.languages.javascript
1445
+ rest: r.languages.javascript
1546
1446
  }
1547
1447
  },
1548
1448
  string: /[\s\S]+/
@@ -1555,25 +1455,25 @@
1555
1455
  alias: "property"
1556
1456
  }
1557
1457
  });
1558
- a.languages.insertBefore("javascript", "operator", {
1458
+ r.languages.insertBefore("javascript", "operator", {
1559
1459
  "literal-property": {
1560
1460
  pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
1561
1461
  lookbehind: true,
1562
1462
  alias: "property"
1563
1463
  }
1564
1464
  });
1565
- if (a.languages.markup) {
1566
- a.languages.markup.tag.addInlined("script", "javascript");
1465
+ if (r.languages.markup) {
1466
+ r.languages.markup.tag.addInlined("script", "javascript");
1567
1467
  // add attribute support for all DOM events.
1568
1468
  // https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events
1569
- a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript");
1469
+ r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript");
1570
1470
  }
1571
- a.languages.js = a.languages.javascript;
1471
+ r.languages.js = r.languages.javascript;
1572
1472
  (function(e) {
1573
1473
  var t = e.util.clone(e.languages.javascript);
1574
1474
  var n = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source;
1575
- var r = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source;
1576
- var a = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
1475
+ var a = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source;
1476
+ var r = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
1577
1477
  /**
1578
1478
  * @param {string} source
1579
1479
  * @param {string} [flags]
@@ -1581,13 +1481,13 @@
1581
1481
  e = e.replace(/<S>/g, (function() {
1582
1482
  return n;
1583
1483
  })).replace(/<BRACES>/g, (function() {
1584
- return r;
1585
- })).replace(/<SPREAD>/g, (function() {
1586
1484
  return a;
1485
+ })).replace(/<SPREAD>/g, (function() {
1486
+ return r;
1587
1487
  }));
1588
1488
  return RegExp(e, t);
1589
1489
  }
1590
- a = i(a).source;
1490
+ r = i(r).source;
1591
1491
  e.languages.jsx = e.languages.extend("markup", t);
1592
1492
  e.languages.jsx.tag.pattern = i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source);
1593
1493
  e.languages.jsx.tag.inside["tag"].pattern = /^<\/?[^\s>\/]*/;
@@ -1629,59 +1529,59 @@
1629
1529
  };
1630
1530
  var o = function(t) {
1631
1531
  var n = [];
1632
- for (var r = 0; r < t.length; r++) {
1633
- var a = t[r];
1532
+ for (var a = 0; a < t.length; a++) {
1533
+ var r = t[a];
1634
1534
  var i = false;
1635
- if (typeof a !== "string") {
1636
- if (a.type === "tag" && a.content[0] && a.content[0].type === "tag") {
1535
+ if (typeof r !== "string") {
1536
+ if (r.type === "tag" && r.content[0] && r.content[0].type === "tag") {
1637
1537
  // We found a tag, now find its kind
1638
- if (a.content[0].content[0].content === "</") {
1538
+ if (r.content[0].content[0].content === "</") {
1639
1539
  // Closing tag
1640
- if (n.length > 0 && n[n.length - 1].tagName === s(a.content[0].content[1])) {
1540
+ if (n.length > 0 && n[n.length - 1].tagName === s(r.content[0].content[1])) {
1641
1541
  // Pop matching opening tag
1642
1542
  n.pop();
1643
1543
  }
1644
1544
  } else {
1645
- if (a.content[a.content.length - 1].content === "/>") {
1545
+ if (r.content[r.content.length - 1].content === "/>") {
1646
1546
  // Autoclosed tag, ignore
1647
1547
  } else {
1648
1548
  // Opening tag
1649
1549
  n.push({
1650
- tagName: s(a.content[0].content[1]),
1550
+ tagName: s(r.content[0].content[1]),
1651
1551
  openedBraces: 0
1652
1552
  });
1653
1553
  }
1654
1554
  }
1655
- } else if (n.length > 0 && a.type === "punctuation" && a.content === "{") {
1555
+ } else if (n.length > 0 && r.type === "punctuation" && r.content === "{") {
1656
1556
  // Here we might have entered a JSX context inside a tag
1657
1557
  n[n.length - 1].openedBraces++;
1658
- } else if (n.length > 0 && n[n.length - 1].openedBraces > 0 && a.type === "punctuation" && a.content === "}") {
1558
+ } else if (n.length > 0 && n[n.length - 1].openedBraces > 0 && r.type === "punctuation" && r.content === "}") {
1659
1559
  // Here we might have left a JSX context inside a tag
1660
1560
  n[n.length - 1].openedBraces--;
1661
1561
  } else {
1662
1562
  i = true;
1663
1563
  }
1664
1564
  }
1665
- if (i || typeof a === "string") {
1565
+ if (i || typeof r === "string") {
1666
1566
  if (n.length > 0 && n[n.length - 1].openedBraces === 0) {
1667
1567
  // Here we are inside a tag, and not inside a JSX context.
1668
1568
  // That's plain text: drop any tokens matched.
1669
- var l = s(a);
1569
+ var l = s(r);
1670
1570
  // And merge text with adjacent text
1671
- if (r < t.length - 1 && (typeof t[r + 1] === "string" || t[r + 1].type === "plain-text")) {
1672
- l += s(t[r + 1]);
1673
- t.splice(r + 1, 1);
1571
+ if (a < t.length - 1 && (typeof t[a + 1] === "string" || t[a + 1].type === "plain-text")) {
1572
+ l += s(t[a + 1]);
1573
+ t.splice(a + 1, 1);
1674
1574
  }
1675
- if (r > 0 && (typeof t[r - 1] === "string" || t[r - 1].type === "plain-text")) {
1676
- l = s(t[r - 1]) + l;
1677
- t.splice(r - 1, 1);
1678
- r--;
1575
+ if (a > 0 && (typeof t[a - 1] === "string" || t[a - 1].type === "plain-text")) {
1576
+ l = s(t[a - 1]) + l;
1577
+ t.splice(a - 1, 1);
1578
+ a--;
1679
1579
  }
1680
- t[r] = new e.Token("plain-text", l, null, l);
1580
+ t[a] = new e.Token("plain-text", l, null, l);
1681
1581
  }
1682
1582
  }
1683
- if (a.content && typeof a.content !== "string") {
1684
- o(a.content);
1583
+ if (r.content && typeof r.content !== "string") {
1584
+ o(r.content);
1685
1585
  }
1686
1586
  }
1687
1587
  };
@@ -1691,7 +1591,7 @@
1691
1591
  }
1692
1592
  o(e.tokens);
1693
1593
  }));
1694
- })(a);
1594
+ })(r);
1695
1595
  (function(e) {
1696
1596
  e.languages.typescript = e.languages.extend("javascript", {
1697
1597
  "class-name": {
@@ -1742,7 +1642,7 @@
1742
1642
  }
1743
1643
  });
1744
1644
  e.languages.ts = e.languages.typescript;
1745
- })(a);
1645
+ })(r);
1746
1646
  (function(e) {
1747
1647
  var t = e.util.clone(e.languages.typescript);
1748
1648
  e.languages.tsx = e.languages.extend("jsx", t);
@@ -1755,7 +1655,7 @@
1755
1655
  var n = e.languages.tsx.tag;
1756
1656
  n.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + n.pattern.source + ")", n.pattern.flags);
1757
1657
  n.lookbehind = true;
1758
- })(a);
1658
+ })(r);
1759
1659
  (function(e) {
1760
1660
  var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1761
1661
  e.languages.css = {
@@ -1813,7 +1713,7 @@
1813
1713
  n.tag.addInlined("style", "css");
1814
1714
  n.tag.addAttribute("style", "css");
1815
1715
  }
1816
- })(a);
1716
+ })(r);
1817
1717
  (function(e) {
1818
1718
  // $ set | grep '^[A-Z][^[:space:]]*=' | cut -d= -f1 | tr '\n' '|'
1819
1719
  // + LC_ALL, RANDOM, REPLY, SECONDS.
@@ -1827,7 +1727,7 @@
1827
1727
  // this looks reasonably well in all themes
1828
1728
  inside: null
1829
1729
  };
1830
- var r = {
1730
+ var a = {
1831
1731
  bash: n,
1832
1732
  environment: {
1833
1733
  pattern: RegExp("\\$" + t),
@@ -1932,7 +1832,7 @@
1932
1832
  pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
1933
1833
  lookbehind: true,
1934
1834
  greedy: true,
1935
- inside: r
1835
+ inside: a
1936
1836
  },
1937
1837
  // Here-document with quotes around the tag
1938
1838
  // → No expansion (so no “inside”).
@@ -1950,7 +1850,7 @@
1950
1850
  pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
1951
1851
  lookbehind: true,
1952
1852
  greedy: true,
1953
- inside: r
1853
+ inside: a
1954
1854
  }, {
1955
1855
  // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
1956
1856
  pattern: /(^|[^$\\])'[^']*'/,
@@ -1961,14 +1861,14 @@
1961
1861
  pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
1962
1862
  greedy: true,
1963
1863
  inside: {
1964
- entity: r.entity
1864
+ entity: a.entity
1965
1865
  }
1966
1866
  } ],
1967
1867
  environment: {
1968
1868
  pattern: RegExp("\\$?" + t),
1969
1869
  alias: "constant"
1970
1870
  },
1971
- variable: r.variable,
1871
+ variable: a.variable,
1972
1872
  function: {
1973
1873
  pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
1974
1874
  lookbehind: true
@@ -2009,14 +1909,14 @@
2009
1909
  }
2010
1910
  };
2011
1911
  n.inside = e.languages.bash;
2012
- /* Patterns in command substitution. */ var a = [ "comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number" ];
2013
- var i = r.variable[1].inside;
2014
- for (var s = 0; s < a.length; s++) {
2015
- i[a[s]] = e.languages.bash[a[s]];
1912
+ /* Patterns in command substitution. */ var r = [ "comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number" ];
1913
+ var i = a.variable[1].inside;
1914
+ for (var s = 0; s < r.length; s++) {
1915
+ i[r[s]] = e.languages.bash[r[s]];
2016
1916
  }
2017
1917
  e.languages.sh = e.languages.bash;
2018
1918
  e.languages.shell = e.languages.bash;
2019
- })(a);
1919
+ })(r);
2020
1920
  (function(e) {
2021
1921
  // https://yaml.org/spec/1.2/spec.html#c-ns-anchor-property
2022
1922
  // https://yaml.org/spec/1.2/spec.html#c-ns-alias-node
@@ -2024,11 +1924,11 @@
2024
1924
  // https://yaml.org/spec/1.2/spec.html#c-ns-tag-property
2025
1925
  var n = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/;
2026
1926
  // https://yaml.org/spec/1.2/spec.html#c-ns-properties(n,c)
2027
- var r = "(?:" + n.source + "(?:[ \t]+" + t.source + ")?|" + t.source + "(?:[ \t]+" + n.source + ")?)";
1927
+ var a = "(?:" + n.source + "(?:[ \t]+" + t.source + ")?|" + t.source + "(?:[ \t]+" + n.source + ")?)";
2028
1928
  // https://yaml.org/spec/1.2/spec.html#ns-plain(n,c)
2029
1929
  // This is a simplified version that doesn't support "#" and multiline keys
2030
1930
  // All these long scarry character classes are simplified versions of YAML's characters
2031
- var a = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, (function() {
1931
+ var r = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, (function() {
2032
1932
  return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
2033
1933
  }));
2034
1934
  var i = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
@@ -2041,7 +1941,7 @@
2041
1941
  t = (t || "").replace(/m/g, "") + "m";
2042
1942
  // add m flag
2043
1943
  var n = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, (function() {
2044
- return r;
1944
+ return a;
2045
1945
  })).replace(/<<value>>/g, (function() {
2046
1946
  return e;
2047
1947
  }));
@@ -2050,7 +1950,7 @@
2050
1950
  e.languages.yaml = {
2051
1951
  scalar: {
2052
1952
  pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, (function() {
2053
- return r;
1953
+ return a;
2054
1954
  }))),
2055
1955
  lookbehind: true,
2056
1956
  alias: "string"
@@ -2058,9 +1958,9 @@
2058
1958
  comment: /#.*/,
2059
1959
  key: {
2060
1960
  pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, (function() {
2061
- return r;
1961
+ return a;
2062
1962
  })).replace(/<<key>>/g, (function() {
2063
- return "(?:" + a + "|" + i + ")";
1963
+ return "(?:" + r + "|" + i + ")";
2064
1964
  }))),
2065
1965
  lookbehind: true,
2066
1966
  greedy: true,
@@ -2100,8 +2000,8 @@
2100
2000
  punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
2101
2001
  };
2102
2002
  e.languages.yml = e.languages.yaml;
2103
- })(a);
2104
- a.languages["splunk-spl"] = {
2003
+ })(r);
2004
+ r.languages["splunk-spl"] = {
2105
2005
  comment: /`comment\("(?:\\.|[^\\"])*"\)`/,
2106
2006
  string: {
2107
2007
  pattern: /"(?:\\.|[^\\"])*"/,
@@ -2125,7 +2025,7 @@
2125
2025
  operator: /[<>=]=?|[-+*/%|]/,
2126
2026
  punctuation: /[()[\],]/
2127
2027
  };
2128
- a.languages.sql = {
2028
+ r.languages.sql = {
2129
2029
  comment: {
2130
2030
  pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
2131
2031
  lookbehind: true
@@ -2156,11 +2056,6 @@
2156
2056
  punctuation: /[;[\]()`,.]/
2157
2057
  };
2158
2058
  })();
2159
- /***/ },
2160
- /***/ 9497:
2161
- /***/ e => {
2162
- "use strict";
2163
- e.exports = require("react");
2164
2059
  /***/
2165
2060
  /******/ }
2166
2061
  };
@@ -2169,21 +2064,21 @@
2169
2064
  /******/ var t = {};
2170
2065
  /******/
2171
2066
  /******/ // The require function
2172
- /******/ function n(r) {
2067
+ /******/ function n(a) {
2173
2068
  /******/ // Check if module is in cache
2174
- /******/ var a = t[r];
2175
- /******/ if (a !== undefined) {
2176
- /******/ return a.exports;
2069
+ /******/ var r = t[a];
2070
+ /******/ if (r !== undefined) {
2071
+ /******/ return r.exports;
2177
2072
  /******/ }
2178
2073
  /******/ // Create a new module (and put it into the cache)
2179
- /******/ var i = t[r] = {
2074
+ /******/ var i = t[a] = {
2180
2075
  /******/ // no module.id needed
2181
2076
  /******/ // no module.loaded needed
2182
2077
  /******/ exports: {}
2183
2078
  /******/ };
2184
2079
  /******/
2185
2080
  /******/ // Execute the module function
2186
- /******/ e[r](i, i.exports, n);
2081
+ /******/ e[a](i, i.exports, n);
2187
2082
  /******/
2188
2083
  /******/ // Return the exports of the module
2189
2084
  /******/ return i.exports;
@@ -2209,11 +2104,11 @@
2209
2104
  /******/ (() => {
2210
2105
  /******/ // define getter functions for harmony exports
2211
2106
  /******/ n.d = (e, t) => {
2212
- /******/ for (var r in t) {
2213
- /******/ if (n.o(t, r) && !n.o(e, r)) {
2214
- /******/ Object.defineProperty(e, r, {
2107
+ /******/ for (var a in t) {
2108
+ /******/ if (n.o(t, a) && !n.o(e, a)) {
2109
+ /******/ Object.defineProperty(e, a, {
2215
2110
  enumerable: true,
2216
- get: t[r]
2111
+ get: t[a]
2217
2112
  });
2218
2113
  /******/ }
2219
2114
  /******/ }
@@ -2241,22 +2136,22 @@
2241
2136
  /******/ };
2242
2137
  /******/ })();
2243
2138
  /******/
2244
- /************************************************************************/ var r = {};
2139
+ /************************************************************************/ var a = {};
2245
2140
  // This entry need to be wrapped in an IIFE because it need to be in strict mode.
2246
2141
  (() => {
2247
2142
  "use strict";
2248
2143
  // ESM COMPAT FLAG
2249
- n.r(r);
2144
+ n.r(a);
2250
2145
  // EXPORTS
2251
- n.d(r, {
2252
- default: () => /* reexport */ ae
2146
+ n.d(a, {
2147
+ default: () => /* reexport */ ie
2253
2148
  });
2254
- // EXTERNAL MODULE: external "react"
2255
- var e = n(9497);
2149
+ // CONCATENATED MODULE: external "react"
2150
+ const e = require("react");
2256
2151
  var t = n.n(e);
2257
2152
  // CONCATENATED MODULE: external "lodash/castArray"
2258
- const a = require("lodash/castArray");
2259
- var i = n.n(a);
2153
+ const r = require("lodash/castArray");
2154
+ var i = n.n(r);
2260
2155
  // CONCATENATED MODULE: external "lodash/flatten"
2261
2156
  const s = require("lodash/flatten");
2262
2157
  var o = n.n(s);
@@ -2272,73 +2167,76 @@
2272
2167
  // CONCATENATED MODULE: external "prop-types"
2273
2168
  const f = require("prop-types");
2274
2169
  var m = n.n(f);
2170
+ // CONCATENATED MODULE: external "@splunk/react-ui/useResizeObserver"
2171
+ const E = require("@splunk/react-ui/useResizeObserver");
2172
+ var v = n.n(E);
2275
2173
  // CONCATENATED MODULE: external "styled-components"
2276
- const v = require("styled-components");
2277
- var h = n.n(v);
2174
+ const h = require("styled-components");
2175
+ var b = n.n(h);
2278
2176
  // CONCATENATED MODULE: external "@splunk/themes"
2279
- const E = require("@splunk/themes");
2177
+ const y = require("@splunk/themes");
2280
2178
  // CONCATENATED MODULE: ./src/Code/CodeStyles.ts
2281
- var b = "lineHeightSpacious";
2282
- var y = "spacingLarge";
2283
- var S = h().code.withConfig({
2179
+ var S = "lineHeightSpacious";
2180
+ var A = "spacingLarge";
2181
+ var T = b().code.withConfig({
2284
2182
  displayName: "CodeStyles__StyledCode",
2285
2183
  componentId: "sc-1eq4k68-0"
2286
- })([ "font-family:", ";position:relative;z-index:1;", ";" ], E.variables.monoFontFamily, (function(e) {
2184
+ })([ "font-family:", ";position:relative;z-index:1;", ";" ], y.variables.monoFontFamily, (function(e) {
2287
2185
  var t = e.$isPlaintext;
2288
- return !t && (0, v.css)([ "color:", ";" ], E.variables.syntaxTeal);
2186
+ return !t && (0, h.css)([ "color:", ";" ], y.variables.syntaxTeal);
2289
2187
  }));
2290
- var A = h().pre.withConfig({
2188
+ var I = b().pre.withConfig({
2291
2189
  displayName: "CodeStyles__StyledPre",
2292
2190
  componentId: "sc-1eq4k68-1"
2293
- })([ "", ";", ";line-height:", ";position:relative;text-align:left;tab-size:4;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;hyphens:none;overflow-x:auto;&:focus-visible{box-shadow:", ";}", " ", ";" ], E.mixins.reset("grid"), E.mixins.typography("monoBody"), E.variables[b], E.variables.focusShadow, (function(e) {
2191
+ })([ "", ";", ";line-height:", ";position:relative;text-align:left;tab-size:4;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;hyphens:none;overflow-x:auto;&:focus-visible{box-shadow:", ";}", " ", ";" ], y.mixins.reset("grid"), y.mixins.typography("monoBody"), y.variables[S], y.variables.focusShadow, (function(e) {
2294
2192
  var t = e.$showLineNumbers, n = e.$counterReset;
2295
- return t && (0, v.css)([ "grid-template-columns:min-content auto;counter-reset:linenumber ", ";" ], n);
2193
+ return t && (0, h.css)([ "grid-template-columns:min-content auto;counter-reset:linenumber ", ";" ], n);
2296
2194
  }), (function(e) {
2297
2195
  var t = e.$containerAppearance;
2298
- return t === "none" ? (0, v.css)([ "gap:", ";" ], E.variables.spacingMedium) : (0,
2299
- v.css)([ "background-color:", ";border-radius:", ";", "{margin:", ";}" ], E.variables.neutral50, E.variables.borderRadius, /* sc-sel */ S, E.variables[y]);
2196
+ return t === "none" ? (0, h.css)([ "gap:", ";" ], y.variables.spacingMedium) : (0,
2197
+ h.css)([ "background-color:", ";border-radius:", ";", "{margin:", ";}" ], y.variables.neutral50, y.variables.borderRadius, /* sc-sel */ T, y.variables[A]);
2300
2198
  }));
2301
- var T = h().span.withConfig({
2199
+ var O = b().span.withConfig({
2302
2200
  displayName: "CodeStyles__StyledIndent",
2303
2201
  componentId: "sc-1eq4k68-2"
2304
- })([ "&:not(:last-child){background-image:linear-gradient( to left,", " 1px,transparent 1px,transparent );}" ], E.variables.syntaxGray);
2305
- var I = {
2306
- comment: E.variables.syntaxGray,
2307
- prolog: E.variables.syntaxGray,
2308
- doctype: E.variables.syntaxGray,
2309
- cdata: E.variables.syntaxGray,
2310
- punctuation: E.variables.syntaxGray,
2311
- property: E.variables.syntaxPurple,
2312
- tag: E.variables.syntaxPurple,
2313
- boolean: E.variables.syntaxPurple,
2314
- number: E.variables.syntaxPurple,
2315
- constant: E.variables.syntaxPurple,
2316
- symbol: E.variables.syntaxPurple,
2317
- deleted: E.variables.syntaxPurple,
2318
- key: E.variables.syntaxPurple,
2319
- selector: E.variables.syntaxGreen,
2320
- "attr-name": E.variables.syntaxGreen,
2321
- string: E.variables.syntaxGreen,
2322
- char: E.variables.syntaxGreen,
2323
- builtin: E.variables.syntaxGreen,
2324
- inserted: E.variables.syntaxGreen,
2325
- operator: E.variables.syntaxBrown,
2326
- entity: E.variables.syntaxBrown,
2327
- url: E.variables.syntaxBrown,
2328
- atrule: E.variables.syntaxBlue,
2329
- "attr-value": E.variables.syntaxBlue,
2330
- keyword: E.variables.syntaxBlue,
2331
- function: E.variables.syntaxRed,
2332
- regex: E.variables.syntaxOrange,
2333
- important: E.variables.syntaxOrange,
2334
- variable: E.variables.syntaxOrange
2202
+ })([ "&:not(:last-child){background-image:linear-gradient( to left,", " 1px,transparent 1px,transparent );}" ], y.variables.syntaxGray);
2203
+ var N = {
2204
+ comment: y.variables.syntaxGray,
2205
+ prolog: y.variables.syntaxGray,
2206
+ doctype: y.variables.syntaxGray,
2207
+ cdata: y.variables.syntaxGray,
2208
+ punctuation: y.variables.syntaxGray,
2209
+ property: y.variables.syntaxPurple,
2210
+ tag: y.variables.syntaxPurple,
2211
+ boolean: y.variables.syntaxPurple,
2212
+ number: y.variables.syntaxPurple,
2213
+ constant: y.variables.syntaxPurple,
2214
+ symbol: y.variables.syntaxPurple,
2215
+ deleted: y.variables.syntaxPurple,
2216
+ key: y.variables.syntaxPurple,
2217
+ selector: y.variables.syntaxGreen,
2218
+ "attr-name": y.variables.syntaxGreen,
2219
+ string: y.variables.syntaxGreen,
2220
+ char: y.variables.syntaxGreen,
2221
+ builtin: y.variables.syntaxGreen,
2222
+ inserted: y.variables.syntaxGreen,
2223
+ operator: y.variables.syntaxBrown,
2224
+ entity: y.variables.syntaxBrown,
2225
+ url: y.variables.syntaxBrown,
2226
+ atrule: y.variables.syntaxBlue,
2227
+ "attr-value": y.variables.syntaxBlue,
2228
+ keyword: y.variables.syntaxBlue,
2229
+ function: y.variables.syntaxRed,
2230
+ regex: y.variables.syntaxOrange,
2231
+ important: y.variables.syntaxOrange,
2232
+ variable: y.variables.syntaxOrange
2335
2233
  };
2336
- var O = h().span.withConfig({
2234
+ var x = b().span.withConfig({
2337
2235
  displayName: "CodeStyles__StyledToken",
2338
2236
  componentId: "sc-1eq4k68-3"
2339
2237
  })([ "color:", ";cursor:", ";opacity:", ";font-style:", ";font-weight:", ";" ], (function(e) {
2340
2238
  var t = e.partType;
2341
- return I[t];
2239
+ return N[t];
2342
2240
  }), (function(e) {
2343
2241
  var t = e.partType;
2344
2242
  return t === "entity" ? "help" : null;
@@ -2350,80 +2248,80 @@
2350
2248
  return t === "italic" ? "italic" : null;
2351
2249
  }), (function(e) {
2352
2250
  var t = e.partType;
2353
- return t === "important" || t === "bold" ? E.variables.fontWeightBold : null;
2251
+ return t === "important" || t === "bold" ? y.variables.fontWeightBold : null;
2354
2252
  }));
2355
2253
  // CONCATENATED MODULE: ./src/Code/LineHighlightsStyles.ts
2356
- var N = h().div.withConfig({
2254
+ var R = b().div.withConfig({
2357
2255
  displayName: "LineHighlightsStyles__StyledLineHighlight",
2358
2256
  componentId: "sc-1x2b02z-0"
2359
- })([ "position:absolute;left:0;height:1lh;background:", ";border-left:2px solid ", ";pointer-events:none;line-height:inherit;width:", "px;", ";" ], E.variables.notificationColorInfoWeak, E.variables.notificationColorInfo, (function(e) {
2257
+ })([ "position:absolute;left:0;height:1lh;background:", ";border-left:2px solid ", ";pointer-events:none;line-height:inherit;width:", "px;", ";" ], y.variables.notificationColorInfoWeak, y.variables.notificationColorInfo, (function(e) {
2360
2258
  var t = e.$width;
2361
2259
  return t;
2362
2260
  }), (function(e) {
2363
2261
  var t = e.$containerAppearance, n = e.$lineNum;
2364
- return t === "none" ? (0, v.css)([ "top:calc(", " * ", "em);" ], n - 1, E.variables[b]) : (0,
2365
- v.css)([ "top:calc( ", " * ", "em + ", " );" ], n - 1, E.variables[b], E.variables[y]);
2262
+ return t === "none" ? (0, h.css)([ "top:calc(", " * ", "em);" ], n - 1, y.variables[S]) : (0,
2263
+ h.css)([ "top:calc( ", " * ", "em + ", " );" ], n - 1, y.variables[S], y.variables[A]);
2366
2264
  }));
2367
2265
  // CONCATENATED MODULE: ./src/Code/LineHighlights.tsx
2368
- function x(e, t) {
2369
- return w(e) || F(e, t) || k(e, t) || R();
2266
+ function k(e, t) {
2267
+ return D(e) || C(e, t) || F(e, t) || L();
2370
2268
  }
2371
- function R() {
2269
+ function L() {
2372
2270
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2373
2271
  }
2374
- function k(e, t) {
2272
+ function F(e, t) {
2375
2273
  if (e) {
2376
- if ("string" == typeof e) return L(e, t);
2274
+ if ("string" == typeof e) return w(e, t);
2377
2275
  var n = {}.toString.call(e).slice(8, -1);
2378
- return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? L(e, t) : void 0;
2276
+ return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? w(e, t) : void 0;
2379
2277
  }
2380
2278
  }
2381
- function L(e, t) {
2279
+ function w(e, t) {
2382
2280
  (null == t || t > e.length) && (t = e.length);
2383
- for (var n = 0, r = Array(t); n < t; n++) {
2384
- r[n] = e[n];
2281
+ for (var n = 0, a = Array(t); n < t; n++) {
2282
+ a[n] = e[n];
2385
2283
  }
2386
- return r;
2284
+ return a;
2387
2285
  }
2388
- function F(e, t) {
2286
+ function C(e, t) {
2389
2287
  var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
2390
2288
  if (null != n) {
2391
- var r, a, i, s, o = [], l = !0, u = !1;
2289
+ var a, r, i, s, o = [], l = !0, u = !1;
2392
2290
  try {
2393
2291
  if (i = (n = n.call(e)).next, 0 === t) {
2394
2292
  if (Object(n) !== n) return;
2395
2293
  l = !1;
2396
- } else for (;!(l = (r = i.call(n)).done) && (o.push(r.value), o.length !== t); l = !0) {
2294
+ } else for (;!(l = (a = i.call(n)).done) && (o.push(a.value), o.length !== t); l = !0) {
2397
2295
  }
2398
2296
  } catch (e) {
2399
- u = !0, a = e;
2297
+ u = !0, r = e;
2400
2298
  } finally {
2401
2299
  try {
2402
2300
  if (!l && null != n["return"] && (s = n["return"](), Object(s) !== s)) return;
2403
2301
  } finally {
2404
- if (u) throw a;
2302
+ if (u) throw r;
2405
2303
  }
2406
2304
  }
2407
2305
  return o;
2408
2306
  }
2409
2307
  }
2410
- function w(e) {
2308
+ function D(e) {
2411
2309
  if (Array.isArray(e)) return e;
2412
2310
  }
2413
2311
  // parseHighlightLines will turn a string like "2,4-5" into an array of ranges like [[2, 2], [4, 5]]
2414
- var C = function e(t) {
2312
+ var P = function e(t) {
2415
2313
  return t.replace(/\s+/g, "").split(",").filter(Boolean).map((function(e) {
2416
- var t = e.split("-").map(Number), n = x(t, 2), r = n[0], a = n[1];
2417
- return [ r, a || r ];
2314
+ var t = e.split("-").map(Number), n = k(t, 2), a = n[0], r = n[1];
2315
+ return [ a, r || a ];
2418
2316
  }));
2419
2317
  };
2420
2318
  // Flatten the array of ranges into a single array of line numbers
2421
2319
  // example: [[2, 2], [4, 5]] will become [2, 4, 5]
2422
- var D = function e(t) {
2320
+ var _ = function e(t) {
2423
2321
  var n = t.map((function(e) {
2424
- var t = x(e, 2), n = t[0], r = t[1];
2322
+ var t = k(e, 2), n = t[0], a = t[1];
2425
2323
  return Array.from({
2426
- length: r - n + 1
2324
+ length: a - n + 1
2427
2325
  }, (function(e, t) {
2428
2326
  return n + t;
2429
2327
  }));
@@ -2433,39 +2331,39 @@
2433
2331
  return Array.from(new Set(n));
2434
2332
  // Remove duplicates
2435
2333
  };
2436
- var P = function e(n) {
2437
- var r = n.containerAppearance, a = n.highlight, i = n.width;
2438
- var s = C(a);
2439
- var o = D(s);
2334
+ var $ = function e(n) {
2335
+ var a = n.containerAppearance, r = n.highlight, i = n.width;
2336
+ var s = P(r);
2337
+ var o = _(s);
2440
2338
 
2441
2339
  return t().createElement(t().Fragment, null, o.map((function(e) {
2442
2340
 
2443
- return t().createElement(N, {
2341
+ return t().createElement(R, {
2444
2342
  key: e,
2445
2343
  className: "line-highlight",
2446
2344
  "aria-hidden": "true",
2447
- $containerAppearance: r,
2345
+ $containerAppearance: a,
2448
2346
  $lineNum: e,
2449
2347
  $width: i
2450
2348
  });
2451
2349
  })));
2452
2350
  };
2453
- /* harmony default export */ const _ = P;
2351
+ /* harmony default export */ const U = $;
2454
2352
  // CONCATENATED MODULE: ./src/Code/LineNumbersStyles.ts
2455
- var $ = h().span.withConfig({
2353
+ var M = b().span.withConfig({
2456
2354
  displayName: "LineNumbersStyles__StyledLineNumberRows",
2457
2355
  componentId: "sc-1h4k3dh-0"
2458
2356
  })([ "pointer-events:none;user-select:none;", ";& > span{display:block;counter-increment:linenumber;position:relative;z-index:1;&::before{display:block;content:counter(linenumber);color:", ";text-align:right;", "}}" ], (function(e) {
2459
2357
  var t = e.$containerAppearance;
2460
- return t === "none" ? (0, v.css)([ "border-right:1px solid ", ";z-index:1;" ], E.variables.borderColor) : (0,
2461
- v.css)([ "padding:", ";background-color:", ";" ], E.variables[y], E.variables.neutral200);
2462
- }), E.variables.contentColorDefault, (function(e) {
2358
+ return t === "none" ? (0, h.css)([ "border-right:1px solid ", ";z-index:1;" ], y.variables.borderColor) : (0,
2359
+ h.css)([ "padding:", ";background-color:", ";" ], y.variables[A], y.variables.neutral200);
2360
+ }), y.variables.contentColorDefault, (function(e) {
2463
2361
  var t = e.$containerAppearance;
2464
- return t === "none" && (0, v.css)([ "padding-inline-end:", ";" ], E.variables.spacingSmall);
2362
+ return t === "none" && (0, h.css)([ "padding-inline-end:", ";" ], y.variables.spacingSmall);
2465
2363
  }));
2466
2364
  // CONCATENATED MODULE: ./src/Code/LineNumbers.tsx
2467
- function U(e) {
2468
- var n = e.containerAppearance, r = n === void 0 ? "none" : n, a = e.value, i = a === void 0 ? "" : a;
2365
+ function B(e) {
2366
+ var n = e.containerAppearance, a = n === void 0 ? "none" : n, r = e.value, i = r === void 0 ? "" : r;
2469
2367
  // Use a regex to see how many lines there are in the value, then output an
2470
2368
  // empty span for each line. The numbers themselves are handled by the CSS counter.
2471
2369
  var s = i.match(/\n(?!$)/g);
@@ -2479,17 +2377,15 @@
2479
2377
  });
2480
2378
  }));
2481
2379
 
2482
- return t().createElement($, {
2483
- $containerAppearance: r,
2380
+ return t().createElement(M, {
2381
+ $containerAppearance: a,
2484
2382
  "aria-hidden": true
2485
2383
  }, l);
2486
2384
  }
2487
- /* harmony default export */ const M = U;
2488
- // EXTERNAL MODULE: ./src/useResizeObserver/index.ts + 1 modules
2489
- var B = n(6283);
2385
+ /* harmony default export */ const G = B;
2490
2386
  // EXTERNAL MODULE: ./src/Code/prism/prism.empty
2491
- var G = n(74);
2492
- var j = n.n(G);
2387
+ var H = n(74);
2388
+ var j = n.n(H);
2493
2389
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
2494
2390
  /**
2495
2391
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
@@ -2497,7 +2393,7 @@
2497
2393
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
2498
2394
  * @param current - The new value of the ref.
2499
2395
  */
2500
- function H(e, t) {
2396
+ function z(e, t) {
2501
2397
  if (e) {
2502
2398
  if (typeof e === "function") {
2503
2399
  e(t);
@@ -2510,80 +2406,80 @@
2510
2406
  }
2511
2407
  }
2512
2408
  // CONCATENATED MODULE: ./src/Code/Code.tsx
2513
- function z() {
2514
- return z = Object.assign ? Object.assign.bind() : function(e) {
2409
+ function Y() {
2410
+ return Y = Object.assign ? Object.assign.bind() : function(e) {
2515
2411
  for (var t = 1; t < arguments.length; t++) {
2516
2412
  var n = arguments[t];
2517
- for (var r in n) {
2518
- ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
2413
+ for (var a in n) {
2414
+ ({}).hasOwnProperty.call(n, a) && (e[a] = n[a]);
2519
2415
  }
2520
2416
  }
2521
2417
  return e;
2522
- }, z.apply(null, arguments);
2418
+ }, Y.apply(null, arguments);
2523
2419
  }
2524
- function Y(e, t) {
2525
- return V(e) || K(e, t) || W(e, t) || X();
2420
+ function X(e, t) {
2421
+ return Z(e) || V(e, t) || q(e, t) || W();
2526
2422
  }
2527
- function X() {
2423
+ function W() {
2528
2424
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2529
2425
  }
2530
- function W(e, t) {
2426
+ function q(e, t) {
2531
2427
  if (e) {
2532
- if ("string" == typeof e) return q(e, t);
2428
+ if ("string" == typeof e) return K(e, t);
2533
2429
  var n = {}.toString.call(e).slice(8, -1);
2534
- return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? q(e, t) : void 0;
2430
+ return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? K(e, t) : void 0;
2535
2431
  }
2536
2432
  }
2537
- function q(e, t) {
2433
+ function K(e, t) {
2538
2434
  (null == t || t > e.length) && (t = e.length);
2539
- for (var n = 0, r = Array(t); n < t; n++) {
2540
- r[n] = e[n];
2435
+ for (var n = 0, a = Array(t); n < t; n++) {
2436
+ a[n] = e[n];
2541
2437
  }
2542
- return r;
2438
+ return a;
2543
2439
  }
2544
- function K(e, t) {
2440
+ function V(e, t) {
2545
2441
  var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
2546
2442
  if (null != n) {
2547
- var r, a, i, s, o = [], l = !0, u = !1;
2443
+ var a, r, i, s, o = [], l = !0, u = !1;
2548
2444
  try {
2549
2445
  if (i = (n = n.call(e)).next, 0 === t) {
2550
2446
  if (Object(n) !== n) return;
2551
2447
  l = !1;
2552
- } else for (;!(l = (r = i.call(n)).done) && (o.push(r.value), o.length !== t); l = !0) {
2448
+ } else for (;!(l = (a = i.call(n)).done) && (o.push(a.value), o.length !== t); l = !0) {
2553
2449
  }
2554
2450
  } catch (e) {
2555
- u = !0, a = e;
2451
+ u = !0, r = e;
2556
2452
  } finally {
2557
2453
  try {
2558
2454
  if (!l && null != n["return"] && (s = n["return"](), Object(s) !== s)) return;
2559
2455
  } finally {
2560
- if (u) throw a;
2456
+ if (u) throw r;
2561
2457
  }
2562
2458
  }
2563
2459
  return o;
2564
2460
  }
2565
2461
  }
2566
- function V(e) {
2462
+ function Z(e) {
2567
2463
  if (Array.isArray(e)) return e;
2568
2464
  }
2569
- function Z(e, t) {
2465
+ function Q(e, t) {
2570
2466
  if (null == e) return {};
2571
- var n, r, a = Q(e, t);
2467
+ var n, a, r = J(e, t);
2572
2468
  if (Object.getOwnPropertySymbols) {
2573
2469
  var i = Object.getOwnPropertySymbols(e);
2574
- for (r = 0; r < i.length; r++) {
2575
- n = i[r], -1 === t.indexOf(n) && {}.propertyIsEnumerable.call(e, n) && (a[n] = e[n]);
2470
+ for (a = 0; a < i.length; a++) {
2471
+ n = i[a], -1 === t.indexOf(n) && {}.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
2576
2472
  }
2577
2473
  }
2578
- return a;
2474
+ return r;
2579
2475
  }
2580
- function Q(e, t) {
2476
+ function J(e, t) {
2581
2477
  if (null == e) return {};
2582
2478
  var n = {};
2583
- for (var r in e) {
2584
- if ({}.hasOwnProperty.call(e, r)) {
2585
- if (-1 !== t.indexOf(r)) continue;
2586
- n[r] = e[r];
2479
+ for (var a in e) {
2480
+ if ({}.hasOwnProperty.call(e, a)) {
2481
+ if (-1 !== t.indexOf(a)) continue;
2482
+ n[a] = e[a];
2587
2483
  }
2588
2484
  }
2589
2485
  return n;
@@ -2592,22 +2488,22 @@
2592
2488
  // auto formatting. The import below points to an empty file which is replaced at build
2593
2489
  // time, see ./prism/build-isolated-prism.js for details.
2594
2490
  // typed as 'prismjs'
2595
- var J = [ "bash", "clike", "css", "html", "json", "javascript", "js", "jsx", "typescript", "ts", "tsx", "markup", "mathml", "plain", "plaintext", "splunk-spl", "sql", "svg", "text", "txt", "xml", "yaml", "yml" ];
2596
- function ee(e) {
2491
+ var ee = [ "bash", "clike", "css", "html", "json", "javascript", "js", "jsx", "typescript", "ts", "tsx", "markup", "mathml", "plain", "plaintext", "splunk-spl", "sql", "svg", "text", "txt", "xml", "yaml", "yml" ];
2492
+ function te(e) {
2597
2493
  return [ "plain", "plaintext", "text", "txt" ].includes(e);
2598
2494
  }
2599
- function te(e, t) {
2600
- if (ee(t)) {
2495
+ function ne(e, t) {
2496
+ if (te(t)) {
2601
2497
  return j().tokenize(e, {});
2602
2498
  }
2603
2499
  return j().tokenize(e, j().languages[t]);
2604
2500
  }
2605
- var ne = {
2501
+ var ae = {
2606
2502
  containerAppearance: m().oneOf([ "none", "section" ]),
2607
2503
  elementRef: m().oneOfType([ m().func, m().object ]),
2608
2504
  indentChars: m().number,
2609
- language: m().oneOf(J),
2610
- languageFallback: m().oneOf(J),
2505
+ language: m().oneOf(ee),
2506
+ languageFallback: m().oneOf(ee),
2611
2507
  lineHighlights: m().string,
2612
2508
  lineNumberStart: m().number,
2613
2509
  showIndentGuide: m().bool,
@@ -2615,104 +2511,104 @@
2615
2511
  value: m().string
2616
2512
  };
2617
2513
  function re(n) {
2618
- var r = n.containerAppearance, a = r === void 0 ? "none" : r, s = n.elementRef, l = n.indentChars, c = l === void 0 ? 4 : l, d = n.language, f = n.languageFallback, m = f === void 0 ? "javascript" : f, v = n.lineHighlights, h = n.lineNumberStart, E = n.showIndentGuide, b = E === void 0 ? true : E, y = n.showLineNumbers, I = n.value, N = I === void 0 ? "" : I, x = Z(n, [ "containerAppearance", "elementRef", "indentChars", "language", "languageFallback", "lineHighlights", "lineNumberStart", "showIndentGuide", "showLineNumbers", "value" ]);
2514
+ var a = n.containerAppearance, r = a === void 0 ? "none" : a, s = n.elementRef, l = n.indentChars, c = l === void 0 ? 4 : l, d = n.language, f = n.languageFallback, m = f === void 0 ? "javascript" : f, E = n.lineHighlights, h = n.lineNumberStart, b = n.showIndentGuide, y = b === void 0 ? true : b, S = n.showLineNumbers, A = n.value, N = A === void 0 ? "" : A, R = Q(n, [ "containerAppearance", "elementRef", "indentChars", "language", "languageFallback", "lineHighlights", "lineNumberStart", "showIndentGuide", "showLineNumbers", "value" ]);
2619
2515
  // @docs-props-type CodePropsBase
2620
- var R = (0, e.useRef)(null);
2621
- var k = (0, e.useState)(undefined), L = Y(k, 2), F = L[0], w = L[1];
2622
- var C = (0, B["default"])(R), D = C.width, P = C.height;
2516
+ var k = (0, e.useRef)(null);
2517
+ var L = (0, e.useState)(undefined), F = X(L, 2), w = F[0], C = F[1];
2518
+ var D = v()(k), P = D.width, _ = D.height;
2623
2519
  var $ = (0, e.useCallback)((function(e) {
2624
- H(R, e);
2625
- H(s, e);
2520
+ z(k, e);
2521
+ z(s, e);
2626
2522
  }), [ s ]);
2627
2523
  (0, e.useEffect)((function() {
2628
- var e = R.current;
2524
+ var e = k.current;
2629
2525
  if (e) {
2630
- var t = e.scrollHeight > Math.round(P);
2631
- var n = e.scrollWidth > Math.round(D);
2632
- var r = t || n;
2633
- w(r ? 0 : undefined);
2526
+ var t = e.scrollHeight > Math.round(_);
2527
+ var n = e.scrollWidth > Math.round(P);
2528
+ var a = t || n;
2529
+ C(a ? 0 : undefined);
2634
2530
  }
2635
- }), [ R, D, P ]);
2636
- var U = p()(" ", c);
2637
- var G = function e(n) {
2638
- var r = Math.floor(n / c);
2639
- var a = n % c;
2640
- var i = g()(r, (function(e) {
2531
+ }), [ k, P, _ ]);
2532
+ var M = p()(" ", c);
2533
+ var B = function e(n) {
2534
+ var a = Math.floor(n / c);
2535
+ var r = n % c;
2536
+ var i = g()(a, (function(e) {
2641
2537
 
2642
- return t().createElement(T, {
2538
+ return t().createElement(O, {
2643
2539
  key: e.toString()
2644
- }, U);
2540
+ }, M);
2645
2541
  }));
2646
- if (a) {
2647
- i.push(p()(" ", a));
2542
+ if (r) {
2543
+ i.push(p()(" ", r));
2648
2544
  }
2649
2545
  return i;
2650
2546
  };
2651
- var j = u()(J, d) > -1;
2547
+ var H = u()(ee, d) > -1;
2652
2548
  (0, e.useEffect)((function() {
2653
2549
  // a fix for SUI-5425, where the Markdown component doesn't pass a valid language in some circumstances
2654
2550
  if (false) {}
2655
- }), [ j, d, m ]);
2656
- var X = j && d ? d : m;
2657
- var W = te(N, X);
2658
- var q = ee(X);
2551
+ }), [ H, d, m ]);
2552
+ var j = H && d ? d : m;
2553
+ var W = ne(N, j);
2554
+ var q = te(j);
2659
2555
  var K = function e(n) {
2660
- return i()(n).map((function(n, r) {
2556
+ return i()(n).map((function(n, a) {
2661
2557
  if (typeof n === "string") {
2662
- if (!b) {
2558
+ if (!y) {
2663
2559
  return n;
2664
2560
  }
2665
- var a = n.split("\n");
2666
- if (a.length === 1) {
2561
+ var r = n.split("\n");
2562
+ if (r.length === 1) {
2667
2563
  return n;
2668
2564
  }
2669
- return o()(a.map((function(e, n) {
2670
- var a = n === 0 ? [] : [ "\n" ];
2565
+ return o()(r.map((function(e, n) {
2566
+ var r = n === 0 ? [] : [ "\n" ];
2671
2567
  var i = e.match(/^(\s+)(.*)/);
2672
2568
  if (!i) {
2673
- a.push(e);
2569
+ r.push(e);
2674
2570
  } else {
2675
- a.push( t().createElement("span", {
2676
- key: "".concat(r.toString(), ":").concat(n.toString())
2677
- }, G(i[1].length)), i[2]);
2571
+ r.push( t().createElement("span", {
2572
+ key: "".concat(a.toString(), ":").concat(n.toString())
2573
+ }, B(i[1].length)), i[2]);
2678
2574
  }
2679
- return a;
2575
+ return r;
2680
2576
  })));
2681
2577
  }
2682
2578
  var i = typeof n.content === "string" ? n.content : e(n.content);
2683
2579
 
2684
2580
  // eslint-disable-next-line react/no-array-index-key
2685
- return t().createElement(O, {
2581
+ return t().createElement(x, {
2686
2582
  "data-part-type": n.type,
2687
2583
  partType: n.type,
2688
- key: r.toString()
2584
+ key: a.toString()
2689
2585
  }, i);
2690
2586
  }));
2691
2587
  };
2692
2588
  var V = K(W);
2693
2589
 
2694
- return t().createElement(A, z({
2590
+ return t().createElement(I, Y({
2695
2591
  "data-test": "code",
2696
2592
  ref: $,
2697
- tabIndex: F,
2698
- $containerAppearance: a,
2699
- $showLineNumbers: y,
2593
+ tabIndex: w,
2594
+ $containerAppearance: r,
2595
+ $showLineNumbers: S,
2700
2596
  $counterReset: h && h - 1
2701
- }, x), y && t().createElement(M, {
2702
- containerAppearance: a,
2597
+ }, R), S && t().createElement(G, {
2598
+ containerAppearance: r,
2703
2599
  value: N
2704
- }), t().createElement(S, {
2705
- className: "language-".concat(X),
2600
+ }), t().createElement(T, {
2601
+ className: "language-".concat(j),
2706
2602
  $isPlaintext: q
2707
- }, V), v && t().createElement(_, {
2708
- containerAppearance: a,
2709
- width: D,
2710
- highlight: v
2603
+ }, V), E && t().createElement(U, {
2604
+ containerAppearance: r,
2605
+ width: P,
2606
+ highlight: E
2711
2607
  }));
2712
2608
  }
2713
- re.propTypes = ne;
2714
- /* harmony default export */ const ae = re;
2609
+ re.propTypes = ae;
2610
+ /* harmony default export */ const ie = re;
2715
2611
  }) // CONCATENATED MODULE: ./src/Code/index.ts
2716
2612
  ();
2717
- module.exports = r;
2613
+ module.exports = a;
2718
2614
  /******/})();