@expo/cli 54.1.0-canary-20251013-623c5a6 → 54.1.0-canary-20251023-4c86f95

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 (121) hide show
  1. package/build/bin/cli +1 -1
  2. package/build/src/export/embed/exportEmbedAsync.js +43 -3
  3. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  4. package/build/src/export/embed/resolveOptions.js.map +1 -1
  5. package/build/src/export/index.js +2 -1
  6. package/build/src/export/index.js.map +1 -1
  7. package/build/src/export/resolveOptions.js +1 -1
  8. package/build/src/export/resolveOptions.js.map +1 -1
  9. package/build/src/start/server/metro/MetroBundlerDevServer.js +29 -9
  10. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  11. package/build/src/start/server/metro/MetroTerminalReporter.js +2 -4
  12. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  13. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  14. package/build/src/start/server/metro/externals.js +0 -11
  15. package/build/src/start/server/metro/externals.js.map +1 -1
  16. package/build/src/start/server/metro/fetchRouterManifest.js +1 -1
  17. package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
  18. package/build/src/start/server/metro/getCssModulesFromBundler.js.map +1 -1
  19. package/build/src/start/server/metro/instantiateMetro.js +14 -10
  20. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  21. package/build/src/start/server/metro/log-box/LogBoxLog.js +11 -7
  22. package/build/src/start/server/metro/log-box/LogBoxLog.js.map +1 -1
  23. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  24. package/build/src/start/server/metro/metroErrorInterface.js +14 -43
  25. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  26. package/build/src/start/server/metro/withMetroMultiPlatform.js +55 -43
  27. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  28. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  29. package/build/src/start/server/serverLogLikeMetro.js +1 -1
  30. package/build/src/start/server/serverLogLikeMetro.js.map +1 -1
  31. package/build/src/utils/env.js +6 -0
  32. package/build/src/utils/env.js.map +1 -1
  33. package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
  34. package/build/src/utils/telemetry/utils/context.js +1 -1
  35. package/package.json +20 -18
  36. package/static/canary/react-is/cjs/react-is.development.js +0 -133
  37. package/static/canary/react-is/cjs/react-is.production.js +0 -130
  38. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +0 -16820
  39. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +0 -10552
  40. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +0 -11255
  41. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +0 -17064
  42. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +0 -10742
  43. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +0 -11450
  44. package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +0 -414
  45. package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +0 -406
  46. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +0 -150
  47. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +0 -140
  48. package/static/canary/scheduler/cjs/scheduler.development.js +0 -364
  49. package/static/canary/scheduler/cjs/scheduler.native.development.js +0 -350
  50. package/static/canary/scheduler/cjs/scheduler.native.production.js +0 -330
  51. package/static/canary/scheduler/cjs/scheduler.production.js +0 -340
  52. package/static/canary-full/node_modules/react/LICENSE +0 -21
  53. package/static/canary-full/node_modules/react/README.md +0 -37
  54. package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.development.js +0 -24
  55. package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.production.js +0 -16
  56. package/static/canary-full/node_modules/react/cjs/react-compiler-runtime.profiling.js +0 -16
  57. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.development.js +0 -349
  58. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.production.js +0 -14
  59. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.profiling.js +0 -14
  60. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.react-server.development.js +0 -385
  61. package/static/canary-full/node_modules/react/cjs/react-jsx-dev-runtime.react-server.production.js +0 -40
  62. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.development.js +0 -358
  63. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.production.js +0 -34
  64. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.profiling.js +0 -34
  65. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.react-server.development.js +0 -385
  66. package/static/canary-full/node_modules/react/cjs/react-jsx-runtime.react-server.production.js +0 -40
  67. package/static/canary-full/node_modules/react/cjs/react.development.js +0 -1250
  68. package/static/canary-full/node_modules/react/cjs/react.production.js +0 -544
  69. package/static/canary-full/node_modules/react/cjs/react.react-server.development.js +0 -815
  70. package/static/canary-full/node_modules/react/cjs/react.react-server.production.js +0 -429
  71. package/static/canary-full/node_modules/react/compiler-runtime.js +0 -14
  72. package/static/canary-full/node_modules/react/index.js +0 -7
  73. package/static/canary-full/node_modules/react/jsx-dev-runtime.js +0 -7
  74. package/static/canary-full/node_modules/react/jsx-dev-runtime.react-server.js +0 -7
  75. package/static/canary-full/node_modules/react/jsx-runtime.js +0 -7
  76. package/static/canary-full/node_modules/react/jsx-runtime.react-server.js +0 -7
  77. package/static/canary-full/node_modules/react/package.json +0 -51
  78. package/static/canary-full/node_modules/react/react.react-server.js +0 -7
  79. package/static/canary-full/node_modules/react-dom/LICENSE +0 -21
  80. package/static/canary-full/node_modules/react-dom/README.md +0 -60
  81. package/static/canary-full/node_modules/react-dom/cjs/react-dom-client.development.js +0 -25089
  82. package/static/canary-full/node_modules/react-dom/cjs/react-dom-client.production.js +0 -15426
  83. package/static/canary-full/node_modules/react-dom/cjs/react-dom-profiling.development.js +0 -25476
  84. package/static/canary-full/node_modules/react-dom/cjs/react-dom-profiling.profiling.js +0 -16296
  85. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +0 -9035
  86. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +0 -5892
  87. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js +0 -9035
  88. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +0 -5972
  89. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -9424
  90. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.browser.production.js +0 -6384
  91. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.bun.development.js +0 -8739
  92. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.bun.production.js +0 -5967
  93. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.edge.development.js +0 -9443
  94. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.edge.production.js +0 -6477
  95. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.node.development.js +0 -9317
  96. package/static/canary-full/node_modules/react-dom/cjs/react-dom-server.node.production.js +0 -6372
  97. package/static/canary-full/node_modules/react-dom/cjs/react-dom-test-utils.development.js +0 -24
  98. package/static/canary-full/node_modules/react-dom/cjs/react-dom-test-utils.production.js +0 -21
  99. package/static/canary-full/node_modules/react-dom/cjs/react-dom.development.js +0 -424
  100. package/static/canary-full/node_modules/react-dom/cjs/react-dom.production.js +0 -210
  101. package/static/canary-full/node_modules/react-dom/cjs/react-dom.react-server.development.js +0 -340
  102. package/static/canary-full/node_modules/react-dom/cjs/react-dom.react-server.production.js +0 -152
  103. package/static/canary-full/node_modules/react-dom/client.js +0 -38
  104. package/static/canary-full/node_modules/react-dom/client.react-server.js +0 -5
  105. package/static/canary-full/node_modules/react-dom/index.js +0 -38
  106. package/static/canary-full/node_modules/react-dom/package.json +0 -117
  107. package/static/canary-full/node_modules/react-dom/profiling.js +0 -38
  108. package/static/canary-full/node_modules/react-dom/profiling.react-server.js +0 -5
  109. package/static/canary-full/node_modules/react-dom/react-dom.react-server.js +0 -7
  110. package/static/canary-full/node_modules/react-dom/server.browser.js +0 -18
  111. package/static/canary-full/node_modules/react-dom/server.bun.js +0 -19
  112. package/static/canary-full/node_modules/react-dom/server.edge.js +0 -19
  113. package/static/canary-full/node_modules/react-dom/server.js +0 -3
  114. package/static/canary-full/node_modules/react-dom/server.node.js +0 -18
  115. package/static/canary-full/node_modules/react-dom/server.react-server.js +0 -5
  116. package/static/canary-full/node_modules/react-dom/static.browser.js +0 -12
  117. package/static/canary-full/node_modules/react-dom/static.edge.js +0 -12
  118. package/static/canary-full/node_modules/react-dom/static.js +0 -3
  119. package/static/canary-full/node_modules/react-dom/static.node.js +0 -12
  120. package/static/canary-full/node_modules/react-dom/static.react-server.js +0 -5
  121. package/static/canary-full/node_modules/react-dom/test-utils.js +0 -7
