@cccsaurora/clue-ui 1.2.0-dev.254 → 1.2.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 (179) hide show
  1. package/ActionForm-pWyIi01Z.js +4460 -0
  2. package/AnnotationDetails-11P7yhyx.js +160 -0
  3. package/AnnotationPreview-BGqlBBcp.js +140 -0
  4. package/ClueEnrichContext-DDZf646J.js +418 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_MapCache-BiTi0iqu.js +180 -0
  7. package/_Uint8Array-TJBs9NS2.js +101 -0
  8. package/_baseAssignValue-CNMLQZco.js +20 -0
  9. package/_baseClone-DajKHDCs.js +207 -0
  10. package/_baseExtremum-DhV10dXG.js +27 -0
  11. package/_baseFlatten-C8CjmqQ-.js +72 -0
  12. package/_baseGet-DSZygzyq.js +79 -0
  13. package/_baseIsEqual-C08cUUpA.js +147 -0
  14. package/_baseIteratee-DGZdhdqr.js +95 -0
  15. package/_baseSlice-M5RKzt1A.js +10 -0
  16. package/_baseSum-wEbgNeUs.js +10 -0
  17. package/_baseUniq-CGlHphLr.js +79 -0
  18. package/_commonjsHelpers-DaMA6jEr.js +8 -0
  19. package/_createAggregator-BvcoTZto.js +53 -0
  20. package/_getPrototype-Dm06JiGv.js +5 -0
  21. package/_getTag-Cfxlub3L.js +90 -0
  22. package/_setToArray-C7yMOeww.js +29 -0
  23. package/cloneDeep-wjl3XmFj.js +8 -0
  24. package/components/AnnotationBody.js +35 -49
  25. package/components/AnnotationDetailPopover.js +30 -36
  26. package/components/AnnotationDetails.js +7 -7
  27. package/components/AnnotationEntry.js +35 -35
  28. package/components/AnnotationPreview.js +5 -5
  29. package/components/ClassificationChip.js +23 -44
  30. package/components/CountBadge.js +26 -31
  31. package/components/EnrichedCard.js +97 -110
  32. package/components/EnrichedChip.js +105 -130
  33. package/components/EnrichedTypography.js +107 -133
  34. package/components/ErrorBoundary.js +24 -28
  35. package/components/RetryFailedEnrichments.js +9 -10
  36. package/components/SourcePicker.js +49 -57
  37. package/components/actions/ActionForm.js +4 -4
  38. package/components/actions/ExecutePopover.js +59 -75
  39. package/components/actions/ResultModal.js +4 -4
  40. package/components/actions/form/schemaAdapter.js +23 -39
  41. package/components/actions/formats/FileResult.js +59 -86
  42. package/components/actions/formats/index.js +10 -21
  43. package/components/display/graph/ExpandMoreButton.js +10 -10
  44. package/components/display/graph/elements/NodeCard.js +91 -111
  45. package/components/display/graph/elements/NodeTag.js +13 -15
  46. package/components/display/graph/index.js +202 -261
  47. package/components/display/graph/visualizations/Leaf.js +69 -88
  48. package/components/display/graph/visualizations/cloud/index.js +81 -98
  49. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  50. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  51. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  52. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  53. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  54. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  55. package/components/display/graph/visualizations/icons/index.js +13 -14
  56. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  57. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  58. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  59. package/components/display/graph/visualizations/tree/index.js +305 -407
  60. package/components/display/icons/Iconified.js +12 -27
  61. package/components/display/json/index.js +4 -4
  62. package/components/display/markdown/index.js +5770 -8678
  63. package/components/enrichment/EnrichPopover.js +46 -54
  64. package/components/fetchers/Fetcher.js +117 -155
  65. package/components/fetchers/PreviewModal.js +17 -20
  66. package/components/fetchers/StatusChip.js +17 -21
  67. package/components/group/Entry.js +11 -13
  68. package/components/group/Group.js +10 -13
  69. package/components/group/GroupControl.js +65 -76
  70. package/components/stats/QueryStatus.js +33 -43
  71. package/countBy-pIyxNZhO.js +8 -0
  72. package/data/event.js +4 -6
  73. package/database/index.js +2 -2
  74. package/debounce-DryYcbJ4.js +56 -0
  75. package/get-CH7kz5Ix.js +8 -0
  76. package/groupBy-yNrpdipq.js +8 -0
  77. package/hooks/ClueActionContext.js +6 -6
  78. package/hooks/ClueComponentContext.js +23 -29
  79. package/hooks/ClueConfigProvider.js +12 -14
  80. package/hooks/ClueDatabaseContext.js +13 -19
  81. package/hooks/ClueEnrichContext.js +8 -8
  82. package/hooks/ClueFetcherContext.js +56 -83
  83. package/hooks/ClueGroupContext.js +14 -17
  84. package/hooks/CluePopupContext.js +5 -5
  85. package/hooks/ClueProvider.js +10 -12
  86. package/hooks/selectors.js +7 -7
  87. package/hooks/useActionResult.js +2 -2
  88. package/hooks/useAnnotations.js +31 -47
  89. package/hooks/useClue.js +4 -6
  90. package/hooks/useClueActions.js +3 -3
  91. package/hooks/useClueConfig.js +4 -6
  92. package/hooks/useClueTypeConfig.js +3 -3
  93. package/hooks/useComparator.js +435 -722
  94. package/hooks/useErrors.js +18 -22
  95. package/hooks/useFetcherResult.js +24 -33
  96. package/hooks/useMyHighlights.js +36 -66
  97. package/hooks/useMyLocalStorage.js +37 -66
  98. package/iconify-BBckr5AQ.js +1263 -0
  99. package/icons/Action.js +49 -66
  100. package/icons/Assessment.js +68 -84
  101. package/icons/Context.js +63 -77
  102. package/icons/Opinion.js +65 -77
  103. package/icons/iconMap.js +2 -2
  104. package/identity-ByMq8VxU.js +6 -0
  105. package/index-BHAe_V9n.js +12768 -0
  106. package/index-CA5CUNZO.js +975 -0
  107. package/index-D_ZywK71.js +358 -0
  108. package/index-Dj5C04IX.js +568 -0
  109. package/index-p5_wX7q1.js +11729 -0
  110. package/isNil-CjWwlQS3.js +6 -0
  111. package/isObject-B53jY8Qg.js +7 -0
  112. package/isObjectLike-BatpeCIi.js +29 -0
  113. package/isSymbol-C3_SC0Qp.js +8 -0
  114. package/last-7CdUxN0r.js +7 -0
  115. package/main.js +60 -60
  116. package/package.json +1 -1
  117. package/sortBy-0BpKRt8p.js +79 -0
  118. package/sumBy-Do6Ff4Bw.js +8 -0
  119. package/text/Frequency.js +23 -42
  120. package/toFinite-BMy6GObD.js +14 -0
  121. package/toNumber-YVhnnJv4.js +31 -0
  122. package/useClueTypeConfig-77zd_zdF.js +2292 -0
  123. package/utils/chain.js +64 -91
  124. package/utils/classificationParser.js +256 -519
  125. package/utils/constants.js +10 -35
  126. package/utils/graph.js +45 -72
  127. package/utils/hashUtil.js +7 -7
  128. package/utils/line.js +81 -131
  129. package/utils/loggerUtil.js +3 -5
  130. package/utils/sessionStorage.js +27 -41
  131. package/utils/time.js +423 -423
  132. package/utils/utils.js +9 -9
  133. package/utils/window.js +10 -21
  134. package/utils-D5hPDE7N.js +129 -0
  135. package/ActionForm-C0aE9HUv.js +0 -5941
  136. package/AnnotationDetails-CEou0vCc.js +0 -175
  137. package/AnnotationPreview-CLMVD6Ec.js +0 -188
  138. package/ClueEnrichContext-BkD9ZwM9.js +0 -541
  139. package/FlexOne-BSYAhhtG.js +0 -9
  140. package/_MapCache-WmuDdwuH.js +0 -222
  141. package/_Uint8Array-DdG4KLKn.js +0 -128
  142. package/_baseAssignValue-CGTuELqU.js +0 -25
  143. package/_baseClone-BpWiBnMp.js +0 -283
  144. package/_baseExtremum-BY663UjY.js +0 -33
  145. package/_baseFlatten-B69cDsaV.js +0 -92
  146. package/_baseGet-Bx3A4Qfp.js +0 -108
  147. package/_baseIsEqual-B4IufFlL.js +0 -208
  148. package/_baseIteratee-7AQvAy1o.js +0 -126
  149. package/_baseSlice-GAv_YFTT.js +0 -20
  150. package/_baseSum-D0WC1dN0.js +0 -13
  151. package/_baseUniq-B8fK6hI-.js +0 -115
  152. package/_commonjsHelpers-DWwsNxpa.js +0 -8
  153. package/_createAggregator-CwGPThny.js +0 -63
  154. package/_getPrototype-CblfEidB.js +0 -5
  155. package/_getTag-jwz4XLoZ.js +0 -126
  156. package/_setToArray-CaPKQhcz.js +0 -33
  157. package/cloneDeep-DmUylbkM.js +0 -8
  158. package/countBy-DqlU5OwT.js +0 -14
  159. package/debounce-bV0h5FC5.js +0 -92
  160. package/get-DSsNkRQs.js +0 -8
  161. package/groupBy-ChDRT7uy.js +0 -14
  162. package/iconify-CXMreGTg.js +0 -1782
  163. package/identity-CPGTqrE4.js +0 -6
  164. package/index-AMfoEg_6.js +0 -696
  165. package/index-B6C2a_Lg.js +0 -1172
  166. package/index-C12gPw2W.js +0 -17698
  167. package/index-DCKkHTvx.js +0 -15750
  168. package/index-UkW8Sur3.js +0 -465
  169. package/isNil-CIubwp4T.js +0 -6
  170. package/isObject-FTY-5JQX.js +0 -7
  171. package/isObjectLike-OAgjjZye.js +0 -48
  172. package/isSymbol-Xd2FsJyp.js +0 -8
  173. package/last-CUCl67Im.js +0 -7
  174. package/sortBy-C7mGPI_D.js +0 -100
  175. package/sumBy-CGALjmwQ.js +0 -8
  176. package/toFinite-Bc55msYj.js +0 -16
  177. package/toNumber-DPxy1FBy.js +0 -39
  178. package/useClueTypeConfig-D2tf4-NM.js +0 -3289
  179. package/utils-71DpzFrA.js +0 -199
