@cccsaurora/clue-ui 0.15.0-dev.31 → 0.15.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 (257) hide show
  1. package/package.json +143 -39
  2. package/ActionForm-DgfJwTzt.js +0 -436
  3. package/AnnotationPreview-BvNpZOP0.js +0 -188
  4. package/ClueEnrichContext-DXwLVp0M.js +0 -518
  5. package/FlexOne-BSYAhhtG.js +0 -9
  6. package/_Map-kgDsDYxq.js +0 -64
  7. package/_MapCache-DabaaWfq.js +0 -161
  8. package/_Uint8Array-BlVVH1tp.js +0 -129
  9. package/_baseAssignValue-CNbcU6Nb.js +0 -25
  10. package/_baseClone-D3a8Pa4T.js +0 -284
  11. package/_baseExtremum-B1o1zHjR.js +0 -33
  12. package/_baseFlatten-D4huXoEI.js +0 -92
  13. package/_baseGet-BSK_nnoz.js +0 -109
  14. package/_baseIsEqual-B5xLoweL.js +0 -238
  15. package/_baseIteratee-p6Nj07-n.js +0 -126
  16. package/_baseSlice-GAv_YFTT.js +0 -20
  17. package/_baseSum-D0WC1dN0.js +0 -13
  18. package/_baseUniq-CpupKWcL.js +0 -89
  19. package/_commonjsHelpers-CUmg6egw.js +0 -6
  20. package/_createAggregator-BpVy5xMi.js +0 -63
  21. package/_getPrototype-D1LAdQKO.js +0 -5
  22. package/_getTag-D3ToyefI.js +0 -126
  23. package/api/lookup/enrich.d.ts +0 -10
  24. package/api/lookup/index.d.ts +0 -5
  25. package/api/lookup/types.d.ts +0 -5
  26. package/api/lookup/types_detection.d.ts +0 -5
  27. package/cloneDeep-CjP5k9zW.js +0 -8
  28. package/components/AnnotationBody.d.ts +0 -6
  29. package/components/AnnotationBody.js +0 -56
  30. package/components/AnnotationDetailPopover.d.ts +0 -14
  31. package/components/AnnotationDetailPopover.js +0 -61
  32. package/components/AnnotationDetails.d.ts +0 -8
  33. package/components/AnnotationDetails.js +0 -172
  34. package/components/AnnotationEntry.d.ts +0 -6
  35. package/components/AnnotationEntry.js +0 -59
  36. package/components/AnnotationPreview.d.ts +0 -14
  37. package/components/AnnotationPreview.js +0 -11
  38. package/components/ClassificationChip.d.ts +0 -11
  39. package/components/ClassificationChip.js +0 -52
  40. package/components/CountBadge.d.ts +0 -8
  41. package/components/CountBadge.js +0 -34
  42. package/components/EnrichedCard.d.ts +0 -14
  43. package/components/EnrichedCard.js +0 -162
  44. package/components/EnrichedChip.d.ts +0 -9
  45. package/components/EnrichedChip.js +0 -176
  46. package/components/EnrichedTypography.d.ts +0 -16
  47. package/components/EnrichedTypography.js +0 -178
  48. package/components/ErrorBoundary.d.ts +0 -15
  49. package/components/ErrorBoundary.js +0 -36
  50. package/components/RetryFailedEnrichments.d.ts +0 -2
  51. package/components/RetryFailedEnrichments.js +0 -13
  52. package/components/SourcePicker.d.ts +0 -2
  53. package/components/SourcePicker.js +0 -98
  54. package/components/actions/ActionForm.d.ts +0 -6
  55. package/components/actions/ActionForm.js +0 -16
  56. package/components/actions/ExecutePopover.d.ts +0 -10
  57. package/components/actions/ExecutePopover.js +0 -93
  58. package/components/actions/ResultModal.d.ts +0 -9
  59. package/components/actions/ResultModal.js +0 -46
  60. package/components/actions/form/schemaAdapter.d.ts +0 -3
  61. package/components/actions/form/schemaAdapter.js +0 -47
  62. package/components/display/graph/ExpandMoreButton.d.ts +0 -7
  63. package/components/display/graph/ExpandMoreButton.js +0 -18
  64. package/components/display/graph/elements/NodeCard.d.ts +0 -10
  65. package/components/display/graph/elements/NodeCard.js +0 -146
  66. package/components/display/graph/elements/NodeTag.d.ts +0 -9
  67. package/components/display/graph/elements/NodeTag.js +0 -17
  68. package/components/display/graph/index.d.ts +0 -9
  69. package/components/display/graph/index.js +0 -438
  70. package/components/display/graph/visualizations/Leaf.d.ts +0 -25
  71. package/components/display/graph/visualizations/Leaf.js +0 -125
  72. package/components/display/graph/visualizations/cloud/index.d.ts +0 -24
  73. package/components/display/graph/visualizations/cloud/index.js +0 -141
  74. package/components/display/graph/visualizations/icons/BaseIcon.d.ts +0 -12
  75. package/components/display/graph/visualizations/icons/BaseIcon.js +0 -37
  76. package/components/display/graph/visualizations/icons/BugIcon.d.ts +0 -5
  77. package/components/display/graph/visualizations/icons/BugIcon.js +0 -18
  78. package/components/display/graph/visualizations/icons/HostIcon.d.ts +0 -5
  79. package/components/display/graph/visualizations/icons/HostIcon.js +0 -24
  80. package/components/display/graph/visualizations/icons/NetworkIcon.d.ts +0 -5
  81. package/components/display/graph/visualizations/icons/NetworkIcon.js +0 -24
  82. package/components/display/graph/visualizations/icons/ProcessIcon.d.ts +0 -5
  83. package/components/display/graph/visualizations/icons/ProcessIcon.js +0 -18
  84. package/components/display/graph/visualizations/icons/TargetIcon.d.ts +0 -5
  85. package/components/display/graph/visualizations/icons/TargetIcon.js +0 -19
  86. package/components/display/graph/visualizations/icons/index.d.ts +0 -2
  87. package/components/display/graph/visualizations/icons/index.js +0 -16
  88. package/components/display/graph/visualizations/panels/NodePanel.d.ts +0 -8
  89. package/components/display/graph/visualizations/panels/NodePanel.js +0 -12
  90. package/components/display/graph/visualizations/tree/BundleLine.d.ts +0 -29
  91. package/components/display/graph/visualizations/tree/BundleLine.js +0 -121
  92. package/components/display/graph/visualizations/tree/Triangle.d.ts +0 -9
  93. package/components/display/graph/visualizations/tree/Triangle.js +0 -26
  94. package/components/display/graph/visualizations/tree/index.d.ts +0 -36
  95. package/components/display/graph/visualizations/tree/index.js +0 -485
  96. package/components/display/graph/visualizations/tree/types.d.ts +0 -11
  97. package/components/display/graph/visualizations/tree/types.js +0 -1
  98. package/components/display/icons/Iconified.d.ts +0 -9
  99. package/components/display/icons/Iconified.js +0 -29
  100. package/components/display/json/index.d.ts +0 -14
  101. package/components/display/json/index.js +0 -12
  102. package/components/display/markdown/DynamicTabs.d.ts +0 -8
  103. package/components/display/markdown/DynamicTabs.js +0 -26
  104. package/components/display/markdown/index.d.ts +0 -9
  105. package/components/display/markdown/index.js +0 -13389
  106. package/components/display/markdown/markdownPlugins/tabs.d.ts +0 -3
  107. package/components/display/markdown/markdownPlugins/tabs.js +0 -4
  108. package/components/enrichment/EnrichPopover.d.ts +0 -10
  109. package/components/enrichment/EnrichPopover.js +0 -88
  110. package/components/fetchers/Fetcher.d.ts +0 -17
  111. package/components/fetchers/Fetcher.js +0 -188
  112. package/components/fetchers/PreviewModal.d.ts +0 -8
  113. package/components/fetchers/PreviewModal.js +0 -22
  114. package/components/fetchers/StatusChip.d.ts +0 -8
  115. package/components/fetchers/StatusChip.js +0 -30
  116. package/components/group/Entry.d.ts +0 -8
  117. package/components/group/Entry.js +0 -15
  118. package/components/group/Group.d.ts +0 -12
  119. package/components/group/Group.js +0 -15
  120. package/components/group/GroupControl.d.ts +0 -4
  121. package/components/group/GroupControl.js +0 -103
  122. package/components/stats/QueryStatus.d.ts +0 -4
  123. package/components/stats/QueryStatus.js +0 -61
  124. package/countBy-C69WslUA.js +0 -14
  125. package/data/event.d.ts +0 -12
  126. package/data/event.js +0 -8
  127. package/database/index.d.ts +0 -4
  128. package/database/index.js +0 -4
  129. package/database/selector.schema.json.d.ts +0 -119
  130. package/database/status.schema.json.d.ts +0 -38
  131. package/database/types.d.ts +0 -64
  132. package/debounce-bV0h5FC5.js +0 -92
  133. package/en/translation.json +0 -135
  134. package/fr/translation.json +0 -135
  135. package/get-D3C3lEU3.js +0 -8
  136. package/groupBy-DC2oOuBN.js +0 -14
  137. package/hooks/ClueActionContext.d.ts +0 -86
  138. package/hooks/ClueActionContext.js +0 -18
  139. package/hooks/ClueComponentContext.d.ts +0 -10
  140. package/hooks/ClueComponentContext.js +0 -40
  141. package/hooks/ClueConfigProvider.d.ts +0 -12
  142. package/hooks/ClueConfigProvider.js +0 -23
  143. package/hooks/ClueDatabaseContext.d.ts +0 -10
  144. package/hooks/ClueDatabaseContext.js +0 -23
  145. package/hooks/ClueEnrichContext.d.ts +0 -6
  146. package/hooks/ClueEnrichContext.js +0 -15
  147. package/hooks/ClueEnrichContextType.d.ts +0 -113
  148. package/hooks/ClueEnrichProps.d.ts +0 -81
  149. package/hooks/ClueFetcherContext.d.ts +0 -35
  150. package/hooks/ClueFetcherContext.js +0 -88
  151. package/hooks/ClueGroupContext.d.ts +0 -14
  152. package/hooks/ClueGroupContext.js +0 -23
  153. package/hooks/CluePopupContext.d.ts +0 -24
  154. package/hooks/CluePopupContext.js +0 -12
  155. package/hooks/ClueProvider.d.ts +0 -9
  156. package/hooks/ClueProvider.js +0 -14
  157. package/hooks/selectors.d.ts +0 -10
  158. package/hooks/selectors.js +0 -24
  159. package/hooks/useAnnotations.d.ts +0 -24
  160. package/hooks/useAnnotations.js +0 -69
  161. package/hooks/useClue.d.ts +0 -4
  162. package/hooks/useClue.js +0 -8
  163. package/hooks/useClueActions.d.ts +0 -4
  164. package/hooks/useClueActions.js +0 -5
  165. package/hooks/useClueConfig.d.ts +0 -1
  166. package/hooks/useClueConfig.js +0 -8
  167. package/hooks/useClueTypeConfig.d.ts +0 -17
  168. package/hooks/useClueTypeConfig.js +0 -7
  169. package/hooks/useComparator.d.ts +0 -16
  170. package/hooks/useComparator.js +0 -1060
  171. package/hooks/useErrors.d.ts +0 -17
  172. package/hooks/useErrors.js +0 -35
  173. package/hooks/useMyHighlights.d.ts +0 -11
  174. package/hooks/useMyHighlights.js +0 -74
  175. package/hooks/useMyLocalStorage.d.ts +0 -16
  176. package/hooks/useMyLocalStorage.js +0 -80
  177. package/iconify-CXMreGTg.js +0 -1782
  178. package/icons/Action.d.ts +0 -9
  179. package/icons/Action.js +0 -90
  180. package/icons/Assessment.d.ts +0 -11
  181. package/icons/Assessment.js +0 -123
  182. package/icons/Context.d.ts +0 -12
  183. package/icons/Context.js +0 -83
  184. package/icons/Opinion.d.ts +0 -11
  185. package/icons/Opinion.js +0 -125
  186. package/icons/iconMap.d.ts +0 -7
  187. package/icons/iconMap.js +0 -10
  188. package/identity-CPGTqrE4.js +0 -6
  189. package/index-BDVjGvMI.js +0 -696
  190. package/index-BDrtH5ec.js +0 -465
  191. package/index-C9lySIVX.js +0 -1172
  192. package/index-DJYqRcxJ.js +0 -15750
  193. package/index-Dn2NHyXg.js +0 -17654
  194. package/index.css +0 -21
  195. package/isEmpty-BQkZubqU.js +0 -29
  196. package/isNil-CIubwp4T.js +0 -6
  197. package/isObject-FTY-5JQX.js +0 -7
  198. package/isObjectLike-OAgjjZye.js +0 -48
  199. package/isSymbol-Xd2FsJyp.js +0 -8
  200. package/isUndefined-CE8h73dH.js +0 -10
  201. package/last-CUCl67Im.js +0 -7
  202. package/main.d.ts +0 -42
  203. package/main.js +0 -70
  204. package/public/manifest.json +0 -16
  205. package/public/robots.txt +0 -3
  206. package/public/svg/dark/clue-h.svg +0 -52
  207. package/public/svg/dark/clue-icon1-simple.svg +0 -33
  208. package/public/svg/dark/clue-icon1.svg +0 -44
  209. package/public/svg/dark/clue-icon2-simple.svg +0 -26
  210. package/public/svg/dark/clue-icon2.svg +0 -37
  211. package/public/svg/dark/clue-name.svg +0 -14
  212. package/public/svg/dark/clue-v.svg +0 -52
  213. package/public/svg/light/clue-h.svg +0 -60
  214. package/public/svg/light/clue-icon1-simple.svg +0 -37
  215. package/public/svg/light/clue-icon1.svg +0 -48
  216. package/public/svg/light/clue-icon2-simple.svg +0 -30
  217. package/public/svg/light/clue-icon2.svg +0 -41
  218. package/public/svg/light/clue-name.svg +0 -14
  219. package/public/svg/light/clue-v.svg +0 -60
  220. package/sortBy-B-UKp4GT.js +0 -100
  221. package/sumBy-MYkDPHZL.js +0 -8
  222. package/tabs-xGuUGsJd.js +0 -254
  223. package/text/Frequency.d.ts +0 -9
  224. package/text/Frequency.js +0 -49
  225. package/toFinite-CArjry_l.js +0 -16
  226. package/toNumber-DPxy1FBy.js +0 -39
  227. package/types/EnrichmentProps.d.ts +0 -73
  228. package/types/RunningActionData.d.ts +0 -15
  229. package/types/WithActionData.d.ts +0 -9
  230. package/types/action.d.ts +0 -25
  231. package/types/config.d.ts +0 -16
  232. package/types/fetcher.d.ts +0 -60
  233. package/types/graph.d.ts +0 -101
  234. package/types/lookup.d.ts +0 -62
  235. package/types/network.d.ts +0 -9
  236. package/useClueTypeConfig-D9ZSxa4F.js +0 -3096
  237. package/utils/chain.d.ts +0 -14
  238. package/utils/chain.js +0 -106
  239. package/utils/classificationParser.d.ts +0 -195
  240. package/utils/classificationParser.js +0 -553
  241. package/utils/constants.d.ts +0 -26
  242. package/utils/constants.js +0 -36
  243. package/utils/graph.d.ts +0 -13
  244. package/utils/graph.js +0 -79
  245. package/utils/hashUtil.d.ts +0 -6
  246. package/utils/hashUtil.js +0 -11
  247. package/utils/line.d.ts +0 -28
  248. package/utils/line.js +0 -136
  249. package/utils/loggerUtil.d.ts +0 -6
  250. package/utils/loggerUtil.js +0 -8
  251. package/utils/sessionStorage.d.ts +0 -9
  252. package/utils/sessionStorage.js +0 -51
  253. package/utils/utils.d.ts +0 -13
  254. package/utils/utils.js +0 -11
  255. package/utils/window.d.ts +0 -3
  256. package/utils/window.js +0 -24
  257. package/utils-CxIhC2xH.js +0 -4182
