1
0
Fork 0

worked on GarageApp stuff

This commit is contained in:
Techognito 2025-08-25 17:46:11 +02:00
parent 60aaf17af3
commit eb606572b0
51919 changed files with 2168177 additions and 18 deletions

View file

@ -0,0 +1,414 @@
/**
* @license React
* scheduler-unstable_mock.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node),
(heap[index] = parent),
(index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), (scheduledCallback = flushWork);
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
((currentTime = firstTimer.startTime - currentTime),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + currentTime));
}
}
function flushWork(hasTimeRemaining, initialTime) {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
(scheduledTimeout = null),
(timeoutTime = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
a: {
advanceTimers(initialTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
(!(currentTask.expirationTime > initialTime) ||
(hasTimeRemaining && !shouldYieldToHost()));
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= initialTime
);
initialTime = currentMockTime;
if ("function" === typeof continuationCallback) {
if (
((currentTask.callback = continuationCallback),
advanceTimers(initialTime),
shouldYieldForPaint)
) {
var JSCompiler_inline_result = (needsPaint = !0);
break a;
}
} else
currentTask === peek(taskQueue) && pop(taskQueue),
advanceTimers(initialTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) JSCompiler_inline_result = !0;
else {
var firstTimer = peek(timerQueue);
if (null !== firstTimer) {
var ms = firstTimer.startTime - initialTime;
scheduledTimeout = handleTimeout;
timeoutTime = currentMockTime + ms;
}
JSCompiler_inline_result = !1;
}
}
return JSCompiler_inline_result;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
}
function shouldYieldToHost() {
return (0 === expectedNumberOfYields && null === yieldedValues) ||
(-1 !== expectedNumberOfYields &&
null !== yieldedValues &&
yieldedValues.length >= expectedNumberOfYields) ||
(shouldYieldForPaint && needsPaint)
? (didStop = !0)
: !1;
}
function unstable_flushAllWithoutAsserting() {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork);
hasMoreWork || (scheduledCallback = null);
return !0;
} finally {
isFlushing = !1;
}
} else return !1;
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
currentMockTime = 0,
scheduledCallback = null,
scheduledTimeout = null,
timeoutTime = -1,
yieldedValues = null,
expectedNumberOfYields = -1,
didStop = !1,
isFlushing = !1,
needsPaint = !1,
shouldYieldForPaint = !1,
disableYieldValue = !1;
exports.log = function (value) {
"disabledLog" === console.log.name ||
disableYieldValue ||
(null === yieldedValues
? (yieldedValues = [value])
: yieldedValues.push(value));
};
exports.reset = function () {
if (isFlushing) throw Error("Cannot reset while already flushing work.");
currentMockTime = 0;
scheduledTimeout = scheduledCallback = null;
timeoutTime = -1;
yieldedValues = null;
expectedNumberOfYields = -1;
needsPaint = isFlushing = didStop = !1;
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_advanceTime = function (ms) {
"disabledLog" === console.log.name ||
disableYieldValue ||
((currentMockTime += ms),
null !== scheduledTimeout &&
timeoutTime <= currentMockTime &&
(scheduledTimeout(currentMockTime),
(timeoutTime = -1),
(scheduledTimeout = null)));
};
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_clearLog = function () {
if (null === yieldedValues) return [];
var values = yieldedValues;
yieldedValues = null;
return values;
};
exports.unstable_flushAll = function () {
if (null !== yieldedValues)
throw Error(
"Log is not empty. Assert on the log of yielded values before flushing additional work."
);
unstable_flushAllWithoutAsserting();
if (null !== yieldedValues)
throw Error(
"While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])"
);
};
exports.unstable_flushAllWithoutAsserting =
unstable_flushAllWithoutAsserting;
exports.unstable_flushExpired = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
isFlushing = !0;
try {
scheduledCallback(!1, currentMockTime) || (scheduledCallback = null);
} finally {
isFlushing = !1;
}
}
};
exports.unstable_flushNumberOfYields = function (count) {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
expectedNumberOfYields = count;
isFlushing = !0;
try {
count = !0;
do count = cb(!0, currentMockTime);
while (count && !didStop);
count || (scheduledCallback = null);
} finally {
(expectedNumberOfYields = -1), (isFlushing = didStop = !1);
}
}
};
exports.unstable_flushUntilNextPaint = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
shouldYieldForPaint = !0;
needsPaint = !1;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork && !didStop);
hasMoreWork || (scheduledCallback = null);
} finally {
isFlushing = didStop = shouldYieldForPaint = !1;
}
}
return !1;
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_hasPendingWork = function () {
return null !== scheduledCallback;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_now = function () {
return currentMockTime;
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = currentMockTime;
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? ((scheduledTimeout = null), (timeoutTime = -1))
: (isHostTimeoutScheduled = !0),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + (options - currentTime))))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)));
return priorityLevel;
};
exports.unstable_setDisableYieldValue = function (newValue) {
disableYieldValue = newValue;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
})();

View file

@ -0,0 +1,406 @@
/**
* @license React
* scheduler-unstable_mock.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
currentMockTime = 0,
scheduledCallback = null,
scheduledTimeout = null,
timeoutTime = -1,
yieldedValues = null,
expectedNumberOfYields = -1,
didStop = !1,
isFlushing = !1,
needsPaint = !1,
shouldYieldForPaint = !1,
disableYieldValue = !1;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), (scheduledCallback = flushWork);
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
((currentTime = firstTimer.startTime - currentTime),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + currentTime));
}
}
function flushWork(hasTimeRemaining, initialTime) {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
(scheduledTimeout = null),
(timeoutTime = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
a: {
advanceTimers(initialTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
(!(currentTask.expirationTime > initialTime) ||
(hasTimeRemaining && !shouldYieldToHost()));
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= initialTime
);
initialTime = currentMockTime;
if ("function" === typeof continuationCallback) {
if (
((currentTask.callback = continuationCallback),
advanceTimers(initialTime),
shouldYieldForPaint)
) {
var JSCompiler_inline_result = (needsPaint = !0);
break a;
}
} else
currentTask === peek(taskQueue) && pop(taskQueue),
advanceTimers(initialTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) JSCompiler_inline_result = !0;
else {
var firstTimer = peek(timerQueue);
if (null !== firstTimer) {
var ms = firstTimer.startTime - initialTime;
scheduledTimeout = handleTimeout;
timeoutTime = currentMockTime + ms;
}
JSCompiler_inline_result = !1;
}
}
return JSCompiler_inline_result;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
}
function shouldYieldToHost() {
return (0 === expectedNumberOfYields && null === yieldedValues) ||
(-1 !== expectedNumberOfYields &&
null !== yieldedValues &&
yieldedValues.length >= expectedNumberOfYields) ||
(shouldYieldForPaint && needsPaint)
? (didStop = !0)
: !1;
}
function unstable_flushAllWithoutAsserting() {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork);
hasMoreWork || (scheduledCallback = null);
return !0;
} finally {
isFlushing = !1;
}
} else return !1;
}
exports.log = function (value) {
"disabledLog" === console.log.name ||
disableYieldValue ||
(null === yieldedValues
? (yieldedValues = [value])
: yieldedValues.push(value));
};
exports.reset = function () {
if (isFlushing) throw Error("Cannot reset while already flushing work.");
currentMockTime = 0;
scheduledTimeout = scheduledCallback = null;
timeoutTime = -1;
yieldedValues = null;
expectedNumberOfYields = -1;
needsPaint = isFlushing = didStop = !1;
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_advanceTime = function (ms) {
"disabledLog" === console.log.name ||
disableYieldValue ||
((currentMockTime += ms),
null !== scheduledTimeout &&
timeoutTime <= currentMockTime &&
(scheduledTimeout(currentMockTime),
(timeoutTime = -1),
(scheduledTimeout = null)));
};
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_clearLog = function () {
if (null === yieldedValues) return [];
var values = yieldedValues;
yieldedValues = null;
return values;
};
exports.unstable_flushAll = function () {
if (null !== yieldedValues)
throw Error(
"Log is not empty. Assert on the log of yielded values before flushing additional work."
);
unstable_flushAllWithoutAsserting();
if (null !== yieldedValues)
throw Error(
"While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])"
);
};
exports.unstable_flushAllWithoutAsserting = unstable_flushAllWithoutAsserting;
exports.unstable_flushExpired = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
isFlushing = !0;
try {
scheduledCallback(!1, currentMockTime) || (scheduledCallback = null);
} finally {
isFlushing = !1;
}
}
};
exports.unstable_flushNumberOfYields = function (count) {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
expectedNumberOfYields = count;
isFlushing = !0;
try {
count = !0;
do count = cb(!0, currentMockTime);
while (count && !didStop);
count || (scheduledCallback = null);
} finally {
(expectedNumberOfYields = -1), (isFlushing = didStop = !1);
}
}
};
exports.unstable_flushUntilNextPaint = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
shouldYieldForPaint = !0;
needsPaint = !1;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork && !didStop);
hasMoreWork || (scheduledCallback = null);
} finally {
isFlushing = didStop = shouldYieldForPaint = !1;
}
}
return !1;
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_hasPendingWork = function () {
return null !== scheduledCallback;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_now = function () {
return currentMockTime;
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = currentMockTime;
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? ((scheduledTimeout = null), (timeoutTime = -1))
: (isHostTimeoutScheduled = !0),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + (options - currentTime))))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)));
return priorityLevel;
};
exports.unstable_setDisableYieldValue = function (newValue) {
disableYieldValue = newValue;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};

View file

@ -0,0 +1,150 @@
/**
* @license React
* scheduler-unstable_post_task.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function runTask(priorityLevel, postTaskPriority, node, callback) {
deadline = getCurrentTime() + 5;
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var result = callback(!1);
if ("function" === typeof result) {
var continuationOptions = { signal: node._controller.signal },
nextTask = runTask.bind(
null,
priorityLevel,
postTaskPriority,
node,
result
);
void 0 !== scheduler.yield
? scheduler
.yield(continuationOptions)
.then(nextTask)
.catch(handleAbortError)
: scheduler
.postTask(nextTask, continuationOptions)
.catch(handleAbortError);
}
} catch (error) {
setTimeout(function () {
throw error;
});
} finally {
currentPriorityLevel_DEPRECATED = 3;
}
}
function handleAbortError() {}
var perf = window.performance,
setTimeout = window.setTimeout,
scheduler = global.scheduler,
getCurrentTime = perf.now.bind(perf),
deadline = 0,
currentPriorityLevel_DEPRECATED = 3;
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (node) {
node._controller.abort();
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel_DEPRECATED;
};
exports.unstable_next = function (callback) {
switch (currentPriorityLevel_DEPRECATED) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel_DEPRECATED;
}
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_now = getCurrentTime;
exports.unstable_requestPaint = function () {};
exports.unstable_runWithPriority = function (priorityLevel, callback) {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
switch (priorityLevel) {
case 1:
case 2:
var postTaskPriority = "user-blocking";
break;
case 4:
case 3:
postTaskPriority = "user-visible";
break;
case 5:
postTaskPriority = "background";
break;
default:
postTaskPriority = "user-visible";
}
var controller = new TaskController({ priority: postTaskPriority });
options = {
delay:
"object" === typeof options && null !== options ? options.delay : 0,
signal: controller.signal
};
controller = { _controller: controller };
scheduler
.postTask(
runTask.bind(
null,
priorityLevel,
postTaskPriority,
controller,
callback
),
options
)
.catch(handleAbortError);
return controller;
};
exports.unstable_shouldYield = function () {
return getCurrentTime() >= deadline;
};
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
return function () {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = parentPriorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
};
})();

View file

@ -0,0 +1,140 @@
/**
* @license React
* scheduler-unstable_post_task.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var perf = window.performance,
setTimeout = window.setTimeout,
scheduler = global.scheduler,
getCurrentTime = perf.now.bind(perf),
deadline = 0,
currentPriorityLevel_DEPRECATED = 3;
function runTask(priorityLevel, postTaskPriority, node, callback) {
deadline = getCurrentTime() + 5;
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var result = callback(!1);
if ("function" === typeof result) {
var continuationOptions = { signal: node._controller.signal },
nextTask = runTask.bind(
null,
priorityLevel,
postTaskPriority,
node,
result
);
void 0 !== scheduler.yield
? scheduler
.yield(continuationOptions)
.then(nextTask)
.catch(handleAbortError)
: scheduler
.postTask(nextTask, continuationOptions)
.catch(handleAbortError);
}
} catch (error) {
setTimeout(function () {
throw error;
});
} finally {
currentPriorityLevel_DEPRECATED = 3;
}
}
function handleAbortError() {}
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (node) {
node._controller.abort();
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel_DEPRECATED;
};
exports.unstable_next = function (callback) {
switch (currentPriorityLevel_DEPRECATED) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel_DEPRECATED;
}
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_now = getCurrentTime;
exports.unstable_requestPaint = function () {};
exports.unstable_runWithPriority = function (priorityLevel, callback) {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
switch (priorityLevel) {
case 1:
case 2:
var postTaskPriority = "user-blocking";
break;
case 4:
case 3:
postTaskPriority = "user-visible";
break;
case 5:
postTaskPriority = "background";
break;
default:
postTaskPriority = "user-visible";
}
var controller = new TaskController({ priority: postTaskPriority });
options = {
delay: "object" === typeof options && null !== options ? options.delay : 0,
signal: controller.signal
};
controller = { _controller: controller };
scheduler
.postTask(
runTask.bind(null, priorityLevel, postTaskPriority, controller, callback),
options
)
.catch(handleAbortError);
return controller;
};
exports.unstable_shouldYield = function () {
return getCurrentTime() >= deadline;
};
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
return function () {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = parentPriorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
};

364
node_modules/scheduler/cjs/scheduler.development.js generated vendored Normal file
View file

@ -0,0 +1,364 @@
/**
* @license React
* scheduler.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
!(
currentTask.expirationTime > currentTime &&
shouldYieldToHost()
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = exports.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = !1;
}
}
break a;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: (isMessageLoopRunning = !1);
}
}
}
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node),
(heap[index] = parent),
(index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
}
}
function shouldYieldToHost() {
return needsPaint
? !0
: exports.unstable_now() - startTime < frameInterval
? !1
: !0;
}
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(exports.unstable_now());
}, ms);
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
exports.unstable_now = void 0;
if (
"object" === typeof performance &&
"function" === typeof performance.now
) {
var localPerformance = performance;
exports.unstable_now = function () {
return localPerformance.now();
};
} else {
var localDate = Date,
initialTime = localDate.now();
exports.unstable_now = function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout =
"function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate =
"undefined" !== typeof setImmediate ? setImmediate : null,
isMessageLoopRunning = !1,
taskTimeoutID = -1,
frameInterval = 5,
startTime = -1;
if ("function" === typeof localSetImmediate)
var schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_forceFrameRate = function (fps) {
0 > fps || 125 < fps
? console.error(
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
)
: (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);
};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = exports.unstable_now();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0),
schedulePerformWorkUntilDeadline())));
return priorityLevel;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();

View file

@ -0,0 +1,350 @@
/**
* @license React
* scheduler.native.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = getCurrentTime();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
!(
currentTask.expirationTime > currentTime &&
shouldYieldToHost()
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = getCurrentTime();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = !1;
}
}
break a;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: (isMessageLoopRunning = !1);
}
}
}
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node),
(heap[index] = parent),
(index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
}
}
function unstable_scheduleCallback$1(priorityLevel, callback, options) {
var currentTime = getCurrentTime();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0),
schedulePerformWorkUntilDeadline())));
return priorityLevel;
}
function unstable_cancelCallback$1(task) {
task.callback = null;
}
function unstable_getCurrentPriorityLevel$1() {
return currentPriorityLevel;
}
function shouldYieldToHost() {
return needsPaint
? !0
: getCurrentTime() - startTime < frameInterval
? !1
: !0;
}
function requestPaint() {
needsPaint = !0;
}
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(getCurrentTime());
}, ms);
}
function throwNotImplemented() {
throw Error("Not implemented.");
}
if (
"object" === typeof performance &&
"function" === typeof performance.now
) {
var localPerformance = performance;
var getCurrentTime = function () {
return localPerformance.now();
};
} else {
var localDate = Date,
initialTime = localDate.now();
getCurrentTime = function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout =
"function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate =
"undefined" !== typeof setImmediate ? setImmediate : null,
isMessageLoopRunning = !1,
taskTimeoutID = -1,
frameInterval = 5,
startTime = -1;
if ("function" === typeof localSetImmediate)
var schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
channel =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_UserBlockingPriority
: 2;
var unstable_NormalPriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_NormalPriority
: 3,
unstable_LowPriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_LowPriority
: 4,
unstable_ImmediatePriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_ImmediatePriority
: 1,
unstable_scheduleCallback =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_scheduleCallback
: unstable_scheduleCallback$1,
unstable_cancelCallback =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_cancelCallback
: unstable_cancelCallback$1,
unstable_getCurrentPriorityLevel =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_getCurrentPriorityLevel
: unstable_getCurrentPriorityLevel$1,
unstable_shouldYield =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_shouldYield
: shouldYieldToHost,
unstable_requestPaint =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_requestPaint
: requestPaint,
unstable_now =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_now
: getCurrentTime;
exports.unstable_IdlePriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_IdlePriority
: 5;
exports.unstable_ImmediatePriority = unstable_ImmediatePriority;
exports.unstable_LowPriority = unstable_LowPriority;
exports.unstable_NormalPriority = unstable_NormalPriority;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = channel;
exports.unstable_cancelCallback = unstable_cancelCallback;
exports.unstable_forceFrameRate = throwNotImplemented;
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
exports.unstable_next = throwNotImplemented;
exports.unstable_now = unstable_now;
exports.unstable_requestPaint = unstable_requestPaint;
exports.unstable_runWithPriority = throwNotImplemented;
exports.unstable_scheduleCallback = unstable_scheduleCallback;
exports.unstable_shouldYield = unstable_shouldYield;
exports.unstable_wrapCallback = throwNotImplemented;
})();

View file

@ -0,0 +1,330 @@
/**
* @license React
* scheduler.native.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
var getCurrentTime;
if ("object" === typeof performance && "function" === typeof performance.now) {
var localPerformance = performance;
getCurrentTime = function () {
return localPerformance.now();
};
} else {
var localDate = Date,
initialTime = localDate.now();
getCurrentTime = function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
}
function unstable_scheduleCallback$1(priorityLevel, callback, options) {
var currentTime = getCurrentTime();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));
return priorityLevel;
}
function unstable_cancelCallback$1(task) {
task.callback = null;
}
function unstable_getCurrentPriorityLevel$1() {
return currentPriorityLevel;
}
var isMessageLoopRunning = !1,
taskTimeoutID = -1,
startTime = -1;
function shouldYieldToHost() {
return needsPaint ? !0 : 5 > getCurrentTime() - startTime ? !1 : !0;
}
function requestPaint() {
needsPaint = !0;
}
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = getCurrentTime();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
!(
currentTask.expirationTime > currentTime && shouldYieldToHost()
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = getCurrentTime();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = !1;
}
}
break a;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: (isMessageLoopRunning = !1);
}
}
}
var schedulePerformWorkUntilDeadline;
if ("function" === typeof localSetImmediate)
schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(getCurrentTime());
}, ms);
}
var unstable_UserBlockingPriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_UserBlockingPriority
: 2,
unstable_NormalPriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_NormalPriority
: 3,
unstable_LowPriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_LowPriority
: 4,
unstable_ImmediatePriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_ImmediatePriority
: 1,
unstable_scheduleCallback =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_scheduleCallback
: unstable_scheduleCallback$1,
unstable_cancelCallback =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_cancelCallback
: unstable_cancelCallback$1,
unstable_getCurrentPriorityLevel =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_getCurrentPriorityLevel
: unstable_getCurrentPriorityLevel$1,
unstable_shouldYield =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_shouldYield
: shouldYieldToHost,
unstable_requestPaint =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_requestPaint
: requestPaint,
unstable_now =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_now
: getCurrentTime;
function throwNotImplemented() {
throw Error("Not implemented.");
}
exports.unstable_IdlePriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_IdlePriority
: 5;
exports.unstable_ImmediatePriority = unstable_ImmediatePriority;
exports.unstable_LowPriority = unstable_LowPriority;
exports.unstable_NormalPriority = unstable_NormalPriority;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = unstable_UserBlockingPriority;
exports.unstable_cancelCallback = unstable_cancelCallback;
exports.unstable_forceFrameRate = throwNotImplemented;
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
exports.unstable_next = throwNotImplemented;
exports.unstable_now = unstable_now;
exports.unstable_requestPaint = unstable_requestPaint;
exports.unstable_runWithPriority = throwNotImplemented;
exports.unstable_scheduleCallback = unstable_scheduleCallback;
exports.unstable_shouldYield = unstable_shouldYield;
exports.unstable_wrapCallback = throwNotImplemented;

340
node_modules/scheduler/cjs/scheduler.production.js generated vendored Normal file
View file

@ -0,0 +1,340 @@
/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
exports.unstable_now = void 0;
if ("object" === typeof performance && "function" === typeof performance.now) {
var localPerformance = performance;
exports.unstable_now = function () {
return localPerformance.now();
};
} else {
var localDate = Date,
initialTime = localDate.now();
exports.unstable_now = function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
}
var isMessageLoopRunning = !1,
taskTimeoutID = -1,
frameInterval = 5,
startTime = -1;
function shouldYieldToHost() {
return needsPaint
? !0
: exports.unstable_now() - startTime < frameInterval
? !1
: !0;
}
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
!(
currentTask.expirationTime > currentTime && shouldYieldToHost()
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = exports.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = !1;
}
}
break a;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: (isMessageLoopRunning = !1);
}
}
}
var schedulePerformWorkUntilDeadline;
if ("function" === typeof localSetImmediate)
schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(exports.unstable_now());
}, ms);
}
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_forceFrameRate = function (fps) {
0 > fps || 125 < fps
? console.error(
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
)
: (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);
};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = exports.unstable_now();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));
return priorityLevel;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};