@@ -0,0 +1,6 @@
1
+ function n(i) {
2
+ return i == null;
3
+ }
4
+ export {
5
+ n as i
6
+ };
@@ -0,0 +1,7 @@
1
+ function e(t) {
2
+ var n = typeof t;
3
+ return t != null && (n == "object" || n == "function");
4
+ }
5
+ export {
6
+ e as i
7
+ };
@@ -0,0 +1,29 @@
1
+ var f = typeof global == "object" && global && global.Object === Object && global, l = typeof self == "object" && self && self.Object === Object && self, g = f || l || Function("return this")(), r = g.Symbol, o = Object.prototype, s = o.hasOwnProperty, j = o.toString, e = r ? r.toStringTag : void 0;
2
+ function d(t) {
3
+ var a = s.call(t, e), i = t[e];
4
+ try {
5
+ t[e] = void 0;
6
+ var c = !0;
7
+ } catch {
8
+ }
9
+ var b = j.call(t);
10
+ return c && (a ? t[e] = i : delete t[e]), b;
11
+ }
12
+ var O = Object.prototype, S = O.toString;
13
+ function T(t) {
14
+ return S.call(t);
15
+ }
16
+ var u = "[object Null]", y = "[object Undefined]", n = r ? r.toStringTag : void 0;
17
+ function v(t) {
18
+ return t == null ? t === void 0 ? y : u : n && n in Object(t) ? d(t) : T(t);
19
+ }
20
+ function h(t) {
21
+ return t != null && typeof t == "object";
22
+ }
23
+ export {
24
+ r as S,
25
+ v as b,
26
+ f,
27
+ h as i,
28
+ g as r
29
+ };
@@ -0,0 +1,8 @@
1
+ import { i as b, b as s } from "./isObjectLike-BatpeCIi.js";
2
+ var t = "[object Symbol]";
3
+ function e(o) {
4
+ return typeof o == "symbol" || b(o) && s(o) == t;
5
+ }
6
+ export {
7
+ e as i
8
+ };
@@ -0,0 +1,7 @@
1
+ function l(n) {
2
+ var e = n == null ? 0 : n.length;
3
+ return e ? n[e - 1] : void 0;
4
+ }
5
+ export {
6
+ l
7
+ };
package/main.js CHANGED
@@ -1,63 +1,63 @@
1
- import { A, u, a, b, c } from "./ActionForm-C0aE9HUv.js";
2
- import { default as default2 } from "./components/AnnotationDetailPopover.js";
3
- import { A as A2 } from "./AnnotationDetails-CEou0vCc.js";
4
- import { default as default3 } from "./components/AnnotationEntry.js";
5
- import { A as A3, C } from "./AnnotationPreview-CLMVD6Ec.js";
6
- import { default as default4 } from "./components/CountBadge.js";
7
- import { default as default5 } from "./components/EnrichedCard.js";
8
- import { default as default6 } from "./components/EnrichedChip.js";
9
- import { default as default7 } from "./components/EnrichedTypography.js";
10
- import { default as default8 } from "./components/fetchers/Fetcher.js";
11
- import { default as default9 } from "./components/fetchers/StatusChip.js";
12
- import { default as default10 } from "./components/group/Entry.js";
13
- import { default as default11 } from "./components/group/Group.js";
14
- import { default as default12 } from "./components/group/GroupControl.js";
15
- import { default as default13 } from "./components/SourcePicker.js";
16
- import { SNACKBAR_EVENT_ID } from "./data/event.js";
17
- import { b as b2 } from "./index-C12gPw2W.js";
18
- import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
19
- import { ClueConfigContext } from "./hooks/ClueConfigProvider.js";
20
- import { ClueDatabaseContext } from "./hooks/ClueDatabaseContext.js";
21
- import { C as C2 } from "./ClueEnrichContext-BkD9ZwM9.js";
22
- import { ClueProvider } from "./hooks/ClueProvider.js";
23
- import { default as default14 } from "./hooks/useClue.js";
24
- import { default as default15 } from "./hooks/useClueConfig.js";
25
- import { default as default16 } from "./icons/Assessment.js";
26
- import { default as default17 } from "./icons/Context.js";
27
- import { default as default18 } from "./icons/Opinion.js";
28
- import { default as default19 } from "./text/Frequency.js";
1
+ import { A as t, u as r, a, b as f, c as u } from "./ActionForm-pWyIi01Z.js";
2
+ import { default as n } from "./components/AnnotationDetailPopover.js";
3
+ import { A as l } from "./AnnotationDetails-11P7yhyx.js";
4
+ import { default as m } from "./components/AnnotationEntry.js";
5
+ import { A as d, C as i } from "./AnnotationPreview-BGqlBBcp.js";
6
+ import { default as A } from "./components/CountBadge.js";
7
+ import { default as E } from "./components/EnrichedCard.js";
8
+ import { default as b } from "./components/EnrichedChip.js";
9
+ import { default as D } from "./components/EnrichedTypography.js";
10
+ import { default as g } from "./components/fetchers/Fetcher.js";
11
+ import { default as I } from "./components/fetchers/StatusChip.js";
12
+ import { default as T } from "./components/group/Entry.js";
13
+ import { default as G } from "./components/group/Group.js";
14
+ import { default as _ } from "./components/group/GroupControl.js";
15
+ import { default as q } from "./components/SourcePicker.js";
16
+ import { SNACKBAR_EVENT_ID as K } from "./data/event.js";
17
+ import { b as R } from "./index-BHAe_V9n.js";
18
+ import { ClueComponentContext as j } from "./hooks/ClueComponentContext.js";
19
+ import { ClueConfigContext as H } from "./hooks/ClueConfigProvider.js";
20
+ import { ClueDatabaseContext as L } from "./hooks/ClueDatabaseContext.js";
21
+ import { C as Q } from "./ClueEnrichContext-DDZf646J.js";
22
+ import { ClueProvider as W } from "./hooks/ClueProvider.js";
23
+ import { default as Y } from "./hooks/useClue.js";
24
+ import { default as $ } from "./hooks/useClueConfig.js";
25
+ import { default as oe } from "./icons/Assessment.js";
26
+ import { default as re } from "./icons/Context.js";
27
+ import { default as fe } from "./icons/Opinion.js";
28
+ import { default as se } from "./text/Frequency.js";
29
29
  export {
30
- A as ActionForm,
31
- default2 as AnnotationDetailPopover,
32
- A2 as AnnotationDetails,
33
- default3 as AnnotationEntry,
34
- A3 as AnnotationPreview,
35
- default16 as AssessmentIcon,
36
- ClueComponentContext,
37
- ClueConfigContext,
38
- ClueDatabaseContext,
39
- C2 as ClueEnrichContext,
40
- C as CluePopupContext,
41
- ClueProvider,
42
- default17 as ContextIcon,
43
- default4 as CountBadge,
44
- default5 as EnrichedCard,
45
- default6 as EnrichedChip,
46
- default7 as EnrichedTypography,
47
- default10 as Entry,
48
- default8 as Fetcher,
49
- default19 as FrequencyText,
50
- default11 as Group,
51
- default12 as GroupControl,
52
- default18 as OpinionIcon,
53
- SNACKBAR_EVENT_ID,
54
- default13 as SourcePicker,
55
- default9 as StatusChip,
56
- b2 as buildDatabase,
57
- default14 as useClue,
58
- u as useClueActions,
30
+ t as ActionForm,
31
+ n as AnnotationDetailPopover,
32
+ l as AnnotationDetails,
33
+ m as AnnotationEntry,
34
+ d as AnnotationPreview,
35
+ oe as AssessmentIcon,
36
+ j as ClueComponentContext,
37
+ H as ClueConfigContext,
38
+ L as ClueDatabaseContext,
39
+ Q as ClueEnrichContext,
40
+ i as CluePopupContext,
41
+ W as ClueProvider,
42
+ re as ContextIcon,
43
+ A as CountBadge,
44
+ E as EnrichedCard,
45
+ b as EnrichedChip,
46
+ D as EnrichedTypography,
47
+ T as Entry,
48
+ g as Fetcher,
49
+ se as FrequencyText,
50
+ G as Group,
51
+ _ as GroupControl,
52
+ fe as OpinionIcon,
53
+ K as SNACKBAR_EVENT_ID,
54
+ q as SourcePicker,
55
+ I as StatusChip,
56
+ R as buildDatabase,
57
+ Y as useClue,
58
+ r as useClueActions,
59
59
  a as useClueActionsSelector,
60
- default15 as useClueConfig,
61
- b as useClueEnrichSelector,
62
- c as useClueFetcherSelector
60
+ $ as useClueConfig,
61
+ f as useClueEnrichSelector,
62
+ u as useClueFetcherSelector
63
63
  };
