@cccsaurora/clue-ui 1.3.0-dev.404 → 1.3.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 (224) hide show
  1. package/ActionForm-CHOSKfvu.js +4403 -0
  2. package/AnnotationDetails-Bqq6Ymmg.js +160 -0
  3. package/AnnotationPreview-CqXmC-j8.js +140 -0
  4. package/ClueEnrichContext-DL6aGe1k.js +432 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_MapCache-DRK-s2eK.js +179 -0
  7. package/_Set-DrS_bbSV.js +6 -0
  8. package/_Uint8Array-D9R2N9Lp.js +98 -0
  9. package/_arrayIncludes-Dcl_29E6.js +25 -0
  10. package/_arrayPush-DBJIuK2V.js +8 -0
  11. package/_baseAssignValue-Bx1cxHj5.js +12 -0
  12. package/_baseClone-DRhywkxm.js +211 -0
  13. package/_baseExtremum-DodEaEyF.js +16 -0
  14. package/_baseFlatten-CD9NgrYE.js +72 -0
  15. package/_baseGet-bVwDaGrA.js +80 -0
  16. package/_baseGetTag-CxDaTem-.js +25 -0
  17. package/_baseIsEqual-C-FKsm1J.js +150 -0
  18. package/_baseIteratee-D0FhC5bC.js +95 -0
  19. package/_baseRest-D_eW2E0d.js +8 -0
  20. package/_baseSlice-M5RKzt1A.js +10 -0
  21. package/_baseSum-wEbgNeUs.js +10 -0
  22. package/_baseUniq-D3N8igOm.js +41 -0
  23. package/_cacheHas-Wgl-hw34.js +22 -0
  24. package/_commonjsHelpers-C6fGbg64.js +6 -0
  25. package/_createAggregator-BVj8IAuF.js +53 -0
  26. package/_defineProperty-BZU4WKA3.js +11 -0
  27. package/_getPrototype-BGBCg-aX.js +5 -0
  28. package/_getTag-B7R9qBo7.js +73 -0
  29. package/_isIterateeCall-Dm0VTAYy.js +13 -0
  30. package/_setToArray-Ck4YZu0Z.js +9 -0
  31. package/cloneDeep-fV59zwUf.js +8 -0
  32. package/components/AnnotationBody.js +35 -49
  33. package/components/AnnotationDetailPopover.js +30 -36
  34. package/components/AnnotationDetails.js +7 -7
  35. package/components/AnnotationEntry.js +35 -35
  36. package/components/AnnotationPreview.js +5 -5
  37. package/components/ClassificationChip.js +23 -44
  38. package/components/CountBadge.js +26 -31
  39. package/components/EnrichedCard.js +97 -110
  40. package/components/EnrichedChip.js +105 -130
  41. package/components/EnrichedTypography.js +107 -133
  42. package/components/ErrorBoundary.js +24 -28
  43. package/components/RetryFailedEnrichments.js +9 -10
  44. package/components/SourcePicker.js +49 -57
  45. package/components/actions/ActionForm.js +4 -4
  46. package/components/actions/ExecutePopover.js +59 -75
  47. package/components/actions/ResultModal.js +4 -4
  48. package/components/actions/form/schemaAdapter.js +23 -39
  49. package/components/actions/formats/FileResult.js +59 -86
  50. package/components/actions/formats/index.js +25 -29
  51. package/components/display/graph/ExpandMoreButton.js +10 -10
  52. package/components/display/graph/elements/NodeCard.js +91 -111
  53. package/components/display/graph/elements/NodeTag.js +13 -15
  54. package/components/display/graph/index.js +202 -261
  55. package/components/display/graph/visualizations/Leaf.js +70 -89
  56. package/components/display/graph/visualizations/cloud/index.js +81 -98
  57. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  58. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  59. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  60. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  61. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  62. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  63. package/components/display/graph/visualizations/icons/index.js +13 -14
  64. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  65. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  66. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  67. package/components/display/graph/visualizations/tree/index.js +306 -408
  68. package/components/display/icons/Iconified.js +12 -27
  69. package/components/display/json/index.js +4 -4
  70. package/components/display/markdown/index.js +5770 -8678
  71. package/components/enrichment/EnrichPopover.js +46 -54
  72. package/components/fetchers/Fetcher.js +123 -166
  73. package/components/fetchers/FetcherResultView.js +27 -31
  74. package/components/fetchers/PreviewModal.js +16 -17
  75. package/components/fetchers/StatusChip.js +17 -21
  76. package/components/group/Entry.js +11 -13
  77. package/components/group/Group.js +10 -13
  78. package/components/group/GroupControl.js +65 -76
  79. package/components/stats/QueryStatus.js +32 -45
  80. package/countBy-B3rNuG4T.js +8 -0
  81. package/data/event.js +4 -6
  82. package/database/globals.js +2 -2
  83. package/database/index.js +3 -3
  84. package/database/replication.js +4 -4
  85. package/get-Bil3mzRD.js +8 -0
  86. package/groupBy-CrJC7sGa.js +8 -0
  87. package/hooks/ClueActionContext.js +6 -6
  88. package/hooks/ClueComponentContext.js +23 -29
  89. package/hooks/ClueConfigProvider.js +12 -14
  90. package/hooks/ClueDatabaseContext.js +23 -35
  91. package/hooks/ClueEnrichContext.js +11 -11
  92. package/hooks/ClueFetcherContext.js +56 -83
  93. package/hooks/ClueGroupContext.js +14 -17
  94. package/hooks/CluePopupContext.js +5 -5
  95. package/hooks/ClueProvider.js +11 -13
  96. package/hooks/ClueUIPluginContext.js +35 -49
  97. package/hooks/selectors.js +7 -7
  98. package/hooks/useActionResult.js +3 -3
  99. package/hooks/useAnnotations.js +32 -48
  100. package/hooks/useClue.js +4 -6
  101. package/hooks/useClueActions.js +3 -3
  102. package/hooks/useClueConfig.js +4 -6
  103. package/hooks/useClueTypeConfig.js +24 -49
  104. package/hooks/useClueUIPlugins.js +7 -8
  105. package/hooks/useComparator.js +435 -722
  106. package/hooks/useErrors.js +18 -22
  107. package/hooks/useFetcherResult.js +24 -33
  108. package/hooks/useMyHighlights.js +36 -66
  109. package/hooks/useMyLocalStorage.js +37 -66
  110. package/iconify-Ptb5dTKy.js +1270 -0
  111. package/icons/Action.js +49 -66
  112. package/icons/Assessment.js +69 -85
  113. package/icons/Context.js +63 -77
  114. package/icons/Opinion.js +60 -76
  115. package/icons/iconMap.js +2 -2
  116. package/identity-ByMq8VxU.js +6 -0
  117. package/index-BH-gBhtO.js +2282 -0
  118. package/index-BM9Sve5T.js +571 -0
  119. package/index-Cj4d5cGz.js +357 -0
  120. package/index-Dh2PP9h8.js +11747 -0
  121. package/index-DoFpWPHo.js +975 -0
  122. package/index-DzVIklWY.js +6464 -0
  123. package/isArguments-BWcXOE6a.js +24 -0
  124. package/isArray-WzO_os3q.js +4 -0
  125. package/isEmpty-DKxrY-_M.js +22 -0
  126. package/isNil-CjWwlQS3.js +6 -0
  127. package/isObject-B53jY8Qg.js +7 -0
  128. package/isObjectLike-CYbdrIBr.js +6 -0
  129. package/isSymbol-DE1Kcy2M.js +9 -0
  130. package/last-7CdUxN0r.js +7 -0
  131. package/main.js +62 -62
  132. package/maxBy-BOWDkL_D.js +8 -0
  133. package/package.json +1 -1
  134. package/plugins/ClueUIPlugin.js +96 -163
  135. package/plugins/file/index.js +15 -15
  136. package/plugins/graph/index.js +26 -29
  137. package/plugins/image/index.js +24 -28
  138. package/plugins/json/index.js +21 -21
  139. package/plugins/markdown/index.js +18 -18
  140. package/plugins/registry.js +6 -6
  141. package/plugins/store.js +4 -4
  142. package/plugins/test/index.js +17 -17
  143. package/plugins/utils.js +12 -13
  144. package/replication-WkKbPdwG.js +8453 -0
  145. package/sessionStorage-DFMae61b.js +90 -0
  146. package/sortBy-BHe812lF.js +74 -0
  147. package/store-DClHBq7r.js +1169 -0
  148. package/sumBy-B7f_bP_k.js +8 -0
  149. package/text/Frequency.js +23 -42
  150. package/toFinite-CBrE65MP.js +14 -0
  151. package/toNumber-CxmWey0f.js +31 -0
  152. package/uniq-B4UZ671_.js +7 -0
  153. package/utils/chain.js +65 -92
  154. package/utils/classificationParser.js +256 -519
  155. package/utils/constants.js +11 -37
  156. package/utils/graph.js +45 -72
  157. package/utils/hashUtil.js +7 -7
  158. package/utils/line.js +81 -131
  159. package/utils/loggerUtil.js +3 -5
  160. package/utils/sessionStorage.js +7 -7
  161. package/utils/time.js +427 -447
  162. package/utils/utils.js +10 -10
  163. package/utils/window.js +10 -21
  164. package/utils-SpTOhPYl.js +147 -0
  165. package/ActionForm-CqKcnDWC.js +0 -6099
  166. package/AnnotationDetails-BlPd3T8k.js +0 -176
  167. package/AnnotationPreview-Bl447SKT.js +0 -188
  168. package/ClueEnrichContext-B3YrTCaJ.js +0 -567
  169. package/FlexOne-BSYAhhtG.js +0 -9
  170. package/_MapCache-kuEY_iOH.js +0 -220
  171. package/_Set-BrSMTlHn.js +0 -6
  172. package/_Uint8Array-OPpgYQj7.js +0 -123
  173. package/_arrayIncludes-BNqL-9ZP.js +0 -31
  174. package/_arrayPush-CBkQqaE_.js +0 -10
  175. package/_baseAssignValue-CNUVPOBW.js +0 -16
  176. package/_baseClone-9FaRd1R2.js +0 -287
  177. package/_baseExtremum-wOGT4Dgw.js +0 -18
  178. package/_baseFlatten-Co6QHDlG.js +0 -92
  179. package/_baseGet-Cmp6FztG.js +0 -109
  180. package/_baseGetTag-Hj-0NTYF.js +0 -44
  181. package/_baseIsEqual-1CpU47TZ.js +0 -211
  182. package/_baseIteratee-BN7Vbe5g.js +0 -126
  183. package/_baseRest-BZ_hQ9PC.js +0 -8
  184. package/_baseSlice-GAv_YFTT.js +0 -20
  185. package/_baseSum-D0WC1dN0.js +0 -13
  186. package/_baseUniq-BnvS3JHL.js +0 -63
  187. package/_cacheHas-_aF2y2Xv.js +0 -25
  188. package/_commonjsHelpers-CUmg6egw.js +0 -6
  189. package/_createAggregator-BUZrP_is.js +0 -63
  190. package/_defineProperty-DolZLKmv.js +0 -12
  191. package/_getPrototype-Bb4gm-5m.js +0 -5
  192. package/_getTag-CML_cXiN.js +0 -105
  193. package/_isIterateeCall-B1IFEqVv.js +0 -17
  194. package/_setToArray-CqyqC8ib.js +0 -10
  195. package/cloneDeep-l3UkXG5M.js +0 -8
  196. package/countBy-Bqcp3VCs.js +0 -14
  197. package/get-CdMThM8x.js +0 -8
  198. package/groupBy-BVV07EGQ.js +0 -14
  199. package/iconify-DJxl6dC-.js +0 -1789
  200. package/identity-CPGTqrE4.js +0 -6
  201. package/index-CAvu7vwt.js +0 -1172
  202. package/index-CVUD9o3t.js +0 -15768
  203. package/index-DUEubgWN.js +0 -464
  204. package/index-Dj1N4IQP.js +0 -9314
  205. package/index-DpJxD74E.js +0 -3272
  206. package/index-_gpzM2Px.js +0 -702
  207. package/isArguments-CuYlEuhP.js +0 -27
  208. package/isArray-RJPfgWqI.js +0 -4
  209. package/isEmpty-BE656RUK.js +0 -30
  210. package/isNil-CIubwp4T.js +0 -6
  211. package/isObject-FTY-5JQX.js +0 -7
  212. package/isObjectLike-CeENW9FN.js +0 -6
  213. package/isSymbol-D_H4HPZQ.js +0 -9
  214. package/last-CUCl67Im.js +0 -7
  215. package/maxBy-BjjQmX5t.js +0 -8
  216. package/replication--gLEZw8a.js +0 -11777
  217. package/sessionStorage-B68y-wnE.js +0 -140
  218. package/sortBy-B8JVsLQY.js +0 -95
  219. package/store-B9sjQbcS.js +0 -2163
  220. package/sumBy-D-HCzM2i.js +0 -8
  221. package/toFinite-meZTg4Su.js +0 -16
  222. package/toNumber-B5JaA1vX.js +0 -39
  223. package/uniq-CahZPAwp.js +0 -7
  224. package/utils-CEySTPtg.js +0 -224