@@ -1,330 +0,0 @@
1
- /**
2
- * @license React
3
- * scheduler.native.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
-
11
- "use strict";
12
- function push(heap, node) {
13
- var index = heap.length;
14
- heap.push(node);
15
- a: for (; 0 < index; ) {
16
- var parentIndex = (index - 1) >>> 1,
17
- parent = heap[parentIndex];
18
- if (0 < compare(parent, node))
19
- (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
20
- else break a;
21
- }
22
- }
23
- function peek(heap) {
24
- return 0 === heap.length ? null : heap[0];
25
- }
26
- function pop(heap) {
27
- if (0 === heap.length) return null;
28
- var first = heap[0],
29
- last = heap.pop();
30
- if (last !== first) {
31
- heap[0] = last;
32
- a: for (
33
- var index = 0, length = heap.length, halfLength = length >>> 1;
34
- index < halfLength;
35
-
36
- ) {
37
- var leftIndex = 2 * (index + 1) - 1,
38
- left = heap[leftIndex],
39
- rightIndex = leftIndex + 1,
40
- right = heap[rightIndex];
41
- if (0 > compare(left, last))
42
- rightIndex < length && 0 > compare(right, left)
43
- ? ((heap[index] = right),
44
- (heap[rightIndex] = last),
45
- (index = rightIndex))
46
- : ((heap[index] = left),
47
- (heap[leftIndex] = last),
48
- (index = leftIndex));
49
- else if (rightIndex < length && 0 > compare(right, last))
50
- (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
51
- else break a;
52
- }
53
- }
54
- return first;
55
- }
56
- function compare(a, b) {
57
- var diff = a.sortIndex - b.sortIndex;
58
- return 0 !== diff ? diff : a.id - b.id;
59
- }
60
- var getCurrentTime;
61
- if ("object" === typeof performance && "function" === typeof performance.now) {
62
- var localPerformance = performance;
63
- getCurrentTime = function () {
64
- return localPerformance.now();
65
- };
66
- } else {
67
- var localDate = Date,
68
- initialTime = localDate.now();
69
- getCurrentTime = function () {
70
- return localDate.now() - initialTime;
71
- };
72
- }
73
- var taskQueue = [],
74
- timerQueue = [],
75
- taskIdCounter = 1,
76
- currentTask = null,
77
- currentPriorityLevel = 3,
78
- isPerformingWork = !1,
79
- isHostCallbackScheduled = !1,
80
- isHostTimeoutScheduled = !1,
81
- needsPaint = !1,
82
- localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
83
- localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
84
- localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
85
- function advanceTimers(currentTime) {
86
- for (var timer = peek(timerQueue); null !== timer; ) {
87
- if (null === timer.callback) pop(timerQueue);
88
- else if (timer.startTime <= currentTime)
89
- pop(timerQueue),
90
- (timer.sortIndex = timer.expirationTime),
91
- push(taskQueue, timer);
92
- else break;
93
- timer = peek(timerQueue);
94
- }
95
- }
96
- function handleTimeout(currentTime) {
97
- isHostTimeoutScheduled = !1;
98
- advanceTimers(currentTime);
99
- if (!isHostCallbackScheduled)
100
- if (null !== peek(taskQueue))
101
- (isHostCallbackScheduled = !0),
102
- isMessageLoopRunning ||
103
- ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
104
- else {
105
- var firstTimer = peek(timerQueue);
106
- null !== firstTimer &&
107
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
108
- }
109
- }
110
- function unstable_scheduleCallback$1(priorityLevel, callback, options) {
111
- var currentTime = getCurrentTime();
112
- "object" === typeof options && null !== options
113
- ? ((options = options.delay),
114
- (options =
115
- "number" === typeof options && 0 < options
116
- ? currentTime + options
117
- : currentTime))
118
- : (options = currentTime);
119
- switch (priorityLevel) {
120
- case 1:
121
- var timeout = -1;
122
- break;
123
- case 2:
124
- timeout = 250;
125
- break;
126
- case 5:
127
- timeout = 1073741823;
128
- break;
129
- case 4:
130
- timeout = 1e4;
131
- break;
132
- default:
133
- timeout = 5e3;
134
- }
135
- timeout = options + timeout;
136
- priorityLevel = {
137
- id: taskIdCounter++,
138
- callback: callback,
139
- priorityLevel: priorityLevel,
140
- startTime: options,
141
- expirationTime: timeout,
142
- sortIndex: -1
143
- };
144
- options > currentTime
145
- ? ((priorityLevel.sortIndex = options),
146
- push(timerQueue, priorityLevel),
147
- null === peek(taskQueue) &&
148
- priorityLevel === peek(timerQueue) &&
149
- (isHostTimeoutScheduled
150
- ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
151
- : (isHostTimeoutScheduled = !0),
152
- requestHostTimeout(handleTimeout, options - currentTime)))
153
- : ((priorityLevel.sortIndex = timeout),
154
- push(taskQueue, priorityLevel),
155
- isHostCallbackScheduled ||
156
- isPerformingWork ||
157
- ((isHostCallbackScheduled = !0),
158
- isMessageLoopRunning ||
159
- ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));
160
- return priorityLevel;
161
- }
162
- function unstable_cancelCallback$1(task) {
163
- task.callback = null;
164
- }
165
- function unstable_getCurrentPriorityLevel$1() {
166
- return currentPriorityLevel;
167
- }
168
- var isMessageLoopRunning = !1,
169
- taskTimeoutID = -1,
170
- startTime = -1;
171
- function shouldYieldToHost() {
172
- return needsPaint ? !0 : 5 > getCurrentTime() - startTime ? !1 : !0;
173
- }
174
- function requestPaint() {
175
- needsPaint = !0;
176
- }
177
- function performWorkUntilDeadline() {
178
- needsPaint = !1;
179
- if (isMessageLoopRunning) {
180
- var currentTime = getCurrentTime();
181
- startTime = currentTime;
182
- var hasMoreWork = !0;
183
- try {
184
- a: {
185
- isHostCallbackScheduled = !1;
186
- isHostTimeoutScheduled &&
187
- ((isHostTimeoutScheduled = !1),
188
- localClearTimeout(taskTimeoutID),
189
- (taskTimeoutID = -1));
190
- isPerformingWork = !0;
191
- var previousPriorityLevel = currentPriorityLevel;
192
- try {
193
- b: {
194
- advanceTimers(currentTime);
195
- for (
196
- currentTask = peek(taskQueue);
197
- null !== currentTask &&
198
- !(
199
- currentTask.expirationTime > currentTime && shouldYieldToHost()
200
- );
201
-
202
- ) {
203
- var callback = currentTask.callback;
204
- if ("function" === typeof callback) {
205
- currentTask.callback = null;
206
- currentPriorityLevel = currentTask.priorityLevel;
207
- var continuationCallback = callback(
208
- currentTask.expirationTime <= currentTime
209
- );
210
- currentTime = getCurrentTime();
211
- if ("function" === typeof continuationCallback) {
212
- currentTask.callback = continuationCallback;
213
- advanceTimers(currentTime);
214
- hasMoreWork = !0;
215
- break b;
216
- }
217
- currentTask === peek(taskQueue) && pop(taskQueue);
218
- advanceTimers(currentTime);
219
- } else pop(taskQueue);
220
- currentTask = peek(taskQueue);
221
- }
222
- if (null !== currentTask) hasMoreWork = !0;
223
- else {
224
- var firstTimer = peek(timerQueue);
225
- null !== firstTimer &&
226
- requestHostTimeout(
227
- handleTimeout,
228
- firstTimer.startTime - currentTime
229
- );
230
- hasMoreWork = !1;
231
- }
232
- }
233
- break a;
234
- } finally {
235
- (currentTask = null),
236
- (currentPriorityLevel = previousPriorityLevel),
237
- (isPerformingWork = !1);
238
- }
239
- hasMoreWork = void 0;
240
- }
241
- } finally {
242
- hasMoreWork
243
- ? schedulePerformWorkUntilDeadline()
244
- : (isMessageLoopRunning = !1);
245
- }
246
- }
247
- }
248
- var schedulePerformWorkUntilDeadline;
249
- if ("function" === typeof localSetImmediate)
250
- schedulePerformWorkUntilDeadline = function () {
251
- localSetImmediate(performWorkUntilDeadline);
252
- };
253
- else if ("undefined" !== typeof MessageChannel) {
254
- var channel = new MessageChannel(),
255
- port = channel.port2;
256
- channel.port1.onmessage = performWorkUntilDeadline;
257
- schedulePerformWorkUntilDeadline = function () {
258
- port.postMessage(null);
259
- };
260
- } else
261
- schedulePerformWorkUntilDeadline = function () {
262
- localSetTimeout(performWorkUntilDeadline, 0);
263
- };
264
- function requestHostTimeout(callback, ms) {
265
- taskTimeoutID = localSetTimeout(function () {
266
- callback(getCurrentTime());
267
- }, ms);
268
- }
269
- var unstable_UserBlockingPriority =
270
- "undefined" !== typeof nativeRuntimeScheduler
271
- ? nativeRuntimeScheduler.unstable_UserBlockingPriority
272
- : 2,
273
- unstable_NormalPriority =
274
- "undefined" !== typeof nativeRuntimeScheduler
275
- ? nativeRuntimeScheduler.unstable_NormalPriority
276
- : 3,
277
- unstable_LowPriority =
278
- "undefined" !== typeof nativeRuntimeScheduler
279
- ? nativeRuntimeScheduler.unstable_LowPriority
280
- : 4,
281
- unstable_ImmediatePriority =
282
- "undefined" !== typeof nativeRuntimeScheduler
283
- ? nativeRuntimeScheduler.unstable_ImmediatePriority
284
- : 1,
285
- unstable_scheduleCallback =
286
- "undefined" !== typeof nativeRuntimeScheduler
287
- ? nativeRuntimeScheduler.unstable_scheduleCallback
288
- : unstable_scheduleCallback$1,
289
- unstable_cancelCallback =
290
- "undefined" !== typeof nativeRuntimeScheduler
291
- ? nativeRuntimeScheduler.unstable_cancelCallback
292
- : unstable_cancelCallback$1,
293
- unstable_getCurrentPriorityLevel =
294
- "undefined" !== typeof nativeRuntimeScheduler
295
- ? nativeRuntimeScheduler.unstable_getCurrentPriorityLevel
296
- : unstable_getCurrentPriorityLevel$1,
297
- unstable_shouldYield =
298
- "undefined" !== typeof nativeRuntimeScheduler
299
- ? nativeRuntimeScheduler.unstable_shouldYield
300
- : shouldYieldToHost,
301
- unstable_requestPaint =
302
- "undefined" !== typeof nativeRuntimeScheduler
303
- ? nativeRuntimeScheduler.unstable_requestPaint
304
- : requestPaint,
305
- unstable_now =
306
- "undefined" !== typeof nativeRuntimeScheduler
307
- ? nativeRuntimeScheduler.unstable_now
308
- : getCurrentTime;
309
- function throwNotImplemented() {
310
- throw Error("Not implemented.");
311
- }
312
- exports.unstable_IdlePriority =
313
- "undefined" !== typeof nativeRuntimeScheduler
314
- ? nativeRuntimeScheduler.unstable_IdlePriority
315
- : 5;
316
- exports.unstable_ImmediatePriority = unstable_ImmediatePriority;
317
- exports.unstable_LowPriority = unstable_LowPriority;
318
- exports.unstable_NormalPriority = unstable_NormalPriority;
319
- exports.unstable_Profiling = null;
320
- exports.unstable_UserBlockingPriority = unstable_UserBlockingPriority;
321
- exports.unstable_cancelCallback = unstable_cancelCallback;
322
- exports.unstable_forceFrameRate = throwNotImplemented;
323
- exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
324
- exports.unstable_next = throwNotImplemented;
325
- exports.unstable_now = unstable_now;
326
- exports.unstable_requestPaint = unstable_requestPaint;
327
- exports.unstable_runWithPriority = throwNotImplemented;
328
- exports.unstable_scheduleCallback = unstable_scheduleCallback;
329
- exports.unstable_shouldYield = unstable_shouldYield;
330
- exports.unstable_wrapCallback = throwNotImplemented;
@@ -1,340 +0,0 @@
1
- /**
2
- * @license React
3
- * scheduler.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
-
11
- "use strict";
12
- function push(heap, node) {
13
- var index = heap.length;
14
- heap.push(node);
15
- a: for (; 0 < index; ) {
16
- var parentIndex = (index - 1) >>> 1,
17
- parent = heap[parentIndex];
18
- if (0 < compare(parent, node))
19
- (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
20
- else break a;
21
- }
22
- }
23
- function peek(heap) {
24
- return 0 === heap.length ? null : heap[0];
25
- }
26
- function pop(heap) {
27
- if (0 === heap.length) return null;
28
- var first = heap[0],
29
- last = heap.pop();
30
- if (last !== first) {
31
- heap[0] = last;
32
- a: for (
33
- var index = 0, length = heap.length, halfLength = length >>> 1;
34
- index < halfLength;
35
-
36
- ) {
37
- var leftIndex = 2 * (index + 1) - 1,
38
- left = heap[leftIndex],
39
- rightIndex = leftIndex + 1,
40
- right = heap[rightIndex];
41
- if (0 > compare(left, last))
42
- rightIndex < length && 0 > compare(right, left)
43
- ? ((heap[index] = right),
44
- (heap[rightIndex] = last),
45
- (index = rightIndex))
46
- : ((heap[index] = left),
47
- (heap[leftIndex] = last),
48
- (index = leftIndex));
49
- else if (rightIndex < length && 0 > compare(right, last))
50
- (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
51
- else break a;
52
- }
53
- }
54
- return first;
55
- }
56
- function compare(a, b) {
57
- var diff = a.sortIndex - b.sortIndex;
58
- return 0 !== diff ? diff : a.id - b.id;
59
- }
60
- exports.unstable_now = void 0;
61
- if ("object" === typeof performance && "function" === typeof performance.now) {
62
- var localPerformance = performance;
63
- exports.unstable_now = function () {
64
- return localPerformance.now();
65
- };
66
- } else {
67
- var localDate = Date,
68
- initialTime = localDate.now();
69
- exports.unstable_now = function () {
70
- return localDate.now() - initialTime;
71
- };
72
- }
73
- var taskQueue = [],
74
- timerQueue = [],
75
- taskIdCounter = 1,
76
- currentTask = null,
77
- currentPriorityLevel = 3,
78
- isPerformingWork = !1,
79
- isHostCallbackScheduled = !1,
80
- isHostTimeoutScheduled = !1,
81
- needsPaint = !1,
82
- localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
83
- localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
84
- localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
85
- function advanceTimers(currentTime) {
86
- for (var timer = peek(timerQueue); null !== timer; ) {
87
- if (null === timer.callback) pop(timerQueue);
88
- else if (timer.startTime <= currentTime)
89
- pop(timerQueue),
90
- (timer.sortIndex = timer.expirationTime),
91
- push(taskQueue, timer);
92
- else break;
93
- timer = peek(timerQueue);
94
- }
95
- }
96
- function handleTimeout(currentTime) {
97
- isHostTimeoutScheduled = !1;
98
- advanceTimers(currentTime);
99
- if (!isHostCallbackScheduled)
100
- if (null !== peek(taskQueue))
101
- (isHostCallbackScheduled = !0),
102
- isMessageLoopRunning ||
103
- ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
104
- else {
105
- var firstTimer = peek(timerQueue);
106
- null !== firstTimer &&
107
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
108
- }
109
- }
110
- var isMessageLoopRunning = !1,
111
- taskTimeoutID = -1,
112
- frameInterval = 5,
113
- startTime = -1;
114
- function shouldYieldToHost() {
115
- return needsPaint
116
- ? !0
117
- : exports.unstable_now() - startTime < frameInterval
118
- ? !1
119
- : !0;
120
- }
121
- function performWorkUntilDeadline() {
122
- needsPaint = !1;
123
- if (isMessageLoopRunning) {
124
- var currentTime = exports.unstable_now();
125
- startTime = currentTime;
126
- var hasMoreWork = !0;
127
- try {
128
- a: {
129
- isHostCallbackScheduled = !1;
130
- isHostTimeoutScheduled &&
131
- ((isHostTimeoutScheduled = !1),
132
- localClearTimeout(taskTimeoutID),
133
- (taskTimeoutID = -1));
134
- isPerformingWork = !0;
135
- var previousPriorityLevel = currentPriorityLevel;
136
- try {
137
- b: {
138
- advanceTimers(currentTime);
139
- for (
140
- currentTask = peek(taskQueue);
141
- null !== currentTask &&
142
- !(
143
- currentTask.expirationTime > currentTime && shouldYieldToHost()
144
- );
145
-
146
- ) {
147
- var callback = currentTask.callback;
148
- if ("function" === typeof callback) {
149
- currentTask.callback = null;
150
- currentPriorityLevel = currentTask.priorityLevel;
151
- var continuationCallback = callback(
152
- currentTask.expirationTime <= currentTime
153
- );
154
- currentTime = exports.unstable_now();
155
- if ("function" === typeof continuationCallback) {
156
- currentTask.callback = continuationCallback;
157
- advanceTimers(currentTime);
158
- hasMoreWork = !0;
159
- break b;
160
- }
161
- currentTask === peek(taskQueue) && pop(taskQueue);
162
- advanceTimers(currentTime);
163
- } else pop(taskQueue);
164
- currentTask = peek(taskQueue);
165
- }
166
- if (null !== currentTask) hasMoreWork = !0;
167
- else {
168
- var firstTimer = peek(timerQueue);
169
- null !== firstTimer &&
170
- requestHostTimeout(
171
- handleTimeout,
172
- firstTimer.startTime - currentTime
173
- );
174
- hasMoreWork = !1;
175
- }
176
- }
177
- break a;
178
- } finally {
179
- (currentTask = null),
180
- (currentPriorityLevel = previousPriorityLevel),
181
- (isPerformingWork = !1);
182
- }
183
- hasMoreWork = void 0;
184
- }
185
- } finally {
186
- hasMoreWork
187
- ? schedulePerformWorkUntilDeadline()
188
- : (isMessageLoopRunning = !1);
189
- }
190
- }
191
- }
192
- var schedulePerformWorkUntilDeadline;
193
- if ("function" === typeof localSetImmediate)
194
- schedulePerformWorkUntilDeadline = function () {
195
- localSetImmediate(performWorkUntilDeadline);
196
- };
197
- else if ("undefined" !== typeof MessageChannel) {
198
- var channel = new MessageChannel(),
199
- port = channel.port2;
200
- channel.port1.onmessage = performWorkUntilDeadline;
201
- schedulePerformWorkUntilDeadline = function () {
202
- port.postMessage(null);
203
- };
204
- } else
205
- schedulePerformWorkUntilDeadline = function () {
206
- localSetTimeout(performWorkUntilDeadline, 0);
207
- };
208
- function requestHostTimeout(callback, ms) {
209
- taskTimeoutID = localSetTimeout(function () {
210
- callback(exports.unstable_now());
211
- }, ms);
212
- }
213
- exports.unstable_IdlePriority = 5;
214
- exports.unstable_ImmediatePriority = 1;
215
- exports.unstable_LowPriority = 4;
216
- exports.unstable_NormalPriority = 3;
217
- exports.unstable_Profiling = null;
218
- exports.unstable_UserBlockingPriority = 2;
219
- exports.unstable_cancelCallback = function (task) {
220
- task.callback = null;
221
- };
222
- exports.unstable_forceFrameRate = function (fps) {
223
- 0 > fps || 125 < fps
224
- ? console.error(
225
- "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
226
- )
227
- : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);
228
- };
229
- exports.unstable_getCurrentPriorityLevel = function () {
230
- return currentPriorityLevel;
231
- };
232
- exports.unstable_next = function (eventHandler) {
233
- switch (currentPriorityLevel) {
234
- case 1:
235
- case 2:
236
- case 3:
237
- var priorityLevel = 3;
238
- break;
239
- default:
240
- priorityLevel = currentPriorityLevel;
241
- }
242
- var previousPriorityLevel = currentPriorityLevel;
243
- currentPriorityLevel = priorityLevel;
244
- try {
245
- return eventHandler();
246
- } finally {
247
- currentPriorityLevel = previousPriorityLevel;
248
- }
249
- };
250
- exports.unstable_requestPaint = function () {
251
- needsPaint = !0;
252
- };
253
- exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
254
- switch (priorityLevel) {
255
- case 1:
256
- case 2:
257
- case 3:
258
- case 4:
259
- case 5:
260
- break;
261
- default:
262
- priorityLevel = 3;
263
- }
264
- var previousPriorityLevel = currentPriorityLevel;
265
- currentPriorityLevel = priorityLevel;
266
- try {
267
- return eventHandler();
268
- } finally {
269
- currentPriorityLevel = previousPriorityLevel;
270
- }
271
- };
272
- exports.unstable_scheduleCallback = function (
273
- priorityLevel,
274
- callback,
275
- options
276
- ) {
277
- var currentTime = exports.unstable_now();
278
- "object" === typeof options && null !== options
279
- ? ((options = options.delay),
280
- (options =
281
- "number" === typeof options && 0 < options
282
- ? currentTime + options
283
- : currentTime))
284
- : (options = currentTime);
285
- switch (priorityLevel) {
286
- case 1:
287
- var timeout = -1;
288
- break;
289
- case 2:
290
- timeout = 250;
291
- break;
292
- case 5:
293
- timeout = 1073741823;
294
- break;
295
- case 4:
296
- timeout = 1e4;
297
- break;
298
- default:
299
- timeout = 5e3;
300
- }
301
- timeout = options + timeout;
302
- priorityLevel = {
303
- id: taskIdCounter++,
304
- callback: callback,
305
- priorityLevel: priorityLevel,
306
- startTime: options,
307
- expirationTime: timeout,
308
- sortIndex: -1
309
- };
310
- options > currentTime
311
- ? ((priorityLevel.sortIndex = options),
312
- push(timerQueue, priorityLevel),
313
- null === peek(taskQueue) &&
314
- priorityLevel === peek(timerQueue) &&
315
- (isHostTimeoutScheduled
316
- ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
317
- : (isHostTimeoutScheduled = !0),
318
- requestHostTimeout(handleTimeout, options - currentTime)))
319
- : ((priorityLevel.sortIndex = timeout),
320
- push(taskQueue, priorityLevel),
321
- isHostCallbackScheduled ||
322
- isPerformingWork ||
323
- ((isHostCallbackScheduled = !0),
324
- isMessageLoopRunning ||
325
- ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));
326
- return priorityLevel;
327
- };
328
- exports.unstable_shouldYield = shouldYieldToHost;
329
- exports.unstable_wrapCallback = function (callback) {
330
- var parentPriorityLevel = currentPriorityLevel;
331
- return function () {
332
- var previousPriorityLevel = currentPriorityLevel;
333
- currentPriorityLevel = parentPriorityLevel;
334
- try {
335
- return callback.apply(this, arguments);
336
- } finally {
337
- currentPriorityLevel = previousPriorityLevel;
338
- }
339
- };
340
- };
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Meta Platforms, Inc. and affiliates.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.