package/package.json CHANGED
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "type": "module",
68
68
  "types": "main.d.ts",
69
- "version": "1.2.0-dev.254",
69
+ "version": "1.2.0",
70
70
  "exports": {
71
71
  ".": "./main.js",
72
72
  "./index.css": "./index.css",
@@ -0,0 +1,79 @@
1
+ import { b as A, a as B, i as o } from "./_baseExtremum-DhV10dXG.js";
2
+ import { b as d } from "./_baseIteratee-DGZdhdqr.js";
3
+ import { s as x, o as C, b as M } from "./_baseFlatten-C8CjmqQ-.js";
4
+ import { a as g, b as k } from "./_baseGet-DSZygzyq.js";
5
+ import { b as w } from "./_createAggregator-BvcoTZto.js";
6
+ import { i as E, c as G } from "./_getTag-Cfxlub3L.js";
7
+ import { i as b } from "./isSymbol-C3_SC0Qp.js";
8
+ import { i as s } from "./identity-ByMq8VxU.js";
9
+ import { i as L } from "./_MapCache-BiTi0iqu.js";
10
+ function F(r, n) {
11
+ return x(C(r, n, s), r + "");
12
+ }
13
+ function O(r, n) {
14
+ var u = -1, f = E(r) ? Array(r.length) : [];
15
+ return w(r, function(a, i, t) {
16
+ f[++u] = n(a, i, t);
17
+ }), f;
18
+ }
19
+ function X(r, n) {
20
+ return r && r.length ? A(r, d(n), B) : void 0;
21
+ }
22
+ function T(r, n) {
23
+ var u = r.length;
24
+ for (r.sort(n); u--; )
25
+ r[u] = r[u].value;
26
+ return r;
27
+ }
28
+ function U(r, n) {
29
+ if (r !== n) {
30
+ var u = r !== void 0, f = r === null, a = r === r, i = b(r), t = n !== void 0, p = n === null, m = n === n, c = b(n);
31
+ if (!p && !c && !i && r > n || i && t && m && !p && !c || f && t && m || !u && m || !a)
32
+ return 1;
33
+ if (!f && !i && !c && r < n || c && u && a && !f && !i || p && u && a || !t && a || !m)
34
+ return -1;
35
+ }
36
+ return 0;
37
+ }
38
+ function j(r, n, u) {
39
+ for (var f = -1, a = r.criteria, i = n.criteria, t = a.length, p = u.length; ++f < t; ) {
40
+ var m = U(a[f], i[f]);
41
+ if (m) {
42
+ if (f >= p)
43
+ return m;
44
+ var c = u[f];
45
+ return m * (c == "desc" ? -1 : 1);
46
+ }
47
+ }
48
+ return r.index - n.index;
49
+ }
50
+ function q(r, n, u) {
51
+ n.length ? n = g(n, function(i) {
52
+ return L(i) ? function(t) {
53
+ return k(t, i.length === 1 ? i[0] : i);
54
+ } : i;
55
+ }) : n = [s];
56
+ var f = -1;
57
+ n = g(n, G(d));
58
+ var a = O(r, function(i, t, p) {
59
+ var m = g(n, function(c) {
60
+ return c(i);
61
+ });
62
+ return { criteria: m, index: ++f, value: i };
63
+ });
64
+ return T(a, function(i, t) {
65
+ return j(i, t, u);
66
+ });
67
+ }
68
+ var Y = F(function(r, n) {
69
+ if (r == null)
70
+ return [];
71
+ var u = n.length;
72
+ return u > 1 && o(r, n[0], n[1]) ? n = [] : u > 2 && o(n[0], n[1], n[2]) && (n = [n[0]]), q(r, M(n), []);
73
+ });
74
+ export {
75
+ q as a,
76
+ O as b,
77
+ X as m,
78
+ Y as s
79
+ };
@@ -0,0 +1,8 @@
1
+ import { b as s } from "./_baseIteratee-DGZdhdqr.js";
2
+ import { b as m } from "./_baseSum-wEbgNeUs.js";
3
+ function n(e, t) {
4
+ return e && e.length ? m(e, s(t)) : 0;
5
+ }
6
+ export {
7
+ n as s
8
+ };
package/text/Frequency.js CHANGED
@@ -1,49 +1,30 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Typography } from "@mui/material";
3
- import { i as isNil } from "../isNil-CIubwp4T.js";
4
- import { s as sumBy } from "../sumBy-CGALjmwQ.js";
5
- import { useMemo } from "react";
6
- const FrequencyText = ({
7
- annotations,
8
- value,
9
- ...otherProps
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { Typography as s } from "@mui/material";
3
+ import { i as t } from "../isNil-CjWwlQS3.js";
4
+ import { s as m } from "../sumBy-Do6Ff4Bw.js";
5
+ import { useMemo as i } from "react";
6
+ const q = ({
7
+ annotations: l,
8
+ value: u,
9
+ ...e
10
10
  }) => {
11
- const frequencyAnnotations = useMemo(
12
- () => annotations.filter((annotation) => annotation.type === "frequency"),
13
- [annotations]
14
- );
15
- const frequency = useMemo(
16
- () => frequencyAnnotations.length > 0 ? sumBy(frequencyAnnotations, (annotation) => annotation.value) : null,
17
- [frequencyAnnotations]
18
- );
19
- const color = useMemo(() => {
20
- if (isNil(frequency)) {
21
- return null;
22
- }
23
- if (frequency < 1) {
24
- return "error";
25
- }
26
- if (frequency < 1e3) {
27
- return "secondary";
28
- }
29
- if (frequency < 1e6) {
30
- return "disabled";
31
- }
32
- return null;
33
- }, [frequency]);
34
- if (isNil(frequency)) {
35
- return /* @__PURE__ */ jsx(Typography, { ...otherProps, color, children: value });
36
- }
37
- return /* @__PURE__ */ jsx(
38
- Typography,
11
+ const n = i(
12
+ () => l.filter((o) => o.type === "frequency"),
13
+ [l]
14
+ ), r = i(
15
+ () => n.length > 0 ? m(n, (o) => o.value) : null,
16
+ [n]
17
+ ), f = i(() => t(r) ? null : r < 1 ? "error" : r < 1e3 ? "secondary" : r < 1e6 ? "disabled" : null, [r]);
18
+ return t(r) ? /* @__PURE__ */ c(s, { ...e, color: f, children: u }) : /* @__PURE__ */ c(
19
+ s,
39
20
  {
40
- ...otherProps,
41
- color: color ?? otherProps.color,
42
- sx: { fontWeight: !isNil(frequency) && frequency < 10 ? "bold" : "inherit" },
43
- children: value
21
+ ...e,
22
+ color: f ?? e.color,
23
+ sx: { fontWeight: !t(r) && r < 10 ? "bold" : "inherit" },
24
+ children: u
44
25
  }
45
26
  );
46
27
  };
47
28
  export {
48
- FrequencyText as default
29
+ q as default
49
30
  };
@@ -0,0 +1,14 @@
1
+ import { t as n } from "./toNumber-YVhnnJv4.js";
2
+ var t = 1 / 0, o = 17976931348623157e292;
3
+ function I(r) {
4
+ if (!r)
5
+ return r === 0 ? r : 0;
6
+ if (r = n(r), r === t || r === -t) {
7
+ var i = r < 0 ? -1 : 1;
8
+ return i * o;
9
+ }
10
+ return r === r ? r : 0;
11
+ }
12
+ export {
13
+ I as t
14
+ };
@@ -0,0 +1,31 @@
1
+ import { i as e } from "./isObject-B53jY8Qg.js";
2
+ import { i as s } from "./isSymbol-C3_SC0Qp.js";
3
+ var f = /\s/;
4
+ function o(r) {
5
+ for (var t = r.length; t-- && f.test(r.charAt(t)); )
6
+ ;
7
+ return t;
8
+ }
9
+ var c = /^\s+/;
10
+ function m(r) {
11
+ return r && r.slice(0, o(r) + 1).replace(c, "");
12
+ }
13
+ var n = NaN, a = /^[-+]0x[0-9a-f]+$/i, p = /^0b[01]+$/i, b = /^0o[0-7]+$/i, y = parseInt;
14
+ function x(r) {
15
+ if (typeof r == "number")
16
+ return r;
17
+ if (s(r))
18
+ return n;
19
+ if (e(r)) {
20
+ var t = typeof r.valueOf == "function" ? r.valueOf() : r;
21
+ r = e(t) ? t + "" : t;
22
+ }
23
+ if (typeof r != "string")
24
+ return r === 0 ? r : +r;
25
+ r = m(r);
26
+ var i = p.test(r);
27
+ return i || b.test(r) ? y(r.slice(2), i ? 2 : 8) : a.test(r) ? n : +r;
28
+ }
29
+ export {
30
+ x as t
31
+ };