package/index-_gpzM2Px.js DELETED
@@ -1,702 +0,0 @@
1
- import { createContext as createContext$1, useRef, useState, createElement, useEffect, useLayoutEffect, 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
- var hasRequiredScheduler;
539
- function requireScheduler() {
540
- if (hasRequiredScheduler) return scheduler.exports;
541
- hasRequiredScheduler = 1;
542
- if (process.env.NODE_ENV === "production") {
543
- scheduler.exports = requireScheduler_production();
544
- } else {
545
- scheduler.exports = requireScheduler_development();
546
- }
547
- return scheduler.exports;
548
- }
549
- var schedulerExports = requireScheduler();
550
- const CONTEXT_VALUE = Symbol();
551
- const ORIGINAL_PROVIDER = Symbol();
552
- const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
553
- const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect;
554
- const runWithNormalPriority = schedulerExports.unstable_runWithPriority ? (fn) => {
555
- try {
556
- schedulerExports.unstable_runWithPriority(schedulerExports.unstable_NormalPriority, fn);
557
- } catch (e) {
558
- if (e.message === "Not implemented.") {
559
- fn();
560
- } else {
561
- throw e;
562
- }
563
- }
564
- } : (fn) => fn();
565
- const createProvider = (ProviderOrig) => {
566
- const ContextProvider = ({ value, children }) => {
567
- const valueRef = useRef(value);
568
- const versionRef = useRef(0);
569
- const [resolve, setResolve] = useState(null);
570
- if (resolve) {
571
- resolve(value);
572
- setResolve(null);
573
- }
574
- const contextValue = useRef();
575
- if (!contextValue.current) {
576
- const listeners = /* @__PURE__ */ new Set();
577
- const update = (fn, options) => {
578
- versionRef.current += 1;
579
- const action = {
580
- n: versionRef.current
581
- };
582
- if (options === null || options === void 0 ? void 0 : options.suspense) {
583
- action.n *= -1;
584
- action.p = new Promise((r) => {
585
- setResolve(() => (v) => {
586
- action.v = v;
587
- delete action.p;
588
- r(v);
589
- });
590
- });
591
- }
592
- listeners.forEach((listener) => listener(action));
593
- fn();
594
- };
595
- contextValue.current = {
596
- [CONTEXT_VALUE]: {
597
- /* "v"alue */
598
- v: valueRef,
599
- /* versio"n" */
600
- n: versionRef,
601
- /* "l"isteners */
602
- l: listeners,
603
- /* "u"pdate */
604
- u: update
605
- }
606
- };
607
- }
608
- useIsomorphicLayoutEffect(() => {
609
- valueRef.current = value;
610
- versionRef.current += 1;
611
- runWithNormalPriority(() => {
612
- contextValue.current[CONTEXT_VALUE].l.forEach((listener) => {
613
- listener({ n: versionRef.current, v: value });
614
- });
615
- });
616
- }, [value]);
617
- return createElement(ProviderOrig, { value: contextValue.current }, children);
618
- };
619
- return ContextProvider;
620
- };
621
- const identity = (x) => x;
622
- function createContext(defaultValue) {
623
- const context = createContext$1({
624
- [CONTEXT_VALUE]: {
625
- /* "v"alue */
626
- v: { current: defaultValue },
627
- /* versio"n" */
628
- n: { current: -1 },
629
- /* "l"isteners */
630
- l: /* @__PURE__ */ new Set(),
631
- /* "u"pdate */
632
- u: (f) => f()
633
- }
634
- });
635
- context[ORIGINAL_PROVIDER] = context.Provider;
636
- context.Provider = createProvider(context.Provider);
637
- delete context.Consumer;
638
- return context;
639
- }
640
- function useContextSelector(context, selector) {
641
- const contextValue = useContext$1(context)[CONTEXT_VALUE];
642
- if (typeof process === "object" && process.env.NODE_ENV !== "production") {
643
- if (!contextValue) {
644
- throw new Error("useContextSelector requires special context");
645
- }
646
- }
647
- const {
648
- /* "v"alue */
649
- v: { current: value },
650
- /* versio"n" */
651
- n: { current: version },
652
- /* "l"isteners */
653
- l: listeners
654
- } = contextValue;
655
- const selected = selector(value);
656
- const [state, dispatch] = useReducer((prev, action) => {
657
- if (!action) {
658
- return [value, selected];
659
- }
660
- if ("p" in action) {
661
- throw action.p;
662
- }
663
- if (action.n === version) {
664
- if (Object.is(prev[1], selected)) {
665
- return prev;
666
- }
667
- return [value, selected];
668
- }
669
- try {
670
- if ("v" in action) {
671
- if (Object.is(prev[0], action.v)) {
672
- return prev;
673
- }
674
- const nextSelected = selector(action.v);
675
- if (Object.is(prev[1], nextSelected)) {
676
- return prev;
677
- }
678
- return [action.v, nextSelected];
679
- }
680
- } catch (_e) {
681
- }
682
- return [...prev];
683
- }, [value, selected]);
684
- if (!Object.is(state[1], selected)) {
685
- dispatch();
686
- }
687
- useIsomorphicLayoutEffect(() => {
688
- listeners.add(dispatch);
689
- return () => {
690
- listeners.delete(dispatch);
691
- };
692
- }, [listeners]);
693
- return state[1];
694
- }
695
- function useContext(context) {
696
- return useContextSelector(context, identity);
697
- }
698
- export {
699
- useContextSelector as a,
700
- createContext as c,
701
- useContext as u
702
- };