package/index-BDVjGvMI.js DELETED
@@ -1,696 +0,0 @@
1
- import { createContext as createContext$1, useRef, useState, useEffect, useLayoutEffect, createElement, useContext as useContext$1, useReducer } from "react";
2
- var scheduler = { exports: {} };
3
- var scheduler_production = {};
4
- /**
5
- * @license React
6
- * scheduler.production.js
7
- *
8
- * Copyright (c) Meta Platforms, Inc. and affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- */
13
- var hasRequiredScheduler_production;
14
- function requireScheduler_production() {
15
- if (hasRequiredScheduler_production) return scheduler_production;
16
- hasRequiredScheduler_production = 1;
17
- (function(exports) {
18
- function push(heap, node) {
19
- var index = heap.length;
20
- heap.push(node);
21
- a: for (; 0 < index; ) {
22
- var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
23
- if (0 < compare(parent, node))
24
- heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
25
- else break a;
26
- }
27
- }
28
- function peek(heap) {
29
- return 0 === heap.length ? null : heap[0];
30
- }
31
- function pop(heap) {
32
- if (0 === heap.length) return null;
33
- var first = heap[0], last = heap.pop();
34
- if (last !== first) {
35
- heap[0] = last;
36
- a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
37
- var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
38
- if (0 > compare(left, last))
39
- rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
40
- else if (rightIndex < length && 0 > compare(right, last))
41
- heap[index] = right, heap[rightIndex] = last, index = rightIndex;
42
- else break a;
43
- }
44
- }
45
- return first;
46
- }
47
- function compare(a, b) {
48
- var diff = a.sortIndex - b.sortIndex;
49
- return 0 !== diff ? diff : a.id - b.id;
50
- }
51
- exports.unstable_now = void 0;
52
- if ("object" === typeof performance && "function" === typeof performance.now) {
53
- var localPerformance = performance;
54
- exports.unstable_now = function() {
55
- return localPerformance.now();
56
- };
57
- } else {
58
- var localDate = Date, initialTime = localDate.now();
59
- exports.unstable_now = function() {
60
- return localDate.now() - initialTime;
61
- };
62
- }
63
- var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
64
- function advanceTimers(currentTime) {
65
- for (var timer = peek(timerQueue); null !== timer; ) {
66
- if (null === timer.callback) pop(timerQueue);
67
- else if (timer.startTime <= currentTime)
68
- pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
69
- else break;
70
- timer = peek(timerQueue);
71
- }
72
- }
73
- function handleTimeout(currentTime) {
74
- isHostTimeoutScheduled = false;
75
- advanceTimers(currentTime);
76
- if (!isHostCallbackScheduled)
77
- if (null !== peek(taskQueue))
78
- isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
79
- else {
80
- var firstTimer = peek(timerQueue);
81
- null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
82
- }
83
- }
84
- var isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
85
- function shouldYieldToHost() {
86
- return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true;
87
- }
88
- function performWorkUntilDeadline() {
89
- needsPaint = false;
90
- if (isMessageLoopRunning) {
91
- var currentTime = exports.unstable_now();
92
- startTime = currentTime;
93
- var hasMoreWork = true;
94
- try {
95
- a: {
96
- isHostCallbackScheduled = false;
97
- isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
98
- isPerformingWork = true;
99
- var previousPriorityLevel = currentPriorityLevel;
100
- try {
101
- b: {
102
- advanceTimers(currentTime);
103
- for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
104
- var callback = currentTask.callback;
105
- if ("function" === typeof callback) {
106
- currentTask.callback = null;
107
- currentPriorityLevel = currentTask.priorityLevel;
108
- var continuationCallback = callback(
109
- currentTask.expirationTime <= currentTime
110
- );
111
- currentTime = exports.unstable_now();
112
- if ("function" === typeof continuationCallback) {
113
- currentTask.callback = continuationCallback;
114
- advanceTimers(currentTime);
115
- hasMoreWork = true;
116
- break b;
117
- }
118
- currentTask === peek(taskQueue) && pop(taskQueue);
119
- advanceTimers(currentTime);
120
- } else pop(taskQueue);
121
- currentTask = peek(taskQueue);
122
- }
123
- if (null !== currentTask) hasMoreWork = true;
124
- else {
125
- var firstTimer = peek(timerQueue);
126
- null !== firstTimer && requestHostTimeout(
127
- handleTimeout,
128
- firstTimer.startTime - currentTime
129
- );
130
- hasMoreWork = false;
131
- }
132
- }
133
- break a;
134
- } finally {
135
- currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
136
- }
137
- hasMoreWork = void 0;
138
- }
139
- } finally {
140
- hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
141
- }
142
- }
143
- }
144
- var schedulePerformWorkUntilDeadline;
145
- if ("function" === typeof localSetImmediate)
146
- schedulePerformWorkUntilDeadline = function() {
147
- localSetImmediate(performWorkUntilDeadline);
148
- };
149
- else if ("undefined" !== typeof MessageChannel) {
150
- var channel = new MessageChannel(), port = channel.port2;
151
- channel.port1.onmessage = performWorkUntilDeadline;
152
- schedulePerformWorkUntilDeadline = function() {
153
- port.postMessage(null);
154
- };
155
- } else
156
- schedulePerformWorkUntilDeadline = function() {
157
- localSetTimeout(performWorkUntilDeadline, 0);
158
- };
159
- function requestHostTimeout(callback, ms) {
160
- taskTimeoutID = localSetTimeout(function() {
161
- callback(exports.unstable_now());
162
- }, ms);
163
- }
164
- exports.unstable_IdlePriority = 5;
165
- exports.unstable_ImmediatePriority = 1;
166
- exports.unstable_LowPriority = 4;
167
- exports.unstable_NormalPriority = 3;
168
- exports.unstable_Profiling = null;
169
- exports.unstable_UserBlockingPriority = 2;
170
- exports.unstable_cancelCallback = function(task) {
171
- task.callback = null;
172
- };
173
- exports.unstable_forceFrameRate = function(fps) {
174
- 0 > fps || 125 < fps ? console.error(
175
- "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
176
- ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
177
- };
178
- exports.unstable_getCurrentPriorityLevel = function() {
179
- return currentPriorityLevel;
180
- };
181
- exports.unstable_next = function(eventHandler) {
182
- switch (currentPriorityLevel) {
183
- case 1:
184
- case 2:
185
- case 3:
186
- var priorityLevel = 3;
187
- break;
188
- default:
189
- priorityLevel = currentPriorityLevel;
190
- }
191
- var previousPriorityLevel = currentPriorityLevel;
192
- currentPriorityLevel = priorityLevel;
193
- try {
194
- return eventHandler();
195
- } finally {
196
- currentPriorityLevel = previousPriorityLevel;
197
- }
198
- };
199
- exports.unstable_requestPaint = function() {
200
- needsPaint = true;
201
- };
202
- exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
203
- switch (priorityLevel) {
204
- case 1:
205
- case 2:
206
- case 3:
207
- case 4:
208
- case 5:
209
- break;
210
- default:
211
- priorityLevel = 3;
212
- }
213
- var previousPriorityLevel = currentPriorityLevel;
214
- currentPriorityLevel = priorityLevel;
215
- try {
216
- return eventHandler();
217
- } finally {
218
- currentPriorityLevel = previousPriorityLevel;
219
- }
220
- };
221
- exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
222
- var currentTime = exports.unstable_now();
223
- "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
224
- switch (priorityLevel) {
225
- case 1:
226
- var timeout = -1;
227
- break;
228
- case 2:
229
- timeout = 250;
230
- break;
231
- case 5:
232
- timeout = 1073741823;
233
- break;
234
- case 4:
235
- timeout = 1e4;
236
- break;
237
- default:
238
- timeout = 5e3;
239
- }
240
- timeout = options + timeout;
241
- priorityLevel = {
242
- id: taskIdCounter++,
243
- callback,
244
- priorityLevel,
245
- startTime: options,
246
- expirationTime: timeout,
247
- sortIndex: -1
248
- };
249
- options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
250
- return priorityLevel;
251
- };
252
- exports.unstable_shouldYield = shouldYieldToHost;
253
- exports.unstable_wrapCallback = function(callback) {
254
- var parentPriorityLevel = currentPriorityLevel;
255
- return function() {
256
- var previousPriorityLevel = currentPriorityLevel;
257
- currentPriorityLevel = parentPriorityLevel;
258
- try {
259
- return callback.apply(this, arguments);
260
- } finally {
261
- currentPriorityLevel = previousPriorityLevel;
262
- }
263
- };
264
- };
265
- })(scheduler_production);
266
- return scheduler_production;
267
- }
268
- var scheduler_development = {};
269
- /**
270
- * @license React
271
- * scheduler.development.js
272
- *
273
- * Copyright (c) Meta Platforms, Inc. and affiliates.
274
- *
275
- * This source code is licensed under the MIT license found in the
276
- * LICENSE file in the root directory of this source tree.
277
- */
278
- var hasRequiredScheduler_development;
279
- function requireScheduler_development() {
280
- if (hasRequiredScheduler_development) return scheduler_development;
281
- hasRequiredScheduler_development = 1;
282
- (function(exports) {
283
- "production" !== process.env.NODE_ENV && function() {
284
- function performWorkUntilDeadline() {
285
- needsPaint = false;
286
- if (isMessageLoopRunning) {
287
- var currentTime = exports.unstable_now();
288
- startTime = currentTime;
289
- var hasMoreWork = true;
290
- try {
291
- a: {
292
- isHostCallbackScheduled = false;
293
- isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
294
- isPerformingWork = true;
295
- var previousPriorityLevel = currentPriorityLevel;
296
- try {
297
- b: {
298
- advanceTimers(currentTime);
299
- for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
300
- var callback = currentTask.callback;
301
- if ("function" === typeof callback) {
302
- currentTask.callback = null;
303
- currentPriorityLevel = currentTask.priorityLevel;
304
- var continuationCallback = callback(
305
- currentTask.expirationTime <= currentTime
306
- );
307
- currentTime = exports.unstable_now();
308
- if ("function" === typeof continuationCallback) {
309
- currentTask.callback = continuationCallback;
310
- advanceTimers(currentTime);
311
- hasMoreWork = true;
312
- break b;
313
- }
314
- currentTask === peek(taskQueue) && pop(taskQueue);
315
- advanceTimers(currentTime);
316
- } else pop(taskQueue);
317
- currentTask = peek(taskQueue);
318
- }
319
- if (null !== currentTask) hasMoreWork = true;
320
- else {
321
- var firstTimer = peek(timerQueue);
322
- null !== firstTimer && requestHostTimeout(
323
- handleTimeout,
324
- firstTimer.startTime - currentTime
325
- );
326
- hasMoreWork = false;
327
- }
328
- }
329
- break a;
330
- } finally {
331
- currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
332
- }
333
- hasMoreWork = void 0;
334
- }
335
- } finally {
336
- hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
337
- }
338
- }
339
- }
340
- function push(heap, node) {
341
- var index = heap.length;
342
- heap.push(node);
343
- a: for (; 0 < index; ) {
344
- var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
345
- if (0 < compare(parent, node))
346
- heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
347
- else break a;
348
- }
349
- }
350
- function peek(heap) {
351
- return 0 === heap.length ? null : heap[0];
352
- }
353
- function pop(heap) {
354
- if (0 === heap.length) return null;
355
- var first = heap[0], last = heap.pop();
356
- if (last !== first) {
357
- heap[0] = last;
358
- a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
359
- var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
360
- if (0 > compare(left, last))
361
- rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
362
- else if (rightIndex < length && 0 > compare(right, last))
363
- heap[index] = right, heap[rightIndex] = last, index = rightIndex;
364
- else break a;
365
- }
366
- }
367
- return first;
368
- }
369
- function compare(a, b) {
370
- var diff = a.sortIndex - b.sortIndex;
371
- return 0 !== diff ? diff : a.id - b.id;
372
- }
373
- function advanceTimers(currentTime) {
374
- for (var timer = peek(timerQueue); null !== timer; ) {
375
- if (null === timer.callback) pop(timerQueue);
376
- else if (timer.startTime <= currentTime)
377
- pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
378
- else break;
379
- timer = peek(timerQueue);
380
- }
381
- }
382
- function handleTimeout(currentTime) {
383
- isHostTimeoutScheduled = false;
384
- advanceTimers(currentTime);
385
- if (!isHostCallbackScheduled)
386
- if (null !== peek(taskQueue))
387
- isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
388
- else {
389
- var firstTimer = peek(timerQueue);
390
- null !== firstTimer && requestHostTimeout(
391
- handleTimeout,
392
- firstTimer.startTime - currentTime
393
- );
394
- }
395
- }
396
- function shouldYieldToHost() {
397
- return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true;
398
- }
399
- function requestHostTimeout(callback, ms) {
400
- taskTimeoutID = localSetTimeout(function() {
401
- callback(exports.unstable_now());
402
- }, ms);
403
- }
404
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
405
- exports.unstable_now = void 0;
406
- if ("object" === typeof performance && "function" === typeof performance.now) {
407
- var localPerformance = performance;
408
- exports.unstable_now = function() {
409
- return localPerformance.now();
410
- };
411
- } else {
412
- var localDate = Date, initialTime = localDate.now();
413
- exports.unstable_now = function() {
414
- return localDate.now() - initialTime;
415
- };
416
- }
417
- var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
418
- if ("function" === typeof localSetImmediate)
419
- var schedulePerformWorkUntilDeadline = function() {
420
- localSetImmediate(performWorkUntilDeadline);
421
- };
422
- else if ("undefined" !== typeof MessageChannel) {
423
- var channel = new MessageChannel(), port = channel.port2;
424
- channel.port1.onmessage = performWorkUntilDeadline;
425
- schedulePerformWorkUntilDeadline = function() {
426
- port.postMessage(null);
427
- };
428
- } else
429
- schedulePerformWorkUntilDeadline = function() {
430
- localSetTimeout(performWorkUntilDeadline, 0);
431
- };
432
- exports.unstable_IdlePriority = 5;
433
- exports.unstable_ImmediatePriority = 1;
434
- exports.unstable_LowPriority = 4;
435
- exports.unstable_NormalPriority = 3;
436
- exports.unstable_Profiling = null;
437
- exports.unstable_UserBlockingPriority = 2;
438
- exports.unstable_cancelCallback = function(task) {
439
- task.callback = null;
440
- };
441
- exports.unstable_forceFrameRate = function(fps) {
442
- 0 > fps || 125 < fps ? console.error(
443
- "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
444
- ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
445
- };
446
- exports.unstable_getCurrentPriorityLevel = function() {
447
- return currentPriorityLevel;
448
- };
449
- exports.unstable_next = function(eventHandler) {
450
- switch (currentPriorityLevel) {
451
- case 1:
452
- case 2:
453
- case 3:
454
- var priorityLevel = 3;
455
- break;
456
- default:
457
- priorityLevel = currentPriorityLevel;
458
- }
459
- var previousPriorityLevel = currentPriorityLevel;
460
- currentPriorityLevel = priorityLevel;
461
- try {
462
- return eventHandler();
463
- } finally {
464
- currentPriorityLevel = previousPriorityLevel;
465
- }
466
- };
467
- exports.unstable_requestPaint = function() {
468
- needsPaint = true;
469
- };
470
- exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
471
- switch (priorityLevel) {
472
- case 1:
473
- case 2:
474
- case 3:
475
- case 4:
476
- case 5:
477
- break;
478
- default:
479
- priorityLevel = 3;
480
- }
481
- var previousPriorityLevel = currentPriorityLevel;
482
- currentPriorityLevel = priorityLevel;
483
- try {
484
- return eventHandler();
485
- } finally {
486
- currentPriorityLevel = previousPriorityLevel;
487
- }
488
- };
489
- exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
490
- var currentTime = exports.unstable_now();
491
- "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
492
- switch (priorityLevel) {
493
- case 1:
494
- var timeout = -1;
495
- break;
496
- case 2:
497
- timeout = 250;
498
- break;
499
- case 5:
500
- timeout = 1073741823;
501
- break;
502
- case 4:
503
- timeout = 1e4;
504
- break;
505
- default:
506
- timeout = 5e3;
507
- }
508
- timeout = options + timeout;
509
- priorityLevel = {
510
- id: taskIdCounter++,
511
- callback,
512
- priorityLevel,
513
- startTime: options,
514
- expirationTime: timeout,
515
- sortIndex: -1
516
- };
517
- options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
518
- return priorityLevel;
519
- };
520
- exports.unstable_shouldYield = shouldYieldToHost;
521
- exports.unstable_wrapCallback = function(callback) {
522
- var parentPriorityLevel = currentPriorityLevel;
523
- return function() {
524
- var previousPriorityLevel = currentPriorityLevel;
525
- currentPriorityLevel = parentPriorityLevel;
526
- try {
527
- return callback.apply(this, arguments);
528
- } finally {
529
- currentPriorityLevel = previousPriorityLevel;
530
- }
531
- };
532
- };
533
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
534
- }();
535
- })(scheduler_development);
536
- return scheduler_development;
537
- }
538
- if (process.env.NODE_ENV === "production") {
539
- scheduler.exports = requireScheduler_production();
540
- } else {
541
- scheduler.exports = requireScheduler_development();
542
- }
543
- var schedulerExports = scheduler.exports;
544
- const CONTEXT_VALUE = Symbol();
545
- const ORIGINAL_PROVIDER = Symbol();
546
- const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
547
- const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect;
548
- const runWithNormalPriority = schedulerExports.unstable_runWithPriority ? (fn) => {
549
- try {
550
- schedulerExports.unstable_runWithPriority(schedulerExports.unstable_NormalPriority, fn);
551
- } catch (e) {
552
- if (e.message === "Not implemented.") {
553
- fn();
554
- } else {
555
- throw e;
556
- }
557
- }
558
- } : (fn) => fn();
559
- const createProvider = (ProviderOrig) => {
560
- const ContextProvider = ({ value, children }) => {
561
- const valueRef = useRef(value);
562
- const versionRef = useRef(0);
563
- const [resolve, setResolve] = useState(null);
564
- if (resolve) {
565
- resolve(value);
566
- setResolve(null);
567
- }
568
- const contextValue = useRef();
569
- if (!contextValue.current) {
570
- const listeners = /* @__PURE__ */ new Set();
571
- const update = (fn, options) => {
572
- versionRef.current += 1;
573
- const action = {
574
- n: versionRef.current
575
- };
576
- if (options === null || options === void 0 ? void 0 : options.suspense) {
577
- action.n *= -1;
578
- action.p = new Promise((r) => {
579
- setResolve(() => (v) => {
580
- action.v = v;
581
- delete action.p;
582
- r(v);
583
- });
584
- });
585
- }
586
- listeners.forEach((listener) => listener(action));
587
- fn();
588
- };
589
- contextValue.current = {
590
- [CONTEXT_VALUE]: {
591
- /* "v"alue */
592
- v: valueRef,
593
- /* versio"n" */
594
- n: versionRef,
595
- /* "l"isteners */
596
- l: listeners,
597
- /* "u"pdate */
598
- u: update
599
- }
600
- };
601
- }
602
- useIsomorphicLayoutEffect(() => {
603
- valueRef.current = value;
604
- versionRef.current += 1;
605
- runWithNormalPriority(() => {
606
- contextValue.current[CONTEXT_VALUE].l.forEach((listener) => {
607
- listener({ n: versionRef.current, v: value });
608
- });
609
- });
610
- }, [value]);
611
- return createElement(ProviderOrig, { value: contextValue.current }, children);
612
- };
613
- return ContextProvider;
614
- };
615
- const identity = (x) => x;
616
- function createContext(defaultValue) {
617
- const context = createContext$1({
618
- [CONTEXT_VALUE]: {
619
- /* "v"alue */
620
- v: { current: defaultValue },
621
- /* versio"n" */
622
- n: { current: -1 },
623
- /* "l"isteners */
624
- l: /* @__PURE__ */ new Set(),
625
- /* "u"pdate */
626
- u: (f) => f()
627
- }
628
- });
629
- context[ORIGINAL_PROVIDER] = context.Provider;
630
- context.Provider = createProvider(context.Provider);
631
- delete context.Consumer;
632
- return context;
633
- }
634
- function useContextSelector(context, selector) {
635
- const contextValue = useContext$1(context)[CONTEXT_VALUE];
636
- if (typeof process === "object" && process.env.NODE_ENV !== "production") {
637
- if (!contextValue) {
638
- throw new Error("useContextSelector requires special context");
639
- }
640
- }
641
- const {
642
- /* "v"alue */
643
- v: { current: value },
644
- /* versio"n" */
645
- n: { current: version },
646
- /* "l"isteners */
647
- l: listeners
648
- } = contextValue;
649
- const selected = selector(value);
650
- const [state, dispatch] = useReducer((prev, action) => {
651
- if (!action) {
652
- return [value, selected];
653
- }
654
- if ("p" in action) {
655
- throw action.p;
656
- }
657
- if (action.n === version) {
658
- if (Object.is(prev[1], selected)) {
659
- return prev;
660
- }
661
- return [value, selected];
662
- }
663
- try {
664
- if ("v" in action) {
665
- if (Object.is(prev[0], action.v)) {
666
- return prev;
667
- }
668
- const nextSelected = selector(action.v);
669
- if (Object.is(prev[1], nextSelected)) {
670
- return prev;
671
- }
672
- return [action.v, nextSelected];
673
- }
674
- } catch (_e) {
675
- }
676
- return [...prev];
677
- }, [value, selected]);
678
- if (!Object.is(state[1], selected)) {
679
- dispatch();
680
- }
681
- useIsomorphicLayoutEffect(() => {
682
- listeners.add(dispatch);
683
- return () => {
684
- listeners.delete(dispatch);
685
- };
686
- }, [listeners]);
687
- return state[1];
688
- }
689
- function useContext(context) {
690
- return useContextSelector(context, identity);
691
- }
692
- export {
693
- useContext as a,
694
- createContext as c,
695
- useContextSelector as u
696
- };